Skip to content

Commit 889b4af

Browse files
authored
chore(ci): update socket-registry pins, pin deps, add sfw aliases (#129)
* chore: add agent protocol sections to CLAUDE.md * chore(ci): update socket-registry pins, pin deps, add sfw aliases
1 parent 76e589a commit 889b4af

4 files changed

Lines changed: 38 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ permissions:
2727
jobs:
2828
ci:
2929
name: Run CI Pipeline
30-
uses: SocketDev/socket-registry/.github/workflows/ci.yml@adb5697306eb2619b3255c2406e52e04cc99d555 # main
30+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@6096b06b1790f411714c89c40f72aade2eeaab7c # main
3131
with:
3232
test-setup-script: 'pnpm run build'
3333
lint-script: 'pnpm run lint --all'
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
timeout-minutes: 10
4848
steps:
49-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@24323cbd9e61a7e3a600b8c7e99eb27a29642a54 # main
49+
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@6096b06b1790f411714c89c40f72aade2eeaab7c # main
5050
with:
5151
node-version: '24'
5252

.github/workflows/provenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121

2222
jobs:
2323
publish:
24-
uses: SocketDev/socket-registry/.github/workflows/provenance.yml@b809e72d069356dfaf490134e9a20226dd9376c1 # main
24+
uses: SocketDev/socket-registry/.github/workflows/provenance.yml@6096b06b1790f411714c89c40f72aade2eeaab7c # main
2525
with:
2626
debug: ${{ inputs.debug }}
2727
package-name: '@socketsecurity/lib'

.github/workflows/weekly-update.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ jobs:
2424
outputs:
2525
has-updates: ${{ steps.check.outputs.has-updates }}
2626
steps:
27-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@24323cbd9e61a7e3a600b8c7e99eb27a29642a54 # main
27+
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@6096b06b1790f411714c89c40f72aade2eeaab7c # main
2828

2929
- name: Check for npm updates
3030
id: check
31+
shell: bash
3132
run: |
33+
alias pnpm="$SFW_BIN pnpm"
3234
echo "Checking for npm package updates..."
3335
HAS_UPDATES=false
3436
NPM_UPDATES=$(pnpm outdated 2>/dev/null || true)
@@ -47,10 +49,13 @@ jobs:
4749
contents: write
4850
pull-requests: write
4951
steps:
50-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@24323cbd9e61a7e3a600b8c7e99eb27a29642a54 # main
52+
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@6096b06b1790f411714c89c40f72aade2eeaab7c # main
5153

5254
- name: Install Claude Code
53-
run: npm install -g @anthropic-ai/claude-code
55+
shell: bash
56+
run: |
57+
alias pnpm="$SFW_BIN pnpm"
58+
pnpm add -g @anthropic-ai/claude-code@2.1.89
5459
5560
- name: Create update branch
5661
id: branch
@@ -67,10 +72,12 @@ jobs:
6772
- name: Run updating skill with Claude Code
6873
id: claude
6974
timeout-minutes: 30
75+
shell: bash
7076
env:
7177
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
7278
GITHUB_ACTIONS: 'true'
7379
run: |
80+
alias pnpm="$SFW_BIN pnpm"
7481
if [ -z "$ANTHROPIC_API_KEY" ]; then
7582
echo "ANTHROPIC_API_KEY not set - skipping automated update"
7683
echo "success=false" >> $GITHUB_OUTPUT

CLAUDE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
- Read files >500 LOC in chunks using offset/limit; never assume one read captured the whole file
3838
- Before every edit: re-read the file. After every edit: re-read to confirm the change applied correctly
3939
- When renaming anything, search separately for: direct calls, type references, string literals, dynamic imports, re-exports, test files — one grep is not enough
40+
- Tool results over 50K characters are silently truncated — if search returns suspiciously few results, narrow scope and re-run
41+
- For tasks touching >5 files: use sub-agents with worktree isolation to prevent context decay
4042

4143
## JUDGMENT PROTOCOL
4244

@@ -50,13 +52,36 @@
5052
- Try the simplest approach first; if architecture is actually flawed, flag it and wait for approval before restructuring
5153
- When asked to "make a plan," output only the plan — no code until given the go-ahead
5254

55+
## COMPLETION PROTOCOL
56+
57+
- **NEVER claim done with something 80% complete** — finish 100% before reporting
58+
- When a multi-step change doesn't immediately show gains, commit and keep iterating — don't revert
59+
- If one approach fails, fix forward: analyze why, adjust, rebuild, re-measure — not `git checkout`
60+
- After EVERY code change: build, test, verify, commit. This is a single atomic unit
61+
- Reverting is a last resort after exhausting forward fixes — and requires explicit user approval
62+
5363
## SELF-EVALUATION
5464

5565
- Before calling anything done: present two views — what a perfectionist would reject vs. what a pragmatist would ship
5666
- After fixing a bug: explain why it happened
5767
- 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
5868
- If asked to "step back" or "going in circles": drop everything, rethink from scratch
5969

70+
## SELF-IMPROVEMENT
71+
72+
- After ANY correction from the user: log the pattern to memory so the same mistake is never repeated
73+
- Convert mistakes into strict rules — don't just note them, enforce them
74+
- After fixing a bug: explain why it happened and whether anything prevents that category of bug in the future
75+
76+
## FILE SYSTEM AS STATE
77+
78+
The file system is working memory. Use it actively:
79+
80+
- Write intermediate results and analysis to files in `.claude/`
81+
- Use `.claude/` for plans, status tracking, and cross-session context
82+
- When debugging, save logs and outputs to files for reproducible verification
83+
- Don't hold large analysis in context — write it down, reference it later
84+
6085
## HOUSEKEEPING
6186

6287
- Before risky changes: offer to checkpoint — "want me to commit before this?"

0 commit comments

Comments
 (0)