Merged
Conversation
## Summary Small post-release doc sync against what actually shipped in v0.1.1. Not tied to the next release — lands on \`dev\` for the next release branch to cherry-pick whenever it cuts. Two files touched: - **\`README.md\`** — refreshed the sample dogfood output. The block at line 82 showed \`30 checks: 20 pass, 8 warn, 0 fail, 2 skip, 0 error\`, which was accurate pre-v0.1.1. After the P1 applicability gate fix landed, current state is \`30 checks: 26 pass, 2 warn, 0 fail, 2 skip, 0 error\`. Just the sample output; check count and structure unchanged. - **\`AGENTS.md\`** — closed a real drift. The \"Adding a New Check\" section listed the \`Check\` trait methods as \`id()\`, \`group()\`, \`layer()\`, \`applicable()\`, \`run()\` — missing \`covers()\` which landed in v0.1.1. New contributors adding a check without \`covers()\` would silently not appear in the coverage matrix. Also added the \`cargo run -- generate coverage-matrix\` regeneration step. Project Structure list gained \`src/principles/registry.rs\` and \`src/principles/matrix.rs\`. Cross-references CLAUDE.md for the full conventions (registry rules, drift detector, artifact lifecycle). ## Changelog ### Documentation - Document the \`covers()\` trait method and the coverage-matrix regeneration step in the \"Adding a New Check\" guide. - Refresh README sample output to match v0.1.1 dogfood behaviour. ## Type of Change - [x] \`docs\`: Documentation update ## Related - v0.1.1 feature PR: [#21](#21) — introduced \`covers()\`, \`src/principles/registry.rs\`, and \`anc generate coverage-matrix\`. - CLAUDE.md already has the full registry + drift-detector conventions (landed in that PR); this PR just makes AGENTS.md point at them so contributors hit it from the right entry doc. ## Testing - [x] Confirmed README sample output matches \`cargo run -- check .\` on main at commit 5400c43. - [x] AGENTS.md additions are factual (no change to behavior). - [x] CLAUDE.md and RELEASES.md reviewed — already current, no edits needed. ## Files Modified - \`AGENTS.md\` — 9 insertions, 1 deletion. - \`README.md\` — 1 insertion, 1 deletion.
## Summary Ships the three behavioral checks and shared `HelpOutput` cache promised for v0.1.2 H4: - `p1-flag-existence` — second behavioral proof of `p1-must-no-interactive` alongside `p1-non-interactive` - `p1-env-hints` — behavioral layer over source-only `p1-env-flags-source` - `p6-no-pager-behavioral` — behavioral layer over source-only `p6-no-pager` All three consume a single `HelpOutput` per target, so the binary's `--help` is spawned once per run regardless of how many checks inspect it. Each check declares `covers()` against an existing registry ID — no new requirement IDs land in this PR, only new verifiers. Three requirements move from single-layer to dual-layer coverage (dual-layer count: 4 → 7). Also carries an unrelated chore: raising `required_approving_review_count` from 0 → 1 on the `main` branch ruleset, committed as the first commit of the branch. ## Changelog ### Added - Add `p1-flag-existence` behavioral check — passes when `--help` advertises a non-interactive gate flag (`--no-interactive`, `--batch`, `--headless`, `-y`, `--yes`, `-p`, `--print`, `--no-input`, `--assume-yes`). Skips when the target already satisfies P1 via help-on-bare-invocation or stdin-primary. - Add `p1-env-hints` behavioral check — passes when `--help` exposes clap-style `[env: FOO]` bindings for flags. Emits medium confidence; the heuristic covers the canonical but not the only env-binding format. - Add `p6-no-pager-behavioral` behavioral check — passes when `--no-pager` is advertised in `--help`. Skips when no pager signal (`less` / `more` / `$PAGER` / `--pager`) appears. Emits medium confidence. - Add `confidence` field to every scorecard result (`high` / `medium` / `low`). Additive; v1.1 consumers feature-detect. - Add `dual_layer` count to the coverage matrix summary so the headline prose surfaces how many covered requirements have verifiers in two layers. ### Changed - Raise required approving review count on `main` branch from 0 to 1. ### Documentation - Regenerate `docs/coverage-matrix.md` + `coverage/matrix.json` to pick up the three new behavioral verifiers. ## Type of Change - [x] \`feat\`: New feature (non-breaking change which adds functionality) ## Testing - [x] Unit tests added/updated - [x] Integration tests added/updated - [x] Manual testing completed - [x] All tests passing **Test Summary:** - Unit + integration tests: 41 passing (up from 35 — 6 tests added for the new checks, plus additional HelpOutput parser coverage). - Pre-push hook (mirrors CI): fmt, clippy -Dwarnings, test, cargo-deny, Windows compat — all green. - Smoke-tested against `rg`, `bat`, `bird`, `xr` via `anc check --command`; all new checks produce sensible verdicts. - Dogfood: `anc check .` on the agentnative repo produces Pass or Skip (no Warn) for all three new checks. ## Files Modified **Created:** - `src/runner/help_probe.rs` — `HelpOutput` cache with lazy `flags()`, `env_hints()`, `subcommands()` parsers. - `src/checks/behavioral/flag_existence.rs` - `src/checks/behavioral/env_hints.rs` - `src/checks/behavioral/no_pager_behavioral.rs` **Modified:** - `src/runner.rs` → `src/runner/mod.rs` (promoted to a module directory so `help_probe` can live alongside `BinaryRunner`). - `src/project.rs` — lazy `help_output()` accessor on `Project` (OnceLock, same pattern as `parsed_files`). - `src/types.rs` — `Confidence` enum + `CheckResult::confidence` field. - `src/scorecard.rs` — serialize `confidence` on every result view. - `src/principles/matrix.rs` — `dual_layer` stat + surfaced in summary prose. - `src/checks/behavioral/mod.rs` — register the three new checks. - `docs/coverage-matrix.md` + `coverage/matrix.json` — regenerated. - `.github/rulesets/protect-main.json` — raise required approving review count on `main`. - 34 existing check files gain `confidence: Confidence::High,` in their `CheckResult` construction — mechanical, no semantic change. ## Key Features - One `--help` probe per target regardless of how many checks consume it. Runner caching means `p1-flag-existence` and `p6-no-pager-behavioral` share state without explicit plumbing. - Dual-layer coverage growth: three requirements now have both behavioral and source/project verifiers, halving the single-layer bucket for P1 and P6 MUSTs. ## Breaking Changes - [x] No breaking changes ## Deployment Notes - Post-merge, regenerate the 10 committed scorecards on `agentnative-site` (H3's proven workflow) once v0.1.2 is released to crates.io + Homebrew. Matrix sync (`scripts/sync-coverage-matrix.sh`) picks up the new `dual_layer` field automatically. ## Checklist - [x] Code follows project conventions and style guidelines - [x] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) - [x] Self-review of code completed - [x] Tests added/updated and passing - [x] No new warnings or errors introduced - [x] Changes are backward compatible
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
Release branch for v0.1.2. Cherry-picked from
dev:p1-flag-existence,p1-env-hints,p6-no-pager-behavioral) + sharedHelpOutputcache +Confidencefield onCheckResult+dual_layerstat in coverage matrix +mainruleset review count 0 → 1.Plus the standard release-branch mechanics:
Cargo.tomlbump to0.1.2,Cargo.lockrefresh, regeneratedCHANGELOG.md(git-cliff from squash-commit## Changelogbodies). Completions had no drift this cycle — CLI surface unchanged.Type of Change
feat: new user-visible capabilities (three behavioral checks +confidencefield + dual-layer coverage stat)Testing
-Dwarnings/ test / cargo-deny / Windows compatrg/bat/bird/xr/ancitselfFiles Modified
See the two cherry-pick bodies (commits
72ca148and2fcb08d) plusCHANGELOG.md+Cargo.toml+Cargo.lockfor the release mechanics.Deployment Notes
Post-merge:
git tag -a -m "Release v0.1.2" v0.1.2 && git push origin main --tags.release.yml→cargo publish(Trusted Publishing) → GitHub Release (draftless,make_latest: falseduring bottle window) → Homebrew dispatch →finalize-releaseflipsmake_latest: true.agentnative-site: install v0.1.2, regenerate the 10 committed scorecards (H3's proven workflow), runscripts/sync-coverage-matrix.shto pulldual_layer: 7intosrc/data/coverage-matrix.json.Breaking Changes
1.1;confidenceon results anddual_layeron matrix summary are additive.Checklist
docs/plans/,docs/solutions/,docs/brainstorms/,docs/reviews/)Cargo.tomlversion matches the tag this branch will produce