declare-cc 0.5.4 → 0.5.7

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.
@@ -1,14 +1,14 @@
1
1
  ---
2
- name: gsd-verifier
3
- description: Verifies phase goal achievement through goal-backward analysis. Checks codebase delivers what phase promised, not just that tasks completed. Creates VERIFICATION.md report.
2
+ name: declare-verifier
3
+ description: "Verifies milestone action goal achievement through goal-backward analysis. Checks codebase delivers what the action promised, not just that tasks completed. Creates VERIFICATION.md report. Spawned by /declare:audit orchestrator."
4
4
  tools: Read, Write, Bash, Grep, Glob
5
5
  color: green
6
6
  ---
7
7
 
8
8
  <role>
9
- You are a GSD phase verifier. You verify that a phase achieved its GOAL, not just completed its TASKS.
9
+ You are a Declare action verifier. You verify that an action achieved its GOAL, not just completed its TASKS.
10
10
 
11
- Your job: Goal-backward verification. Start from what the phase SHOULD deliver, verify it actually exists and works in the codebase.
11
+ Your job: Goal-backward verification. Start from what the action SHOULD deliver, verify it actually exists and works in the codebase.
12
12
 
13
13
  **Critical mindset:** Do NOT trust SUMMARY.md claims. SUMMARYs document what Claude SAID it did. You verify what ACTUALLY exists in the code. These often differ.
14
14
  </role>
@@ -32,7 +32,7 @@ Then verify each level against the actual codebase.
32
32
  ## Step 0: Check for Previous Verification
33
33
 
34
34
  ```bash
35
- cat "$PHASE_DIR"/*-VERIFICATION.md 2>/dev/null
35
+ cat "$ACTION_DIR"/*-VERIFICATION.md 2>/dev/null
36
36
  ```
37
37
 
38
38
  **If previous verification exists with `gaps:` section → RE-VERIFICATION MODE:**
@@ -52,13 +52,13 @@ Set `is_re_verification = false`, proceed with Step 1.
52
52
  ## Step 1: Load Context (Initial Mode Only)
53
53
 
54
54
  ```bash
55
- ls "$PHASE_DIR"/*-PLAN.md 2>/dev/null
56
- ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
57
- node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "$PHASE_NUM"
58
- grep -E "^| $PHASE_NUM" .planning/REQUIREMENTS.md 2>/dev/null
55
+ ls "$ACTION_DIR"/*-PLAN.md 2>/dev/null
56
+ ls "$ACTION_DIR"/*-SUMMARY.md 2>/dev/null
57
+ cat .planning/MILESTONES.md 2>/dev/null
58
+ grep -E "^| $ACTION_ID" .planning/REQUIREMENTS.md 2>/dev/null
59
59
  ```
60
60
 
61
- Extract phase goal from ROADMAP.md — this is the outcome to verify, not the tasks.
61
+ Extract action goal from MILESTONES.md — this is the outcome to verify, not the tasks.
62
62
 
63
63
  ## Step 2: Establish Must-Haves (Initial Mode Only)
64
64
 
@@ -67,7 +67,7 @@ In re-verification mode, must-haves come from Step 0.
67
67
  **Option A: Must-haves in PLAN frontmatter**
68
68
 
69
69
  ```bash
70
- grep -l "must_haves:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
70
+ grep -l "must_haves:" "$ACTION_DIR"/*-PLAN.md 2>/dev/null
71
71
  ```
72
72
 
73
73
  If found, extract and use:
@@ -86,27 +86,27 @@ must_haves:
86
86
  via: "fetch in useEffect"
87
87
  ```
88
88
 
89
- **Option B: Use Success Criteria from ROADMAP.md**
89
+ **Option B: Use Success Criteria from the action execution plan**
90
90
 
91
- If no must_haves in frontmatter, check for Success Criteria:
91
+ If no must_haves in frontmatter, check for Success Criteria in the action execution plan:
92
92
 
93
93
  ```bash
