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: commit
|
|
3
|
-
description: Smart commit — run tests, update docs and memory, then commit to ensure knowledge is not lost
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Execute the smart commit flow. Core principle: **commit code and knowledge together**.
|
|
8
|
-
|
|
9
|
-
## 1. Run Tests
|
|
10
|
-
|
|
11
|
-
Check the test command in CLAUDE.md and execute it. If tests fail, stop the commit and report.
|
|
12
|
-
Skip this step for projects with no configured test command.
|
|
13
|
-
|
|
14
|
-
## 2. Update Knowledge Files
|
|
15
|
-
|
|
16
|
-
Check each in order (simple changes may skip):
|
|
17
|
-
|
|
18
|
-
**docs/progress.md** — Does this change constitute a milestone or significant progress? If so, append a record. Also check the "Working Context" section: are Key Commands, Current Workflow, Tools & Scripts, Environment State, and Gotchas up to date? These are your lifeline after compact — if they're stale, a post-compact Claude starts from scratch.
|
|
19
|
-
|
|
20
|
-
**docs/debug-log.md** — Are there debug sessions that need to be closed or updated?
|
|
21
|
-
|
|
22
|
-
**CLAUDE.md** — Are there new components, interfaces, known pitfalls, or architectural changes to sync? Did you create any helper scripts or tools this session? If so, register them in the "Project Tools" section of CLAUDE.md NOW — not in progress.md (which is ephemeral), but in CLAUDE.md (which is permanent).
|
|
23
|
-
|
|
24
|
-
**Auto Memory** — Are there cross-session lessons worth remembering? (bug patterns, API pitfalls, debugging tips)
|
|
25
|
-
Update memory files, keeping MEMORY.md under 200 lines.
|
|
26
|
-
|
|
27
|
-
## 3. Execute git commit
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
git status
|
|
31
|
-
git diff --staged && git diff
|
|
32
|
-
git log --oneline -5
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
- Selectively `git add` (don't use `git add -A`)
|
|
36
|
-
- Include docs/ and CLAUDE.md changes in the commit if modified
|
|
37
|
-
- Don't commit .env, credentials, or other sensitive files
|
|
38
|
-
- Follow existing commit message style
|
|
39
|
-
- Don't push (unless user explicitly requests it)
|
|
40
|
-
- If pre-commit hook fails, fix the issue and create a new commit (don't --amend)
|
|
1
|
+
---
|
|
2
|
+
name: commit
|
|
3
|
+
description: Smart commit — run tests, update docs and memory, then commit to ensure knowledge is not lost
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Execute the smart commit flow. Core principle: **commit code and knowledge together**.
|
|
8
|
+
|
|
9
|
+
## 1. Run Tests
|
|
10
|
+
|
|
11
|
+
Check the test command in CLAUDE.md and execute it. If tests fail, stop the commit and report.
|
|
12
|
+
Skip this step for projects with no configured test command.
|
|
13
|
+
|
|
14
|
+
## 2. Update Knowledge Files
|
|
15
|
+
|
|
16
|
+
Check each in order (simple changes may skip):
|
|
17
|
+
|
|
18
|
+
**docs/progress.md** — Does this change constitute a milestone or significant progress? If so, append a record. Also check the "Working Context" section: are Key Commands, Current Workflow, Tools & Scripts, Environment State, and Gotchas up to date? These are your lifeline after compact — if they're stale, a post-compact Claude starts from scratch.
|
|
19
|
+
|
|
20
|
+
**docs/debug-log.md** — Are there debug sessions that need to be closed or updated?
|
|
21
|
+
|
|
22
|
+
**CLAUDE.md** — Are there new components, interfaces, known pitfalls, or architectural changes to sync? Did you create any helper scripts or tools this session? If so, register them in the "Project Tools" section of CLAUDE.md NOW — not in progress.md (which is ephemeral), but in CLAUDE.md (which is permanent).
|
|
23
|
+
|
|
24
|
+
**Auto Memory** — Are there cross-session lessons worth remembering? (bug patterns, API pitfalls, debugging tips)
|
|
25
|
+
Update memory files, keeping MEMORY.md under 200 lines.
|
|
26
|
+
|
|
27
|
+
## 3. Execute git commit
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
git status
|
|
31
|
+
git diff --staged && git diff
|
|
32
|
+
git log --oneline -5
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Selectively `git add` (don't use `git add -A`)
|
|
36
|
+
- Include docs/ and CLAUDE.md changes in the commit if modified
|
|
37
|
+
- Don't commit .env, credentials, or other sensitive files
|
|
38
|
+
- Follow existing commit message style
|
|
39
|
+
- Don't push (unless user explicitly requests it)
|
|
40
|
+
- If pre-commit hook fails, fix the issue and create a new commit (don't --amend)
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: evaluate
|
|
3
|
-
description: Objectively evaluate external review/advice against your actual codebase knowledge. Use when pasting suggestions from reviewers, consultants, or AI who lack project context.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
You have deep context from investigating this codebase. The user is about to paste external advice from someone who may NOT have that context. Your job is to be an **honest bridge** — not a yes-man, not a contrarian.
|
|
7
|
-
|
|
8
|
-
## Instructions
|
|
9
|
-
|
|
10
|
-
For each suggestion or recommendation in the external input:
|
|
11
|
-
|
|
12
|
-
### 1. Understand the intent
|
|
13
|
-
|
|
14
|
-
What problem is this suggestion trying to solve? Separate the **goal** (often valid) from the **specific approach** (may not fit).
|
|
15
|
-
|
|
16
|
-
### 2. Check against reality
|
|
17
|
-
|
|
18
|
-
Use your actual codebase knowledge to verify:
|
|
19
|
-
- Does the thing they're describing actually exist / work the way they assume?
|
|
20
|
-
- Are there constraints they likely don't know about?
|
|
21
|
-
- Have we already tried or considered this?
|
|
22
|
-
- Does it conflict with decisions already made (and documented)?
|
|
23
|
-
|
|
24
|
-
### 3. Verdict per item
|
|
25
|
-
|
|
26
|
-
For each suggestion, give one of:
|
|
27
|
-
|
|
28
|
-
- **Accept** — Suggestion is sound and fits the codebase reality. State what action to take.
|
|
29
|
-
- **Accept with modification** — The goal is right but the approach needs adjustment. Explain what to change and why.
|
|
30
|
-
- **Reject** — Doesn't apply, is based on wrong assumptions, or conflicts with known constraints. Explain specifically why, citing what you know about the codebase.
|
|
31
|
-
- **Needs investigation** — You don't have enough context to judge. State what you'd need to check.
|
|
32
|
-
|
|
33
|
-
### 4. Output format
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
## Evaluation of [source description]
|
|
37
|
-
|
|
38
|
-
### [suggestion 1 summary]
|
|
39
|
-
Verdict: accept / accept with modification / reject / needs investigation
|
|
40
|
-
Reasoning: [cite specific codebase facts, not general opinions]
|
|
41
|
-
Action: [what to do, if accepted]
|
|
42
|
-
|
|
43
|
-
### [suggestion 2 summary]
|
|
44
|
-
...
|
|
45
|
-
|
|
46
|
-
## Summary
|
|
47
|
-
Accepted: N | Modified: N | Rejected: N | Needs investigation: N
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Rules
|
|
51
|
-
|
|
52
|
-
- **Be specific** — "This doesn't apply" is not enough. Say WHY, citing files/code/decisions you know about.
|
|
53
|
-
- **Separate intent from approach** — A reviewer can be right about the problem and wrong about the solution.
|
|
54
|
-
- **Don't reject based on effort** — "That's a lot of work" is not a valid reason to reject. Only reject on technical grounds.
|
|
55
|
-
- **Don't accept out of deference** — External reviewer ≠ automatically correct. Your codebase context is the advantage here.
|
|
56
|
-
- **Flag your own uncertainty** — If you're not sure about something, say "needs investigation", don't guess.
|
|
57
|
-
- **Preserve the user's judgment** — You evaluate, the user decides. Present evidence, not directives.
|
|
1
|
+
---
|
|
2
|
+
name: evaluate
|
|
3
|
+
description: Objectively evaluate external review/advice against your actual codebase knowledge. Use when pasting suggestions from reviewers, consultants, or AI who lack project context.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You have deep context from investigating this codebase. The user is about to paste external advice from someone who may NOT have that context. Your job is to be an **honest bridge** — not a yes-man, not a contrarian.
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
For each suggestion or recommendation in the external input:
|
|
11
|
+
|
|
12
|
+
### 1. Understand the intent
|
|
13
|
+
|
|
14
|
+
What problem is this suggestion trying to solve? Separate the **goal** (often valid) from the **specific approach** (may not fit).
|
|
15
|
+
|
|
16
|
+
### 2. Check against reality
|
|
17
|
+
|
|
18
|
+
Use your actual codebase knowledge to verify:
|
|
19
|
+
- Does the thing they're describing actually exist / work the way they assume?
|
|
20
|
+
- Are there constraints they likely don't know about?
|
|
21
|
+
- Have we already tried or considered this?
|
|
22
|
+
- Does it conflict with decisions already made (and documented)?
|
|
23
|
+
|
|
24
|
+
### 3. Verdict per item
|
|
25
|
+
|
|
26
|
+
For each suggestion, give one of:
|
|
27
|
+
|
|
28
|
+
- **Accept** — Suggestion is sound and fits the codebase reality. State what action to take.
|
|
29
|
+
- **Accept with modification** — The goal is right but the approach needs adjustment. Explain what to change and why.
|
|
30
|
+
- **Reject** — Doesn't apply, is based on wrong assumptions, or conflicts with known constraints. Explain specifically why, citing what you know about the codebase.
|
|
31
|
+
- **Needs investigation** — You don't have enough context to judge. State what you'd need to check.
|
|
32
|
+
|
|
33
|
+
### 4. Output format
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
## Evaluation of [source description]
|
|
37
|
+
|
|
38
|
+
### [suggestion 1 summary]
|
|
39
|
+
Verdict: accept / accept with modification / reject / needs investigation
|
|
40
|
+
Reasoning: [cite specific codebase facts, not general opinions]
|
|
41
|
+
Action: [what to do, if accepted]
|
|
42
|
+
|
|
43
|
+
### [suggestion 2 summary]
|
|
44
|
+
...
|
|
45
|
+
|
|
46
|
+
## Summary
|
|
47
|
+
Accepted: N | Modified: N | Rejected: N | Needs investigation: N
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- **Be specific** — "This doesn't apply" is not enough. Say WHY, citing files/code/decisions you know about.
|
|
53
|
+
- **Separate intent from approach** — A reviewer can be right about the problem and wrong about the solution.
|
|
54
|
+
- **Don't reject based on effort** — "That's a lot of work" is not a valid reason to reject. Only reject on technical grounds.
|
|
55
|
+
- **Don't accept out of deference** — External reviewer ≠ automatically correct. Your codebase context is the advantage here.
|
|
56
|
+
- **Flag your own uncertainty** — If you're not sure about something, say "needs investigation", don't guess.
|
|
57
|
+
- **Preserve the user's judgment** — You evaluate, the user decides. Present evidence, not directives.
|
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: investigate
|
|
3
|
-
description: Multi-agent cross-investigation. Two modes — research (explore from scratch) and review (challenge existing proposal). Spawns parallel agents per dimension, synthesizes with dialectical cross-check.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Mode detection
|
|
7
|
-
|
|
8
|
-
Determine which mode based on user input:
|
|
9
|
-
|
|
10
|
-
- **Research mode** — User gives a topic/question with no existing proposal. Goal: build comprehensive understanding before forming an opinion.
|
|
11
|
-
- **Review mode** — User gives an existing document, proposal, or design. Goal: stress-test it from multiple angles, find blind spots and weaknesses.
|
|
12
|
-
- **Simulate mode** — User gives a plan and wants to "dry run" it. Goal: walk through execution step by step, let hidden problems surface naturally.
|
|
13
|
-
|
|
14
|
-
State which mode you're using and why.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# Research Mode
|
|
19
|
-
|
|
20
|
-
You are about to research a topic or design a solution. **Do NOT go deep on one angle.** Your job is to see the full picture before converging.
|
|
21
|
-
|
|
22
|
-
## Step 1: Decompose into dimensions
|
|
23
|
-
|
|
24
|
-
Before researching anything, identify 3-5 independent dimensions of the problem. Ask yourself:
|
|
25
|
-
- What are the different angles this could be viewed from?
|
|
26
|
-
- What are the stakeholders / affected systems / competing concerns?
|
|
27
|
-
- What would a devil's advocate focus on?
|
|
28
|
-
|
|
29
|
-
Output the dimensions as a numbered list. Each dimension should be genuinely different, not sub-points of the same thing.
|
|
30
|
-
|
|
31
|
-
Example for "should we migrate from REST to GraphQL?":
|
|
32
|
-
1. **Performance & scalability** — latency, payload size, caching implications
|
|
33
|
-
2. **Developer experience** — learning curve, tooling, debugging
|
|
34
|
-
3. **Existing ecosystem** — what breaks, migration cost, backward compatibility
|
|
35
|
-
4. **Security** — query complexity attacks, authorization model changes
|
|
36
|
-
5. **Business** — timeline pressure, team skills, client requirements
|
|
37
|
-
|
|
38
|
-
## Step 2: Parallel investigation
|
|
39
|
-
|
|
40
|
-
Spawn one subagent per dimension. Each agent:
|
|
41
|
-
- Investigates ONLY its assigned dimension
|
|
42
|
-
- Reads relevant code/docs for that angle
|
|
43
|
-
- Lists findings with evidence (file paths, code references, data)
|
|
44
|
-
- Flags risks and unknowns specific to that dimension
|
|
45
|
-
- Does NOT try to propose a final solution — just reports findings
|
|
46
|
-
|
|
47
|
-
Launch agents in parallel, not sequentially.
|
|
48
|
-
|
|
49
|
-
## Step 3: Synthesize
|
|
50
|
-
|
|
51
|
-
After all agents return, synthesize in the main conversation:
|
|
52
|
-
|
|
53
|
-
### Cross-check matrix
|
|
54
|
-
For each dimension pair, ask: do the findings conflict?
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
| Dim 1 | Dim 2 | Dim 3 | Dim 4 |
|
|
58
|
-
Dim 1 | — | conflict? | aligned? | ? |
|
|
59
|
-
Dim 2 | | — | ? | ? |
|
|
60
|
-
...
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Blind spots
|
|
64
|
-
- What did NO agent cover? What's missing from all reports?
|
|
65
|
-
- What assumptions are shared across all dimensions (and might be wrong)?
|
|
66
|
-
- What would someone who disagrees with ALL agents say?
|
|
67
|
-
|
|
68
|
-
### Integrated findings
|
|
69
|
-
Combine into a unified picture. Flag where dimensions support each other and where they pull in different directions.
|
|
70
|
-
|
|
71
|
-
## Step 4: Present
|
|
72
|
-
|
|
73
|
-
Output the integrated findings to the user. For each key finding:
|
|
74
|
-
- Which dimensions support it
|
|
75
|
-
- Which dimensions challenge it
|
|
76
|
-
- Confidence level (strong / moderate / weak)
|
|
77
|
-
- What would change your mind
|
|
78
|
-
|
|
79
|
-
**Do NOT present a single recommendation without showing the tensions.** The user needs to see the trade-offs, not just your favorite answer.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
# Review Mode
|
|
84
|
-
|
|
85
|
-
You have an existing document, proposal, or design to evaluate. **Do NOT just validate it.** Your job is to find what's wrong, what's missing, and what would break.
|
|
86
|
-
|
|
87
|
-
## Step 1: Read and summarize
|
|
88
|
-
|
|
89
|
-
Read the document completely. Summarize its core claims and assumptions in 3-5 bullet points. Confirm with the user: "Is this what this document is proposing?"
|
|
90
|
-
|
|
91
|
-
## Step 2: Decompose into challenge dimensions
|
|
92
|
-
|
|
93
|
-
Identify 3-5 angles to challenge the proposal from:
|
|
94
|
-
- **Feasibility** — Can this actually be built/done as described? What's underestimated?
|
|
95
|
-
- **Alternatives** — What approaches did the proposal NOT consider? Why might they be better?
|
|
96
|
-
- **Failure modes** — How could this fail? What happens when assumptions are wrong?
|
|
97
|
-
- **Scalability / long-term** — Does this hold up at 10x scale or in 2 years?
|
|
98
|
-
- **Domain-specific** — Does this violate any known constraints of the specific domain?
|
|
99
|
-
|
|
100
|
-
Adapt dimensions to the document's domain. Not all apply to every proposal.
|
|
101
|
-
|
|
102
|
-
## Step 3: Parallel challenge agents
|
|
103
|
-
|
|
104
|
-
Spawn one agent per challenge dimension. Each agent:
|
|
105
|
-
- Takes the proposal's claims at face value, then tries to **break** them
|
|
106
|
-
- Reads relevant code/docs to verify the proposal's assumptions against reality
|
|
107
|
-
- Produces: what's solid, what's questionable, what's wrong, what's missing
|
|
108
|
-
- Includes evidence (code references, counterexamples, data)
|
|
109
|
-
|
|
110
|
-
## Step 4: Synthesize review
|
|
111
|
-
|
|
112
|
-
### Verdict per claim
|
|
113
|
-
For each core claim from Step 1:
|
|
114
|
-
- **Holds** — evidence supports it
|
|
115
|
-
- **Questionable** — partially true but has gaps
|
|
116
|
-
- **Wrong** — contradicted by evidence
|
|
117
|
-
- **Unverifiable** — no way to confirm from available information
|
|
118
|
-
|
|
119
|
-
### Blind spots
|
|
120
|
-
What did the document completely fail to consider?
|
|
121
|
-
|
|
122
|
-
### Strongest objection
|
|
123
|
-
If you had to argue AGAINST this proposal in one paragraph, what would you say?
|
|
124
|
-
|
|
125
|
-
### Constructive output
|
|
126
|
-
Don't just tear it apart. For each issue found, suggest what would fix it.
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
# Simulate Mode
|
|
131
|
-
|
|
132
|
-
You have a plan or proposal. Instead of analyzing it on paper, **walk through it as if you're actually executing it**, step by step. Let problems surface naturally.
|
|
133
|
-
|
|
134
|
-
## Step 1: Extract execution steps
|
|
135
|
-
|
|
136
|
-
Read the plan and break it into concrete sequential steps. For each step, identify:
|
|
137
|
-
- What it requires (inputs, resources, preconditions)
|
|
138
|
-
- What it produces (outputs, state changes)
|
|
139
|
-
- What it assumes
|
|
140
|
-
|
|
141
|
-
Present the steps and confirm with the user: "Is this the execution sequence?"
|
|
142
|
-
|
|
143
|
-
## Step 2: Assign simulation agents
|
|
144
|
-
|
|
145
|
-
Spawn one agent per phase or critical step. Each agent:
|
|
146
|
-
- **Actually attempts to execute** (or traces through execution) of their assigned step
|
|
147
|
-
- Works with real files, real code, real environment where possible
|
|
148
|
-
- If can't actually execute (e.g., deployment plan), does a detailed walkthrough: "At this point I would need X, but looking at the current state, X is not available because..."
|
|
149
|
-
- Reports for each step:
|
|
150
|
-
- **Went as planned** — step worked / would work as described
|
|
151
|
-
- **Missing precondition** — "Step 3 assumes X exists, but step 2 doesn't create it"
|
|
152
|
-
- **Harder than expected** — "This was described as 'configure Y' but actually requires Z, which takes much longer"
|
|
153
|
-
- **Hidden dependency** — "This step silently depends on A, which the plan doesn't mention"
|
|
154
|
-
- **Order problem** — "This needs to happen before step N, not after"
|
|
155
|
-
- **Ambiguity** — "The plan says 'set up the database' but doesn't specify which schema, migration, or seed data"
|
|
156
|
-
|
|
157
|
-
## Step 3: Compile discoveries
|
|
158
|
-
|
|
159
|
-
After all agents return, compile a simulation report:
|
|
160
|
-
|
|
161
|
-
### Execution timeline
|
|
162
|
-
Show the steps as actually executed (vs. as planned). Highlight where reality diverged from plan.
|
|
163
|
-
|
|
164
|
-
### Issues discovered
|
|
165
|
-
For each issue:
|
|
166
|
-
- **Severity**: blocker / significant / minor
|
|
167
|
-
- **When discovered**: which step
|
|
168
|
-
- **Root cause**: why the plan missed this
|
|
169
|
-
- **Fix**: specific change to the plan
|
|
170
|
-
|
|
171
|
-
### Missing steps
|
|
172
|
-
Steps that the plan didn't include but simulation revealed are necessary.
|
|
173
|
-
|
|
174
|
-
### Revised plan
|
|
175
|
-
Present the original plan with all fixes, missing steps, and reordering applied. Mark what changed and why.
|
|
176
|
-
|
|
177
|
-
## Step 4: Present to user
|
|
178
|
-
|
|
179
|
-
Show the simulation report. Let the user decide which fixes to adopt. The revised plan is a suggestion, not a mandate.
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## When to use this skill
|
|
184
|
-
|
|
185
|
-
- Researching a technology choice or architectural decision
|
|
186
|
-
- Investigating a complex bug with multiple possible root causes
|
|
187
|
-
- Evaluating a migration or major refactor
|
|
188
|
-
- **Reviewing an existing proposal, RFC, design doc, or plan**
|
|
189
|
-
- **Stress-testing your own plan before presenting it to stakeholders**
|
|
190
|
-
- **Simulating execution of a plan before committing to it — technical, engineering, or operational**
|
|
191
|
-
- Any situation where you catch yourself going deep on one angle and ignoring others
|
|
192
|
-
- When the user says "you're being narrow" or "what about X?" — that's a sign you needed this from the start
|
|
1
|
+
---
|
|
2
|
+
name: investigate
|
|
3
|
+
description: Multi-agent cross-investigation. Two modes — research (explore from scratch) and review (challenge existing proposal). Spawns parallel agents per dimension, synthesizes with dialectical cross-check.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Mode detection
|
|
7
|
+
|
|
8
|
+
Determine which mode based on user input:
|
|
9
|
+
|
|
10
|
+
- **Research mode** — User gives a topic/question with no existing proposal. Goal: build comprehensive understanding before forming an opinion.
|
|
11
|
+
- **Review mode** — User gives an existing document, proposal, or design. Goal: stress-test it from multiple angles, find blind spots and weaknesses.
|
|
12
|
+
- **Simulate mode** — User gives a plan and wants to "dry run" it. Goal: walk through execution step by step, let hidden problems surface naturally.
|
|
13
|
+
|
|
14
|
+
State which mode you're using and why.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Research Mode
|
|
19
|
+
|
|
20
|
+
You are about to research a topic or design a solution. **Do NOT go deep on one angle.** Your job is to see the full picture before converging.
|
|
21
|
+
|
|
22
|
+
## Step 1: Decompose into dimensions
|
|
23
|
+
|
|
24
|
+
Before researching anything, identify 3-5 independent dimensions of the problem. Ask yourself:
|
|
25
|
+
- What are the different angles this could be viewed from?
|
|
26
|
+
- What are the stakeholders / affected systems / competing concerns?
|
|
27
|
+
- What would a devil's advocate focus on?
|
|
28
|
+
|
|
29
|
+
Output the dimensions as a numbered list. Each dimension should be genuinely different, not sub-points of the same thing.
|
|
30
|
+
|
|
31
|
+
Example for "should we migrate from REST to GraphQL?":
|
|
32
|
+
1. **Performance & scalability** — latency, payload size, caching implications
|
|
33
|
+
2. **Developer experience** — learning curve, tooling, debugging
|
|
34
|
+
3. **Existing ecosystem** — what breaks, migration cost, backward compatibility
|
|
35
|
+
4. **Security** — query complexity attacks, authorization model changes
|
|
36
|
+
5. **Business** — timeline pressure, team skills, client requirements
|
|
37
|
+
|
|
38
|
+
## Step 2: Parallel investigation
|
|
39
|
+
|
|
40
|
+
Spawn one subagent per dimension. Each agent:
|
|
41
|
+
- Investigates ONLY its assigned dimension
|
|
42
|
+
- Reads relevant code/docs for that angle
|
|
43
|
+
- Lists findings with evidence (file paths, code references, data)
|
|
44
|
+
- Flags risks and unknowns specific to that dimension
|
|
45
|
+
- Does NOT try to propose a final solution — just reports findings
|
|
46
|
+
|
|
47
|
+
Launch agents in parallel, not sequentially.
|
|
48
|
+
|
|
49
|
+
## Step 3: Synthesize
|
|
50
|
+
|
|
51
|
+
After all agents return, synthesize in the main conversation:
|
|
52
|
+
|
|
53
|
+
### Cross-check matrix
|
|
54
|
+
For each dimension pair, ask: do the findings conflict?
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
| Dim 1 | Dim 2 | Dim 3 | Dim 4 |
|
|
58
|
+
Dim 1 | — | conflict? | aligned? | ? |
|
|
59
|
+
Dim 2 | | — | ? | ? |
|
|
60
|
+
...
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Blind spots
|
|
64
|
+
- What did NO agent cover? What's missing from all reports?
|
|
65
|
+
- What assumptions are shared across all dimensions (and might be wrong)?
|
|
66
|
+
- What would someone who disagrees with ALL agents say?
|
|
67
|
+
|
|
68
|
+
### Integrated findings
|
|
69
|
+
Combine into a unified picture. Flag where dimensions support each other and where they pull in different directions.
|
|
70
|
+
|
|
71
|
+
## Step 4: Present
|
|
72
|
+
|
|
73
|
+
Output the integrated findings to the user. For each key finding:
|
|
74
|
+
- Which dimensions support it
|
|
75
|
+
- Which dimensions challenge it
|
|
76
|
+
- Confidence level (strong / moderate / weak)
|
|
77
|
+
- What would change your mind
|
|
78
|
+
|
|
79
|
+
**Do NOT present a single recommendation without showing the tensions.** The user needs to see the trade-offs, not just your favorite answer.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
# Review Mode
|
|
84
|
+
|
|
85
|
+
You have an existing document, proposal, or design to evaluate. **Do NOT just validate it.** Your job is to find what's wrong, what's missing, and what would break.
|
|
86
|
+
|
|
87
|
+
## Step 1: Read and summarize
|
|
88
|
+
|
|
89
|
+
Read the document completely. Summarize its core claims and assumptions in 3-5 bullet points. Confirm with the user: "Is this what this document is proposing?"
|
|
90
|
+
|
|
91
|
+
## Step 2: Decompose into challenge dimensions
|
|
92
|
+
|
|
93
|
+
Identify 3-5 angles to challenge the proposal from:
|
|
94
|
+
- **Feasibility** — Can this actually be built/done as described? What's underestimated?
|
|
95
|
+
- **Alternatives** — What approaches did the proposal NOT consider? Why might they be better?
|
|
96
|
+
- **Failure modes** — How could this fail? What happens when assumptions are wrong?
|
|
97
|
+
- **Scalability / long-term** — Does this hold up at 10x scale or in 2 years?
|
|
98
|
+
- **Domain-specific** — Does this violate any known constraints of the specific domain?
|
|
99
|
+
|
|
100
|
+
Adapt dimensions to the document's domain. Not all apply to every proposal.
|
|
101
|
+
|
|
102
|
+
## Step 3: Parallel challenge agents
|
|
103
|
+
|
|
104
|
+
Spawn one agent per challenge dimension. Each agent:
|
|
105
|
+
- Takes the proposal's claims at face value, then tries to **break** them
|
|
106
|
+
- Reads relevant code/docs to verify the proposal's assumptions against reality
|
|
107
|
+
- Produces: what's solid, what's questionable, what's wrong, what's missing
|
|
108
|
+
- Includes evidence (code references, counterexamples, data)
|
|
109
|
+
|
|
110
|
+
## Step 4: Synthesize review
|
|
111
|
+
|
|
112
|
+
### Verdict per claim
|
|
113
|
+
For each core claim from Step 1:
|
|
114
|
+
- **Holds** — evidence supports it
|
|
115
|
+
- **Questionable** — partially true but has gaps
|
|
116
|
+
- **Wrong** — contradicted by evidence
|
|
117
|
+
- **Unverifiable** — no way to confirm from available information
|
|
118
|
+
|
|
119
|
+
### Blind spots
|
|
120
|
+
What did the document completely fail to consider?
|
|
121
|
+
|
|
122
|
+
### Strongest objection
|
|
123
|
+
If you had to argue AGAINST this proposal in one paragraph, what would you say?
|
|
124
|
+
|
|
125
|
+
### Constructive output
|
|
126
|
+
Don't just tear it apart. For each issue found, suggest what would fix it.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
# Simulate Mode
|
|
131
|
+
|
|
132
|
+
You have a plan or proposal. Instead of analyzing it on paper, **walk through it as if you're actually executing it**, step by step. Let problems surface naturally.
|
|
133
|
+
|
|
134
|
+
## Step 1: Extract execution steps
|
|
135
|
+
|
|
136
|
+
Read the plan and break it into concrete sequential steps. For each step, identify:
|
|
137
|
+
- What it requires (inputs, resources, preconditions)
|
|
138
|
+
- What it produces (outputs, state changes)
|
|
139
|
+
- What it assumes
|
|
140
|
+
|
|
141
|
+
Present the steps and confirm with the user: "Is this the execution sequence?"
|
|
142
|
+
|
|
143
|
+
## Step 2: Assign simulation agents
|
|
144
|
+
|
|
145
|
+
Spawn one agent per phase or critical step. Each agent:
|
|
146
|
+
- **Actually attempts to execute** (or traces through execution) of their assigned step
|
|
147
|
+
- Works with real files, real code, real environment where possible
|
|
148
|
+
- If can't actually execute (e.g., deployment plan), does a detailed walkthrough: "At this point I would need X, but looking at the current state, X is not available because..."
|
|
149
|
+
- Reports for each step:
|
|
150
|
+
- **Went as planned** — step worked / would work as described
|
|
151
|
+
- **Missing precondition** — "Step 3 assumes X exists, but step 2 doesn't create it"
|
|
152
|
+
- **Harder than expected** — "This was described as 'configure Y' but actually requires Z, which takes much longer"
|
|
153
|
+
- **Hidden dependency** — "This step silently depends on A, which the plan doesn't mention"
|
|
154
|
+
- **Order problem** — "This needs to happen before step N, not after"
|
|
155
|
+
- **Ambiguity** — "The plan says 'set up the database' but doesn't specify which schema, migration, or seed data"
|
|
156
|
+
|
|
157
|
+
## Step 3: Compile discoveries
|
|
158
|
+
|
|
159
|
+
After all agents return, compile a simulation report:
|
|
160
|
+
|
|
161
|
+
### Execution timeline
|
|
162
|
+
Show the steps as actually executed (vs. as planned). Highlight where reality diverged from plan.
|
|
163
|
+
|
|
164
|
+
### Issues discovered
|
|
165
|
+
For each issue:
|
|
166
|
+
- **Severity**: blocker / significant / minor
|
|
167
|
+
- **When discovered**: which step
|
|
168
|
+
- **Root cause**: why the plan missed this
|
|
169
|
+
- **Fix**: specific change to the plan
|
|
170
|
+
|
|
171
|
+
### Missing steps
|
|
172
|
+
Steps that the plan didn't include but simulation revealed are necessary.
|
|
173
|
+
|
|
174
|
+
### Revised plan
|
|
175
|
+
Present the original plan with all fixes, missing steps, and reordering applied. Mark what changed and why.
|
|
176
|
+
|
|
177
|
+
## Step 4: Present to user
|
|
178
|
+
|
|
179
|
+
Show the simulation report. Let the user decide which fixes to adopt. The revised plan is a suggestion, not a mandate.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## When to use this skill
|
|
184
|
+
|
|
185
|
+
- Researching a technology choice or architectural decision
|
|
186
|
+
- Investigating a complex bug with multiple possible root causes
|
|
187
|
+
- Evaluating a migration or major refactor
|
|
188
|
+
- **Reviewing an existing proposal, RFC, design doc, or plan**
|
|
189
|
+
- **Stress-testing your own plan before presenting it to stakeholders**
|
|
190
|
+
- **Simulating execution of a plan before committing to it — technical, engineering, or operational**
|
|
191
|
+
- Any situation where you catch yourself going deep on one angle and ignoring others
|
|
192
|
+
- When the user says "you're being narrow" or "what about X?" — that's a sign you needed this from the start
|