feat: agent-native CLI fixes round 2 (F11, F14, F18)#191
Merged
AlephNotation merged 4 commits intomainfrom May 8, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three more agent-native-CLI fixes from the audit, sourced from Trevin Chow's 10 Principles for Agent-Native CLIs. Implemented by three Opus 4.7 subagents in parallel git worktrees.
What changed
F11 —
vers agent-context(principle 7: introspection)New top-level command emitting versioned JSON describing every command, subcommand, and flag. Agents consume this instead of parsing
--helptext.Schema shape:
{ "schema_version": "1", "cli": {"name", "version", "description"}, "commands": { "<name>": { "use", "short", "long", "aliases", "args": {min, max}, "async": <true if --wait flag exists>, "flags": {"--<name>": {type, default, usage, required, shorthand?, enum?}}, "subcommands": {recursive} } }, "available_profiles": [], "feedback": {"local_path", "endpoint_configured"} }Includes an annotation hook (
cmd.Annotations["vers:enum:<flag>"] = "a,b,c") for declaring enum constraints; not pre-populated in this PR.cmd.SilenceUsage = trueandcmd.SilenceErrors = trueso the command never fails — it's the agent's escape hatch when--helpis too noisy.F18 Phase A —
vers feedback(principle 10: two-way I/O)New command for reporting friction back. Phase A is local journaling + opt-in upstream POST. No backend infra is being built right now — the upstream sink is whatever URL the user sets via
VERS_FEEDBACK_ENDPOINT.~/.vers/feedback.jsonl(overridable viaVERS_FEEDBACK_PATHfor tests).feedback listsupports--limit,--offset,--jsonvia the existing pagination presenter.agent-context(F11) declares both the path andendpoint_configured: boolso introspecting agents can discover the channel.api.vers.shfor issue-tracker integration) is deferred until the backend question is decided.F14 Phase 1 — durable job ledger (principle 8: async-aware execution)
vers-cli already has
--waiton every async-submitting command. F14 Phase 1 adds the journaling layer: every--waitinvocation writes start + completion entries to~/.vers/jobs.jsonl, and a newvers jobsparent command exposes the ledger.id; latest line wins on read.cmd/run.go,cmd/branch.go,cmd/deploy.go,cmd/resume.go,cmd/run_commit.go— only journal when--waitis set; ledger writes are best-effort (a write failure must not fail the user-facing command).vers jobs listreuses the F7 pagination envelope; supports--statusfilter.Caveats and follow-ups
--visibility,--deliverschemes, log levels) withvers:enum:*is a follow-up sweep. Once done, errors on those flags can self-enumerate via principle 3.vers jobsrequires auth today because the cobraPersistentPreRunErequires an API key for any non-(login/signup/help/upgrade) command. The ledger is purely local; if we want it to work fully offline, addjobsto the skip list incmd/root.go.agent-contextdoes not yet enumeratevers feedback/vers jobsintegrations. Each landed in parallel; a follow-up PR should add those env vars (VERS_FEEDBACK_ENDPOINT,VERS_FEEDBACK_PATH,VERS_JOBS_DIR) and the jobs ledger path to the schema.F1-json-flag.md,F7-pagination.md) leaked into PR feat: agent-native CLI fixes (F1, F7, F8) #190 and are still onmain. This PR happens to delete them.Validation
make build— cleangofmt -l cmd/ internal/— emptygo test ./internal/... ./cmd/...— all pass, including new test packages:internal/feedback(8 unit tests witht.TempDir())internal/jobs(8 unit tests covering submit/complete/fail/collapse/prune/parseDuration)cmd/agent_context_test.go(schema_version, top-level walk, async flag, enum annotation)vers agent-context,vers feedback/feedback list, andvers jobs list/get/pruneall behave correctly.Commits