94
- PHASE_DATA=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "$PHASE_NUM" --raw)
94
+ cat .planning/milestones/M-XX-*/A-XX-EXEC-PLAN.md 2>/dev/null
95
95
  ```
96
96
 
97
- Parse the `success_criteria` array from the JSON output. If non-empty:
97
+ Parse the `success_criteria` array from the execution plan. If non-empty:
98
98
  1. **Use each Success Criterion directly as a truth** (they are already observable, testable behaviors)
99
99
  2. **Derive artifacts:** For each truth, "What must EXIST?" — map to concrete file paths
100
100
  3. **Derive key links:** For each artifact, "What must be CONNECTED?" — this is where stubs hide
101
101
  4. **Document must-haves** before proceeding
102
102
 
103
- Success Criteria from ROADMAP.md are the contract — they take priority over Goal-derived truths.
103
+ Success Criteria from the action execution plan are the contract — they take priority over Goal-derived truths.
104
104
 
105
- **Option C: Derive from phase goal (fallback)**
105
+ **Option C: Derive from action goal (fallback)**
106
106
 
107
- If no must_haves in frontmatter AND no Success Criteria in ROADMAP:
107
+ If no must_haves in frontmatter AND no Success Criteria in the execution plan:
108
108
 
109
- 1. **State the goal** from ROADMAP.md
109
+ 1. **State the goal** from MILESTONES.md
110
110
  2. **Derive truths:** "What must be TRUE?" — list 3-7 observable, testable behaviors
111
111
  3. **Derive artifacts:** For each truth, "What must EXIST?" — map to concrete file paths
112
112
  4. **Derive key links:** For each artifact, "What must be CONNECTED?" — this is where stubs hide
@@ -131,10 +131,10 @@ For each truth:
131
131
 
132
132
  ## Step 4: Verify Artifacts (Three Levels)
133
133
 
134
- Use gsd-tools for artifact verification against must_haves in PLAN frontmatter:
134
+ Use declare-tools for artifact verification against must_haves in PLAN frontmatter:
135
135
 
136
136
  ```bash
137
- ARTIFACT_RESULT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify artifacts "$PLAN_PATH")
137
+ ARTIFACT_RESULT=$(node dist/declare-tools.cjs verify artifacts "$PLAN_PATH")
138
138
  ```
139
139
 
140
140
  Parse JSON result: `{ all_passed, passed, total, artifacts: [{path, exists, issues, passed}] }`
@@ -180,10 +180,10 @@ grep -r "$artifact_name" "${search_path:-src/}" --include="*.ts" --include="*.ts
180
180
 
181
181
  Key links are critical connections. If broken, the goal fails even with all artifacts present.
182
182
 
183
- Use gsd-tools for key link verification against must_haves in PLAN frontmatter:
183
+ Use declare-tools for key link verification against must_haves in PLAN frontmatter:
184
184
 
185
185
  ```bash
186
- LINKS_RESULT=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify key-links "$PLAN_PATH")
186
+ LINKS_RESULT=$(node dist/declare-tools.cjs verify key-links "$PLAN_PATH")
187
187
  ```
188
188
 
189
189
  Parse JSON result: `{ all_verified, verified, total, links: [{from, to, via, verified, detail}] }`
@@ -236,10 +236,10 @@ Status: WIRED (state displayed) | NOT_WIRED (state exists, not rendered)
236
236
  **6a. Extract requirement IDs from PLAN frontmatter:**
237
237
 
238
238
  ```bash
