# is-cli-agentic: opencode

- **slug:** `npm/opencode-ai`
- **ecosystem:** npm · **package:** `opencode-ai`
- **rubric:** 1.0.0
- **agentTested:** false
- **grade (deterministic only):** F (30/100)
- **status:** done

## Deterministic checks

### D1 Legibility — 27% (4/15)
- [FAIL] machine-readable schema (`schema` / `--describe` returns JSON) — no capability document; agent must parse help prose
  - **Fix:** Add a `schema` or `--describe` command that prints the complete command, option, input, and output schema as JSON.
- [PASS] exposes an MCP surface — yes
- [FAIL] help contains usage examples — no
  - **Fix:** Add copy-pasteable examples to top-level and subcommand help, including one successful machine-readable invocation.

### D2 Structured I/O — 0% (0/20)
- [FAIL] documents a JSON output mode — no machine-parseable output documented
  - **Fix:** Add and document `--json` or `--output json`, then keep its keys and types stable for scripts and agents.
- [FAIL] no ANSI escapes when the stream is piped — leaks colour codes into agent context
  - **Fix:** Detect non-TTY output and disable color, cursor movement, spinners, and other ANSI escapes automatically.
- [FAIL] has a quiet mode — no
  - **Fix:** Add `--quiet` (or `--no-progress`) so stdout can contain only the requested result.

### D3 Non-blocking — 20% (4/20)
- [FAIL] does not hang when stdin is a non-delivering pipe — HANGS - agent blocks forever
  - **Fix:** When stdin is not a TTY, fail fast instead of prompting; document a `--non-interactive` or `--yes` escape hatch.
- [PASS] --help does not hang — ok
- [FAIL] documents a non-interactive escape hatch — no
  - **Fix:** Document a non-interactive mode that supplies defaults or exits with an actionable error whenever input is missing.
- [FAIL] cold invocation under 3s — 8.01s
  - **Fix:** Defer plugins, updates, auth, and network initialization until after argument parsing so a cold invocation returns within 3 seconds.

### D4 Context economy — 67% (10/15)
- [partial] help fits an agent context budget — 4285 bytes (~1071 tokens)
  - **Fix:** Keep top-level help concise and move detail into subcommand help or machine-readable schema output.
- [PASS] does not reprint full help on every mistake — 99 bytes

### D6 Safety rails — 0% (0/10)
- [FAIL] offers a dry-run — no
  - **Fix:** Add `--dry-run` to mutating commands; validate locally and print the exact planned changes without making network calls.
- [FAIL] offers an explicit confirmation bypass — no
  - **Fix:** Add an explicit `--yes` confirmation bypass that is safe to use only when every required value is supplied.

### D7 Error recovery — 60% (12/20)
- [FAIL] unknown subcommand exits non-zero — exit 0 — SILENT FAILURE
  - **Fix:** Return a non-zero exit code for unknown subcommands and name the closest valid subcommand on stderr.
- [PASS] unknown flag exits non-zero — exit 1
- [PASS] error message is terse — 99 bytes

### D9 Cold credentials — 30% (6/20)
- [FAIL] names its credential env var in its own help surface — agent must already know the variable name; undiscoverable from --help
  - **Fix:** Name the supported credential environment variable in `--help`, including its precedence over config files.
- [FAIL] offers a no-account or temporary-account path — no; the agent stops at the signup wall
  - **Fix:** Offer a documented temporary, guest, or claim-later path so a cold agent can complete one useful task without signup.
- [PASS] does not launch a browser auth flow in a headless context — ok

---
Every score links to the trajectory that produced it. The rubric is published and frozen before the first public score.