Skip to content

Commit 2ece86f

Browse files
authored
Claude cleanup: rename sweep commands, gitignore superpowers docs (#1214)
Rename accuracy/performance sweep command and state files to the sweep-* prefix convention. Add docs/superpowers/ to gitignore and remove previously committed plans/specs so planning docs stay local.
1 parent 6316ef4 commit 2ece86f

22 files changed

+43
-10247
lines changed
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Store results in a temporary variable -- do NOT write intermediate files.
2525

2626
## Step 2 -- Load inspection state
2727

28-
Read the state file at `.claude/accuracy-sweep-state.json`.
28+
Read the state file at `.claude/sweep-accuracy-state.json`.
2929

3030
If it does not exist, treat every module as never-inspected.
3131

@@ -114,7 +114,12 @@ like this (adapt the module list to actual results):
114114
- Missing or wrong Earth curvature corrections
115115
- Backend inconsistencies (numpy vs cupy vs dask results differ)
116116
2. Run /rockout to fix the issue end-to-end (issue, worktree, fix, tests, docs)
117-
3. After completing rockout for ONE module, output <promise>ITERATION DONE</promise>
117+
3. Update .claude/sweep-accuracy-state.json in the worktree by adding or
118+
updating the entry for the module:
119+
{ \"module_name\": { \"last_inspected\": \"ISO-DATE\", \"issue\": ISSUE_NUMBER } }
120+
Then git add and commit it to the worktree branch so the state update
121+
lands in the PR.
122+
4. After completing rockout for ONE module, output <promise>ITERATION DONE</promise>
118123
119124
If you find no accuracy issues in the current target module, skip it and move
120125
to the next one.
@@ -129,24 +134,17 @@ Set `--max-iterations` to the number of target modules + 2 (buffer for retries).
129134

130135
```
131136
To run this sweep: copy the command above and paste it.
132-
To update state after a manual rockout: edit .claude/accuracy-sweep-state.json
133-
To reset all tracking: /accuracy-sweep --reset-state
137+
To update state after a manual rockout: edit .claude/sweep-accuracy-state.json
138+
To reset all tracking: /sweep-accuracy --reset-state
134139
```
135140

136-
## Step 6 -- Update state (ONLY when called from inside a ralph-loop)
141+
## Step 6 -- Update state
137142

138-
This step is informational. The accuracy-sweep command itself does NOT update
139-
the state file. State is updated when `/rockout` completes -- the rockout
140-
workflow should append to `.claude/accuracy-sweep-state.json` after creating
141-
the issue.
142-
143-
To enable this, print a note reminding the user that after each rockout
144-
iteration completes, they can manually record the inspection:
145-
146-
```json
147-
// Add to .claude/accuracy-sweep-state.json after each rockout:
148-
{ "module_name": { "last_inspected": "ISO-DATE", "issue": ISSUE_NUMBER } }
149-
```
143+
The sweep-accuracy command itself does NOT update the state file. State is
144+
updated by the ralph-loop prompt generated in Step 5b, which instructs the
145+
agent to write and commit `.claude/sweep-accuracy-state.json` in the
146+
worktree branch as part of each rockout iteration so the state update is
147+
included in the PR.
150148

151149
---
152150

.claude/commands/sweep-performance.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Parse $ARGUMENTS for these flags (multiple may combine):
2222
| `--only-focal` | Restrict to: focal, convolution, morphology, bilateral, edge_detection, glcm |
2323
| `--only-hydro` | Restrict to: flood, cost_distance, geodesic, surface_distance, viewshed, erosion, diffusion |
2424
| `--only-io` | Restrict to: geotiff, reproject, rasterize, polygonize |
25-
| `--reset-state` | Delete `.claude/performance-sweep-state.json` and treat all modules as never-inspected |
25+
| `--reset-state` | Delete `.claude/sweep-performance-state.json` and treat all modules as never-inspected |
2626
| `--skip-phase1` | Skip triage; reuse last state file; go straight to ralph-loop generation for unresolved HIGH items |
2727
| `--report-only` | Run Phase 1 triage but do not generate a ralph-loop command |
2828
| `--size small` | Phase 2 benchmarks use 128x128 arrays |
@@ -64,7 +64,7 @@ For every module in scope, collect:
6464

6565
### Load inspection state
6666

67-
Read `.claude/performance-sweep-state.json`. If it does not exist, treat every
67+
Read `.claude/sweep-performance-state.json`. If it does not exist, treat every
6868
module as never-inspected. If `--reset-state` was set, delete the file first.
6969

7070
State file schema:
@@ -344,7 +344,7 @@ rockout has full context.
344344

345345
## Step 5 -- Update state file
346346

347-
Write `.claude/performance-sweep-state.json` with the triage results:
347+
Write `.claude/sweep-performance-state.json` with the triage results:
348348

349349
```json
350350
{
@@ -448,7 +448,9 @@ from the actual triage results):
448448
| dask+numpy | peak_rss_mb | 892 | 34 | 0.04x | IMPROVED |
449449
Thresholds: IMPROVED < 0.8x, REGRESSION > 1.2x, else UNCHANGED.
450450
451-
6. Update .claude/performance-sweep-state.json with the issue number.
451+
6. Update .claude/sweep-performance-state.json with the issue number, then
452+
`git add` and commit it to the worktree branch so the state update is
453+
included in the PR.
452454
453455
7. Output <promise>ITERATION DONE</promise>
454456
@@ -489,8 +491,8 @@ Other options:
489491
on a known-numpy array), do not flag it.
490492
- The 30TB simulation constructs the dask task graph only; it NEVER calls
491493
`.compute()`.
492-
- State file (`.claude/performance-sweep-state.json`) is gitignored by
493-
convention — do not add it to git.
494+
- State file (`.claude/sweep-performance-state.json`) is tracked in git.
495+
Subagents must `git add` and commit it so the state update lands in the PR.
494496
- If $ARGUMENTS is empty, use defaults: audit all modules, benchmark at
495497
512x512, generate ralph-loop for HIGH items.
496498
- For subpackage modules (geotiff, reproject), the subagent should read ALL

.claude/commands/sweep-security.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Store results in memory -- do NOT write intermediate files.
3939

4040
## Step 2 -- Load inspection state
4141

42-
Read `.claude/security-sweep-state.json`.
42+
Read `.claude/sweep-security-state.json`.
4343

4444
If it does not exist, treat every module as never-inspected.
4545

@@ -194,13 +194,16 @@ Also read xrspatial/utils.py to understand _validate_raster() behavior.
194194
For MEDIUM/LOW issues, document them but do not fix.
195195
196196
5. After finishing (whether you found issues or not), update the inspection
197-
state file .claude/security-sweep-state.json by reading its current
197+
state file .claude/sweep-security-state.json by reading its current
198198
contents and adding/updating the entry for "{module}" with:
199199
- "last_inspected": today's ISO date
200200
- "issue": the issue number from rockout (or null if clean / MEDIUM-only)
201201
- "severity_max": highest severity found (or null if clean)
202202
- "categories_found": list of category numbers that had findings (e.g. [1, 2])
203203
204+
Then `git add .claude/sweep-security-state.json` and commit it to the
205+
worktree branch so the state update is included in the PR.
206+
204207
Important:
205208
- Only flag real, exploitable issues. False positives waste time.
206209
- Read the tests for this module to understand expected behavior.
@@ -229,7 +232,7 @@ State is updated by the subagents themselves (see agent prompt step 5).
229232
After completion, verify state with:
230233

231234
```
232-
cat .claude/security-sweep-state.json
235+
cat .claude/sweep-security-state.json
233236
```
234237

235238
To reset all tracking: `/sweep-security --reset-state`
@@ -241,8 +244,8 @@ To reset all tracking: `/sweep-security --reset-state`
241244
- Do NOT modify any source files directly. Subagents handle fixes via /rockout.
242245
- Keep the output concise -- the table and agent dispatch are the deliverables.
243246
- If $ARGUMENTS is empty, use defaults: top 3, no category filter, no exclusions.
244-
- State file (`.claude/security-sweep-state.json`) is gitignored by convention --
245-
do not add it to git.
247+
- State file (`.claude/sweep-security-state.json`) is tracked in git.
248+
Subagents must `git add` and commit it so the state update lands in the PR.
246249
- For subpackage modules (geotiff, reproject, hydro), the subagent should read
247250
ALL `.py` files in the subpackage directory, not just `__init__.py`.
248251
- Only flag patterns that are ACTUALLY present in the code. Do not report

0 commit comments

Comments
 (0)