239
- grep -A5 "^requirements:" "$PHASE_DIR"/*-PLAN.md 2>/dev/null
239
+ grep -A5 "^requirements:" "$ACTION_DIR"/*-PLAN.md 2>/dev/null
240
240
  ```
241
241
 
242
- Collect ALL requirement IDs declared across plans for this phase.
242
+ Collect ALL requirement IDs declared across plans for this action.
243
243
 
244
244
  **6b. Cross-reference against REQUIREMENTS.md:**
245
245
 
@@ -254,27 +254,27 @@ For each requirement ID from plans:
254
254
  **6c. Check for orphaned requirements:**
255
255
 
256
256
  ```bash
257
- grep -E "Phase $PHASE_NUM" .planning/REQUIREMENTS.md 2>/dev/null
257
+ grep -E "Action $ACTION_ID" .planning/REQUIREMENTS.md 2>/dev/null
258
258
  ```
259
259
 
260
- If REQUIREMENTS.md maps additional IDs to this phase that don't appear in ANY plan's `requirements` field, flag as **ORPHANED** — these requirements were expected but no plan claimed them. ORPHANED requirements MUST appear in the verification report.
260
+ If REQUIREMENTS.md maps additional IDs to this action that don't appear in ANY plan's `requirements` field, flag as **ORPHANED** — these requirements were expected but no plan claimed them. ORPHANED requirements MUST appear in the verification report.
261
261
 
262
262
  ## Step 7: Scan for Anti-Patterns
263
263
 
264
- Identify files modified in this phase from SUMMARY.md key-files section, or extract commits and verify:
264
+ Identify files modified in this action from SUMMARY.md key-files section, or extract commits and verify:
265
265
 
266
266
  ```bash
267
267
  # Option 1: Extract from SUMMARY frontmatter
268
- SUMMARY_FILES=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs summary-extract "$PHASE_DIR"/*-SUMMARY.md --fields key-files)
268
+ SUMMARY_FILES=$(node dist/declare-tools.cjs summary-extract "$ACTION_DIR"/*-SUMMARY.md --fields key-files)
269
269
 
270
270
  # Option 2: Verify commits exist (if commit hashes documented)
271
- COMMIT_HASHES=$(grep -oE "[a-f0-9]{7,40}" "$PHASE_DIR"/*-SUMMARY.md | head -10)
271
+ COMMIT_HASHES=$(grep -oE "[a-f0-9]{7,40}" "$ACTION_DIR"/*-SUMMARY.md | head -10)
272
272
  if [ -n "$COMMIT_HASHES" ]; then
273
- COMMITS_VALID=$(node ~/.claude/get-shit-done/bin/gsd-tools.cjs verify commits $COMMIT_HASHES)
273
+ COMMITS_VALID=$(node dist/declare-tools.cjs verify commits $COMMIT_HASHES)
274
274
  fi
275
275
 
276
276
  # Fallback: grep for files
277
- grep -E "^\- \`" "$PHASE_DIR"/*-SUMMARY.md | sed 's/.*`\([^`]*\)`.*/\1/' | sort -u
277
+ grep -E "^\- \`" "$ACTION_DIR"/*-SUMMARY.md | sed 's/.*`\([^`]*\)`.*/\1/' | sort -u
278
278
  ```
279
279
 
280
280
  Run anti-pattern detection on each file:
@@ -319,7 +319,7 @@ Categorize: 🛑 Blocker (prevents goal) | ⚠️ Warning (incomplete) | ℹ️
319
319
 
320
320
  ## Step 10: Structure Gap Output (If Gaps Found)
321
321
 
322
- Structure gaps in YAML frontmatter for `/gsd:plan-phase --gaps`:
322
+ Structure gaps in YAML frontmatter for `/declare:plan --gaps`:
323
323
 
324
324
  ```yaml
325
325
  gaps:
@@ -349,11 +349,11 @@ gaps:
349
349
 
350
350
  **ALWAYS use the Write tool to create files** — never use `Bash(cat << 'EOF')` or heredoc commands for file creation.
351
351
 
352
- Create `.planning/phases/{phase_dir}/{phase_num}-VERIFICATION.md`:
352
+ Create `.planning/milestones/{milestone_dir}/{action_dir}/{action_id}-VERIFICATION.md`:
353
353
 
354
354
  ```markdown
355
355
  ---
356
- phase: XX-name
356
+ action: A-XX-name
357
357
  verified: YYYY-MM-DDTHH:MM:SSZ
358
358
  status: passed | gaps_found | human_needed
359
359
  score: N/M must-haves verified
@@ -379,9 +379,9 @@ human_verification: # Only if status: human_needed
379
379
  why_human: "Why can't verify programmatically"
380
380
  ---
381
381
 
382
- # Phase {X}: {Name} Verification Report
382
+ # Action A-XX: {Name} Verification Report
383
383
 
384
- **Phase Goal:** {goal from ROADMAP.md}
384
+ **Action Goal:** {goal from MILESTONES.md}
385
385
  **Verified:** {timestamp}
386
386
  **Status:** {status}
387
387
  **Re-verification:** {Yes — after gap closure | No — initial verification}
@@ -429,12 +429,12 @@ human_verification: # Only if status: human_needed
429
429
  ---
430
430
 
431
431
  _Verified: {timestamp}_
432
- _Verifier: Claude (gsd-verifier)_
432
+ _Verifier: Claude (declare-verifier)_
433
433
  ```
434
434
 
435
435
  ## Return to Orchestrator
436
436
 
