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.
- package/AGENTS.md +1 -1
- package/README.md +94 -28
- package/dist/cli/change.d.ts.map +1 -1
- package/dist/cli/change.js +93 -4
- package/dist/cli/change.js.map +1 -1
- package/dist/cli/completion.d.ts +3 -0
- package/dist/cli/completion.d.ts.map +1 -0
- package/dist/cli/completion.js +30 -0
- package/dist/cli/completion.js.map +1 -0
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/project.d.ts.map +1 -1
- package/dist/cli/project.js +71 -7
- package/dist/cli/project.js.map +1 -1
- package/dist/cli/spec.d.ts.map +1 -1
- package/dist/cli/spec.js +42 -14
- package/dist/cli/spec.js.map +1 -1
- package/dist/cli/task.d.ts.map +1 -1
- package/dist/cli/task.js +150 -42
- package/dist/cli/task.js.map +1 -1
- package/dist/cli/usability.d.ts.map +1 -1
- package/dist/cli/usability.js +32 -8
- package/dist/cli/usability.js.map +1 -1
- package/dist/cli/view.d.ts +3 -0
- package/dist/cli/view.d.ts.map +1 -0
- package/dist/cli/view.js +122 -0
- package/dist/cli/view.js.map +1 -0
- package/dist/core/agents.d.ts +23 -1
- package/dist/core/agents.d.ts.map +1 -1
- package/dist/core/agents.js +82 -2
- package/dist/core/agents.js.map +1 -1
- package/dist/core/archive.d.ts.map +1 -1
- package/dist/core/archive.js +74 -2
- package/dist/core/archive.js.map +1 -1
- package/dist/core/audit.d.ts +1 -0
- package/dist/core/audit.d.ts.map +1 -1
- package/dist/core/audit.js +60 -40
- package/dist/core/audit.js.map +1 -1
- package/dist/core/completion.d.ts +12 -0
- package/dist/core/completion.d.ts.map +1 -0
- package/dist/core/completion.js +136 -0
- package/dist/core/completion.js.map +1 -0
- package/dist/core/delta.d.ts +30 -1
- package/dist/core/delta.d.ts.map +1 -1
- package/dist/core/delta.js +141 -4
- package/dist/core/delta.js.map +1 -1
- package/dist/core/harness.d.ts +69 -0
- package/dist/core/harness.d.ts.map +1 -0
- package/dist/core/harness.js +278 -0
- package/dist/core/harness.js.map +1 -0
- package/dist/core/integrity-exemptions.d.ts +29 -0
- package/dist/core/integrity-exemptions.d.ts.map +1 -0
- package/dist/core/integrity-exemptions.js +100 -0
- package/dist/core/integrity-exemptions.js.map +1 -0
- package/dist/core/integrity.d.ts +12 -0
- package/dist/core/integrity.d.ts.map +1 -0
- package/dist/core/integrity.js +163 -0
- package/dist/core/integrity.js.map +1 -0
- package/dist/core/invariants.d.ts +5 -0
- package/dist/core/invariants.d.ts.map +1 -0
- package/dist/core/invariants.js +19 -0
- package/dist/core/invariants.js.map +1 -0
- package/dist/core/lifecycle.d.ts +37 -0
- package/dist/core/lifecycle.d.ts.map +1 -0
- package/dist/core/lifecycle.js +70 -0
- package/dist/core/lifecycle.js.map +1 -0
- package/dist/core/paths.d.ts +3 -0
- package/dist/core/paths.d.ts.map +1 -1
- package/dist/core/paths.js +19 -1
- package/dist/core/paths.js.map +1 -1
- package/dist/core/placeholder.d.ts +6 -0
- package/dist/core/placeholder.d.ts.map +1 -0
- package/dist/core/placeholder.js +12 -0
- package/dist/core/placeholder.js.map +1 -0
- package/dist/core/reconciliation.d.ts +25 -0
- package/dist/core/reconciliation.d.ts.map +1 -0
- package/dist/core/reconciliation.js +122 -0
- package/dist/core/reconciliation.js.map +1 -0
- package/dist/core/remediation.d.ts +41 -0
- package/dist/core/remediation.d.ts.map +1 -0
- package/dist/core/remediation.js +169 -0
- package/dist/core/remediation.js.map +1 -0
- package/dist/core/spec-io.d.ts +3 -5
- package/dist/core/spec-io.d.ts.map +1 -1
- package/dist/core/spec-io.js +26 -13
- package/dist/core/spec-io.js.map +1 -1
- package/dist/core/status.d.ts +6 -3
- package/dist/core/status.d.ts.map +1 -1
- package/dist/core/status.js +12 -4
- package/dist/core/status.js.map +1 -1
- package/dist/core/task.d.ts +26 -0
- package/dist/core/task.d.ts.map +1 -1
- package/dist/core/task.js +74 -46
- package/dist/core/task.js.map +1 -1
- package/dist/core/transaction.d.ts +10 -0
- package/dist/core/transaction.d.ts.map +1 -0
- package/dist/core/transaction.js +65 -0
- package/dist/core/transaction.js.map +1 -0
- package/dist/core/usability.d.ts +8 -2
- package/dist/core/usability.d.ts.map +1 -1
- package/dist/core/usability.js +203 -35
- package/dist/core/usability.js.map +1 -1
- package/dist/core/validate.d.ts +2 -0
- package/dist/core/validate.d.ts.map +1 -1
- package/dist/core/validate.js +29 -1
- package/dist/core/validate.js.map +1 -1
- package/dist/core/view.d.ts +35 -0
- package/dist/core/view.d.ts.map +1 -0
- package/dist/core/view.js +50 -0
- package/dist/core/view.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/change.d.ts +20 -20
- package/dist/schemas/spec.d.ts +12 -12
- package/package.json +2 -1
- package/rules/flow-control.md +3 -3
- package/skill/SKILL.md +14 -2
- package/skill/subskills/impl.md +2 -2
- package/templates/L3-impl.md +2 -2
- package/templates/agent-plan.json +2 -1
- package/templates/agents/AGENTS.md +8 -6
- package/templates/agents/CLAUDE.md +7 -3
- package/templates/agents/CODEBUDDY.md +9 -7
- package/templates/agents/CURSOR.md +28 -0
- package/templates/agents/WINDSURF.md +28 -0
- package/templates/agents/codebuddy-skill/SKILL.md +12 -1
package/dist/schemas/change.d.ts
CHANGED
|
@@ -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
|
-
|
|
26
|
+
parentCode?: string | null | undefined;
|
|
27
27
|
level?: "L0" | "L1" | "L2" | "L3" | undefined;
|
|
28
28
|
title?: string | undefined;
|
|
29
|
-
|
|
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
|
-
|
|
36
|
+
parentCode?: string | null | undefined;
|
|
37
37
|
level?: "L0" | "L1" | "L2" | "L3" | undefined;
|
|
38
38
|
title?: string | undefined;
|
|
39
|
-
|
|
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
|
-
|
|
61
|
+
parentCode?: string | null | undefined;
|
|
62
62
|
level?: "L0" | "L1" | "L2" | "L3" | undefined;
|
|
63
63
|
title?: string | undefined;
|
|
64
|
-
|
|
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
|
-
|
|
71
|
+
parentCode?: string | null | undefined;
|
|
72
72
|
level?: "L0" | "L1" | "L2" | "L3" | undefined;
|
|
73
73
|
title?: string | undefined;
|
|
74
|
-
|
|
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
|
-
|
|
83
|
+
parentCode?: string | null | undefined;
|
|
84
84
|
level?: "L0" | "L1" | "L2" | "L3" | undefined;
|
|
85
85
|
title?: string | undefined;
|
|
86
|
-
|
|
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
|
-
|
|
98
|
+
parentCode?: string | null | undefined;
|
|
99
99
|
level?: "L0" | "L1" | "L2" | "L3" | undefined;
|
|
100
100
|
title?: string | undefined;
|
|
101
|
-
|
|
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
|
}>;
|
package/dist/schemas/spec.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
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",
|
package/rules/flow-control.md
CHANGED
|
@@ -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 →
|
|
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`
|
|
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
|
|
59
|
-
|
|
69
|
+
L1/L2: draft → confirmed
|
|
70
|
+
L3: draft → frozen → implemented
|
|
71
|
+
AI agent 用户 task_complete
|
|
60
72
|
```
|
|
61
73
|
|
|
62
74
|
## CLI 概要
|
package/skill/subskills/impl.md
CHANGED
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
> ☑ **R13** / **R21** — `--ai-summary` ≤300 字符(CLI 截断,>300 自动 warn)
|
|
41
41
|
> ☑ **R14** / **R22** — 流程规则,人工把关
|
|
42
42
|
6. 🛑 **等用户审核**(R1)— 流程规则,停下等用户信号
|
|
43
|
-
7.
|
|
43
|
+
7. 用户一次批准 → `spec-manager spec confirm <code>`,L3 直接进入 `frozen`
|
|
44
44
|
> ☑ **R2** / **R4** — 流程规则:状态由用户推进,每层独立审核
|
|
45
|
-
> CLI
|
|
45
|
+
> CLI 在批准进入 `frozen` 之前会校验 R22(contentTemplate 非空)
|
|
46
46
|
|
|
47
47
|
### Agent Task 执行
|
|
48
48
|
|
package/templates/L3-impl.md
CHANGED
|
@@ -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:
|
|
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": ["
|
|
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": ["
|
|
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
|
-
##
|
|
7
|
+
## Unified Rules
|
|
8
8
|
|
|
9
|
-
- Feature work MUST go through `spec-manager
|
|
10
|
-
- New or non-trivial work follows L1
|
|
11
|
-
- Never write implementation code
|
|
12
|
-
-
|
|
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
|
|
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
|
-
-
|
|
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
|
-
-
|
|
8
|
-
-
|
|
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
|
|
8
|
-
- New or non-trivial work follows L1
|
|
9
|
-
- Never write implementation code
|
|
10
|
-
-
|
|
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
|
|
13
|
-
-
|
|
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
|
|
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
|
|