Conversation
Augments the auto-generated Claude Code + Claude Code Review workflows
with context from 15+ PR review cycles in this repo so the Action
produces findings consistent with recent codex iterations instead of
generic Rust advice.
## claude-code-review.yml
- Scope `on.pull_request.paths` to `crates/**`, `docs/**`, `wiki/**`,
workflows, Cargo.toml, CLAUDE.md, and harness/. Skips cheap Cargo.lock
churn.
- `fetch-depth: 0` so Claude can inspect `git log` / `git blame` during
review (useful for "this finding predates the PR" arguments).
- `dtolnay/rust-toolchain@stable` + `Swatinem/rust-cache@v2` so every
`cargo check` / `cargo test -p <crate>` in-session runs fast.
- Custom prompt injects:
- crate names (agentkeys-types, agentkeys-core, etc)
- pointer to CLAUDE.md for architecture + mock-server design principles
- pointer to the new .github/REVIEW_GUIDELINES.md for agentkeys-specific
review patterns
- `--test-threads=1` requirement (tests mutate shared HOME/keyring)
- the 8-pattern checklist (audit-log DENIED rows, URL-encoding via
reqwest .query(), session-token redaction, case-insensitive wallet
comparison, 30-day TTL, synchronous keychain ops, path-traversal
guards, cross-wallet credential safety)
- `claude_args --allowed-tools` whitelist for cargo/git/gh so the
Action can actually run the cargo commands the prompt tells it to.
## claude.yml (@claude mentions)
- Same Rust toolchain + cache setup so `@claude run tests` /
`@claude check clippy` requests don't pay cold-compile cost.
- `fetch-depth: 0` for git-history tools.
- Same `claude_args --allowed-tools` whitelist plus `gh pr comment:*` /
`gh pr edit:*` so @claude can update PR bodies and comment back with
findings.
## .github/REVIEW_GUIDELINES.md (new)
Single source of truth for agentkeys review patterns, extracted from
PRs #18-#38 (fix/issue-10 through fix/issue-37). Documents:
- Test constraints (`--test-threads=1`, per-crate targeting)
- 10 canonical bug patterns that codex has flagged repeatedly
- Architectural invariants (master→agent single-hop; no users yet)
- Scope-control guidance (no speculative refactors, no backwards-compat
shims pre-launch)
- Policy for codex-vs-claude disagreements
Each pattern has a PR/issue reference so reviewers (and future Claude
runs) can trace why the rule exists.
Updated (537ab46)Added agentkeys-specific context so the Action's review output is useful on day one instead of generic Rust advice. Both workflows now:
New Also documented: master→agent single-hop invariant (closes the recurring "transitive ownership" critique) and the pre-launch "no users yet" stance that dismisses legacy-migration findings. |
🤖 Installing Claude Code GitHub App — with agentkeys review context
This PR adds two GitHub Actions workflows that enable Claude Code integration, plus a
.github/REVIEW_GUIDELINES.mdthat captures review patterns extracted from 15+ recent PR cycles so the Action produces findings consistent with what codex has been flagging, not generic Rust advice.What's in the workflows
.github/workflows/claude-code-review.yml— runs on every PR open/sync:crates/**,docs/**,wiki/**, workflows, Cargo.toml, CLAUDE.md, harness/ (skips Cargo.lock-only churn)fetch-depth: 0so Claude can usegit log/git blameduring reviewdtolnay/rust-toolchain@stable+Swatinem/rust-cache@v2for fast in-sessioncargo check/cargo test -p <crate>CLAUDE.md+REVIEW_GUIDELINES.mdpointers,--test-threads=1requirement, 8-pattern review checklist--allowed-toolswhitelist forcargo,git,ghcommands.github/workflows/claude.yml—@claudemention handler:--allowed-toolswhitelist includinggh pr comment:*/gh pr edit:*so@claudecan update PR bodies and post findings back.github/REVIEW_GUIDELINES.mdSingle source of truth for agentkeys review patterns. Documents:
--test-threads=1mandatory; per-crate targeting.query(), never raw interpolationEach pattern references the PR / issue where it was first established so reviewers can trace why the rule exists.
Security
CLAUDE_CODE_OAUTH_TOKEN)claude_args --allowed-toolswhitelist restricts Bash to cargo/git/gh subcommands needed for review; no arbitrary shell executionImportant notes
@claudein a PR comment or issue to invoke it