437
- **DO NOT COMMIT.** The orchestrator bundles VERIFICATION.md with other phase artifacts.
437
+ **DO NOT COMMIT.** The orchestrator bundles VERIFICATION.md with other action artifacts.
438
438
 
439
439
  Return with:
440
440
 
@@ -443,10 +443,10 @@ Return with:
443
443
 
444
444
  **Status:** {passed | gaps_found | human_needed}
445
445
  **Score:** {N}/{M} must-haves verified
446
- **Report:** .planning/phases/{phase_dir}/{phase_num}-VERIFICATION.md
446
+ **Report:** .planning/milestones/{milestone_dir}/{action_dir}/{action_id}-VERIFICATION.md
447
447
 
448
448
  {If passed:}
449
- All must-haves verified. Phase goal achieved. Ready to proceed.
449
+ All must-haves verified. Action goal achieved. Ready to proceed.
450
450
 
451
451
  {If gaps_found:}
452
452
  ### Gaps Found
@@ -454,7 +454,7 @@ All must-haves verified. Phase goal achieved. Ready to proceed.
454
454
  1. **{Truth 1}** — {reason}
455
455
  - Missing: {what needs to be added}
456
456
 
457
- Structured gaps in VERIFICATION.md frontmatter for `/gsd:plan-phase --gaps`.
457
+ Structured gaps in VERIFICATION.md frontmatter for `/declare:plan --gaps`.
458
458
 
459
459
  {If human_needed:}
460
460
  ### Human Verification Required
@@ -475,7 +475,7 @@ Automated checks passed. Awaiting human verification.
475
475
 
476
476
  **DO NOT skip key link verification.** 80% of stubs hide here — pieces exist but aren't connected.
477
477
 
478
- **Structure gaps in YAML frontmatter** for `/gsd:plan-phase --gaps`.
478
+ **Structure gaps in YAML frontmatter** for `/declare:plan --gaps`.
479
479
 
480
480
  **DO flag for human verification when uncertain** (visual, real-time, external service).
481
481
 
@@ -24,12 +24,24 @@ If no declarations exist in the graph, tell the user to run `/declare:future` fi
24
24
 
25
25
  Note all declarations and milestones from the graph -- the workflow needs full context.
26
26
 
27
- **Step 2: Determine scope.**
27
+ **Step 2: Scope review (first-time derivation only).**
28
+
29
+ Skip this step if `$ARGUMENTS` contains a specific declaration ID (e.g., `D-01`) — targeted re-derivation skips scope review.
30
+
31
+ Otherwise, check if any milestones already exist in the graph. If milestones already exist, this is a re-derivation — skip scope review and proceed to Step 3.
32
+
33
+ If this is the first time deriving milestones (no milestones in the graph yet), run the scope review workflow before deriving anything:
34
+
35
+ @workflows/scope.md
36
+
37
+ Pass all declarations from the loaded graph into the scope workflow. After the scope is confirmed, continue to Step 3.
38
+
39
+ **Step 3: Determine derivation scope.**
28
40
 
29
41
  - If `$ARGUMENTS` contains a declaration ID (e.g., `D-01`), derive only for that specific declaration.
30
42
  - Otherwise, derive for all declarations that have no milestones yet (declarations with empty milestones arrays in the graph).
31
43
 
32
- **Step 3: Follow the milestone derivation workflow.**
44
+ **Step 4: Follow the milestone derivation workflow.**
33
45
 
34
46
  Read and follow the full workflow instructions:
35
47
 
@@ -37,7 +49,7 @@ Read and follow the full workflow instructions:
37
49
 
38
50
  Pass the loaded graph state into the workflow so it knows about existing declarations and milestones.
39
51
 
40
- **Step 4: Per-declaration milestone confirmation with checkboxes.**
52
+ **Step 5: Per-declaration milestone confirmation with checkboxes.**
41
53
 
42
54
  After the workflow proposes milestones for a declaration, present them using AskUserQuestion with multi-select checkboxes:
43
55
 
@@ -50,7 +62,7 @@ Which of these milestones should we create for D-XX?
50
62
  - [ ] Milestone C -- because [reason]
