Skip to content

Commit d5cd3ba

Browse files
authored
Merge pull request #103 from hua7450/fix-tmp-file-naming-collision
Fix /tmp/ file naming collision in review-program and backdate-program
2 parents 54eedf3 + 8b2e842 commit d5cd3ba

File tree

3 files changed

+90
-77
lines changed

3 files changed

+90
-77
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix /tmp/ file naming collision in review-program and backdate-program commands by using branch-name-based prefixes

commands/backdate-program.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ Coordinate a multi-agent workflow to add historical date entries, fix reference
6565
```bash
6666
# Clean /backdate-program files (use {st}-{prog} prefix after parsing)
6767
rm -f /tmp/{st}-{prog}-*.md
68-
# Clean /review-program files (Phase 6 invokes /review-program)
69-
rm -f /tmp/review-program-*.md /tmp/review-pdf-*.{pdf,txt,png} /tmp/review-600dpi-*.png /tmp/review-ext-*.{pdf,txt,png,md}
68+
# Derive PREFIX for reading /review-program output files (Phase 6)
69+
PREFIX=$(git branch --show-current | tr '/' '-')
70+
PREFIX=${PREFIX:-review-program}
71+
# Note: /review-program's own Step 0A handles its file cleanup
7072
```
7173

7274
```
@@ -787,7 +789,7 @@ Invoke the `review-program` skill in local-only mode with `--full`. On **round 1
787789

788790
### Step 6B: Check Results
789791

790-
Read `/tmp/review-program-summary.md` (max 20 lines). Check:
792+
Read `/tmp/{PREFIX}-review-summary.md` (max 20 lines). Check:
791793
- **Critical issue count** — the number that matters
792794
- **Recommended severity** — APPROVE means zero critical issues
793795

@@ -823,7 +825,7 @@ subagent_type: "complete:country-models:rules-engineer",
823825
team_name: "{st}-{prog}-backdate", name: "review-fixer-{ROUND}"
824826
825827
"Fix the critical issues from the /review-program review (round {ROUND}).
826-
Read the full review report at /tmp/review-program-full-report.md.
828+
Read the full review report at /tmp/{PREFIX}-review-full-report.md.
827829
Focus ONLY on items marked CRITICAL — do not change anything else.
828830
Load skills: /policyengine-variable-patterns, /policyengine-code-style,
829831
/policyengine-parameter-patterns, /policyengine-period-patterns, /policyengine-vectorization.
@@ -917,7 +919,7 @@ subagent_type: "general-purpose",
917919
918920
"Finalize {STATE} {PROGRAM} backdating report.
919921
1. Read all findings from task list
920-
2. Read the last /review-program summary at /tmp/review-program-summary.md
922+
2. Read the last /review-program summary at /tmp/{PREFIX}-review-summary.md
921923
3. Read the impl spec summary at /tmp/{st}-{prog}-impl-summary.md
922924
4. Write SHORT final report (max 25 lines) to /tmp/{st}-{prog}-final-report.md:
923925
- Total parameters verified, date entries added
@@ -996,7 +998,7 @@ subagent_type: "general-purpose",
996998
READ these files:
997999
- /tmp/{st}-{prog}-checklist.md (session checklist from review-fix loop, if exists)
9981000
- /tmp/{st}-{prog}-checkpoint.md (validation checkpoint, if exists)
999-
- /tmp/review-program-summary.md (last review summary, if exists)
1001+
- /tmp/{PREFIX}-review-summary.md (last review summary, if exists)
10001002
10011003
ALSO READ the persistent lessons file (if it exists):
10021004
- {persistent_lessons_path}

0 commit comments

Comments
 (0)