spec-manager 0.1.0 → 0.1.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.
Files changed (72) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +36 -21
  3. package/dist/cli/completion.d.ts +3 -0
  4. package/dist/cli/completion.d.ts.map +1 -0
  5. package/dist/cli/completion.js +30 -0
  6. package/dist/cli/completion.js.map +1 -0
  7. package/dist/cli/index.js +4 -0
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/cli/project.d.ts.map +1 -1
  10. package/dist/cli/project.js +21 -7
  11. package/dist/cli/project.js.map +1 -1
  12. package/dist/cli/spec.d.ts.map +1 -1
  13. package/dist/cli/spec.js +42 -14
  14. package/dist/cli/spec.js.map +1 -1
  15. package/dist/cli/task.d.ts.map +1 -1
  16. package/dist/cli/task.js +4 -1
  17. package/dist/cli/task.js.map +1 -1
  18. package/dist/cli/usability.d.ts.map +1 -1
  19. package/dist/cli/usability.js +32 -8
  20. package/dist/cli/usability.js.map +1 -1
  21. package/dist/cli/view.d.ts +3 -0
  22. package/dist/cli/view.d.ts.map +1 -0
  23. package/dist/cli/view.js +122 -0
  24. package/dist/cli/view.js.map +1 -0
  25. package/dist/core/agents.d.ts +6 -1
  26. package/dist/core/agents.d.ts.map +1 -1
  27. package/dist/core/agents.js +39 -1
  28. package/dist/core/agents.js.map +1 -1
  29. package/dist/core/completion.d.ts +12 -0
  30. package/dist/core/completion.d.ts.map +1 -0
  31. package/dist/core/completion.js +136 -0
  32. package/dist/core/completion.js.map +1 -0
  33. package/dist/core/placeholder.d.ts +6 -0
  34. package/dist/core/placeholder.d.ts.map +1 -0
  35. package/dist/core/placeholder.js +12 -0
  36. package/dist/core/placeholder.js.map +1 -0
  37. package/dist/core/spec-io.d.ts +1 -5
  38. package/dist/core/spec-io.d.ts.map +1 -1
  39. package/dist/core/spec-io.js +3 -11
  40. package/dist/core/spec-io.js.map +1 -1
  41. package/dist/core/status.d.ts +4 -3
  42. package/dist/core/status.d.ts.map +1 -1
  43. package/dist/core/status.js +5 -4
  44. package/dist/core/status.js.map +1 -1
  45. package/dist/core/task.d.ts +2 -0
  46. package/dist/core/task.d.ts.map +1 -1
  47. package/dist/core/task.js +12 -3
  48. package/dist/core/task.js.map +1 -1
  49. package/dist/core/usability.d.ts +8 -2
  50. package/dist/core/usability.d.ts.map +1 -1
  51. package/dist/core/usability.js +157 -26
  52. package/dist/core/usability.js.map +1 -1
  53. package/dist/core/validate.d.ts +2 -0
  54. package/dist/core/validate.d.ts.map +1 -1
  55. package/dist/core/validate.js +29 -1
  56. package/dist/core/validate.js.map +1 -1
  57. package/dist/core/view.d.ts +35 -0
  58. package/dist/core/view.d.ts.map +1 -0
  59. package/dist/core/view.js +50 -0
  60. package/dist/core/view.js.map +1 -0
  61. package/package.json +2 -1
  62. package/rules/flow-control.md +3 -3
  63. package/skill/SKILL.md +14 -2
  64. package/skill/subskills/impl.md +2 -2
  65. package/templates/L3-impl.md +2 -2
  66. package/templates/agent-plan.json +2 -1
  67. package/templates/agents/AGENTS.md +8 -6
  68. package/templates/agents/CLAUDE.md +7 -3
  69. package/templates/agents/CODEBUDDY.md +9 -7
  70. package/templates/agents/CURSOR.md +28 -0
  71. package/templates/agents/WINDSURF.md +28 -0
  72. package/templates/agents/codebuddy-skill/SKILL.md +12 -1
