Commit f6c80ac
authored
fix(skill): ban untracked deferrals in /review skill (#568)
* feat: add maintenance skills — deps-audit, bench-check, test-health, housekeep
Four recurring maintenance routines as Claude Code skills:
- /deps-audit: vulnerability scanning, staleness, unused deps, license checks
- /bench-check: benchmark regression detection against saved baselines
- /test-health: flaky test detection, dead tests, coverage gap analysis
- /housekeep: clean worktrees, dirt files, sync main, prune branches
* fix(bench-check): capture stderr, guard division-by-zero, commit baseline
- Replace 2>/dev/null with output=$(... 2>&1) + exit_code check on all
four benchmark invocations so error messages are captured and recorded
- Add division-by-zero guard in Phase 3: when baseline == 0, mark delta
as "N/A — baseline was zero" (informational only, not a regression)
- Add git add + git commit step in Phase 5 so the baseline file is
actually committed after each save, matching the documented rule
* fix(deps-audit): run npm ci after revert, document tokenizer skip reason
- After reverting package.json + package-lock.json on --fix test failure,
also run `npm ci` to resync node_modules/ with the restored lock file;
without this the manifest is reverted but installed packages are not
- Add explanatory comment on @anthropic-ai/tokenizer skip-list entry
clarifying it is a peer dependency of @anthropic-ai/sdk and may be
required at runtime without an explicit import in our code
* fix(housekeep): guard Phase 5 in source repo, fix stale-worktree criterion
- Phase 5 (Update Codegraph): add source-repo guard that skips the
self-update logic when running inside the codegraph source repo;
comparing the dev version to the published release and running
npm install is a no-op since codegraph is not one of its own deps
- Phase 1b stale-worktree criterion: replace "created more than 7 days
ago" (not determinable via git worktree list) with "last commit on the
branch is more than 7 days old AND branch has no commits ahead of
origin/main", using `git log -1 --format=%ci <branch>`
* fix: address Round 3 Greptile review feedback
* fix: move deps-audit stash to Phase 0, before npm commands modify manifests
* fix: capture flaky-detection loop output to per-run files for comparison
* fix: always require confirmation for stale worktree removal
* fix: use parsed threshold in baseline.json, guard --compare-only on first run
* fix(deps-audit): track stash creation to avoid operating on wrong entry
When Phase 0 stash push is a no-op (manifests unchanged), Phase 7
was calling stash drop/pop on the wrong entry. Track STASH_CREATED
exit code and branch on it: use git checkout when no stash exists.
* fix(test-health): use mktemp for flaky-run directory to avoid concurrent corruption
Replace hardcoded /tmp/test-health-runs/ with mktemp -d so parallel
sessions get isolated directories. Add cleanup at end of analysis.
* fix(bench-check): add save-baseline verdict path, fix em-dash, use explicit commit paths
Add 4th verdict path for --save-baseline when baseline already exists.
Replace corrupted em-dash character in N/A string. Change commit command
to use explicit file paths per project convention.
* docs(roadmap): update Phase 5 TypeScript migration with accurate progress
Phase 5 was listed as "2 of 7 complete" with outdated pre-Phase 3 file
paths. Updated to reflect actual state: 32 of 269 source modules migrated
(~12%). Steps 5.3-5.5 now list exact migrated/remaining files with verified
counts (5.3=8, 5.4=54, 5.5=175, total=237 JS-only files). Added note about
14 stale .js counterparts of already-migrated .ts files needing deletion.
* fix: deps-audit success path should keep npm changes, not revert (#565)
When STASH_CREATED=1 and tests pass, the npm audit fix changes are
good — no action needed. Previously it ran git checkout to discard
them, which undid the successful fix.
* fix: bench-check use git add + diff --cached to detect new files (#565)
git diff --quiet ignores untracked files, so on the first run when
baseline.json and history.ndjson are newly created, the commit was
skipped. Stage first with git add, then check with --cached.
* fix: housekeep require confirmation before branch deletion (#565)
Branch deletion now asks for user confirmation before each delete,
consistent with worktree removal in Phase 1c.
* fix: scope git diff --cached to bench-check files only (#565)
* fix: use json-summary reporter to match coverage-summary.json output (#565)
* fix: capture stash ref by name to avoid position-based targeting (#565)
* fix: remove unreachable Phase 5 subphases since source-repo guard always skips (#565)
* fix: use dynamic threshold variable in bench-check Phase 6 report template (#565)
* fix: address open review items in maintenance skills (#565)
- bench-check: add timeout 300 wrappers to all 4 benchmark invocations
with exit code 124 check for timeout detection
- bench-check: add explicit COMPARE_ONLY guard at Phase 5 entry
- housekeep: fix grep portability — use grep -cE instead of GNU \| syntax
- test-health: add timeout 180 wrapper in flaky detection loop
- test-health: fix find command -o precedence with grouping parentheses
* fix: add COVERAGE_ONLY guards to Phase 2 and Phase 4 in test-health
* fix: add regression skip guard to bench-check Phase 5, expand deps-audit search dirs
* fix: add empty-string guard for stat size check in housekeep (#565)
When both stat variants (GNU and BSD) fail, $size is empty and the
arithmetic comparison errors out. Add a [ -z "$size" ] && continue
guard so the loop skips files whose size cannot be determined.
* fix: add BASELINE SAVED verdict path and clarify if/else-if in bench-check (#565)
Phase 6: when SAVE_ONLY or first-run (no prior baseline), write a
shortened report with "Verdict: BASELINE SAVED" instead of the full
comparison report.
Phases 1a-1d: replace ambiguous "If timeout / If non-zero" with
explicit "If timeout / Else if non-zero" so the two conditions are
clearly mutually exclusive.
* docs(roadmap): mark Phase 4 complete, update Phase 5 progress (5 of 7)
Phase 4 (Resolution Accuracy) had all 6 sub-phases merged but status
still said "In Progress". Phase 5 (TypeScript Migration) had 5.3-5.5
merged via PRs #553, #554, #555, #566 but was listed with stale counts.
Updated both to reflect actual state: Phase 4 complete, Phase 5 at 5/7
with 76 of 283 modules migrated (~27%).
* docs(roadmap): correct Phase 5 progress — 5.3/5.4/5.5 still in progress
Previous commit incorrectly marked 5.3-5.5 as complete. In reality
76 of 283 src files are .ts (~27%) while 207 remain .js (~73%).
PRs #553, #554, #555, #566 migrated a first wave but left substantial
work in each step: 4 leaf files, 39 core files, 159 orchestration
files. Updated each step with accurate migrated/remaining counts.
* fix(skill): ban untracked deferrals in /review skill
The /review skill allowed replying "acknowledged as follow-up" to
reviewer comments without tracking them anywhere. These deferrals
get lost — nobody revisits PR comment threads after merge.
Now: if a fix is genuinely out of scope, the skill must create a
GitHub issue with the follow-up label before replying. The reply
must include the issue link. A matching rule in the Rules section
reinforces the ban.
* fix(skill): add --repo flag, multi-endpoint reply for deferrals, and scope guidance (#568)
* fix(skill): guard follow-up label creation before gh issue create (#568)
gh issue create --label "follow-up" fails if the label doesn't exist
in the repo. Add a gh label create guard step that is safe to re-run.
* feat(skill): parallelize /review with one subagent per PR
* fix: correct heredoc terminator indentation in review skill (#568)
* fix(skill): capture gh issue create output before referencing issue number
gh issue create prints the new issue URL to stdout — capture it and
extract the number so reply templates can reference it unambiguously.
* fix(skill): surface follow-up issues in review result format and summary table
Add "Issues Created" field to the subagent result format and an "Issues" column
to the Step 3 summary table, so deferred out-of-scope items are visible in the
final report.
* fix(skill): require verbatim rule propagation to subagents
* fix(skill): align Issues field name between 2i result and Step 3 table (#568)1 parent 4596719 commit f6c80ac
1 file changed
Lines changed: 65 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
43 | | - | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
123 | | - | |
| 132 | + | |
124 | 133 | | |
125 | 134 | | |
126 | | - | |
127 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
128 | 141 | | |
129 | | - | |
130 | | - | |
| 142 | + | |
| 143 | + | |
131 | 144 | | |
132 | | - | |
| 145 | + | |
133 | 146 | | |
134 | | - | |
135 | | - | |
| 147 | + | |
| 148 | + | |
136 | 149 | | |
137 | | - | |
| 150 | + | |
| 151 | + | |
138 | 152 | | |
139 | 153 | | |
140 | | - | |
| 154 | + | |
141 | 155 | | |
| 156 | + | |
142 | 157 | | |
143 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
144 | 162 | | |
145 | 163 | | |
146 | 164 | | |
| |||
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
186 | | - | |
| 204 | + | |
187 | 205 | | |
188 | 206 | | |
189 | 207 | | |
| |||
211 | 229 | | |
212 | 230 | | |
213 | 231 | | |
214 | | - | |
| 232 | + | |
215 | 233 | | |
216 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
217 | 251 | | |
218 | 252 | | |
219 | | - | |
| 253 | + | |
220 | 254 | | |
221 | | - | |
| 255 | + | |
222 | 256 | | |
223 | 257 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
227 | 261 | | |
228 | 262 | | |
| 263 | + | |
| 264 | + | |
229 | 265 | | |
230 | 266 | | |
231 | 267 | | |
| |||
234 | 270 | | |
235 | 271 | | |
236 | 272 | | |
237 | | - | |
| 273 | + | |
238 | 274 | | |
239 | 275 | | |
240 | 276 | | |
| |||
0 commit comments