diff --git a/.claude/skills/titan-close/SKILL.md b/.claude/skills/titan-close/SKILL.md index 4fa1eff7..a8b70181 100644 --- a/.claude/skills/titan-close/SKILL.md +++ b/.claude/skills/titan-close/SKILL.md @@ -65,6 +65,7 @@ Your goal: analyze all commits on the current branch, split them into focused PR - `.codegraph/titan/issues.ndjson` — issue tracker from all phases - `.codegraph/titan/arch-snapshot.json` — pre-forge architectural snapshot (communities, structure, drift). Use for before/after comparison in the Metrics section. May not exist if capture failed. - `.codegraph/titan/drift-report.json` — cumulative drift reports from all phases. May not exist if no drift was detected. + - `.codegraph/titan/grind-targets.ndjson` — grind phase adoption targets and outcomes. Each line: `{target, file, phase, classification, reason, consumers, pattern, timestamp}`. May not exist if grind wasn't run. If `titan-state.json` is missing after the search, stop: "No Titan session found. Run `/titan-recon` first." @@ -146,6 +147,9 @@ Use `sync.json` execution phases as the primary guide if available: - Group by domain: `fix: address quality issues in ` 6. **Warning improvements** — commits addressing warn-level issues - Group by domain: `refactor: improve code quality in ` +7. **Helper adoption** — commits from grind phase adopting dead helpers into callsites + - PR title: `refactor: adopt dead helpers in ` + - Look for `grind(...)` commit prefixes or commits touching files listed in `grind-targets.ndjson` ### Fallback grouping (if no sync.json) @@ -164,7 +168,7 @@ Record the grouping plan: { "pr": 1, "title": "...", - "concern": "dead_code|abstraction|cycle_break|decomposition|quality_fix|warning", + "concern": "dead_code|abstraction|cycle_break|decomposition|quality_fix|warning|adoption", "domain": "", "commits": ["", ""], "files": ["", ""], @@ -202,6 +206,17 @@ codegraph complexity --health --sort mi -T --json --limit 10 If `.codegraph/titan/arch-snapshot.json` was captured before forge, compare its `structure` data against current `codegraph structure --depth 2 --json` output. Report cohesion changes per directory (improved / degraded / unchanged). Include in the "Metrics: Before & After" section of the report. +### Grind metrics (if grind-targets.ndjson exists) + +If `.codegraph/titan/grind-targets.ndjson` exists, parse it and cross-reference with `titan-state.json → grind`: +- **Targets processed:** count entries in `grind.processedTargets` (from titan-state.json) +- **Targets failed:** count entries in `grind.failedTargets` (from titan-state.json) +- **False positives identified:** count entries with `classification: "false-positive"` in grind-targets.ndjson (or from `grind.falsePositives` in titan-state.json) +- **Adopted:** count entries with `classification: "adopt"` in grind-targets.ndjson +- **Dead symbol delta:** from `grind.deadSymbolDelta` in titan-state.json (or compute from baseline vs final dead symbol counts) + +Include these in the Metrics: Before & After section and the Grind Results report section. + ### Compute deltas Compare final metrics against `titan-state.json` baseline: @@ -342,7 +357,8 @@ Read `titan-state.json → phaseTimestamps` for real wall-clock data. If `phaseT | GAUNTLET | | | | SYNC | | — | | FORGE | | , first at