Skip to content

spec: roll up to Agent CLI Guidelines v0.4.0#1

Merged
rnwolfe merged 2 commits into
mainfrom
spec-rollout/v0.4.0
Jun 25, 2026
Merged

spec: roll up to Agent CLI Guidelines v0.4.0#1
rnwolfe merged 2 commits into
mainfrom
spec-rollout/v0.4.0

Conversation

@rnwolfe

@rnwolfe rnwolfe commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Rolls vabc up to Agent CLI Guidelines v0.4.0, targeting Full conformance. Mirrors the factory Go templates (examplectl: internal/version/version.go, internal/cli/misc.go) and contract §5/§11.

Per-rule checklist

  • Conformance block in schema (§5) — schema --json now emits "conformance": { "spec": "agent-cli-guidelines", "version": "0.4.0", "level": "Full" }, backed by a new const Spec = "0.4.0" in internal/version. Verified from the built binary.
  • version --check (§11) — pull-based, structured {current, latest, updateAvailable, upgrade} against GitHub Releases, 3s timeout, fail-silent (returns a note + exit 0 on any network problem; never blocks an agent loop). Added Latest/UpdateAvailable/UpgradeHint helpers. Overridable via VABC_RELEASES_URL for tests. Verified live (update detected) and offline (fail-silent).
  • /llms.txt on the docs site — added the starlight-llms-txt plugin to site/astro.config.mjs + site/package.json. pnpm build now emits /llms.txt, /llms-full.txt, /llms-small.txt. (Pinned plugin ^0.4.0 to stay compatible with the site's Starlight 0.30 / Astro 5; avoids the Starlight 0.33 social-config breaking change.)
  • Conformance pinned to v0.4.0 Full in README — badge (already Full) + a new machine-verifiable prose statement pointing at the schema --json conformance block.

Notes

  • Backend is an official/structured API set (public Virginia ABC endpoints) — no backpressure changes needed (§12 N/A).
  • Schema golden snapshot regenerated for the new --check flag + conformance block (VABC_UPDATE_GOLDEN=1).

Verification

  • go build ./... — green
  • go test ./...23 passed (incl. the TestSchemaSnapshot contract gate)
  • vabc schema --json — conformance block present
  • vabc version --check — structured + fail-silent confirmed
  • pnpm build (site) — green, llms.txt generated

🤖 Generated with Claude Code

https://claude.ai/code/session_012UFrhC6bXVpoiiL3yhj2HH

- Add machine-readable conformance block to `schema --json`
  ({spec, version, level}) backed by a new version.Spec = "0.4.0" const.
- Add `version --check` (GitHub Releases, 3s timeout, fail-silent) plus
  Latest/UpdateAvailable/UpgradeHint helpers, mirroring the factory Go template.
- Add the starlight-llms-txt plugin to the docs site so /llms.txt,
  /llms-full.txt, and /llms-small.txt are generated.
- Pin README conformance to v0.4.0 Full (badge + prose statement).
- Regenerate schema golden snapshot for the new flag + conformance block.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012UFrhC6bXVpoiiL3yhj2HH
Copilot AI review requested due to automatic review settings June 25, 2026 19:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Rolls vabc forward to Agent CLI Guidelines v0.4.0 (targeting Full conformance) by adding a machine-verifiable conformance block to schema --json, implementing version --check (pull-based, fail-silent), and updating the docs site to generate /llms*.txt.

Changes:

  • Add conformance metadata to schema --json and regenerate the schema golden snapshot.
  • Add version --check support with GitHub Releases lookup helpers in internal/version.
  • Add the starlight-llms-txt plugin to the Astro/Starlight docs site and lockfile.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
site/pnpm-lock.yaml Locks new starlight-llms-txt dependency and its transitive tree.
site/package.json Adds starlight-llms-txt dependency for docs-site /llms*.txt generation.
site/astro.config.mjs Registers starlight-llms-txt as a Starlight plugin.
README.md Documents v0.4.0 Full conformance claim and how to verify via schema --json.
internal/version/version.go Adds spec constant + GitHub Releases “latest” lookup and update helpers for version --check.
internal/cli/testdata/schema.golden.json Updates contract snapshot for new --check flag and conformance block.
internal/cli/misc.go Emits conformance block in schema output; implements version --check structured output.
Files not reviewed (1)
  • site/pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread site/package.json Outdated
Comment on lines +77 to +82
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
if err != nil {
return "", err
}
req.Header.Set("Accept", "application/vnd.github+json")
resp, err := http.DefaultClient.Do(req)
Comment thread README.md Outdated
Comment on lines +84 to +86
The conformance block is machine-verifiable from the binary itself — `vabc schema --json` emits
`{ "spec": "agent-cli-guidelines", "version": "0.4.0", "level": "Full" }` — so an agent can confirm
the contract version without trusting this badge.
- Bump @astrojs/starlight ^0.30 -> ^0.31 so starlight-llms-txt's
  >=0.31 peer is satisfied; keeps the social-object config (pre-0.33)
  and still generates /llms.txt (verified via pnpm install + build).
- Add User-Agent header to internal/version Latest() (GitHub REST
  rejects UA-less requests) and fix UpgradeHint to /cmd/<tool>@latest,
  mirroring the examplectl factory template.
- README: show the conformance object nested under the top-level
  "conformance" key as valid JSON matching `vabc schema --json`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012UFrhC6bXVpoiiL3yhj2HH
@rnwolfe

rnwolfe commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

Addressed all three Copilot review comments in fa68b4b:

  1. Build risk (peer mismatch) — every published starlight-llms-txt requires @astrojs/starlight >=0.31 (even 0.0.1), so pinning down isn't possible. Bumped Starlight ^0.30 -> ^0.31 instead — 0.31 only needs astro ^5.1.5 (site already on ^5.1.0) and still accepts the pre-0.33 social object form, so no config break. Verified with a clean pnpm install (no peer warnings) and pnpm build/llms.txt, /llms-full.txt, /llms-small.txt all generated.
  2. User-Agent on Latest() — added req.Header.Set("User-Agent", "vabc-version-check") and fixed UpgradeHint to go install .../cmd/<tool>@latest, mirroring the examplectl factory template.
  3. README conformance example — now shows the object nested under the top-level conformance key as valid JSON, with a jq '.conformance' snippet matching real vabc schema --json output.

go build ./... + go test ./... green (23 passed); site build green.

@rnwolfe
rnwolfe merged commit 815e49d into main Jun 25, 2026
2 checks passed
@rnwolfe
rnwolfe deleted the spec-rollout/v0.4.0 branch June 25, 2026 20:13
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.

2 participants