declare-cc 1.0.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 CHANGED
@@ -21,7 +21,7 @@ npx declare-cc@latest
21
21
 
22
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?"
23
23
 
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 in topological order with wave-based parallelism — visible in real time through a browser-based dashboard.
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.
25
25
 
26
26
  Built on the Erhard/Jensen/Zaffron ontological model:
27
27
  - **Integrity** as wholeness and completeness (not morality)
@@ -64,21 +64,25 @@ Works backward from declarations: "What must be true for D-01 to hold?" Each mil
64
64
 
65
65
  **Creates:** `MILESTONES.md` with milestones (M-01, M-02, ...)
66
66
 
67
- ### 4. Plan & Execute
67
+ ### 4. Plan Actions
68
68
 
69
69
  ```
70
- /declare:actions M-01 # Derive actions for the milestone
71
- /declare:plan M-01 # Research → plan → verify loop (planner + checker agents)
72
- /declare:execute M-01 # Wave-based execution with parallel agents
70
+ /declare:actions M-01
73
71
  ```
74
72
 
75
- The planner agent derives concrete actions, the checker agent validates them, and the executor runs them in topological waves. Each action gets its own atomic commit.
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.
76
74
 
77
- Or use the dashboard review plans in the column browser, approve them, then hit Go in execution mode. The pipeline runner handles wave scheduling, progress tracking, and failure recovery.
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.
78
76
 
79
- **Creates:** `.planning/milestones/M-XX-*/PLAN.md` and `EXEC-PLAN-*.md` files
77
+ **Creates:** `.planning/milestones/M-XX-*/PLAN.md`
80
78
 
81
- ### 5. Verify & Complete
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.
82
+
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.
84
+
85
+ ### 6. Verify & Complete
82
86
 
83
87
  ```
84
88
  /declare:verify M-01 # Conversational UAT — validates deliverables
@@ -86,15 +90,13 @@ Or use the dashboard — review plans in the column browser, approve them, then
86
90
  /declare:complete-milestone M-01 # Archive, tag release, prepare next cycle
87
91
  ```
88
92
 
89
- ### 6. Navigate
90
-
91
- Understand your graph at any point:
93
+ ### 7. Navigate
92
94
 
93
95
  ```
94
- /declare:trace A-03 # Why does this action exist? Walk the why-chain up to its declaration
96
+ /declare:trace A-03 # Why does this action exist? Walk the why-chain
95
97
  /declare:visualize # ASCII tree of the full DAG with status markers
96
- /declare:prioritize M-01 # Rank actions by unblocking power (dependency weight)
97
- /declare:status # Layer counts, health indicators, integrity/alignment metrics
98
+ /declare:prioritize M-01 # Rank actions by unblocking power
99
+ /declare:status # Layer counts, health indicators
98
100
  /declare:dashboard # Live interactive DAG in the browser
99
101
  ```
100
102
 
@@ -124,31 +126,49 @@ The graph engine (`DeclareDag`) uses dual adjacency lists for O(1) bidirectional
124
126
  /declare:dashboard
