From bd2d8f73a631b1a96ef829bc9a620d8ee94e52af Mon Sep 17 00:00:00 2001 From: wjames111 Date: Fri, 20 Nov 2026 16:27:53 -0500 Subject: [PATCH 01/13] AIGS-25 Keep the agent-review bot from approving one-way-door PRs --- .claude/review/config.yml | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.claude/review/config.yml b/.claude/review/config.yml index 592cf2e6a..b080e4c3a 100644 --- a/.claude/review/config.yml +++ b/.claude/review/config.yml @@ -471,6 +471,57 @@ engine: # locally, so no CI workflow reviews its PRs. reviews_run: local +# People-only approval. The bot never approves a PR that touches these; keep in step with .github/CODEOWNERS. +human_approval: + paths: + - 'src/components/HrTools/**' + - 'pages/accountLists/*/hrTools/**' + - 'src/components/Reports/MPGAIncomeExpensesReport/**' + - 'src/components/Reports/StaffExpenseReport/**' + - 'pages/accountLists/*/reports/mpgaIncomeExpenses/**' + - 'pages/accountLists/*/reports/staffExpense/**' + - 'pages/api/auth/**' + - 'pages/api/stop-impersonating.page.ts' + - 'pages/api/utils/cookies.ts' + - 'pages/api/uploads/**' + - 'pages/api/utils/pagePropsHelpers.ts' + - 'src/lib/apollo/link.ts' + - 'src/lib/apollo/client.ts' + - 'src/lib/apollo/ssrClient.ts' + - 'pages/api/graphql-rest.page.ts' + - 'pages/api/Schema/**' + - 'pages/api/csv-update.page.ts' + - 'src/lib/dataDog.ts' + - 'scripts/safety-nets/**' + - '.github/**' + - '.husky/**' + # Every .claude path except agent-review's own outcome logs (learnings/feedback/*.jsonl, feedback.jsonl). + - '.claude/*.json' + - '.claude/skills/**' + - '.claude/agents/**' + - '.claude/commands/**' + - '.claude/hooks/**' + - '.claude/rules/**' + - '.claude/review/*.yml' + - '.claude/review/*.md' + - '.claude/review/learnings/*.yml' + - '.claude/review/rules/**' + - '.claude/review/static/**' + - '.claude/review/evals/**' + - '**/CLAUDE.md' + - '**/AGENTS.md' + - '.gitleaksignore' + - '.eslintrc*' + - '.eslintignore' + - 'amplify.yml' + - 'next.config.ts' + - '.yarnrc.yml' + - '.yarn/releases/**' + - 'jest.config.js' + - 'tsconfig.json' + - '__tests__/util/setup.ts' + - 'scripts/jest-shards/*.js' + # Reports approve by default (`advisory`). Set `shadow` to post advice only. This repo is # local-only, so there is no CI caller and this key is the only place the mode lives. # auto_approve in .github/workflows/agent-review-approve.yml decides whether a passing From c95a7c73a067dff11e3571e68c5b9f823b547cfa Mon Sep 17 00:00:00 2001 From: wjames111 Date: Fri, 20 Nov 2026 16:27:55 -0500 Subject: [PATCH 02/13] AIGS-25 Note that human_approval mirrors CODEOWNERS --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8976d13cc..430e6a306 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -195,7 +195,7 @@ Critical environment setup: A mistake here gets money math or HR data wrong, breaks sign-in, leaks a secret, or switches off a guardrail. Work that touches these uses the stricter setup in `.claude/skills/implement/SKILL.md`, and a person from the code owners must approve the PR. -`.github/CODEOWNERS` is the one list of exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the few lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label, so add or remove paths there, not here. It covers: +`.github/CODEOWNERS` is the one list of exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the few lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label, so add or remove paths there, not here. `human_approval` in `.claude/review/config.yml` mirrors it so the agent-review bot never approves these PRs; change both together. It covers: - HR tools, the reports that read HCM data, and their pages - Sign-in, impersonation, page access gates, auth cookies, file uploads and the Apollo clients From afec95dd87a2e913744fb66f9ff7f88102cfda91 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Fri, 20 Nov 2026 17:02:39 -0500 Subject: [PATCH 03/13] AIGS-25 Cover every .claude path except review logs in human_approval --- .claude/review/config.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.claude/review/config.yml b/.claude/review/config.yml index b080e4c3a..ed97bdbc5 100644 --- a/.claude/review/config.yml +++ b/.claude/review/config.yml @@ -471,7 +471,8 @@ engine: # locally, so no CI workflow reviews its PRs. reviews_run: local -# People-only approval. The bot never approves a PR that touches these; keep in step with .github/CODEOWNERS. +# People-only approval. The bot never approves a PR that touches these paths. +# Keep this list in step with the owned paths in .github/CODEOWNERS. human_approval: paths: - 'src/components/HrTools/**' @@ -495,19 +496,16 @@ human_approval: - 'scripts/safety-nets/**' - '.github/**' - '.husky/**' - # Every .claude path except agent-review's own outcome logs (learnings/feedback/*.jsonl, feedback.jsonl). - - '.claude/*.json' - - '.claude/skills/**' - - '.claude/agents/**' - - '.claude/commands/**' - - '.claude/hooks/**' - - '.claude/rules/**' - - '.claude/review/*.yml' - - '.claude/review/*.md' - - '.claude/review/learnings/*.yml' - - '.claude/review/rules/**' - - '.claude/review/static/**' - - '.claude/review/evals/**' + # All of .claude except agent-review's outcome logs (learnings/feedback/*.jsonl and + # learnings/feedback.jsonl), the same carve-out CODEOWNERS makes. A bare * here also + # matches subfolders, so each level names what it skips with !( ). + - '.claude/!(review)' + - '.claude/!(review)/**' + - '.claude/review/!(learnings)' + - '.claude/review/!(learnings)/**' + - '.claude/review/learnings/!(feedback|feedback.jsonl)' + - '.claude/review/learnings/!(feedback)/**' + - '.claude/review/learnings/feedback/**/!(*.jsonl)' - '**/CLAUDE.md' - '**/AGENTS.md' - '.gitleaksignore' From 507a5690eca3f58e4991cf5c7c17c8537d0ee3ed Mon Sep 17 00:00:00 2001 From: wjames111 Date: Fri, 20 Nov 2026 17:02:41 -0500 Subject: [PATCH 04/13] AIGS-25 Say CODEOWNERS and human_approval change together --- .github/CODEOWNERS | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CLAUDE.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cca50ac86..ae405ffdc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ # Only one-way-door paths need a code owner; there is no * line, so the rest can merge on the agent-review approval. -# pr-guard also labels PRs one-way-door from these paths. This file is the one list; CLAUDE.md only says what it covers. +# pr-guard also labels PRs one-way-door from these paths. human_approval in .claude/review/config.yml mirrors them; change both together. # HR tools and their pages: goal, NS and PDS calculators, salary, ASR, MHA, savings fund, HCM data /src/components/HrTools/ @CruGlobal/mpdx-developers diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8832eda63..75b7ed1d1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -32,7 +32,7 @@ Findings I did not fix, and why: - [ ] My PR title is the work item key, then a summary of 80 characters or less (example: `MPDX-1234 Add sortable columns`) - [ ] I have applied the appropriate labels (_Add the label "Preview Environment" to automatically create a preview environment_) - [ ] I have run the Claude Code `/agent-review:review` command locally and fixed each finding or listed it above -- [ ] The `github-actions` bot has approved the PR (it approves once `/agent-review:review` leaves no open blockers) +- [ ] The `github-actions` bot has approved the PR (it approves once `/agent-review:review` leaves no open blockers; it never approves a one-way door) - [ ] I have asked a person to review, if this is a one-way door (it touches a path `.github/CODEOWNERS` gives an owner) - [ ] I have tested my changes in preview or in staging - [ ] I have cleaned up my commit history diff --git a/CLAUDE.md b/CLAUDE.md index 430e6a306..55191c36e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -195,7 +195,7 @@ Critical environment setup: A mistake here gets money math or HR data wrong, breaks sign-in, leaks a secret, or switches off a guardrail. Work that touches these uses the stricter setup in `.claude/skills/implement/SKILL.md`, and a person from the code owners must approve the PR. -`.github/CODEOWNERS` is the one list of exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the few lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label, so add or remove paths there, not here. `human_approval` in `.claude/review/config.yml` mirrors it so the agent-review bot never approves these PRs; change both together. It covers: +`.github/CODEOWNERS` holds the exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the few lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label. `human_approval` in `.claude/review/config.yml` lists the same paths so the agent-review bot never approves these PRs. Add or remove a path in both files together, not here. It covers: - HR tools, the reports that read HCM data, and their pages - Sign-in, impersonation, page access gates, auth cookies, file uploads and the Apollo clients From d032ef256c5316fcc785f52323d70e1acd58d97f Mon Sep 17 00:00:00 2001 From: wjames111 Date: Fri, 20 Nov 2026 17:03:10 -0500 Subject: [PATCH 05/13] chore(review): record finding outcomes --- .../feedback/address-2317-20261120T220310Z-934e26.jsonl | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .claude/review/learnings/feedback/address-2317-20261120T220310Z-934e26.jsonl diff --git a/.claude/review/learnings/feedback/address-2317-20261120T220310Z-934e26.jsonl b/.claude/review/learnings/feedback/address-2317-20261120T220310Z-934e26.jsonl new file mode 100644 index 000000000..4b4b99601 --- /dev/null +++ b/.claude/review/learnings/feedback/address-2317-20261120T220310Z-934e26.jsonl @@ -0,0 +1,6 @@ +{"ts":"2026-11-20T22:03:10.101Z","reviewId":"address-2317","id":"f8","signature":"61a0c5ebae05","agent":"code-review","category":"security","severity":4,"file":".claude/review/config.yml","message":"Non-jsonl files under .claude/review/learnings/feedback/ are neither reviewed nor gated, while CODEOWNERS still owns them.","outcome":"accepted"} +{"ts":"2026-11-20T22:03:10.102Z","reviewId":"address-2317","id":"f9","signature":"12eb0234a117","agent":"code-review","category":"security","severity":4,"file":".claude/review/config.yml","message":"The hand-picked .claude patterns do not cover everything CODEOWNERS owns under /.claude/, so new .claude files (for example .claude/statusline.sh or .claude/review/metrics/**) can be bot-approved. The comment saying every .claude path is covered is not true.","outcome":"accepted"} +{"ts":"2026-11-20T22:03:10.102Z","reviewId":"address-2317","id":"f10","signature":"fc68f432c293","agent":"standards","category":"docs-drift","severity":4,"file":".github/CODEOWNERS","message":"CODEOWNERS header still says \"This file is the one list\", and CLAUDE.md line 196 still says \"add or remove paths there, not here\". Both now conflict with the new mirrored list and the \"change both together\" rule.","outcome":"accepted"} +{"ts":"2026-11-20T22:03:10.102Z","reviewId":"address-2317","id":"f11","signature":"4fbedab45ab4","agent":"code-review","category":"conventions","severity":4,"file":"CLAUDE.md","message":"The edited paragraph still says CODEOWNERS is the one list and to change paths only there, then says to change both. It also says human_approval mirrors CODEOWNERS, which is not exactly true.","outcome":"accepted"} +{"ts":"2026-11-20T22:03:10.102Z","reviewId":"address-2317","id":"f12","signature":"43816f107c30","agent":"standards","category":"style","severity":3,"file":".claude/review/config.yml","message":"The new header comment is a single ~115 char line, while the surrounding comments wrap near 90 chars across lines.","outcome":"accepted"} +{"ts":"2026-11-20T22:03:10.102Z","reviewId":"address-2317","id":"f13","signature":"712b0c85e859","agent":"code-review","category":"conventions","severity":3,"file":".github/PULL_REQUEST_TEMPLATE.md","message":"The PR template still asks that the bot has approved, which can never happen on a one-way-door PR now. The next line does ask for a person on one-way doors, so the impact is small.","outcome":"accepted"} From d9cc2e383ea7e63acf4fe4bf5ce80db9546bb139 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:07:34 -0500 Subject: [PATCH 06/13] AIGS-25 Narrow human_approval to guardrails, sign-in, API tokens and secrets config --- .claude/review/config.yml | 53 ++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/.claude/review/config.yml b/.claude/review/config.yml index ed97bdbc5..e75eae7ec 100644 --- a/.claude/review/config.yml +++ b/.claude/review/config.yml @@ -471,31 +471,18 @@ engine: # locally, so no CI workflow reviews its PRs. reviews_run: local -# People-only approval. The bot never approves a PR that touches these paths. +# People-only approval. The bot never approves a PR that touches these paths. Only places +# where a person's approval adds something the bot and CI can't: the review's own rules, +# sign-in and page access, the user's API token, and config where secrets are in reach. # Keep this list in step with the owned paths in .github/CODEOWNERS. human_approval: paths: - - 'src/components/HrTools/**' - - 'pages/accountLists/*/hrTools/**' - - 'src/components/Reports/MPGAIncomeExpensesReport/**' - - 'src/components/Reports/StaffExpenseReport/**' - - 'pages/accountLists/*/reports/mpgaIncomeExpenses/**' - - 'pages/accountLists/*/reports/staffExpense/**' - - 'pages/api/auth/**' - - 'pages/api/stop-impersonating.page.ts' - - 'pages/api/utils/cookies.ts' - - 'pages/api/uploads/**' - - 'pages/api/utils/pagePropsHelpers.ts' - - 'src/lib/apollo/link.ts' - - 'src/lib/apollo/client.ts' - - 'src/lib/apollo/ssrClient.ts' - - 'pages/api/graphql-rest.page.ts' - - 'pages/api/Schema/**' - - 'pages/api/csv-update.page.ts' - - 'src/lib/dataDog.ts' - - 'scripts/safety-nets/**' + # The review's own rules: what the bot and CI check - '.github/**' - '.husky/**' + - '.gitleaksignore' + - 'CLAUDE.md' + - 'AGENTS.md' # All of .claude except agent-review's outcome logs (learnings/feedback/*.jsonl and # learnings/feedback.jsonl), the same carve-out CODEOWNERS makes. A bare * here also # matches subfolders, so each level names what it skips with !( ). @@ -506,19 +493,29 @@ human_approval: - '.claude/review/learnings/!(feedback|feedback.jsonl)' - '.claude/review/learnings/!(feedback)/**' - '.claude/review/learnings/feedback/**/!(*.jsonl)' - - '**/CLAUDE.md' - - '**/AGENTS.md' - - '.gitleaksignore' - '.eslintrc*' - '.eslintignore' - - 'amplify.yml' - - 'next.config.ts' - - '.yarnrc.yml' - - '.yarn/releases/**' - 'jest.config.js' - - 'tsconfig.json' - '__tests__/util/setup.ts' - 'scripts/jest-shards/*.js' + - 'tsconfig.json' + # Sign-in, page access, and the saved Apollo cache + - 'pages/api/auth/**' + - 'pages/api/stop-impersonating.page.ts' + - 'pages/api/utils/cookies.ts' + - 'pages/api/utils/pagePropsHelpers.ts' + - 'src/components/CacheRestoreGate/**' + - 'src/lib/apollo/persistence/**' + # Code that puts the user's API token on outgoing calls + - 'src/lib/apollo/link.ts' + - 'pages/api/graphql-rest.page.ts' + - 'pages/api/uploads/**' + - 'pages/api/csv-update.page.ts' + # Build and deploy config, where secrets are in reach + - 'next.config.ts' + - 'amplify.yml' + - '.yarnrc.yml' + - '.yarn/releases/**' # Reports approve by default (`advisory`). Set `shadow` to post advice only. This repo is # local-only, so there is no CI caller and this key is the only place the mode lives. From aad83ab55aa98cdc23fc8d0d6eae747c21c75ce2 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:07:37 -0500 Subject: [PATCH 07/13] AIGS-25 Match CODEOWNERS to the narrower list and name the repo owners --- .github/CODEOWNERS | 77 +++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 45 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ae405ffdc..0cb7a48af 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,52 +1,39 @@ -# Only one-way-door paths need a code owner; there is no * line, so the rest can merge on the agent-review approval. -# pr-guard also labels PRs one-way-door from these paths. human_approval in .claude/review/config.yml mirrors them; change both together. +# Only these paths need a code owner; there is no * line, so the rest can merge on the agent-review approval. +# pr-guard labels PRs one-way-door from these paths. human_approval in .claude/review/config.yml mirrors them; change both together. -# HR tools and their pages: goal, NS and PDS calculators, salary, ASR, MHA, savings fund, HCM data -/src/components/HrTools/ @CruGlobal/mpdx-developers -/pages/accountLists/*/hrTools/ @CruGlobal/mpdx-developers +# The review's own rules: what the bot and CI check +/.github/ @jbirdjavi @jeff-clay @EJTison +/.husky/ @jbirdjavi @jeff-clay @EJTison +/.gitleaksignore @jbirdjavi @jeff-clay @EJTison +/CLAUDE.md @jbirdjavi @jeff-clay @EJTison +/AGENTS.md @jbirdjavi @jeff-clay @EJTison +/.claude/ @jbirdjavi @jeff-clay @EJTison +/.eslintrc* @jbirdjavi @jeff-clay @EJTison +/.eslintignore @jbirdjavi @jeff-clay @EJTison +/jest.config.js @jbirdjavi @jeff-clay @EJTison +/__tests__/util/setup.ts @jbirdjavi @jeff-clay @EJTison +/scripts/jest-shards/*.js @jbirdjavi @jeff-clay @EJTison +/tsconfig.json @jbirdjavi @jeff-clay @EJTison -# Reports that read HCM data, and their pages -/src/components/Reports/MPGAIncomeExpensesReport/ @CruGlobal/mpdx-developers -/src/components/Reports/StaffExpenseReport/ @CruGlobal/mpdx-developers -/pages/accountLists/*/reports/mpgaIncomeExpenses/ @CruGlobal/mpdx-developers -/pages/accountLists/*/reports/staffExpense/ @CruGlobal/mpdx-developers +# Sign-in, page access, and the saved Apollo cache +/pages/api/auth/ @jbirdjavi @jeff-clay @EJTison +/pages/api/stop-impersonating.page.ts @jbirdjavi @jeff-clay @EJTison +/pages/api/utils/cookies.ts @jbirdjavi @jeff-clay @EJTison +/pages/api/utils/pagePropsHelpers.ts @jbirdjavi @jeff-clay @EJTison +/src/components/CacheRestoreGate/ @jbirdjavi @jeff-clay @EJTison +/src/lib/apollo/persistence/ @jbirdjavi @jeff-clay @EJTison -# Sign-in, impersonation, page access gates, auth cookies, file uploads and the Apollo clients -/pages/api/auth/ @CruGlobal/mpdx-developers -/pages/api/stop-impersonating.page.ts @CruGlobal/mpdx-developers -/pages/api/utils/cookies.ts @CruGlobal/mpdx-developers -/pages/api/uploads/ @CruGlobal/mpdx-developers -/src/lib/apollo/link.ts @CruGlobal/mpdx-developers -/src/lib/apollo/client.ts @CruGlobal/mpdx-developers -/src/lib/apollo/ssrClient.ts @CruGlobal/mpdx-developers -/pages/api/utils/pagePropsHelpers.ts @CruGlobal/mpdx-developers +# Code that puts the user's API token on outgoing calls +/src/lib/apollo/link.ts @jbirdjavi @jeff-clay @EJTison +/pages/api/graphql-rest.page.ts @jbirdjavi @jeff-clay @EJTison +/pages/api/uploads/ @jbirdjavi @jeff-clay @EJTison +/pages/api/csv-update.page.ts @jbirdjavi @jeff-clay @EJTison -# REST proxy and CSV import -/pages/api/graphql-rest.page.ts @CruGlobal/mpdx-developers -/pages/api/Schema/ @CruGlobal/mpdx-developers -/pages/api/csv-update.page.ts @CruGlobal/mpdx-developers - -# Monitoring and safety nets -/src/lib/dataDog.ts @CruGlobal/mpdx-developers -/scripts/safety-nets/ @CruGlobal/mpdx-developers - -# Guardrail files and build config -/.github/ @CruGlobal/mpdx-developers -/.husky/ @CruGlobal/mpdx-developers -/.claude/ @CruGlobal/mpdx-developers -**/CLAUDE.md @CruGlobal/mpdx-developers -**/AGENTS.md @CruGlobal/mpdx-developers -/.gitleaksignore @CruGlobal/mpdx-developers -/.eslintrc* @CruGlobal/mpdx-developers -/amplify.yml @CruGlobal/mpdx-developers -/next.config.ts @CruGlobal/mpdx-developers -/.yarnrc.yml @CruGlobal/mpdx-developers -/jest.config.js @CruGlobal/mpdx-developers -/tsconfig.json @CruGlobal/mpdx-developers -/.eslintignore @CruGlobal/mpdx-developers -/__tests__/util/setup.ts @CruGlobal/mpdx-developers -/scripts/jest-shards/*.js @CruGlobal/mpdx-developers -/.yarn/releases/ @CruGlobal/mpdx-developers +# Build and deploy config, where secrets are in reach +/next.config.ts @jbirdjavi @jeff-clay @EJTison +/amplify.yml @jbirdjavi @jeff-clay @EJTison +/.yarnrc.yml @jbirdjavi @jeff-clay @EJTison +/.yarn/releases/ @jbirdjavi @jeff-clay @EJTison # agent-review's address step commits these outcome logs on PR branches; no owner, so they never make a PR one-way-door /.claude/review/learnings/feedback/*.jsonl From fb8495fccd9e2789ed99bb851fc070f9b628da3c Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:07:38 -0500 Subject: [PATCH 08/13] AIGS-25 Shrink the CLAUDE.md one-way-door section to match --- CLAUDE.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 55191c36e..3e625d907 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -193,15 +193,16 @@ Critical environment setup: ## One-way-door paths -A mistake here gets money math or HR data wrong, breaks sign-in, leaks a secret, or switches off a guardrail. Work that touches these uses the stricter setup in `.claude/skills/implement/SKILL.md`, and a person from the code owners must approve the PR. +These are the places where a person's approval adds something the bot and CI can't. A mistake here could switch off a guardrail, show one person's data to someone else, or leak a token or secret, and none of that can be taken back. Work that touches these uses the stricter setup in `.claude/skills/implement/SKILL.md`, and a code owner must approve the PR. -`.github/CODEOWNERS` holds the exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the few lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label. `human_approval` in `.claude/review/config.yml` lists the same paths so the agent-review bot never approves these PRs. Add or remove a path in both files together, not here. It covers: +`.github/CODEOWNERS` holds the exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the two lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label. `human_approval` in `.claude/review/config.yml` lists the same paths so the agent-review bot never approves these PRs. Add or remove a path in both files together, not here. It covers: -- HR tools, the reports that read HCM data, and their pages -- Sign-in, impersonation, page access gates, auth cookies, file uploads and the Apollo clients -- The REST proxy and CSV import -- Monitoring and safety nets -- Guardrail files and build config: CI, hooks, Claude config, CLAUDE.md, AGENTS.md, the gitleaks ignore list, lint, test, TypeScript, Yarn and Next.js config, and Amplify +- The review's own rules: CI, hooks, Claude config, the root CLAUDE.md and AGENTS.md, the gitleaks ignore list, and lint, test and TypeScript config +- Sign-in, page access, and the saved Apollo cache +- The code that puts the user's API token on outgoing calls +- Build and deploy config where secrets are in reach: Next.js, Amplify and Yarn + +HR tools and the HCM reports are not on the list. Tests, the AI review and a check on staging cover their math, not a person's approval. Tests follow their folder: a test inside an owned folder is a one-way door too. A test next to a single owned file is not, unless CODEOWNERS lists it. From 63cb7cdaf6cee4748055fb22e5e1f149e8f27135 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:21:42 -0500 Subject: [PATCH 09/13] AIGS-25 Gate the sign-out wipe and service worker cache rules --- .claude/review/config.yml | 5 ++++- .github/CODEOWNERS | 5 ++++- CLAUDE.md | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.claude/review/config.yml b/.claude/review/config.yml index e75eae7ec..50fe48d64 100644 --- a/.claude/review/config.yml +++ b/.claude/review/config.yml @@ -499,13 +499,16 @@ human_approval: - '__tests__/util/setup.ts' - 'scripts/jest-shards/*.js' - 'tsconfig.json' - # Sign-in, page access, and the saved Apollo cache + # Sign-in, page access, and clearing one user's data before the next - 'pages/api/auth/**' - 'pages/api/stop-impersonating.page.ts' - 'pages/api/utils/cookies.ts' - 'pages/api/utils/pagePropsHelpers.ts' - 'src/components/CacheRestoreGate/**' - 'src/lib/apollo/persistence/**' + - 'src/lib/clearSessionData.ts' + - 'src/sw/**' + - 'src/lib/serviceWorker/**' # Code that puts the user's API token on outgoing calls - 'src/lib/apollo/link.ts' - 'pages/api/graphql-rest.page.ts' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0cb7a48af..7c9b5436a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,13 +15,16 @@ /scripts/jest-shards/*.js @jbirdjavi @jeff-clay @EJTison /tsconfig.json @jbirdjavi @jeff-clay @EJTison -# Sign-in, page access, and the saved Apollo cache +# Sign-in, page access, and clearing one user's data before the next /pages/api/auth/ @jbirdjavi @jeff-clay @EJTison /pages/api/stop-impersonating.page.ts @jbirdjavi @jeff-clay @EJTison /pages/api/utils/cookies.ts @jbirdjavi @jeff-clay @EJTison /pages/api/utils/pagePropsHelpers.ts @jbirdjavi @jeff-clay @EJTison /src/components/CacheRestoreGate/ @jbirdjavi @jeff-clay @EJTison /src/lib/apollo/persistence/ @jbirdjavi @jeff-clay @EJTison +/src/lib/clearSessionData.ts @jbirdjavi @jeff-clay @EJTison +/src/sw/ @jbirdjavi @jeff-clay @EJTison +/src/lib/serviceWorker/ @jbirdjavi @jeff-clay @EJTison # Code that puts the user's API token on outgoing calls /src/lib/apollo/link.ts @jbirdjavi @jeff-clay @EJTison diff --git a/CLAUDE.md b/CLAUDE.md index 3e625d907..249d038a3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -198,7 +198,7 @@ These are the places where a person's approval adds something the bot and CI can `.github/CODEOWNERS` holds the exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the two lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label. `human_approval` in `.claude/review/config.yml` lists the same paths so the agent-review bot never approves these PRs. Add or remove a path in both files together, not here. It covers: - The review's own rules: CI, hooks, Claude config, the root CLAUDE.md and AGENTS.md, the gitleaks ignore list, and lint, test and TypeScript config -- Sign-in, page access, and the saved Apollo cache +- Sign-in, page access, and clearing one user's data before the next: the saved Apollo cache, the sign-out wipe and the service worker's cache rules - The code that puts the user's API token on outgoing calls - Build and deploy config where secrets are in reach: Next.js, Amplify and Yarn From 921e934c1a8aaabbff2309b758242db760489820 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:21:45 -0500 Subject: [PATCH 10/13] AIGS-25 Tighten human_approval comments and CLAUDE.md wording --- .claude/review/config.yml | 7 ++----- CLAUDE.md | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.claude/review/config.yml b/.claude/review/config.yml index 50fe48d64..a83e46525 100644 --- a/.claude/review/config.yml +++ b/.claude/review/config.yml @@ -471,9 +471,7 @@ engine: # locally, so no CI workflow reviews its PRs. reviews_run: local -# People-only approval. The bot never approves a PR that touches these paths. Only places -# where a person's approval adds something the bot and CI can't: the review's own rules, -# sign-in and page access, the user's API token, and config where secrets are in reach. +# People-only approval: the bot never approves a PR that touches these paths. # Keep this list in step with the owned paths in .github/CODEOWNERS. human_approval: paths: @@ -483,8 +481,7 @@ human_approval: - '.gitleaksignore' - 'CLAUDE.md' - 'AGENTS.md' - # All of .claude except agent-review's outcome logs (learnings/feedback/*.jsonl and - # learnings/feedback.jsonl), the same carve-out CODEOWNERS makes. A bare * here also + # All of .claude except the review's outcome logs, as in CODEOWNERS. A bare * also # matches subfolders, so each level names what it skips with !( ). - '.claude/!(review)' - '.claude/!(review)/**' diff --git a/CLAUDE.md b/CLAUDE.md index 249d038a3..45d0ce494 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -195,7 +195,7 @@ Critical environment setup: These are the places where a person's approval adds something the bot and CI can't. A mistake here could switch off a guardrail, show one person's data to someone else, or leak a token or secret, and none of that can be taken back. Work that touches these uses the stricter setup in `.claude/skills/implement/SKILL.md`, and a code owner must approve the PR. -`.github/CODEOWNERS` holds the exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the two lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label. `human_approval` in `.claude/review/config.yml` lists the same paths so the agent-review bot never approves these PRs. Add or remove a path in both files together, not here. It covers: +`.github/CODEOWNERS` holds the exact paths. A path is a one-way door when CODEOWNERS gives it an owner; the two lines with no owner at the end are carve-outs. pr-guard reads it to set the one-way-door label. `human_approval` in `.claude/review/config.yml` lists the same paths so the agent-review bot never approves these PRs. Add or remove a path in both files together, not here. The list covers: - The review's own rules: CI, hooks, Claude config, the root CLAUDE.md and AGENTS.md, the gitleaks ignore list, and lint, test and TypeScript config - Sign-in, page access, and clearing one user's data before the next: the saved Apollo cache, the sign-out wipe and the service worker's cache rules From 3260b6eb11970078a64d2771588c2f3ac99b5f62 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:22:24 -0500 Subject: [PATCH 11/13] chore(review): record finding outcomes --- .../feedback/address-2317-20261124T152224Z-c221fd.jsonl | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .claude/review/learnings/feedback/address-2317-20261124T152224Z-c221fd.jsonl diff --git a/.claude/review/learnings/feedback/address-2317-20261124T152224Z-c221fd.jsonl b/.claude/review/learnings/feedback/address-2317-20261124T152224Z-c221fd.jsonl new file mode 100644 index 000000000..62d1e3226 --- /dev/null +++ b/.claude/review/learnings/feedback/address-2317-20261124T152224Z-c221fd.jsonl @@ -0,0 +1,3 @@ +{"ts":"2026-11-24T15:22:24.538Z","reviewId":"address-2317","id":"f1","signature":"bac9473d922a","agent":"security","category":"security","severity":5,"file":".claude/review/config.yml","message":"The list now owns the saved Apollo cache (persistence/**, CacheRestoreGate/**) to stop one person's data reaching the next user, but the code that wipes that data on sign-out (src/lib/clearSessionData.ts) and the service worker rules that keep token-bearing and donor responses out of the browser cache (src/sw/**, src/lib/serviceWorker/**) are outside both lists, so the bot can approve a change that leaves the last user's data behind.","outcome":"accepted"} +{"ts":"2026-11-24T15:22:24.543Z","reviewId":"address-2317","id":"f12","signature":"e3d77c88c77e","agent":"standards","category":"docs-drift","severity":3,"file":"CLAUDE.md","message":"\"Add or remove a path in both files together, not here. It covers:\" now ends on \"here\", so \"It\" reads as CLAUDE.md instead of the CODEOWNERS list.","outcome":"accepted"} +{"ts":"2026-11-24T15:22:24.543Z","reviewId":"address-2317","id":"f14","signature":"647a8aab3645","agent":"code-review","category":"conventions","severity":2,"file":".claude/review/config.yml","message":"The new header comment runs 4 lines and the .claude carve-out comment runs 3, longer than the one-to-two-line comment rule.","outcome":"accepted"} From 4e0f4db4188c4e0037b43667dc2d7d964060d3d5 Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:29:26 -0500 Subject: [PATCH 12/13] AIGS-25 Gate the service worker precache config --- .claude/review/config.yml | 1 + .github/CODEOWNERS | 1 + 2 files changed, 2 insertions(+) diff --git a/.claude/review/config.yml b/.claude/review/config.yml index a83e46525..99d1a90d7 100644 --- a/.claude/review/config.yml +++ b/.claude/review/config.yml @@ -506,6 +506,7 @@ human_approval: - 'src/lib/clearSessionData.ts' - 'src/sw/**' - 'src/lib/serviceWorker/**' + - 'serwist.config.mjs' # Code that puts the user's API token on outgoing calls - 'src/lib/apollo/link.ts' - 'pages/api/graphql-rest.page.ts' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7c9b5436a..2403bc9b8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -25,6 +25,7 @@ /src/lib/clearSessionData.ts @jbirdjavi @jeff-clay @EJTison /src/sw/ @jbirdjavi @jeff-clay @EJTison /src/lib/serviceWorker/ @jbirdjavi @jeff-clay @EJTison +/serwist.config.mjs @jbirdjavi @jeff-clay @EJTison # Code that puts the user's API token on outgoing calls /src/lib/apollo/link.ts @jbirdjavi @jeff-clay @EJTison From 7ad7a5b0517c32aa3d5c6948099802efe697a82f Mon Sep 17 00:00:00 2001 From: wjames111 Date: Tue, 24 Nov 2026 10:30:07 -0500 Subject: [PATCH 13/13] chore(review): record finding outcomes --- .../feedback/address-2317-20261124T153006Z-c99920.jsonl | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .claude/review/learnings/feedback/address-2317-20261124T153006Z-c99920.jsonl diff --git a/.claude/review/learnings/feedback/address-2317-20261124T153006Z-c99920.jsonl b/.claude/review/learnings/feedback/address-2317-20261124T153006Z-c99920.jsonl new file mode 100644 index 000000000..f38906719 --- /dev/null +++ b/.claude/review/learnings/feedback/address-2317-20261124T153006Z-c99920.jsonl @@ -0,0 +1,2 @@ +{"ts":"2026-11-24T15:30:06.740Z","reviewId":"address-2317","id":"f1","signature":"160be2e542b2","agent":"code-review","category":"security","severity":6,"file":".claude/review/config.yml","message":"serwist.config.mjs, which controls what the service worker precaches (including the precachePrerendered: false guard on page HTML), is not in human_approval or CODEOWNERS. The service worker cache rules this pass sets out to gate can still change through a bot-approved PR.","outcome":"accepted"} +{"ts":"2026-11-24T15:30:06.774Z","reviewId":"address-2317","id":"f6","signature":"89d95c7ab9c4","agent":"code-review","category":"conventions","severity":3,"file":"CLAUDE.md","message":"The new CLAUDE.md bullet says the list covers the service worker's cache rules, but serwist.config.mjs is not listed, so the doc claims more than the gates enforce.","outcome":"accepted"}