create-specfuse 0.6.2 → 0.6.3

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,4 +1,4 @@
1
- import type { TemplateContext } from '../types.js';
1
+ import type { TemplateContext } from "../types.js";
2
2
  export declare function renderGrillReview(): string;
3
3
  export declare function composeCLAUDEmd(ctx: TemplateContext): string;
4
4
  //# sourceMappingURL=claude-md.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,aAAa,CAAC;AA4KjE,wBAAgB,iBAAiB,IAAI,MAAM,CAgE1C;AAaD,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAkC5D"}
1
+ {"version":3,"file":"claude-md.d.ts","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,aAAa,CAAC;AA8KjE,wBAAgB,iBAAiB,IAAI,MAAM,CAmE1C;AAaD,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAkC5D"}
@@ -1,6 +1,6 @@
1
1
  function renderTechStack(stack) {
2
2
  const lines = [
3
- '## Tech Stack',
3
+ "## Tech Stack",
4
4
  ...stack.languages.map((l) => `- Language: ${l}`),
5
5
  ];
6
6
  if (stack.framework)
@@ -10,7 +10,7 @@ function renderTechStack(stack) {
10
10
  lines.push(`- Format: \`${stack.commands.format}\``);
11
11
  if (stack.commands.typecheck)
12
12
  lines.push(`- Typecheck: \`${stack.commands.typecheck}\``);
13
- return lines.join('\n');
13
+ return lines.join("\n");
14
14
  }
15
15
  function renderCommitConvention() {
16
16
  return `## Commit Convention
@@ -161,6 +161,8 @@ Before \`/opsx:archive\`:
161
161
  export function renderGrillReview() {
162
162
  return `### Pre-Apply Review (Grill)
163
163
 
164
+ Per-artifact review surfaces and check tools (signature substitution, assertion strength, etc.) live in \`.claude/skills/grill-me/SKILL.md\`. This section governs discipline and process.
165
+
164
166
  When all artifacts (proposal, design, specs, tasks) are complete, the AI MUST prompt:
165
167
  > "All artifacts are ready. Recommend running \`/grill-me\` for a pre-apply review before implementation. Or run \`/opsx:apply\` directly to skip review."
166
168
 
@@ -185,6 +187,7 @@ If the user runs \`/opsx:apply\` without prior grill, this is treated as an impl
185
187
  - Security — input validation, permissions, data exposure risks?
186
188
  - Performance impact — O(n²), blocking IO, memory pressure?
187
189
  - Backward compatibility — any breaking changes to existing APIs/behaviors?
190
+ - **Data-flow integrity** — every spec input value has a parameter slot in a declared signature; walk the call chain by substitution; spec scenarios must be strong enough to prove the input took effect (assertion strength), not just assert the output shell.
188
191
 
189
192
  **Problem Classification:**
190
193
  - **Blocking** (must resolve before apply): artifact contradictions, uncovered edge cases, missing error handling, security risks, untestable specs. User may override with explicit acknowledgment.
@@ -195,11 +198,11 @@ If the user runs \`/opsx:apply\` without prior grill, this is treated as an impl
195
198
  - \`grill-abort\`: Exit grill, rollback all modifications from \`.grill-backup/\`.
196
199
  - Ambiguous expressions ("stop", "算了"): AI MUST ask for clarification — "exit grill review, or abandon the entire change?"
197
200
 
198
- **Soft Limit:** After 15 questions, self-assess whether remaining issues are blocking-level. If none remain, proceed to summary.
201
+ **Soft Limit:** After 9 questions, self-assess whether remaining issues are blocking-level. If none remain, proceed to summary.
199
202
 
200
203
  **Consistency Scan** (before summary):
201
204
  Run a final check across all artifacts for:
202
- - Reference integrity — every goal in proposal maps to design/specs/tasks
205
+ - Reference integrity — every goal in proposal maps to design/specs/tasks, and every spec WHEN input maps to a parameter slot in a declared signature (reverse direction — data-flow integrity)
203
206
  - Terminology consistency — same concepts use same names throughout
204
207
  - Logical conflict detection — no artifact contradicts another
205
208
 
@@ -236,36 +239,36 @@ function renderGeneralRules() {
236
239
  export function composeCLAUDEmd(ctx) {
237
240
  const sections = [
238
241
  `# Project CLAUDE.md`,
239
- '',
242
+ "",
240
243
  renderTechStack(ctx.stack),
241
- '',
244
+ "",
242
245
  renderCommitConvention(),
243
- '',
246
+ "",
244
247
  renderDesignTokensRules(),
245
- '',
246
- '---',
247
- '',
248
- '<!-- FUSION:START -->',
249
- '## OpenSpec & Superpowers Composite Workflow Constraints',
250
- '',
251
- 'This project enforces a fused OpenSpec + Superpowers engineering pipeline.',
252
- 'AI agents MUST follow these rules without exception.',
253
- '',
248
+ "",
249
+ "---",
250
+ "",
251
+ "<!-- FUSION:START -->",
252
+ "## OpenSpec & Superpowers Composite Workflow Constraints",
253
+ "",
254
+ "This project enforces a fused OpenSpec + Superpowers engineering pipeline.",
255
+ "AI agents MUST follow these rules without exception.",
256
+ "",
254
257
  renderPathA(),
255
- '',
258
+ "",
256
259
  renderPathB(),
257
- '',
260
+ "",
258
261
  renderExploration(),
259
- '',
262
+ "",
260
263
  renderGrillReview(),
261
- '',
264
+ "",
262
265
  renderApplyPhase(ctx.stack),
263
- '',
266
+ "",
264
267
  renderVerifyPhase(ctx.stack),
265
- '',
268
+ "",
266
269
  renderGeneralRules(),
267
- '<!-- FUSION:END -->',
270
+ "<!-- FUSION:END -->",
268
271
  ];
269
- return sections.join('\n') + '\n';
272
+ return sections.join("\n") + "\n";
270
273
  }