125
127
  ```
126
128
 
127
- Starts a local server and opens an interactive browser view of your project. The dashboard is the primary interface for planning and execution.
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
128
132
 
129
- ### Column Browser (Planning Mode)
133
+ Drill into the three-layer DAG: Declarations → Milestones → Actions. Each level groups cards into lifecycle stages:
130
134
 
131
- The three-layer DAG rendered as a navigable column browser — Declarations on the left, Milestones in the center, Actions on the right. Click any node to see its detail panel with full causal chain, context, and status. Chain nodes are clickable for navigation.
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) |
132
142
 
133
- Declarations, milestones, and actions can be created, reviewed, and approved directly in the browser. The review/annotation panel supports iterative cycles: generate plan, annotate corrections, send back for revision, repeat until approved.
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.
134
144
 
135
- ### Execution Mode
145
+ ### Keyboard Shortcuts
136
146
 
137
- When all plans in scope are approved, transition to execution mode — a dedicated full-screen view showing the ordered execution pipeline. Features include:
147
+ Single keys act on the focused card (use arrow keys to navigate):
138
148
 
139
- - **Pre-execution wave order** — Review the execution sequence before starting, with drag-to-reorder within dependency constraints
140
- - **Pipeline runner** — Manifest-driven execution with wave scheduling, transient retry, and execution reports
141
- - **Live progress** Progress bar, status dots per action, elapsed time
142
- - **Failure handling** Pause-on-failure with View Output, Skip, and Stop options
143
- - **State persistence** Execution state survives browser refresh
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) |
144
160
 
145
161
  ### Activity Panel
146
162
 
147
- A right-side panel showing real-time agent activity. Every agent spawn — execution, revision, research — appears as a persistent activity card showing agent type, target node, elapsed time, and live status. Cards survive page refresh and navigation. Completed agents show a "View Result" button that navigates to the produced output.
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
148
166
 
149
- ### Status Colors
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.
150
168
 
151
- DONE nodes retain their type hue (dimmed blue for declarations, dimmed purple for milestones, dimmed green for actions) so the graph stays readable as a living document rather than collapsing to grey. Integrity state is visualized per-node with wholeness indicators.
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.
152
172
 
153
173
  ---
154
174
 
@@ -158,8 +178,6 @@ Declare doesn't just track what's done — it tracks whether commitments are bei
158
178
 
159
179
  ### Integrity States
160
180
 
161
- Every node in the graph has an integrity status:
162
-
163
181
  | Status | Meaning |
164
182
  |--------|---------|
165
183
  | `KEPT` | Commitment fulfilled as declared |
@@ -167,13 +185,12 @@ Every node in the graph has an integrity status:
167
185
  | `BROKEN` | Commitment not fulfilled, no acknowledgment |
168
186
  | `RENEGOTIATED` | Commitment explicitly changed through renegotiation flow |
169
187
 
170
- The **honor protocol** for a commitment you can't keep: acknowledge the break, inform affected parties, clean up the mess, renegotiate a new commitment. This matches the Erhard/Jensen model — integrity isn't about being perfect, it's about restoring wholeness when things break.
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.
171
189
 
172
190
  ### Alignment Monitoring
173
191
 
174
192
  - **Drift detection** — Are current actions still aligned with declared futures?
175
193
  - **Occurrence checks** — AI verifies declarations still hold at milestone completion
176
- - **Performance scoring** — Alignment x Integrity as qualitative HIGH/MEDIUM/LOW (never numeric scores)
177
194
  - **Renegotiation flow** — When a declaration no longer fits, renegotiate it into `FUTURE-ARCHIVE.md`
178
195
  - **Wholeness visualization** — Each node shows its computed wholeness state in the dashboard
179
196
 
@@ -189,8 +206,7 @@ The **honor protocol** for a commitment you can't keep: acknowledge the break, i
189
206
  | `/declare:future` | Guided conversation to capture declared futures |
190
207
  | `/declare:milestones` | Derive milestones backward from declarations |
191
208
  | `/declare:actions [M-XX]` | Derive actions for a milestone |
192
- | `/declare:plan [M-XX]` | Research plan verify loop (planner + checker agents) |
193
- | `/declare:execute [M-XX]` | Wave-based execution with parallel agents |
209
+ | `/declare:execute [M-XX]` | Execute actions with full context |
194
210
 
195
211
  ### Planning Support
196
212
 
@@ -266,41 +282,15 @@ FUTURE-ARCHIVE.md # Completed cycle declarations
266
282
  ├── PROJECT.md # Project context and goals
267
283
  ├── STATE.md # Current work state
268
284
  ├── config.json # Project settings
269
- ├── agent-state.json # Agent lifecycle state (server-side tracking)
285
+ ├── agent-state.json # Agent lifecycle state
286
+ ├── server.port # Active server port (auto-managed)
270
287
  ├── milestones/
271
288
  │ ├── M-XX-slug/
272
289
  │ │ ├── PLAN.md # Actions for this milestone
273
- │ │ ├── EXEC-PLAN-*.md # Per-action execution plans
290
+ │ │ ├── execution.log # Execution output log
274
291
  │ │ └── VERIFICATION.md # Integrity proof after execution
275
292
  │ └── v1.0/ # Archived milestone cycle
276
293
  └── codebase/ # Codebase analysis artifacts
277
-
278
- agents/ # Agent definitions (10 specialized agents)
279
- ├── declare-planner.md
280
- ├── declare-plan-checker.md
281
- ├── declare-executor.md
282
- ├── declare-researcher.md
283
- ├── declare-research-synthesizer.md
284
- ├── declare-codebase-mapper.md
285
- ├── declare-roadmapper.md
286
- ├── declare-verifier.md
287
- ├── declare-integration-checker.md
288
- └── declare-debugger.md
289
-
290
- workflows/ # Conversational workflow definitions
291
- ├── actions.md
292
- ├── discuss.md
293
- ├── future.md
294
- ├── milestones.md
295
- ├── scope.md
296
- └── verify.md
297
-
298
- dist/declare-tools.cjs # Bundled CLI (zero runtime deps)
299
- src/ # Source (~26K LOC)
300
- ├── graph/engine.js # DeclareDag — dual adjacency lists, Kahn's sort
301
- ├── artifacts/ # Markdown parsers/writers
302
- ├── commands/ # 40+ CLI command implementations
303
- └── server/ # HTTP API, SSE streaming, dashboard frontend
304
294
  ```
