declare-cc 0.1.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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +326 -0
  3. package/agents/gsd-codebase-mapper.md +761 -0
  4. package/agents/gsd-debugger.md +1198 -0
  5. package/agents/gsd-executor.md +451 -0
  6. package/agents/gsd-integration-checker.md +440 -0
  7. package/agents/gsd-phase-researcher.md +484 -0
  8. package/agents/gsd-plan-checker.md +625 -0
  9. package/agents/gsd-planner.md +1164 -0
  10. package/agents/gsd-project-researcher.md +618 -0
  11. package/agents/gsd-research-synthesizer.md +236 -0
  12. package/agents/gsd-roadmapper.md +639 -0
  13. package/agents/gsd-verifier.md +555 -0
  14. package/bin/install.js +1815 -0
  15. package/commands/declare/actions.md +78 -0
  16. package/commands/declare/future.md +52 -0
  17. package/commands/declare/milestones.md +81 -0
  18. package/commands/declare/status.md +62 -0
  19. package/commands/gsd/add-phase.md +39 -0
  20. package/commands/gsd/add-todo.md +42 -0
  21. package/commands/gsd/audit-milestone.md +42 -0
  22. package/commands/gsd/check-todos.md +41 -0
  23. package/commands/gsd/cleanup.md +18 -0
  24. package/commands/gsd/complete-milestone.md +136 -0
  25. package/commands/gsd/debug.md +162 -0
  26. package/commands/gsd/discuss-phase.md +87 -0
  27. package/commands/gsd/execute-phase.md +42 -0
  28. package/commands/gsd/health.md +22 -0
  29. package/commands/gsd/help.md +22 -0
  30. package/commands/gsd/insert-phase.md +33 -0
  31. package/commands/gsd/join-discord.md +18 -0
  32. package/commands/gsd/list-phase-assumptions.md +50 -0
  33. package/commands/gsd/map-codebase.md +71 -0
  34. package/commands/gsd/new-milestone.md +51 -0
  35. package/commands/gsd/new-project.md +42 -0
  36. package/commands/gsd/new-project.md.bak +1041 -0
  37. package/commands/gsd/pause-work.md +35 -0
  38. package/commands/gsd/plan-milestone-gaps.md +40 -0
  39. package/commands/gsd/plan-phase.md +44 -0
  40. package/commands/gsd/progress.md +24 -0
  41. package/commands/gsd/quick.md +40 -0
  42. package/commands/gsd/reapply-patches.md +110 -0
  43. package/commands/gsd/remove-phase.md +32 -0
  44. package/commands/gsd/research-phase.md +187 -0
  45. package/commands/gsd/resume-work.md +40 -0
  46. package/commands/gsd/set-profile.md +34 -0
  47. package/commands/gsd/settings.md +36 -0
  48. package/commands/gsd/update.md +37 -0
  49. package/commands/gsd/verify-work.md +39 -0
  50. package/dist/declare-tools.cjs +2962 -0
  51. package/package.json +45 -0
  52. package/scripts/build-hooks.js +42 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lex Christopherson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,326 @@