@@ -3,11 +3,12 @@
3
3
  "_constraints": [
4
4
  "step 1 必须是上下文收集(读 L3 spec + 父 L2 + 历史任务)",
5
5
  "末步必须是可执行的验证命令(R10)",
6
+ "coveredSpecs 必须包含当前 L3 specCode;若覆盖多条 L3,列出所有 specCode",
6
7
  "单 Agent Task = 单 L3 spec,步数 ≤ 20(R11);超 16 步必拆 L3",
7
8
  "每步 name 必须含 verb+object+file,禁止'优化/改进/处理'等模糊动词",
8
9
  "stepType 仅限 llm_call / mcp_tool / human_gate"
9
10
  ],
10
- "coveredSpecs": ["2026-06-04-c3d4e5"],
11
+ "coveredSpecs": ["<current-L3-specCode>"],
11
12
  "steps": [
12
13
  {"stepNo": 1, "stepType": "mcp_tool", "name": "上下文收集: spec-manager spec show L3 + 父 L2 + 读 templates/agent-plan.json"},
13
14
  {"stepNo": 2, "stepType": "mcp_tool", "name": "编辑 <ServiceName>.java 新增方法 <verb>"},
@@ -4,14 +4,16 @@ This file is the spec-manager skill-like entrypoint for Codex, OpenCode, and oth
4
4
 
5
5
  This project uses `spec-manager` for local-first spec-driven development. Specs, tasks, decisions, changes, and audit data are stored as markdown/JSON files in the repository.
6
6
 
7
- ## Mandatory Workflow
7
+ ## Unified Rules
8
8
 
9
- - Feature work MUST go through `spec-manager`; do not jump directly from a user request to implementation code.
10
- - New or non-trivial work follows L1 PRD -> L2 Design -> L3 Impl -> Agent Task.
11
- - Never write implementation code unless the relevant L3 spec is `frozen`.
12
- - `draft -> confirmed` and `confirmed -> frozen` are user review actions. After writing spec content, stop and wait for explicit user approval.
9
+ - Feature work MUST go through `spec-manager`.
10
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
11
+ - Never write implementation code without a frozen L3 spec.
12
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
13
13
  - Before creating a new spec, inspect existing specs and decisions with `spec-manager spec list` and `spec-manager decision list --topic <topic>`.
14
- - Before code edits, read the relevant frozen L3 spec and create/start an Agent Task.
14
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
15
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
16
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
15
17
  - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
16
18
 
17
19
  ## Common Commands
@@ -2,10 +2,14 @@
2
2
 
3
3
  This project uses `spec-manager` via the `/spec-manager` skill.
4
4
 
5
- - All feature work MUST go through `/spec-manager`; no direct code changes for non-trivial work.
5
+ - Feature work MUST go through `spec-manager`.
6
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
6
7
  - Never write implementation code without a frozen L3 spec.
7
- - Never skip human review gates. L1, L2, and L3 each require explicit user approval.
8
- - Status transitions (`confirm` and `freeze`) are user actions, not AI actions.
8
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
9
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
10
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
11
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
12
+ - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
9
13
  - For research, prefer `spec-manager spec show` metadata first, then `--include-content` when full context is required.
10
14
 
11
15
  Use the installed `.claude/skills/spec-manager/` skill when the user invokes `/spec-manager` or approves the next spec-manager step.
@@ -2,15 +2,17 @@
2
2
 
3
3
  This project uses `spec-manager` for local-first spec-driven development. CodeBuddy should use the project skill at `.codebuddy/skills/spec-manager/` when the user asks for `/spec-manager` or asks to follow the spec-manager workflow.
4
4
 
5
- ## Rules
5
+ ## Unified Rules
6
6
 
7
- - Feature work MUST go through `spec-manager`; avoid direct code edits for non-trivial work.
8
- - New or non-trivial work follows L1 PRD -> L2 Design -> L3 Impl -> Agent Task.
9
- - Never write implementation code unless the relevant L3 spec is `frozen`.
10
- - `confirm` and `freeze` are user review actions. Stop after writing spec content and wait for explicit approval.
7
+ - Feature work MUST go through `spec-manager`.
8
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
9
+ - Never write implementation code without a frozen L3 spec.
10
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
11
11
  - Before creating a new spec, inspect existing specs and decisions.
12
- - Before code edits, read the relevant frozen L3 spec and create/start an Agent Task.
13
- - Record each execution step with `spec-manager task step`; complete with `spec-manager task complete`.
12
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
13
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
14
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
15
+ - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
14
16
 
15
17
  ## Useful Commands
16
18
 
@@ -0,0 +1,28 @@
1
+ # spec-manager Workflow Capsule
2
+
3
+ This file is the spec-manager entrypoint for Cursor. Cursor reads project rules from `.cursorrules`; route feature work through `spec-manager`.
4
+
5
+ This project uses `spec-manager` for local-first spec-driven development. Specs, tasks, decisions, changes, and audit data are stored as markdown/JSON files in the repository.
6
+
7
+ ## Unified Rules
8
+
9
+ - Feature work MUST go through `spec-manager`.
10
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
11
+ - Never write implementation code without a frozen L3 spec.
12
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
13
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
14
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
15
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
16
+ - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
17
+
18
+ ## Common Commands
19
+
20
+ ```bash
21
+ spec-manager project status
22
+ spec-manager spec list
23
+ spec-manager spec show <code> --include-content
24
+ spec-manager decision list --topic <topic>
25
+ spec-manager task list --topic <topic>
26
+ ```
27
+
28
+ When the user asks for `/spec-manager <request>` or asks to use spec-manager, treat it as a request to follow this workflow.
@@ -0,0 +1,28 @@
1
+ # spec-manager Workflow Capsule
2
+
3
+ This file is the spec-manager entrypoint for Windsurf. Windsurf reads project rules from `.windsurfrules`; route feature work through `spec-manager`.
4
+
5
+ This project uses `spec-manager` for local-first spec-driven development. Specs, tasks, decisions, changes, and audit data are stored as markdown/JSON files in the repository.
6
+
7
+ ## Unified Rules
8
+
9
+ - Feature work MUST go through `spec-manager`.
10
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
11
+ - Never write implementation code without a frozen L3 spec.
12
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
13
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
14
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
15
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
16
+ - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
17
+
18
+ ## Common Commands
19
+
20
+ ```bash
21
+ spec-manager project status
22
+ spec-manager spec list
23
+ spec-manager spec show <code> --include-content
24
+ spec-manager decision list --topic <topic>
25
+ spec-manager task list --topic <topic>
26
+ ```
27
+
28
+ When the user asks for `/spec-manager <request>` or asks to use spec-manager, treat it as a request to follow this workflow.
@@ -13,6 +13,17 @@ Use this skill when the user invokes `/spec-manager`, asks for a new feature, PR
13
13
  - `/spec-manager <request>` — start from the user's requirement and route to the right subskill.
14
14
  - `/spec-manager run <taskId>` — execute an existing Agent Task.
15
15
 
16
+ ## Unified Rules
17
+
18
+ - Feature work MUST go through `spec-manager`.
19
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
20
+ - Never write implementation code without a frozen L3 spec.
21
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
22
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
23
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
24
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
25
+ - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
26
+
16
27
  ## Route Table
17
28
 
18
29
  | Signal | Subskill |
@@ -36,7 +47,7 @@ If intent is unclear, ask the user one concise clarification question before tak
36
47
 
37
48
  - Do not write implementation code without a frozen L3 spec.
38
49
  - Stop after writing L1/L2/L3 content and wait for explicit user approval.
39
- - Status transitions (`confirm` and `freeze`) are user actions.
50
+ - Status transitions are user actions; one L3 `confirm` approval advances directly to frozen.
40
51
  - Agent Tasks can only be created from frozen L3 specs.
41
52
  - Before code edits, read the relevant spec and inspect the actual source files.
42
53