ADR 0004 — CLI as the primary interface for agents
Status: accepted. Date: 2026-12-03.
Decision
- Every command accepts
--jsonand returns a single object{ ok, command, exitCode, data, diagnostics }. - Stable exit codes: 0 success, 1 problems found, 2 invalid usage, 3 environment, 70 internal error. An environment failure is never confused with a code failure.
fellow help --jsondescribes commands, arguments, options and which commands change state.- Diagnostics have a stable id, severity, rule, file, line, cause and suggestion.
- Generators produce a plan;
--dry-runshows it; re-running is safe; a divergence is a conflict, never a silent overwrite. - No command asks for interactive input.
Consequences
- Diagnostic ids and exit codes become public API and follow semantic versioning.
- MCP and skills must be a thin layer over these same commands, with no logic of their own.