Skip to content

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

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

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 rivr up to Agent CLI Guidelines v0.4.0 (Full).

Per-rule checklist

  • Conformance block in schema — rivr schema --json now emits conformance: { spec: "agent-cli-guidelines", version: "0.4.0", level: "Full" }, generated from version.Spec. Mirrors the examplectl Go idiom (contract §5: machine-readable conformance).
  • const Spec = "0.4.0" added to internal/version.
  • version --check — already present (pull-based, fail-silent via internal/update); no change needed.
  • Backpressure for the scraped Amazon backend — verified present, not missing. internal/throttle is a persistent, cross-process circuit-breaker (Load/Block/Clear/RetryAfter), wired through internal/provider/common.go (throttle.Load(...).RetryAfter, markBlocked → throttle.Block, markOK → throttle.Clear) and surfaced via doctor/Cooldown. No throttle built in this PR (none needed).
  • README pinned to v0.4.0 Full — badge alt-text pinned to v0.4.0, plus a new Conformance section stating the spec version + level and pointing at the binary-verifiable schema block.
  • Schema golden regenerated (internal/cli/testdata/schema.golden.json).

Verification

  • go build ./... — clean
  • go test ./... — 39 passed in 12 packages
  • rivr schema --json emits the conformance block at runtime (confirmed)

Resulting level

Full @ Agent CLI Guidelines v0.4.0

🤖 Generated with Claude Code

https://claude.ai/code/session_012UFrhC6bXVpoiiL3yhj2HH

Add a machine-verifiable conformance block to `rivr schema` and pin the
README conformance to v0.4.0 Full.

- version: add `const Spec = "0.4.0"`
- schema: emit `conformance` { spec, version, level: Full }
- README: pin badge + add a Conformance statement
- regenerate schema golden

Backpressure for the scraped Amazon backend is already present and wired:
internal/throttle is a persistent, cross-process circuit-breaker
(load/block/clear via internal/provider/common.go), so no throttle work
is needed in this PR.

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:40

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

Updates rivr to conform to Agent CLI Guidelines v0.4.0 (Full) by making the conformance version machine-verifiable at runtime via the schema JSON output, and aligning repository documentation and schema snapshot expectations accordingly.

Changes:

  • Add internal/version.Spec = "0.4.0" to represent the conformance spec version.
  • Extend rivr schema JSON output with a top-level conformance block referencing version.Spec.
  • Update README to pin conformance messaging to v0.4.0 and regenerate the schema golden snapshot.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Pins conformance messaging to v0.4.0 (Full) and documents the machine-verifiable conformance block.
internal/version/version.go Introduces Spec constant (0.4.0) for the conformance version source of truth.
internal/cli/misc.go Emits conformance in the schema JSON output using version.Spec.
internal/cli/testdata/schema.golden.json Updates schema snapshot golden to include the new conformance block.

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

Comment thread README.md Outdated
Comment on lines +138 to +141
rivr conforms to the [Agent CLI Guidelines](https://aclig.dev/) **v0.4.0** at the **Full**
level. The contract version is machine-verifiable from the binary — `rivr schema` emits a
`conformance` block (`{ spec: "agent-cli-guidelines", version: "0.4.0", level: "Full" }`),
so an agent can confirm the standard it was built against without trusting this README.
- README: rewrite the conformance example as a valid JSON fenced block
  (was a JS object literal with bare keys), matching `rivr schema` output.
- update: send a User-Agent on the version-check request (GitHub's REST
  API rejects UA-less requests) and surface non-200 responses as errors;
  aligns with the examplectl Go version-check idiom. Add a test asserting
  the User-Agent is sent.

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 the review:

  • README conformance example — rewrote the inline JS object literal ({ spec: ... }) as a valid JSON fenced block matching what rivr schema actually emits (level/spec/version).
  • version --check — internal/update.fetchLatest now sends a User-Agent header (GitHub's REST API rejects UA-less requests) and surfaces non-200 responses as errors, aligning with the examplectl Go version-check idiom. UpgradeHint already points at /cmd/rivr@latest (verified, no change). Added a test asserting the UA is sent.

go build ./... clean, go test ./... 40 passed (was 39, +1), site build green.

@rnwolfe
rnwolfe merged commit ab9a468 into main Jun 25, 2026
1 check passed
@rnwolfe
rnwolfe deleted the spec-rollout/v0.4.0 branch June 25, 2026 20:14
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