cc-dev-template 0.1.36 → 0.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/done.md +28 -49
- package/src/commands/prime.md +22 -25
- package/src/scripts/read-guard.js +7 -0
package/package.json
CHANGED
package/src/commands/done.md
CHANGED
|
@@ -4,70 +4,49 @@ description: End a session - sync documentation and commit work
|
|
|
4
4
|
|
|
5
5
|
# Session Closeout
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Capture what was accomplished so the next session starts with accurate context.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Why This Matters
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
You have full conversation context that will be lost when this session ends. The next session (or another developer) will only have git history and documentation. Your job is to bridge that gap.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Execute Directly
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
This requires full conversation context. Handle it yourself rather than delegating to a sub-agent.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## What To Do
|
|
18
18
|
|
|
19
|
-
1.
|
|
20
|
-
```bash
|
|
21
|
-
git log --oneline -10
|
|
22
|
-
git status
|
|
23
|
-
```
|
|
24
|
-
Also consider what was discussed/decided in conversation.
|
|
19
|
+
**1. Understand what happened this session**
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
- Move completed items to "Recently Completed"
|
|
28
|
-
- Update "In Progress" with current state
|
|
29
|
-
- Adjust "Up Next" based on what was learned
|
|
30
|
-
- Note any new blockers or waiting items
|
|
21
|
+
Review git commits made during this session and recall what was discussed/decided in conversation. The combination of commits + conversation = full picture of accomplishments.
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
**2. Update `docs/CURRENT_WORK.md`**
|
|
33
24
|
|
|
34
|
-
|
|
25
|
+
Sync the document with reality:
|
|
26
|
+
- Move completed items to "Recently Completed"
|
|
27
|
+
- Update "In Progress" with current state
|
|
28
|
+
- Adjust "Up Next" based on what was learned
|
|
29
|
+
- Note any new blockers
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
- Can't be found by reading code (commands, ports, credentials, key paths)
|
|
38
|
-
- Applies generally to working in this project (not one-off fixes)
|
|
39
|
-
- Isn't already documented
|
|
31
|
+
**3. Capture workflow discoveries (rarely)**
|
|
40
32
|
|
|
41
|
-
|
|
42
|
-
- Dev commands: `make dev`, `npm run watch`, etc.
|
|
43
|
-
- Key paths: log locations, config files, seed data
|
|
44
|
-
- Ports and local URLs
|
|
45
|
-
- Local dev credentials
|
|
46
|
-
- Non-obvious project conventions
|
|
33
|
+
Consider: Did I learn something that would save time in future sessions?
|
|
47
34
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- Anything already in CLAUDE.md
|
|
35
|
+
Add to CLAUDE.md only for high-value operational knowledge:
|
|
36
|
+
- Dev commands, ports, local URLs, credentials
|
|
37
|
+
- Key paths (logs, config, seed data)
|
|
38
|
+
- Non-obvious project conventions
|
|
53
39
|
|
|
54
|
-
|
|
40
|
+
This is knowledge that can't be found by reading code. Most sessions: add nothing. When adding, keep it minimal and scannable.
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
**4. Commit and push**
|
|
57
43
|
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
git add docs/
|
|
61
|
-
git commit -m "Update project status"
|
|
62
|
-
git push
|
|
63
|
-
```
|
|
44
|
+
Write a commit message that reflects what was actually accomplished this session. Include both docs/ and any other modified files.
|
|
64
45
|
|
|
65
|
-
5.
|
|
46
|
+
**5. Report what was updated**
|
|
66
47
|
|
|
67
|
-
##
|
|
48
|
+
## Mental Model
|
|
68
49
|
|
|
69
|
-
- **CLAUDE.md** = context loader,
|
|
70
|
-
- **CURRENT_WORK.md** =
|
|
71
|
-
- **Git
|
|
72
|
-
|
|
73
|
-
Only update what's necessary. Most sessions just update CURRENT_WORK.md.
|
|
50
|
+
- **CLAUDE.md** = context loader, rarely changes
|
|
51
|
+
- **CURRENT_WORK.md** = living status, changes every session
|
|
52
|
+
- **Git history** = code changes speak for themselves
|
package/src/commands/prime.md
CHANGED
|
@@ -4,44 +4,41 @@ description: Start a session - get oriented and decide what to work on
|
|
|
4
4
|
|
|
5
5
|
# Session Startup
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Deeply orient yourself on a project so you can hit the ground running.
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
You're starting a new session with no memory of previous work. Your goal is to build a mental model of:
|
|
12
|
+
- What this project is and how it's structured
|
|
13
|
+
- What was recently worked on (from git history AND documentation)
|
|
14
|
+
- What's in progress or blocked
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
This enables you to provide genuinely useful assistance immediately.
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
## First: Check for docs structure
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
If `docs/CURRENT_WORK.md` does not exist, invoke `Skill(skill: "initialize-project")` and stop.
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
## Orientation: Understand Recent Work
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
Skill(skill: "initialize-project")
|
|
23
|
-
```
|
|
24
|
+
Read `docs/CURRENT_WORK.md` to understand documented status.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
Then explore git history to understand what actually happened:
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
1. **Detect repository structure** - Check if this is a simple repo or has submodules (`.gitmodules` file). For repos with submodules, you need to understand the history of each component.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
2. **Understand recent commits** - Look at recent commit messages AND the actual files changed. Commit titles alone are often cryptic; the diff stats and changed files tell the real story.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
3. **For submodules** - Each submodule has its own git history. Explore them to understand recent work across the whole system.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
git log --oneline -5 && git status
|
|
36
|
-
```
|
|
34
|
+
4. **Synthesize** - Cross-reference what the documentation says vs what git shows. Look for gaps: recent commits not yet documented, or documented work not reflected in commits.
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
- What this project is (from CLAUDE.md context)
|
|
40
|
-
- Recent completed work
|
|
41
|
-
- Current in-progress items
|
|
42
|
-
- What's planned next
|
|
43
|
-
- Any blockers
|
|
36
|
+
## Output
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
Provide a concise summary that demonstrates your understanding:
|
|
39
|
+
- Project identity and structure
|
|
40
|
+
- Recent completed work (synthesized from docs + git)
|
|
41
|
+
- Current state (in progress, blockers)
|
|
42
|
+
- What's next
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
Then ask: "What would you like to work on?"
|
|
@@ -92,6 +92,13 @@ async function main() {
|
|
|
92
92
|
process.exit(0);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
// Image files: token consumption based on dimensions, not file size
|
|
96
|
+
const imageExtensions = ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg', '.bmp', '.ico', '.tiff', '.tif'];
|
|
97
|
+
const ext = filePath.toLowerCase().slice(filePath.lastIndexOf('.'));
|
|
98
|
+
if (imageExtensions.includes(ext)) {
|
|
99
|
+
process.exit(0);
|
|
100
|
+
}
|
|
101
|
+
|
|
95
102
|
// If file doesn't exist or no path, let Read tool handle the error
|
|
96
103
|
if (!filePath || !fs.existsSync(filePath)) {
|
|
97
104
|
process.exit(0);
|