1
+ <div align="center">
2
+
3
+ # DECLARE
4
+
5
+ **A future-driven meta-prompting engine for agentic development.**
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
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)
10
+
11
+ ```bash
12
+ npx declare-cc@latest
13
+ ```
14
+
15
+ *Declare what's true when this succeeds. The system derives the rest backward.*
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## What This Is
22
+
23
+ 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?"
24
+
25
+ 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.
26
+
27
+ Built on the Erhard/Jensen/Zaffron ontological model:
28
+ - **Integrity** as wholeness and completeness (not morality)
29
+ - **Alignment** as shared future (not agreement)
30
+ - **Performance** as the product of both
31
+
32
+ This is a fork of [GSD](https://github.com/gsd-build/get-shit-done). It carries forward GSD's agent orchestration, slash command patterns, esbuild bundling, markdown artifacts, and atomic git commits — but replaces the linear phase model with a declarative graph structure. See [Fork Boundary](#fork-boundary) for details.
33
+
34
+ ---
35
+
36
+ ## How It Works
37
+
38
+ ### 1. Initialize
39
+
40
+ ```
41
+ /declare:init
42
+ ```
43
+
44
+ Scaffolds the project structure: `FUTURE.md`, `MILESTONES.md`, `.planning/` directory, and the graph config. Installs slash commands if needed.
45
+
46
+ ### 2. Declare Futures
47
+
48
+ ```
49
+ /declare:future
50
+ ```
51
+
52
+ A guided conversation captures 3-5 declarations about your project's future. Each declaration is a present-tense statement of fact — not a goal, not a wish.
53
+
54
+ The system detects past-derived language ("I want to avoid...", "We need to fix...") and uses Socratic reframing to help you declare from the future rather than react to the past.
55
+
56
+ **Creates:** `FUTURE.md` with declarations (D-01, D-02, ...)
57
+
58
+ ### 3. Derive Milestones
59
+
60
+ ```
61
+ /declare:milestones
62
+ ```
63
+
64
+ Works backward from declarations: "What must be true for D-01 to hold?" Each milestone maps to one or more declarations through causal edges in the DAG.
65
+
66
+ **Creates:** `MILESTONES.md` with milestones (M-01, M-02, ...)
67
+
68
+ ### 4. Derive Actions
69
+
70
+ ```
71
+ /declare:actions [M-XX]
72
+ ```
73
+
74
+ For each milestone: "What must be done for M-01 to be true?" Derives concrete actions with dependencies, grouped into execution plans.
75
+
76
+ **Creates:** `.planning/milestones/M-XX-*/PLAN.md` with actions (A-01, A-02, ...)
77
+
78
+ ### 5. Execute
79
+
80
+ ```
81
+ /declare:execute [M-XX]
82
+ ```
83
+
84
+ The system:
85
+
86
+ 1. **Computes waves** — Groups actions by topological order using the DAG
87
+ 2. **Spawns parallel agents** — Independent actions in the same wave run simultaneously
88
+ 3. **Verifies per wave** — Each wave is verified before the next begins
89
+ 4. **Completes milestones** — When all actions pass, milestone is marked DONE with verification artifacts
90
+
91
+ Each agent gets a fresh context window. Your main session stays light.
92
+
93
+ **Creates:** `VERIFICATION.md` per milestone
94
+
95
+ ### 6. Navigate
96
+
97
+ Understand your graph at any point:
98
+
99
+ ```
100
+ /declare:trace A-03 # Why does this action exist? Walk the why-chain up to its declaration
101
+ /declare:visualize # ASCII tree of the full DAG with status markers
102
+ /declare:prioritize M-01 # Rank actions by unblocking power (dependency weight)
103
+ /declare:status # Layer counts, health indicators, integrity/alignment metrics
104
+ ```
105
+
106
+ ---
107
+
108
+ ## The Three-Layer DAG
109
+
110
+ ```
111
+ Declarations (D-XX) "What is true when this succeeds"
112
+
113
+
114
+ Milestones (M-XX) "What must be true" (derived backward)
115
+
116
+
117
+ Actions (A-XX) "What must be done" (derived backward)
118
+ ```
119
+
120
+ Each layer connects to the one above through causal edges. Every action traces back to a declaration. Orphan nodes (actions without a milestone, milestones without a declaration) are detected and flagged.
121
+
122
+ The graph engine (`DeclareDag`) uses dual adjacency lists for O(1) bidirectional lookups — trace upward (why-chains) or traverse downward (what depends on this) with equal efficiency.
123
+
124
+ ---
125
+
126
+ ## Integrity & Alignment
127
+
128
+ Declare doesn't just track what's done — it tracks whether commitments are being honored.
129
+
130
+ ### Integrity States
131
+
132
+ Every node in the graph has an integrity status:
133
+
134
+ | Status | Meaning |
135
+ |--------|---------|
136
+ | `KEPT` | Commitment fulfilled as declared |
137
+ | `HONORED` | Commitment couldn't be kept, but the honor protocol was followed |
138
+ | `BROKEN` | Commitment not fulfilled, no acknowledgment |
139
+ | `RENEGOTIATED` | Commitment explicitly changed through renegotiation flow |
140
+
141
+ 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.
142
+
143
+ ### Alignment Monitoring
144
+
145
+ - **Drift detection** — Are current actions still aligned with declared futures?
146
+ - **Occurrence checks** — AI verifies declarations still hold at milestone completion
147
+ - **Performance scoring** — Alignment x Integrity as qualitative HIGH/MEDIUM/LOW (never numeric scores)
148
+ - **Renegotiation flow** — When a declaration no longer fits, renegotiate it into `FUTURE-ARCHIVE.md`
149
+
150
+ ---
151
+
152
+ ## Commands
153
+
154
+ | Command | What it does |
155
+ |---------|--------------|
156
+ | `/declare:init` | Scaffold project structure and install commands |
157
+ | `/declare:future` | Guided conversation to capture declared futures |
158
+ | `/declare:milestones` | Derive milestones backward from declarations |
159
+ | `/declare:actions [M-XX]` | Derive actions for a milestone |
160
+ | `/declare:execute [M-XX]` | Wave-based execution with parallel agents and verification |
161
+ | `/declare:trace <node>` | Walk the why-chain from any node up to its source declaration |
162
+ | `/declare:visualize` | ASCII tree of the full DAG with status markers |
163
+ | `/declare:prioritize [M-XX]` | Rank actions by dependency weight (unblocking power) |
164
+ | `/declare:status` | Graph health, layer counts, integrity and alignment metrics |
165
+ | `/declare:help` | Show all commands |
166
+
167
+ ---
168
+
169
+ ## Project Structure
170
+
171
+ ```
172
+ FUTURE.md # Declared futures (D-01, D-02, ...)
173
+ MILESTONES.md # Derived milestones (M-01, M-02, ...)
174
+ FORK-BOUNDARY.md # What diverges from GSD and why
175
+
176
+ .planning/
177
+ ├── config.json # Project settings
178
+ ├── milestones/
179
+ │ └── M-XX-slug/
180
+ │ ├── PLAN.md # Actions for this milestone
181
+ │ └── VERIFICATION.md # Integrity proof after execution
182
+ └── research/ # Domain research artifacts
183
+
184
+ dist/declare-tools.cjs # Bundled CLI (zero runtime deps)
185
+ .claude/commands/declare/*.md # Slash command definitions
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Getting Started
191
+
192
+ ### Install
193
+
194
+ ```bash
195
+ npx declare-cc@latest
196
+ ```
197
+
198
+ Or clone and install locally:
199
+
200
+ ```bash
201
+ git clone https://github.com/decocms/declare-cc.git
202
+ cd declare-cc
203
+ node bin/install.js --claude --local
204
+ ```
205
+
206
+ Requires Node.js 18+.
207
+
208
+ ### Quick Start
209
+
210
+ ```
211
+ /declare:init # Scaffold the project
212
+ /declare:future # Declare 3-5 futures
213
+ /declare:milestones # Derive milestones backward
214
+ /declare:actions M-01 # Derive actions for first milestone
215
+ /declare:execute M-01 # Execute with wave scheduling
216
+ /declare:status # Check integrity and alignment
217
+ ```
218
+
219
+ ### Recommended: Skip Permissions Mode
220
+
221
+ Declare spawns agents and runs CLI tools frequently. For frictionless operation:
222
+
223
+ ```bash
224
+ claude --dangerously-skip-permissions
225
+ ```
226
+
227
+ <details>
228
+ <summary><strong>Alternative: Granular Permissions</strong></summary>
229
+
230
+ Add to `.claude/settings.json`:
231
+
232
+ ```json
233
+ {
234
+ "permissions": {
235
+ "allow": [
236
+ "Bash(node:*)",
237
+ "Bash(git add:*)",
238
+ "Bash(git commit:*)",
239
+ "Bash(git status:*)",
240
+ "Bash(git log:*)",
241
+ "Bash(git diff:*)"
242
+ ]
243
+ }
244
+ }
245
+ ```
246
+
247
+ </details>
248
+
249
+ ---
250
+
251
+ ## Architecture
252
+
253
+ ### Wave-Based Execution
254
+
255
+ 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.
256
+
257
+ ```
258
+ WAVE 1 (parallel) WAVE 2 (parallel) WAVE 3
259
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
260
+ │ A-01 │ │ A-02 │ │ A-03 │ │ A-04 │ │ A-05 │
261
+ │ Schema │ │ Auth │→ │ API │ │ Storage │→ │ UI │
262
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
263
+ │ │ ↑ ↑ ↑
264
+ └───────────┴──────────────┴───────────┘ │
265
+ A-03 needs A-01, A-04 needs A-02 │
266
+ A-05 needs A-03 + A-04 │
267
+ ```
268
+
269
+ Each agent gets a fresh 200k-token context window. Your main session stays at ~30-40% capacity.
270
+
271
+ ### Atomic Git Commits
272
+
273
+ Every action gets its own commit:
274
+
275
+ ```
276
+ feat(M-01): create database schema
277
+ feat(M-01): implement auth service
278
+ feat(M-01): build API endpoints
279
+ ```
280
+
281
+ Git bisect finds the exact failing action. Each action is independently revertable.
282
+
283
+ ### Zero Runtime Dependencies
284
+
285
+ The entire CLI bundles to a single `dist/declare-tools.cjs` via esbuild. No `node_modules` at runtime.
286
+
287
+ ---
288
+
289
+ ## Fork Boundary
290
+
291
+ Declare is forked from [GSD (Get Shit Done)](https://github.com/gsd-build/get-shit-done), a meta-prompting and context engineering system for Claude Code.
292
+
293
+ ### What's Carried Forward
294
+
295
+ - **Agent orchestration** — Planner, executor, researcher, verifier agent patterns
296
+ - **Slash command interface** — `.claude/commands/` directory, markdown meta-prompts
297
+ - **esbuild bundling** — Single-file CJS distribution, zero runtime deps
298
+ - **Markdown artifacts** — `.planning/` directory as source of truth
299
+ - **Atomic git commits** — Every state change produces a traceable commit
300
+ - **Context engineering** — Fresh context per agent, structured XML plans
301
+
302
+ ### What's Replaced
303
+
304
+ | GSD | Declare | Why |
305
+ |-----|---------|-----|
306
+ | Linear phases (1, 2, 3...) | Three-layer DAG (D → M → A) | Phases are past-derived sequencing; DAGs represent causal structure |
307
+ | `ROADMAP.md` | `FUTURE.md` + `MILESTONES.md` | The present is given by the future you're living into |
308
+ | `STATE.md` tracking | Graph node statuses | Status lives in the graph, not a separate file |
309
+ | Sequential execution | Topology-aware wave scheduling | Actions execute in causal order, not linear sequence |
310
+ | Phase numbers | Milestone IDs (M-XX) | Milestones derive from declarations, not arbitrary ordering |
311
+
312
+ See `FORK-BOUNDARY.md` for the full divergence map.
313
+
314
+ ---
315
+
316
+ ## License
317
+
318
+ MIT License. See [LICENSE](LICENSE) for details.
319
+
320
+ ---
321
+
322
+ <div align="center">
323
+
324
+ **Declare the future. Derive backward. Execute with integrity.**
325
+
326
+ </div>