Skip to content

feat: agent-bootstrap CLI surface + AGENTS-CLI 0.1 reference impl#6

Merged
akesling merged 26 commits into
mainfrom
akesling/agents
May 6, 2026
Merged

feat: agent-bootstrap CLI surface + AGENTS-CLI 0.1 reference impl#6
akesling merged 26 commits into
mainfrom
akesling/agents

Conversation

@akesling
Copy link
Copy Markdown
Contributor

@akesling akesling commented May 6, 2026

Summary

  • qualifier agents subcommand (0.5.0): self-contained guide for AI coding agents, surfaced under a new "For AI agents:" group at the top of qualifier --help. Bare qualifier agents prints an orientation page; qualifier agents <topic> drills into 12 topics (3 topical: concepts/workflows/pitfalls; 9 per-subcommand: record/reply/resolve/emit/show/ls/praise/review/compact). Pages are hand-written markdown embedded into the binary, version-locked.
  • AGENTS-CLI 0.1 (0.5.1): a draft cross-tool protocol document (AGENTS-CLI.md) defining what it means for a CLI tool to self-describe to coding agents — five MUST rules (subcommand existence, bare orientation, topic dispatch, exit-2 unknown-topic, --help discoverability) plus four SHOULD recommendations. qualifier is named the reference implementation. Cross-linked from README; conformance is silent in the orientation page itself (which stays focused on agent-facing usage).
  • Frontmatter-driven page registry (0.5.1): the agents page registry is now generated at compile time by a new build.rs that walks src/cli/commands/agents/pages/*.md, parses TOML frontmatter (name/summary/sees_also/since), and emits the PAGES const into \$OUT_DIR/agents_pages.rs. Adding a topic = drop in a new .md file. Adds toml and serde as build-only dependencies; runtime binary unaffected.
  • Agent-noise discipline in the guide content: orientation and per-page guidance reframed so agents don't volunteer praise/pass annotations or autonomously resolve concerns. The `Surface drifted annotations` workflow tells agents to report drift to the user, not act on it. `pitfalls.md` makes both rules explicit.

Test plan

CI already covers `cargo test`, `cargo clippy --all-targets --all-features -- -D warnings`, and `cargo fmt --check`. The remaining items are reviewer judgment calls that CI cannot make:

  • Read the rewritten `resolve.md` and `workflows.md` (especially the new "Surface drifted annotations" recipe and `resolve`'s "When to use it" section). Does the agent-discipline framing read as you'd want an LLM in your repo to internalize it?
  • Read the new `pitfalls.md` bullets ("Resolving annotations the user has not directed you to close" and "Adding positive annotations the user did not ask for") — same question.
  • Skim `AGENTS-CLI.md` for tone and conformance bar — is 0.1 the right version label, are the MUSTs correctly drawn, is the SHOULD/MAY split reasonable?
  • Confirm the README cross-link and `AGENTS-CLI.md` itself render as expected on the GitHub PR view (relative-link resolution, blockquote callout).
  • Sanity-check `qualifier --help` and `qualifier agents` look right end-to-end (group placement at top, topic order, no `{{TOPICS}}` or `+++` leakage, exit-2 path) — `cargo build && target/debug/qualifier --help && target/debug/qualifier agents`.

Specs and plans


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

akesling added 25 commits May 6, 2026 09:42
Brainstorm output: a new `agents` subcommand prints a self-contained
guide so an AI coding agent in a user's repo can bootstrap into
productive use of qualifier without a separately-installed skill or
prompt bundle. Pages are hand-written markdown embedded via
include_str!(), discovered through a small registry, and surfaced
under a new "For AI agents:" group at the top of `qualifier --help`.
Bite-sized TDD breakdown of the spec at
docs/superpowers/specs/2026-05-06-qualifier-agents-command-design.md
into 10 tasks, each with failing-test-first steps where applicable.
Tasks 1–5 build infrastructure (skeleton, registry, dispatch,
overview rendering, help-template wiring); Tasks 7–8 fill in real
prose for the topical and per-subcommand pages; Task 9 handles
version/CHANGELOG/README; Task 10 is final verification.
Adds the `qualifier agents` subcommand as a directory-style module with
a bundled markdown overview page. Bare invocation prints the overview;
an unrecognized topic name exits with code 2.
Replace placeholder _overview.md with real orientation prose containing
{{TOPICS}}, and add integration + unit tests to verify substitution.
Replaces one-line placeholders in all 9 per-subcommand agent pages with
structured content following the Purpose / When to use it / Common
invocations / Flags worth knowing / Gotchas template (57–72 lines each).
All flags verified against source and --help output; removed features
(score, init, graph) are not mentioned.
Two related artifacts:

1. AGENTS-CLI.md (repo root) — a draft protocol document for CLI tools
that self-describe to AI coding agents. Tool-agnostic prose with five
MUST rules (subcommand existence, bare orientation, topic dispatch,
unknown-topic exit-2, --help discoverability) and four SHOULD rules.
qualifier 0.5.0+ is the reference implementation. Probe and JSON
output are out of scope for 0.1.

2. docs/superpowers/specs/2026-05-06-frontmatter-migration-design.md
— qualifier-internal refactor that replaces the hand-coded &[Page]
registry with TOML frontmatter on each page, generated at compile
time by build.rs. Adds name/summary/sees_also/since fields. No
user-visible CLI change.
Replaces the hand-coded &[Page] in src/cli/commands/agents/mod.rs with
a build.rs-generated const derived from frontmatter on each
pages/*.md. Adds toml + serde as build dependencies; emits
$OUT_DIR/agents_pages.rs included by mod.rs. New schema:
name (required), summary (required for topic pages), sees_also
(optional, parsed but not yet rendered), since (optional). User-visible
CLI behavior is unchanged.
…bility

Strip the leading '\n' after the closing +++ delimiter so rendered pages
no longer start with a blank line. Also narrow Page and its generated
constants from pub to private (with #[allow(dead_code)] on the two
not-yet-read fields) to avoid the private_interfaces lint under -D warnings.
…amples

Three changes to the agent-facing pages:

- _overview.md: drop the bullet recommending agents proactively record
  praise; drop the ## Protocol footer (AGENTS-CLI conformance is for
  tool authors, not for the agents reading this page).
- pitfalls.md: add an explicit pitfall against volunteering
  positive-polarity annotations without user direction.
- record.md: replace the "Approve an artifact" example (which modeled
  exactly the proactive-positive pattern) with a suggestion example
  that preserves the --issuer / --issuer-type ai illustration.
…t close

Across four pages:

- _overview.md "When to use it" drops the resolve bullet; the section
  now lists only recording-a-finding as an agent-initiated action.
- workflows.md drops the "Resolve a finding" recipe and rewrites the
  drift-triage recipe so the agent surfaces drift to the user instead of
  auto-resolving DRIFTED/MISSING annotations.
- pitfalls.md adds an explicit pitfall against resolving annotations the
  user has not directed the agent to close.
- resolve.md "When to use it" is rewritten to frame resolve as a
  user-directed action; the --issuer-type ai note is reworded to assume
  resolve is always done on behalf of the user, never autonomously.
@akesling akesling force-pushed the akesling/agents branch from 9a017a9 to 009e127 Compare May 6, 2026 20:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🔍 Preview deployed: https://1c8f5b1a.qualifier-dev.pages.dev

@akesling akesling merged commit 5f2d422 into main May 6, 2026
2 checks passed
@akesling akesling deleted the akesling/agents branch May 6, 2026 20:44
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