271
274
  //# sourceMappingURL=claude-md.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../src/templates/claude-md.ts"],"names":[],"mappings":"AAEA,SAAS,eAAe,CAAC,KAAmB;IAC1C,MAAM,KAAK,GAAG;QACZ,eAAe;QACf,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;KAClD,CAAC;IACF,IAAI,KAAK,CAAC,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IACnE,KAAK,CAAC,IAA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ED,MAAM,UAAU,iBAAiB;IAC/B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiEF,CAAC;AACR,CAAC;AAED,SAAS,kBAAkB;IACzB,OAAO;;;;;;;2EAOkE,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,GAAoB;IAClD,MAAM,QAAQ,GAAG;QACf,qBAAqB;QACrB,EAAE;QACF,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC;QAC1B,EAAE;QACF,sBAAsB,EAAE;QACxB,EAAE;QACF,uBAAuB,EAAE;QACzB,EAAE;QACF,KAAK;QACL,EAAE;QACF,uBAAuB;QACvB,0DAA0D;QAC1D,EAAE;QACF,4EAA4E;QAC5E,sDAAsD;QACtD,EAAE;QACF,WAAW,EAAE;QACb,EAAE;QACF,WAAW,EAAE;QACb,EAAE;QACF,iBAAiB,EAAE;QACnB,EAAE;QACF,iBAAiB,EAAE;QACnB,EAAE;QACF,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC;QAC3B,EAAE;QACF,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC;QAC5B,EAAE;QACF,kBAAkB,EAAE;QACpB,qBAAqB;KACtB,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"grill-me-skill.d.ts","sourceRoot":"","sources":["../../src/templates/grill-me-skill.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,IAAI,MAAM,CAkB5C"}
