Skip to content

Commit 71ba2de

Browse files
committed
fix: correct drift-report.json handling in Titan skills
- Fix self-referential "skip to Step 1" loop in titan-gauntlet drift detection (should be Step 2) - Change drift-report.json from single-object overwrite to JSON array append in gauntlet and sync skills, so titan-close can read cumulative pipeline history
1 parent ca8f1b3 commit 71ba2de

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.claude/skills/titan-close/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ CLOSE is the last phase — it must assess the full pipeline's freshness before
8888
git diff --name-only <mainSHA>..origin/main
8989
```
9090

91-
3. **Read all prior drift reports** from `.codegraph/titan/drift-report.json`. This shows the cumulative drift across the pipeline.
91+
3. **Read all prior drift reports** from `.codegraph/titan/drift-report.json` (a JSON array of entries, one per phase that detected drift). This shows the cumulative drift across the pipeline.
9292

9393
4. **Assess overall pipeline freshness:**
9494

.claude/skills/titan-gauntlet/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The codebase may have changed significantly since RECON ran. Detect this before
7575
```bash
7676
git rev-parse origin/main
7777
```
78-
Compare against `titan-state.json → mainSHA`. If identical, skip to Step 1.
78+
Compare against `titan-state.json → mainSHA`. If identical, skip to Step 2.
7979

8080
2. **If main has advanced**, find what changed:
8181
```bash
@@ -104,7 +104,7 @@ The codebase may have changed significantly since RECON ran. Detect this before
104104
| **high** | >20% of batches affected OR core symbols changed | **Warn user:** "Significant changes on main since RECON. Recommend re-running affected batches or `/titan-recon`." |
105105
| **critical** | New files in src/, deleted files that were in batches, or >50% of priority queue affected | **Stop and recommend:** "Main has diverged significantly. Run `/titan-recon` to rebuild the baseline." |
106106

107-
6. **Write drift report** to `.codegraph/titan/drift-report.json`:
107+
6. **Append drift report** to `.codegraph/titan/drift-report.json` (the file is a JSON array — read existing entries first, push the new entry, write back):
108108

109109
```json
110110
{

.claude/skills/titan-sync/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The codebase may have changed between GAUNTLET and now. Detect this before plann
102102
| **high** | >30% of FAIL targets affected OR shared dependencies changed | **Warn user:** "Main has changed significantly since GAUNTLET. Audit results for N targets may be stale. Recommend `/titan-gauntlet` re-run for affected targets before planning." |
103103
| **critical** | New files added to src/ that would be in priority queue, or deleted files that were FAIL targets | **Stop:** "Codebase structure changed. Run `/titan-recon` to rebuild baseline, then `/titan-gauntlet`." |
104104

105-
5. **Write/update drift report** to `.codegraph/titan/drift-report.json` (same schema as GAUNTLET, with `"detectedBy": "sync"`).
105+
5. **Append drift report** to `.codegraph/titan/drift-report.json` (the file is a JSON array — read existing entries, push the new entry, write back; same schema as GAUNTLET, with `"detectedBy": "sync"`).
106106

107107
6. **Update state:** Set `titan-state.json → mainSHA` to current `origin/main`.
108108

0 commit comments

Comments
 (0)