Skip to content

agentoperable/aoi-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aoi-lint

Conformance checker for AOI-CLI tools. Itself an AOI tool — emits its own typed event stream while it works.

For the standard, see https://machinemode.io. For the conformance criteria this tool checks against, see https://machinemode.io/spec#18-conformance--aoi-lint.

Install

npm i -g aoi-lint
# or, locally:
pnpm add -D aoi-lint

Use

aoi-lint -- outline search "agent operable" --output jsonl --limit 3

Everything after -- is the command to lint. aoi-lint invokes it as a subprocess, captures its stdout, and runs the v0.1 conformance checklist. The lint itself produces an AOI event stream on stdout.

Example output:

{"type":"aoi:meta","tool":"aoi-lint","tool_version":"0.1.0","aoi_version":"0.2","schema_name":"io.agentoperable.aoi-lint.events","schema_version":"1.0.0","command":"lint"}
{"type":"aoi:check","name":"command_invocable","ok":true,"severity":"info","detail":"outline search agent operable --output jsonl --limit 3"}
{"type":"aoi:check","name":"valid_jsonl","ok":true,"severity":"info","detail":"5 lines parsed"}
{"type":"aoi:check","name":"every_event_has_type","ok":true,"severity":"info"}
{"type":"aoi:check","name":"terminal_summary_present","ok":true,"severity":"info"}
{"type":"aoi:check","name":"summary_has_ok","ok":true,"severity":"info"}
{"type":"aoi:check","name":"summary_ok_true","ok":true,"severity":"info","detail":"summary.ok = true"}
{"type":"aoi:check","name":"exit_code_zero","ok":true,"severity":"info","detail":"exit code 0"}
{"type":"aoi:summary","ok":true,"count":7,"error_count":0,"warning_count":0}

Each check is one row of the v0.1 conformance table — see § 18 of the spec.

Exit code

  • 0 — every check passed; the target command is conforming for the surface that was exercised.
  • 1 — one or more checks failed. Inspect the aoi:check events with ok:false and the terminal aoi:summary.error_count.
  • 64 (EX_USAGE) — usage error in invoking aoi-lint itself.

v0.1 scope

Checks implemented in this version:

# Check Maps to AOI characteristic
1 The target command can be invoked. (precondition)
2 Every line of stdout is valid JSON. Typed
3 Every event object has a type field. Typed
4 A terminal aoi:summary event is present. Verifiable
5 The terminal aoi:summary has an ok field of type boolean. Verifiable
6 aoi:summary.ok is true (or, if false, classified as a clean failure). Verifiable
7 Process exit code is 0 when summary.ok=true; non-zero otherwise. Verifiable

Out of scope for v0.1 (planned)

The full conformance table in spec § 18 covers thirteen checks. Checks beyond the seven above — schema discovery, capability advertisement validation, error taxonomy completeness, safety primitives (--dry-run, --confirm), redaction, signal handling, pagination, version negotiation, input-side handling — are tracked for v0.2.

Status

v0.1 — early scaffold. The check set is small but exercises the most common failure modes. PRs welcome.

License

MIT

About

Conformance checker for AOI-CLI tools. Itself an AOI tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors