Skip to content

Commit 36cb574

Browse files
committed
fix(claude): make checkpoint slash command deterministic
Fixes the claude /aichaku:checkpoint slash command to make it deterministic and handle empty arguments - Add fallback to "session-work" when no descriptive name arguments provided - Add strict template constraints to prevent non-deterministic additions - Prohibit review dates, analyst names, and generation timestamps - Enforce exact section structure with explicit requirements list - Ensure checkpoints remain historical snapshots, not living documents Prevents creation of malformed filenames and random metadata additions that compromise template consistency
1 parent e558316 commit 36cb574

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

claude/.claude/commands/aichaku/checkpoint.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,68 @@ description: Save session summary to docs/checkpoints/checkpoint-YYYY-MM-DD-{des
1212
## Your task
1313
Create a session checkpoint documenting our work. Use the arguments "$ARGUMENTS" as the descriptive name.
1414

15-
Create the checkpoint file at `docs/checkpoints/checkpoint-{current-date}-{descriptive-name}.md` with the following structure:
15+
**CRITICAL**:
16+
1. If $ARGUMENTS is empty, use "session-work" as the descriptive name
17+
2. Follow this EXACT template structure. Do NOT add any additional fields, headers, or metadata.
18+
3. Do NOT add review dates, analyst names, or generation timestamps. This is a historical snapshot, not a living document.
19+
20+
Create the checkpoint file at `docs/checkpoints/checkpoint-{current-date}-{descriptive-name}.md` with this EXACT structure:
1621

1722
```markdown
1823
# Session Checkpoint - {current-date} - {Descriptive Name}
1924

2025
## Summary of Work Accomplished
21-
[List main tasks completed with brief descriptions]
2226

23-
## Key Technical Decisions
24-
[Document important architectural/implementation choices and rationale]
27+
- [Specific task 1 with concrete outcome]
28+
- [Specific task 2 with concrete outcome]
29+
- [Specific task 3 with concrete outcome]
30+
31+
## Key Technical Decisions
32+
33+
- **[Decision topic]**: [What was decided and why]
34+
- **[Decision topic]**: [What was decided and why]
2535

2636
## Files Created/Modified
2737

2838
### Created
29-
- [List new files with purpose]
39+
- `path/to/file.ext` - [Brief purpose]
40+
- `path/to/file.ext` - [Brief purpose]
3041

3142
### Modified
32-
- [List changed files with type of change]
43+
- `path/to/file.ext` - [Type of change made]
44+
- `path/to/file.ext` - [Type of change made]
3345

3446
## Problems Solved
35-
[List issues resolved and their solutions]
47+
48+
- **[Problem]**: [Solution implemented]
49+
- **[Problem]**: [Solution implemented]
3650

3751
## Lessons Learned
38-
[Key insights or patterns discovered]
52+
53+
- [Specific insight or pattern discovered]
54+
- [Specific insight or pattern discovered]
3955

4056
## Next Steps
41-
[Potential future work or improvements]
57+
58+
- [Specific actionable item for future work]
59+
- [Specific actionable item for future work]
4260

4361
---
62+
4463
*Checkpoint created: {timestamp}*
4564
```
4665

66+
**REQUIREMENTS**:
67+
1. Use ONLY the sections shown above
68+
2. Replace {current-date} with actual date (YYYY-MM-DD format)
69+
3. Replace {Descriptive Name} with the arguments provided
70+
4. Replace {timestamp} with actual timestamp
71+
5. Fill sections with actual content from the session
72+
6. Use bullet points, not numbered lists
73+
7. Be specific and factual, not aspirational
74+
8. Do NOT add Executive Summary, Key Metrics, Strategic Position, or any analysis fields
75+
9. Do NOT add Next Review, Generated, Analyst, or similar metadata
76+
4777
First create the docs/checkpoints directory if it doesn't exist, then create the checkpoint file with today's date and the descriptive name from the arguments.
4878

4979
Run a "preflight" check on the created file, making sure it is formatted and linted, then git add, git commit and git push only the created checkpoint file.

0 commit comments

Comments
 (0)