@superspec/cli 1.1.0 → 1.2.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.
- package/LICENSE +21 -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-archive.md +12 -2
- package/templates/en/commands/ss-checklist.md +11 -6
- package/templates/en/commands/ss-create.md +38 -11
- package/templates/en/commands/ss-link.md +11 -2
- package/templates/en/commands/ss-resume.md +18 -5
- package/templates/en/commands/ss-search.md +12 -3
- package/templates/en/commands/ss-tasks.md +3 -2
- package/templates/en/commands/ss-validate.md +12 -2
- package/templates/en/proposal.md +14 -2
- package/templates/zh/checklist.md +31 -8
- package/templates/zh/commands/ss-archive.md +12 -2
- package/templates/zh/commands/ss-checklist.md +11 -6
- package/templates/zh/commands/ss-create.md +37 -10
- package/templates/zh/commands/ss-link.md +11 -2
- package/templates/zh/commands/ss-resume.md +18 -5
- package/templates/zh/commands/ss-search.md +12 -3
- package/templates/zh/commands/ss-tasks.md +3 -2
- package/templates/zh/commands/ss-validate.md +12 -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
|
|
@@ -5,11 +5,21 @@ category: SuperSpec
|
|
|
5
5
|
description: Archive completed change
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
|
+
**Input Parsing Rules**
|
|
9
|
+
|
|
10
|
+
From user input, extract: **change name** or **all flag**.
|
|
11
|
+
|
|
12
|
+
| Extract | Rule | Example |
|
|
13
|
+
|---------|------|---------|
|
|
14
|
+
| Change name | Remaining text after removing flags; if empty, use current active change | `/ss-archive addUserAuth` → name=`addUserAuth` |
|
|
15
|
+
| Archive all | `--all`/`all` → add `--all` | `/ss-archive --all`; `/ss-archive all` |
|
|
16
|
+
|
|
8
17
|
**Guardrails**
|
|
9
18
|
- Only archive when all tasks are COMPLETE
|
|
10
19
|
- Ensure tests pass before archiving
|
|
11
20
|
|
|
12
21
|
**Steps**
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
22
|
+
1. Parse user input → extract change name or `--all` flag
|
|
23
|
+
2. Verify all tasks in tasks.md are marked COMPLETE
|
|
24
|
+
3. Run `superspec archive <name>` or `superspec archive --all`
|
|
15
25
|
<!-- SUPERSPEC:END -->
|
|
@@ -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
|
|
@@ -27,11 +27,12 @@ The text the user typed after `/ss-create` **is** the feature description. Do no
|
|
|
27
27
|
|
|
28
28
|
**Input Parsing Rules**
|
|
29
29
|
|
|
30
|
-
From user input, extract
|
|
30
|
+
From user input, extract: **mode flags**, **feature name**, **intent type**, **developer**, **lang**.
|
|
31
31
|
|
|
32
32
|
| Extract | Rule | Example |
|
|
33
33
|
|---------|------|---------|
|
|
34
|
-
|
|
|
34
|
+
| Mode flags | Detect `-b`/`--boost`/`boost` → boost mode; `-c`/`--creative`/`creative` → creative mode; `--no-branch` → skip branch; flags can be combined | `/ss-create -b add auth` → boost; `/ss-create -b -c refactor login` → boost+creative |
|
|
35
|
+
| Feature name | Remove flags from input, convert remainder to camelCase. Chinese → translate to English first | "add user auth" → `addUserAuth`; "添加用户认证" → `addUserAuth` |
|
|
35
36
|
| Intent type | Semantic inference from input | add/new/implement → `feature`; fix/bug/hotfix → `hotfix`; refactor/optimize → `refactor`; docs → `docs`; test → `test`; build/deps → `chore`; default → `feature` |
|
|
36
37
|
| Developer | "@username" or "Developer: xxx" → extract (remove "@"). Fallback: git user name | "添加todolist @jay" → user=`jay` |
|
|
37
38
|
| Lang | CJK chars → `zh`; explicit "zh"/"中文" → `zh`; "en"/"English" → `en`; fallback: config `lang` | "添加todolist" → `zh` |
|
|
@@ -57,7 +58,7 @@ If user provides custom `--branch-prefix`, prepend to template.
|
|
|
57
58
|
**CLI Command Structure**
|
|
58
59
|
```bash
|
|
59
60
|
superspec create <feature> [options]
|
|
60
|
-
-b, --boost Boost mode (spec + checklist)
|
|
61
|
+
-b, --boost Boost mode (spec + design + checklist)
|
|
61
62
|
-c, --creative Creative mode (explore new solutions)
|
|
62
63
|
-d, --description <desc> Change description
|
|
63
64
|
--no-branch Skip git branch creation
|
|
@@ -91,11 +92,37 @@ When a change involves multiple independent capabilities, split by domain:
|
|
|
91
92
|
```
|
|
92
93
|
Each spec.md < 300 lines. Outline domains in proposal.md, group tasks by domain in tasks.md.
|
|
93
94
|
|
|
94
|
-
**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
|
101
128
|
<!-- SUPERSPEC:END -->
|
|
@@ -5,8 +5,17 @@ category: SuperSpec
|
|
|
5
5
|
description: Add spec dependency
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
|
+
**Input Parsing Rules**
|
|
9
|
+
|
|
10
|
+
From user input, extract: **change name**, **dependency target**.
|
|
11
|
+
|
|
12
|
+
| Extract | Rule | Example |
|
|
13
|
+
|---------|------|---------|
|
|
14
|
+
| Change name | First argument or text before `--on` | `/ss-link addAuth --on addDB` → name=`addAuth` |
|
|
15
|
+
| Dependency target | `--on <other>`/`depends on <other>`/`→ <other>` → extract target name | `/ss-link addAuth --on addDB`; `/ss-link addAuth depends on addDB` |
|
|
16
|
+
|
|
8
17
|
**Steps**
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
18
|
+
1. Parse user input → extract change name and dependency target
|
|
19
|
+
2. Run `superspec deps add <name> --on <other>`
|
|
11
20
|
3. Verify: `superspec deps list <name>`
|
|
12
21
|
<!-- 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 -->
|
|
@@ -5,8 +5,17 @@ category: SuperSpec
|
|
|
5
5
|
description: Full-text search across changes
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
|
+
**Input Parsing Rules**
|
|
9
|
+
|
|
10
|
+
From user input, extract: **search query**, **optional flags**.
|
|
11
|
+
|
|
12
|
+
| Extract | Rule | Example |
|
|
13
|
+
|---------|------|---------|
|
|
14
|
+
| Search query | Remaining text after removing flags | `/ss-search user auth` → query=`user auth` |
|
|
15
|
+
| Include archived | `--archived`/`archived`/`include archived`/`all` → add `--archived` | `/ss-search auth --archived`; `/ss-search auth archived` |
|
|
16
|
+
| Filter type | `--artifact <type>`/`type:<type>` → add `--artifact <type>`; type: `proposal`/`spec`/`tasks`/`clarify`/`checklist` | `/ss-search auth --artifact spec`; `/ss-search auth type:proposal` |
|
|
17
|
+
|
|
8
18
|
**Steps**
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
3. Use `--artifact <type>` to filter by artifact type
|
|
19
|
+
1. Parse user input → extract search query and flags
|
|
20
|
+
2. Run `superspec search "<query>" [--archived] [--artifact <type>]`
|
|
12
21
|
<!-- 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 -->
|
|
@@ -5,11 +5,21 @@ category: SuperSpec
|
|
|
5
5
|
description: Cross-reference consistency check (boost mode)
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
|
+
**Input Parsing Rules**
|
|
9
|
+
|
|
10
|
+
From user input, extract: **change name**, **optional flags**.
|
|
11
|
+
|
|
12
|
+
| Extract | Rule | Example |
|
|
13
|
+
|---------|------|---------|
|
|
14
|
+
| Change name | Remaining text after removing flags; if empty, use current active change | `/ss-validate addUserAuth` → name=`addUserAuth` |
|
|
15
|
+
| Check deps | `--check-deps`/`check deps`/`dependencies` → add `--check-deps` | `/ss-validate --check-deps`; `/ss-validate check deps` |
|
|
16
|
+
|
|
8
17
|
**Guardrails**
|
|
9
18
|
- Validate US↔FR↔AC↔tasks consistency
|
|
10
19
|
- Only applicable in boost mode
|
|
11
20
|
|
|
12
21
|
**Steps**
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
22
|
+
1. Parse user input → extract change name and flags
|
|
23
|
+
2. Run `superspec validate [name] [--check-deps]`
|
|
24
|
+
3. Fix any consistency errors reported
|
|
15
25
|
<!-- 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
|
**状态**: 🟡 待检查
|
|
@@ -5,11 +5,21 @@ category: SuperSpec
|
|
|
5
5
|
description: 归档已完成的变更
|
|
6
6
|
---
|
|
7
7
|
<!-- SUPERSPEC:START -->
|
|
8
|
+
**输入解析规则**
|
|
9
|
+
|
|
10
|
+
从用户输入中提取:**变更名称**或**全部标志**。
|
|
11
|
+
|
|
12
|
+
| 提取项 | 规则 | 示例 |
|
|
13
|
+
|--------|------|------|
|
|
14
|
+
| 变更名称 | 移除标志后的剩余文本;为空时使用当前活跃变更 | `/ss-archive addUserAuth` → name=`addUserAuth` |
|
|
15
|
+
| 归档全部 | `--all`/`全部`/`所有` → 添加 `--all` | `/ss-archive --all`; `/ss-archive 全部` |
|
|
16
|
+
|
|
8
17
|
**Guardrails**
|
|
9
18
|
- 只有所有任务都 COMPLETE 后才能归档
|
|
10
19
|
- 归档前确保测试通过
|
|
11
20
|
|
|
12
21
|
**Steps**
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
22
|
+
1. 解析用户输入 → 提取变更名称或 `--all` 标志
|
|
23
|
+
2. 确认 tasks.md 中所有任务都标记为 COMPLETE
|
|
24
|
+
3. 运行 `superspec archive <name>` 或 `superspec archive --all`
|
|
15
25
|
<!-- SUPERSPEC:END -->
|
|
@@ -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 -->
|