51
63
  ```
52
64
 
53
- **Step 5: Persist all accepted milestones in one batch call.**
65
+ **Step 6: Persist all accepted milestones in one batch call.**
54
66
 
55
67
  Build a JSON array of the checked milestones, then create them all at once:
56
68
 
@@ -60,7 +72,7 @@ node dist/declare-tools.cjs add-milestones --json '[{"title":"Milestone A","real
60
72
 
61
73
  This creates all milestones and makes a single git commit. Parse the JSON output — it returns `{ milestones: [{ id, title, realizes, status }], committed, hash }`.
62
74
 
63
- **Step 6: Inconsistency flagging.**
75
+ **Step 7: Inconsistency flagging.**
64
76
 
65
77
  If milestones already exist for a declaration being processed (re-derivation case):
66
78
  - Show existing milestones for that declaration
@@ -68,7 +80,7 @@ If milestones already exist for a declaration being processed (re-derivation cas
68
80
  - Offer to keep, re-derive, or adjust
69
81
  - Do NOT auto-reconcile -- the user decides what to update
70
82
 
71
- **Step 7: Show summary and suggest next step.**
83
+ **Step 8: Show summary and suggest next step.**
72
84
 
73
85
  After all declarations processed:
74
86
 
@@ -60,7 +60,37 @@ If no actions found, display: "No actions found for M-XX. Run `/declare:actions
60
60
 
61
61
  If all actions already have EXEC-PLANs and status is not PENDING, display: "All actions for M-XX already have EXEC-PLANs. Use `/declare:execute M-XX` to run them." and exit.
62
62
 
63
- **Step 3: Research check (unless --skip-research).**
63
+ **Step 3: Ensure milestone context exists.**
64
+
65
+ Check if CONTEXT.md exists at `milestoneFolderPath/CONTEXT.md`.
66
+
67
+ If CONTEXT.md does **not** exist, use AskUserQuestion:
68
+ - header: "Context"
69
+ - question: "Milestone [M-XX] has no implementation context yet. Discussing decisions now gives the planner the information it needs to create better EXEC-PLANs."
70
+ - options:
71
+ - "Discuss first (Recommended)" — Run discuss workflow, then proceed to planning
72
+ - "Plan without context" — Skip; planner will use its own judgment
73
+
74
+ If "Discuss first":
75
+
76
+ Display: `Running /declare:discuss [M-XX]...`
77
+
78
+ Spawn a Task agent:
79
+ - subagent_type: `general-purpose`
80
+ - description: `Discuss M-XX implementation decisions`
81
+ - prompt:
82
+ ```
83
+ Run /declare:discuss [M-XX] for the Declare project.
84
+ Working directory: [absolute cwd]
85
+ Follow all instructions in commands/declare/discuss.md.
86
+ After capturing context, return DONE.
87
+ ```
88
+
89
+ Wait for the task to complete. Then reload `contextPath` — CONTEXT.md should now exist.
90
+
91
+ If "Plan without context": continue to Step 4.
92
+
93
+ **Step 4: Research check (unless --skip-research).**
64
94
 
65
95
  If `researchPath` exists, display:
66
96
  ```
@@ -79,7 +109,7 @@ If `researchPath` does not exist, assess whether research is needed:
79
109
 
80
110
  - If actions are purely internal (refactoring, adding features to existing patterns, docs) → skip silently.
81
111
 
82
- **Step 4: Load context files.**
112
+ **Step 5: Load context files.**
83
113
 
84
114
  ```bash
85
115
  cat [contextPath] 2>/dev/null # CONTEXT.md if exists
@@ -91,7 +121,7 @@ cat .planning/STATE.md 2>/dev/null # Current position and decisions
91
121
 
92
122
  Also read the milestone's PLAN.md (at `milestoneFolderPath/PLAN.md`) for action details.
93
123
 
94
- **Step 5: Spawn declare-planner.**
124
+ **Step 6: Spawn declare-planner.**
95
125
 
96
126
  Spawn a Task agent using `agents/declare-planner.md` with the following prompt:
97
127
 
@@ -118,7 +148,7 @@ Return: PLANNING COMPLETE with wave structure and EXEC-PLANs created.
118
148
 
119
149
  Wait for the planner to complete.
120
150
 
121
- **Step 6: Spawn declare-plan-checker.**
151
+ **Step 7: Spawn declare-plan-checker.**
122
152
 
123
153
  After planner completes, spawn a Task agent using `agents/declare-plan-checker.md` with the following prompt:
124
154
 
@@ -141,15 +171,15 @@ Return: VERIFICATION PASSED or ISSUES FOUND with structured issues YAML.
141
171
 
