declare-cc 0.6.0 → 1.0.1
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 +104 -81
- package/dist/declare-tools.cjs +2043 -543
- package/dist/public/app.js +2576 -385
- package/dist/public/index.html +984 -37
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
**A future-driven meta-prompting engine for agentic development.**
|
|
6
6
|
|
|
7
|
-
Forked from [GSD (Get Shit Done)](https://github.com/gsd-build/get-shit-done) — replaces linear phase-based planning with a three-layer DAG rooted in declared futures.
|
|
8
|
-
|
|
9
7
|
[](https://www.npmjs.com/package/declare-cc)
|
|
10
8
|
[](LICENSE)
|
|
11
9
|
|
|
@@ -23,14 +21,14 @@ npx declare-cc@latest
|
|
|
23
21
|
|
|
24
22
|
Most planning tools start from the present and work forward — "what should we do first?" Declare starts from the future and works backward — "what must be true for this to succeed?"
|
|
25
23
|
|
|
26
|
-
You declare present-tense statements of fact about your project's future. The system derives milestones ("what must be true?") and actions ("what must be done?") through causal structure, then executes them in
|
|
24
|
+
You declare present-tense statements of fact about your project's future. The system derives milestones ("what must be true?") and actions ("what must be done?") through causal structure, then executes them — visible in real time through a browser dashboard.
|
|
27
25
|
|
|
28
26
|
Built on the Erhard/Jensen/Zaffron ontological model:
|
|
29
27
|
- **Integrity** as wholeness and completeness (not morality)
|
|
30
28
|
- **Alignment** as shared future (not agreement)
|
|
31
29
|
- **Performance** as the product of both
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
Originally forked from [GSD (Get Shit Done)](https://github.com/gsd-build/get-shit-done). See [Fork Boundary](#fork-boundary) for details.
|
|
34
32
|
|
|
35
33
|
---
|
|
36
34
|
|
|
@@ -42,7 +40,7 @@ This is a fork of [GSD](https://github.com/gsd-build/get-shit-done). It carries
|
|
|
42
40
|
/declare:init
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
Scaffolds the project structure: `FUTURE.md`, `MILESTONES.md`, `.planning/` directory, and the graph config.
|
|
43
|
+
Scaffolds the project structure: `FUTURE.md`, `MILESTONES.md`, `.planning/` directory, and the graph config.
|
|
46
44
|
|
|
47
45
|
### 2. Declare Futures
|
|
48
46
|
|
|
@@ -66,36 +64,39 @@ Works backward from declarations: "What must be true for D-01 to hold?" Each mil
|
|
|
66
64
|
|
|
67
65
|
**Creates:** `MILESTONES.md` with milestones (M-01, M-02, ...)
|
|
68
66
|
|
|
69
|
-
### 4. Plan
|
|
67
|
+
### 4. Plan Actions
|
|
70
68
|
|
|
71
69
|
```
|
|
72
|
-
/declare:
|
|
73
|
-
/declare:execute M-01 # Wave-based execution with parallel agents
|
|
70
|
+
/declare:actions M-01
|
|
74
71
|
```
|
|
75
72
|
|
|
76
|
-
The
|
|
73
|
+
Or press **P** on any milestone card in the dashboard. The AI derives 2-5 concrete actions per milestone by asking "What work must be done to achieve this?" Actions are auto-accepted and appear as cards immediately — the action list IS the plan.
|
|
77
74
|
|
|
78
|
-
|
|
75
|
+
Each action has a title and a "produces" field describing its deliverable. No separate exec-plan files — the milestone's action list is the execution plan.
|
|
79
76
|
|
|
80
|
-
|
|
77
|
+
**Creates:** `.planning/milestones/M-XX-*/PLAN.md`
|
|
81
78
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
node dist/declare-tools.cjs sync-status # Propagate DONE bottom-up through the graph
|
|
86
|
-
```
|
|
79
|
+
### 5. Review & Execute
|
|
80
|
+
|
|
81
|
+
In the dashboard, review each action card. Press **A** to approve, **E** to edit, **D** to delete. Once all actions for a milestone are approved, press **E** to execute.
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
The executor gets the full why-chain context: declaration statement → milestone description → action details + sibling actions. It reads your codebase, implements the changes, and commits.
|
|
89
84
|
|
|
90
|
-
### 6.
|
|
85
|
+
### 6. Verify & Complete
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
/declare:verify M-01 # Conversational UAT — validates deliverables
|
|
89
|
+
/declare:audit M-01 # Cross-reference actions against declarations
|
|
90
|
+
/declare:complete-milestone M-01 # Archive, tag release, prepare next cycle
|
|
91
|
+
```
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
### 7. Navigate
|
|
93
94
|
|
|
94
95
|
```
|
|
95
|
-
/declare:trace A-03 # Why does this action exist? Walk the why-chain
|
|
96
|
+
/declare:trace A-03 # Why does this action exist? Walk the why-chain
|
|
96
97
|
/declare:visualize # ASCII tree of the full DAG with status markers
|
|
97
|
-
/declare:prioritize M-01 # Rank actions by unblocking power
|
|
98
|
-
/declare:status # Layer counts, health indicators
|
|
98
|
+
/declare:prioritize M-01 # Rank actions by unblocking power
|
|
99
|
+
/declare:status # Layer counts, health indicators
|
|
99
100
|
/declare:dashboard # Live interactive DAG in the browser
|
|
100
101
|
```
|
|
101
102
|
|
|
@@ -119,19 +120,55 @@ The graph engine (`DeclareDag`) uses dual adjacency lists for O(1) bidirectional
|
|
|
119
120
|
|
|
120
121
|
---
|
|
121
122
|
|
|
122
|
-
##
|
|
123
|
+
## Dashboard
|
|
123
124
|
|
|
124
125
|
```
|
|
125
126
|
/declare:dashboard
|
|
126
127
|
```
|
|
127
128
|
|
|
128
|
-
Starts a local server and opens an interactive browser view
|
|
129
|
+
Starts a local server and opens an interactive browser view. The dashboard is the primary interface for planning, review, and execution.
|
|
130
|
+
|
|
131
|
+
### Lifecycle Column Browser
|
|
132
|
+
|
|
133
|
+
Drill into the three-layer DAG: Declarations → Milestones → Actions. Each level groups cards into lifecycle stages:
|
|
134
|
+
|
|
135
|
+
| Stage | Meaning |
|
|
136
|
+
|-------|---------|
|
|
137
|
+
| **Needs Planning** | Approved but no actions derived yet |
|
|
138
|
+
| **Needs Approval** | Has unapproved items (milestones or actions) |
|
|
139
|
+
| **Ready to Execute** | All items approved, ready to run |
|
|
140
|
+
| **In Execution** | Currently being executed by an agent |
|
|
141
|
+
| **Done** | Completed (collapsible) |
|
|
142
|
+
|
|
143
|
+
Cards show inline status: title, description, status badges, action counts, and review state. The action buttons row (Plan, Edit, Delete, Approve, Execute) is always visible — no hidden menus.
|
|
144
|
+
|
|
145
|
+
### Keyboard Shortcuts
|
|
146
|
+
|
|
147
|
+
Single keys act on the focused card (use arrow keys to navigate):
|
|
129
148
|
|
|
130
|
-
|
|
149
|
+
| Key | Action |
|
|
150
|
+
|-----|--------|
|
|
151
|
+
| **P** | Plan — derive actions/milestones |
|
|
152
|
+
| **A** | Approve the focused card |
|
|
153
|
+
| **E** | Edit (opens inline textarea) |
|
|
154
|
+
| **D** | Delete |
|
|
155
|
+
| **Arrow Up/Down** | Move focus between cards |
|
|
156
|
+
| **Arrow Right/Enter** | Drill into card |
|
|
157
|
+
| **Arrow Left** | Go back one level |
|
|
158
|
+
| **Ctrl+Shift+A** | Approve all visible |
|
|
159
|
+
| **Ctrl+Shift+P** | Global plan (top-right button) |
|
|
131
160
|
|
|
132
|
-
|
|
161
|
+
### Activity Panel
|
|
133
162
|
|
|
134
|
-
|
|
163
|
+
Right-side panel showing real-time agent activity. Every agent spawn — planning, execution, revision — appears as a persistent card with type, target, elapsed time, and status. Cards survive page refresh. Completed agents show "View Result".
|
|
164
|
+
|
|
165
|
+
### Command Bar
|
|
166
|
+
|
|
167
|
+
Press **C** to open the command input at the bottom. Type natural language or slash commands. The command bar dispatches to the server API.
|
|
168
|
+
|
|
169
|
+
### Mesh UI Integration
|
|
170
|
+
|
|
171
|
+
The server writes `.planning/server.port` on startup (deleted on shutdown) so external tools like the Mesh UI Declare plugin can discover and embed the dashboard.
|
|
135
172
|
|
|
136
173
|
---
|
|
137
174
|
|
|
@@ -141,8 +178,6 @@ Declare doesn't just track what's done — it tracks whether commitments are bei
|
|
|
141
178
|
|
|
142
179
|
### Integrity States
|
|
143
180
|
|
|
144
|
-
Every node in the graph has an integrity status:
|
|
145
|
-
|
|
146
181
|
| Status | Meaning |
|
|
147
182
|
|--------|---------|
|
|
148
183
|
| `KEPT` | Commitment fulfilled as declared |
|
|
@@ -150,14 +185,14 @@ Every node in the graph has an integrity status:
|
|
|
150
185
|
| `BROKEN` | Commitment not fulfilled, no acknowledgment |
|
|
151
186
|
| `RENEGOTIATED` | Commitment explicitly changed through renegotiation flow |
|
|
152
187
|
|
|
153
|
-
The **honor protocol** for a commitment you can't keep: acknowledge the break, inform affected parties, clean up the mess, renegotiate a new commitment.
|
|
188
|
+
The **honor protocol** for a commitment you can't keep: acknowledge the break, inform affected parties, clean up the mess, renegotiate a new commitment.
|
|
154
189
|
|
|
155
190
|
### Alignment Monitoring
|
|
156
191
|
|
|
157
192
|
- **Drift detection** — Are current actions still aligned with declared futures?
|
|
158
193
|
- **Occurrence checks** — AI verifies declarations still hold at milestone completion
|
|
159
|
-
- **Performance scoring** — Alignment × Integrity as qualitative HIGH/MEDIUM/LOW (never numeric scores)
|
|
160
194
|
- **Renegotiation flow** — When a declaration no longer fits, renegotiate it into `FUTURE-ARCHIVE.md`
|
|
195
|
+
- **Wholeness visualization** — Each node shows its computed wholeness state in the dashboard
|
|
161
196
|
|
|
162
197
|
---
|
|
163
198
|
|
|
@@ -171,8 +206,7 @@ The **honor protocol** for a commitment you can't keep: acknowledge the break, i
|
|
|
171
206
|
| `/declare:future` | Guided conversation to capture declared futures |
|
|
172
207
|
| `/declare:milestones` | Derive milestones backward from declarations |
|
|
173
208
|
| `/declare:actions [M-XX]` | Derive actions for a milestone |
|
|
174
|
-
| `/declare:
|
|
175
|
-
| `/declare:execute [M-XX]` | Wave-based execution with parallel agents |
|
|
209
|
+
| `/declare:execute [M-XX]` | Execute actions with full context |
|
|
176
210
|
|
|
177
211
|
### Planning Support
|
|
178
212
|
|
|
@@ -221,7 +255,7 @@ The **honor protocol** for a commitment you can't keep: acknowledge the break, i
|
|
|
221
255
|
| Command | What it does |
|
|
222
256
|
|---------|--------------|
|
|
223
257
|
| `/declare:new-project` | Deep context gathering, PROJECT.md + STATE.md creation |
|
|
224
|
-
| `/declare:new-
|
|
258
|
+
| `/declare:new-cycle` | Archive declarations, reset for next cycle |
|
|
225
259
|
| `/declare:complete-milestone` | Snapshot graph, tag release, prepare next cycle |
|
|
226
260
|
|
|
227
261
|
### Maintenance
|
|
@@ -240,38 +274,23 @@ The **honor protocol** for a commitment you can't keep: acknowledge the break, i
|
|
|
240
274
|
## Project Structure
|
|
241
275
|
|
|
242
276
|
```
|
|
243
|
-
FUTURE.md #
|
|
244
|
-
MILESTONES.md #
|
|
277
|
+
FUTURE.md # Active declared futures
|
|
278
|
+
MILESTONES.md # Active milestones
|
|
279
|
+
FUTURE-ARCHIVE.md # Completed cycle declarations
|
|
245
280
|
|
|
246
281
|
.planning/
|
|
247
282
|
├── PROJECT.md # Project context and goals
|
|
248
283
|
├── STATE.md # Current work state
|
|
249
284
|
├── config.json # Project settings
|
|
285
|
+
├── agent-state.json # Agent lifecycle state
|
|
286
|
+
├── server.port # Active server port (auto-managed)
|
|
250
287
|
├── milestones/
|
|
251
|
-
│
|
|
252
|
-
│
|
|
253
|
-
│
|
|
254
|
-
│
|
|
288
|
+
│ ├── M-XX-slug/
|
|
289
|
+
│ │ ├── PLAN.md # Actions for this milestone
|
|
290
|
+
│ │ ├── execution.log # Execution output log
|
|
291
|
+
│ │ └── VERIFICATION.md # Integrity proof after execution
|
|
292
|
+
│ └── v1.0/ # Archived milestone cycle
|
|
255
293
|
└── codebase/ # Codebase analysis artifacts
|
|
256
|
-
|
|
257
|
-
agents/ # Declare-specific agent definitions
|
|
258
|
-
├── declare-planner.md
|
|
259
|
-
├── declare-plan-checker.md
|
|
260
|
-
├── declare-researcher.md
|
|
261
|
-
├── declare-research-synthesizer.md
|
|
262
|
-
├── declare-codebase-mapper.md
|
|
263
|
-
└── declare-debugger.md
|
|
264
|
-
|
|
265
|
-
workflows/
|
|
266
|
-
├── discuss.md # Context capture workflow
|
|
267
|
-
└── verify.md # UAT workflow
|
|
268
|
-
|
|
269
|
-
dist/declare-tools.cjs # Bundled CLI (zero runtime deps)
|
|
270
|
-
src/ # Source (Node.js, CJS)
|
|
271
|
-
├── graph/engine.js # DeclareDag — dual adjacency lists, Kahn's sort
|
|
272
|
-
├── artifacts/ # Markdown parsers/writers
|
|
273
|
-
├── commands/ # CLI command implementations
|
|
274
|
-
└── server/ # DAG web server + dashboard frontend
|
|
275
294
|
```
|
|
276
295
|
|
|
277
296
|
---
|
|
@@ -284,12 +303,11 @@ src/ # Source (Node.js, CJS)
|
|
|
284
303
|
npx declare-cc@latest
|
|
285
304
|
```
|
|
286
305
|
|
|
287
|
-
Or
|
|
306
|
+
Or install globally:
|
|
288
307
|
|
|
289
308
|
```bash
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
node bin/install.js --claude --local
|
|
309
|
+
npm install -g declare-cc
|
|
310
|
+
declare # Opens dashboard for current directory
|
|
293
311
|
```
|
|
294
312
|
|
|
295
313
|
Requires Node.js 18+.
|
|
@@ -300,11 +318,11 @@ Requires Node.js 18+.
|
|
|
300
318
|
/declare:init # Scaffold the project
|
|
301
319
|
/declare:future # Declare 3-5 futures
|
|
302
320
|
/declare:milestones # Derive milestones backward
|
|
303
|
-
/declare:
|
|
304
|
-
/declare:execute M-01 # Execute with wave scheduling
|
|
305
|
-
/declare:dashboard # View the live DAG
|
|
321
|
+
/declare:dashboard # Open the live dashboard
|
|
306
322
|
```
|
|
307
323
|
|
|
324
|
+
Then in the dashboard: press **P** to plan actions, **A** to approve, **E** to execute. Everything flows through the card-based UI.
|
|
325
|
+
|
|
308
326
|
### Recommended: Skip Permissions Mode
|
|
309
327
|
|
|
310
328
|
Declare spawns agents and runs CLI tools frequently. For frictionless operation:
|
|
@@ -339,27 +357,32 @@ Add to `.claude/settings.json`:
|
|
|
339
357
|
|
|
340
358
|
## Architecture
|
|
341
359
|
|
|
342
|
-
###
|
|
360
|
+
### Concurrent Planning
|
|
361
|
+
|
|
362
|
+
Multiple milestones can be planned simultaneously. The action derivation runner uses a session Map — no singleton locks, no 409 errors. Each session broadcasts independently via SSE.
|
|
363
|
+
|
|
364
|
+
### Rich Execution Context
|
|
343
365
|
|
|
344
|
-
|
|
366
|
+
When an action executes, the AI agent receives the full why-chain:
|
|
345
367
|
|
|
346
368
|
```
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
369
|
+
Declaration: D-01 — "The system handles all edge cases gracefully"
|
|
370
|
+
↓
|
|
371
|
+
Milestone: M-03 — Error Recovery and Resilience
|
|
372
|
+
↓
|
|
373
|
+
Action: A-07 — Implement retry logic with exponential backoff
|
|
374
|
+
Produces: Retry wrapper for all external API calls
|
|
375
|
+
|
|
376
|
+
Other actions (context only):
|
|
377
|
+
- A-06: Add circuit breaker pattern [DONE]
|
|
378
|
+
- A-08: Build error reporting dashboard
|
|
356
379
|
```
|
|
357
380
|
|
|
358
|
-
|
|
381
|
+
The executor reads the codebase, implements changes, verifies them, and commits — all autonomously.
|
|
359
382
|
|
|
360
383
|
### Status Propagation
|
|
361
384
|
|
|
362
|
-
The DAG maintains status consistency bottom-up
|
|
385
|
+
The DAG maintains status consistency bottom-up:
|
|
363
386
|
|
|
364
387
|
```
|
|
365
388
|
Actions → check produced files exist → mark DONE
|
|
@@ -406,8 +429,8 @@ Declare is forked from [GSD (Get Shit Done)](https://github.com/gsd-build/get-sh
|
|
|
406
429
|
|-----|---------|-----|
|
|
407
430
|
| Linear phases (1, 2, 3...) | Three-layer DAG (D → M → A) | Phases are past-derived sequencing; DAGs represent causal structure |
|
|
408
431
|
| `ROADMAP.md` | `FUTURE.md` + `MILESTONES.md` | The present is given by the future you're living into |
|
|
409
|
-
|
|
|
410
|
-
| Sequential execution |
|
|
432
|
+
| Separate EXEC-PLAN files per action | Action list IS the plan | Actions define what to do; the executor gets full context automatically |
|
|
433
|
+
| Sequential execution | Concurrent planning + execution | Multiple milestones plan/execute in parallel |
|
|
411
434
|
| Phase numbers | Milestone IDs (M-XX) | Milestones derive from declarations, not arbitrary ordering |
|
|
412
435
|
|
|
413
436
|
---
|