chore: add pull request template - #10
Merged
Merged
Conversation
## Summary Add CI workflow files and branch ruleset snapshots to main so CI triggers on subsequent PRs. ## Changelog ### Added - Add CI, release, finalize-release, guard-docs, and guard-provenance caller workflows - Add Protect main and Protect dev ruleset snapshots ## Type of Change - [x] `ci`: CI/CD configuration changes ## Testing - [x] Workflow files match templates from github-repo-setup and rust-tool-release skills - [x] Only .github/ files — no source code ## Post-Deploy Monitoring & Validation No additional operational monitoring required — workflow configuration only. --- > **Compound Engineered** with Claude Opus 4.6 (1M context) via ce-work Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary - CI push trigger scoped to `main`/`dev` branches only — prevents duplicate runs when feature branch pushes and PR creation fire seconds apart - AGENTS.md updated with principle spec source and external research locations in the Obsidian vault ## Type of Change - [x] `ci`: CI/CD configuration changes - [x] `docs`: Documentation update ## Testing - [x] All tests passing (verified on dev via PR #8) ## Files Modified **Modified:** - `.github/workflows/ci.yml` — added `branches: [main, dev]` to push trigger - `AGENTS.md` — added spec source and external research sections ## Checklist - [x] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) - [x] No new warnings or errors introduced - [x] Changes are backward compatible 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 tasks
brettdavies
added a commit
that referenced
this pull request
Apr 16, 2026
…#13) ## Summary Resolves the seven recommended fixes from the post-merge `/ce-review` of PR #12 (commit `4afef67`). All actionable findings closed; main.rs trimmed back under the 200-line trigger. ## Changelog ### Added - `value_hint = ValueHint::CommandName` on `--command` so zsh, fish, and elvish completions suggest PATH commands instead of file paths. Bash is patched post-generation in `scripts/generate-completions.sh`. - `after_help` text on `Cli` documenting the implicit default subcommand and the bare-invocation contract directly in `anc --help` output. - Mutual exclusion: `--command` and `--source` now error at parse time instead of silently producing an empty result. ### Changed - `anc -q` / `anc --quiet` (top-level flag without subcommand) now prints help and exits 2 instead of panicking via `unreachable!()` (pre-existing bug). - `anc help` and `anc help check` now work — clap's auto-generated `help` subcommand was missing from our known-subcommand set and got misclassified as a path. - `anc --command <NAME>` where NAME collides with a subcommand name (e.g. `anc --command check`) now resolves NAME as a binary on PATH instead of producing a confusing clap error. - `anc --command rg` and `anc --output json --source` (no positional argument) now work — the pre-parser detects subcommand-scoped flags and injects `check` accordingly. - `anc -- .` (POSIX double-dash separator) now runs check against `.` instead of producing undefined behavior. ### Documentation - README and AGENTS.md exit-code tables clarify that exit 2 is overloaded (failures, errors, and usage errors all share it). Suggest parsing stderr (`Usage:` text) to distinguish. ## Type of Change - [x] `fix`: Bug fix (non-breaking change which fixes an issue) ## Related Issues/Stories - Original feature: PR #12 (Plan 003 merge, commit `4afef67`) - Review run artifact: `.context/compound-engineering/ce-review/20260415-173344-efaaf5ff/` - Plan: `docs/plans/2026-04-02-003-feat-cli-default-subcommand-and-command-flag-plan.md` ## Findings Resolved | # | Severity | Title | Resolution | |---|----------|-------|------------| | 1 | P2 | clap `help` subcommand missing from known set | Append `\"help\"` to `known` after `get_subcommands()` | | 2 | P2 | `--command <NAME>` value collides with subcommand | Pair value-taking flags with their values via clap introspection | | 3 | P2 | Flag-value tokens silently fragile | Same fix as #2; also tracks subcommand-scoped flags to inject `check` when no positional follows | | 4 | P2 | `anc -q` panics via `unreachable!()` (pre-existing) | `None` arm now renders help to stderr and exits 2 | | 5 | P2 | `--command` + `--source` silent empty result | `conflicts_with = \"source\"` on `command` arg | | 6 | P2 | Bare `anc` exit 2 conflates user-error vs check-failure | Documented in README/AGENTS exit-code tables | | 7 | P2 | Default-subcommand magic not in `--help` | `after_help` block on `Cli` documents it | | 8 | P2 | `anc -- .` POSIX double-dash undefined | New branch in inject_default_subcommand | | 10 | P2 | main.rs over 200-line refactor trigger | Extract `inject_default_subcommand` + tests to new `src/argv.rs` module (538 → 203 lines) | | 14 | P3 | Bash `--command` completion uses `compgen -f` | `ValueHint::CommandName` fixes zsh/fish/elvish; bash post-patched in gen script | | 22 | P3 | `anc .` succeeds where it previously errored | Documented in PR Changelog above | Findings not addressed (intentional): #11/#12/#17/#18 (subsumed by #10 refactor), #15/#16/#19/#20/#21/#23/#24 (low-priority test/style nits or pre-public-schema concerns). ## Testing - [x] Unit tests added/updated (244 → 253, +9 covering all 5 fixed edge cases) - [x] Integration tests added/updated (26 → 34, +8 covering same) - [x] All tests passing - [x] Pre-push hook clean (fmt + clippy `-Dwarnings` + test + Windows compat) - [x] Manual probes: every previously-broken invocation now does the right thing, bare `anc` still exits 2 (fork-bomb guard intact), explicit subcommands still work **Test Summary:** - Unit tests: 253 passing (was 244) - Integration tests: 34 passing, 3 ignored (was 26 / 3) - Coverage: every fix has both a unit test (where applicable) and an integration test ## Files Modified **Modified:** - `src/cli.rs` — `after_help` text, `value_hint` on `--command`, `conflicts_with = \"source\"` - `src/main.rs` — `None` arm prints help instead of panicking; refactor extracts injection to `argv` module - `tests/integration.rs` — 8 new tests covering the fixed edge cases - `scripts/generate-completions.sh` — post-process bash to substitute `compgen -c` for `--command` (clap_complete bash backend ignores `ValueHint::CommandName`) - `completions/anc.{bash,zsh,fish}` — regenerated to expose new behavior - `README.md`, `AGENTS.md` — exit-code clarification **Created:** - `src/argv.rs` — new module hosting `inject_default_subcommand` and 19 unit tests ## Breaking Changes - [x] No breaking changes Every previous valid invocation continues to produce identical output. Previously-broken invocations (`anc help`, `anc -q`, `anc --command check`, `anc --command rg`, `anc --output json --source`, `anc -- .`) now behave correctly. ## Deployment Notes - [x] No special deployment steps required Ships with Plan 003 in the v0.1.0 `release/*` batch when Plan 002 (release infra) runs. No standalone release branch. ## Checklist - [x] Code follows project conventions and style guidelines - [x] Commit messages follow Conventional Commits - [x] Self-review of code completed - [x] Tests added/updated and passing - [x] No new warnings or errors introduced - [x] Changes are backward compatible
brettdavies
added a commit
that referenced
this pull request
Apr 16, 2026
## Summary - Add `.github/PULL_REQUEST_TEMPLATE.md` so all PRs follow a consistent structure with changelog, testing, and checklist sections. ## Type of Change - [x] `chore`: Maintenance tasks (dependencies, config, etc.) ## Files Modified **Created:** - `.github/PULL_REQUEST_TEMPLATE.md` ## Checklist - [x] Commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) - [x] No new warnings or errors introduced - [x] Changes are backward compatible 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Add a pull request template (
.github/PULL_REQUEST_TEMPLATE.md) with the standard PR structure used across the project: summary, changelog, type of change, files modified, and checklist sections.Type of Change
chore: Maintenance tasks (dependencies, config, etc.)Files Modified
Created:
.github/PULL_REQUEST_TEMPLATE.md: standard PR templateChecklist