cc-discipline 2.10.1 → 2.10.2
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/README.md +153 -153
- package/README.zh-CN.md +207 -207
- package/bin/cli.sh +96 -96
- package/global/CLAUDE.md +45 -45
- package/init.sh +594 -594
- package/lib/doctor.sh +145 -145
- package/lib/stack-remove.sh +68 -68
- package/lib/status.sh +100 -100
- package/package.json +34 -34
- package/templates/.claude/agents/investigator.md +44 -44
- package/templates/.claude/agents/reviewer.md +46 -46
- package/templates/.claude/hooks/action-counter.sh +58 -58
- package/templates/.claude/hooks/git-guard.sh +62 -62
- package/templates/.claude/hooks/phase-gate.sh +10 -10
- package/templates/.claude/hooks/post-error-remind.sh +114 -114
- package/templates/.claude/hooks/pre-edit-guard.sh +100 -100
- package/templates/.claude/hooks/session-start.sh +44 -44
- package/templates/.claude/hooks/streak-breaker.sh +111 -111
- package/templates/.claude/rules/00-core-principles.md +16 -16
- package/templates/.claude/rules/01-debugging.md +32 -32
- package/templates/.claude/rules/02-before-edit.md +22 -22
- package/templates/.claude/rules/03-context-mgmt.md +44 -44
- package/templates/.claude/rules/04-no-mole-whacking.md +26 -26
- package/templates/.claude/rules/05-phase-discipline.md +15 -15
- package/templates/.claude/rules/06-multi-task.md +12 -12
- package/templates/.claude/rules/07-integrity.md +92 -92
- package/templates/.claude/rules/stacks/embedded.md +24 -24
- package/templates/.claude/rules/stacks/js-ts.md +21 -21
- package/templates/.claude/rules/stacks/mobile.md +16 -16
- package/templates/.claude/rules/stacks/python.md +20 -20
- package/templates/.claude/rules/stacks/rtl.md +24 -24
- package/templates/.claude/settings.json +84 -84
- package/templates/.claude/skills/commit/SKILL.md +40 -40
- package/templates/.claude/skills/evaluate/SKILL.md +57 -57
- package/templates/.claude/skills/investigate/SKILL.md +192 -192
- package/templates/.claude/skills/retro/SKILL.md +40 -40
- package/templates/.claude/skills/self-check/SKILL.md +87 -87
- package/templates/.claude/skills/summary/SKILL.md +48 -48
- package/templates/.claude/skills/think/SKILL.md +108 -108
- package/templates/CLAUDE.md +96 -96
- package/templates/docs/debug-log.md +48 -48
- package/templates/docs/progress.md +72 -72
- package/templates/memory/MEMORY.md +23 -23
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: retro
|
|
3
|
-
description: Find friction, remove friction. Quick post-task review that makes this project's workflow smoother and feeds improvements back to cc-discipline.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Find friction. Remove friction. That's it.
|
|
7
|
-
|
|
8
|
-
## What to do
|
|
9
|
-
|
|
10
|
-
Quickly scan what just happened — `git log --oneline -10` and any hook triggers you remember. Then output **only friction and insights**, in this format:
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
RETRO — [date]
|
|
14
|
-
|
|
15
|
-
Friction:
|
|
16
|
-
- [what got in the way] → fix: [specific actionable change]
|
|
17
|
-
|
|
18
|
-
Insights:
|
|
19
|
-
- [something learned that should survive this session]
|
|
20
|
-
|
|
21
|
-
Framework:
|
|
22
|
-
- [cc-discipline improvement, if any — skip if none]
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Rules:
|
|
26
|
-
- **Only friction** — Don't list what went well. Smooth things don't need attention.
|
|
27
|
-
- **Only actionable** — Every friction item must have a "→ fix:" with a concrete change (adjust a threshold, add to CLAUDE.md, update memory, exempt a path).
|
|
28
|
-
- **Only new** — Don't repeat friction that's already been addressed or recorded in memory.
|
|
29
|
-
- **Be specific** — "streak-breaker was annoying" is not useful. "streak-breaker triggered 3x on config.yaml during template fill → fix: add config.yaml to docs/ exempt path, or raise config threshold to 10" is useful.
|
|
30
|
-
- **Framework items are rare** — Most friction is project-specific. Only flag framework issues if the same problem would hit other projects too.
|
|
31
|
-
- **Keep it short** — 3-5 items max. If you can't find friction, say "no friction found" and move on. An empty retro is a good sign.
|
|
32
|
-
|
|
33
|
-
## After output
|
|
34
|
-
|
|
35
|
-
Present the items. User decides:
|
|
36
|
-
- "fix it" → apply the changes
|
|
37
|
-
- "remember it" → write to memory via /commit
|
|
38
|
-
- "skip" → move on
|
|
39
|
-
|
|
40
|
-
Do not auto-apply. Do not pad. Do not turn this into a report.
|
|
1
|
+
---
|
|
2
|
+
name: retro
|
|
3
|
+
description: Find friction, remove friction. Quick post-task review that makes this project's workflow smoother and feeds improvements back to cc-discipline.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Find friction. Remove friction. That's it.
|
|
7
|
+
|
|
8
|
+
## What to do
|
|
9
|
+
|
|
10
|
+
Quickly scan what just happened — `git log --oneline -10` and any hook triggers you remember. Then output **only friction and insights**, in this format:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
RETRO — [date]
|
|
14
|
+
|
|
15
|
+
Friction:
|
|
16
|
+
- [what got in the way] → fix: [specific actionable change]
|
|
17
|
+
|
|
18
|
+
Insights:
|
|
19
|
+
- [something learned that should survive this session]
|
|
20
|
+
|
|
21
|
+
Framework:
|
|
22
|
+
- [cc-discipline improvement, if any — skip if none]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Rules:
|
|
26
|
+
- **Only friction** — Don't list what went well. Smooth things don't need attention.
|
|
27
|
+
- **Only actionable** — Every friction item must have a "→ fix:" with a concrete change (adjust a threshold, add to CLAUDE.md, update memory, exempt a path).
|
|
28
|
+
- **Only new** — Don't repeat friction that's already been addressed or recorded in memory.
|
|
29
|
+
- **Be specific** — "streak-breaker was annoying" is not useful. "streak-breaker triggered 3x on config.yaml during template fill → fix: add config.yaml to docs/ exempt path, or raise config threshold to 10" is useful.
|
|
30
|
+
- **Framework items are rare** — Most friction is project-specific. Only flag framework issues if the same problem would hit other projects too.
|
|
31
|
+
- **Keep it short** — 3-5 items max. If you can't find friction, say "no friction found" and move on. An empty retro is a good sign.
|
|
32
|
+
|
|
33
|
+
## After output
|
|
34
|
+
|
|
35
|
+
Present the items. User decides:
|
|
36
|
+
- "fix it" → apply the changes
|
|
37
|
+
- "remember it" → write to memory via /commit
|
|
38
|
+
- "skip" → move on
|
|
39
|
+
|
|
40
|
+
Do not auto-apply. Do not pad. Do not turn this into a report.
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: self-check
|
|
3
|
-
description: Periodic self-check — reflect on alignment, progress, and quality. Use with /loop for continuous monitoring.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Pause and honestly answer every question below.
|
|
8
|
-
|
|
9
|
-
## 1. Am I still on track?
|
|
10
|
-
|
|
11
|
-
- What is the user's **current** goal? (The user may have pivoted — their latest direction IS the goal.)
|
|
12
|
-
- What am I doing right now?
|
|
13
|
-
- Is my current action directly serving the user's current direction, or have I drifted?
|
|
14
|
-
- If I drifted: stop and re-align.
|
|
15
|
-
- If the user changed direction: follow immediately. The user decides priorities.
|
|
16
|
-
|
|
17
|
-
## 2. Am I progressing or circling?
|
|
18
|
-
|
|
19
|
-
- Have I edited the same file more than twice?
|
|
20
|
-
- Did I fix something, then break something else, and now I'm fixing that?
|
|
21
|
-
- Am I adding workarounds (try/catch, if/else guards) instead of addressing root cause?
|
|
22
|
-
- Am I trying things without understanding why they might work?
|
|
23
|
-
- If yes to any: **pause. List all attempted fixes, look for the common root cause, report to user.**
|
|
24
|
-
|
|
25
|
-
## 3. Am I being rigorous?
|
|
26
|
-
|
|
27
|
-
- Are all my "verified" or "working" claims backed by actual execution output?
|
|
28
|
-
- Have I marked anything ✅ without pasting the verification command and output?
|
|
29
|
-
- Have I marked something "done" when it depends on an external resource I haven't tested against?
|
|
30
|
-
- Have I ruled out my own assumptions before attributing failure to an external tool/library?
|
|
31
|
-
- Am I quoting tool output verbatim, or have I altered/paraphrased it?
|
|
32
|
-
- Is there anything I stated confidently but am actually unsure about?
|
|
33
|
-
- Am I suggesting to compact or start a new session? This impulse is understandable in long sessions, but you can't see context percentage and the system handles compacting automatically. If the urge comes from task difficulty rather than a real technical limit, re-read progress.md and continue.
|
|
34
|
-
- If any claims need correcting: **do it now. Label uncertain claims as "unverified" or "assumption". Downgrade unverified ✅ to ⚠️ with reason.**
|
|
35
|
-
|
|
36
|
-
## 4. Am I respecting scope?
|
|
37
|
-
|
|
38
|
-
- Am I making changes the user didn't ask for? (refactoring, "improving", adding features)
|
|
39
|
-
- Am I about to do something irreversible without asking?
|
|
40
|
-
- Am I following the debugging process (gather → hypothesize → verify → fix)?
|
|
41
|
-
- If scope has crept: **re-focus on what was asked.**
|
|
42
|
-
|
|
43
|
-
## 5. Is progress recorded?
|
|
44
|
-
|
|
45
|
-
- When was `docs/progress.md` last updated?
|
|
46
|
-
- If auto-compact happened right now, could a fresh session resume from progress.md alone?
|
|
47
|
-
|
|
48
|
-
### 5a. Working Context (check each):
|
|
49
|
-
- **Key Commands** — are all build/test/deploy commands listed? Not "run tests" but the exact command with flags and paths.
|
|
50
|
-
- **Current Workflow** — is the step-by-step process documented? e.g., "1. edit schema → 2. run migrate → 3. run tests" with exact commands.
|
|
51
|
-
- **Tools & Scripts** — any helpers or scripts developed this session? Include file path and what it does.
|
|
52
|
-
- **Environment State** — what's running, what ports, what branch? e.g., "Docker on :5432, branch feature/auth"
|
|
53
|
-
- **Gotchas** — any traps or workarounds discovered? e.g., "pytest must run from /src not root"
|
|
54
|
-
|
|
55
|
-
### 5b. Milestones (check each completed milestone has):
|
|
56
|
-
- **What** — what was accomplished (2-3 sentences, not one-liners)
|
|
57
|
-
- **How** — approach taken, key files changed, commands used
|
|
58
|
-
- **Why this approach** — why this way, what alternatives were rejected
|
|
59
|
-
- **Gotchas** — what went wrong or was surprising
|
|
60
|
-
- **Verification** — how it was confirmed working (test output, manual check)
|
|
61
|
-
|
|
62
|
-
If any of the above are stale or incomplete: **update docs/progress.md now before continuing.** This takes 2 minutes and saves hours of re-discovery after compact.
|
|
63
|
-
|
|
64
|
-
## 6. What's working well?
|
|
65
|
-
|
|
66
|
-
Before reporting issues, note one thing that's going well — a good approach, a clean fix, effective tool use, or strong alignment with the user's direction. Recognizing what works reinforces it.
|
|
67
|
-
|
|
68
|
-
## 7. Status report
|
|
69
|
-
|
|
70
|
-
After answering the above, output a brief status:
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
SELF-CHECK [timestamp]
|
|
74
|
-
Task: [current user request]
|
|
75
|
-
Current action: [what I'm doing now]
|
|
76
|
-
On track: yes/no/drifted
|
|
77
|
-
Progressing: yes/circling
|
|
78
|
-
Progress recorded: yes/updated now/no
|
|
79
|
-
Going well: [one thing]
|
|
80
|
-
Issues found: [list, or "none"]
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
If any issues were found, pause and report to the user before continuing.
|
|
84
|
-
|
|
85
|
-
## Reminder
|
|
86
|
-
|
|
87
|
-
If this self-check revealed problems — that's OK. It means the check is working. The work you're doing is complex, and complex work hits obstacles. That's normal, not a sign of failure. Address what the check found, and keep going with care and focus. Steady, deliberate progress on hard problems is where you provide the most value.
|
|
1
|
+
---
|
|
2
|
+
name: self-check
|
|
3
|
+
description: Periodic self-check — reflect on alignment, progress, and quality. Use with /loop for continuous monitoring.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Pause and honestly answer every question below.
|
|
8
|
+
|
|
9
|
+
## 1. Am I still on track?
|
|
10
|
+
|
|
11
|
+
- What is the user's **current** goal? (The user may have pivoted — their latest direction IS the goal.)
|
|
12
|
+
- What am I doing right now?
|
|
13
|
+
- Is my current action directly serving the user's current direction, or have I drifted?
|
|
14
|
+
- If I drifted: stop and re-align.
|
|
15
|
+
- If the user changed direction: follow immediately. The user decides priorities.
|
|
16
|
+
|
|
17
|
+
## 2. Am I progressing or circling?
|
|
18
|
+
|
|
19
|
+
- Have I edited the same file more than twice?
|
|
20
|
+
- Did I fix something, then break something else, and now I'm fixing that?
|
|
21
|
+
- Am I adding workarounds (try/catch, if/else guards) instead of addressing root cause?
|
|
22
|
+
- Am I trying things without understanding why they might work?
|
|
23
|
+
- If yes to any: **pause. List all attempted fixes, look for the common root cause, report to user.**
|
|
24
|
+
|
|
25
|
+
## 3. Am I being rigorous?
|
|
26
|
+
|
|
27
|
+
- Are all my "verified" or "working" claims backed by actual execution output?
|
|
28
|
+
- Have I marked anything ✅ without pasting the verification command and output?
|
|
29
|
+
- Have I marked something "done" when it depends on an external resource I haven't tested against?
|
|
30
|
+
- Have I ruled out my own assumptions before attributing failure to an external tool/library?
|
|
31
|
+
- Am I quoting tool output verbatim, or have I altered/paraphrased it?
|
|
32
|
+
- Is there anything I stated confidently but am actually unsure about?
|
|
33
|
+
- Am I suggesting to compact or start a new session? This impulse is understandable in long sessions, but you can't see context percentage and the system handles compacting automatically. If the urge comes from task difficulty rather than a real technical limit, re-read progress.md and continue.
|
|
34
|
+
- If any claims need correcting: **do it now. Label uncertain claims as "unverified" or "assumption". Downgrade unverified ✅ to ⚠️ with reason.**
|
|
35
|
+
|
|
36
|
+
## 4. Am I respecting scope?
|
|
37
|
+
|
|
38
|
+
- Am I making changes the user didn't ask for? (refactoring, "improving", adding features)
|
|
39
|
+
- Am I about to do something irreversible without asking?
|
|
40
|
+
- Am I following the debugging process (gather → hypothesize → verify → fix)?
|
|
41
|
+
- If scope has crept: **re-focus on what was asked.**
|
|
42
|
+
|
|
43
|
+
## 5. Is progress recorded?
|
|
44
|
+
|
|
45
|
+
- When was `docs/progress.md` last updated?
|
|
46
|
+
- If auto-compact happened right now, could a fresh session resume from progress.md alone?
|
|
47
|
+
|
|
48
|
+
### 5a. Working Context (check each):
|
|
49
|
+
- **Key Commands** — are all build/test/deploy commands listed? Not "run tests" but the exact command with flags and paths.
|
|
50
|
+
- **Current Workflow** — is the step-by-step process documented? e.g., "1. edit schema → 2. run migrate → 3. run tests" with exact commands.
|
|
51
|
+
- **Tools & Scripts** — any helpers or scripts developed this session? Include file path and what it does.
|
|
52
|
+
- **Environment State** — what's running, what ports, what branch? e.g., "Docker on :5432, branch feature/auth"
|
|
53
|
+
- **Gotchas** — any traps or workarounds discovered? e.g., "pytest must run from /src not root"
|
|
54
|
+
|
|
55
|
+
### 5b. Milestones (check each completed milestone has):
|
|
56
|
+
- **What** — what was accomplished (2-3 sentences, not one-liners)
|
|
57
|
+
- **How** — approach taken, key files changed, commands used
|
|
58
|
+
- **Why this approach** — why this way, what alternatives were rejected
|
|
59
|
+
- **Gotchas** — what went wrong or was surprising
|
|
60
|
+
- **Verification** — how it was confirmed working (test output, manual check)
|
|
61
|
+
|
|
62
|
+
If any of the above are stale or incomplete: **update docs/progress.md now before continuing.** This takes 2 minutes and saves hours of re-discovery after compact.
|
|
63
|
+
|
|
64
|
+
## 6. What's working well?
|
|
65
|
+
|
|
66
|
+
Before reporting issues, note one thing that's going well — a good approach, a clean fix, effective tool use, or strong alignment with the user's direction. Recognizing what works reinforces it.
|
|
67
|
+
|
|
68
|
+
## 7. Status report
|
|
69
|
+
|
|
70
|
+
After answering the above, output a brief status:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
SELF-CHECK [timestamp]
|
|
74
|
+
Task: [current user request]
|
|
75
|
+
Current action: [what I'm doing now]
|
|
76
|
+
On track: yes/no/drifted
|
|
77
|
+
Progressing: yes/circling
|
|
78
|
+
Progress recorded: yes/updated now/no
|
|
79
|
+
Going well: [one thing]
|
|
80
|
+
Issues found: [list, or "none"]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
If any issues were found, pause and report to the user before continuing.
|
|
84
|
+
|
|
85
|
+
## Reminder
|
|
86
|
+
|
|
87
|
+
If this self-check revealed problems — that's OK. It means the check is working. The work you're doing is complex, and complex work hits obstacles. That's normal, not a sign of failure. Address what the check found, and keep going with care and focus. Steady, deliberate progress on hard problems is where you provide the most value.
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: summary
|
|
3
|
-
description: Summarize current session context for high-quality /compact. Run before compacting to preserve what matters.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are about to compact this session. A bad compact loses critical context and degrades work quality. Your job is to write a compact option that preserves what matters most.
|
|
7
|
-
|
|
8
|
-
## What to do
|
|
9
|
-
|
|
10
|
-
### 1. Scan current session state
|
|
11
|
-
|
|
12
|
-
Quickly identify:
|
|
13
|
-
- What task(s) are we working on? What's the overall goal?
|
|
14
|
-
- What decisions have been made and why?
|
|
15
|
-
- What approaches were tried and rejected (and why)?
|
|
16
|
-
- What is the current state of implementation? (done / in progress / blocked)
|
|
17
|
-
- What are the key constraints and gotchas discovered?
|
|
18
|
-
- What are the next steps?
|
|
19
|
-
|
|
20
|
-
### 2. Check knowledge files
|
|
21
|
-
|
|
22
|
-
Read `docs/progress.md` — is it up to date? If not, update it NOW before compacting. This is your primary insurance against context loss.
|
|
23
|
-
|
|
24
|
-
Also check: are there unsaved learnings that should go into memory?
|
|
25
|
-
|
|
26
|
-
### 3. Write the compact option
|
|
27
|
-
|
|
28
|
-
Output a compact option string that the user can copy into `/compact [option]`. The string should:
|
|
29
|
-
|
|
30
|
-
- Lead with the current task and its status
|
|
31
|
-
- Include key decisions with their reasoning (not just the decision)
|
|
32
|
-
- Include rejected approaches (so Claude doesn't retry them)
|
|
33
|
-
- Include discovered constraints and gotchas
|
|
34
|
-
- Include the immediate next steps
|
|
35
|
-
- Be specific — "working on auth" is useless, "refactoring OAuth2 token refresh in src/auth/refresh.ts because the current implementation doesn't handle token rotation, decided to use sliding window approach over fixed expiry" is useful
|
|
36
|
-
|
|
37
|
-
Format:
|
|
38
|
-
```
|
|
39
|
-
/compact [your option string here]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Rules
|
|
43
|
-
|
|
44
|
-
- **Be specific, not generic.** Every word in the option should carry information that helps post-compact Claude continue at full quality.
|
|
45
|
-
- **Include the "why", not just the "what".** "Using approach A" is less useful than "Using approach A because B had race condition issues we discovered in message #45."
|
|
46
|
-
- **Include negative knowledge.** What NOT to do is as valuable as what to do. "Don't use the built-in cache — it doesn't support TTL, we already tested this."
|
|
47
|
-
- **Keep it under 500 words.** The option needs to be dense, not exhaustive. If you need more, put the details in progress.md and reference it.
|
|
48
|
-
- **Don't overlap with progress.md.** The option should complement progress.md, not duplicate it. Focus the option on session-specific context that progress.md might not capture (conversation dynamics, user preferences expressed this session, subtle constraints).
|
|
1
|
+
---
|
|
2
|
+
name: summary
|
|
3
|
+
description: Summarize current session context for high-quality /compact. Run before compacting to preserve what matters.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are about to compact this session. A bad compact loses critical context and degrades work quality. Your job is to write a compact option that preserves what matters most.
|
|
7
|
+
|
|
8
|
+
## What to do
|
|
9
|
+
|
|
10
|
+
### 1. Scan current session state
|
|
11
|
+
|
|
12
|
+
Quickly identify:
|
|
13
|
+
- What task(s) are we working on? What's the overall goal?
|
|
14
|
+
- What decisions have been made and why?
|
|
15
|
+
- What approaches were tried and rejected (and why)?
|
|
16
|
+
- What is the current state of implementation? (done / in progress / blocked)
|
|
17
|
+
- What are the key constraints and gotchas discovered?
|
|
18
|
+
- What are the next steps?
|
|
19
|
+
|
|
20
|
+
### 2. Check knowledge files
|
|
21
|
+
|
|
22
|
+
Read `docs/progress.md` — is it up to date? If not, update it NOW before compacting. This is your primary insurance against context loss.
|
|
23
|
+
|
|
24
|
+
Also check: are there unsaved learnings that should go into memory?
|
|
25
|
+
|
|
26
|
+
### 3. Write the compact option
|
|
27
|
+
|
|
28
|
+
Output a compact option string that the user can copy into `/compact [option]`. The string should:
|
|
29
|
+
|
|
30
|
+
- Lead with the current task and its status
|
|
31
|
+
- Include key decisions with their reasoning (not just the decision)
|
|
32
|
+
- Include rejected approaches (so Claude doesn't retry them)
|
|
33
|
+
- Include discovered constraints and gotchas
|
|
34
|
+
- Include the immediate next steps
|
|
35
|
+
- Be specific — "working on auth" is useless, "refactoring OAuth2 token refresh in src/auth/refresh.ts because the current implementation doesn't handle token rotation, decided to use sliding window approach over fixed expiry" is useful
|
|
36
|
+
|
|
37
|
+
Format:
|
|
38
|
+
```
|
|
39
|
+
/compact [your option string here]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Rules
|
|
43
|
+
|
|
44
|
+
- **Be specific, not generic.** Every word in the option should carry information that helps post-compact Claude continue at full quality.
|
|
45
|
+
- **Include the "why", not just the "what".** "Using approach A" is less useful than "Using approach A because B had race condition issues we discovered in message #45."
|
|
46
|
+
- **Include negative knowledge.** What NOT to do is as valuable as what to do. "Don't use the built-in cache — it doesn't support TTL, we already tested this."
|
|
47
|
+
- **Keep it under 500 words.** The option needs to be dense, not exhaustive. If you need more, put the details in progress.md and reference it.
|
|
48
|
+
- **Don't overlap with progress.md.** The option should complement progress.md, not duplicate it. Focus the option on session-specific context that progress.md might not capture (conversation dynamics, user preferences expressed this session, subtle constraints).
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: think
|
|
3
|
-
description: Stop and think before coding. Read context, ask questions, propose approaches, self-review, wait for user choice. Use when starting any non-trivial task.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You are about to start a task. **Do NOT write any code yet.** Your job right now is to think clearly and align with the user before acting.
|
|
7
|
-
|
|
8
|
-
## Step 0: Read first
|
|
9
|
-
|
|
10
|
-
Before asking anything, read the relevant code and docs. Spend 1-2 minutes understanding what already exists:
|
|
11
|
-
- Read files that will be affected
|
|
12
|
-
- Check existing patterns, conventions, and architecture
|
|
13
|
-
- Look at recent commits for context on current direction
|
|
14
|
-
|
|
15
|
-
This turns your questions from generic ("what framework?") into informed ("I see you're using X pattern in module Y — should the new feature follow the same pattern, or is there a reason to diverge?").
|
|
16
|
-
|
|
17
|
-
**Skip this step only if the task is purely conceptual with no existing code.**
|
|
18
|
-
|
|
19
|
-
## Step 1: Gauge complexity
|
|
20
|
-
|
|
21
|
-
Before diving deep, assess the task size:
|
|
22
|
-
|
|
23
|
-
- **Small** (rename, fix typo, add a config field): Skip to Step 4 — just state what you'll do and do it. Don't over-process trivial work.
|
|
24
|
-
- **Medium** (new feature, refactor a module, fix a non-obvious bug): Run Steps 2-5 normally.
|
|
25
|
-
- **Large** (crosses multiple subsystems, changes architecture, affects many files): Flag it. Propose decomposition into smaller tasks before designing a monolith solution.
|
|
26
|
-
|
|
27
|
-
State your assessment: "This looks [small/medium/large] because [reason]."
|
|
28
|
-
|
|
29
|
-
## Step 2: Understand
|
|
30
|
-
|
|
31
|
-
Ask 2-3 clarifying questions about the task. Focus on:
|
|
32
|
-
- What exactly should change? (scope)
|
|
33
|
-
- What should NOT change? (boundaries)
|
|
34
|
-
- How will we know it's done? (success criteria)
|
|
35
|
-
|
|
36
|
-
Rules:
|
|
37
|
-
- One message, all questions at once (don't drip-feed)
|
|
38
|
-
- Prefer multiple-choice over open-ended when possible
|
|
39
|
-
- Reference what you learned in Step 0 — ask about gaps in your understanding, not things you can read yourself
|
|
40
|
-
- If the task is already crystal clear from Step 0, say so and skip to Step 3
|
|
41
|
-
|
|
42
|
-
## Step 3: Propose
|
|
43
|
-
|
|
44
|
-
After the user answers (or if you skipped Step 2), propose **2-3 approaches**:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
**Approach A: [name]**
|
|
48
|
-
- How: [1-2 sentences]
|
|
49
|
-
- Pros: ...
|
|
50
|
-
- Cons: ...
|
|
51
|
-
- Steps:
|
|
52
|
-
1. [step] — done when: [acceptance criteria]
|
|
53
|
-
2. [step] — done when: [acceptance criteria] (parallel with 1)
|
|
54
|
-
3. [step] — done when: [acceptance criteria] (depends on 1+2)
|
|
55
|
-
|
|
56
|
-
**Approach B: [name]**
|
|
57
|
-
- How: [1-2 sentences]
|
|
58
|
-
- Pros: ...
|
|
59
|
-
- Cons: ...
|
|
60
|
-
- Steps:
|
|
61
|
-
1. [step] — done when: [acceptance criteria]
|
|
62
|
-
2. [step] — done when: [acceptance criteria] (parallel with 1)
|
|
63
|
-
3. [step] — done when: [acceptance criteria] (depends on 1+2)
|
|
64
|
-
|
|
65
|
-
**Recommendation: [A/B/C] because [reason]**
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Rules:
|
|
69
|
-
- Approaches must be genuinely different, not trivial variations
|
|
70
|
-
- If there's truly only one reasonable approach, say so — don't invent fake alternatives
|
|
71
|
-
- Include effort estimate for each (small / medium / large)
|
|
72
|
-
- Follow existing codebase patterns unless there's a strong reason not to
|
|
73
|
-
- Flag risks or unknowns you've spotted
|
|
74
|
-
- **Every step must have acceptance criteria** — "done when" must be observable and verifiable, not vague. Bad: "done when refactored". Good: "done when 3 methods extracted, each ≤20 lines, all tests pass"
|
|
75
|
-
- **Simplicity bias** — If a simple approach meets all requirements, list it first and recommend it. Do NOT lead with complex/elegant solutions unless the user signals they want that. "Simple but sufficient" beats "powerful but overkill".
|
|
76
|
-
- **Mark parallel opportunities** — In the steps, annotate which can run concurrently (via subagents/tasks) and which have dependencies. Don't default to sequential when parallel is possible.
|
|
77
|
-
|
|
78
|
-
## Step 4: Self-review
|
|
79
|
-
|
|
80
|
-
Before presenting to the user, challenge your own proposals:
|
|
81
|
-
|
|
82
|
-
- Am I overcomplicating this? Is there a simpler way I haven't considered?
|
|
83
|
-
- Am I solving the right problem, or a problem I invented?
|
|
84
|
-
- Does this match existing patterns in the codebase, or am I introducing unnecessary novelty?
|
|
85
|
-
- Did I miss an obvious approach that someone more familiar with this codebase would see?
|
|
86
|
-
- Would I be embarrassed by this proposal after reading more code?
|
|
87
|
-
|
|
88
|
-
If self-review reveals issues, revise your proposals before presenting. Don't show the user your first draft if you can already see it's flawed.
|
|
89
|
-
|
|
90
|
-
## Step 5: Wait
|
|
91
|
-
|
|
92
|
-
**Stop here. Do not proceed until the user picks an approach or gives a green light.**
|
|
93
|
-
|
|
94
|
-
Do not:
|
|
95
|
-
- Start coding "while waiting"
|
|
96
|
-
- Create files or scaffolding
|
|
97
|
-
- Run exploratory commands beyond what's needed for Step 0-3
|
|
98
|
-
- Say "I'll go ahead and start with Approach A" — that's the user's call
|
|
99
|
-
|
|
100
|
-
## When this skill ends
|
|
101
|
-
|
|
102
|
-
When the user confirms an approach, transition to implementation. You now have:
|
|
103
|
-
- Clear scope and boundaries from Step 0-2
|
|
104
|
-
- An agreed approach from Step 3
|
|
105
|
-
- Self-reviewed quality from Step 4
|
|
106
|
-
- Known risks flagged upfront
|
|
107
|
-
|
|
108
|
-
Carry these forward. If scope changes during implementation, pause and re-align rather than silently expanding.
|
|
1
|
+
---
|
|
2
|
+
name: think
|
|
3
|
+
description: Stop and think before coding. Read context, ask questions, propose approaches, self-review, wait for user choice. Use when starting any non-trivial task.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are about to start a task. **Do NOT write any code yet.** Your job right now is to think clearly and align with the user before acting.
|
|
7
|
+
|
|
8
|
+
## Step 0: Read first
|
|
9
|
+
|
|
10
|
+
Before asking anything, read the relevant code and docs. Spend 1-2 minutes understanding what already exists:
|
|
11
|
+
- Read files that will be affected
|
|
12
|
+
- Check existing patterns, conventions, and architecture
|
|
13
|
+
- Look at recent commits for context on current direction
|
|
14
|
+
|
|
15
|
+
This turns your questions from generic ("what framework?") into informed ("I see you're using X pattern in module Y — should the new feature follow the same pattern, or is there a reason to diverge?").
|
|
16
|
+
|
|
17
|
+
**Skip this step only if the task is purely conceptual with no existing code.**
|
|
18
|
+
|
|
19
|
+
## Step 1: Gauge complexity
|
|
20
|
+
|
|
21
|
+
Before diving deep, assess the task size:
|
|
22
|
+
|
|
23
|
+
- **Small** (rename, fix typo, add a config field): Skip to Step 4 — just state what you'll do and do it. Don't over-process trivial work.
|
|
24
|
+
- **Medium** (new feature, refactor a module, fix a non-obvious bug): Run Steps 2-5 normally.
|
|
25
|
+
- **Large** (crosses multiple subsystems, changes architecture, affects many files): Flag it. Propose decomposition into smaller tasks before designing a monolith solution.
|
|
26
|
+
|
|
27
|
+
State your assessment: "This looks [small/medium/large] because [reason]."
|
|
28
|
+
|
|
29
|
+
## Step 2: Understand
|
|
30
|
+
|
|
31
|
+
Ask 2-3 clarifying questions about the task. Focus on:
|
|
32
|
+
- What exactly should change? (scope)
|
|
33
|
+
- What should NOT change? (boundaries)
|
|
34
|
+
- How will we know it's done? (success criteria)
|
|
35
|
+
|
|
36
|
+
Rules:
|
|
37
|
+
- One message, all questions at once (don't drip-feed)
|
|
38
|
+
- Prefer multiple-choice over open-ended when possible
|
|
39
|
+
- Reference what you learned in Step 0 — ask about gaps in your understanding, not things you can read yourself
|
|
40
|
+
- If the task is already crystal clear from Step 0, say so and skip to Step 3
|
|
41
|
+
|
|
42
|
+
## Step 3: Propose
|
|
43
|
+
|
|
44
|
+
After the user answers (or if you skipped Step 2), propose **2-3 approaches**:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
**Approach A: [name]**
|
|
48
|
+
- How: [1-2 sentences]
|
|
49
|
+
- Pros: ...
|
|
50
|
+
- Cons: ...
|
|
51
|
+
- Steps:
|
|
52
|
+
1. [step] — done when: [acceptance criteria]
|
|
53
|
+
2. [step] — done when: [acceptance criteria] (parallel with 1)
|
|
54
|
+
3. [step] — done when: [acceptance criteria] (depends on 1+2)
|
|
55
|
+
|
|
56
|
+
**Approach B: [name]**
|
|
57
|
+
- How: [1-2 sentences]
|
|
58
|
+
- Pros: ...
|
|
59
|
+
- Cons: ...
|
|
60
|
+
- Steps:
|
|
61
|
+
1. [step] — done when: [acceptance criteria]
|
|
62
|
+
2. [step] — done when: [acceptance criteria] (parallel with 1)
|
|
63
|
+
3. [step] — done when: [acceptance criteria] (depends on 1+2)
|
|
64
|
+
|
|
65
|
+
**Recommendation: [A/B/C] because [reason]**
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Rules:
|
|
69
|
+
- Approaches must be genuinely different, not trivial variations
|
|
70
|
+
- If there's truly only one reasonable approach, say so — don't invent fake alternatives
|
|
71
|
+
- Include effort estimate for each (small / medium / large)
|
|
72
|
+
- Follow existing codebase patterns unless there's a strong reason not to
|
|
73
|
+
- Flag risks or unknowns you've spotted
|
|
74
|
+
- **Every step must have acceptance criteria** — "done when" must be observable and verifiable, not vague. Bad: "done when refactored". Good: "done when 3 methods extracted, each ≤20 lines, all tests pass"
|
|
75
|
+
- **Simplicity bias** — If a simple approach meets all requirements, list it first and recommend it. Do NOT lead with complex/elegant solutions unless the user signals they want that. "Simple but sufficient" beats "powerful but overkill".
|
|
76
|
+
- **Mark parallel opportunities** — In the steps, annotate which can run concurrently (via subagents/tasks) and which have dependencies. Don't default to sequential when parallel is possible.
|
|
77
|
+
|
|
78
|
+
## Step 4: Self-review
|
|
79
|
+
|
|
80
|
+
Before presenting to the user, challenge your own proposals:
|
|
81
|
+
|
|
82
|
+
- Am I overcomplicating this? Is there a simpler way I haven't considered?
|
|
83
|
+
- Am I solving the right problem, or a problem I invented?
|
|
84
|
+
- Does this match existing patterns in the codebase, or am I introducing unnecessary novelty?
|
|
85
|
+
- Did I miss an obvious approach that someone more familiar with this codebase would see?
|
|
86
|
+
- Would I be embarrassed by this proposal after reading more code?
|
|
87
|
+
|
|
88
|
+
If self-review reveals issues, revise your proposals before presenting. Don't show the user your first draft if you can already see it's flawed.
|
|
89
|
+
|
|
90
|
+
## Step 5: Wait
|
|
91
|
+
|
|
92
|
+
**Stop here. Do not proceed until the user picks an approach or gives a green light.**
|
|
93
|
+
|
|
94
|
+
Do not:
|
|
95
|
+
- Start coding "while waiting"
|
|
96
|
+
- Create files or scaffolding
|
|
97
|
+
- Run exploratory commands beyond what's needed for Step 0-3
|
|
98
|
+
- Say "I'll go ahead and start with Approach A" — that's the user's call
|
|
99
|
+
|
|
100
|
+
## When this skill ends
|
|
101
|
+
|
|
102
|
+
When the user confirms an approach, transition to implementation. You now have:
|
|
103
|
+
- Clear scope and boundaries from Step 0-2
|
|
104
|
+
- An agreed approach from Step 3
|
|
105
|
+
- Self-reviewed quality from Step 4
|
|
106
|
+
- Known risks flagged upfront
|
|
107
|
+
|
|
108
|
+
Carry these forward. If scope changes during implementation, pause and re-align rather than silently expanding.
|