declare-cc 1.0.7 → 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 -9428
- package/dist/public/app.js +0 -9086
- package/dist/public/index.html +0 -4292
- 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,178 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Review and reapply locally-modified declare-cc files after an update
|
|
3
|
-
allowed-tools:
|
|
4
|
-
- Read
|
|
5
|
-
- Write
|
|
6
|
-
- Edit
|
|
7
|
-
- Bash
|
|
8
|
-
- Glob
|
|
9
|
-
- Grep
|
|
10
|
-
- AskUserQuestion
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<purpose>
|
|
14
|
-
After a declare-cc update wipes and reinstalls .claude/commands/declare/ files, this command lets you review each locally-modified file that was backed up, preview what changed, and selectively merge your modifications into the new installed version.
|
|
15
|
-
</purpose>
|
|
16
|
-
|
|
17
|
-
<process>
|
|
18
|
-
|
|
19
|
-
## Step 1: Detect backed-up patches
|
|
20
|
-
|
|
21
|
-
Read the backup metadata file (repo-relative):
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
cat .planning/declare-local-patches/backup-meta.json 2>/dev/null
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**If the file does not exist or the directory is empty:**
|
|
28
|
-
```
|
|
29
|
-
No local patches found. Nothing to reapply.
|
|
30
|
-
|
|
31
|
-
Local patches are saved automatically when you run /declare:update
|
|
32
|
-
and locally-modified files are detected before the update runs.
|
|
33
|
-
```
|
|
34
|
-
Exit.
|
|
35
|
-
|
|
36
|
-
Parse the JSON. It contains:
|
|
37
|
-
- `from_version`: the version that was installed when the backup was made
|
|
38
|
-
- `backup_date`: ISO timestamp of the backup
|
|
39
|
-
- `files`: array of `{ path, backup_name }` entries
|
|
40
|
-
|
|
41
|
-
## Step 2: Show patch summary
|
|
42
|
-
|
|
43
|
-
Read the current installed version:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
node dist/declare-tools.cjs help
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Parse the version field.
|
|
50
|
-
|
|
51
|
-
Display:
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
## Local Patches to Reapply
|
|
55
|
-
|
|
56
|
-
**Backed up from:** v{from_version}
|
|
57
|
-
**Backed up on:** {backup_date}
|
|
58
|
-
**Current version:** v{current_version}
|
|
59
|
-
**Files backed up:** {count}
|
|
60
|
-
|
|
61
|
-
| # | File | Status |
|
|
62
|
-
|---|------|--------|
|
|
63
|
-
| 1 | {path} | Pending |
|
|
64
|
-
| 2 | {path} | Pending |
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Step 3: Process each file
|
|
68
|
-
|
|
69
|
-
Iterate over each entry in `files`.
|
|
70
|
-
|
|
71
|
-
### 3a. Read both versions
|
|
72
|
-
|
|
73
|
-
Read the backed-up (user's modified) copy:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
cat ".planning/declare-local-patches/{backup_name}"
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Read the current installed copy:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
cat "{path}"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### 3b. Compare
|
|
86
|
-
|
|
87
|
-
If the two files are identical: report `Skipped (already upstream)` and continue to the next file.
|
|
88
|
-
|
|
89
|
-
If they differ: proceed to 3c.
|
|
90
|
-
|
|
91
|
-
### 3c. Show diff preview and ask
|
|
92
|
-
|
|
93
|
-
Display a diff preview. Describe the key differences in plain language (do not dump raw diff output). For example:
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
--- Diff preview: {path} ---
|
|
97
|
-
|
|
98
|
-
Your backed-up version adds/changes:
|
|
99
|
-
- [describe what the user's version has that the new version does not, in plain language]
|
|
100
|
-
|
|
101
|
-
The new installed version adds/changes:
|
|
102
|
-
- [describe what the new upstream version has that the backup does not]
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Use AskUserQuestion:
|
|
106
|
-
- Question: "What would you like to do with .claude/commands/declare/{filename}?"
|
|
107
|
-
- Options:
|
|
108
|
-
- "Keep my version (overwrite installed file with backup)"
|
|
109
|
-
- "Keep new version (discard backup for this file)"
|
|
110
|
-
- "Merge manually (I will edit the file after this command)"
|
|
111
|
-
|
|
112
|
-
**If user chooses "Keep my version":**
|
|
113
|
-
- Write the backed-up content to `{path}`.
|
|
114
|
-
- Report: `Reapplied — your version is active`.
|
|
115
|
-
|
|
116
|
-
**If user chooses "Keep new version":**
|
|
117
|
-
- Do not modify `{path}`.
|
|
118
|
-
- Report: `Kept new version — backup preserved in .planning/declare-local-patches/`.
|
|
119
|
-
|
|
120
|
-
**If user chooses "Merge manually":**
|
|
121
|
-
- Do not modify `{path}`.
|
|
122
|
-
- Display:
|
|
123
|
-
```
|
|
124
|
-
Backed-up copy: .planning/declare-local-patches/{backup_name}
|
|
125
|
-
Installed copy: {path}
|
|
126
|
-
Edit {path} manually, using the backup as reference.
|
|
127
|
-
```
|
|
128
|
-
- Report: `Deferred — manual merge required`.
|
|
129
|
-
|
|
130
|
-
## Step 4: Update status table
|
|
131
|
-
|
|
132
|
-
After processing all files, display the final status table:
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
## Reapply Complete
|
|
136
|
-
|
|
137
|
-
| # | File | Result |
|
|
138
|
-
|---|------|--------|
|
|
139
|
-
| 1 | {path} | Reapplied |
|
|
140
|
-
| 2 | {path} | Skipped (already upstream) |
|
|
141
|
-
| 3 | {path} | Kept new version |
|
|
142
|
-
| 4 | {path} | Deferred (manual merge) |
|
|
143
|
-
|
|
144
|
-
{reapplied_count} file(s) reapplied. {skipped_count} skipped. {deferred_count} deferred.
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Step 5: Cleanup option
|
|
148
|
-
|
|
149
|
-
Ask:
|
|
150
|
-
|
|
151
|
-
Use AskUserQuestion:
|
|
152
|
-
- Question: "What would you like to do with the backup files in .planning/declare-local-patches/?"
|
|
153
|
-
- Options:
|
|
154
|
-
- "Keep backups (preserve for reference)"
|
|
155
|
-
- "Remove backups (clean up patch directory)"
|
|
156
|
-
|
|
157
|
-
**If user chooses "Remove backups":**
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
rm -rf .planning/declare-local-patches
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Display: `Backup directory removed.`
|
|
164
|
-
|
|
165
|
-
**If user chooses "Keep backups":**
|
|
166
|
-
Display: `Backups preserved at .planning/declare-local-patches/`
|
|
167
|
-
|
|
168
|
-
</process>
|
|
169
|
-
|
|
170
|
-
<success_criteria>
|
|
171
|
-
- [ ] backup-meta.json located and parsed
|
|
172
|
-
- [ ] Version comparison shown (backed-up from vs current)
|
|
173
|
-
- [ ] Each file diff previewed in plain language
|
|
174
|
-
- [ ] User confirms action per file (keep mine / keep new / manual)
|
|
175
|
-
- [ ] Chosen versions written correctly
|
|
176
|
-
- [ ] Final status table shown
|
|
177
|
-
- [ ] Cleanup option offered
|
|
178
|
-
</success_criteria>
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Research how to implement a milestone (spawns 4 parallel researchers, then synthesizes)
|
|
3
|
-
allowed-tools:
|
|
4
|
-
- Read
|
|
5
|
-
- Write
|
|
6
|
-
- Bash
|
|
7
|
-
- Glob
|
|
8
|
-
- Grep
|
|
9
|
-
- Task
|
|
10
|
-
argument-hint: "[M-XX]"
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
Research how to implement a milestone by spawning 4 parallel researcher agents (stack, features, architecture, pitfalls) then synthesizing their findings into a unified RESEARCH.md.
|
|
14
|
-
|
|
15
|
-
**Step 1: Load graph and validate milestone.**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
node dist/declare-tools.cjs load-graph
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Parse the JSON output. If it contains an `error` field, tell the user to run `/declare:init` first and stop.
|
|
22
|
-
|
|
23
|
-
If `$ARGUMENTS` contains a milestone ID (e.g., `M-02`), use it directly. Otherwise, list all pending milestones and ask the user to specify one.
|
|
24
|
-
|
|
25
|
-
Extract from the graph the milestone's `title`, `goal`, and which declaration IDs it `realizes` (e.g., `D-01`). If the milestone is not found, tell the user and stop.
|
|
26
|
-
|
|
27
|
-
Note the milestone slug by converting the milestone title to lowercase with hyphens (e.g., "Milestone research pipeline" → "milestone-research-pipeline"). The milestone folder path is `.planning/milestones/M-XX-slug/`.
|
|
28
|
-
|
|
29
|
-
**Step 2: Check for existing research.**
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
ls .planning/milestones/M-XX-slug/RESEARCH.md 2>/dev/null
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
If RESEARCH.md already exists:
|
|
36
|
-
- Display: "RESEARCH.md already exists for M-XX. Options: 1) Re-research (overwrite), 2) View existing, 3) Cancel"
|
|
37
|
-
- Wait for user choice before continuing.
|
|
38
|
-
|
|
39
|
-
If it does not exist, continue.
|
|
40
|
-
|
|
41
|
-
**Step 3: Check for existing CONTEXT.md.**
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
ls .planning/milestones/M-XX-slug/CONTEXT.md 2>/dev/null
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If CONTEXT.md exists, it contains user decisions that constrain research. Load it and pass it to all researcher agents.
|
|
48
|
-
|
|
49
|
-
**Step 4: Display research banner.**
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
## Researching: M-XX — [milestoneTitle]
|
|
53
|
-
|
|
54
|
-
**Declares:** [declaration IDs and statements]
|
|
55
|
-
**Goal:** [milestone goal or title]
|
|
56
|
-
**Mode:** Parallel research (4 agents → synthesizer)
|
|
57
|
-
|
|
58
|
-
Spawning 4 researchers: STACK, FEATURES, ARCHITECTURE, PITFALLS...
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**Step 5: Spawn 4 parallel declare-researcher agents.**
|
|
62
|
-
|
|
63
|
-
Spawn all 4 Task agents in the same response so they run in parallel. Each agent researches a specific domain.
|
|
64
|
-
|
|
65
|
-
For each researcher, the prompt follows this pattern (fill in milestone-specific context). Each researcher Task is spawned with `model: "sonnet"`.
|
|
66
|
-
|
|
67
|
-
**STACK researcher** (model: `sonnet`):
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
First, read agents/declare-researcher.md for your role and instructions.
|
|
71
|
-
|
|
72
|
-
<research_domain>STACK</research_domain>
|
|
73
|
-
|
|
74
|
-
<objective>
|
|
75
|
-
Research the standard technology stack for implementing milestone M-XX: [milestoneTitle]
|
|
76
|
-
|
|
77
|
-
Investigate: What libraries, frameworks, and tools form the standard stack for this domain? What versions are current? What are the "blessed" combinations experts use?
|
|
78
|
-
</objective>
|
|
79
|
-
|
|
80
|
-
<milestone_context>
|
|
81
|
-
Milestone: M-XX — [milestoneTitle]
|
|
82
|
-
Goal: [milestoneGoal]
|
|
83
|
-
Realizes: [declarationIds and statements]
|
|
84
|
-
[contextMdContent if exists]
|
|
85
|
-
</milestone_context>
|
|
86
|
-
|
|
87
|
-
<output>
|
|
88
|
-
Write your findings to: .planning/milestones/M-XX-slug/STACK.md
|
|
89
|
-
Use the RESEARCH.md structure from your instructions but title it "STACK Research".
|
|
90
|
-
Do NOT commit — the synthesizer will commit everything together.
|
|
91
|
-
</output>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
**FEATURES researcher** (model: `sonnet`):
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
First, read agents/declare-researcher.md for your role and instructions.
|
|
98
|
-
|
|
99
|
-
<research_domain>FEATURES</research_domain>
|
|
100
|
-
|
|
101
|
-
<objective>
|
|
102
|
-
Research the features and capabilities required to implement milestone M-XX: [milestoneTitle]
|
|
103
|
-
|
|
104
|
-
Investigate: What capabilities are table stakes (must-have)? What are differentiators? What should be deferred to later milestones? What do users/implementers actually need?
|
|
105
|
-
</objective>
|
|
106
|
-
|
|
107
|
-
<milestone_context>
|
|
108
|
-
Milestone: M-XX — [milestoneTitle]
|
|
109
|
-
Goal: [milestoneGoal]
|
|
110
|
-
Realizes: [declarationIds and statements]
|
|
111
|
-
[contextMdContent if exists]
|
|
112
|
-
</milestone_context>
|
|
113
|
-
|
|
114
|
-
<output>
|
|
115
|
-
Write your findings to: .planning/milestones/M-XX-slug/FEATURES.md
|
|
116
|
-
Use the RESEARCH.md structure from your instructions but title it "FEATURES Research".
|
|
117
|
-
Do NOT commit — the synthesizer will commit everything together.
|
|
118
|
-
</output>
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**ARCHITECTURE researcher** (model: `sonnet`):
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
First, read agents/declare-researcher.md for your role and instructions.
|
|
125
|
-
|
|
126
|
-
<research_domain>ARCHITECTURE</research_domain>
|
|
127
|
-
|
|
128
|
-
<objective>
|
|
129
|
-
Research the architecture patterns for implementing milestone M-XX: [milestoneTitle]
|
|
130
|
-
|
|
131
|
-
Investigate: What are the standard component structures? What data flows are typical? What design patterns do experts use? What project organization works best?
|
|
132
|
-
</objective>
|
|
133
|
-
|
|
134
|
-
<milestone_context>
|
|
135
|
-
Milestone: M-XX — [milestoneTitle]
|
|
136
|
-
Goal: [milestoneGoal]
|
|
137
|
-
Realizes: [declarationIds and statements]
|
|
138
|
-
[contextMdContent if exists]
|
|
139
|
-
</milestone_context>
|
|
140
|
-
|
|
141
|
-
<output>
|
|
142
|
-
Write your findings to: .planning/milestones/M-XX-slug/ARCHITECTURE.md
|
|
143
|
-
Use the RESEARCH.md structure from your instructions but title it "ARCHITECTURE Research".
|
|
144
|
-
Do NOT commit — the synthesizer will commit everything together.
|
|
145
|
-
</output>
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**PITFALLS researcher** (model: `sonnet`):
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
First, read agents/declare-researcher.md for your role and instructions.
|
|
152
|
-
|
|
153
|
-
<research_domain>PITFALLS</research_domain>
|
|
154
|
-
|
|
155
|
-
<objective>
|
|
156
|
-
Research common pitfalls and failure modes when implementing milestone M-XX: [milestoneTitle]
|
|
157
|
-
|
|
158
|
-
Investigate: What do beginners get wrong? What causes rewrites? What performance, security, or correctness traps exist? What should never be hand-rolled?
|
|
159
|
-
</objective>
|
|
160
|
-
|
|
161
|
-
<milestone_context>
|
|
162
|
-
Milestone: M-XX — [milestoneTitle]
|
|
163
|
-
Goal: [milestoneGoal]
|
|
164
|
-
Realizes: [declarationIds and statements]
|
|
165
|
-
[contextMdContent if exists]
|
|
166
|
-
</milestone_context>
|
|
167
|
-
|
|
168
|
-
<output>
|
|
169
|
-
Write your findings to: .planning/milestones/M-XX-slug/PITFALLS.md
|
|
170
|
-
Use the RESEARCH.md structure from your instructions but title it "PITFALLS Research".
|
|
171
|
-
Do NOT commit — the synthesizer will commit everything together.
|
|
172
|
-
</output>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Use one Task tool call per researcher. Spawn all 4 in the same response.
|
|
176
|
-
|
|
177
|
-
**Step 6: After all 4 researchers complete, display interim summary.**
|
|
178
|
-
|
|
179
|
-
```
|
|
180
|
-
### Research Phase Complete
|
|
181
|
-
|
|
182
|
-
| Domain | Status | Key Finding |
|
|
183
|
-
|--------|--------|-------------|
|
|
184
|
-
| STACK | Done | [brief summary from agent return] |
|
|
185
|
-
| FEATURES | Done | [brief summary from agent return] |
|
|
186
|
-
| ARCHITECTURE | Done | [brief summary from agent return] |
|
|
187
|
-
| PITFALLS | Done | [brief summary from agent return] |
|
|
188
|
-
|
|
189
|
-
Spawning synthesizer...
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
If any researcher returned `## RESEARCH BLOCKED`, surface the blocker to the user before spawning the synthesizer. Ask whether to continue with partial research or abort.
|
|
193
|
-
|
|
194
|
-
**Step 7: Spawn declare-research-synthesizer** (model: `sonnet`).
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
First, read agents/declare-research-synthesizer.md for your role and instructions.
|
|
198
|
-
|
|
199
|
-
<objective>
|
|
200
|
-
Synthesize the 4 research files for milestone M-XX: [milestoneTitle] into a unified RESEARCH.md.
|
|
201
|
-
</objective>
|
|
202
|
-
|
|
203
|
-
<milestone_context>
|
|
204
|
-
Milestone: M-XX — [milestoneTitle]
|
|
205
|
-
Goal: [milestoneGoal]
|
|
206
|
-
Realizes: [declarationIds and statements]
|
|
207
|
-
Milestone folder: .planning/milestones/M-XX-slug/
|
|
208
|
-
</milestone_context>
|
|
209
|
-
|
|
210
|
-
<research_files>
|
|
211
|
-
- .planning/milestones/M-XX-slug/STACK.md
|
|
212
|
-
- .planning/milestones/M-XX-slug/FEATURES.md
|
|
213
|
-
- .planning/milestones/M-XX-slug/ARCHITECTURE.md
|
|
214
|
-
- .planning/milestones/M-XX-slug/PITFALLS.md
|
|
215
|
-
</research_files>
|
|
216
|
-
|
|
217
|
-
<output>
|
|
218
|
-
Write synthesized output to: .planning/milestones/M-XX-slug/RESEARCH.md
|
|
219
|
-
Commit all research files (the 4 domain files + RESEARCH.md) together:
|
|
220
|
-
node dist/declare-tools.cjs commit "docs(M-XX): complete milestone research" --files .planning/milestones/M-XX-slug/
|
|
221
|
-
</output>
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Use one Task tool call for the synthesizer.
|
|
225
|
-
|
|
226
|
-
**Step 8: Present results.**
|
|
227
|
-
|
|
228
|
-
After the synthesizer returns `## SYNTHESIS COMPLETE`:
|
|
229
|
-
|
|
230
|
-
```
|
|
231
|
-
## Research Complete: M-XX — [milestoneTitle]
|
|
232
|
-
|
|
233
|
-
**Files created:**
|
|
234
|
-
- .planning/milestones/M-XX-slug/STACK.md
|
|
235
|
-
- .planning/milestones/M-XX-slug/FEATURES.md
|
|
236
|
-
- .planning/milestones/M-XX-slug/ARCHITECTURE.md
|
|
237
|
-
- .planning/milestones/M-XX-slug/PITFALLS.md
|
|
238
|
-
- .planning/milestones/M-XX-slug/RESEARCH.md
|
|
239
|
-
|
|
240
|
-
**Overall confidence:** [from synthesizer]
|
|
241
|
-
|
|
242
|
-
### Key Findings
|
|
243
|
-
[3-5 bullets from synthesizer executive summary]
|
|
244
|
-
|
|
245
|
-
### Planning Implications
|
|
246
|
-
[Suggested action groups from synthesizer]
|
|
247
|
-
|
|
248
|
-
**Next step:** Run `/declare:actions M-XX` to derive action plans informed by this research.
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
**Error handling:**
|
|
252
|
-
|
|
253
|
-
- If `load-graph` returns an error: stop and ask user to run `/declare:init`.
|
|
254
|
-
- If the milestone folder does not exist: run `mkdir -p .planning/milestones/M-XX-slug/` before spawning researchers.
|
|
255
|
-
- If a researcher agent fails: log the failure, continue with the other 3 researchers, then inform the synthesizer about the missing file.
|
|
256
|
-
- If synthesis is blocked: display the synthesizer's `## SYNTHESIS BLOCKED` message and ask the user how to proceed.
|
|
257
|
-
- If RESEARCH.md already exists and user chose to re-research: the synthesizer will overwrite it.
|
|
258
|
-
|
|
259
|
-
**Key patterns:**
|
|
260
|
-
|
|
261
|
-
- 4 parallel researchers run concurrently for speed (stack, features, architecture, pitfalls).
|
|
262
|
-
- Researchers write domain files but do NOT commit.
|
|
263
|
-
- Synthesizer reads all 4 files, writes RESEARCH.md, and commits everything in one shot.
|
|
264
|
-
- Research informs `/declare:actions` planning — always suggest it as next step.
|
|
265
|
-
- CONTEXT.md (from `/declare:discuss`) constrains research when present.
|
|
266
|
-
- Milestone folder path follows `.planning/milestones/M-XX-slug/` convention.
|
|
267
|
-
- Use repo-relative paths in all file references and agent prompts.
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: declare:resume
|
|
3
|
-
description: Restore full project context from a previous session and route to the next action
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Bash
|
|
7
|
-
- Glob
|
|
8
|
-
- Grep
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Restore project context from a previous session and route to the appropriate next action.
|
|
12
|
-
|
|
13
|
-
**Step 1: Check for handoff file.**
|
|
14
|
-
|
|
15
|
-
Check whether `.continue-here.md` exists at the project root:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
ls .continue-here.md 2>/dev/null && echo "found" || echo "not found"
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
**Step 2a: If `.continue-here.md` exists — restore from handoff.**
|
|
22
|
-
|
|
23
|
-
Read `.continue-here.md`.
|
|
24
|
-
|
|
25
|
-
Display its contents in a clean, structured format:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
## Resuming from Saved Context
|
|
29
|
-
|
|
30
|
-
**Paused at:** [Paused timestamp from file]
|
|
31
|
-
**Position:** [Position from file]
|
|
32
|
-
|
|
33
|
-
### Active Milestone
|
|
34
|
-
|
|
35
|
-
[Active milestone details from file]
|
|
36
|
-
|
|
37
|
-
### Remaining Actions
|
|
38
|
-
|
|
39
|
-
[Remaining actions list from file]
|
|
40
|
-
|
|
41
|
-
### Decisions Made Last Session
|
|
42
|
-
|
|
43
|
-
[Decisions from file]
|
|
44
|
-
|
|
45
|
-
### Blockers
|
|
46
|
-
|
|
47
|
-
[Blockers from file]
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Then run `load-graph` to get fresh action statuses (actions may have changed since the pause):
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
node dist/declare-tools.cjs load-graph
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
If graph loads successfully, cross-reference: if any actions listed as PENDING in `.continue-here.md` are now DONE in the graph, note that:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
Note: Since pausing, [A-XX] has been completed.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Proceed to Step 3 (routing).
|
|
63
|
-
|
|
64
|
-
**Step 2b: If `.continue-here.md` does not exist — load from STATE.md.**
|
|
65
|
-
|
|
66
|
-
Run:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
node dist/declare-tools.cjs get-state
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
node dist/declare-tools.cjs load-graph
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
If `get-state` returns an error (STATE.md not found):
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
No project state found. Run /declare:new-project to initialize.
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Then stop.
|
|
83
|
-
|
|
84
|
-
Display the state context:
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
## Resuming from STATE.md
|
|
88
|
-
|
|
89
|
-
**Current Position:** [currentPosition]
|
|
90
|
-
**Last Activity:** [most recent session history entry, if any]
|
|
91
|
-
|
|
92
|
-
### Recent Work
|
|
93
|
-
|
|
94
|
-
[recentWork from STATE.md]
|
|
95
|
-
|
|
96
|
-
### Decisions
|
|
97
|
-
|
|
98
|
-
[decisions from STATE.md, or "(none recorded)"]
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Proceed to Step 3 (routing).
|
|
102
|
-
|
|
103
|
-
**Step 3: Route to next action.**
|
|
104
|
-
|
|
105
|
-
Evaluate the current project state and present the most relevant next step:
|
|
106
|
-
|
|
107
|
-
**Route A — Pending actions on active milestone:**
|
|
108
|
-
- "Ready to continue [M-XX] — [N] actions remaining."
|
|
109
|
-
- Offer: "`/declare:execute [M-XX]` to continue"
|
|
110
|
-
|
|
111
|
-
**Route B — Active milestone fully complete, not yet verified:**
|
|
112
|
-
- "[M-XX] has all actions done but is not yet verified."
|
|
113
|
-
- Offer: "`/declare:verify [M-XX]` to verify milestone truth"
|
|
114
|
-
|
|
115
|
-
**Route C — Blocker recorded:**
|
|
116
|
-
- "A blocker was recorded: [blocker text]"
|
|
117
|
-
- Offer options: "Resolve it manually, then run `/declare:execute [M-XX]`" or "`/declare:status` to review the graph"
|
|
118
|
-
|
|
119
|
-
**Route D — No active milestone:**
|
|
120
|
-
- "No active milestone found."
|
|
121
|
-
- Offer: "`/declare:new-cycle` to plan next milestone" or "`/declare:status` to review graph"
|
|
122
|
-
|
|
123
|
-
**Route E — No project initialized:**
|
|
124
|
-
- "Project not initialized."
|
|
125
|
-
- Offer: "`/declare:new-project` to initialize"
|
|
126
|
-
|
|
127
|
-
Present the route as a clear, single recommendation with an alternative if applicable.
|
|
128
|
-
|
|
129
|
-
**Step 4: Record session resumption.**
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
node dist/declare-tools.cjs record-session --stopped-at "Resumed — [currentPosition]"
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Do not display the output of this command.
|
|
136
|
-
|
|
137
|
-
**Step 5: Clean up handoff file (if used).**
|
|
138
|
-
|
|
139
|
-
If `.continue-here.md` was used in Step 2a and routing shows work is continuing normally, offer:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
The .continue-here.md handoff file can be removed once you are fully resumed.
|
|
143
|
-
Run: git rm .continue-here.md && git commit -m "chore: resume work — remove handoff file"
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Do not remove it automatically — leave that to the user.
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Switch model profile for Declare agents (quality/balanced/budget)
|
|
3
|
-
argument-hint: <profile>
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Bash
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
Switch the model profile used by Declare agents. Controls which Claude model each agent uses, balancing output quality vs token spend.
|
|
10
|
-
|
|
11
|
-
**Step 1: Validate the profile argument.**
|
|
12
|
-
|
|
13
|
-
Parse `$ARGUMENTS` to extract the profile name. It must be one of: `quality`, `balanced`, `budget`.
|
|
14
|
-
|
|
15
|
-
If the argument is missing or invalid, display the usage error and the profile table below, then stop.
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
Usage: /declare:set-profile <profile>
|
|
19
|
-
|
|
20
|
-
Profiles:
|
|
21
|
-
quality — claude-opus-4-5 for all agents
|
|
22
|
-
balanced — claude-sonnet-4-5 for execution, claude-opus-4-5 for planning
|
|
23
|
-
budget — claude-haiku-3-5 for execution, claude-sonnet-4-5 for planning
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Step 2: Read current profile.**
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
node dist/declare-tools.cjs config-get model_profile
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Extract the current value (default "quality" if key not found).
|
|
33
|
-
|
|
34
|
-
**Step 3: Apply the new profile.**
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
node dist/declare-tools.cjs config-set --key model_profile --value <profile>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
If the command fails, display the error and stop.
|
|
41
|
-
|
|
42
|
-
**Step 4: Display confirmation.**
|
|
43
|
-
|
|
44
|
-
Show a confirmation with the model table:
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
Profile switched: [old] → [new]
|
|
48
|
-
|
|
49
|
-
Model assignments for "[new]" profile:
|
|
50
|
-
|
|
51
|
-
Agent Model
|
|
52
|
-
───────────────────────────────────────────────
|
|
53
|
-
Planner [planner model]
|
|
54
|
-
Plan-checker [plan-checker model]
|
|
55
|
-
Executor [executor model]
|
|
56
|
-
Verifier [verifier model]
|
|
57
|
-
Researcher [researcher model]
|
|
58
|
-
|
|
59
|
-
Use /declare:settings to configure additional workflow options.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Model assignments by profile:
|
|
63
|
-
|
|
64
|
-
- **quality**: all agents use `claude-opus-4-5`
|
|
65
|
-
- **balanced**: planner=`claude-opus-4-5`, plan-checker=`claude-opus-4-5`, executor=`claude-sonnet-4-5`, verifier=`claude-sonnet-4-5`, researcher=`claude-opus-4-5`
|
|
66
|
-
- **budget**: planner=`claude-sonnet-4-5`, plan-checker=`claude-sonnet-4-5`, executor=`claude-haiku-3-5`, verifier=`claude-haiku-3-5`, researcher=`claude-sonnet-4-5`
|