305
295
 
306
296
  ---
@@ -320,14 +310,6 @@ npm install -g declare-cc
320
310
  declare # Opens dashboard for current directory
321
311
  ```
322
312
 
323
- Or clone and install locally:
324
-
325
- ```bash
326
- git clone https://github.com/decocms/declare-cc.git
327
- cd declare-cc
328
- node bin/install.js --claude --local
329
- ```
330
-
331
313
  Requires Node.js 18+.
332
314
 
333
315
  ### Quick Start
@@ -336,11 +318,11 @@ Requires Node.js 18+.
336
318
  /declare:init # Scaffold the project
337
319
  /declare:future # Declare 3-5 futures
338
320
  /declare:milestones # Derive milestones backward
339
- /declare:plan M-01 # Research + plan first milestone
340
- /declare:execute M-01 # Execute with wave scheduling
341
- /declare:dashboard # View the live DAG
321
+ /declare:dashboard # Open the live dashboard
342
322
  ```
343
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
+
344
326
  ### Recommended: Skip Permissions Mode
345
327
 
346
328
  Declare spawns agents and runs CLI tools frequently. For frictionless operation:
@@ -375,27 +357,28 @@ Add to `.claude/settings.json`:
375
357
 
376
358
  ## Architecture
377
359
 
378
- ### Wave-Based Execution
360
+ ### Concurrent Planning
379
361
 
380
- Actions are grouped into waves based on their dependencies in the DAG. Within each wave, independent actions run in parallel via spawned agents. Waves run sequentially.
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.
381
363
 
382
- ```
383
- WAVE 1 (parallel) WAVE 2 (parallel) WAVE 3
384
- ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
385
- │ A-01 │ │ A-02 │ │ A-03 │ │ A-04 │ │ A-05 │
386
- │ Schema │ │ Auth │→ │ API │ │ Storage │→ │ UI │
387
- └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
388
- │ │ ↑ ↑ ↑
389
- └───────────┴──────────────┴───────────┘ │
390
- A-03 needs A-01, A-04 needs A-02 │
391
- A-05 needs A-03 + A-04 │
392
- ```
364
+ ### Rich Execution Context
393
365
 
394
- Each agent gets a fresh context window. Your main session stays light.
366
+ When an action executes, the AI agent receives the full why-chain:
395
367
 
396
- ### Agent Lifecycle Tracking
368
+ ```
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
379
+ ```
397
380
 
398
- Every spawned agent is tracked server-side with full lifecycle state: spawn, progress, completion. The `AgentRegistry` persists state to disk so agents survive server restarts and browser refreshes. The HTTP API exposes agent state for the dashboard's activity panel.
381
+ The executor reads the codebase, implements changes, verifies them, and commits all autonomously.
399
382
 
400
383
  ### Status Propagation
401
384
 
@@ -446,8 +429,8 @@ Declare is forked from [GSD (Get Shit Done)](https://github.com/gsd-build/get-sh
446
429
  |-----|---------|-----|
447
430
  | Linear phases (1, 2, 3...) | Three-layer DAG (D → M → A) | Phases are past-derived sequencing; DAGs represent causal structure |
448
431
  | `ROADMAP.md` | `FUTURE.md` + `MILESTONES.md` | The present is given by the future you're living into |
449
- | `STATE.md` tracking | Graph node statuses | Status lives in the graph, not a separate file |
450
- | Sequential execution | Topology-aware wave scheduling | Actions execute in causal order, not linear sequence |
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 |
451
434
  | Phase numbers | Milestone IDs (M-XX) | Milestones derive from declarations, not arbitrary ordering |
452
435
 
453
436
  ---
@@ -1552,7 +1552,7 @@ var require_help = __commonJS({
1552
1552
  usage: "/declare:help"
1553
1553
  }
1554
1554
  ],
1555
- version: "1.0.0"
1555
+ version: "1.0.1"
1556
1556
  };
1557
1557
  }
1558
1558
  module2.exports = { runHelp: runHelp2 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declare-cc",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A future-driven meta-prompting engine for agentic development, rooted in declared futures and causal graph structure.",
5
5
  "bin": {
6
6
  "declare-cc": "bin/install.js",