142
172
  Wait for the checker to complete.
143
173
 
144
- **Step 7: Evaluate checker result.**
174
+ **Step 8: Evaluate checker result.**
145
175
 
146
176
  Parse the checker's return.
147
177
 
148
- If **VERIFICATION PASSED**: proceed to Step 9.
178
+ If **VERIFICATION PASSED**: proceed to Step 10.
149
179
 
150
- If **ISSUES FOUND**: proceed to Step 8 (revision loop).
180
+ If **ISSUES FOUND**: proceed to Step 9 (revision loop).
151
181
 
152
- **Step 8: Revision loop (max 3 iterations).**
182
+ **Step 9: Revision loop (max 3 iterations).**
153
183
 
154
184
  Track revision count. If revision count >= 3, skip to Step 9 with a warning.
155
185
 
@@ -175,11 +205,11 @@ Make targeted fixes only — do not rewrite working plans.
175
205
  Return: REVISION COMPLETE with changes made.
176
206
  ```
177
207
 
178
- After revision, re-run checker (Step 6). Increment revision count.
208
+ After revision, re-run checker (Step 7). Increment revision count.
179
209
 
180
210
  Repeat until VERIFICATION PASSED or revision count reaches 3.
181
211
 
182
- **Step 9: Commit EXEC-PLANs.**
212
+ **Step 10: Commit EXEC-PLANs.**
183
213
 
184
214
  Pass each file as a separate `--files` argument (not space-separated in one argument):
185
215
 
@@ -189,7 +219,7 @@ node dist/declare-tools.cjs commit "docs(${MILESTONE}): create exec-plans for mi
189
219
 
190
220
  If the commit reports `nothing_to_commit`, the planner already committed the files — that is fine, continue.
191
221
 
192
- **Step 10: Present results.**
222
+ **Step 11: Present results.**
193
223
 
194
224
  Display final summary:
195
225
 
@@ -73,7 +73,7 @@ If `--full` is NOT present, skip this step and proceed directly to Step 4.
73
73
 
74
74
  **Step 4: Execute the task.**
75
75
 
76
- Spawn a Task agent to execute the work:
76
+ Spawn a Task agent with `subagent_type="general-purpose"` to execute the work:
77
77
 
78
78
  ```
79
79
  Execute the quick task described below. Make atomic commits after each logical unit of work.
@@ -1329,7 +1329,7 @@ var require_help = __commonJS({
1329
1329
  usage: "/declare:help"
1330
1330
  }
1331
1331
  ],
1332
- version: "0.5.2"
1332
+ version: "0.5.7"
1333
1333
  };
1334
1334
  }
1335
1335
  module2.exports = { runHelp: runHelp2 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declare-cc",
3
- "version": "0.5.4",
3
+ "version": "0.5.7",
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"
@@ -43,6 +43,7 @@
43
43
  },
44
44
  "scripts": {
45
45
  "test": "node --test src/graph/engine.test.js",
46
- "build": "node esbuild.config.js"
46
+ "build": "node esbuild.config.js",
47
+ "release": "node scripts/release.js"
47
48
  }
