create-specfuse 0.6.0 → 0.6.2

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 +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;AAmKjE,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;AA4KjE,wBAAgB,iBAAiB,IAAI,MAAM,CAgE1C;AAaD,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAkC5D"}
@@ -20,7 +20,16 @@ function renderCommitConvention() {
20
20
  function renderDesignTokensRules() {
21
21
  return `## DESIGN-TOKENS.md Generation Rules
22
22
 
23
- - **Brainstorming auto-trigger:** When brainstorming involves frontend/UI design intent, brainstorming 阶段结束后 MUST invoke \`/design-md\` skill FIRST. \`/design-md\` completes questionnaire and generates DESIGN-TOKENS.md, THEN resume the OpenSpec artifact flow (proposal → design → specs → tasks).
23
+ DESIGN-TOKENS.md 触发判定在 brainstorming 结束时执行,采用三道门依次评估(命中即停):
24
+
25
+ - **Brainstorming auto-trigger (three-gate test, evaluated at brainstorming end):**
26
+ - **Gate 1 — Primary trigger:** Does this change or project ship a UI consumed by an end user? Trigger if ANY: new WebUI / desktop GUI / mobile interface; modifying the visual presentation layer of an existing UI; deliverable embeds a frontend (SPA / templates / \`go:embed\` web assets). Examples — hit: a ping tool with a browser UI; miss: a pure API / CLI / backend service / library / script.
27
+ - **Gate 2 — Exemption:** Skip if visual decisions are already settled elsewhere: a DESIGN-TOKENS.md already exists at project root AND this change does not touch the visual presentation layer; OR the change only moves API/logic/data with the UI visual layer fully unchanged; OR the project has a design system / component library this change merely consumes.
28
+ - **Gate 3 — Intensity calibration (not a switch):**
29
+ - **Strong intent** (user actively discussed palette / dark mode / brand archetype / component visual language / design references / mood during brainstorming) → invoke \`/design-md\` NOW. Questionnaire answers already have grounding in the brainstorming record.
30
+ - **Weak intent** (only "has UI" was settled, no visual discussion) → STILL invoke \`/design-md\` NOW (Gate 1 hit), but BEFORE running the questionnaire, explicitly tell the user: "This change includes a user-facing UI, so DESIGN-TOKENS.md will be generated. However, visual design was NOT discussed during brainstorming — the following questionnaire will capture those decisions now." Then run the questionnaire. Do NOT silently extract answers the user never expressed.
31
+ - **Default:** Gate 1 misses → do not invoke \`/design-md\`; resume the artifact flow directly.
32
+ - **Why trigger on "has UI" not "user expressed visual intent":** A WebUI project's visual tokens are an inevitable consequence of building the UI, not a function of whether the user raised visual topics in brainstorming. design.md and tasks.md reference DESIGN-TOKENS.md (archetype, fonts, status colors, primary scale), so the token file must exist before those artifacts are drafted — deferring generation to after artifacts creates forward references and breaks the Grill consistency scan.
24
33
  - **Brownfield (manual):** Invoke \`/design-md\` to generate DESIGN-TOKENS.md for an existing project. The skill is installed at \`.claude/skills/design-md/SKILL.md\`.
25
34
  - **Never overwrite silently:** If DESIGN-TOKENS.md already exists, always prompt for confirmation and create a \`.bak\` backup before overwriting.`;
26
35
  }
@@ -33,7 +42,7 @@ When \`/opsx:propose\` is invoked:
33
42
  - Ask ONE question at a time (Socratic method). Never fire multiple questions in a single turn.
34
43
  - Proactively present 2-3 architectural alternatives with explicit trade-offs.
35
44
  - **STOP brainstorming BEFORE its "Write design doc" step (step 6).** Do NOT write to \`docs/superpowers/specs/\`. All spec files are managed exclusively by OpenSpec.
36
- - **If brainstorming involved frontend/UI design intent:** MUST invoke \`/design-md\` skill NOW (before generating artifacts). Complete the questionnaire → generate DESIGN-TOKENS.md → THEN proceed.
45
+ - **If the three-gate test (see DESIGN-TOKENS.md Generation Rules above) triggers:** MUST invoke \`/design-md\` skill NOW (before generating artifacts). For weak intent, state that visual design was not discussed in brainstorming before running the questionnaire. Complete the questionnaire → generate DESIGN-TOKENS.md → THEN proceed.
37
46
  - Only after human confirms the approach, generate ALL artifacts (proposal -> design -> specs -> tasks) in one pass.
38
47
 
39
48
  2. Every proposal artifact MUST contain:
@@ -51,7 +60,7 @@ When \`/opsx:new\` is invoked:
51
60
  2. **BEFORE drafting the first artifact (proposal), MUST activate Superpowers \`brainstorming\`.**
52
61
  - Use Socratic questioning to clarify scope, non-goals, and trade-offs.
53
62
  - **STOP brainstorming BEFORE its "Write design doc" step (step 6).** Do NOT write to \`docs/superpowers/specs/\`. All spec files are managed exclusively by OpenSpec.
54
- - **If brainstorming involved frontend/UI design intent:** MUST invoke \`/design-md\` skill NOW (before drafting proposal). Complete the questionnaire → generate DESIGN-TOKENS.md → THEN proceed.
63
+ - **If the three-gate test (see DESIGN-TOKENS.md Generation Rules above) triggers:** MUST invoke \`/design-md\` skill NOW (before drafting proposal). For weak intent, state that visual design was not discussed in brainstorming before running the questionnaire. Complete the questionnaire → generate DESIGN-TOKENS.md → THEN proceed.
55
64
  - Only after the user confirms the approach, draft the proposal artifact.
56
65
 
57
66
  3. When \`/opsx:continue\` is invoked to advance to the next artifact:
@@ -92,8 +101,8 @@ When \`/opsx:apply\` is invoked:
92
101
  - 选项设置:
93
102
  - 选项 1: "继续使用当前模型"(描述:不切换,直接开始实施)
94
103
  - Other 输入框提示:"输入切换命令,如 /model sonnet、/model glm、/model ds"
95
- - 如果用户选择 "继续使用当前模型",直接进入后续步骤。
96
- - 如果用户通过 Other 输入了切换命令,AI 执行该命令完成切换后再继续。
104
+ - 如果用户选择 "继续使用当前模型",直接进入步骤 1。
105
+ - 如果用户通过 Other 输入了模型名称,AI 提示用户手动执行 \`/model <name>\` 命令,然后重新执行 \`/opsx:apply\` 以从步骤 1 开始。AI 此时 MUST 停止,不继续执行后续步骤。
97
106
  - 此步骤不可跳过,必须等待用户明确选择后才执行后续步骤。
98
107
 
99
108
  1. **MUST activate Superpowers \`test-driven-development\` as a pre-requisite skill.**
@@ -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,IAAI,CACR,mBAAmB,KAAK,CAAC,YAAY,EAAE,EACvC,cAAc,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,EACtC,aAAa,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,EACpC,aAAa,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,CACrC,CAAC;IACF,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,eAAe,KAAK,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC;IAChF,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,KAAK,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,CAAC;IACzF,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,sBAAsB;IAC7B,OAAO;;iCAEwB,CAAC;AAClC,CAAC;AAED,SAAS,uBAAuB;IAC9B,OAAO;;;;oJAI2I,CAAC;AACrJ,CAAC;AAED,SAAS,WAAW;IAClB,OAAO;;;;;;;;;;;;;;+DAcsD,CAAC;AAChE,CAAC;AAED,SAAS,WAAW;IAClB,O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ACpB,qBAAqB;KACtB,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACpC,CAAC"}
@@ -1,14 +1,14 @@
1
1
  export function composeDesignMdSkill() {
2
2
  return `---
3
3
  name: design-md
4
- description: Generate a DESIGN-TOKENS.md file for the current project via interactive questionnaire and archetype matching. Use for brownfield projects that need design tokens.
4
+ description: Generate a DESIGN-TOKENS.md file for the current project via interactive questionnaire and archetype matching. Auto-triggered at brainstorming end when the change ships a user-facing UI (three-gate test in CLAUDE.md), or invoked manually via /design-md for any project needing design tokens.
5
5
  ---
6
6
 
7
7
  # DESIGN-TOKENS.md Generation Skill
8
8
 
9
9
  Generate a comprehensive \`DESIGN-TOKENS.md\` design token document for the current project.
10
10
 
11
- **Trigger:** User invokes \`/design-md\` manually, or auto-triggered after \`specfuse init\` for frontend projects.
11
+ **Trigger:** (1) Auto-triggered at brainstorming end when the three-gate test in CLAUDE.md fires — i.e. the change or project ships a UI consumed by an end user (new WebUI / desktop GUI / mobile interface / embedded frontend), no existing DESIGN-TOKENS.md exempts it. For weak visual intent, state that visual design was not discussed in brainstorming before running the questionnaire. (2) User invokes \`/design-md\` manually in a brownfield project.
12
12
 
13
13
  ---
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-specfuse",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Scaffold projects with OpenSpec + Superpowers fusion methodology",
5
5
  "type": "module",
6
6
  "bin": {