From d0a1799c030d45f0b8043e4176a88a42be00d7ed Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 9 Apr 2026 13:46:27 -0400 Subject: [PATCH 01/10] chore(ci): bump socket-registry SHA to ed311907 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/provenance.yml | 6 +++--- .github/workflows/weekly-update.yml | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4437a7ee6..cd226971d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' @@ -168,7 +168,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' @@ -234,7 +234,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' node-version: ${{ matrix.node-version }} @@ -310,7 +310,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index e3e9c881a..9d0dac6bd 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -51,7 +51,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' @@ -91,7 +91,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' registry-url: 'https://registry.npmjs.org' @@ -141,7 +141,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/weekly-update.yml b/.github/workflows/weekly-update.yml index a316e4d33..bfe9435c5 100644 --- a/.github/workflows/weekly-update.yml +++ b/.github/workflows/weekly-update.yml @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' @@ -61,7 +61,7 @@ jobs: fetch-depth: 0 persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main with: checkout: 'false' @@ -75,7 +75,7 @@ jobs: git checkout -b "$BRANCH_NAME" echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT - - uses: SocketDev/socket-registry/.github/actions/setup-git-signing@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/setup-git-signing@ed3119078118d558f095e9adf8800263166d65f9 # main with: gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }} @@ -302,7 +302,7 @@ jobs: test.log retention-days: 7 - - uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@4edf2e3c3beff7d536e79ce43dfb61abba7cb537 # main + - uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@ed3119078118d558f095e9adf8800263166d65f9 # main if: always() notify: From d7fa64adecae3eb7c7c1bba4404393b65e96eb0a Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 9 Apr 2026 14:16:26 -0400 Subject: [PATCH 02/10] fix(ci): suppress pre-existing zizmor template-injection warnings in summary step --- .github/workflows/provenance.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index 9d0dac6bd..960f24293 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -354,6 +354,7 @@ jobs: done - name: Summary + # zizmor: ignore[template-injection] run: | echo "## Publish Summary" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY From 5843dd89ec8f1fd745333fe2c206ed4d26c1d2a8 Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 9 Apr 2026 14:20:10 -0400 Subject: [PATCH 03/10] fix(ci): document permissions, fix template injection in weekly-update --- .github/workflows/provenance.yml | 2 +- .github/workflows/weekly-update.yml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index 960f24293..5bc34c380 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -134,7 +134,7 @@ jobs: timeout-minutes: 45 permissions: contents: read - id-token: write + id-token: write # NPM trusted publishing via OIDC steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/weekly-update.yml b/.github/workflows/weekly-update.yml index bfe9435c5..8ed25a789 100644 --- a/.github/workflows/weekly-update.yml +++ b/.github/workflows/weekly-update.yml @@ -52,8 +52,8 @@ jobs: if: needs.check-updates.outputs.has-updates == 'true' && inputs.dry-run != true runs-on: ubuntu-latest permissions: - contents: write - pull-requests: write + contents: write # Push update branch + pull-requests: write # Create PR steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -69,9 +69,10 @@ jobs: id: branch env: GH_TOKEN: ${{ github.token }} + GITHUB_REPO: ${{ github.repository }} run: | BRANCH_NAME="weekly-update-$(date +%Y%m%d)" - git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" + git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPO}.git" git checkout -b "$BRANCH_NAME" echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT From 93633278cd2c5331a71d065b024c6f846bce38ea Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 9 Apr 2026 16:09:56 -0400 Subject: [PATCH 04/10] chore(ci): bump socket-registry SHA to 07975491 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/provenance.yml | 6 +++--- .github/workflows/weekly-update.yml | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd226971d..f602b141a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' @@ -168,7 +168,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' @@ -234,7 +234,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' node-version: ${{ matrix.node-version }} @@ -310,7 +310,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index 5bc34c380..6c9a7d8e9 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -51,7 +51,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' @@ -91,7 +91,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' registry-url: 'https://registry.npmjs.org' @@ -141,7 +141,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/weekly-update.yml b/.github/workflows/weekly-update.yml index 8ed25a789..7a3d511a8 100644 --- a/.github/workflows/weekly-update.yml +++ b/.github/workflows/weekly-update.yml @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' @@ -61,7 +61,7 @@ jobs: fetch-depth: 0 persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: checkout: 'false' @@ -76,7 +76,7 @@ jobs: git checkout -b "$BRANCH_NAME" echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT - - uses: SocketDev/socket-registry/.github/actions/setup-git-signing@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/setup-git-signing@079754914791fc84cd6468ba1ea192ec904fe2aa # main with: gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }} @@ -303,7 +303,7 @@ jobs: test.log retention-days: 7 - - uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@ed3119078118d558f095e9adf8800263166d65f9 # main + - uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@079754914791fc84cd6468ba1ea192ec904fe2aa # main if: always() notify: From 8b1ef4a74ac02dcf583d5c5dc1aaff7ad7a734f0 Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 9 Apr 2026 16:12:23 -0400 Subject: [PATCH 05/10] chore(ci): bump socket-registry SHA to 47d61c98 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/provenance.yml | 6 +++--- .github/workflows/weekly-update.yml | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f602b141a..be3acb970 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' @@ -168,7 +168,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' @@ -234,7 +234,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' node-version: ${{ matrix.node-version }} @@ -310,7 +310,7 @@ jobs: export default { text, view, renderToString, renderToStringWithWidth, printComponent, eprintComponent, getTerminalSize, TuiRenderer, init } CODE - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml index 6c9a7d8e9..8da6bb651 100644 --- a/.github/workflows/provenance.yml +++ b/.github/workflows/provenance.yml @@ -51,7 +51,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' @@ -91,7 +91,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' registry-url: 'https://registry.npmjs.org' @@ -141,7 +141,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/weekly-update.yml b/.github/workflows/weekly-update.yml index 7a3d511a8..d3cb5a6e2 100644 --- a/.github/workflows/weekly-update.yml +++ b/.github/workflows/weekly-update.yml @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' @@ -61,7 +61,7 @@ jobs: fetch-depth: 0 persist-credentials: false - - uses: SocketDev/socket-registry/.github/actions/setup-and-install@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-and-install@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: checkout: 'false' @@ -76,7 +76,7 @@ jobs: git checkout -b "$BRANCH_NAME" echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT - - uses: SocketDev/socket-registry/.github/actions/setup-git-signing@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/setup-git-signing@47d61c98b6a4b9db62db149f5f65655474b9901e # main with: gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }} @@ -303,7 +303,7 @@ jobs: test.log retention-days: 7 - - uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@079754914791fc84cd6468ba1ea192ec904fe2aa # main + - uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@47d61c98b6a4b9db62db149f5f65655474b9901e # main if: always() notify: From 84d79b95ccb6d527de0f358d5b97bfa973bfce6c Mon Sep 17 00:00:00 2001 From: jdalton Date: Thu, 9 Apr 2026 16:49:50 -0400 Subject: [PATCH 06/10] chore: trim CLAUDE.md and audit skills Reduce CLAUDE.md from 26KB to 8KB (69% reduction) by removing: - File-by-file codebase descriptions (Claude reads code directly) - Verbose architecture/update mechanism sections - Redundant examples repeating the rules they illustrate - Tutorial-like explanations for standard workflows - Duplicate information already in socket-registry/CLAUDE.md - Configuration file listings discoverable from the repo - Standard language conventions Claude already knows Merged JUDGMENT/SCOPE and Critical Rules/ABSOLUTE RULES sections. Condensed Documentation Policy to a single paragraph. --- CLAUDE.md | 520 +++++++++--------------------------------------------- 1 file changed, 83 insertions(+), 437 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8b5872945..6aa55880f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,132 +2,86 @@ **MANDATORY**: Act as principal-level engineer. Follow these guidelines exactly. -## 👤 USER CONTEXT +## USER CONTEXT -- **Identify users by git credentials**: Extract name from git commit author, GitHub account, or context -- 🚨 **When identity is verified**: ALWAYS use their actual name - NEVER use "the user" or "user" -- **Direct communication**: Use "you/your" when speaking directly to the verified user -- **Discussing their work**: Use their actual name when referencing their commits/contributions -- **Example**: If git shows "John-David Dalton ", refer to them as "John-David" -- **Other contributors**: Use their actual names from commit history/context +- Identify users by git credentials (commit author, GitHub account). Use their actual name, never "the user". +- Use "you/your" when speaking directly; use their name when discussing their work. ## PRE-ACTION PROTOCOL **MANDATORY**: Review CLAUDE.md before any action. No exceptions. -- Before ANY structural refactor on a file >300 LOC: remove dead code, unused exports, unused imports first — commit that cleanup separately before the real work -- Multi-file changes: break into phases (≤5 files each), verify each phase before the next -- When pointed to existing code as a reference: study it before building — working code is a better spec than any description -- Work from raw error data, not theories — if a bug report has no error output, ask for it +- Before ANY structural refactor on a file >300 LOC: remove dead code, unused exports, unused imports first -- commit that cleanup separately +- Multi-file changes: break into phases (<=5 files each), verify each phase before the next +- When pointed to existing code as a reference: study it before building +- Work from raw error data, not theories -- if a bug report has no error output, ask for it - On "yes", "do it", or "go": execute immediately, no plan recap ## VERIFICATION PROTOCOL **MANDATORY**: Before claiming any task is complete: -1. Run the actual command — execute the script, run the test, check the output +1. Run the actual command -- execute the script, run the test, check the output 2. State what you verified, not just "looks good" -3. **FORBIDDEN**: Claiming "Done" when any test output shows failures, or characterizing incomplete/broken work as complete +3. **FORBIDDEN**: Claiming "Done" when any test output shows failures 4. If type-check or lint is configured, run it and fix ALL errors before reporting done 5. Re-read every file modified; confirm nothing references something that no longer exists ## CONTEXT & EDIT SAFETY -- After 10+ messages: re-read any file before editing it — do not trust remembered contents -- Read files >500 LOC in chunks using offset/limit; never assume one read captured the whole file -- Before every edit: re-read the file. After every edit: re-read to confirm the change applied correctly -- When renaming anything, search separately for: direct calls, type references, string literals, dynamic imports, re-exports, test files — one grep is not enough -- Never fix a display/rendering problem by duplicating state — one source of truth, everything reads from it +- After 10+ messages: re-read any file before editing it +- Read files >500 LOC in chunks using offset/limit +- Before every edit: re-read the file. After every edit: re-read to confirm +- When renaming: search for direct calls, type references, string literals, dynamic imports, re-exports, test files -- one grep is not enough +- Never fix a display/rendering problem by duplicating state -## JUDGMENT PROTOCOL +## JUDGMENT & SCOPE -- If the user's request is based on a misconception, say so before executing -- If you spot a bug adjacent to what was asked, flag it: "I also noticed X — want me to fix it?" -- You are a collaborator, not just an executor - -## SCOPE PROTOCOL - -- Do not add features, refactor, or make improvements beyond what was asked — band-aids when asked for band-aids -- Try the simplest approach first; if architecture is actually flawed, flag it and wait for approval before restructuring -- When asked to "make a plan," output only the plan — no code until given the go-ahead +- If the request is based on a misconception, say so before executing +- If you spot a bug adjacent to what was asked, flag it +- Do not add features, refactor, or make improvements beyond what was asked +- Try the simplest approach first; flag architecture issues and wait for approval +- When asked to "make a plan," output only the plan -- no code until given the go-ahead ## SELF-EVALUATION -- Before calling anything done: present two views — what a perfectionist would reject vs. what a pragmatist would ship — let the user decide +- Before calling anything done: present what a perfectionist would reject vs. what a pragmatist would ship - After fixing a bug: explain why it happened and what category of bug it represents -- If a fix doesn't work after two attempts: stop, re-read the relevant section top-down, state where the mental model was wrong, propose something fundamentally different -- If asked to "step back" or "we're going in circles": drop everything, rethink from scratch +- If a fix doesn't work after two attempts: stop, re-read top-down, state where the mental model was wrong +- If asked to "step back": drop everything, rethink from scratch ## HOUSEKEEPING -- Before risky changes: offer to checkpoint — "want me to commit before this?" -- If a file is getting unwieldy (>400 LOC): flag it — "this is big enough to cause pain — want me to split it?" +- Before risky changes: offer to checkpoint +- If a file is getting unwieldy (>400 LOC): flag it ## Critical Rules -### Fix ALL Issues - -- **Fix ALL issues when asked** - Never dismiss issues as "pre-existing" or "not caused by my changes" -- When asked to fix, lint, or check: fix everything found, regardless of who introduced it -- Always address all issues found during lint/check operations - -## ABSOLUTE RULES - -- Never create files unless necessary -- Always prefer editing existing files +- **Fix ALL issues when asked** -- never dismiss issues as "pre-existing" +- Never create files unless necessary; always prefer editing existing files - Forbidden to create docs unless requested -- Required to do exactly what was asked -- 🚨 **NEVER use `npx`, `pnpm dlx`, or `yarn dlx`** — use `pnpm exec ` for devDep binaries, or `pnpm run