48
49
  }
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ // Release script: bump version, build, commit, tag.
3
+ // Usage: npm run release -- <version>
4
+ // Example: npm run release -- 0.5.6
5
+ //
6
+ // After this runs, publish manually:
7
+ // npm publish --otp=<your-2fa-code>
8
+ // git push && git push --tags
9
+
10
+ 'use strict';
11
+
12
+ const { execSync } = require('child_process');
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ const version = process.argv[2];
17
+ if (!version || !/^\d+\.\d+\.\d+$/.test(version)) {
18
+ console.error('Usage: npm run release -- <version> (e.g. 0.5.6)');
19
+ process.exit(1);
20
+ }
21
+
22
+ const root = path.join(__dirname, '..');
23
+ const pkgPath = path.join(root, 'package.json');
24
+
25
+ function run(cmd) {
26
+ console.log(`> ${cmd}`);
27
+ execSync(cmd, { cwd: root, stdio: 'inherit' });
28
+ }
29
+
30
+ // 1. Bump version in package.json
31
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
32
+ const prev = pkg.version;
33
+ pkg.version = version;
34
+ fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
35
+ console.log(`Bumped ${prev} → ${version}`);
36
+
37
+ // 2. Build
38
+ run('npm run build');
39
+
40
+ // 3. Commit + tag
41
+ run(`git add package.json package-lock.json dist/`);
42
+ run(`git commit -m "chore: bump version to ${version}"`);
43
+ run(`git tag v${version}`);
44
+
45
+ console.log(`
46
+ Done. To publish:
47
+
48
+ npm publish --otp=<your-2fa-code>
49
+ git push && git push --tags
50
+ `);
@@ -0,0 +1,94 @@
1
+ # Declaration Scope Review
2
+
3
+ You are reviewing the full set of declared futures with the user before deriving milestones. This is a synthesis checkpoint — confirm the foundation is solid so milestone derivation builds on the right ground.
4
+
5
+ ## Purpose
6
+
7
+ Before working backward to milestones, establish:
8
+ 1. The declarations collectively tell a coherent story
9
+ 2. The scope boundary is clear (what's in, what's out)
10
+ 3. No important futures are missing or redundant
11
+ 4. The framing reflects what the user actually intends to build
12
+
13
+ ## Opening
14
+
15
+ Synthesize all declarations into a scope statement. Do not simply list them — draw out what they *mean together*:
16
+
17
+ ```
18
+ Looking at your declarations as a whole:
19
+
20
+ [D-01]: [statement]
21
+ [D-02]: [statement]
22
+ ...
23
+
24
+ Here's the scope I see:
25
+
26
+ [2-3 sentence synthesis: what this project creates, who it serves, what fundamentally changes]
27
+
28
+ In scope: [concrete things the declarations cover]
29
+ Assumed out of scope: [what the declarations imply is NOT the focus]
30
+
31
+ Does this framing match your intent?
32
+ ```
33
+
34
+ Present this as text, then use AskUserQuestion:
35
+
36
+ - header: "Scope"
37
+ - question: "Does this framing capture what you're building?"
38
+ - options:
39
+ - "Yes, this is right — derive milestones" (Recommended)
40
+ - "A declaration needs adjusting"
41
+ - "Something important is missing"
42
+ - "The scope feels off"
43
+
44
+ ## If "A declaration needs adjusting"
45
+
46
+ Ask which declaration and what's off. Work through the refinement conversationally. If the updated statement is meaningfully different:
47
+
48
+ ```bash
49
+ node dist/declare-tools.cjs add-declaration --title "[revised title]" --statement "[revised statement]"
50
+ ```
51
+
52
+ Note: if removing the old version matters, flag it to the user — they can delete the old declaration or keep both if they serve different purposes.
53
+
54
+ After the change, re-synthesize and confirm once more.
55
+
56
+ ## If "Something important is missing"
57
+
58
+ Guide the user to state the missing future using the same language principles as in `/declare:future`: present-tense, stated as fact, not goal language. Validate and add:
59
+
60
+ ```bash
61
+ node dist/declare-tools.cjs add-declaration --title "[title]" --statement "[statement]"
62
+ ```
63
+
64
+ After adding, re-synthesize and confirm.
65
+
66
+ ## If "The scope feels off"
67
+
68
+ Probe what specifically feels wrong:
69
+
70
+ - Too broad? — Help identify which declarations to narrow or which to defer
71
+ - Too narrow? — Something missing (redirect to above)
72
+ - Wrong framing? — Rephrase the synthesis, not the declarations, and re-confirm
73
+
74
+ One pass of adjustment is enough. After a second confirmation attempt, proceed.
75
+
76
+ ## After Confirmation
77
+
78
+ Once framing is confirmed, briefly acknowledge it and move forward:
79
+
80
+ ```
81
+ Scope confirmed.
82
+
83
+ [N] declarations covering [core theme]. Deriving milestones by working backward from each.
84
+ ```
85
+
86
+ Then immediately proceed to milestone derivation — do not ask more questions here.
87
+
88
+ ## Design Principles
89
+
90
+ - **Synthesize, don't list.** The user already saw their declarations. Show what they mean together.
91
+ - **Name what's out.** Explicit scope exclusions prevent milestone sprawl during derivation.
92
+ - **One round of adjustment.** If the user modifies and re-confirms, proceed. Don't loop more than twice.
93
+ - **Be concrete.** Don't say "the project creates value" — say "the project gives developers a self-hosted AI coding workflow that runs without a cloud dependency."
94
+ - **No emojis.** Keep tone grounded.