feat(p3,coverage): wire 9 orphan requirements + add p3 version requirements - #55
Merged
Merged
Conversation
…ements Closes the spec/check coverage gap surfaced by the bidirectional audit: the registry had 27 requirements with no verifier and 5 cli checks had no `covers()` declaration. This branch wires what is verifiable via the behavioral layer and adds the two `p3-version` requirements the existing `VersionCheck` was already enforcing in spirit. Spec-side additions (vendored from `agentnative-spec@feat/p3-must-version`): - `p3-must-version` (universal MUST): top-level `--version` prints a non-empty version line and exits 0. - `p3-should-version-short` (universal SHOULD): a short alias for `--version` (`-V`, `-v`, or `-version`) works alongside the long form. Check-side changes: - `VersionCheck` extended to probe both `--version` and the short-alias family (`-V`, `-v`, `-version`). Pass when both work, Warn when only the long form works (MUST satisfied, SHOULD missed), Fail when neither works. Now covers `p3-must-version` and `p3-should-version-short`. - `AgentsMdCheck` now declares `covers() = &["p8-should-bundle-exists"]`. Already verified a subset of what P8 demands; this just makes the link visible to the matrix. - Seven new behavioral checks cover existing orphan requirements via `--help` probes: - `p2-raw-flag` -> `p2-may-raw-flag` - `p2-more-formats` -> `p2-may-more-formats` (gated on `--output` presence) - `p3-examples-subcommand` -> `p3-may-examples-subcommand` - `p6-color-flag` -> `p6-may-color-flag` - `p7-verbose` -> `p7-should-verbose` - `p7-limit` -> `p7-should-limit` (gated on list-style subcommand presence) - `p7-cursor-pagination` -> `p7-may-cursor-pagination` (same gate) - New shared helper `behavioral::list_style::has_list_style_subcommand` factors the list-verb detection (`list`, `ls`, `search`, `query`, `find`, `show`, `get`) used by the two list-only SHOULD/MAYs. Direct tests cover the verb list so changes to the gate are caught at the helper. Registry + matrix: - `REQUIREMENTS.len()` 57 -> 59 (two new P3 requirements). MUST count 27 -> 28, SHOULD count 20 -> 21, MAY count unchanged at 10. - Coverage matrix regenerated: 39 distinct covered IDs (up from 32), 20 orphans (down from 27). Audit results post-merge: - Bidirectional audit: 0 dangling covers references, 20 spec orphans (down from 27), 39 covered IDs (up from 32). - `cargo test`: 621 passed, 2 ignored (added 21 new tests for the new checks + shared helper + extended VersionCheck). - `cargo clippy --release --all-targets -- -Dwarnings`: clean. - `cargo fmt --check`: clean. - Self-check: `anc check .` runs 51 checks (up from 44), 37 pass, 7 warn, 0 fail, 7 skip, 0 error. Score 84% (down from 93% pre-branch — the new checks surface real MAY/SHOULD gaps in anc itself: no `--raw`, no `--examples`, no `--color`, no `--verbose`). Remaining 20 orphans queued for follow-up branch(es): - Need error-battery probes (P2 exit-codes/json-errors, P4 actionable/json error output). - Need source-layer work (P4 gating-before-network, P5 idempotency, P6 tier-gating). - Need destructive-op detection (P5 force-yes, read-write-distinction). - Need subcommand-help recursion (P3 subcommand-examples, paired-examples, about-long-about; P6 subcommand-operations). - Need stdin probe (P6 stdin-input). - Need spec disambiguation (P7 should-timeout overlaps with covered `p6-must-timeout-network`). - Need conditional-applicability gating (P1 defaults-in-help, rich-tui; P2 consistent-envelope; P6 consistent-naming; P7 auto-verbosity).
brettdavies
added a commit
to brettdavies/agentnative
that referenced
this pull request
May 21, 2026
…#33) ## Summary Adds two P3 requirements that the existing `agentnative-cli::VersionCheck` was already enforcing in spirit. The cli's coverage matrix listed `p3-version` as a check with no spec requirement to point its `covers()` at, even though the principle's prose section already named `p3-version` as a measurement vector. This PR aligns the frontmatter with the prose and the cli implementation. ## Changelog ### Added - `p3-must-version` (universal MUST): top-level `--version` prints a non-empty version line and exits 0. - `p3-should-version-short` (universal SHOULD): a short alias (`-V` per clap default; `-v` per Node/npm/Bun/Yarn/Make convention; `-version` per Go's `flag` package) accompanies `--version`. Any of the three forms is sufficient. ## Linked check review brettdavies/agentnative-cli#55 The cli companion PR extends `VersionCheck` to probe both `--version` and the short-alias family (`-V`, `-v`, `-version`) with a Pass/Warn/Fail rubric: Pass when both work, Warn when only `--version` works (MUST satisfied, SHOULD missed), Fail when neither works. `covers()` returns the two new IDs. Coverage matrix on that branch is regenerated and the registry test counters move from 57 -> 59 (with MUST 27 -> 28 and SHOULD 20 -> 21). ## Human reviewer **Reviewer:** @brettdavies ## AI disclosure AI-assisted edit. The audit that surfaced the gap, the requirement text, and the rationale in this body were drafted during a pairing session with Claude (Anthropic). The repo maintainer reviewed and approved before submission. Spec validation (`scripts/validate-principles.mjs`) and prose tooling (Vale, LanguageTool, unslop) ran on the change.
7 tasks
brettdavies
added a commit
that referenced
this pull request
May 21, 2026
…#56) ## Summary Continues the spec/check coverage-closing work from #55. Six new behavioral checks wire previously-orphaned spec requirements via `--help` probes and a `-h` vs `--help` differential probe. Covers 6 of the 14 orphans remaining after #55. The rest need error-battery setup, source-layer work, or destructive-op detection (queued for follow-up branches). No spec changes this round; all requirements already exist in the registry. ## Changelog ### Added - Add `p1-defaults-in-help` behavioral check. Scans `--help` for `[default: …]` / `(default: …)` / `default:` annotations. SHOULD-tier, universal. - Add `p1-rich-tui` behavioral check. Detects rich-TUI surface area via `--tui` / `--interactive` / `--ui` flags or spinner/progress/tui/ncurses/indicatif mentions in help text. MAY-tier, universal. - Add `p3-about-long-about` behavioral check. Probes both `-h` and `--help` directly and Warns when the two outputs are byte-identical (no `long_about` defined). SHOULD-tier, universal. - Add `p6-stdin-input` behavioral check. Gated on input-accepting subcommand verbs (process/parse/convert/transform/analyze/validate/format/lint/check); Warns when help text does not mention stdin or `-` as a path placeholder. SHOULD-tier, conditional. - Add `p6-consistent-naming` behavioral check. Classifies subcommands against a common-verb list; Warns when verb-first and noun-first patterns mix. SHOULD-tier, conditional on 2+ user-defined subcommands. - Add `p7-timeout-behavioral` behavioral check. Gated on long-running subcommand verbs (serve/daemon/watch/tail/monitor/follow/run/start/stream); Warns when no `--timeout` / `--deadline` / `--max-time` flag advertised. SHOULD-tier, conditional. Distinct from the source-layer `p6-must-timeout-network` which gates on network-library usage. ### Changed - Coverage matrix regenerated: `docs/coverage-matrix.md` and `coverage/matrix.json` reflect 6 new verifier links across P1, P3, P6, and P7 requirement rows. ## Type of Change - [x] `feat`: New feature (non-breaking change which adds functionality) ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: No spec changes — all 6 requirements already existed in the registry. This PR adds the verifier checks. - Related PRs: #55 (prior coverage-closing batch). ## Testing - [x] Unit tests added/updated - [x] Integration tests added/updated - [x] Manual testing completed - [x] All tests passing **Test Summary:** - 22 new test cases across the 6 new checks: Pass / Warn / Skip paths for each, plus applicability-gate verification for the conditional checks (`p6-stdin-input`, `p6-consistent-naming`, `p7-timeout-behavioral`). - `cargo test`: 642 passed, 2 ignored across 7 suites. - `cargo clippy --release --all-targets -- -Dwarnings`: clean. - `cargo fmt --check`: clean. - `./target/release/anc check .`: 57 checks (up from 51), 37 pass, 12 warn, 0 fail, 8 skip, 0 error. Score drops from 84% to ~75% because the 6 new checks legitimately surface gaps in `anc` itself (no default-value annotations on top-level help; no TUI surface; identical `-h`/`--help` output; no stdin docs on the `check` subcommand at the top level; mixed verb/noun subcommand naming; vacuous skip on the timeout gate). - Bidirectional audit: 0 dangling covers references; 14 spec orphans (down from 20); 45 covered IDs (up from 39). ## Files Modified **Modified:** - `coverage/matrix.json`, `docs/coverage-matrix.md` (regenerated artifacts). - `src/checks/behavioral/mod.rs` (registers 6 new check modules). **Created:** - `src/checks/behavioral/about_long_about.rs` - `src/checks/behavioral/consistent_naming.rs` - `src/checks/behavioral/defaults_in_help.rs` - `src/checks/behavioral/rich_tui.rs` - `src/checks/behavioral/stdin_input.rs` - `src/checks/behavioral/timeout_behavioral.rs` **Renamed:** - None. **Deleted:** - None. ## Breaking Changes - [x] No breaking changes ## Deployment Notes - [x] No special deployment steps required. ## Additional Context Remaining 14 orphans queued for subsequent branches, grouped by required follow-up shape: - Error-battery probes (5): `p2-must-exit-codes`, `p2-must-json-errors`, `p2-should-consistent-envelope`, `p4-must-actionable-errors`, `p4-should-json-error-output`. All need a known-bad invocation harness and assertion on JSON envelope shape / exit codes. - Subcommand-help recursion (3): `p3-must-subcommand-examples`, `p3-should-paired-examples`, `p6-should-subcommand-operations`. Each subcommand needs its own `--help` probe. - Destructive-op detection (2): `p5-must-force-yes`, `p5-must-read-write-distinction`. Both need a heuristic to classify whether a CLI has destructive operations. - Source-layer work (out of scope for behavioral-only batches): `p4-should-gating-before-network`, `p5-should-idempotency`, `p6-should-tier-gating`. - Auto-verbosity (1): `p7-may-auto-verbosity`. Needs TTY-vs-pipe behavior comparison rather than a flag probe.
5 tasks
brettdavies
added a commit
that referenced
this pull request
May 21, 2026
…e) (#57) ## Summary Wires 11 behavioral checks against the 11 remaining behavioral-doable orphan requirements. After this batch lands, the only orphans left will be the 3 source-layer ones declared out of scope by current policy (`p4-should-gating-before-network`, `p5-should-idempotency`, `p6-should-tier-gating`). The work is grouped by probe shape so checks within a group share helpers and runner cache: - **Group A: error-battery (5 checks):** a single bad-flag probe (`--this-flag-does-not-exist-anc`) feeds five P2/P4 checks that observe exit codes, error messages, and JSON envelopes. - **Group B: subcommand-help recursion (3 checks):** a shared helper walks each top-level subcommand's `--help` (capped at one level, skipping built-in `help`/`completions`) and feeds three P3/P6 example/operation checks. - **Group C: destructive-op detection (2 checks):** a shared verb list classifies subcommand names as destructive/read/write and feeds two P5 safety checks. - **Group D: TTY-vs-pipe (1 check):** scans `--help` for TTY-aware language since pty allocation is out of scope. Audit confirms orphan count drops from 14 to 3, MUST orphans drop to zero, behavioral coverage is complete. ## Changelog ### Added - 11 behavioral checks closing the remaining behavioral orphan coverage: structured exit codes, JSON error envelopes, consistent envelope shape, actionable error messages, JSON error output, subcommand examples, paired text+JSON examples, subcommand-shaped operations, force/yes on destructive subcommands, read/write surface distinction, and TTY-aware verbosity. ## Type of Change - [x] `feat`: New feature (non-breaking change which adds functionality) ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: n/a - Related PRs: #55, #56 (prior orphan-coverage batches) ## Testing - [x] Unit tests added/updated - [x] Integration tests added/updated - [x] Manual testing completed - [x] All tests passing **Test Summary:** - Unit tests: 624 passing (was 575; +49 new) - Integration tests: 12 dogfood + convention tests passing - Pre-push gate (mirrors CI): fmt clean, clippy `-Dwarnings` clean, cargo-deny clean, Windows compat clean Coverage matrix regenerated and drift-check clean (`anc generate coverage-matrix --check` exits 0). ## Files Modified **Modified:** - `src/checks/behavioral/mod.rs`: register 11 new check structs plus 3 shared helper modules. - `tests/dogfood.rs`: add `p2-json-errors` to the temporary allowlist with a justification (anc itself uses clap's `parse()` rather than `try_parse()`, so it emits plain-text errors regardless of `--output json`; honoring JSON mode for parse errors is separate work). - `coverage/matrix.json`: regenerated from the registry + `covers()` declarations. - `docs/coverage-matrix.md`: regenerated table now showing the 11 newly-covered IDs. **Created:** - `src/checks/behavioral/error_probe.rs`: shared bad-flag probe + JSON applicability gate (Group A). - `src/checks/behavioral/structured_exit_codes.rs`: `p2-must-exit-codes`. - `src/checks/behavioral/json_errors.rs`: `p2-must-json-errors` (strict 3-key envelope). - `src/checks/behavioral/consistent_envelope.rs`: `p2-should-consistent-envelope`. - `src/checks/behavioral/actionable_errors.rs`: `p4-must-actionable-errors`. - `src/checks/behavioral/json_error_output.rs`: `p4-should-json-error-output`. - `src/checks/behavioral/subcommand_help.rs`: shared subcommand `--help` recursion (Group B). - `src/checks/behavioral/subcommand_examples.rs`: `p3-must-subcommand-examples`. - `src/checks/behavioral/paired_examples.rs`: `p3-should-paired-examples`. - `src/checks/behavioral/subcommand_operations.rs`: `p6-should-subcommand-operations`. - `src/checks/behavioral/destructive_ops.rs`: shared destructive/read/write verb classification (Group C). - `src/checks/behavioral/force_yes.rs`: `p5-must-force-yes`. - `src/checks/behavioral/read_write_distinction.rs`: `p5-must-read-write-distinction`. - `src/checks/behavioral/auto_verbosity.rs`: `p7-may-auto-verbosity`. **Renamed:** - None. **Deleted:** - None. ## Key Features The dogfood pass against `anc` itself surfaces real, defensible gaps that future PRs should close: - `p2-json-errors` → Fail (allowlisted as pending; clap `parse()` vs `try_parse()`). - `p3-subcommand-examples` → Fail (subcommands lack example blocks; clap `after_help` would satisfy). - `p3-paired-examples`, `p4-json-error-output`, `p7-auto-verbosity` → Warn (room for improvement). These verdicts are the dogfooding loop working as designed: checks find real issues in the linter itself.
4 tasks
brettdavies
added a commit
that referenced
this pull request
May 31, 2026
## Summary Vendors agentnative-spec v0.5.0 (upstream commit `d5d4086`) into `src/principles/spec/`. The diff is six files: `VERSION` bump 0.4.0 → 0.5.0, the upstream `CHANGELOG.md`, and prose-only edits on p3/p4/p5/p7 retargeting deferred-work footnotes from "v0.4.0 PR" to "future PR" now that those PRs have landed. No new requirements arrive via this sync. Every substantive item the upstream v0.5.0 release notes advertise already shipped here ahead of the spec release (PRs #55, #62, #65, and the scoring work): - `p3-must-version` and `p3-should-version-short` - The 7-status taxonomy with antecedent propagation (scorecard schema 0.6) - The `check` → `audit` rename - Badge floor lowered 80 → 70, with four cohort bands This vendoring closes the loop so the in-tree registry and the upstream tag point at the same content. The only consumer-visible behavior change is the scorecard's `spec_version` field, which starts emitting `"0.5.0"` instead of `"0.4.0"`. ## Changelog ### Changed - Scorecard `spec_version` now reports `"0.5.0"` (vendored agentnative-spec bumped 0.4.0 → 0.5.0). ## Type of Change - [x] `feat`: New feature (non-breaking change which adds functionality) ## Related Issues/Stories - Upstream tag: https://github.com/brettdavies/agentnative/releases/tag/v0.5.0 - Vendored commit: `d5d4086` - Pre-shipped here: #55, #62, #65 ## Testing - [x] All tests passing **Test Summary:** - `cargo build`: clean - `cargo test`: 793 passed, 2 ignored - `anc emit coverage-matrix --check`: exit 0 (no registry drift) - Pre-push hook (fmt, clippy `-Dwarnings`, test, cargo-deny, Windows check): passed ## Files Modified **Modified:** - `src/principles/spec/VERSION` - `src/principles/spec/CHANGELOG.md` - `src/principles/spec/principles/p3-progressive-help-discovery.md` - `src/principles/spec/principles/p4-fail-fast-actionable-errors.md` - `src/principles/spec/principles/p5-safe-retries-mutation-boundaries.md` - `src/principles/spec/principles/p7-bounded-high-signal-responses.md` ## Breaking Changes - [x] No breaking changes ## Deployment Notes - [x] No special deployment steps required
brettdavies
added a commit
that referenced
this pull request
Jun 1, 2026
## Summary `v0.5.0` of `anc`. Vendored `agentnative-spec` advances `0.4.0` → `0.5.0`. Scorecard JSON schema advances `0.5` → `0.7` in two steps (7-status taxonomy at `0.6`; `check_id` → `audit_id` rename at `0.7`). Coverage matrix JSON `schema_version` rebases from `"1.0"` to `"0.1"` so it matches the project's pre-release `0.x` convention. Two new universal P3 requirements (`p3-must-version`, `p3-should-version-short`) plus 22 additional behavioral checks across P1-P8 close the remaining behavioral orphan coverage. CLI subcommand surface renames `check` → `audit` and `generate` → `emit` (breaking). Badge eligibility floor lowers from 80% to 70%, and the leaderboard score becomes credit-weighted on shipped-binary behavior only. The Vale prose-check stack (`styles/`, `.vale.ini`, `scripts/prose-check.sh`) moves to dev-only contributor tooling; the workflow guard keeps it out of `main` going forward. ## Changelog ### Added - 22 new behavioral checks across P1-P8 close the remaining behavioral orphan coverage (verbose, color, raw, examples, defaults-in-help, rich-tui, about/long-about, stdin-input, consistent-naming, timeout-behavioral, structured exit codes, JSON error envelopes, actionable errors, force/yes, read/write distinction, TTY-aware verbosity, and more). - Two universal P3 requirements (`p3-must-version`, `p3-should-version-short`) verify that every CLI ships a `--version` flag plus a short alias from the `-V` / `-v` / `-version` family. - New `opt_out` and `n_a` scorecard statuses surface explicit non-adoption and unmet-antecedent rows; each `results[]` entry now carries `tier` plus `audit_id`. Pre-`0.6` consumers feature-detect. - Top-level `--verbose` / `-v` (env `AGENTNATIVE_VERBOSE`), `--examples`, `--color`, and `--raw` flags surface diagnostic detail, curated invocation blocks, ANSI styling control, and pipe-friendly `id<TAB>status` rows. - `anc skill install --all` and `anc skill update [host|--all]` iterate every known host in one invocation. ### Changed - **BREAKING**: `anc check` renamed to `anc audit`; `anc generate` renamed to `anc emit`; `anc schema` folded under `anc emit schema`. The implicit-default-subcommand injection now writes `audit`. Update scripts and CI invocations. - **BREAKING**: scorecard `schema_version` advances `"0.5"` → `"0.7"` (two-step), the `check_id` field renames to `audit_id`, and `results[]` switches to one entry per requirement-row rather than per probe. Consumers pinning the prior shape must feature-detect or update. - Leaderboard `score_pct` is now credit-weighted on shipped-binary behavior only: `warn` earns half credit, `opt_out` counts against, source/project audits no longer affect the score. Badge eligibility floor lowers from 80% to 70%. - Vendored `agentnative-spec` advances `0.4.0` → `0.5.0`; scorecard `spec_version` reports `"0.5.0"`. - `coverage/matrix.json` `schema_version` bumps `"1.0"` → `"0.1"` so the matrix follows the project's pre-release `0.x` convention used by the CLI crate, scorecard schema, and vendored spec. The lone consumer (`agentnative-site/src/build/coverage.mjs`) validates the field's existence but does not pin a specific value, so this is safe. - Vale prose-check stack (`styles/`, `.vale.ini`, `scripts/prose-check.sh`) repositions as dev-only contributor tooling. `guard-main-docs.yml` blocks those paths from `main` going forward. ### Fixed - Error output under `--output json` / `--json` now emits a JSON envelope with `error`, `kind`, `message` instead of clap's plain-text rendering, so agents pinned to JSON can parse failures with one shape. - Text mode now renders `[N/A]` (with antecedent evidence) for conditional requirements whose prerequisite was opted out, instead of a misleading `[FAIL]` on the probe id. Text row count and badge score match `--output json`. - The spec parser rejects three malformed conditional-applicability inputs that previously fell through silently (whitespace-only `antecedent.audit_id`, mixed legacy `if:` + new `kind:`, unknown keys inside `antecedent`). ### Documentation - `RELEASES-PREFLIGHT.md` lands as the operational pre-flight checklist gating each release cut. `RELEASES.md` gains a `### Cherry-pick conflicts on guarded paths` subsection and a `### Dev-direct exception` subsection covering engineering-docs paths and the prose-check stack. - Repo-wide prose pass: every tracked markdown doc plus the historical sections of `CHANGELOG.md` carry the same per-occurrence punctuation tightening applied to all 64 PR bodies in the v0.4.0 → v0.5.0 window. ## Type of Change - [x] `BREAKING CHANGE`: Breaking API change (requires major version bump) ## Related Issues/Stories - Story: n/a - Issue: n/a - Architecture: `agentnative-spec` `v0.5.0` (vendored at upstream commit `d5d4086`). Consumer-facing JSON shape moves to schema `0.7` with the `audit_id` rename. - Related PRs: cherry-picks of #55, #56, #57, #58, #59, #60, #61, #62, #63, #64, #65, #66, #68, #69 from `dev`. ## Testing - [x] All tests passing **Test Summary:** - `cargo test`: 793 passed, 2 ignored. - `anc emit coverage-matrix --check`: exit 0. - `cargo deny check advisories`: ok. - Release-mechanics preflight per `RELEASES-PREFLIGHT.md`: green except the cross-repo `agentnative-site` schema gap (tracked separately). ## Files Modified **Modified:** - Source: `src/audits/`, `src/scorecard/`, `src/principles/`, `src/main.rs`, `src/cli.rs`, `src/audit.rs`, `src/types.rs`, `src/runner/`, `src/source.rs`, `src/skill_install.rs`, and supporting modules. - Schema: `schema/scorecard.schema.json` regenerated to the `0.7` contract. - Vendored spec: `src/principles/spec/*` advances to `v0.5.0`. - Coverage artifacts: `docs/coverage-matrix.md`, `coverage/matrix.json` reflect 59 requirement rows. - Workflows: `.github/workflows/guard-main-docs.yml` (extra_paths). - Tracked docs: `README.md`, `AGENTS.md`, `CLAUDE.md`, `PRODUCT.md`, `BRAND.md`, `RELEASES.md`, `RELEASES-RATIONALE.md`, `scripts/SYNCS.md`, `.github/pull_request_template.md`, `CHANGELOG.md`. - Scripts: `scripts/generate-changelog.sh` (duplicate-section guard), `scripts/sync-spec.sh` (`--ref` flag and `gh api` transport), `scripts/hooks/pre-push` (shellcheck step). - Build identity: `Cargo.toml`, `Cargo.lock` (`0.5.0`). **Created:** - `RELEASES-PREFLIGHT.md` (operational pre-flight checklist). **Renamed:** - `anc check` → `anc audit` (subcommand surface). - `anc generate` → `anc emit` (subcommand surface). - Scorecard `check_id` → `audit_id` (JSON field). **Deleted:** - `.vale.ini`, `styles/`, `scripts/prose-check.sh`, plus the orphaned helpers `scripts/sync-prose-tooling.sh`, `scripts/test-prose-check.mjs`, `scripts/generate-pack-readme.mjs`. Replaced by the `guard-main-docs.yml` `extra_paths` guard that keeps the stack off `main` going forward. ## Breaking Changes - [x] Breaking changes described below: 1. **Scorecard JSON shape**: `schema_version` `"0.5"` → `"0.7"`. `check_id` renamed to `audit_id` (per-row and in `coverage/matrix.json`). `results[]` switches to one entry per requirement-row instead of per probe; each entry carries new `tier` and `audit_id` fields. Status enum expands from 3 to 7 values (`pass`, `warn`, `fail`, `opt_out`, `n_a`, `skip`, `error`). Consumers pinned to `0.5` or the prior `check_id` field must update. 2. **Subcommand surface**: `anc check` renamed to `anc audit`; `anc generate` renamed to `anc emit`; `anc schema` folded under `anc emit schema`. Scripts and CI invocations pinned to the old names must update. ## Deployment Notes - `agentnative-site` must add `'0.7'` to its `SUPPORTED_SCHEMA_VERSIONS` allowlist before this release is tagged. Without that, the site's regen pipeline rejects every `v0.5.0` scorecard upload. - After tag publish: run `./scripts/sync-dev-after-release.sh v0.5.0 && git push origin dev` per `RELEASES.md` § After publish to backport `Cargo.toml`, `Cargo.lock`, and `CHANGELOG.md` to `dev`.
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.
Summary
Closes the bidirectional spec/check coverage gap surfaced by an audit: the registry had 27 requirements with no verifier
and 5 cli checks had no
covers()declaration. This branch wires what is verifiable via the behavioral layer and addsthe two
p3-versionrequirements the existingVersionCheckwas already enforcing in spirit. Net result: 39 coveredspec IDs (up from 32), 20 spec orphans (down from 27), 51 dogfood checks (up from 44).
Depends on the spec PR adding
p3-must-versionandp3-should-version-shorttoagentnative-spec. The vendored copyin this branch already carries the new requirements so the cli builds standalone; re-running
scripts/sync-spec.shafter the spec PR tags will be a no-op.
Changelog
Added
p2-raw-flag,p2-more-formats,p3-examples-subcommand,p6-color-flag,p7-verbose,p7-limit, andp7-cursor-paginationbehavioral checks. The two list-style checks (p7-limit,p7-cursor-pagination) vacuously skip when the target CLI has no list-style subcommand; the other five always run and produce Pass / Warn on flag presence in top-level--help.VersionChecknow probes the short-alias family (-V,-v,-version) alongside--version. Pass when both work, Warn when only--versionworks (MUST satisfied, SHOULD missed), Fail when neither works.AgentsMdChecknow declares it coversp8-should-bundle-exists. The check already verified a subset of what P8 demands; this exposes the link to the coverage matrix.Changed
src/principles/spec/principles/p3-progressive-help-discovery.mdcarries the two newp3-must-versionandp3-should-version-shortrequirements (universal applicability).REQUIREMENTS.len()57 -> 59; MUST count 27 -> 28; SHOULD count 20 -> 21; MAY count unchanged at 10.docs/coverage-matrix.mdandcoverage/matrix.jsonreflect 59 requirement rows and the new verifier links.Documentation
tests/build_parser.rsandsrc/principles/registry.rstest counters to match the new 59-requirement registry.Type of Change
feat: New feature (non-breaking change which adds functionality)Related Issues/Stories
brettdavies/agentnativebranchfeat/p3-must-version. Both PRs should land together, or the spec PR can land first and the cli PR will re-vendor at sync time without further changes.Testing
Test Summary:
behavioral::list_style::has_list_style_subcommandhelper (5 cases covering verb-list drift). New tests for the extendedVersionCheck(Warn when only--versionworks, Pass when a short alias also works). 21 new test cases total.cargo test: 621 passed, 2 ignored across 7 suites.cargo clippy --release --all-targets -- -Dwarnings: clean.cargo fmt --check: clean../target/release/anc check .: 51 checks, 37 pass, 7 warn, 0 fail, 7 skip, 0 error. Score 84% (down from 93% pre-branch because four new MAY/SHOULD checks legitimately surface gaps inancitself: no--raw, no--examples, no--color, no--verbose).Files Modified
Modified:
coverage/matrix.json,docs/coverage-matrix.md(regenerated artifacts).src/checks/behavioral/mod.rs(registers 7 new checks + 1 shared helper module).src/checks/behavioral/version.rs(extended check + 2 new test cases).src/checks/project/agents_md.rs(addedcovers()declaration).src/principles/registry.rs(test counters 57 -> 59, MUST 27 -> 28, SHOULD 20 -> 21).src/principles/spec/principles/p3-progressive-help-discovery.md(vendored from spec branch).tests/build_parser.rs(test counter 57 -> 59).Created:
src/checks/behavioral/color_flag.rssrc/checks/behavioral/cursor_pagination.rssrc/checks/behavioral/examples_subcommand.rssrc/checks/behavioral/limit_flag.rssrc/checks/behavioral/list_style.rs(shared helper)src/checks/behavioral/more_formats.rssrc/checks/behavioral/raw_flag.rssrc/checks/behavioral/verbose_flag.rsRenamed:
Deleted:
Breaking Changes
Deployment Notes
scripts/sync-spec.shwill be a no-op on this content.Additional Context
Remaining 20 spec orphans queued for follow-up branch(es), grouped by required follow-up shape:
p2-must-exit-codes,p2-must-json-errors,p4-must-actionable-errors,p4-should-json-error-output.p4-should-gating-before-network,p5-should-idempotency,p6-should-tier-gating.p5-must-force-yes,p5-must-read-write-distinction.p3-must-subcommand-examples,p3-should-paired-examples,p3-should-about-long-about,p6-should-subcommand-operations.p6-should-stdin-input.p7-should-timeoutoverlaps semantically with the verifiedp6-must-timeout-network).p1-should-defaults-in-help,p1-may-rich-tui,p2-should-consistent-envelope,p6-should-consistent-naming,p7-may-auto-verbosity.