Skip to content

feat(cli): agent-native inspection surfaces#68

Merged
escapeboy merged 1 commit into
masterfrom
feature/agent-native-cli
May 17, 2026
Merged

feat(cli): agent-native inspection surfaces#68
escapeboy merged 1 commit into
masterfrom
feature/agent-native-cli

Conversation

@escapeboy
Copy link
Copy Markdown
Owner

Summary

Five read-only, --json-capable CLI commands so AI agents can inspect Boruna projects without reading source. Motivated by a competitive review of vercel-labs/zero — see claudedocs/research_zerolang_vs_boruna_2026-05-17.md.

Command Purpose
boruna lang codes [--json] Registry of stable diagnostic codes (E001E009) — name, summary, category
boruna doctor [--json] Environment/toolchain health: version, compiled features, Rust toolchain, data-dir writability, project layout
boruna workflow graph <dir> [--json] DAG facts: nodes (kind, capabilities, deps), edges, topological order, roots, leaves
boruna size <file.ax> [--json] Bytecode artifact cost: per-function opcode counts, totals, serialized .axbc byte size
boruna skills list / get <name> Embedded, agent-curated docs (ax-language, cli, workflows, diagnostics) — usable with no repo checkout

All five are read-only. No persisted-schema changes, no determinism/replay impact, no new MCP tools.

Notes

  • The research's idea docs: update CLAUDE.md with test count, CI/CD, and security invariants #1 ("stable diagnostic codes") was already implemented (E001E009). Per the agreed scope it was replaced with the machine-readable registry (tooling/src/diagnostics/registry.rs) — the agent-facing piece that was missing. A drift test parses diagnostics/mod.rs so a code added without a registry entry fails the build (convention §33).
  • boruna lang codes lives under lang (already "diagnostics, repair") rather than a new top-level command, to avoid surface bloat.

Test plan

  • ✅ 12 new integration tests in crates/llmvm-cli/tests/cli_agent_native.rs
  • ✅ 3 registry drift/uniqueness/population tests + 3 skills tests
  • cargo clippy --workspace --all-targets -D warnings clean
  • cargo fmt --all --check clean
  • cargo test --workspace — all 46 test targets pass except cli_watch::watch_reruns_on_file_change, verified pre-existing: it fails identically on clean master (filesystem-watch timing test, unrelated to this branch).

Design / architecture / test plan: docs/design-agent-native-cli.md, docs/architecture-agent-native-cli.md, docs/test-plan-agent-native-cli.md.

🤖 Generated with Claude Code

Add five read-only, --json-capable CLI commands so AI agents can
inspect Boruna projects without reading source:

- boruna lang codes      — registry of stable diagnostic codes (E001–E009)
- boruna doctor          — environment + toolchain health checks
- boruna workflow graph  — DAG facts: nodes, edges, topo order, roots, leaves
- boruna size            — bytecode artifact cost report
- boruna skills          — embedded, agent-curated documentation

The diagnostic-code registry (tooling/src/diagnostics/registry.rs) is
the single source of truth; a drift test parses diagnostics/mod.rs so a
code added without a registry entry fails the build.

Motivated by a competitive review of vercel-labs/zero. See
docs/design-agent-native-cli.md and claudedocs/research_zerolang_vs_boruna_2026-05-17.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@escapeboy escapeboy merged commit 913a039 into master May 17, 2026
4 of 5 checks passed
@escapeboy escapeboy deleted the feature/agent-native-cli branch May 17, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant