spec-manager 0.1.0 → 0.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.
Files changed (128) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +94 -28
  3. package/dist/cli/change.d.ts.map +1 -1
  4. package/dist/cli/change.js +93 -4
  5. package/dist/cli/change.js.map +1 -1
  6. package/dist/cli/completion.d.ts +3 -0
  7. package/dist/cli/completion.d.ts.map +1 -0
  8. package/dist/cli/completion.js +30 -0
  9. package/dist/cli/completion.js.map +1 -0
  10. package/dist/cli/index.js +4 -0
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/cli/project.d.ts.map +1 -1
  13. package/dist/cli/project.js +71 -7
  14. package/dist/cli/project.js.map +1 -1
  15. package/dist/cli/spec.d.ts.map +1 -1
  16. package/dist/cli/spec.js +42 -14
  17. package/dist/cli/spec.js.map +1 -1
  18. package/dist/cli/task.d.ts.map +1 -1
  19. package/dist/cli/task.js +150 -42
  20. package/dist/cli/task.js.map +1 -1
  21. package/dist/cli/usability.d.ts.map +1 -1
  22. package/dist/cli/usability.js +32 -8
  23. package/dist/cli/usability.js.map +1 -1
  24. package/dist/cli/view.d.ts +3 -0
  25. package/dist/cli/view.d.ts.map +1 -0
  26. package/dist/cli/view.js +122 -0
  27. package/dist/cli/view.js.map +1 -0
  28. package/dist/core/agents.d.ts +23 -1
  29. package/dist/core/agents.d.ts.map +1 -1
  30. package/dist/core/agents.js +82 -2
  31. package/dist/core/agents.js.map +1 -1
  32. package/dist/core/archive.d.ts.map +1 -1
  33. package/dist/core/archive.js +74 -2
  34. package/dist/core/archive.js.map +1 -1
  35. package/dist/core/audit.d.ts +1 -0
  36. package/dist/core/audit.d.ts.map +1 -1
  37. package/dist/core/audit.js +60 -40
  38. package/dist/core/audit.js.map +1 -1
  39. package/dist/core/completion.d.ts +12 -0
  40. package/dist/core/completion.d.ts.map +1 -0
  41. package/dist/core/completion.js +136 -0
  42. package/dist/core/completion.js.map +1 -0
  43. package/dist/core/delta.d.ts +30 -1
  44. package/dist/core/delta.d.ts.map +1 -1
  45. package/dist/core/delta.js +141 -4
  46. package/dist/core/delta.js.map +1 -1
  47. package/dist/core/harness.d.ts +69 -0
  48. package/dist/core/harness.d.ts.map +1 -0
  49. package/dist/core/harness.js +278 -0
  50. package/dist/core/harness.js.map +1 -0
  51. package/dist/core/integrity-exemptions.d.ts +29 -0
  52. package/dist/core/integrity-exemptions.d.ts.map +1 -0
  53. package/dist/core/integrity-exemptions.js +100 -0
  54. package/dist/core/integrity-exemptions.js.map +1 -0
  55. package/dist/core/integrity.d.ts +12 -0
  56. package/dist/core/integrity.d.ts.map +1 -0
  57. package/dist/core/integrity.js +163 -0
  58. package/dist/core/integrity.js.map +1 -0
  59. package/dist/core/invariants.d.ts +5 -0
  60. package/dist/core/invariants.d.ts.map +1 -0
  61. package/dist/core/invariants.js +19 -0
  62. package/dist/core/invariants.js.map +1 -0
  63. package/dist/core/lifecycle.d.ts +37 -0
  64. package/dist/core/lifecycle.d.ts.map +1 -0
  65. package/dist/core/lifecycle.js +70 -0
  66. package/dist/core/lifecycle.js.map +1 -0
  67. package/dist/core/paths.d.ts +3 -0
  68. package/dist/core/paths.d.ts.map +1 -1
  69. package/dist/core/paths.js +19 -1
  70. package/dist/core/paths.js.map +1 -1
  71. package/dist/core/placeholder.d.ts +6 -0
  72. package/dist/core/placeholder.d.ts.map +1 -0
  73. package/dist/core/placeholder.js +12 -0
  74. package/dist/core/placeholder.js.map +1 -0
  75. package/dist/core/reconciliation.d.ts +25 -0
  76. package/dist/core/reconciliation.d.ts.map +1 -0
  77. package/dist/core/reconciliation.js +122 -0
  78. package/dist/core/reconciliation.js.map +1 -0
  79. package/dist/core/remediation.d.ts +41 -0
  80. package/dist/core/remediation.d.ts.map +1 -0
  81. package/dist/core/remediation.js +169 -0
  82. package/dist/core/remediation.js.map +1 -0
  83. package/dist/core/spec-io.d.ts +3 -5
  84. package/dist/core/spec-io.d.ts.map +1 -1
  85. package/dist/core/spec-io.js +26 -13
  86. package/dist/core/spec-io.js.map +1 -1
  87. package/dist/core/status.d.ts +6 -3
  88. package/dist/core/status.d.ts.map +1 -1
  89. package/dist/core/status.js +12 -4
  90. package/dist/core/status.js.map +1 -1
  91. package/dist/core/task.d.ts +26 -0
  92. package/dist/core/task.d.ts.map +1 -1
  93. package/dist/core/task.js +74 -46
  94. package/dist/core/task.js.map +1 -1
  95. package/dist/core/transaction.d.ts +10 -0
  96. package/dist/core/transaction.d.ts.map +1 -0
  97. package/dist/core/transaction.js +65 -0
  98. package/dist/core/transaction.js.map +1 -0
  99. package/dist/core/usability.d.ts +8 -2
  100. package/dist/core/usability.d.ts.map +1 -1
  101. package/dist/core/usability.js +203 -35
  102. package/dist/core/usability.js.map +1 -1
  103. package/dist/core/validate.d.ts +2 -0
  104. package/dist/core/validate.d.ts.map +1 -1
  105. package/dist/core/validate.js +29 -1
  106. package/dist/core/validate.js.map +1 -1
  107. package/dist/core/view.d.ts +35 -0
  108. package/dist/core/view.d.ts.map +1 -0
  109. package/dist/core/view.js +50 -0
  110. package/dist/core/view.js.map +1 -0
  111. package/dist/index.d.ts +7 -0
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +7 -0
  114. package/dist/index.js.map +1 -1
  115. package/dist/schemas/change.d.ts +20 -20
  116. package/dist/schemas/spec.d.ts +12 -12
  117. package/package.json +2 -1
  118. package/rules/flow-control.md +3 -3
  119. package/skill/SKILL.md +14 -2
  120. package/skill/subskills/impl.md +2 -2
  121. package/templates/L3-impl.md +2 -2
  122. package/templates/agent-plan.json +2 -1
  123. package/templates/agents/AGENTS.md +8 -6
  124. package/templates/agents/CLAUDE.md +7 -3
  125. package/templates/agents/CODEBUDDY.md +9 -7
  126. package/templates/agents/CURSOR.md +28 -0
  127. package/templates/agents/WINDSURF.md +28 -0
  128. package/templates/agents/codebuddy-skill/SKILL.md +12 -1
@@ -23,23 +23,23 @@ export declare const ChangeEntrySchema: z.ZodObject<{
23
23
  }, "strip", z.ZodTypeAny, {
24
24
  code: string;
25
25
  op: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
26
- content?: string | undefined;
26
+ parentCode?: string | null | undefined;
27
27
  level?: "L0" | "L1" | "L2" | "L3" | undefined;
28
28
  title?: string | undefined;
29
- parentCode?: string | null | undefined;
29
+ content?: string | undefined;
30
+ newCode?: string | undefined;
30
31
  changeSummary?: string | undefined;
31
32
  affectedCriteria?: string[] | undefined;
32
- newCode?: string | undefined;
33
33
  }, {
34
34
  code: string;
35
35
  op: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
36
- content?: string | undefined;
36
+ parentCode?: string | null | undefined;
37
37
  level?: "L0" | "L1" | "L2" | "L3" | undefined;
38
38
  title?: string | undefined;
39
- parentCode?: string | null | undefined;
39
+ content?: string | undefined;
40
+ newCode?: string | undefined;
40
41
  changeSummary?: string | undefined;
41
42
  affectedCriteria?: string[] | undefined;
42
- newCode?: string | undefined;
43
43
  }>;
44
44
  export declare const DeltaSpecSchema: z.ZodObject<{
45
45
  name: z.ZodString;
@@ -58,35 +58,35 @@ export declare const DeltaSpecSchema: z.ZodObject<{
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  code: string;
60
60
  op: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
61
- content?: string | undefined;
61
+ parentCode?: string | null | undefined;
62
62
  level?: "L0" | "L1" | "L2" | "L3" | undefined;
63
63
  title?: string | undefined;
64
- parentCode?: string | null | undefined;
64
+ content?: string | undefined;
65
+ newCode?: string | undefined;
65
66
  changeSummary?: string | undefined;
66
67
  affectedCriteria?: string[] | undefined;
67
- newCode?: string | undefined;
68
68
  }, {
69
69
  code: string;
70
70
  op: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
71
- content?: string | undefined;
71
+ parentCode?: string | null | undefined;
72
72
  level?: "L0" | "L1" | "L2" | "L3" | undefined;
73
73
  title?: string | undefined;
74
- parentCode?: string | null | undefined;
74
+ content?: string | undefined;
75
+ newCode?: string | undefined;
75
76
  changeSummary?: string | undefined;
76
77
  affectedCriteria?: string[] | undefined;
77
- newCode?: string | undefined;
78
78
  }>, "many">;
79
79
  }, "strip", z.ZodTypeAny, {
80
80
  changes: {
81
81
  code: string;
82
82
  op: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
83
- content?: string | undefined;
83
+ parentCode?: string | null | undefined;
84
84
  level?: "L0" | "L1" | "L2" | "L3" | undefined;
85
85
  title?: string | undefined;
86
- parentCode?: string | null | undefined;
86
+ content?: string | undefined;
87
+ newCode?: string | undefined;
87
88
  changeSummary?: string | undefined;
88
89
  affectedCriteria?: string[] | undefined;
89
- newCode?: string | undefined;
90
90
  }[];
91
91
  name: string;
92
92
  created?: string | undefined;
@@ -95,13 +95,13 @@ export declare const DeltaSpecSchema: z.ZodObject<{
95
95
  changes: {
96
96
  code: string;
97
97
  op: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
98
- content?: string | undefined;
98
+ parentCode?: string | null | undefined;
99
99
  level?: "L0" | "L1" | "L2" | "L3" | undefined;
100
100
  title?: string | undefined;
101
- parentCode?: string | null | undefined;
101
+ content?: string | undefined;
102
+ newCode?: string | undefined;
102
103
  changeSummary?: string | undefined;
103
104
  affectedCriteria?: string[] | undefined;
104
- newCode?: string | undefined;
105
105
  }[];
106
106
  name: string;
107
107
  created?: string | undefined;
@@ -119,16 +119,16 @@ export declare const ProposalSchema: z.ZodObject<{
119
119
  name: string;
120
120
  why: string;
121
121
  scope: string;
122
- created?: string | undefined;
123
122
  affectedCriteria?: string[] | undefined;
123
+ created?: string | undefined;
124
124
  risk?: string | undefined;
125
125
  rollback?: string | undefined;
126
126
  }, {
127
127
  name: string;
128
128
  why: string;
129
129
  scope: string;
130
- created?: string | undefined;
131
130
  affectedCriteria?: string[] | undefined;
131
+ created?: string | undefined;
132
132
  risk?: string | undefined;
133
133
  rollback?: string | undefined;
134
134
  }>;
@@ -108,12 +108,12 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
108
108
  changeSummary: z.ZodOptional<z.ZodString>;
109
109
  }, "strip", z.ZodTypeAny, {
110
110
  project: number;
111
- status: "draft" | "confirmed" | "frozen" | "implemented" | "archived";
112
- topic: string;
113
111
  code: string;
112
+ status: "draft" | "confirmed" | "frozen" | "implemented" | "archived";
113
+ parentCode: string | null;
114
114
  level: "L0" | "L1" | "L2" | "L3";
115
115
  title: string;
116
- parentCode: string | null;
116
+ topic: string;
117
117
  aiSummary: string;
118
118
  coveredTasks: string[];
119
119
  relations: {
@@ -133,18 +133,18 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
133
133
  latencyMs?: number | undefined;
134
134
  reportedAt?: string | undefined;
135
135
  }[] | undefined;
136
+ changeSummary?: string | undefined;
137
+ created?: string | undefined;
136
138
  id?: string | undefined;
137
139
  milestone?: string | undefined;
138
- created?: string | undefined;
139
140
  updated?: string | undefined;
140
- changeSummary?: string | undefined;
141
141
  }, {
142
- status: "draft" | "confirmed" | "frozen" | "implemented" | "archived";
143
- topic: string;
144
142
  code: string;
143
+ status: "draft" | "confirmed" | "frozen" | "implemented" | "archived";
144
+ parentCode: string | null;
145
145
  level: "L0" | "L1" | "L2" | "L3";
146
146
  title: string;
147
- parentCode: string | null;
147
+ topic: string;
148
148
  project?: number | undefined;
149
149
  steps?: {
150
150
  stepNo: string | number;
@@ -159,6 +159,8 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
159
159
  latencyMs?: number | undefined;
160
160
  reportedAt?: string | undefined;
161
161
  }[] | undefined;
162
+ changeSummary?: string | undefined;
163
+ created?: string | undefined;
162
164
  id?: string | undefined;
163
165
  milestone?: string | undefined;
164
166
  aiSummary?: string | undefined;
@@ -167,9 +169,7 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
167
169
  type: "based_on" | "supersedes" | "implements" | "references";
168
170
  target: string;
169
171
  }[] | undefined;
170
- created?: string | undefined;
171
172
  updated?: string | undefined;
172
- changeSummary?: string | undefined;
173
173
  }>;