1
+ {"version":3,"file":"grill-me-skill.d.ts","sourceRoot":"","sources":["../../src/templates/grill-me-skill.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,IAAI,MAAM,CAoE5C"}
@@ -4,17 +4,67 @@ name: grill-me
4
4
  description: Pre-apply review — stress-test all artifacts before implementation. Use when artifacts are complete and you want a structured review before /opsx:apply.
5
5
  ---
6
6
 
7
- Activate the **Pre-Apply Review (Grill)** protocol defined in CLAUDE.md.
7
+ # Pre-Apply Review (Grill)
8
8
 
9
- Follow the "Pre-Apply Review (Grill)" section rules exactly:
10
- 1. Backup change directory to \`.grill-backup/\` before grill begins
11
- 2. Review all artifacts (proposal, design, specs, tasks) one question at a time
12
- 3. Each question: [blocking/non-blocking] + issue + recommended answer + modification preview
13
- 4. Direct-modify artifacts on acceptance (user must see final diff before write)
14
- 5. Run consistency scan before summary
15
- 6. Output summary and prompt \`/opsx:apply\`
9
+ Activate the review. The full method is self-contained in this skill; the CLAUDE.md "Pre-Apply Review (Grill)" protocol governs project-level discipline (classification, backup, rollback).
16
10
 
17
- Exit commands: \`grill-stop\` (keep changes), \`grill-abort\` (rollback from backup).
11
+ ## Discipline (every question)
12
+
13
+ - Ask ONE question at a time.
14
+ - Every question carries artifact evidence (file:line + specific scenario) — no evidence, no question. This is what keeps the review dense instead of formalistic.
15
+ - Every question includes a recommended answer.
16
+ - Classify each issue as [blocking] or [non-blocking].
17
+ - Soft limit: After 9 questions, self-assess whether remaining issues are blocking-level. If none remain, proceed to summary.
18
+
19
+ ## Flow
20
+
21
+ 1. **Backup**: Copy the change directory to \`.grill-backup/\` before grill begins. Clean stale backups if present.
22
+ 2. **Review**: All artifacts (proposal, design, specs, tasks) one question at a time.
23
+ 3. **Write**: On acceptance, show the final diff before any write, then modify the artifact.
24
+ 4. **Consistency scan**: Run the bidirectional scan before summary.
25
+ 5. **Summary**: Output the review summary and prompt \`/opsx:apply\`.
26
+ 6. **Cleanup**: Delete \`.grill-backup/\` after successful completion.
27
+
28
+ ## Review Surfaces (by artifact group — discovery perspectives, not mandatory per-item questions)
29
+
30
+ [proposal.md]
31
+ - Scope clarity — non-goals present and unambiguous
32
+ - Trade-off reality — each trade-off names rejected alternatives and reasons
33
+ - Verification executable — the verification strategy can actually run
34
+ - Problem validity — diagnoses a real problem, not an invented one
35
+
36
+ [design.md]
37
+ - Signature contract — every declared input has a source and a consumer (signature substitution)
38
+ - Dependency direction — domain never imports adapters; arrows point inward
39
+ - State & concurrency — shared state, lifecycle, who holds the lock
40
+ - Config defaults — every flag has a default, a range, and fallback behavior
41
+ - Error ownership — every failure class has a handling layer
42
+
43
+ [specs/]
44
+ - Independently testable — success and failure behaviors both present
45
+ - Boundary conditions — empty, over-limit, boundary values
46
+ - Input slot — every spec WHEN input maps to a parameter slot in a declared signature
47
+ - Assertion strength — scenarios prove an input took effect, not merely an output shell
48
+ - Terminology consistent — same concept, same name across specs
49
+ - Preconditions explicit — implied state assumptions written out
50
+
51
+ [tasks/]
52
+ - Verifiable — "done" is checkable by a command
53
+ - TDD order — failing test first, then implementation
54
+ - Spec trace — every spec scenario has a corresponding task, and vice versa
55
+ - Granularity — chunks ≤ 2h with correct dependencies
56
+
57
+ ## Check Tools (trigger-based, not run every round)
58
+
59
+ - **Signature substitution** — for each public signature ask: where does each input come from, who constructs it, who consumes it?
60
+ - **Bidirectional parameter flow** — spec input → design parameter slot; design parameter → spec scenario
61
+ - **Implementation rehearsal** — for each signature ask: "can I write this now and satisfy the spec?"
62
+
63
+ ## Boundary Discipline
64
+
65
+ - **Assertion-strength triage**: presentation defect (behavior already defined in proposal/design) → strengthen the THEN; requirements defect (behavior never defined) → route to Think/user, never invent.
66
+ - **Consistency scan runs both directions**: proposal → specs/tasks (forward) and spec inputs → design signature slots (reverse).
67
+ - **Exit commands**: \`grill-stop\` (keep changes), \`grill-abort\` (rollback from \`.grill-backup/\`).
18
68
  `;
19
69
  }
20
70
  //# sourceMappingURL=grill-me-skill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grill-me-skill.js","sourceRoot":"","sources":["../../src/templates/grill-me-skill.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;CAgBR,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"grill-me-skill.js","sourceRoot":"","sources":["../../src/templates/grill-me-skill.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-specfuse",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Scaffold projects with OpenSpec + Superpowers fusion methodology",
5
5
  "type": "module",
6
6
  "bin": {