@superspec/cli 1.0.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.
Files changed (44) hide show
  1. package/dist/cli/index.js +1329 -0
  2. package/dist/cli/index.js.map +1 -0
  3. package/dist/index.d.ts +52 -0
  4. package/dist/index.js +607 -0
  5. package/dist/index.js.map +1 -0
  6. package/package.json +63 -0
  7. package/prompts/agents.md +150 -0
  8. package/prompts/cursor-rules.md +154 -0
  9. package/templates/en/checklist.md +62 -0
  10. package/templates/en/clarify.md +44 -0
  11. package/templates/en/commands/ss-apply.md +19 -0
  12. package/templates/en/commands/ss-archive.md +15 -0
  13. package/templates/en/commands/ss-checklist.md +16 -0
  14. package/templates/en/commands/ss-clarify.md +17 -0
  15. package/templates/en/commands/ss-create.md +19 -0
  16. package/templates/en/commands/ss-deps.md +11 -0
  17. package/templates/en/commands/ss-link.md +11 -0
  18. package/templates/en/commands/ss-lint.md +15 -0
  19. package/templates/en/commands/ss-resume.md +17 -0
  20. package/templates/en/commands/ss-search.md +12 -0
  21. package/templates/en/commands/ss-status.md +12 -0
  22. package/templates/en/commands/ss-tasks.md +19 -0
  23. package/templates/en/commands/ss-validate.md +15 -0
  24. package/templates/en/proposal.md +53 -0
  25. package/templates/en/spec.md +73 -0
  26. package/templates/en/tasks.md +52 -0
  27. package/templates/zh/checklist.md +62 -0
  28. package/templates/zh/clarify.md +44 -0
  29. package/templates/zh/commands/ss-apply.md +19 -0
  30. package/templates/zh/commands/ss-archive.md +15 -0
  31. package/templates/zh/commands/ss-checklist.md +16 -0
  32. package/templates/zh/commands/ss-clarify.md +17 -0
  33. package/templates/zh/commands/ss-create.md +19 -0
  34. package/templates/zh/commands/ss-deps.md +11 -0
  35. package/templates/zh/commands/ss-link.md +11 -0
  36. package/templates/zh/commands/ss-lint.md +15 -0
  37. package/templates/zh/commands/ss-resume.md +17 -0
  38. package/templates/zh/commands/ss-search.md +12 -0
  39. package/templates/zh/commands/ss-status.md +12 -0
  40. package/templates/zh/commands/ss-tasks.md +19 -0
  41. package/templates/zh/commands/ss-validate.md +15 -0
  42. package/templates/zh/proposal.md +59 -0
  43. package/templates/zh/spec.md +73 -0
  44. package/templates/zh/tasks.md +52 -0
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: /ss-apply
3
+ id: ss-apply
4
+ category: SuperSpec
5
+ description: Implement tasks from the current change
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Read tasks.md before implementing
10
+ - Implement one task at a time, mark as COMPLETE after verification
11
+ - Run tests/lint after each significant change
12
+ - Never implement without reading the spec first (in boost mode)
13
+
14
+ **Steps**
15
+ 1. Read `{specDir}/changes/<name>/tasks.md`
16
+ 2. If boost mode, also read `spec.md` and `checklist.md`
17
+ 3. For each task: update status → implement → verify → mark COMPLETE
18
+ 4. Run full test suite after all tasks complete
19
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: /ss-archive
3
+ id: ss-archive
4
+ category: SuperSpec
5
+ description: Archive completed change
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Only archive when all tasks are COMPLETE
10
+ - Ensure tests pass before archiving
11
+
12
+ **Steps**
13
+ 1. Verify all tasks in tasks.md are marked COMPLETE
14
+ 2. Run `superspec archive <name>` or `superspec archive --all`
15
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: /ss-checklist
3
+ id: ss-checklist
4
+ category: SuperSpec
5
+ description: Quality gate before apply (boost mode)
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Only applicable in boost mode
10
+ - Validate all quality criteria before implementation
11
+
12
+ **Steps**
13
+ 1. Read `{specDir}/changes/<name>/checklist.md`
14
+ 2. Verify each checklist item
15
+ 3. Address any failing checks before /ss-apply
16
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: /ss-clarify
3
+ id: ss-clarify
4
+ category: SuperSpec
5
+ description: Resolve ambiguity and record decisions
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Add Q&A to clarify.md when requirements are ambiguous
10
+ - Record decisions with reasoning
11
+
12
+ **Steps**
13
+ 1. Identify the ambiguous point or question
14
+ 2. Ask user for clarification
15
+ 3. Record the Q&A in `{specDir}/changes/<name>/clarify.md`
16
+ 4. Update proposal.md or spec.md if needed
17
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: /ss-create
3
+ id: ss-create
4
+ category: SuperSpec
5
+ description: Create a new change with proposal (boost mode adds spec + checklist)
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Read `superspec.config.json` first to get `lang`, `specDir`, `boost`, `strategy`, `context`
10
+ - Check existing changes in `{specDir}/changes/` to avoid duplicates
11
+ - Never create change folders manually — use `superspec create <name>` CLI
12
+ - Do not write any code during the proposal stage. Only create design documents
13
+
14
+ **Steps**
15
+ 1. Run `superspec create <name> [-b] [-c] [-d <description>]` to scaffold the change
16
+ 2. If boost mode (-b), also generate spec.md and checklist.md
17
+ 3. Read the generated proposal.md and understand the change scope
18
+ 4. Wait for user confirmation before proceeding to /ss-tasks
19
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: /ss-deps
3
+ id: ss-deps
4
+ category: SuperSpec
5
+ description: View dependency graph
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. Run `superspec deps [name]`
10
+ 2. Review dependency tree
11
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: /ss-link
3
+ id: ss-link
4
+ category: SuperSpec
5
+ description: Add spec dependency
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. Run `superspec link <name> --depends-on <other>`
10
+ 2. This updates the frontmatter: `depends_on: [other]`
11
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: /ss-lint
3
+ id: ss-lint
4
+ category: SuperSpec
5
+ description: Check artifact line limits
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Target: < 300 lines per artifact
10
+ - Hard limit: 400 lines
11
+
12
+ **Steps**
13
+ 1. Run `superspec lint [name]`
14
+ 2. If exceeds limit, split into smaller artifacts
15
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: /ss-resume
3
+ id: ss-resume
4
+ category: SuperSpec
5
+ description: Restore spec context for vibe coding
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Use when returning to a change after a break
10
+ - Read context.md first if it exists
11
+
12
+ **Steps**
13
+ 1. Run `superspec sync` to collect git diff into context.md
14
+ 2. Read `{specDir}/changes/<name>/context.md`
15
+ 3. Read current proposal.md and tasks.md to understand state
16
+ 4. Identify incomplete tasks and continue implementation
17
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: /ss-search
3
+ id: ss-search
4
+ category: SuperSpec
5
+ description: Full-text search across changes
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. Run `superspec search <query>`
10
+ 2. Use `--archived` to include archived changes
11
+ 3. Use `--artifact <type>` to filter by artifact type
12
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: /ss-status
3
+ id: ss-status
4
+ category: SuperSpec
5
+ description: View all change statuses
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. Run `superspec status` to list all changes
10
+ 2. Review status: Draft → Ready → Done
11
+ 3. Check dependencies between changes
12
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: /ss-tasks
3
+ id: ss-tasks
4
+ category: SuperSpec
5
+ description: Generate task list from proposal
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Read proposal.md first (and spec.md in boost mode)
10
+ - Tasks must be small, verifiable, and actionable (< 1 hour each in boost mode)
11
+ - Group related changes to the same file under one task
12
+ - Include verification steps for each task
13
+
14
+ **Steps**
15
+ 1. Read `{specDir}/changes/<name>/proposal.md`
16
+ 2. If boost mode, also read `spec.md`
17
+ 3. Generate tasks.md with phased implementation steps
18
+ 4. Each task should have: clear description, file paths, dependencies, verification criteria
19
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: /ss-validate
3
+ id: ss-validate
4
+ category: SuperSpec
5
+ description: Cross-reference consistency check (boost mode)
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - Validate US↔FR↔AC↔tasks consistency
10
+ - Only applicable in boost mode
11
+
12
+ **Steps**
13
+ 1. Run `superspec validate [name]`
14
+ 2. Fix any consistency errors reported
15
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: {{name}}
3
+ status: draft
4
+ strategy: {{strategy}}
5
+ depends_on: []
6
+ ---
7
+
8
+ # Proposal: {{name}}
9
+
10
+ > Created: {{date}}
11
+
12
+ ## Background
13
+
14
+ <!-- Why this change? What problem exists? -->
15
+
16
+ ## Goals
17
+
18
+ <!-- What should this change achieve? -->
19
+
20
+ - [ ] Goal 1
21
+ - [ ] Goal 2
22
+
23
+ ## Non-Goals
24
+
25
+ <!-- What is explicitly out of scope -->
26
+
27
+ ## Solution Overview
28
+
29
+ <!-- High-level solution description -->
30
+
31
+ ## Impact Scope
32
+
33
+ <!-- Which modules/files/systems are affected? -->
34
+
35
+ - **Modules**:
36
+ - **Files**:
37
+ - **Dependencies**:
38
+
39
+ ## Risks & Trade-offs
40
+
41
+ | Risk | Impact | Mitigation |
42
+ |------|--------|------------|
43
+ | | | |
44
+
45
+ ## Open Questions
46
+
47
+ <!-- Questions that need further discussion -->
48
+
49
+ 1.
50
+
51
+ ---
52
+
53
+ **Status**: 🟡 Draft
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: {{name}}
3
+ status: draft
4
+ strategy: {{strategy}}
5
+ depends_on: []
6
+ ---
7
+
8
+ # Specification: {{name}}
9
+
10
+ > Created: {{date}}
11
+
12
+ ## Overview
13
+
14
+ <!-- Brief description of this change -->
15
+
16
+ ## User Stories
17
+
18
+ ### US-1: [Story Title]
19
+
20
+ **As a** [role], **I want to** [feature], **so that** [value]
21
+
22
+ #### Acceptance Criteria
23
+
24
+ - [ ] AC-1.1:
25
+ - [ ] AC-1.2:
26
+
27
+ ### US-2: [Story Title]
28
+
29
+ **As a** [role], **I want to** [feature], **so that** [value]
30
+
31
+ #### Acceptance Criteria
32
+
33
+ - [ ] AC-2.1:
34
+ - [ ] AC-2.2:
35
+
36
+ ## Functional Requirements
37
+
38
+ ### FR-1: [Requirement Title]
39
+
40
+ - **Description**:
41
+ - **Priority**: P0 / P1 / P2
42
+ - **Dependencies**:
43
+
44
+ ### FR-2: [Requirement Title]
45
+
46
+ - **Description**:
47
+ - **Priority**: P0 / P1 / P2
48
+ - **Dependencies**:
49
+
50
+ ## Non-Functional Requirements
51
+
52
+ - **Performance**:
53
+ - **Security**:
54
+ - **Compatibility**:
55
+
56
+ ## Data Model
57
+
58
+ <!-- Describe data structure changes if needed -->
59
+
60
+ ## API Design
61
+
62
+ <!-- Describe API design if needed -->
63
+
64
+ ## Edge Cases
65
+
66
+ <!-- Edge cases to consider -->
67
+
68
+ 1.
69
+ 2.
70
+
71
+ ---
72
+
73
+ **Status**: 🟡 Draft
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: {{name}}
3
+ status: draft
4
+ strategy: {{strategy}}
5
+ depends_on: []
6
+ ---
7
+
8
+ # Task List: {{name}}
9
+
10
+ > Created: {{date}}
11
+
12
+ ## Phase 1: Infrastructure
13
+
14
+ - [ ] 1.1 [Task description]
15
+ - File: `path/to/file`
16
+ - Depends: none
17
+ - [ ] 1.2 [Task description]
18
+ - File: `path/to/file`
19
+ - Depends: 1.1
20
+
21
+ ## Phase 2: Core Implementation
22
+
23
+ - [ ] 2.1 [Task description]
24
+ - File: `path/to/file`
25
+ - Depends: Phase 1
26
+ - [ ] 2.2 [Task description] `[P]`
27
+ - File: `path/to/file`
28
+ - Depends: 2.1
29
+ - [ ] 2.3 [Task description] `[P]`
30
+ - File: `path/to/file`
31
+ - Depends: 2.1
32
+
33
+ ## Phase 3: Integration & Verification
34
+
35
+ - [ ] 3.1 [Task description]
36
+ - File: `path/to/file`
37
+ - Depends: Phase 2
38
+ - [ ] 3.2 [Task description]
39
+ - File: `path/to/file`
40
+ - Depends: 3.1
41
+
42
+ ## Checkpoints
43
+
44
+ - [ ] Phase 1 complete, foundation ready
45
+ - [ ] Phase 2 complete, core features ready
46
+ - [ ] Phase 3 complete, integration verified
47
+
48
+ ---
49
+
50
+ `[P]` = Can be executed in parallel
51
+
52
+ **Status**: 🟡 Pending
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: {{name}}
3
+ status: draft
4
+ strategy: {{strategy}}
5
+ depends_on: []
6
+ ---
7
+
8
+ # 质量检查清单: {{name}}
9
+
10
+ > 创建日期: {{date}}
11
+ > 模式: 增强 (boost)
12
+
13
+ ## 需求完整性
14
+
15
+ - [ ] 所有用户故事都有明确的验收标准
16
+ - [ ] 功能需求覆盖了所有用户故事
17
+ - [ ] 非功能需求已定义(性能、安全、兼容性)
18
+ - [ ] 边界情况已识别并记录
19
+ - [ ] 数据模型变更已描述
20
+
21
+ ## 提案质量
22
+
23
+ - [ ] 背景和动机清晰
24
+ - [ ] 目标可衡量
25
+ - [ ] 非目标明确
26
+ - [ ] 风险已识别并有缓解措施
27
+ - [ ] 影响范围已评估
28
+
29
+ ## 规格一致性
30
+
31
+ - [ ] spec 与 proposal 目标一致
32
+ - [ ] 用户故事覆盖 proposal 中所有目标
33
+ - [ ] 验收标准可测试
34
+ - [ ] 无矛盾需求
35
+ - [ ] 依赖关系明确
36
+
37
+ ## 任务可执行性
38
+
39
+ - [ ] 任务粒度合理(每个 < 2h)
40
+ - [ ] 依赖关系正确
41
+ - [ ] 并行任务标记正确
42
+ - [ ] 文件路径明确
43
+ - [ ] 检查点设置合理
44
+
45
+ ## 交叉验证
46
+
47
+ - [ ] proposal → spec: 所有目标都有对应需求
48
+ - [ ] spec → tasks: 所有需求都有对应任务
49
+ - [ ] tasks → spec: 没有超出 spec 范围的任务
50
+ - [ ] clarify → all: 所有澄清结果已更新到相关文档
51
+
52
+ ## 实现就绪度
53
+
54
+ - [ ] 技术方案可行
55
+ - [ ] 无阻塞依赖
56
+ - [ ] 开放问题已解决(或已标记为非阻塞)
57
+ - [ ] 团队对方案达成共识
58
+
59
+ ---
60
+
61
+ **总分**: _ / 25
62
+ **状态**: 🟡 待检查
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: {{name}}
3
+ status: draft
4
+ strategy: {{strategy}}
5
+ depends_on: []
6
+ ---
7
+
8
+ # 澄清记录: {{name}}
9
+
10
+ > 创建日期: {{date}}
11
+
12
+ ## 澄清问题
13
+
14
+ ### Q1: [问题]
15
+
16
+ - **提问方**: AI / 用户
17
+ - **回答**:
18
+ - **影响**: 对 spec / proposal / tasks 的影响
19
+ - **已更新**: ☐ spec ☐ proposal ☐ tasks
20
+
21
+ ### Q2: [问题]
22
+
23
+ - **提问方**: AI / 用户
24
+ - **回答**:
25
+ - **影响**:
26
+ - **已更新**: ☐ spec ☐ proposal ☐ tasks
27
+
28
+ ## 决策记录
29
+
30
+ | # | 决策 | 原因 | 日期 |
31
+ |---|------|------|------|
32
+ | D1 | | | |
33
+ | D2 | | | |
34
+
35
+ ## 待澄清
36
+
37
+ <!-- 尚未解决的问题 -->
38
+
39
+ 1.
40
+ 2.
41
+
42
+ ---
43
+
44
+ **状态**: 🟡 进行中
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: /ss-apply
3
+ id: ss-apply
4
+ category: SuperSpec
5
+ description: 执行变更任务
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 执行前先读取 tasks.md
10
+ - 一次执行一个任务,验证后标记为 COMPLETE
11
+ - 每次重大变更后运行测试/检查
12
+ - boost 模式下必须先读取 spec 再执行
13
+
14
+ **Steps**
15
+ 1. 读取 `{specDir}/changes/<name>/tasks.md`
16
+ 2. boost 模式下,同时读取 `spec.md` 和 `checklist.md`
17
+ 3. 对每个任务:更新状态 → 执行 → 验证 → 标记 COMPLETE
18
+ 4. 所有任务完成后运行完整测试套件
19
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: /ss-archive
3
+ id: ss-archive
4
+ category: SuperSpec
5
+ description: 归档已完成的变更
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 只有所有任务都 COMPLETE 后才能归档
10
+ - 归档前确保测试通过
11
+
12
+ **Steps**
13
+ 1. 确认 tasks.md 中所有任务都标记为 COMPLETE
14
+ 2. 运行 `superspec archive <name>` 或 `superspec archive --all`
15
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: /ss-checklist
3
+ id: ss-checklist
4
+ category: SuperSpec
5
+ description: apply 前的质量门(boost 模式)
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 仅在 boost 模式下适用
10
+ - 执行前验证所有质量标准
11
+
12
+ **Steps**
13
+ 1. 读取 `{specDir}/changes/<name>/checklist.md`
14
+ 2. 验证每个检查项
15
+ 3. 在 /ss-apply 前解决所有失败检查
16
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: /ss-clarify
3
+ id: ss-clarify
4
+ category: SuperSpec
5
+ description: 澄清歧义、记录决策
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 当需求不明确时,向 clarify.md 添加 Q&A
10
+ - 记录决策及理由
11
+
12
+ **Steps**
13
+ 1. 识别模糊点或问题
14
+ 2. 向用户询问澄清
15
+ 3. 将 Q&A 记录到 `{specDir}/changes/<name>/clarify.md`
16
+ 4. 根据需要更新 proposal.md 或 spec.md
17
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: /ss-create
3
+ id: ss-create
4
+ category: SuperSpec
5
+ description: 创建变更 + 生成 proposal(boost 模式额外生成 spec + checklist)
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 首先读取 `superspec.config.json` 获取 `lang`, `specDir`, `boost`, `strategy`, `context`
10
+ - 检查 `{specDir}/changes/` 中现有变更,避免重复
11
+ - 永远不要手动创建变更文件夹 —— 使用 `superspec create <name>` CLI
12
+ - 在提案阶段不要编写任何代码,只创建设计文档
13
+
14
+ **Steps**
15
+ 1. 运行 `superspec create <name> [-b] [-c] [-d <description>]` 创建变更结构
16
+ 2. 如果是 boost 模式 (-b),额外生成 spec.md 和 checklist.md
17
+ 3. 读取生成的 proposal.md 理解变更范围
18
+ 4. 等待用户确认后再继续 /ss-tasks
19
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: /ss-deps
3
+ id: ss-deps
4
+ category: SuperSpec
5
+ description: 查看依赖图
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. 运行 `superspec deps [name]`
10
+ 2. 查看依赖树
11
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: /ss-link
3
+ id: ss-link
4
+ category: SuperSpec
5
+ description: 添加 spec 依赖
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. 运行 `superspec link <name> --depends-on <other>`
10
+ 2. 这会更新 frontmatter: `depends_on: [other]`
11
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: /ss-lint
3
+ id: ss-lint
4
+ category: SuperSpec
5
+ description: 检查 artifact 大小
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 目标:每个 artifact < 300 行
10
+ - 硬限制:400 行
11
+
12
+ **Steps**
13
+ 1. 运行 `superspec lint [name]`
14
+ 2. 如果超出限制,拆分为更小的 artifact
15
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: /ss-resume
3
+ id: ss-resume
4
+ category: SuperSpec
5
+ description: 恢复 spec 上下文(用于 vibe coding)
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Guardrails**
9
+ - 中断后返回工作时使用
10
+ - 优先读取 context.md(如果存在)
11
+
12
+ **Steps**
13
+ 1. 运行 `superspec sync` 将 git 变更收集到 context.md
14
+ 2. 读取 `{specDir}/changes/<name>/context.md`
15
+ 3. 读取当前的 proposal.md 和 tasks.md 了解状态
16
+ 4. 识别未完成的任务并继续执行
17
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: /ss-search
3
+ id: ss-search
4
+ category: SuperSpec
5
+ description: 全文搜索变更
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. 运行 `superspec search <query>`
10
+ 2. 使用 `--archived` 包含已归档的变更
11
+ 3. 使用 `--artifact <type>` 按 artifact 类型过滤
12
+ <!-- SUPERSPEC:END -->
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: /ss-status
3
+ id: ss-status
4
+ category: SuperSpec
5
+ description: 查看所有变更状态
6
+ ---
7
+ <!-- SUPERSPEC:START -->
8
+ **Steps**
9
+ 1. 运行 `superspec status` 列出所有变更
10
+ 2. 查看状态:Draft → Ready → Done
11
+ 3. 检查变更间的依赖关系
12
+ <!-- SUPERSPEC:END -->