174
174
  export declare const PlanStepSchema: z.ZodObject<{
175
175
  stepNo: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -222,12 +222,12 @@ export declare const DecisionInputSchema: z.ZodObject<{
222
222
  }, "strip", z.ZodTypeAny, {
223
223
  topic: string;
224
224
  what: string;
225
- why?: string | undefined;
226
225
  affectedCriteria?: string[] | undefined;
226
+ why?: string | undefined;
227
227
  }, {
228
228
  topic: string;
229
229
  what: string;
230
- why?: string | undefined;
231
230
  affectedCriteria?: string[] | undefined;
231
+ why?: string | undefined;
232
232
  }>;
233
233
  //# sourceMappingURL=spec.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-manager",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "spec-manager: local-first spec-driven development platform. Pure markdown storage, no network, no MCP. Portable CLI + multi-agent instructions.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -44,6 +44,7 @@
44
44
  "delta-spec"
45
45
  ],
46
46
  "dependencies": {
47
+ "@inquirer/prompts": "^7.10.1",
47
48
  "commander": "^12.0.0",
48
49
  "gray-matter": "^4.0.3",
49
50
  "yaml": "^2.4.0",
@@ -14,7 +14,7 @@ applies_to: [L1_create, L2_create, L3_create]
14
14
 
15
15
  每次 `spec-manager spec update <code> --content` 写入后,**必须停下**,告知用户文件路径,等用户明确说"批准"/"已确认"/"继续"/"通过"等。
16
16
 
17
- **严禁一口气做**:`new L1 → update --content → confirm → new L2 → update → confirm → new L3 → freeze → task create → start`。
17
+ **严禁一口气做**:`new L1 → update --content → confirm → new L2 → update → confirm → new L3 → confirm → task create → start`。
18
18
 
19
19
  ## R2 — 状态推进是用户行为,不是 AI 行为
20
20
 
@@ -25,7 +25,7 @@ added: 0.1.0
25
25
  applies_to: [L1_confirm, L2_confirm, L3_confirm, L3_freeze, user_approve]
26
26
  ---
27
27
 
28
- `draft → confirmed` `confirmed → frozen` 都是用户审核意见的体现。AI agent **不能**在未获用户明确批准前主动调用 `spec-manager spec confirm` / `freeze`。
28
+ L1/L2 的 `draft → confirmed`、L3 的 `draft frozen`,以及历史 L3 的 `confirmed → frozen` 都是用户审核意见的体现。L3 一次明确批准后直接进入 frozen,不再要求对同一正文重复批准。AI agent **不能**在未获用户明确批准前主动调用 `spec-manager spec confirm` / `freeze`。
29
29
 
30
30
  **唯一例外**:`frozen → implemented` 由 `spec-manager task complete` 自动触发,允许 AI agent 执行。
31
31
 
@@ -60,6 +60,6 @@ applies_to: [L1_confirm, L2_confirm, L3_confirm]
60
60
 
61
61
  > 人工审计:本规则依赖人工判断,无法通过系统强制执行,实际执行由人工审核保障。
62
62
 
63
- L1 PRD 审核、L2 Design 审核、L3 Impl 审核是**三个独立的停止点**。不能因为 L1 批准了就连带假设 L2 也批准。
63
+ L1 PRD 审核、L2 Design 审核、L3 Impl 审核是**三个独立的停止点**。不能因为 L1 批准了就连带假设 L2 也批准;L3 自身只需一次明确批准,批准后直接 frozen。
64
64
 
65
65
  **人工审计说明**:本规则依赖人工判断,无法通过系统强制执行。hooks 作为辅助提醒,实际执行由人工审核保障。
package/skill/SKILL.md CHANGED
@@ -41,6 +41,17 @@ PRD → Design → Spec → Agent Task → 部署。**纯本地**,所有数据
41
41
  | L2 Design | 技术设计 | confirmed 才能进实施 |
42
42
  | L3 Impl | 实施规格 | ≤20 步,frozen 后建 Task |
43
43
 
44
+ ## Unified Rules
45
+
46
+ - Feature work MUST go through `spec-manager`.
47
+ - New or non-trivial work follows L1 -> L2 -> L3 -> Agent Task.
48
+ - Never write implementation code without a frozen L3 spec.
49
+ - L1/L2 approval advances `draft -> confirmed`; one explicit L3 approval (an explicit user approval) advances `draft -> frozen`.
50
+ - Before code edits, read the frozen L3 spec and create/start an Agent Task.
51
+ - planJson `coveredSpecs` MUST include the current L3 specCode.
52
+ - Validate L3 markdown plans with `spec-manager spec validate-plan --from-spec <L3-code>`.
53
+ - Record execution with `spec-manager task step`; finish with `spec-manager task complete`.
54
+
44
55
  ## 规则(24 条,按 applies_to 过滤)
45
56
 
46
57
  | 主题 | 规则 | 文件 |
@@ -55,8 +66,9 @@ PRD → Design → Spec → Agent Task → 部署。**纯本地**,所有数据
55
66
  ## Spec 状态流
56
67
 
57
68
  ```
58
- draft → confirmed → frozen → implemented
59
- AI agent 用户 用户 task_complete
69
+ L1/L2: draft → confirmed
70
+ L3: draft frozen → implemented
71
+ AI agent 用户 task_complete
60
72
  ```
61
73
 
62
74
  ## CLI 概要
@@ -40,9 +40,9 @@
40
40
  > ☑ **R13** / **R21** — `--ai-summary` ≤300 字符(CLI 截断,>300 自动 warn)
41
41
  > ☑ **R14** / **R22** — 流程规则,人工把关
42
42
  6. 🛑 **等用户审核**(R1)— 流程规则,停下等用户信号
43
- 7. 用户批准 → `spec-manager spec confirm <code>` 用户再批准 → `spec-manager spec freeze <code>`
43
+ 7. 用户一次批准 → `spec-manager spec confirm <code>`,L3 直接进入 `frozen`
44
44
  > ☑ **R2** / **R4** — 流程规则:状态由用户推进,每层独立审核
45
- > CLI `confirm`/`freeze` 之前会校验 R22(contentTemplate 非空)
45
+ > CLI 在批准进入 `frozen` 之前会校验 R22(contentTemplate 非空)
46
46
 
47
47
  ### Agent Task 执行
48
48
 
@@ -13,7 +13,7 @@ Expert guidelines:
13
13
  - 每步实施必须精确到函数/方法级别,禁止"修改相关代码"等模糊表述
14
14
  - planJson 字段名必须从 templates/agent-plan.json 读取,禁止凭记忆(R12/INC-005)
15
15
  - step_report 每步必须携带 outputJson(R15),格式见下方模板
16
- - coveredSpecs: 若本 Task 实际覆盖多条 L3,必须在 planJson 中声明
16
+ - coveredSpecs: 必须包含当前 L3 specCode;若本 Task 实际覆盖多条 L3,列出所有 specCode
17
17
  - 验证命令必须可直接粘贴执行,含预期输出的精确匹配串
18
18
  - 回滚方案不是可选项,每个 L3 必须说明"改坏了怎么恢复"
19
19
  - 写 L3 前必须执行 Level 3 文件级分析(R23,见 rules/codebase-survey.md)
@@ -95,7 +95,7 @@ Expert guidelines:
95
95
 
96
96
  ```json
97
97
  {
98
- "coveredSpecs": ["<若覆盖多条 L3,列出所有 specCode;单条则省略此字段>"],
98
+ "coveredSpecs": ["<本 L3 specCode>"],
99
99
  "steps": [
100
100
  {"stepNo": 1, "stepType": "mcp_tool", "name": "上下文收集: spec-manager spec show(L3 + 父 L2)"},
101
101
  {"stepNo": 2, "stepType": "mcp_tool", "name": "<动词+宾语+文件>"},
@@ -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