@superspec/cli 1.1.1 → 1.2.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/LICENSE +21 -0
- package/README.md +374 -0
- package/dist/cli/index.js +763 -683
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +30 -30
- package/dist/index.js +275 -301
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/prompts/agents.md +35 -17
- package/prompts/rules.md +48 -27
- package/templates/en/checklist.md +31 -8
- package/templates/en/commands/ss-checklist.md +11 -6
- package/templates/en/commands/ss-create.md +35 -9
- package/templates/en/commands/ss-resume.md +18 -5
- package/templates/en/commands/ss-tasks.md +3 -2
- package/templates/en/proposal.md +14 -2
- package/templates/zh/checklist.md +31 -8
- package/templates/zh/commands/ss-checklist.md +11 -6
- package/templates/zh/commands/ss-create.md +34 -8
- package/templates/zh/commands/ss-resume.md +18 -5
- package/templates/zh/commands/ss-tasks.md +3 -2
- package/templates/zh/proposal.md +14 -2
package/prompts/rules.md
CHANGED
|
@@ -15,25 +15,40 @@ alwaysApply: true
|
|
|
15
15
|
|
|
16
16
|
**CLI:** `superspec create <feature>` (`-b` boost, `-c` creative, `--no-branch` skip branch)
|
|
17
17
|
|
|
18
|
+
> CLI only creates folder + git branch. AI reads `{specDir}/templates/` as structural reference, then generates artifacts with real content on demand.
|
|
19
|
+
|
|
20
|
+
**Strategy priority**: user input `-c` > config default
|
|
21
|
+
|
|
18
22
|
**Standard steps:**
|
|
19
|
-
1.
|
|
20
|
-
2.
|
|
21
|
-
3.
|
|
23
|
+
1. Parse user input → extract feature, intent type, developer, lang; **preserve original input text**
|
|
24
|
+
2. Determine strategy by priority
|
|
25
|
+
3. Run `superspec create <feature> [--intent-type <type>] [-c]` → creates folder + branch
|
|
26
|
+
4. If `follow`: read `context` files → constrain to project patterns
|
|
22
27
|
If `create`: note `context` as awareness only
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
5. Collect from user: Background, Goals, Requirements, Technical Solution, Impact scope
|
|
29
|
+
6. `follow`: solution must align with existing architecture
|
|
25
30
|
`create`: may propose new architecture, must explain trade-offs
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
7. Apply First Principles (brevity, intent-focused, required sections)
|
|
32
|
+
8. Directly generate `proposal.md` (requirements + technical solution). Frontmatter `input` = user's original input
|
|
33
|
+
9. **Auto-run checklist** (Standard checks, / 10): evaluate proposal quality
|
|
34
|
+
10. Pass → generate `checklist.md`, prompt /ss-tasks; Fail → fix proposal, re-check
|
|
35
|
+
|
|
36
|
+
**Boost steps:**
|
|
37
|
+
1. Parse user input → extract feature, intent type, developer, lang; **preserve original input text**
|
|
38
|
+
2. Determine strategy by priority
|
|
39
|
+
3. Run `superspec create <feature> -b [--intent-type <type>] [-c]` → creates folder + branch
|
|
40
|
+
4. Read frontmatter config → check `strategy`, context
|
|
41
|
+
5. Directly generate `proposal.md` (focused on requirements background). Frontmatter `input` = user's original input
|
|
42
|
+
6. Read `{specDir}/templates/spec.md` as structural reference
|
|
43
|
+
7. Generate spec from proposal:
|
|
31
44
|
- User stories + acceptance criteria (AC-x.x)
|
|
32
45
|
- Functional requirements + priority (P0/P1/P2) + dependencies
|
|
33
46
|
- Non-functional requirements, Data model / API design, Edge cases
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
47
|
+
8. Validate: every proposal goal → at least one user story
|
|
48
|
+
9. Directly generate `spec.md` with real content
|
|
49
|
+
10. **Auto complexity assessment**: split spec if multi-capability / > 300 lines; generate design.md if cross-system / major architecture decisions
|
|
50
|
+
11. **Auto-run checklist** (Boost checks, / 25): evaluate all artifacts
|
|
51
|
+
12. Pass → generate `checklist.md`, prompt /ss-tasks; Fail → fix, re-check
|
|
37
52
|
|
|
38
53
|
## /ss-tasks
|
|
39
54
|
|
|
@@ -41,7 +56,7 @@ alwaysApply: true
|
|
|
41
56
|
1. Read frontmatter → check `strategy`
|
|
42
57
|
2. Standard: read `proposal.md` as input
|
|
43
58
|
Boost: read `proposal.md` + `spec.md` as input
|
|
44
|
-
3. Read `{specDir}/
|
|
59
|
+
3. Read `{specDir}/templates/tasks.md` as **structural reference**
|
|
45
60
|
4. Break into phased tasks:
|
|
46
61
|
- Phase 1: Infrastructure / setup
|
|
47
62
|
- Phase 2: Core implementation
|
|
@@ -52,7 +67,7 @@ alwaysApply: true
|
|
|
52
67
|
7. Granularity: flexible (standard) / < 1h (boost)
|
|
53
68
|
8. Checkpoints per phase
|
|
54
69
|
9. Boost: validate every spec requirement → at least one task
|
|
55
|
-
10.
|
|
70
|
+
10. Directly generate `tasks.md` with real content → status 🟢 Ready
|
|
56
71
|
|
|
57
72
|
## /ss-apply
|
|
58
73
|
|
|
@@ -74,13 +89,16 @@ alwaysApply: true
|
|
|
74
89
|
**Steps:**
|
|
75
90
|
1. Locate current change folder in `{specDir}/changes/`
|
|
76
91
|
2. Run `superspec sync <name>` to collect latest git changes into context.md
|
|
77
|
-
3. Read `context.md` (single file, minimal tokens)
|
|
78
|
-
4.
|
|
92
|
+
3. Read `context.md` only (single file, minimal tokens, contains goals/progress/strategy/input/git changes)
|
|
93
|
+
4. Determine behavior mode from `strategy` (follow / create)
|
|
79
94
|
5. Report: goals, progress, git changes, affected files
|
|
80
|
-
6. Ask user
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
95
|
+
6. **Ask user whether to read additional docs**, list available files, suggest priority:
|
|
96
|
+
- ✅ `tasks.md` (recommended) → `proposal.md` → `spec.md` → `design.md` → `checklist.md` → `clarify.md`
|
|
97
|
+
7. Read selected files based on user's choice
|
|
98
|
+
8. Ask user: what needs fixing / adjusting?
|
|
99
|
+
9. Fix respecting `strategy` (follow = obey conventions / create = explore)
|
|
100
|
+
10. After fix: update tasks.md checkbox if applicable
|
|
101
|
+
11. Run `superspec sync <name>` to refresh context.md
|
|
84
102
|
|
|
85
103
|
## /ss-clarify
|
|
86
104
|
|
|
@@ -98,14 +116,17 @@ Run CLI: `superspec archive <name>`.
|
|
|
98
116
|
|
|
99
117
|
## /ss-checklist
|
|
100
118
|
|
|
101
|
-
|
|
119
|
+
Quality gate for both modes. Auto-invoked by `/ss-create`; also callable manually.
|
|
102
120
|
|
|
103
121
|
**Steps:**
|
|
104
|
-
1. Read ALL artifacts
|
|
105
|
-
2.
|
|
106
|
-
3.
|
|
107
|
-
4.
|
|
108
|
-
5.
|
|
122
|
+
1. Read ALL existing artifacts
|
|
123
|
+
2. Read `{specDir}/templates/checklist.md` as **structural reference**
|
|
124
|
+
3. Determine mode: Standard → Standard checks (/ 10); Boost → Boost checks (/ 25)
|
|
125
|
+
4. If checklist.md doesn't exist → directly generate with real evaluation results
|
|
126
|
+
5. If checklist.md exists → read and update evaluation results
|
|
127
|
+
6. ✅ passing / annotate failures
|
|
128
|
+
7. Score + recommendations
|
|
129
|
+
8. Fail → report failing items, suggest fixes; Pass → prompt next step
|
|
109
130
|
|
|
110
131
|
## /ss-status
|
|
111
132
|
|
|
@@ -8,9 +8,32 @@ depends_on: []
|
|
|
8
8
|
# Quality Checklist: {{name}}
|
|
9
9
|
|
|
10
10
|
> Created: {{date}}
|
|
11
|
-
> Mode: Boost
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
<!-- Use Standard checks (after proposal) or Boost checks (after spec). AI selects based on mode. -->
|
|
13
|
+
|
|
14
|
+
## Standard Mode Checks (after proposal, score / 10)
|
|
15
|
+
|
|
16
|
+
### Proposal Quality
|
|
17
|
+
|
|
18
|
+
- [ ] Background and motivation are clear
|
|
19
|
+
- [ ] Goals are measurable
|
|
20
|
+
- [ ] Non-goals are explicit
|
|
21
|
+
- [ ] Risks identified with mitigations
|
|
22
|
+
- [ ] Impact scope assessed
|
|
23
|
+
|
|
24
|
+
### Requirements & Technical Solution
|
|
25
|
+
|
|
26
|
+
- [ ] Requirements are specific and splittable into tasks
|
|
27
|
+
- [ ] Boundary conditions identified
|
|
28
|
+
- [ ] Technical solution is concrete (modules/files specified)
|
|
29
|
+
- [ ] Dependencies are clear
|
|
30
|
+
- [ ] No blocking open questions (or marked non-blocking)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Boost Mode Checks (after spec, score / 25)
|
|
35
|
+
|
|
36
|
+
### Requirements Completeness
|
|
14
37
|
|
|
15
38
|
- [ ] All user stories have clear acceptance criteria
|
|
16
39
|
- [ ] Functional requirements cover all user stories
|
|
@@ -18,7 +41,7 @@ depends_on: []
|
|
|
18
41
|
- [ ] Edge cases identified and documented
|
|
19
42
|
- [ ] Data model changes described
|
|
20
43
|
|
|
21
|
-
|
|
44
|
+
### Proposal Quality
|
|
22
45
|
|
|
23
46
|
- [ ] Background and motivation are clear
|
|
24
47
|
- [ ] Goals are measurable
|
|
@@ -26,7 +49,7 @@ depends_on: []
|
|
|
26
49
|
- [ ] Risks identified with mitigations
|
|
27
50
|
- [ ] Impact scope assessed
|
|
28
51
|
|
|
29
|
-
|
|
52
|
+
### Spec Consistency
|
|
30
53
|
|
|
31
54
|
- [ ] Spec aligns with proposal goals
|
|
32
55
|
- [ ] User stories cover all proposal goals
|
|
@@ -34,7 +57,7 @@ depends_on: []
|
|
|
34
57
|
- [ ] No contradicting requirements
|
|
35
58
|
- [ ] Dependencies are clear
|
|
36
59
|
|
|
37
|
-
|
|
60
|
+
### Task Executability
|
|
38
61
|
|
|
39
62
|
- [ ] Task granularity is reasonable (each < 2h)
|
|
40
63
|
- [ ] Dependencies are correct
|
|
@@ -42,14 +65,14 @@ depends_on: []
|
|
|
42
65
|
- [ ] File paths specified
|
|
43
66
|
- [ ] Checkpoints are reasonable
|
|
44
67
|
|
|
45
|
-
|
|
68
|
+
### Cross Validation
|
|
46
69
|
|
|
47
70
|
- [ ] proposal → spec: All goals have corresponding requirements
|
|
48
71
|
- [ ] spec → tasks: All requirements have corresponding tasks
|
|
49
72
|
- [ ] tasks → spec: No tasks beyond spec scope
|
|
50
73
|
- [ ] clarify → all: All clarifications reflected in documents
|
|
51
74
|
|
|
52
|
-
|
|
75
|
+
### Implementation Readiness
|
|
53
76
|
|
|
54
77
|
- [ ] Technical approach is feasible
|
|
55
78
|
- [ ] No blocking dependencies
|
|
@@ -58,5 +81,5 @@ depends_on: []
|
|
|
58
81
|
|
|
59
82
|
---
|
|
60
83
|
|
|
61
|
-
**Score**: _ /
|
|
84
|
+
**Score**: _ / _
|
|
62
85
|
**Status**: 🟡 Pending Review
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
name: /ss-checklist
|
|
3
3
|
id: ss-checklist
|
|
4
4
|
category: SuperSpec
|
|
5
|
-
description: Quality gate
|
|
5
|
+
description: Quality gate (Standard: after proposal / Boost: after spec)
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
8
|
**Guardrails**
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- Available in both Standard and Boost modes
|
|
10
|
+
- Auto-invoked during `/ss-create` flow; can also be called manually at any time
|
|
11
11
|
|
|
12
12
|
**Steps**
|
|
13
|
-
1. Read
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
13
|
+
1. Read all existing artifacts (proposal.md, spec.md, etc.)
|
|
14
|
+
2. Read `{specDir}/templates/checklist.md` as **structural reference**
|
|
15
|
+
3. Determine mode: Standard → use Standard checks (score / 10); Boost → use Boost checks (score / 25)
|
|
16
|
+
4. If checklist.md doesn't exist → **directly generate** it (with real evaluation results)
|
|
17
|
+
5. If checklist.md already exists → read and update evaluation results
|
|
18
|
+
6. Verify each checklist item, mark pass/fail
|
|
19
|
+
7. Fail → report failing items, suggest fixes
|
|
20
|
+
8. Pass → prompt to run /ss-tasks (or /ss-apply)
|
|
16
21
|
<!-- SUPERSPEC:END -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: /ss-create
|
|
3
3
|
id: ss-create
|
|
4
4
|
category: SuperSpec
|
|
5
|
-
description: Create or update the feature specification from a natural language feature with proposal (boost mode adds spec + checklist)
|
|
5
|
+
description: Create or update the feature specification from a natural language feature with proposal (boost mode adds spec + design + checklist)
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
8
|
## User Input
|
|
@@ -58,7 +58,7 @@ If user provides custom `--branch-prefix`, prepend to template.
|
|
|
58
58
|
**CLI Command Structure**
|
|
59
59
|
```bash
|
|
60
60
|
superspec create <feature> [options]
|
|
61
|
-
-b, --boost Boost mode (spec + checklist)
|
|
61
|
+
-b, --boost Boost mode (spec + design + checklist)
|
|
62
62
|
-c, --creative Creative mode (explore new solutions)
|
|
63
63
|
-d, --description <desc> Change description
|
|
64
64
|
--no-branch Skip git branch creation
|
|
@@ -92,11 +92,37 @@ When a change involves multiple independent capabilities, split by domain:
|
|
|
92
92
|
```
|
|
93
93
|
Each spec.md < 300 lines. Outline domains in proposal.md, group tasks by domain in tasks.md.
|
|
94
94
|
|
|
95
|
-
**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
**On-demand Artifact Generation**
|
|
96
|
+
- CLI `superspec create` **only creates folder + git branch**, no artifact files
|
|
97
|
+
- AI reads templates from `{specDir}/templates/` as **structural reference**, then directly generates artifacts with real content
|
|
98
|
+
- Only generate files when the current step requires them, never pre-create empty templates
|
|
99
|
+
|
|
100
|
+
**Strategy Priority** (highest to lowest)
|
|
101
|
+
1. `-c`/`--creative`/`creative` flag in user input
|
|
102
|
+
2. `strategy` default in `superspec.config.json`
|
|
103
|
+
|
|
104
|
+
**Standard vs Boost Content Focus**
|
|
105
|
+
- **Standard**: proposal.md is self-contained with requirements + technical solution, sufficient to directly split into tasks (no spec.md needed)
|
|
106
|
+
- **Boost**: proposal.md focuses on requirements background (Background, Goals, Non-Goals, Impact, Risks); spec.md carries requirement details and interactions (US/FR/AC/Edge Cases); design.md optionally carries architecture decisions
|
|
107
|
+
|
|
108
|
+
**Steps (Standard mode)**
|
|
109
|
+
1. Parse user input → extract feature (camelCase), intent type, developer, lang; **preserve original user input text**
|
|
110
|
+
2. Determine strategy (by priority): user input `-c` → config default
|
|
111
|
+
3. Run: `superspec create <feature> --intent-type <type> [--lang <lang>] [--user <user>] [-c]` (creates folder + branch)
|
|
112
|
+
4. Pre-task review: read project context, check existing changes, understand dependencies
|
|
113
|
+
5. Read `{specDir}/templates/proposal.md` as structural reference → **directly generate** proposal.md (with requirements + technical solution, must be concrete enough to split into tasks). Fill frontmatter `input` field with user's original input
|
|
114
|
+
6. **Auto-run checklist check** (Standard checks, score / 10): read `{specDir}/templates/checklist.md`, evaluate proposal quality
|
|
115
|
+
7. Pass → generate checklist.md, prompt to run /ss-tasks; Fail → fix proposal and re-check
|
|
116
|
+
|
|
117
|
+
**Steps (Boost mode)**
|
|
118
|
+
1. Parse user input → extract feature (camelCase), intent type, developer, lang; **preserve original user input text**
|
|
119
|
+
2. Determine strategy (by priority): user input `-c` → config default
|
|
120
|
+
3. Run: `superspec create <feature> --intent-type <type> [--lang <lang>] [--user <user>] -b [-c]` (creates folder + branch)
|
|
121
|
+
4. Pre-task review: read project context, check existing changes, understand dependencies
|
|
122
|
+
5. Read `{specDir}/templates/proposal.md` as structural reference → **directly generate** proposal.md (focused on requirements background). Fill frontmatter `input` field with user's original input
|
|
123
|
+
6. Read `{specDir}/templates/spec.md` as structural reference → **directly generate** spec.md (requirement details + interactions)
|
|
124
|
+
7. **Auto complexity assessment**: whether to split spec (multi-capability / spec > 300 lines), whether design.md is needed (cross-system / major architecture decisions)
|
|
125
|
+
8. If needed → split spec into `specs/<capability>/spec.md`; if needed → read design template and generate design.md
|
|
126
|
+
9. **Auto-run checklist check** (Boost checks, score / 25): read `{specDir}/templates/checklist.md`, evaluate all existing artifacts
|
|
127
|
+
10. Pass → generate checklist.md, prompt to run /ss-tasks; Fail → fix and re-check
|
|
102
128
|
<!-- SUPERSPEC:END -->
|
|
@@ -7,11 +7,24 @@ description: Restore spec context for vibe coding
|
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
8
|
**Guardrails**
|
|
9
9
|
- Use when returning to a change after a break
|
|
10
|
-
- Read context.md
|
|
10
|
+
- Read only context.md by default (minimal tokens), other docs are user's choice
|
|
11
11
|
|
|
12
12
|
**Steps**
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3. Read
|
|
16
|
-
4.
|
|
13
|
+
1. Locate current change folder: `{specDir}/changes/`
|
|
14
|
+
2. Run `superspec sync <name>` to collect latest git changes into context.md
|
|
15
|
+
3. Read `context.md` (single file, contains: goals, progress, strategy, input, git changes)
|
|
16
|
+
4. Determine behavior mode from `strategy` in context.md (follow / create)
|
|
17
|
+
5. Report current state: goals, progress, git changes, affected files
|
|
18
|
+
6. **Ask user whether to read additional docs**, list available files in change dir, suggest priority:
|
|
19
|
+
- ✅ `tasks.md` (recommended, task details and dependencies)
|
|
20
|
+
- `proposal.md` (requirements and solution review)
|
|
21
|
+
- `spec.md` (Boost mode, requirement details)
|
|
22
|
+
- `design.md` (architecture decisions)
|
|
23
|
+
- `checklist.md` (quality check results)
|
|
24
|
+
- `clarify.md` (historical Q&A)
|
|
25
|
+
7. Read selected files based on user's choice
|
|
26
|
+
8. Ask user: what needs fixing / adjusting?
|
|
27
|
+
9. Fix respecting `strategy` (follow = obey conventions / create = may explore new approaches)
|
|
28
|
+
10. After fix: update tasks.md checkbox if applicable
|
|
29
|
+
11. Run `superspec sync <name>` to refresh context.md
|
|
17
30
|
<!-- SUPERSPEC:END -->
|
|
@@ -14,6 +14,7 @@ description: Generate task list from proposal
|
|
|
14
14
|
**Steps**
|
|
15
15
|
1. Read `{specDir}/changes/<name>/proposal.md`
|
|
16
16
|
2. If boost mode, also read `spec.md`
|
|
17
|
-
3.
|
|
18
|
-
4.
|
|
17
|
+
3. Read `{specDir}/templates/tasks.md` as **structural reference**
|
|
18
|
+
4. **Directly generate** tasks.md (with real task content, not template placeholders)
|
|
19
|
+
5. Each task should have: clear description, file paths, dependencies, verification criteria
|
|
19
20
|
<!-- SUPERSPEC:END -->
|
package/templates/en/proposal.md
CHANGED
|
@@ -3,6 +3,7 @@ name: {{name}}
|
|
|
3
3
|
status: draft
|
|
4
4
|
strategy: {{strategy}}
|
|
5
5
|
depends_on: []
|
|
6
|
+
input: {{input}}
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Proposal: {{name}}
|
|
@@ -24,9 +25,20 @@ depends_on: []
|
|
|
24
25
|
|
|
25
26
|
<!-- What is explicitly out of scope -->
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
<!-- ===== Standard mode: use these two sections ===== -->
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
## Requirements
|
|
31
|
+
|
|
32
|
+
<!-- Functional requirements, interaction logic, boundary conditions -->
|
|
33
|
+
|
|
34
|
+
## Technical Solution
|
|
35
|
+
|
|
36
|
+
<!-- Architecture, key implementation approach, modules/files involved. Must be concrete enough to split into tasks -->
|
|
37
|
+
|
|
38
|
+
<!-- ===== Boost mode: replace above two sections with this one ===== -->
|
|
39
|
+
|
|
40
|
+
<!-- ## Solution Overview -->
|
|
41
|
+
<!-- High-level solution description. Detailed requirements and interactions go in spec.md -->
|
|
30
42
|
|
|
31
43
|
## Impact Scope
|
|
32
44
|
|
|
@@ -8,9 +8,32 @@ depends_on: []
|
|
|
8
8
|
# 质量检查清单: {{name}}
|
|
9
9
|
|
|
10
10
|
> 创建日期: {{date}}
|
|
11
|
-
> 模式: 增强 (boost)
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
<!-- 根据模式选择检查项:Standard(proposal 后)或 Boost(spec 后)。AI 根据模式自动选择。 -->
|
|
13
|
+
|
|
14
|
+
## Standard 模式检查项(proposal 后,满分 / 10)
|
|
15
|
+
|
|
16
|
+
### 提案质量
|
|
17
|
+
|
|
18
|
+
- [ ] 背景和动机清晰
|
|
19
|
+
- [ ] 目标可衡量
|
|
20
|
+
- [ ] 非目标明确
|
|
21
|
+
- [ ] 风险已识别并有缓解措施
|
|
22
|
+
- [ ] 影响范围已评估
|
|
23
|
+
|
|
24
|
+
### 需求与技术方案
|
|
25
|
+
|
|
26
|
+
- [ ] 需求明确且可拆分为任务
|
|
27
|
+
- [ ] 边界条件已识别
|
|
28
|
+
- [ ] 技术方案具体(模块/文件已明确)
|
|
29
|
+
- [ ] 依赖关系清楚
|
|
30
|
+
- [ ] 无阻塞性开放问题(或已标记为非阻塞)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Boost 模式检查项(spec 后,满分 / 25)
|
|
35
|
+
|
|
36
|
+
### 需求完整性
|
|
14
37
|
|
|
15
38
|
- [ ] 所有用户故事都有明确的验收标准
|
|
16
39
|
- [ ] 功能需求覆盖了所有用户故事
|
|
@@ -18,7 +41,7 @@ depends_on: []
|
|
|
18
41
|
- [ ] 边界情况已识别并记录
|
|
19
42
|
- [ ] 数据模型变更已描述
|
|
20
43
|
|
|
21
|
-
|
|
44
|
+
### 提案质量
|
|
22
45
|
|
|
23
46
|
- [ ] 背景和动机清晰
|
|
24
47
|
- [ ] 目标可衡量
|
|
@@ -26,7 +49,7 @@ depends_on: []
|
|
|
26
49
|
- [ ] 风险已识别并有缓解措施
|
|
27
50
|
- [ ] 影响范围已评估
|
|
28
51
|
|
|
29
|
-
|
|
52
|
+
### 规格一致性
|
|
30
53
|
|
|
31
54
|
- [ ] spec 与 proposal 目标一致
|
|
32
55
|
- [ ] 用户故事覆盖 proposal 中所有目标
|
|
@@ -34,7 +57,7 @@ depends_on: []
|
|
|
34
57
|
- [ ] 无矛盾需求
|
|
35
58
|
- [ ] 依赖关系明确
|
|
36
59
|
|
|
37
|
-
|
|
60
|
+
### 任务可执行性
|
|
38
61
|
|
|
39
62
|
- [ ] 任务粒度合理(每个 < 2h)
|
|
40
63
|
- [ ] 依赖关系正确
|
|
@@ -42,14 +65,14 @@ depends_on: []
|
|
|
42
65
|
- [ ] 文件路径明确
|
|
43
66
|
- [ ] 检查点设置合理
|
|
44
67
|
|
|
45
|
-
|
|
68
|
+
### 交叉验证
|
|
46
69
|
|
|
47
70
|
- [ ] proposal → spec: 所有目标都有对应需求
|
|
48
71
|
- [ ] spec → tasks: 所有需求都有对应任务
|
|
49
72
|
- [ ] tasks → spec: 没有超出 spec 范围的任务
|
|
50
73
|
- [ ] clarify → all: 所有澄清结果已更新到相关文档
|
|
51
74
|
|
|
52
|
-
|
|
75
|
+
### 实现就绪度
|
|
53
76
|
|
|
54
77
|
- [ ] 技术方案可行
|
|
55
78
|
- [ ] 无阻塞依赖
|
|
@@ -58,5 +81,5 @@ depends_on: []
|
|
|
58
81
|
|
|
59
82
|
---
|
|
60
83
|
|
|
61
|
-
**总分**: _ /
|
|
84
|
+
**总分**: _ / _
|
|
62
85
|
**状态**: 🟡 待检查
|
|
@@ -2,15 +2,20 @@
|
|
|
2
2
|
name: /ss-checklist
|
|
3
3
|
id: ss-checklist
|
|
4
4
|
category: SuperSpec
|
|
5
|
-
description:
|
|
5
|
+
description: 质量门检查(Standard: proposal 后 / Boost: spec 后)
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
8
|
**Guardrails**
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- Standard 和 Boost 模式均可使用
|
|
10
|
+
- `/ss-create` 流程中会自动调用;也可手动随时调用
|
|
11
11
|
|
|
12
12
|
**Steps**
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
13
|
+
1. 读取所有已有 artifacts(proposal.md, spec.md 等)
|
|
14
|
+
2. 读取 `{specDir}/templates/checklist.md` 作为**结构参考**
|
|
15
|
+
3. 判断模式:Standard → 使用 Standard 检查项(满分 10);Boost → 使用 Boost 检查项(满分 25)
|
|
16
|
+
4. 如果 checklist.md 不存在 → **直接生成**(包含真实评估结果)
|
|
17
|
+
5. 如果 checklist.md 已存在 → 读取并更新评估结果
|
|
18
|
+
6. 验证每个检查项,标注通过/失败
|
|
19
|
+
7. 不通过 → 报告失败项,建议修复方向
|
|
20
|
+
8. 通过 → 提示可执行 /ss-tasks(或 /ss-apply)
|
|
16
21
|
<!-- SUPERSPEC:END -->
|
|
@@ -58,7 +58,7 @@ superspec create fixLoginBug --intent-type hotfix
|
|
|
58
58
|
**CLI 命令结构**
|
|
59
59
|
```bash
|
|
60
60
|
superspec create <feature> [options]
|
|
61
|
-
-b, --boost 增强模式(spec + checklist)
|
|
61
|
+
-b, --boost 增强模式(spec(支持拆分子 spec )+ design + checklist)
|
|
62
62
|
-c, --creative 创造模式(探索新方案)
|
|
63
63
|
-d, --description <desc> 变更描述
|
|
64
64
|
--no-branch 跳过 git 分支创建
|
|
@@ -92,11 +92,37 @@ superspec create <feature> [options]
|
|
|
92
92
|
```
|
|
93
93
|
每个 spec.md < 300 行。在 proposal.md 中概述能力域,tasks.md 按能力域分组。
|
|
94
94
|
|
|
95
|
-
**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
**Artifact 按需生成原则**
|
|
96
|
+
- CLI `superspec create` **只创建文件夹 + git 分支**,不生成任何 artifact 文件
|
|
97
|
+
- AI 读取 `{specDir}/templates/` 下的模板作为**结构参考**,直接生成包含真实内容的 artifact
|
|
98
|
+
- 只在当前步骤需要时才生成对应文件,不预先创建空模板
|
|
99
|
+
|
|
100
|
+
**Strategy 优先级**(从高到低)
|
|
101
|
+
1. 用户输入中的 `-c`/`--creative`/`创造` 标志
|
|
102
|
+
2. `superspec.config.json` 中的 `strategy` 默认值
|
|
103
|
+
|
|
104
|
+
**Standard 与 Boost 内容定位**
|
|
105
|
+
- **Standard**: proposal.md 自含需求 + 技术方案,足以直接拆分 task(无需 spec.md)
|
|
106
|
+
- **Boost**: proposal.md 聚焦需求背景(Background, Goals, Non-Goals, Impact, Risks);spec.md 承载需求细节和交互(US/FR/AC/Edge Cases);design.md 可选承载架构决策
|
|
107
|
+
|
|
108
|
+
**Steps(Standard 模式)**
|
|
109
|
+
1. 解析用户输入 → 提取功能名(camelCase)、意图类型、开发者、语言;**保留用户原始输入文本**
|
|
110
|
+
2. 确定 strategy(按优先级):用户输入 `-c` → config 默认值
|
|
111
|
+
3. 执行: `superspec create <feature> --intent-type <type> [--lang <lang>] [--user <user>] [-c]`(只创建文件夹 + 分支)
|
|
112
|
+
4. 前置审查: 读取项目上下文、检查现有变更、理解依赖关系
|
|
113
|
+
5. 读取 `{specDir}/templates/proposal.md` 作结构参考 → **直接生成** proposal.md(含需求描述 + 技术方案,必须具体到可拆分 task)。frontmatter `input` 字段填入用户原始输入
|
|
114
|
+
6. **自动执行 checklist 检查**(Standard 检查项,满分 10):读取 `{specDir}/templates/checklist.md`,评估 proposal 质量
|
|
115
|
+
7. 通过 → 生成 checklist.md,提示可执行 /ss-tasks;不通过 → 修复 proposal 后重新检查
|
|
116
|
+
|
|
117
|
+
**Steps(Boost 模式)**
|
|
118
|
+
1. 解析用户输入 → 提取功能名(camelCase)、意图类型、开发者、语言;**保留用户原始输入文本**
|
|
119
|
+
2. 确定 strategy(按优先级):用户输入 `-c` → config 默认值
|
|
120
|
+
3. 执行: `superspec create <feature> --intent-type <type> [--lang <lang>] [--user <user>] -b [-c]`(只创建文件夹 + 分支)
|
|
121
|
+
4. 前置审查: 读取项目上下文、检查现有变更、理解依赖关系
|
|
122
|
+
5. 读取 `{specDir}/templates/proposal.md` 作结构参考 → **直接生成** proposal.md(聚焦需求背景)。frontmatter `input` 字段填入用户原始输入
|
|
123
|
+
6. 读取 `{specDir}/templates/spec.md` 作结构参考 → **直接生成** spec.md(需求细节 + 交互)
|
|
124
|
+
7. **自动复杂度评估**:是否需要拆分 spec(多能力域 / spec > 300 行)、是否需要 design.md(跨系统 / 重大架构决策)
|
|
125
|
+
8. 如需 → 拆分 spec 到 `specs/<capability>/spec.md`;如需 → 读取 design 模板生成 design.md
|
|
126
|
+
9. **自动执行 checklist 检查**(Boost 检查项,满分 25):读取 `{specDir}/templates/checklist.md`,评估所有已有 artifacts
|
|
127
|
+
10. 通过 → 生成 checklist.md,提示可执行 /ss-tasks;不通过 → 修复后重新检查
|
|
102
128
|
<!-- SUPERSPEC:END -->
|
|
@@ -7,11 +7,24 @@ description: 恢复 spec 上下文(用于 vibe coding)
|
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
8
|
**Guardrails**
|
|
9
9
|
- 中断后返回工作时使用
|
|
10
|
-
-
|
|
10
|
+
- 默认只读 context.md(最小 token),其他文档由用户按需选择
|
|
11
11
|
|
|
12
12
|
**Steps**
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
16
|
-
4.
|
|
13
|
+
1. 定位当前变更文件夹: `{specDir}/changes/`
|
|
14
|
+
2. 运行 `superspec sync <name>` 将最新 git 变更收集到 context.md
|
|
15
|
+
3. 读取 `context.md`(单文件,包含:goals、progress、strategy、input、git changes)
|
|
16
|
+
4. 根据 context.md 中的 `strategy` 确定行为模式(follow / create)
|
|
17
|
+
5. 汇报当前状态:目标、进度、git 变更、受影响文件
|
|
18
|
+
6. **询问用户是否需要读取其他文档**,列出变更目录中的可用文件,建议优先级:
|
|
19
|
+
- ✅ `tasks.md`(推荐,了解任务明细和依赖)
|
|
20
|
+
- `proposal.md`(需求和方案回顾)
|
|
21
|
+
- `spec.md`(Boost 模式,需求细节)
|
|
22
|
+
- `design.md`(架构决策)
|
|
23
|
+
- `checklist.md`(质量检查结果)
|
|
24
|
+
- `clarify.md`(历史 Q&A)
|
|
25
|
+
7. 根据用户选择读取对应文件
|
|
26
|
+
8. 询问用户:需要修复/调整什么?
|
|
27
|
+
9. 修复时遵循 `strategy`(follow 遵循规范 / create 可探索新方案)
|
|
28
|
+
10. 修复后更新 tasks.md 对应的 checkbox
|
|
29
|
+
11. 运行 `superspec sync <name>` 刷新 context.md
|
|
17
30
|
<!-- SUPERSPEC:END -->
|
|
@@ -14,6 +14,7 @@ description: 从 proposal 生成任务清单
|
|
|
14
14
|
**Steps**
|
|
15
15
|
1. 读取 `{specDir}/changes/<name>/proposal.md`
|
|
16
16
|
2. 如果是 boost 模式,同时读取 `spec.md`
|
|
17
|
-
3.
|
|
18
|
-
4.
|
|
17
|
+
3. 读取 `{specDir}/templates/tasks.md` 作为**结构参考**
|
|
18
|
+
4. **直接生成** tasks.md(包含真实任务内容,不是模板占位符)
|
|
19
|
+
5. 每个任务应包含:清晰描述、文件路径、依赖关系、验证标准
|
|
19
20
|
<!-- SUPERSPEC:END -->
|
package/templates/zh/proposal.md
CHANGED
|
@@ -3,6 +3,7 @@ name: {{name}}
|
|
|
3
3
|
status: draft
|
|
4
4
|
strategy: {{strategy}}
|
|
5
5
|
depends_on: []
|
|
6
|
+
input: {{input}}
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# 提案: {{name}}
|
|
@@ -30,9 +31,20 @@ depends_on: []
|
|
|
30
31
|
|
|
31
32
|
<!-- 明确不在范围内的内容 -->
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
<!-- ===== Standard 模式:使用以下两段 ===== -->
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
## 需求描述
|
|
37
|
+
|
|
38
|
+
<!-- 功能需求、交互逻辑、边界条件 -->
|
|
39
|
+
|
|
40
|
+
## 技术方案
|
|
41
|
+
|
|
42
|
+
<!-- 架构设计、关键实现思路、涉及的模块/文件。必须具体到可拆分 task -->
|
|
43
|
+
|
|
44
|
+
<!-- ===== Boost 模式:替换上面两段为以下一段 ===== -->
|
|
45
|
+
|
|
46
|
+
<!-- ## 方案概述 -->
|
|
47
|
+
<!-- 高层级的解决方案描述。详细需求和交互由 spec.md 承载 -->
|
|
36
48
|
|
|
37
49
|
## 影响范围
|
|
38
50
|
|