|
1 | | -Run the quality-scan skill and fix all issues found. Repeat until zero issues remain or 5 iterations complete. |
| 1 | +Run the `/quality-scan` skill and fix all issues found. Repeat until zero issues remain or 5 iterations complete. |
| 2 | + |
| 3 | +**Interactive only** — this command makes code changes and commits. Do not use as an automated pipeline gate. |
2 | 4 |
|
3 | 5 | ## Process |
4 | 6 |
|
5 | | -1. Run quality-scan skill |
6 | | -2. If issues found: fix ALL of them |
7 | | -3. Run quality-scan again |
8 | | -4. Repeat until: |
| 7 | +1. Run `/quality-scan` skill (all scan types) |
| 8 | +2. If issues found: spawn the `refactor-cleaner` agent (see `agents/refactor-cleaner.md`) to fix them, grouped by category |
| 9 | +3. Run verify-build (see `_shared/verify-build.md`) after fixes |
| 10 | +4. Run `/quality-scan` again |
| 11 | +5. Repeat until: |
9 | 12 | - Zero issues found (success), OR |
10 | 13 | - 5 iterations completed (stop) |
11 | | -5. Commit all fixes with message: "fix: resolve quality scan issues (iteration N)" |
| 14 | +6. Commit all fixes: `fix: resolve quality scan issues (iteration N)` |
12 | 15 |
|
13 | 16 | ## Rules |
14 | 17 |
|
15 | | -- Fix every issue, not just "easy" ones |
16 | | -- Do not skip architectural fixes |
| 18 | +- Fix every issue, not just easy ones |
| 19 | +- Spawn refactor-cleaner with CLAUDE.md's pre-action protocol: dead code first, then structural changes, ≤5 files per phase |
17 | 20 | - Run tests after fixes to verify nothing broke |
18 | 21 | - Track iteration count and report progress |
19 | | - |
20 | | -## Outstanding Architectural Issue (Requires Design Review) |
21 | | - |
22 | | -### Checkpoint Cache Invalidation (High Severity) |
23 | | - |
24 | | -**Issue**: Source package changes don't invalidate checkpoints properly. |
25 | | - |
26 | | -**Root Cause**: Cache keys are computed AFTER `prepareExternalSources()` syncs source packages to additions/. Since cache keys hash files in additions/ (which are now synced), they match the checkpoint even though source packages changed. |
27 | | - |
28 | | -**Scenario**: |
29 | | -1. Developer modifies `packages/binject/src/socketsecurity/binject/file.c` |
30 | | -2. Runs `pnpm --filter node-smol-builder clean && pnpm build` |
31 | | -3. `prepareExternalSources()` syncs binject → additions/source-patched/src/socketsecurity/binject/ |
32 | | -4. Cache key computed from additions/ files matches old checkpoint |
33 | | -5. Build restores stale checkpoint, skips recompilation |
34 | | -6. **Result**: Binary contains old binject code |
35 | | - |
36 | | -**Impact**: Silent build incorrectness when modifying source packages |
37 | | - |
38 | | -**Proposed Solutions** (require architectural review): |
39 | | -- Option 1: Include source package mtimes in cache key metadata |
40 | | -- Option 2: Make `prepareExternalSources()` idempotent, always re-sync |
41 | | - |
42 | | -**Files Affected**: |
43 | | -- packages/node-smol-builder/scripts/common/shared/build.mjs (collectBuildSourceFiles) |
44 | | -- packages/node-smol-builder/scripts/common/shared/checkpoints.mjs (cache key generation) |
45 | | - |
46 | | -**Status**: Documented for architectural review and future implementation |
0 commit comments