Use Typed Verification Tools Instead of Shell Guesswork in IOSM CLI
An agent should not have to guess whether a test command succeeded by reading a wall of shell output.
The shell is still essential, but it is a poor verification protocol. Every test runner formats success differently. Some return no tests as success, others as failure. A linter may support a fix mode that silently changes files. A type-check command may exist in package.json, be inferred from configuration, or be missing entirely. If the agent receives only raw text, it has to reconstruct the meaning after execution.
IOSM CLI now exposes a more precise boundary: test_run, lint_run, and typecheck_run. They are structured tools with runner detection, explicit modes, and normalized result states. I see them as a small but important move from “the agent ran a command” to “the runtime produced a verification result.”
The problem is not launching the command
Any coding agent can execute:
npm test
npm run lint
npm run typecheck
The difficult part begins after the process exits.
The runtime must answer questions that shell text does not standardize:
- Was a compatible runner found?
- Did the checks pass, fail, or not exist?
- Did the linter only inspect files, or did it modify them?
- Which command was selected by automatic detection?
- Was the failure caused by the code, missing tooling, invalid configuration, or process execution?
- If several type-check paths exist, did one pass while another failed?
This distinction matters in an IOSM cycle. A gate needs a state it can reason about. “The output looked green” is not a stable state.
Three tools, three contracts
The current IOSM CLI source implements three separate verification tools rather than one generic “quality” command.
| Tool | Question it answers | Normalized states |
|---|---|---|
test_run |
Did the selected test suite execute and pass? | passed, failed, no_tests, error |
lint_run |
Did static/style checks pass under the requested mode? | structured check/fix result |
typecheck_run |
Did the detected type systems accept the project? | per-runner and aggregate result |
The separation is useful because absence has different meanings.
no_tests is not the same as passed. An execution error is not the same as a failing assertion. A missing type checker is not proof that the types are valid. Once those outcomes are distinct, the agent can stop, ask for a missing prerequisite, or report an evidence gap without inventing success.
That follows the same principle as missing IOSM metrics: absence is a state, not a zero and not a pass.
Automatic detection is a proposal, not magic
The tools can select a runner automatically. For tests, IOSM CLI checks the project’s declared test script and known configurations before falling back to supported conventions. Lint and type-check tools use similar project signals.
A minimal agent instruction can therefore be:
Run test_run, lint_run in check mode, and typecheck_run with automatic runner detection.
Do not modify files. Report the selected commands and normalized status for each check.
This is safer than asking the agent to “run the usual checks” because the requested evidence is explicit. It is also more portable than hard-coding npm when the repository may use another package manager or a Python test stack.
Automatic detection still has a boundary. It can discover declared tooling; it cannot decide whether the discovered suite covers the change that matters. A green global test command may miss a migration, a generated artifact, an integration environment, or a production invariant. Runner discovery reduces command ambiguity. It does not eliminate coverage analysis.
Check mode and fix mode must remain different authorities
Linting is where verification often turns into mutation without anyone noticing.
A request such as “run the linter” may resolve to a command with --fix, a package script that rewrites files, or a formatter integrated into the lint step. That is no longer observation. It is an edit.
IOSM CLI’s lint tool makes the mode explicit:
lint_run(mode="check")
lint_run(mode="fix")
The exact invocation happens through the tool interface, not this illustrative text, but the authority split is the point. check belongs in a read-first gate. fix belongs in an approved mutation step followed by a new diff and a second check.
I use this sequence:
1. lint_run: check
2. inspect failures
3. approve the intended repair scope
4. lint_run: fix
5. inspect git diff
6. lint_run: check
7. run tests and type checks again
A formatter can change generated files, imports, snapshots, or line-sensitive fixtures. “The fixer exited successfully” is not the final acceptance condition.
A verification receipt can stay small
The structured tools make it possible to produce a compact receipt without storing the entire terminal transcript as the conclusion.
{
"scope": "authentication adapter",
"base_commit": "<sha>",
"checks": [
{"tool": "test_run", "runner": "auto", "status": "passed"},
{"tool": "lint_run", "mode": "check", "status": "passed"},
{"tool": "typecheck_run", "runner": "auto", "status": "passed"}
],
"diff_check": "passed",
"decision": "ready_for_review"
}
This is an example receipt, not a claim that IOSM CLI emits this exact JSON schema. The important fields are the selected mechanism, normalized status, repository identity, and decision boundary.
The receipt should point to raw logs when a reviewer needs detail. It should not replace them. The same layered approach is described in turning an IOSM run into reviewable evidence: session, trace, repository result, and human export answer different questions.
Put typed checks around the change, not after the story
A practical execution loop looks like this:
Before mutation
- capture git status and base commit
- run test_run
- run lint_run in check mode
- run typecheck_run
- record missing or failing checks as baseline state
After mutation
- rerun the same structured checks
- compare selected runners and scopes
- run git diff --check
- inspect changed paths
- execute project-specific checks that automatic detection cannot infer
Before acceptance
- reject “passed” if the runner changed unexpectedly
- reject “no_tests” as proof of correctness
- separate code failures from tooling errors
- preserve unresolved checks as unknown, not green
The comparison matters. If the baseline used one test script and the final run silently selected another, two green statuses are not necessarily comparable. Tool normalization improves semantics, but the receipt still needs command identity and scope.
Where the structured tools stop
There are four hard limits.
First, automatic detection follows repository signals. Broken or misleading scripts produce broken or misleading verification.
Second, normalized status does not measure test quality. A weak suite can pass perfectly.
Third, these tools validate local execution. They do not prove production behavior, user impact, or adoption.
Fourth, not every invariant maps to tests, lint, or types. Database migrations, API compatibility, generated files, security policy, load behavior, and deployment health need their own checks.
For CI, I would keep model interpretation advisory and let deterministic artifacts decide promotion. The IOSM CLI CI review gate shows that boundary in a delivery workflow.
The runtime should interpret less text
I do not want an engineering agent to become better at reading decorative console output. I want the runtime to expose fewer ambiguous states.
test_run, lint_run, and typecheck_run are modest tools. They do not solve verification. They do something more fundamental: they give verification a typed interface.
That changes the agent’s job. It no longer has to infer whether the process meant success, absence, failure, or execution error from arbitrary text. It can spend its reasoning on the part that remains genuinely difficult: whether the selected checks are sufficient for the change.