declare-cc 1.0.8 → 2.0.0
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 -187
- package/dist/client/assets/index-BVuhr02G.css +1 -0
- package/dist/client/assets/index-DujGXAYw.js +9 -0
- package/dist/client/index.html +23 -0
- package/dist/index.js +17459 -0
- package/package.json +38 -45
- package/src/agents/prompts/00-research.md +90 -0
- package/src/agents/prompts/01-vision.md +38 -0
- package/src/agents/prompts/02-declarations.md +47 -0
- package/src/agents/prompts/03-milestones.md +43 -0
- package/src/agents/prompts/04-actions.md +90 -0
- package/src/agents/prompts/05-execution.md +63 -0
- package/src/agents/prompts/06-verification.md +104 -0
- package/LICENSE +0 -21
- package/agents/declare-codebase-mapper.md +0 -761
- package/agents/declare-debugger.md +0 -1198
- package/agents/declare-executor.md +0 -353
- package/agents/declare-integration-checker.md +0 -440
- package/agents/declare-plan-checker.md +0 -608
- package/agents/declare-planner.md +0 -1015
- package/agents/declare-research-synthesizer.md +0 -309
- package/agents/declare-researcher.md +0 -484
- package/agents/declare-roadmapper.md +0 -639
- package/agents/declare-verifier.md +0 -555
- package/bin/declare.js +0 -16
- package/bin/install.js +0 -1907
- package/commands/declare/actions.md +0 -113
- package/commands/declare/add-todo.md +0 -41
- package/commands/declare/audit.md +0 -76
- package/commands/declare/check-todos.md +0 -125
- package/commands/declare/complete-milestone.md +0 -215
- package/commands/declare/dashboard.md +0 -65
- package/commands/declare/debug.md +0 -162
- package/commands/declare/discuss.md +0 -65
- package/commands/declare/execute.md +0 -521
- package/commands/declare/future.md +0 -72
- package/commands/declare/health.md +0 -92
- package/commands/declare/help.md +0 -31
- package/commands/declare/init.md +0 -39
- package/commands/declare/map-codebase.md +0 -149
- package/commands/declare/milestones.md +0 -98
- package/commands/declare/new-cycle.md +0 -172
- package/commands/declare/new-project.md +0 -565
- package/commands/declare/pause.md +0 -138
- package/commands/declare/plan.md +0 -320
- package/commands/declare/prioritize.md +0 -65
- package/commands/declare/progress.md +0 -116
- package/commands/declare/quick.md +0 -119
- package/commands/declare/reapply-patches.md +0 -178
- package/commands/declare/research.md +0 -267
- package/commands/declare/resume.md +0 -146
- package/commands/declare/set-profile.md +0 -66
- package/commands/declare/settings.md +0 -119
- package/commands/declare/status.md +0 -65
- package/commands/declare/trace.md +0 -81
- package/commands/declare/update.md +0 -251
- package/commands/declare/verify.md +0 -65
- package/commands/declare/visualize.md +0 -74
- package/dist/declare-tools.cjs +0 -9439
- package/dist/public/app.js +0 -8331
- package/dist/public/index.html +0 -3939
- package/hooks/declare-activity.js +0 -106
- package/hooks/declare-check-update.js +0 -62
- package/hooks/declare-server.js +0 -116
- package/hooks/declare-statusline.js +0 -91
- package/scripts/build-hooks.js +0 -42
- package/scripts/release.js +0 -50
- package/templates/future.md +0 -4
- package/templates/milestones.md +0 -11
- package/workflows/actions.md +0 -89
- package/workflows/discuss.md +0 -476
- package/workflows/future.md +0 -185
- package/workflows/milestones.md +0 -87
- package/workflows/scope.md +0 -94
- package/workflows/verify.md +0 -504
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: declare:debug
|
|
3
|
-
description: Systematic debugging with persistent state across context resets
|
|
4
|
-
argument-hint: "[issue description]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Bash
|
|
8
|
-
- Task
|
|
9
|
-
- AskUserQuestion
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<objective>
|
|
13
|
-
Debug issues using scientific method with subagent isolation.
|
|
14
|
-
|
|
15
|
-
**Orchestrator role:** Gather symptoms, spawn declare-debugger agent, handle checkpoints, spawn continuations.
|
|
16
|
-
|
|
17
|
-
**Why subagent:** Investigation burns context fast (reading files, forming hypotheses, testing). Fresh context per investigation. Main context stays lean for user interaction.
|
|
18
|
-
</objective>
|
|
19
|
-
|
|
20
|
-
<context>
|
|
21
|
-
User's issue: $ARGUMENTS
|
|
22
|
-
|
|
23
|
-
Check for active sessions:
|
|
24
|
-
```bash
|
|
25
|
-
ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
|
|
26
|
-
```
|
|
27
|
-
</context>
|
|
28
|
-
|
|
29
|
-
<process>
|
|
30
|
-
|
|
31
|
-
## 0. Initialize Context
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
INIT=$(node dist/declare-tools.cjs get-state)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Extract `commit_docs` from init JSON. Resolve debugger model:
|
|
38
|
-
```bash
|
|
39
|
-
DEBUGGER_MODEL=$(node dist/declare-tools.cjs config-get debugger_model 2>/dev/null || echo "claude-opus-4-5")
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## 1. Check Active Sessions
|
|
43
|
-
|
|
44
|
-
If active sessions exist AND no $ARGUMENTS:
|
|
45
|
-
- List sessions with status, hypothesis, next action
|
|
46
|
-
- User picks number to resume OR describes new issue
|
|
47
|
-
|
|
48
|
-
If $ARGUMENTS provided OR user describes new issue:
|
|
49
|
-
- Continue to symptom gathering
|
|
50
|
-
|
|
51
|
-
## 2. Gather Symptoms (if new issue)
|
|
52
|
-
|
|
53
|
-
Use AskUserQuestion for each:
|
|
54
|
-
|
|
55
|
-
1. **Expected behavior** - What should happen?
|
|
56
|
-
2. **Actual behavior** - What happens instead?
|
|
57
|
-
3. **Error messages** - Any errors? (paste or describe)
|
|
58
|
-
4. **Timeline** - When did this start? Ever worked?
|
|
59
|
-
5. **Reproduction** - How do you trigger it?
|
|
60
|
-
|
|
61
|
-
After all gathered, confirm ready to investigate.
|
|
62
|
-
|
|
63
|
-
## 3. Spawn declare-debugger Agent
|
|
64
|
-
|
|
65
|
-
Fill prompt and spawn:
|
|
66
|
-
|
|
67
|
-
```markdown
|
|
68
|
-
<objective>
|
|
69
|
-
Investigate issue: {slug}
|
|
70
|
-
|
|
71
|
-
**Summary:** {trigger}
|
|
72
|
-
</objective>
|
|
73
|
-
|
|
74
|
-
<symptoms>
|
|
75
|
-
expected: {expected}
|
|
76
|
-
actual: {actual}
|
|
77
|
-
errors: {errors}
|
|
78
|
-
reproduction: {reproduction}
|
|
79
|
-
timeline: {timeline}
|
|
80
|
-
</symptoms>
|
|
81
|
-
|
|
82
|
-
<mode>
|
|
83
|
-
symptoms_prefilled: true
|
|
84
|
-
goal: find_and_fix
|
|
85
|
-
</mode>
|
|
86
|
-
|
|
87
|
-
<debug_file>
|
|
88
|
-
Create: .planning/debug/{slug}.md
|
|
89
|
-
</debug_file>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
Task(
|
|
94
|
-
prompt=filled_prompt,
|
|
95
|
-
subagent_type="declare-debugger",
|
|
96
|
-
model="{debugger_model}",
|
|
97
|
-
description="Debug {slug}"
|
|
98
|
-
)
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## 4. Handle Agent Return
|
|
102
|
-
|
|
103
|
-
**If `## ROOT CAUSE FOUND`:**
|
|
104
|
-
- Display root cause and evidence summary
|
|
105
|
-
- Offer options:
|
|
106
|
-
- "Fix now" - spawn fix subagent
|
|
107
|
-
- "Plan fix" - suggest `/declare:plan` to address root cause
|
|
108
|
-
- "Manual fix" - done
|
|
109
|
-
|
|
110
|
-
**If `## CHECKPOINT REACHED`:**
|
|
111
|
-
- Present checkpoint details to user
|
|
112
|
-
- Get user response
|
|
113
|
-
- Spawn continuation agent (see step 5)
|
|
114
|
-
|
|
115
|
-
**If `## INVESTIGATION INCONCLUSIVE`:**
|
|
116
|
-
- Show what was checked and eliminated
|
|
117
|
-
- Offer options:
|
|
118
|
-
- "Continue investigating" - spawn new agent with additional context
|
|
119
|
-
- "Manual investigation" - done
|
|
120
|
-
- "Add more context" - gather more symptoms, spawn again
|
|
121
|
-
|
|
122
|
-
## 5. Spawn Continuation Agent (After Checkpoint)
|
|
123
|
-
|
|
124
|
-
When user responds to checkpoint, spawn fresh agent:
|
|
125
|
-
|
|
126
|
-
```markdown
|
|
127
|
-
<objective>
|
|
128
|
-
Continue debugging {slug}. Evidence is in the debug file.
|
|
129
|
-
</objective>
|
|
130
|
-
|
|
131
|
-
<prior_state>
|
|
132
|
-
Debug file: @.planning/debug/{slug}.md
|
|
133
|
-
</prior_state>
|
|
134
|
-
|
|
135
|
-
<checkpoint_response>
|
|
136
|
-
**Type:** {checkpoint_type}
|
|
137
|
-
**Response:** {user_response}
|
|
138
|
-
</checkpoint_response>
|
|
139
|
-
|
|
140
|
-
<mode>
|
|
141
|
-
goal: find_and_fix
|
|
142
|
-
</mode>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
Task(
|
|
147
|
-
prompt=continuation_prompt,
|
|
148
|
-
subagent_type="declare-debugger",
|
|
149
|
-
model="{debugger_model}",
|
|
150
|
-
description="Continue debug {slug}"
|
|
151
|
-
)
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
</process>
|
|
155
|
-
|
|
156
|
-
<success_criteria>
|
|
157
|
-
- [ ] Active sessions checked
|
|
158
|
-
- [ ] Symptoms gathered (if new)
|
|
159
|
-
- [ ] declare-debugger spawned with context
|
|
160
|
-
- [ ] Checkpoints handled correctly
|
|
161
|
-
- [ ] Root cause confirmed before fixing
|
|
162
|
-
</success_criteria>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Gather milestone context through adaptive questioning before execution
|
|
3
|
-
allowed-tools:
|
|
4
|
-
- Read
|
|
5
|
-
- Write
|
|
6
|
-
- Bash
|
|
7
|
-
- Glob
|
|
8
|
-
- Grep
|
|
9
|
-
- AskUserQuestion
|
|
10
|
-
- Task
|
|
11
|
-
argument-hint: "<M-XX> [--auto]"
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
Extract implementation decisions that downstream agents need — the planner and executor will use CONTEXT.md to know what choices are locked.
|
|
15
|
-
|
|
16
|
-
**How it works:**
|
|
17
|
-
1. Analyze the milestone to identify gray areas (behavior, output, flow, etc.)
|
|
18
|
-
2. Present gray areas — user selects which to discuss
|
|
19
|
-
3. Deep-dive each selected area until satisfied
|
|
20
|
-
4. Create CONTEXT.md with decisions that guide planning and execution
|
|
21
|
-
|
|
22
|
-
**Output:** `CONTEXT.md` in the milestone folder — decisions clear enough that downstream agents can act without asking the user again.
|
|
23
|
-
|
|
24
|
-
**Step 1: Load the graph.**
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
node dist/declare-tools.cjs load-graph
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Parse the JSON output. If it contains an `error` field, tell the user to run `/declare:init` first and stop.
|
|
31
|
-
|
|
32
|
-
Extract milestone data. Identify the milestone matching `$ARGUMENTS` (e.g., `M-01`). If no milestone ID is provided, tell the user to provide one (e.g., `/declare:discuss M-01`) and stop.
|
|
33
|
-
|
|
34
|
-
If the milestone ID is not found in the graph, tell the user and stop:
|
|
35
|
-
```
|
|
36
|
-
Milestone [M-XX] not found.
|
|
37
|
-
|
|
38
|
-
Use /declare:status to see available milestones.
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**Step 2: Follow the discuss workflow.**
|
|
42
|
-
|
|
43
|
-
Read and follow all steps in:
|
|
44
|
-
|
|
45
|
-
@workflows/discuss.md
|
|
46
|
-
|
|
47
|
-
Pass the loaded graph state and milestone data into the workflow.
|
|
48
|
-
|
|
49
|
-
The milestone directory is: `.planning/milestones/[M-XX]-[slug]/`
|
|
50
|
-
|
|
51
|
-
CONTEXT.md is written to: `.planning/milestones/[M-XX]-[slug]/CONTEXT.md`
|
|
52
|
-
|
|
53
|
-
**Step 3: Commit context.**
|
|
54
|
-
|
|
55
|
-
After CONTEXT.md is written, commit it:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
node dist/declare-tools.cjs commit "docs(M-XX): capture milestone context" --files ".planning/milestones/[M-XX]-[slug]/CONTEXT.md"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Replace `M-XX` and `[M-XX]-[slug]` with the actual milestone ID and slug.
|
|
62
|
-
|
|
63
|
-
**Step 4: Handle auto-advance.**
|
|
64
|
-
|
|
65
|
-
Check for `--auto` in `$ARGUMENTS` and follow the auto-advance step in the workflow.
|