How to Turn an IOSM CLI Run into Reviewable Evidence
An AI coding run is not reviewable merely because its transcript still exists. A transcript records conversation. Engineering review needs a bounded claim, the actions that affected the workspace, the resulting diff, and a repeatable way to verify the outcome.
IOSM CLI already exposes the pieces needed to build that review packet: persisted sessions, named branches, JSONL traces, structured output modes, and self-contained HTML export. The useful move is to treat them as different evidence layers instead of collapsing everything into one chat log.
Start with a review question
Before I run an agent, I write the question the reviewer must be able to answer afterward:
Did this run change only the intended authentication boundary, and do the repository checks still pass?
That sentence does more work than “review the session.” It defines scope and points toward observable evidence. If the question is vague, the exported artifact will be detailed but inconclusive.
For ambiguous work, I first turn the request into a bounded plan. The practical sequence in How to Turn a Feature Request into an IOSM Execution Plan is a good upstream step: decide what is being attempted before collecting proof that it happened.
Use four separate evidence layers
I keep four objects distinct:
- Session — the reasoning path, user decisions, and conversational context.
- Trace — timestamped runtime events such as tool calls, tool results, context composition, and token usage.
- Repository result — the diff, tests, lint, type checks, and generated artifacts.
- Review export — a portable presentation of the session for a human reader.
None of them replaces the others. The HTML export is easier to read than JSONL, but it is not a test result. A clean test run proves a postcondition, but not that the agent stayed inside the intended scope. A trace shows tool activity, but activity alone does not prove correctness.
This distinction is the same reason I treat IOSM CLI as a runtime rather than another chat interface: execution becomes useful when intermediate state and completion conditions survive the conversation.
Capture the run deliberately
For a reviewable interactive run, I enable tracing and keep sessions in a project-specific directory:
mkdir -p .iosm/review-sessions .iosm/review-traces
iosm \
--session-dir .iosm/review-sessions \
--session-trace \
--session-trace-dir .iosm/review-traces \
--profile iosm
Inside the session I give the run a useful name:
/name "auth-boundary-review-2026-10-17"
A date alone is not enough. The name should identify the decision or boundary under review. This makes --resume, --session, and the session tree operational tools rather than a pile of anonymous history.
If I need to compare two approaches, I branch before implementation instead of mixing both attempts into one linear narrative:
/fork
/tree
The dedicated guide on comparing engineering approaches with IOSM session branches covers that workflow in more depth. Here the important point is evidentiary: branches preserve which observations belonged to which decision path.
Read the trace as an event ledger
The session trace is JSONL: one event per line. That makes it suitable for targeted inspection with jq rather than manual scrolling.
TRACE=.iosm/review-traces/<session-id>.jsonl
jq 'select(.type == "tool_call")' "$TRACE"
jq 'select(.type == "tool_result")' "$TRACE"
jq 'select(.type == "turn_end") | .usage.totalTokens' "$TRACE"
IOSM CLI also records context-composition events. Those events can show that files were truncated or dropped before a model response. That does not automatically invalidate the result, but it changes the review question: did the omitted context contain a load-bearing constraint?
I therefore look for three trace conditions:
- the expected files and tools were actually inspected;
- no unexpected write-capable action crossed the declared scope;
- context truncation or dropped files did not remove material needed for the decision.
This is a boundary check, not a hunt for a perfect transcript.
Bind the trace to repository evidence
A trace should point to a repository state. At minimum, I preserve:
git rev-parse HEAD
git status --short
git diff --check
git diff --stat
npm test
The exact verification commands depend on the repository. The invariant is that they are explicit and rerunnable. If the run changes generated files, migrations, schemas, or deployment configuration, those outputs need their own checks.
For CI use, the safer first integration remains a read-only boundary. The IOSM CLI CI review gate shows how to keep model output advisory until a deterministic receipt binds the result to a commit and a closed outcome.
A useful review packet can therefore be summarized as:
{
"question": "Did the run change only the intended auth boundary?",
"base_commit": "<sha>",
"session": ".iosm/review-sessions/<id>.jsonl",
"trace": ".iosm/review-traces/<id>.jsonl",
"verification": ["git diff --check", "npm test"],
"result": "accept | reject | needs-work"
}
This JSON is an example review envelope, not a claim that IOSM CLI currently emits this exact schema automatically.
Export for people, retain raw evidence for machines
When the session is ready for human review, I export it:
/export
or from the command line:
iosm --export /path/to/session.jsonl
The result is a self-contained HTML file with the conversation structure and rendered tool calls. It is useful for review, handoff, and archival because the reader does not need the original terminal session.
I do not use /share by default for repository work. Sharing uploads the serialized session to a secret GitHub Gist and therefore crosses a data boundary. Before using it, the session must be checked for source code, credentials, private paths, customer data, and internal instructions. “Secret” means unlisted, not suitable for confidential material.
The safer default is local export plus an approved storage location. Raw JSONL remains available for machine inspection; HTML exists for the reviewer.
Define acceptance outside the transcript
The final mistake is asking the conversation to certify itself. The agent can summarize what it believes happened, but acceptance must be derived from external conditions:
- the changed paths match the declared scope;
- required checks exit successfully;
- no unresolved trace event indicates an unknown tool outcome;
- the reviewer can reproduce the verification commands;
- the final diff answers the original review question.
If any condition fails, the packet should support rejection without reconstructing the entire run. That is the practical value of preserved evidence: not bureaucratic completeness, but cheap, precise doubt.
I want AI work to end as an inspectable engineering object. A named session explains the path. A trace records execution. Repository checks establish postconditions. The export makes the work readable. Only together do they turn a run into something another engineer can responsibly accept.