Skip to content

chore: claude code native improvements#147

Merged
EricAndrechek merged 21 commits into
mainfrom
claude-native
May 20, 2026
Merged

chore: claude code native improvements#147
EricAndrechek merged 21 commits into
mainfrom
claude-native

Conversation

@EricAndrechek

@EricAndrechek EricAndrechek commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

Umbrella PR setting up shared Claude Code + AI agent infrastructure for the WaveHouse team. Two work streams:

  1. AI rules drift cleanup — corrected stale references that AI tools (Claude Code, Gemini Code Assist, Copilot, CodeRabbit) were following blindly.
  2. Claude Code native tooling — committed .claude/ configuration and .githooks/ so every teammate gets identical dev affordances out of the box, with agent-specific gating layered on top.

The team just got Max 20x subscriptions across the board; this lands the team-wide config so everyone is on the same agentic dev experience by default.

Scope

1. AI rules drift cleanup

  • 17 doc-path references corrected across AGENTS.md + CONTRIBUTING.md to docs/src/content/docs/*.md (the actual Astro Starlight location, not the old flat layout).
  • .github/copilot-instructions.md shrunk to a pointer — was drifting on Go 1.25 (vs current 1.26.3) and 60% coverage (vs current 80% total / 70% unit per .testcoverage.yml).
  • .gemini/styleguide.md — stale #67 / 60% claim fixed (issue closed, 70% restored); duplicated doc-sync bullet collapsed to defer to AGENTS.md (already authoritative).
  • .github/labeler.yml — dropped non-existent cmd/wavehouse-{api,worker}/** entries; fixed tests/{compose.yaml,sdk/**}tests/e2e/...; added cmd/wavehouse/** to area/infra.
  • .github/prompts/pr-review.md — doc-sync list collapsed; vestigial "tenant" wording dropped (no tenant model in WaveHouse); hard-wrap reflowed (180 → 81 lines).
  • AGENTS.mdcmd/*/main.go (plural) → cmd/wavehouse/main.go (one binary); tests/fixtures/tests/e2e/fixtures/; removed stale "update triage.yml area enumeration" step (workflow now discovers area/* labels dynamically); fixed internal-package count.
  • CONTRIBUTING.md — vestigial "tenant isolation" wording removed.
  • TODO.md deleted — audit summary below.

2. Claude Code native tooling

  • .claude/ — shared configuration: settings.json (deny rules + worktree config + three hooks wired), agents/pre-push-reviewer.md, hooks/agent-bash-gate.sh (PreToolUse Bash gate), hooks/review-marker.sh (PostToolUse Agent marker writer), hooks/gofumpt-on-save.sh (auto-format), skills/pr-review-locally/, skills/pr-sync-with-main/, commands/cover.md.
  • .githooks/ — universal team hooks installed by make tools: pre-commit runs make verify; pre-push requires tmp/ci-passed-<HEAD-sha> marker (written by make ci).
  • .config/wt.toml — worktrunk project hooks so parallel-agent worktrees install .githooks/ correctly.
  • AGENTS.md §"Agent PR Discipline" — new section codifying the agent-only ruleset:
    • Drafts-only PR creation; human-only ready/approve/request-changes/reviewer-add transitions.
    • Bot reviewer re-triggers go through PR comments (@coderabbitai review, @gemini-code-assist, @claude / /review).
    • Pre-push self-review mandatory on PR branches: agent invokes pre-push-reviewer subagent in fresh context. ship_it requires zero findings at any severity — any [MUST] / [SHOULD] / [MAY] forces iterate; the orchestrator loops review → fix → review until clean.
    • Honest-agent marker policy: --no-verify regex-blocked + the obvious marker-write idioms denied at the permission layer (Bash(touch tmp/ci-passed:*), Write/Edit on the canonical paths); everything else is a documented rule, not regex-enforced. Bash can write a file by a dozen paths and regex enforcement is a porous game of whack-a-mole.
  • docs/src/content/docs/claude-code.md — contributor-facing page documenting the four-layer model (universal git hooks → agent gate → ergonomic hooks → skills/agents/commands), quick setup, and discipline rules.
  • CHANGELOG.md[Unreleased] entry covering all of the above.

Out-of-tree GitHub changes that pair with the AI-rules cleanup

Done via gh CLI as part of the same audit:

TODO.md audit (one-time, for record)

Bucket Count Disposition
Already shipped per closed issues (#11, #14, #16, #28, #40, #41, #42, #45) + current code ~12 Deleted from TODO
Tracked as open issues (#32, #33, #34, #37, #39, #44, #48, #49, #50, #51, #94) ~12 Kept as issues, scope notes added where useful
In-flight via open PRs (#83, #92, #119, #122, #125, #136, #137) 4 Untouched
#46 Graceful Shutdown 1 Verified shipped, closed with comment
Orphan items 4 Split into #143-146
Aspirational ("more tests", "update README") 2 Deleted — covered by AGENTS.md doc-sync rules

Projects #7 board + triage automation is now the single canonical backlog.

Test plan

  • make ci passes locally for each push (gated by .githooks/pre-push)
  • CI green on the latest HEAD (8fbd7db)
  • PR-title-lint accepts the title (chore: claude code native improvements)
  • All docs/src/content/docs/*.md paths in AGENTS.md resolve to real files
  • Labeler workflow auto-labels correctly per the updated paths
  • pre-push-reviewer subagent loop reached VERDICT: ship_it with zero findings under the strict rubric before the final push (validated end-to-end across five iterations on this branch — each surfacing a real doc-sync / off-by-one / quote-strip issue and forcing a fix before the marker auto-wrote)
  • agent-bash-gate.sh quote-strip generalization sanity-tested live: echo "git push to deploy" passes through; git push --no-verify and git commit --no-verify still block (bash -n clean, JSON wiring valid)
  • Human review

Related issues

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Claude Code integration: local pre-push reviewer with strict ship/iterate/block verdicts, push gating via CI/review markers, automatic review-marker creation, and a coverage-reporting command.
  • Documentation

    • Comprehensive Claude Code & agent docs, new skill guides for PR review/sync, updated README/CONTRIBUTING/CHANGELOG/styleguide, and site sidebar/page additions.
  • Chores

    • Added git and agent hooks, CI marker creation, worktrunk config, labeler tweaks, and simplified Copilot instructions.

Review Change Stack

- 17 doc-path references corrected to docs/src/content/docs/*.md
  (actual Astro Starlight content collection location) across
  AGENTS.md and CONTRIBUTING.md
- .github/copilot-instructions.md shrunk to pointer (was drifting
  on Go 1.25 vs go.mod 1.26.3; "60% coverage" vs .testcoverage.yml
  80% total / 70% unit)
- .gemini/styleguide.md: stale #67/60% reference fixed (#67 closed,
  70% restored); duplicated doc-sync list collapsed to defer to
  AGENTS.md table
- .github/labeler.yml: dropped non-existent cmd/wavehouse-{api,
  worker}/** entries; fixed tests/compose.yaml -> tests/e2e/
  compose.yaml; tests/sdk/** -> tests/e2e/sdk/**; added
  cmd/wavehouse/** to area/infra
- .github/prompts/pr-review.md: doc-sync list collapsed; path fix;
  vestigial "tenant" wording dropped (no tenant model); hard-wrap
  reflowed (180 -> 81 lines)
- AGENTS.md: cmd/*/main.go (plural) -> cmd/wavehouse/main.go (one
  binary); tests/fixtures/ -> tests/e2e/fixtures/; removed stale
  "update triage.yml area enumeration" step (workflow discovers
  area/* labels dynamically via gh label list); package count
  fixed; tooling notes + make-help intro reflowed
- TODO.md deleted (audited against open + closed issues; orphan
  items split into follow-up issues; Projects #7 board + triage
  automation is now the single canonical backlog)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds repo-wide Claude Code settings and hooks, a pre-push-reviewer subagent plus enforcement gate and marker writer, local git hooks and CI marker wiring, developer skills/commands and formatting hooks, and comprehensive documentation and site/sidebar updates.

Changes

Claude Code Configuration & Agent Discipline

Layer / File(s) Summary
Agent pre-push review & enforcement
.claude/agents/pre-push-reviewer.md, .github/prompts/pr-review.md, .claude/hooks/agent-bash-gate.sh, .claude/hooks/review-marker.sh, .claude/settings.json
Adds the pre-push reviewer subagent (diffs vs main), tightens PR-review prompt/output discipline ([MUST]/[SHOULD]/[MAY] and a parseable VERDICT:), implements a PreToolUse bash gate that denies prohibited agent git/gh actions and enforces CI/review marker requirements, and a SubagentStop hook that writes tmp/review-passed-<HEAD> on VERDICT: ship_it.
Local hooks, CI markers & Makefile wiring
.githooks/pre-commit, .githooks/pre-push, Makefile
Pre-commit runs make verify and prints non-blocking doc/SDK/CHANGELOG sync nudges. Pre-push blocks pushes unless tmp/ci-passed-<sha> exists for pushed commits. CI writes tmp/ci-passed-<sha> and make tools wires .githooks.
Workspace settings, commands, skills & formatting
.claude/settings.json, .claude/commands/cover.md, .claude/skills/pr-review-locally/SKILL.md, .claude/skills/pr-sync-with-main/SKILL.md, .claude/hooks/gofumpt-on-save.sh, .config/wt.toml
Workspace denies dangerous agent actions and configures hook automation. Adds /cover command docs, pr-review-locally and pr-sync-with-main skills, gofumpt-on-save formatter hook, and Worktrunk lifecycle hooks.
Documentation, labels & repository updates
docs/src/content/docs/claude-code.md, AGENTS.md, CONTRIBUTING.md, README.md, CHANGELOG.md, docs/src/content/docs/development.md, .github/copilot-instructions.md, .gemini/styleguide.md, docs/src/config/sidebar.ts, .gitignore, .github/labeler.yml
Adds Claude Code docs page and sidebar entry; updates AGENTS.md with hook/agent rules and branch maintenance; updates doc paths, Copilot pointer, labeler rules, styleguide, README, CONTRIBUTING, CHANGELOG, and ignores for local Claude state.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant Agent as pre-push-reviewer
  participant Prompt as pr-review-prompt
  participant Gate as agent-bash-gate
  participant Marker as review-marker
  participant Hook as pre-push-hook

  Dev->>Agent: run pre-push-reviewer (git diff main...HEAD)
  Agent->>Prompt: apply `.github/prompts/pr-review.md`
  Agent->>Gate: PreToolUse gate validates/blocks commands
  Agent->>Marker: assistant message with VERDICT
  Marker->>Marker: create tmp/review-passed-<HEAD> if VERDICT == ship_it
  Dev->>Hook: git push
  Hook->>Hook: verify tmp/ci-passed-<SHA> (+ tmp/review-passed-<SHA> for PR branches)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • taitelee

"🐰 In burrows of code I tidy and sweep,
Hooks guard the branches while markers keep,
Agents audit, then write their small note,
CI and docs hum as the warren takes note,
Hop—ship_it—fresh pushes leap!"

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning PR objectives indicate this PR implements Claude Code infrastructure and agent discipline, but the linked issue #46 requests graceful shutdown implementation in Go code—no shutdown code changes are present in the changeset. Either implement the graceful shutdown sequence for #46 or remove the issue link if this PR is scoped only to agent tooling/documentation.
Title check ❓ Inconclusive Title is vague and generic, using 'native improvements' without clearly specifying the main change; mostly about infrastructure/tooling setup rather than a concrete feature or fix. Consider a more specific title like 'chore: add Claude Code configuration and agent PR discipline' to better describe the primary infrastructure changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes check ✅ Passed The changeset appropriately focuses on Claude Code infrastructure, agent discipline documentation, and correcting stale doc/tool references; all changes align with the stated objectives of AI-rules cleanup and native tooling setup.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude-native

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release labels May 15, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the WaveHouse repository's developer experience by optimizing AI-agent tooling and streamlining documentation management. It establishes AGENTS.md as the authoritative source for project conventions, cleans up stale references across documentation, and refines GitHub automation workflows to ensure better alignment with the current project structure.

Highlights

  • AI Agent Infrastructure: Consolidated AI agent instructions into AGENTS.md as the single source of truth, simplifying copilot-instructions.md to a pointer.
  • Documentation Cleanup: Corrected 17 stale documentation paths to align with the Astro Starlight structure and updated cross-referencing rules.
  • Workflow Maintenance: Refined .github/labeler.yml and pr-review.md to improve automation accuracy and review clarity.
  • TODO Audit: Retired TODO.md after auditing and migrating pending items to GitHub issues.
Ignored Files
  • Ignored by pattern: .gemini/** (1)
    • .gemini/styleguide.md
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors project documentation, GitHub workflows, and architectural pointers to align with the transition to a single-binary structure and updated directory layouts. Key changes include moving documentation to a sub-directory, updating the PR review prompt for AI agents, and removing the legacy TODO list. Review feedback highlights the need for consistent documentation updates, specifically pointing out remaining references to 'tenant isolation' in the contribution guide despite its removal from other architectural docs.

Comment thread .github/prompts/pr-review.md
Comment thread AGENTS.md
WaveHouse has no tenant model — auth is JWT-based with role-based
access control (Hasura-style per-table/per-column/row-level policies).
Matches SECURITY.md and the parallel pr-review.md edit in the previous
commit on this branch. Flagged by Gemini Code Assist on #147.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 15, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to In progress in WaveHouse Task Board May 15, 2026
@EricAndrechek

Copy link
Copy Markdown
Member Author

Scope note for reviewers when this exits draft.

As of the current HEAD on claude-native, this PR contains only the AI-rules drift cleanup + TODO.md deletion — 7 files, +92/-292:

  • AGENTS.md — path corrections (docs/foo.mddocs/src/content/docs/foo.md, cmd/*/main.gocmd/wavehouse/main.go, tests/fixtures/tests/e2e/fixtures/, internal package count, removed stale triage.yml enumeration step)
  • .github/copilot-instructions.md — shrunk to a pointer
  • .gemini/styleguide.md — stale #67/60% coverage claim corrected
  • .github/labeler.yml — dropped non-existent cmd/wavehouse-{api,worker} paths
  • .github/prompts/pr-review.md — reflowed; "tenant" wording dropped
  • CONTRIBUTING.md — "tenant isolation" wording removed
  • TODO.md — deleted

The .claude/ tooling described in the PR description (shared settings.json, subagents, slash commands, hooks, MCP wiring) is in-flight and will land in a follow-up commit before this exits draft. Scope review accordingly — current diff is pure doc hygiene, no Go source touched.

The out-of-tree audit work listed in the PR body (closing #46, opening #143-146, scope notes on #44/#50/#94) was done via gh CLI as part of the same audit and is already reflected in the GitHub state; nothing to review there.

Layers Claude Code-specific guardrails on top of the existing universal
git hooks. Pre-existing git hooks already enforce `make verify` on commit
and `make ci` passing before push for everyone uniformly. These additions
are agent-only and live in `.claude/hooks/`.

## Hooks

- `.claude/hooks/agent-bash-gate.sh` (PreToolUse Bash):
  - Agent-created PRs must use the draft flag (`gh pr create` without
    `--draft` is blocked)
  - `gh pr ready` / `--approve` / `--request-changes` blocked (humans
    only)
  - `gh pr edit --add-reviewer` / `--add-assignee` blocked (humans
    only — bot re-triggers via `gh pr comment` mention are fine;
    `@coderabbitai review`, `@gemini-code-assist`, `@claude` /
    `/review` all work since they don't touch the reviewer API)
  - `gh api requested_reviewers` POST blocked (API form of
    reviewer-add)
  - Bypass flags on `git push` / `git commit` blocked for agents
  - Direct marker forgery blocked (`touch`, redirect, `sh -c`
    wrappers, `cp`/`mv` targeting `tmp/(ci|review)-passed-*`)
  - `git push` to a PR branch blocked without BOTH `ci-passed` and
    `review-passed` markers for the current HEAD

- `.claude/hooks/review-marker.sh` (PostToolUse Agent) writes
  `tmp/review-passed-<HEAD-sha>` when the `pre-push-reviewer`
  subagent returns `VERDICT: ship_it`. Hook runs at Claude Code
  privilege so it bypasses the deny list — the only path to the
  review marker is via the subagent's verdict. The orchestrator
  agent can't fake it because the subagent runs in fresh context
  with the canonical system prompt that can't be overridden.

## Agent + skills

- `.claude/agents/pre-push-reviewer.md`: strengthened to fetch PR
  context (top-level + inline comments, reviews, CI status, linked
  issue acceptance criteria) when on a PR branch, and emit a
  parseable `VERDICT: ship_it|iterate|block` line consumed by the
  marker hook.
- `.claude/skills/pr-review-locally/SKILL.md`: documents "review
  someone else's PR locally" workflow — `wt switch pr:N`
  (gh-CLI-backed) + `pre-push-reviewer` subagent, no PR comments
  posted. CI claude-review via `gh workflow run` is the
  remote-comment path.

## Permissions

Force-prefix denies covering obvious bypass attempts. The
agent-bash-gate hook handles creative attempts that prefix
patterns can't match.

## Docs

- `AGENTS.md`: new "## Agent PR Discipline" section with the
  rules + bot-mention table.
- `docs/src/content/docs/claude-code.md`: updated to reflect new
  gates, plural agent/skill tables, the bot-vs-human reviewer-
  request distinction, the Daily Workflow showing the full
  pre-push-reviewer loop on PR branches.

## Tested locally

End-to-end gating flow verified:
1. No markers → push blocked (no ci-passed)
2. ci-passed only on PR branch → push blocked (no review-passed)
3. Marker hook fires with ship_it → review-passed written → push
   ALLOWED

agent-bash-gate.sh: 41 test cases covering bypass-flag attempts,
gh pr discipline, marker forgery, innocuous commands — all pass.
review-marker.sh: 7 test cases covering ship_it / iterate / block /
wrong agent type / missing verdict / case variations /
last-verdict-wins — all pass.

## Known limitation

The agent-bash-gate regex matches on whole-command text. If a
commit message body contains the literal flag substring, the
hook can false-positive. Workaround: pass commit messages via
`git commit -F <file>` (this commit uses that pattern). Honest-
agent defense, not adversarial; AGENTS.md makes the rule explicit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EricAndrechek added a commit that referenced this pull request May 19, 2026
…#165)

Closes #160.

## Summary
- All three TS workspaces (`clients/ts`, `tests/e2e/sdk`, `docs`) plus
the `setup-env` composite action jump from `pnpm@10.33.0` →
`pnpm@11.1.3`.
- pnpm 11 deprecates the `pnpm` field in `package.json` —
`onlyBuiltDependencies` moves into a new `pnpm-workspace.yaml` next to
each `package.json` and is renamed to `allowBuilds:` with the new
map-of-booleans syntax.
- Same `pnpm-workspace.yaml` files set `minimumReleaseAge: 10080` (7
days) so pnpm refuses freshly published packages until npm/jsr have had
a week to flag a compromised release.
- New repo-root `.nvmrc` pins Node 22 LTS — matches what CI's
`setup-node` already uses, and reduces Node-major-surprise risk on
`nvm`/`fnm`/`volta` dev machines.
- README, AGENTS.md, and `docs/development.md` updated for the new
versions.

## Notes from investigation
The issue flagged two open questions; here's where I landed on each:

- **`electron-winstaller` mystery.** Not a hidden transitive of any
WaveHouse workspace. The pnpm 11 ignored-build warning came from a stray
`/Users/eric/pnpm-workspace.yaml` in the local dev's home directory —
pnpm 11 walks up the directory tree looking for a workspace root and
found it before the in-repo one. Correctly omitted from `allowBuilds`.
(Future devs hitting this should clean up their home dir or rename their
stray workspace file.)
- **Node 26 Vitest crash.** I could not reproduce it on the current
branch — `make test-sdk` runs all 120 tests cleanly on Node 26. The
earlier `clients/ts` bump to `vitest@^4.1.6` (PR #103) seems to have
already absorbed the V8 incompatibility. I still added the `.nvmrc` per
the issue's request, since pinning has independent value and the cost is
one line.

## Test plan
- [x] `make build-sdk` — green
- [x] `make build-docs` — green
- [x] `make test-sdk` — 120/120 passed on Node 26 + pnpm 11
- [x] `pnpm install --frozen-lockfile` clean in all three workspaces
(CI's path)
- [ ] CI green on this PR (full `make ci` including `make test-e2e`
which needs the containerized ClickHouse + wavehouse binary)
- [ ] Re-validate PR #147's pre-push gate flow once this lands, per the
issue's "Related" section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Updated pnpm to 11.1.3 and pinned Node.js to 22 LTS across the repo.
* Added/updated per-workspace pnpm settings to allow native build steps
and enforce a 7-day minimum release age for packages.

* **Documentation**
* Updated README, development guide, and prerequisites docs to reflect
Node.js 22 LTS and pnpm 11.1.3 requirements and verification
instructions.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Wave-RF/WaveHouse/pull/165?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EricAndrechek and others added 3 commits May 19, 2026 10:59
The previous check matched the literal flag substring anywhere in the
command, false-positiving when a commit message body documented the rule
(e.g., "this hook blocks `git push --no-verify`"). The new regex only
matches when the flag appears in the args of `git push|commit` BEFORE
any quote / command-substitution / heredoc character — so the same flag
appearing inside a quoted -m message or a heredoc body no longer trips
the gate.

Still honest-agent defense, not adversarial: eval / sh -c wrappers
around `git push` with the bypass flag could still slip through.
AGENTS.md §"Agent PR Discipline" makes the rule explicit so the
honest-agent path stays correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Without `name:` in the YAML frontmatter, Claude Code's agent loader skips
the file silently — no warning, no registration. Result: `pre-push-reviewer`
never appears as an available `subagent_type`, the Agent tool falls back to
`general-purpose`, and `.claude/hooks/review-marker.sh` never writes the
`tmp/review-passed-<sha>` marker (it gates on `subagent_type == "pre-push-reviewer"`
specifically) — so the pre-push gate stays closed.

The `name:` field is what the loader uses as the registered slug; every
working subagent in the marketplace plugins (`code-reviewer`, `code-explorer`,
etc.) has it as the first frontmatter key. Bringing this file in line.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EricAndrechek and others added 5 commits May 19, 2026 12:20
Two policy shifts in the agent PR discipline layer:

1. **ship_it now requires zero findings.** Previously [MAY]s alone didn't
   preclude ship_it. The rubric in .claude/agents/pre-push-reviewer.md and
   AGENTS.md §"Agent PR Discipline" now treats any [MUST]/[SHOULD]/[MAY]
   finding as iterate — the orchestrator loops review → fix → review in
   fresh context until findings list is empty. [MAY] becomes a real
   commitment ("actually do before merge") rather than optional polish;
   genuinely-optional observations go in the prose preamble or get dropped.

2. **Marker-forgery is honest-agent, not regex-enforced.** Dropped section 7
   of agent-bash-gate.sh (the touch/redirect/cp/mv/sh -c regex around
   tmp/(ci|review)-passed-*) and the redundant ./-prefixed Write/Edit
   denies in settings.json. Bash can write a file by a dozen paths (tee,
   dd, python -c, perl, awk, go run, etc.) and the regex was a porous
   game of whack-a-mole that oversold what it delivered. Kept the cheap
   settings.json denies (Bash(touch tmp/ci-passed:*), Write/Edit on the
   canonical paths) for the obvious idioms; the rest is an explicit
   honest-agent rule in AGENTS.md ("you do not write a marker file by
   any other means — period").

Plus the [SHOULD]/[MAY] cleanups from the prior pre-push review (which
under the new rule would have forced iteration before the last push):

- Tightened requested_reviewers gate to cover PUT/PATCH in addition to
  POST (idempotent reviewer-replace verb was previously slipping through).
- Fixed pre-push-reviewer.md's git-diff doc — main...HEAD (three dots) is
  the correct merge-base-vs-HEAD form.
- Dropped hardcoded -R Wave-RF/WaveHouse from pr-review-locally SKILL.md
  (gh picks up the worktree's repo, consistent with AGENTS.md examples).
- Dropped the WAVEHOUSE_SKIP_PUSH_GATE hint from .githooks/pre-push (the
  comment admitted it wasn't implemented; either implement or drop, and
  --no-verify is the right human bypass anyway).
- Added the missing [Unreleased] CHANGELOG entry covering the .claude/ +
  .githooks/ + AGENTS.md infrastructure that landed in this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two doc-sync misses surfaced by pre-push-reviewer against c03edcd:

- docs/src/content/docs/claude-code.md:101 (and the settings.json table
  row at line 51) still claimed regex enforcement of touch / redirect /
  sh -c wrappers around marker writes. That regex was removed in c03edcd
  in favor of an honest-agent rule. Rewrote the "No bypass" bullet to
  state what's actually enforced (--no-verify + obvious tool-level
  denies) and where the rest comes from (AGENTS.md honest-agent rule).
  Also added the new ship_it-requires-zero-findings rule to the same
  bullet block so the contributor-facing doc matches AGENTS.md.

- .claude/agents/pre-push-reviewer.md:12 (§Source of truth) said the CI
  prompt applies here "verbatim — including the verdict rules", which
  contradicts §Verdict mapping at line 89 ("WaveHouse uses a stricter
  rule"). A fresh-context agent reading linearly could anchor on line 12
  and emit ship_it with [MAY] findings present, defeating the c03edcd
  rule. Amended line 12 to scope "verbatim" to focus areas + severity
  tags + noise filter, and explicitly hand off the verdict rules to
  §Verdict mapping below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The contributor-facing "Humans can bypass / Agents cannot" callout in the
Git hooks section still claimed "--no-verify and direct marker writes are
blocked" without the honest-agent qualifier ab2f414 added to line 101.
Tightened to match: --no-verify blocked, obvious marker-write idioms
denied at the permission layer, the rest is an honest-agent rule (with
cross-reference to §Agent PR Discipline for the full text). Same
correction pattern as line 101; line 43 was missed in the first sweep
and surfaced by the next pre-push-reviewer iteration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
claude-code.md:51 in the .claude/settings.json row said "all four hooks
wired" but only three are configured (PreToolUse Bash → agent-bash-gate;
PostToolUse Edit|Write|MultiEdit → gofumpt-on-save; PostToolUse Agent →
review-marker). Off-by-one count overclaim, same shape as the marker-
write overclaims fixed in earlier iterations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…table

Two issues surfaced by the fourth strict-ship_it iteration:

1. **agent-bash-gate.sh false-positives on quoted mentions of blocked
   patterns.** Commit 6c79315 fixed this specifically for --no-verify by
   adding a [^"'\$<]* quote-traversal segment to that one regex, but the
   same fix wasn't applied to the other six checks (gh pr create / ready
   / edit, gh api requested_reviewers, gh pr review, the push-marker
   gate). Demonstrated live: `echo "this mentions git push in quotes"`
   tripped the marker check. Generalized the fix: strip single- and
   double-quoted segments from the command once at the top into
   $stripped, and use $stripped for all subsequent regex checks.
   Simplified check #1's regex accordingly (the in-regex quote traversal
   is no longer needed). Sanity-tested: false positives on `echo`,
   `gh pr comment -b "..."`, `git commit -m "..."` all pass through;
   real `git push --no-verify` / `git commit --no-verify` still block.

2. **claude-code.md "How enforcement is layered" table mislabels the
   Claude Code hooks layer.** The two-row "two distinct gate layers"
   framing put `gofumpt-on-save.sh` in a row labeled "UX: auto-format"
   and omitted `agent-bash-gate.sh` (which is enforcement) and
   `review-marker.sh` (which is the marker writer). Restructured to
   four rows: git hooks (universal enforcement), Claude Code agent
   gate (agent-only enforcement), Claude Code ergonomic hooks
   (formatter + marker writer), and Claude Code skills/agents/commands
   (workflow guidance). Matches the more detailed sections later in
   the doc and the actual settings.json wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@EricAndrechek

Copy link
Copy Markdown
Member Author

Scope note update — superseding the 2026-05-18 note above.

As of HEAD 8fbd7db the .claude/ + .githooks/ infrastructure has landed; the PR description has been rewritten to reflect the final state. The 5/18 note predicted that work would land in a follow-up commit — it has.

Quick orientation for reviewers:

  • AI-rules drift cleanup is the first two commits (29228cf, 3156c88).
  • .claude/ tooling is b8a7a25 (initial drop) and six follow-up claude commits that iterated the agent-discipline ruleset to its final shape — strict-ship_it (zero findings → ship), honest-agent marker policy, and the agent-bash-gate.sh quote-strip generalization.
  • The merged-from-main commits (b96f921, 4fac0c3, f8aa173, 79f9bfa, e8b2870) are already on main; they're absorbed into the branch but not part of this PR's review surface.

Full breakdown in the updated PR description.

@EricAndrechek EricAndrechek marked this pull request as ready for review May 19, 2026 17:17
@github-actions github-actions Bot requested a review from taitelee May 19, 2026 17:18
@coderabbitai coderabbitai Bot added the github_actions Pull requests that update GitHub Actions code label May 19, 2026
@github-actions github-actions Bot removed the github_actions Pull requests that update GitHub Actions code label May 19, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/agents/pre-push-reviewer.md:
- Around line 52-54: Replace unlabeled fenced code blocks containing the literal
"VERDICT: ship_it" and the block under the header "## Pre-push review — <branch>
vs main" with language-labeled fences to satisfy markdownlint MD040;
specifically, change the first unlabeled ``` surrounding "VERDICT: ship_it" to
```text and the larger block under the "## Pre-push review — <branch> vs main"
header to ```markdown (or another appropriate language) so both fenced blocks
include language identifiers.

In @.claude/commands/cover.md:
- Line 3: The advertised argument-hint list is missing the "merge" mode; update
the argument-hint value to include merge (e.g., change argument-hint:
[unit|integration|e2e|sdk|all] to include |merge) so the CLI help matches
documented behavior in the file and aligns with the documented mode referenced
elsewhere.

In @.claude/hooks/agent-bash-gate.sh:
- Around line 57-61: The git_subcmd helper currently treats invocations like
"git push --help" as real commands; update git_subcmd to ignore help flags by
using a regex with a negative lookahead so that matches where the subcommand is
followed by "-h" or "--help" are not considered real invocations. Edit the
git_subcmd function (the grep call inside it) to use a Perl-style regex (grep
-qP) with a negative lookahead for ([[:space:]]+(-h|--help)\b) after the
subcommand token so marker checks won't run for help requests.
- Around line 29-31: The current gate reads stdin into input and sets cmd via jq
but treats an empty cmd as success, which silently disables the gate on
malformed JSON or missing jq; modify the logic in
.claude/hooks/agent-bash-gate.sh so that after computing cmd (variable names
input and cmd) you check jq's exit status and whether parsing produced valid
JSON/command, and if jq failed or cmd is empty treat it as a fatal error (exit
non‑zero) and log an error message rather than exiting 0; additionally, detect
absence of jq early and exit non‑zero with a clear error so the gate
fails-closed instead of bypassing checks.

In @.claude/hooks/review-marker.sh:
- Around line 31-35: The current verdict parsing (variable "verdict") is too
permissive because the grep matches "VERDICT:" anywhere in the response; change
the pattern to only accept a line that begins with VERDICT: (allowing leading
whitespace) and then one of the allowed tokens (ship_it, iterate, block), e.g.
replace the grep -oiE 'VERDICT:...' usage with a pattern anchored to the line
start (^[[:space:]]*VERDICT:[[:space:]]*(ship_it|iterate|block)\b) and then
extract only that capture (so the sed/tr and tail/head logic operates on a
single authoritative line) so quoted examples won't accidentally set the marker;
update the pipeline that produces the "verdict" variable accordingly.

In @.claude/settings.json:
- Around line 40-42: The deny patterns currently only list "Read(./.env)",
"Read(./.env.*)", and "Read(./secrets/**)"; add equivalent entries for bare
relative and absolute path formats so the same secrets cannot be accessed via
alternate paths. Update the patterns array to also include "Read(.env)",
"Read(.env.*)", "Read(secrets/**)", and the absolute variants such as
"Read(//secrets/**)" (and optionally "Read(/secrets/**)") so all path formats
are denied alongside the existing "Read(./...)" entries.

In @.claude/skills/pr-review-locally/SKILL.md:
- Around line 37-46: The fenced code block containing the Agent({...}) snippet
is missing a language identifier (triggering markdownlint MD040); update the
opening fence from ``` to include a language such as ```json or ```js so the
Agent({...}) block is fenced as ```json (or ```js), preserving the existing
snippet content and formatting.

In @.githooks/pre-push:
- Around line 14-19: The hook currently uses head_sha=$(git rev-parse HEAD)
which validates HEAD rather than the actual refs being pushed; instead read the
ref lines from pre-push stdin (the values read into local_ref, local_sha,
remote_ref, remote_sha), loop over each local_sha from that input, and for each
compute marker="tmp/ci-passed-${local_sha}" and check -f "$marker"; if any
pushed ref's marker exists exit 0, otherwise exit non‑zero. Replace the
head_sha/marker logic with this stdin parsing loop so the script verifies the
exact commit(s) being pushed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 247308a3-c4eb-4a08-9b9a-8e2cba0fe63e

📥 Commits

Reviewing files that changed from the base of the PR and between b96f921 and 8fbd7db.

📒 Files selected for processing (25)
  • .claude/agents/pre-push-reviewer.md
  • .claude/commands/cover.md
  • .claude/hooks/agent-bash-gate.sh
  • .claude/hooks/gofumpt-on-save.sh
  • .claude/hooks/review-marker.sh
  • .claude/settings.json
  • .claude/skills/pr-review-locally/SKILL.md
  • .claude/skills/pr-sync-with-main/SKILL.md
  • .config/wt.toml
  • .gemini/styleguide.md
  • .githooks/pre-commit
  • .githooks/pre-push
  • .github/copilot-instructions.md
  • .github/labeler.yml
  • .github/prompts/pr-review.md
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • Makefile
  • README.md
  • TODO.md
  • docs/src/config/sidebar.ts
  • docs/src/content/docs/claude-code.md
  • docs/src/content/docs/development.md
💤 Files with no reviewable changes (1)
  • TODO.md

Comment thread .claude/agents/pre-push-reviewer.md Outdated
Comment thread .claude/commands/cover.md Outdated
Comment thread .claude/hooks/agent-bash-gate.sh
Comment thread .claude/hooks/agent-bash-gate.sh
Comment thread .claude/hooks/review-marker.sh Outdated
Comment thread .claude/settings.json Outdated
Comment thread .claude/skills/pr-review-locally/SKILL.md Outdated
Comment thread .githooks/pre-push Outdated
@github-project-automation github-project-automation Bot moved this from In progress to In review in WaveHouse Task Board May 19, 2026
- agent-bash-gate.sh: fail closed on missing jq / malformed JSON
  (silent exit 0 would have disabled every discipline check below)
- agent-bash-gate.sh: skip marker check for `git push --help` / `-h`
  via new git_subcmd_is_help helper — matches the in-comment doc
- review-marker.sh: anchor VERDICT parse to ^...$ so quoted mentions
  in prose can't accidentally produce ship_it
- settings.json: add bare-relative Read deny patterns (.env, .env.*,
  secrets/**) alongside existing ./-prefixed ones — Claude Code
  matches each path format separately
- .githooks/pre-push: read refspec lines from stdin and validate the
  marker for the actual pushed SHA(s), not just HEAD
- markdownlint: tag fenced code blocks in pre-push-reviewer.md and
  pr-review-locally/SKILL.md (MD040)
- cover.md: list `merge` in argument-hint to match documented modes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

♻️ Duplicate comments (1)
.claude/hooks/agent-bash-gate.sh (1)

51-55: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fail closed when tool_input.command is missing, not only when JSON is malformed.

Line 52 defaults missing command to "", and Line 55 exits 0, which disables all discipline checks for that payload shape.

Suggested patch
 input=$(cat)
-if ! cmd=$(printf '%s' "$input" | jq -r '.tool_input.command // ""' 2>/dev/null); then
-  block "Could not parse hook payload as JSON; refusing to fail open."
+if ! cmd=$(printf '%s' "$input" | jq -er '.tool_input.command | select(type == "string" and length > 0)' 2>/dev/null); then
+  block "Could not parse a non-empty .tool_input.command from hook payload; refusing to fail open."
 fi
-[ -z "$cmd" ] && exit 0
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/hooks/agent-bash-gate.sh around lines 51 - 55, The hook currently
treats a missing tool_input.command as an empty string and exits 0, effectively
failing open; change the parsing/validation so that if tool_input.command is
absent or empty we fail closed: remove the jq default fallback (don’t use // ""
when extracting '.tool_input.command'), then after assigning cmd check [ -z
"$cmd" ] and call the existing block helper with a clear message (e.g. "Missing
tool_input.command; refusing to fail open.") and exit with non‑zero (e.g. exit
1) instead of exiting 0; reference the variables/functions input, cmd and the
block function in your edits.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/hooks/agent-bash-gate.sh:
- Around line 162-164: The current line that sets pr_state uses "gh pr view ...
|| echo """ which suppresses failures; change the logic in the review-marker
gate so that failures from the gh CLI (authentication/network/CLI errors) are
detected and cause the script to fail-fast instead of treating the PR as
non-open. Specifically, remove the "|| echo ''" suppression around the gh pr
view invocation that assigns pr_state, check the command's exit status (or
capture stderr) and if it fails emit an error and exit non-zero, ensuring the
subsequent review_marker existence check and invocation of the pre-push-reviewer
subagent still run for true OPEN PRs and are not bypassed.

In @.claude/settings.json:
- Around line 35-38: Add explicit MultiEdit denies for the marker file patterns
so they cannot be modified via the MultiEdit tool path: update the settings that
currently deny "Write(tmp/ci-passed-*)" and "Edit(tmp/ci-passed-*)" and
"Write(tmp/review-passed-*)" and "Edit(tmp/review-passed-*)" to also include
"MultiEdit(tmp/ci-passed-*)" and "MultiEdit(tmp/review-passed-*)". Ensure these
denies live alongside the existing entries for those patterns (the same block
that currently lists Write/Edit) so the PostToolUse hook that wires MultiEdit
cannot bypass the restriction.

---

Duplicate comments:
In @.claude/hooks/agent-bash-gate.sh:
- Around line 51-55: The hook currently treats a missing tool_input.command as
an empty string and exits 0, effectively failing open; change the
parsing/validation so that if tool_input.command is absent or empty we fail
closed: remove the jq default fallback (don’t use // "" when extracting
'.tool_input.command'), then after assigning cmd check [ -z "$cmd" ] and call
the existing block helper with a clear message (e.g. "Missing
tool_input.command; refusing to fail open.") and exit with non‑zero (e.g. exit
1) instead of exiting 0; reference the variables/functions input, cmd and the
block function in your edits.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c8332dc2-5d51-444e-80d8-268b5af4d331

📥 Commits

Reviewing files that changed from the base of the PR and between 8fbd7db and f5e03bb.

📒 Files selected for processing (7)
  • .claude/agents/pre-push-reviewer.md
  • .claude/commands/cover.md
  • .claude/hooks/agent-bash-gate.sh
  • .claude/hooks/review-marker.sh
  • .claude/settings.json
  • .claude/skills/pr-review-locally/SKILL.md
  • .githooks/pre-push

Comment thread .claude/hooks/agent-bash-gate.sh Outdated
Comment thread .claude/settings.json
EricAndrechek and others added 2 commits May 19, 2026 14:02
The PR #147 review surfaced a real plumbing bug: the marker hook on
PostToolUse:Agent never wrote its file because `.tool_response` for the
Agent tool is a structured object (`{ content: [{type, text}], ... }`),
not a flat string. Instrumented both events live; confirmed that
SubagentStop exposes a clean `.last_assistant_message` string and an
`agent_type` field — moved the hook there and used those fields.

Also:

- agent-bash-gate.sh: distinguish "no PR for this branch" (benign, skip
  review-marker check) from "gh auth/network error" (NOT benign — block
  rather than silently bypass the review gate). Captures gh stderr and
  regex-matches "no pull request(s) found"; any other failure mode
  blocks with a clear remediation pointer. Also blocks if gh is missing.
- settings.json: deny `MultiEdit(tmp/{ci,review}-passed-*)` alongside
  existing Write/Edit denies (MultiEdit is evaluated as a separate
  tool by Claude Code).
- claude-code.md: doc-sync the hook event change.

Tested live: triggered an Agent (Explore) to confirm PostToolUse:Agent
and SubagentStop both fire (hot-reload of settings.json works), dumped
both payloads, and verified the new hook script writes a marker only on
agent_type=="pre-push-reviewer" with a `VERDICT: ship_it` last message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit (`dc91aa7`) moved review-marker.sh from
PostToolUse:Agent to SubagentStop but only updated claude-code.md.
Pre-push-reviewer's strict-rubric scan caught three stale references:

- AGENTS.md §"No bypass for agents" — the markers-exclusively bullet
  still named the old hook event.
- CHANGELOG.md [Unreleased] — the rollout entry parenthetical.
- agent-bash-gate.sh:190 — the user-facing error message shown
  when an agent hits the missing-review-marker branch.

All three now say SubagentStop. No behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/hooks/review-marker.sh:
- Around line 31-35: The two jq invocations that assign agent_type and response
currently swallow errors (2>/dev/null) which hides missing-jq or
malformed-payload problems; add an explicit dependency check (command -v jq)
before those lines and fail fast with a clear stderr message if jq is missing,
and change the agent_type and response parsing to capture jq's exit status and
stderr (don't redirect to /dev/null) so on parse failure you emit a diagnostic
that includes which field failed (agent_type or last_assistant_message) plus a
short excerpt of the incoming payload and exit non-zero; refer to the existing
variables agent_type and response as the places to add these checks and
diagnostics.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d0ddc144-ed40-41e5-84dc-52fe7ae9014d

📥 Commits

Reviewing files that changed from the base of the PR and between f5e03bb and 3449478.

📒 Files selected for processing (6)
  • .claude/hooks/agent-bash-gate.sh
  • .claude/hooks/review-marker.sh
  • .claude/settings.json
  • AGENTS.md
  • CHANGELOG.md
  • docs/src/content/docs/claude-code.md

Comment thread .claude/hooks/review-marker.sh Outdated
Round-3 CodeRabbit finding on PR #147: the two `jq -r ... 2>/dev/null`
calls (one for `.agent_type`, one for `.last_assistant_message`)
silently swallow errors, leaving the orchestrator to push, hit the
missing review marker, and have no idea why.

Same posture as the round-2 fix to `agent-bash-gate.sh`, except this
hook exits 0 on its own failures rather than blocking — it's the
marker writer, not the push gate; the absence of a marker is itself
the downstream enforcement signal:

- `command -v jq` check at the top — emits "jq not found" diagnostic,
  exits 0.
- Each `jq -r` call captured via `if ! var=$(...); then`, emitting
  a field-specific diagnostic on parse failure, exits 0.

Tested all three failure modes: malformed JSON → diagnostic; non-
pre-push-reviewer subagent → silent exit 0 (legitimate non-match);
valid `pre-push-reviewer` with `VERDICT: ship_it` → marker written.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/hooks/review-marker.sh:
- Around line 72-74: The hook currently always prints a success message even if
mkdir or touch fail; modify the block that creates the marker (commands mkdir -p
tmp and touch "tmp/review-passed-${head_sha}") to verify each operation
succeeded before emitting the echo, e.g., check the exit status of mkdir and
touch (or use a conditional like &&) and only run echo "📝 Pre-push review
marker written: tmp/review-passed-${head_sha:0:8}" >&2 when the marker file was
actually created; if creation fails, emit an error to stderr and exit non‑zero
so the orchestrator does not get a false success.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5eecb089-0d41-4a21-8c91-92901fe0893a

📥 Commits

Reviewing files that changed from the base of the PR and between 3449478 and 92e2c6a.

📒 Files selected for processing (1)
  • .claude/hooks/review-marker.sh

Comment thread .claude/hooks/review-marker.sh Outdated
Round-4 CodeRabbit finding on PR #147: the success message at the tail
of review-marker.sh was emitted unconditionally after `mkdir -p tmp &&
touch ...`, so a write failure (full disk, permission denied, etc.)
would print "📝 Pre-push review marker written" while the file
didn't actually exist. The orchestrator would then push, get blocked
by the missing marker, and have no clue why the success line lied.

Now:

    if mkdir -p tmp && touch "tmp/review-passed-${head_sha}"; then
      echo "📝 Pre-push review marker written: …" >&2
    else
      echo "review-marker: failed to write … — no marker written." >&2
    fi

Same posture as the other failure paths in this hook: stderr diagnostic
on failure, exit 0 (the missing marker is the enforcement signal
downstream — exit 2 would conflate hook misbehaviour with verdict).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 19, 2026
@github-project-automation github-project-automation Bot moved this from In review to In progress in WaveHouse Task Board May 19, 2026
EricAndrechek and others added 2 commits May 19, 2026 15:07
…ispatch

Removes the `pull_request` trigger so the workflow only fires on
`@claude` / `/review` PR comments from trusted reviewers, or
`workflow_dispatch`. Falls out:

- Header comment no longer needs the `pull_request_target` OIDC
  paragraph — that tradeoff only applied to the auto-trigger path.
- Concurrency: `cancel-in-progress` is now unconditionally `false`;
  manual triggers should always queue, never cancel an in-flight run.
- Workflow-level `if:` drops the `pull_request` branch and its
  dependabot-author exclusion.
- Gate step drops `PR_EVENT_NUM` / `PR_EVENT_HEAD_SHA` and the
  `pull_request)` case; both remaining paths need the same
  `gh pr view --jq .headRefOid` call so it's hoisted out of the case.

Trust gate stays — it's actually more load-bearing under manual-only,
since `issue_comment` runs with full repo secrets and a trusted
reviewer commenting `@claude` on a fork PR would otherwise check out
untrusted fork code with write tokens. Updated the header comment to
lead with that reasoning.

AGENTS.md synced in three places: the "Re-request review" step, the
review tooling reference table, and the Repository Automation
section's Claude PR review entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds an Unreleased § Changed bullet for the previous commit
(42d08f5) — pre-push reviewer flagged it as a [MAY], and the
section already tracks workflow-tuning entries of similar shape, so
it's a clearer entry point than letting the change live only in the
commit log.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label May 19, 2026
EricAndrechek and others added 2 commits May 19, 2026 15:19
`docs/src/content/docs/development.md:49` linked to `claude-code.md`
relatively, which the starlight-links-validator (newly stricter in
the docs site rebuild merged from #142) rejects. Repo convention for
sibling links in `src/content/docs/` is the absolute, suffix-less
form `/claude-code` — switching to that. Confirmed locally with
`pnpm run build`: "All internal links are valid."

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@EricAndrechek EricAndrechek enabled auto-merge (squash) May 19, 2026 20:15
@EricAndrechek EricAndrechek merged commit 4bd92a8 into main May 20, 2026
7 checks passed
@EricAndrechek EricAndrechek deleted the claude-native branch May 20, 2026 03:17
@github-project-automation github-project-automation Bot moved this from In progress to Done in WaveHouse Task Board May 20, 2026
@coderabbitai coderabbitai Bot mentioned this pull request May 26, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Graceful Shutdown & Resource Cleanup

2 participants