@captain_z/zsk 1.2.1 → 1.4.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/README.md +25 -8
- package/dist/bin.js +57 -16
- package/dist/bin.js.map +1 -1
- package/dist/commands/add-flow.d.ts +6 -1
- package/dist/commands/add-flow.js +30 -5
- package/dist/commands/add-flow.js.map +1 -1
- package/dist/commands/add.js +19 -19
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/check.js +6 -3
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.d.ts +1 -0
- package/dist/commands/config.js +23 -0
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/issue.d.ts +12 -0
- package/dist/commands/issue.js +92 -0
- package/dist/commands/issue.js.map +1 -0
- package/dist/commands/module.d.ts +8 -0
- package/dist/commands/module.js +40 -0
- package/dist/commands/module.js.map +1 -0
- package/dist/commands/prep.js +13 -2
- package/dist/commands/prep.js.map +1 -1
- package/dist/commands/project-init.js +6 -6
- package/dist/commands/project-init.js.map +1 -1
- package/dist/core/config.d.ts +19 -3
- package/dist/core/config.js +63 -16
- package/dist/core/config.js.map +1 -1
- package/dist/core/raw-manifest.d.ts +11 -3
- package/dist/core/raw-manifest.js +16 -8
- package/dist/core/raw-manifest.js.map +1 -1
- package/dist/core/scaffolder.d.ts +1 -0
- package/dist/core/scaffolder.js +13 -6
- package/dist/core/scaffolder.js.map +1 -1
- package/dist/ui/prompts.d.ts +1 -0
- package/dist/ui/prompts.js +188 -1
- package/dist/ui/prompts.js.map +1 -1
- package/package.json +4 -3
- package/{templates/project-init/.zsk/schemas → schemas}/module.schema.json +36 -25
- package/{templates/project-init/.zsk/schemas → schemas}/zsk-config.schema.json +185 -37
- package/templates/{project-init/.issues/_templates → issue/default}/issue.md +5 -5
- package/templates/module/frontend-module/design.md +6 -0
- package/templates/module/frontend-module/module.yaml +26 -0
- package/templates/module/frontend-module/spec.md +6 -0
- package/templates/module/frontend-module/tasks.md +6 -0
- package/templates/module/frontend-module/verification.md +6 -0
- package/templates/project-init/.issues/README.md +6 -7
- package/templates/project-init/.raws/README.md +11 -34
- package/templates/project-init/.zsk/config.yaml +22 -0
- package/templates/project-init/{SYSTEM-SPEC.md → docs/SYSTEM-SPEC.md} +16 -18
- package/templates/project-init/.raws/FIGMA-INDEX.md +0 -38
- package/templates/project-init/.raws/SRS.md +0 -73
- package/templates/project-init/.raws/api-contracts/README.md +0 -13
- package/templates/project-init/.raws/design-assets/README.md +0 -16
- package/templates/project-init/.raws/testing/README.md +0 -10
- package/templates/project-init/CLAUDE.md +0 -45
- package/templates/project-init/docs/_module-template/module.yaml +0 -32
- package/templates/project-init/docs/system/README.md +0 -12
- package/templates/project-init/project-config.md +0 -296
- package/templates/project-init/zsk.config.yaml +0 -50
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://zsk.
|
|
3
|
+
"$id": "https://unpkg.com/@captain_z/zsk@1.3.0/schemas/zsk-config.schema.json",
|
|
4
4
|
"title": "ZSK Project Config",
|
|
5
|
-
"description": "Project-level configuration for ZSK resource
|
|
5
|
+
"description": "Project-level configuration for ZSK resource origins, workspace paths, tools, and module index locations.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["project", "paths", "sources", "tools", "modules"],
|
|
@@ -49,29 +49,12 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"sources": {
|
|
52
|
-
"description": "Project-level
|
|
52
|
+
"description": "Project-level resource origins. May be empty after init and filled by AI or zsk config setup.",
|
|
53
53
|
"type": "object",
|
|
54
|
-
"additionalProperties":
|
|
55
|
-
|
|
54
|
+
"additionalProperties": {
|
|
55
|
+
"$ref": "#/$defs/sourceRef"
|
|
56
|
+
},
|
|
56
57
|
"properties": {
|
|
57
|
-
"srs": {
|
|
58
|
-
"$ref": "#/$defs/sourceRef"
|
|
59
|
-
},
|
|
60
|
-
"figma_index": {
|
|
61
|
-
"$ref": "#/$defs/sourceRef"
|
|
62
|
-
},
|
|
63
|
-
"api_contracts": {
|
|
64
|
-
"$ref": "#/$defs/sourceRef"
|
|
65
|
-
},
|
|
66
|
-
"testing": {
|
|
67
|
-
"$ref": "#/$defs/sourceRef"
|
|
68
|
-
},
|
|
69
|
-
"design_assets": {
|
|
70
|
-
"$ref": "#/$defs/sourceRef"
|
|
71
|
-
},
|
|
72
|
-
"vendor_docs": {
|
|
73
|
-
"$ref": "#/$defs/sourceRef"
|
|
74
|
-
},
|
|
75
58
|
"metadata": {
|
|
76
59
|
"$ref": "#/$defs/metadata"
|
|
77
60
|
}
|
|
@@ -143,28 +126,81 @@
|
|
|
143
126
|
"type": "string",
|
|
144
127
|
"enum": ["computer_use", "browser_use", "figma_mcp", "script", "manual", "skill"]
|
|
145
128
|
},
|
|
129
|
+
"sourceType": {
|
|
130
|
+
"description": "Resource role.",
|
|
131
|
+
"type": "string",
|
|
132
|
+
"enum": ["srs", "prd", "design", "api_contract", "test_case", "design_asset", "vendor_doc", "manual"]
|
|
133
|
+
},
|
|
146
134
|
"sourceRef": {
|
|
147
135
|
"description": "Resource source reference.",
|
|
136
|
+
"type": "object",
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": ["type", "origin"],
|
|
139
|
+
"properties": {
|
|
140
|
+
"type": {
|
|
141
|
+
"$ref": "#/$defs/sourceType"
|
|
142
|
+
},
|
|
143
|
+
"origin": {
|
|
144
|
+
"$ref": "#/$defs/originRef"
|
|
145
|
+
},
|
|
146
|
+
"snapshot": {
|
|
147
|
+
"$ref": "#/$defs/pathRef"
|
|
148
|
+
},
|
|
149
|
+
"metadata": {
|
|
150
|
+
"$ref": "#/$defs/metadata"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"originRef": {
|
|
155
|
+
"description": "Online or local source origin.",
|
|
148
156
|
"oneOf": [
|
|
149
157
|
{
|
|
150
|
-
"$ref": "#/$defs/
|
|
158
|
+
"$ref": "#/$defs/urlOrigin"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"$ref": "#/$defs/localOrigin"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"$ref": "#/$defs/gitOrigin"
|
|
151
165
|
},
|
|
152
166
|
{
|
|
153
|
-
"$ref": "#/$defs/
|
|
167
|
+
"$ref": "#/$defs/figmaOrigin"
|
|
154
168
|
},
|
|
155
169
|
{
|
|
156
|
-
"$ref": "#/$defs/
|
|
170
|
+
"$ref": "#/$defs/modaoOrigin"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"$ref": "#/$defs/openapiOrigin"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"$ref": "#/$defs/manualOrigin"
|
|
157
177
|
}
|
|
158
178
|
]
|
|
159
179
|
},
|
|
160
|
-
"
|
|
161
|
-
"
|
|
180
|
+
"urlOrigin": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"additionalProperties": false,
|
|
183
|
+
"required": ["kind", "url"],
|
|
184
|
+
"properties": {
|
|
185
|
+
"kind": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"const": "url"
|
|
188
|
+
},
|
|
189
|
+
"url": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"minLength": 1
|
|
192
|
+
},
|
|
193
|
+
"metadata": {
|
|
194
|
+
"$ref": "#/$defs/metadata"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"localOrigin": {
|
|
162
199
|
"type": "object",
|
|
163
200
|
"additionalProperties": false,
|
|
164
201
|
"required": ["kind", "path"],
|
|
165
202
|
"properties": {
|
|
166
203
|
"kind": {
|
|
167
|
-
"description": "Local source kind.",
|
|
168
204
|
"type": "string",
|
|
169
205
|
"const": "local"
|
|
170
206
|
},
|
|
@@ -176,19 +212,133 @@
|
|
|
176
212
|
}
|
|
177
213
|
}
|
|
178
214
|
},
|
|
179
|
-
"
|
|
215
|
+
"gitOrigin": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"additionalProperties": false,
|
|
218
|
+
"required": ["kind", "repository"],
|
|
219
|
+
"properties": {
|
|
220
|
+
"kind": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"const": "git"
|
|
223
|
+
},
|
|
224
|
+
"repository": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"minLength": 1
|
|
227
|
+
},
|
|
228
|
+
"ref": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"minLength": 1
|
|
231
|
+
},
|
|
232
|
+
"path": {
|
|
233
|
+
"$ref": "#/$defs/pathRef"
|
|
234
|
+
},
|
|
235
|
+
"metadata": {
|
|
236
|
+
"$ref": "#/$defs/metadata"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"figmaOrigin": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"additionalProperties": false,
|
|
243
|
+
"required": ["kind", "url"],
|
|
244
|
+
"properties": {
|
|
245
|
+
"kind": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"const": "figma"
|
|
248
|
+
},
|
|
249
|
+
"url": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"minLength": 1
|
|
252
|
+
},
|
|
253
|
+
"file_key": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"minLength": 1
|
|
256
|
+
},
|
|
257
|
+
"node_id": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"minLength": 1
|
|
260
|
+
},
|
|
261
|
+
"metadata": {
|
|
262
|
+
"$ref": "#/$defs/metadata"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"modaoOrigin": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"required": ["kind", "url"],
|
|
270
|
+
"properties": {
|
|
271
|
+
"kind": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"const": "modao"
|
|
274
|
+
},
|
|
275
|
+
"url": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"minLength": 1
|
|
278
|
+
},
|
|
279
|
+
"metadata": {
|
|
280
|
+
"$ref": "#/$defs/metadata"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"openapiOrigin": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"additionalProperties": false,
|
|
287
|
+
"required": ["kind"],
|
|
288
|
+
"properties": {
|
|
289
|
+
"kind": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"const": "openapi"
|
|
292
|
+
},
|
|
293
|
+
"url": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"minLength": 1
|
|
296
|
+
},
|
|
297
|
+
"path": {
|
|
298
|
+
"$ref": "#/$defs/pathRef"
|
|
299
|
+
},
|
|
300
|
+
"metadata": {
|
|
301
|
+
"$ref": "#/$defs/metadata"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"anyOf": [
|
|
305
|
+
{
|
|
306
|
+
"required": ["url"]
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"required": ["path"]
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"manualOrigin": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"additionalProperties": false,
|
|
316
|
+
"required": ["kind", "note"],
|
|
317
|
+
"properties": {
|
|
318
|
+
"kind": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"const": "manual"
|
|
321
|
+
},
|
|
322
|
+
"note": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"minLength": 1
|
|
325
|
+
},
|
|
326
|
+
"metadata": {
|
|
327
|
+
"$ref": "#/$defs/metadata"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"scriptSync": {
|
|
180
332
|
"description": "Resource produced by a deterministic script command.",
|
|
181
333
|
"type": "object",
|
|
182
334
|
"additionalProperties": false,
|
|
183
335
|
"required": ["kind", "command", "output"],
|
|
184
336
|
"properties": {
|
|
185
337
|
"kind": {
|
|
186
|
-
"description": "Script source kind.",
|
|
187
338
|
"type": "string",
|
|
188
339
|
"const": "script"
|
|
189
340
|
},
|
|
190
341
|
"command": {
|
|
191
|
-
"description": "Command that syncs this resource.",
|
|
192
342
|
"type": "string",
|
|
193
343
|
"minLength": 1
|
|
194
344
|
},
|
|
@@ -200,19 +350,17 @@
|
|
|
200
350
|
}
|
|
201
351
|
}
|
|
202
352
|
},
|
|
203
|
-
"
|
|
353
|
+
"skillSync": {
|
|
204
354
|
"description": "Resource produced by an AI skill or tool-assisted workflow.",
|
|
205
355
|
"type": "object",
|
|
206
356
|
"additionalProperties": false,
|
|
207
357
|
"required": ["kind", "skill", "output"],
|
|
208
358
|
"properties": {
|
|
209
359
|
"kind": {
|
|
210
|
-
"description": "Skill source kind.",
|
|
211
360
|
"type": "string",
|
|
212
361
|
"const": "skill"
|
|
213
362
|
},
|
|
214
363
|
"skill": {
|
|
215
|
-
"description": "Skill used to obtain the resource.",
|
|
216
364
|
"type": "string",
|
|
217
365
|
"minLength": 1
|
|
218
366
|
},
|
|
@@ -228,10 +376,10 @@
|
|
|
228
376
|
"description": "Optional sync entry for a resource provider.",
|
|
229
377
|
"oneOf": [
|
|
230
378
|
{
|
|
231
|
-
"$ref": "#/$defs/
|
|
379
|
+
"$ref": "#/$defs/scriptSync"
|
|
232
380
|
},
|
|
233
381
|
{
|
|
234
|
-
"$ref": "#/$defs/
|
|
382
|
+
"$ref": "#/$defs/skillSync"
|
|
235
383
|
}
|
|
236
384
|
]
|
|
237
385
|
},
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# __ISSUE_ID__-__ISSUE_SLUG__
|
|
2
2
|
|
|
3
3
|
## Priority
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
__SEVERITY__
|
|
6
6
|
|
|
7
7
|
## Module
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`__MODULE_ID__`
|
|
10
10
|
|
|
11
11
|
## Environment
|
|
12
12
|
|
|
13
|
-
- Date:
|
|
13
|
+
- Date: __DATE__
|
|
14
14
|
- Branch:
|
|
15
15
|
- URL:
|
|
16
16
|
- Command:
|
|
@@ -19,7 +19,7 @@ P1
|
|
|
19
19
|
|
|
20
20
|
## Reproduction Steps
|
|
21
21
|
|
|
22
|
-
1.
|
|
22
|
+
1.
|
|
23
23
|
|
|
24
24
|
## Actual Result
|
|
25
25
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://unpkg.com/@captain_z/zsk@1.3.0/schemas/module.schema.json
|
|
2
|
+
|
|
3
|
+
module:
|
|
4
|
+
id: __MODULE_ID__
|
|
5
|
+
name: __MODULE_NAME__
|
|
6
|
+
|
|
7
|
+
sources: {}
|
|
8
|
+
|
|
9
|
+
runtime:
|
|
10
|
+
url: http://localhost:3000
|
|
11
|
+
tools:
|
|
12
|
+
- computer_use
|
|
13
|
+
- browser_use
|
|
14
|
+
|
|
15
|
+
tests:
|
|
16
|
+
raw_cases: []
|
|
17
|
+
derived_cases: []
|
|
18
|
+
automated:
|
|
19
|
+
unit: []
|
|
20
|
+
integration: []
|
|
21
|
+
e2e: []
|
|
22
|
+
tdd_required: true
|
|
23
|
+
|
|
24
|
+
outputs:
|
|
25
|
+
docs: __DOCS_OUTPUT__
|
|
26
|
+
issues: __ISSUES_OUTPUT__
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Issue Store
|
|
2
2
|
|
|
3
|
-
`.issues
|
|
3
|
+
This is the default issue root configured by `.zsk/config.yaml` `paths.issues`. It stores review findings, bug reports, screenshots, logs, reproduction evidence, and verification records created during project work.
|
|
4
4
|
|
|
5
5
|
## Layout
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
|
-
.issues/
|
|
9
|
-
├── README.md
|
|
10
|
-
├── _templates/
|
|
11
|
-
│ └── issue.md
|
|
8
|
+
{paths.issues}/
|
|
12
9
|
└── {module}/
|
|
13
10
|
└── BUG-0001-short-slug/
|
|
14
11
|
├── issue.md
|
|
@@ -18,9 +15,11 @@
|
|
|
18
15
|
|
|
19
16
|
## Rules
|
|
20
17
|
|
|
18
|
+
- Create issue folders with `zsk issue create -m <module-id>` when possible.
|
|
21
19
|
- Keep one confirmed bug per `BUG-xxxx-short-slug/` directory.
|
|
22
20
|
- Group related bugs under the same module directory.
|
|
23
21
|
- Put bug-specific screenshots and runtime evidence under that bug's `assets/`.
|
|
24
22
|
- Put bug-specific console logs, test output, and investigation logs under that bug's `debug-logs/`.
|
|
25
23
|
- Do not place runtime screenshots, debug logs, or failed verification artifacts under `docs/`.
|
|
26
|
-
- Do not place local verification artifacts under
|
|
24
|
+
- Do not place local verification artifacts under the configured raw snapshot root.
|
|
25
|
+
- Skills must resolve this path from `.zsk/config.yaml`; they must not hard-code `.issues`.
|
|
@@ -1,40 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Raw Snapshots
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This directory is the default local snapshot root configured by `.zsk/config.yaml` `paths.raws`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Do not treat this directory as the source-origin configuration. SRS, PRD, Figma, Modao, API contracts, test cases, and design assets can come from online URLs, remote repositories, or local files. Their origins belong in `.zsk/config.yaml`.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| `SRS.md` | 原始需求文档(Software Requirements Spec) | `zsk.config.yaml#sources.srs.path` |
|
|
10
|
-
| `FIGMA-INDEX.md` | 模块 → Figma URL / node-id 索引 | `zsk.config.yaml#sources.figma_index.path` |
|
|
11
|
-
| `api-contracts/` | 后端 API 契约(OpenAPI / GraphQL schema) | `zsk.config.yaml#sources.api_contracts.path` |
|
|
12
|
-
| `design-assets/{module}/{snapshot}/` | Figma 快照(由 `zsk:ue-mcp` 产出) | `zsk.config.yaml#sources.design_assets.path` |
|
|
13
|
-
| `testing/` | 原始测试用例、验收用例、提测测试包 | `docs/{module}/module.yaml` 的 `tests.raw_cases` |
|
|
14
|
-
| `manifest.json` | 资源同步清单,由 `zsk prep` / `zsk sync` 维护 | N/A |
|
|
7
|
+
## Expected Contents
|
|
15
8
|
|
|
16
|
-
|
|
9
|
+
- `manifest.json`: maintained by `zsk prep` / `zsk sync`.
|
|
10
|
+
- Source snapshots created only when a configured resource is synced or materialized.
|
|
17
11
|
|
|
18
|
-
|
|
12
|
+
## Rules
|
|
19
13
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
path: .raws/SRS.md
|
|
25
|
-
testing:
|
|
26
|
-
path: .raws/testing
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Git 状态建议
|
|
30
|
-
|
|
31
|
-
- `SRS.md` / `FIGMA-INDEX.md`:**入库**(团队共享)
|
|
32
|
-
- `design-assets/{module}/{snapshot}/raw/`:可选 `.gitignore`(体积大或含敏感信息)
|
|
33
|
-
- 含敏感数据的文件:在本目录加 `.gitignore` 排除
|
|
34
|
-
|
|
35
|
-
## 原则
|
|
36
|
-
|
|
37
|
-
- **源文件不被 LLM 随意改写**:变更走人工/流程
|
|
38
|
-
- **变更即新 snapshot**:Figma 更新→新 snapshot 目录,不覆盖历史
|
|
39
|
-
- **编号锚稳定**:SRS 中的 `FR-001` / `US-001` / `AC-001` 一旦发布不改(仅废弃,合并/拆分留追踪)
|
|
40
|
-
- **测试用例是一等资产**:原始测试用例保存在 `.raws/testing/`,派生测试矩阵和自动化映射写入 `docs/{module}/`
|
|
14
|
+
- Preserve upstream wording. Do not rewrite snapshots to resolve conflicts.
|
|
15
|
+
- Prefer new snapshots over overwriting historical design/API captures.
|
|
16
|
+
- Keep runtime screenshots, debug logs, HAR files, and failed verification evidence out of this directory.
|
|
17
|
+
- Skills must resolve this path from `.zsk/config.yaml`; they must not hard-code `.raws`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://unpkg.com/@captain_z/zsk@1.3.0/schemas/zsk-config.schema.json
|
|
2
|
+
|
|
3
|
+
project:
|
|
4
|
+
name: "<project-name>"
|
|
5
|
+
|
|
6
|
+
paths:
|
|
7
|
+
raws: .raws
|
|
8
|
+
docs: docs
|
|
9
|
+
issues: .issues
|
|
10
|
+
|
|
11
|
+
sources: {}
|
|
12
|
+
|
|
13
|
+
tools:
|
|
14
|
+
runtime_ui:
|
|
15
|
+
- computer_use
|
|
16
|
+
- browser_use
|
|
17
|
+
design:
|
|
18
|
+
- figma_mcp
|
|
19
|
+
|
|
20
|
+
modules:
|
|
21
|
+
index: docs/_module-index.md
|
|
22
|
+
root: docs
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
# System Spec
|
|
2
2
|
|
|
3
|
-
This file defines project-level behavior rules for humans and AI agents. Keep stable constraints here, and keep machine-readable paths in
|
|
3
|
+
This file defines project-level behavior rules for humans and AI agents. Keep stable constraints here, and keep machine-readable paths and source origins in `.zsk/config.yaml`.
|
|
4
4
|
|
|
5
5
|
## Source Priority
|
|
6
6
|
|
|
7
7
|
When sources conflict, use this priority order until the project overrides it:
|
|
8
8
|
|
|
9
|
-
1. `SYSTEM-SPEC.md`
|
|
10
|
-
2.
|
|
11
|
-
3. `.
|
|
12
|
-
4.
|
|
13
|
-
5.
|
|
14
|
-
6.
|
|
15
|
-
7. `docs/{module}/spec.md`
|
|
16
|
-
8. `docs/{module}/design.md`
|
|
9
|
+
1. `docs/SYSTEM-SPEC.md`
|
|
10
|
+
2. `.zsk/config.yaml`
|
|
11
|
+
3. Project sources listed in `.zsk/config.yaml`
|
|
12
|
+
4. Module sources listed in `docs/{module}/module.yaml`
|
|
13
|
+
5. `docs/{module}/spec.md`
|
|
14
|
+
6. `docs/{module}/design.md`
|
|
17
15
|
|
|
18
|
-
If two upstream
|
|
16
|
+
If two upstream sources conflict, do not silently choose one. Record the conflict under the configured issue root, then ask for confirmation before changing accepted specs or designs.
|
|
19
17
|
|
|
20
|
-
##
|
|
18
|
+
## Store Policy
|
|
21
19
|
|
|
22
|
-
-
|
|
23
|
-
- `docs
|
|
24
|
-
-
|
|
25
|
-
- Runtime screenshots, debug logs, HAR files, and failed verification artifacts must not be stored under
|
|
20
|
+
- `paths.raws` stores local snapshots of upstream facts only.
|
|
21
|
+
- `paths.docs` stores digested module knowledge, decisions, tasks, and verification.
|
|
22
|
+
- `paths.issues` stores defects, local verification evidence, screenshots, logs, and retest records.
|
|
23
|
+
- Runtime screenshots, debug logs, HAR files, and failed verification artifacts must not be stored under the docs root.
|
|
26
24
|
|
|
27
25
|
## Testing Policy
|
|
28
26
|
|
|
29
27
|
Test cases are first-class project assets.
|
|
30
28
|
|
|
31
|
-
- Original QA, acceptance, release, and manually supplied test cases belong under `.
|
|
32
|
-
- Module-derived test cases belong under
|
|
33
|
-
- AI coding must be TDD-driven from
|
|
29
|
+
- Original QA, acceptance, release, and manually supplied test cases belong in configured project sources and may be snapshotted under `paths.raws`.
|
|
30
|
+
- Module-derived test cases belong under each module's configured docs output.
|
|
31
|
+
- AI coding must be TDD-driven from raw and module-derived test cases.
|
|
34
32
|
- A task is not done until the relevant test case is covered by automated tests or recorded as runtime/manual verification evidence.
|
|
35
33
|
|
|
36
34
|
## Documentation Feedback Policy
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Figma Index
|
|
3
|
-
project: <fill-me>
|
|
4
|
-
last_updated: <YYYY-MM-DD>
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Figma Index — <项目名>
|
|
8
|
-
|
|
9
|
-
> **角色**:模块 → Figma URL / node-id 的权威索引。zsk skill 通过 `{{config.paths.figma_index}}` 引用。
|
|
10
|
-
> **配合 skill**:`zsk:ue-mcp`(结构化快照)、`zsk:figma-to-code`(7 步工作流)。
|
|
11
|
-
> **更新时机**:模块首次接入 Figma 设计时登记;设计大改时追加新 snapshot 行。
|
|
12
|
-
|
|
13
|
-
## 1. 模块索引
|
|
14
|
-
|
|
15
|
-
| 模块 ID | Figma URL | Node ID | 页面 / Frame | 最后确认 | 快照路径 |
|
|
16
|
-
| --- | --- | --- | --- | --- | --- |
|
|
17
|
-
| <module-a> | https://www.figma.com/file/... | <int:int> | <Page / Frame> | <YYYY-MM-DD> | `.raws/design-assets/module-a/<snapshot>/` |
|
|
18
|
-
|
|
19
|
-
## 2. 工作流
|
|
20
|
-
|
|
21
|
-
1. 模块接入 Figma 时:登记本表一行
|
|
22
|
-
2. 走 `zsk:ue-mcp` skill:
|
|
23
|
-
- 创建 `.raws/design-assets/{module}/{YYYY-MM-DD}-{描述}/` 目录
|
|
24
|
-
- 落盘 `description.md`(结构化 YAML frontmatter + 人读章节)
|
|
25
|
-
- 落盘 `screenshot-*.png`(每状态一张)
|
|
26
|
-
- 可选:`raw/mcp-response.json`(`.gitignore`)
|
|
27
|
-
3. 走 `zsk:figma-to-code`:按 7 步从快照产出生产级代码
|
|
28
|
-
|
|
29
|
-
## 3. 变更纪律
|
|
30
|
-
|
|
31
|
-
- **新 snapshot**:设计大改 → 新目录,**不覆盖历史**(历史用于回溯)
|
|
32
|
-
- **本表改写**:指向新 snapshot 目录,旧行转入"归档"小节(保留追溯)
|
|
33
|
-
- **node-id 废弃**:Figma 重绘导致 node-id 失效 → 旧行标 `[deprecated]`,新 node-id 新行
|
|
34
|
-
|
|
35
|
-
## 归档(历史 snapshot)
|
|
36
|
-
|
|
37
|
-
| 模块 ID | 旧 snapshot | 归档原因 | 归档日期 |
|
|
38
|
-
| --- | --- | --- | --- |
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Software Requirements Specification
|
|
3
|
-
project: <fill-me>
|
|
4
|
-
status: draft
|
|
5
|
-
version: 0.1.0
|
|
6
|
-
last_updated: <YYYY-MM-DD>
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# SRS — <项目名>
|
|
10
|
-
|
|
11
|
-
> **角色**:原始需求事实源。zsk skill 通过 `{{config.paths.srs}}` 引用本文件。
|
|
12
|
-
> **变更流程**:走人工评审(见 `zsk:proposal` → `zsk:spec`),不由 LLM 自由改写。
|
|
13
|
-
> **编号纪律**:FR / NFR / AC 只增不改,废弃用 `[deprecated]` 标记。
|
|
14
|
-
|
|
15
|
-
## 1. 范围与目标
|
|
16
|
-
|
|
17
|
-
### 1.1 背景
|
|
18
|
-
<为什么要做此产品/模块>
|
|
19
|
-
|
|
20
|
-
### 1.2 SMART 目标
|
|
21
|
-
<用 zsk:proposal skill 的 G-{n} 格式>
|
|
22
|
-
|
|
23
|
-
### 1.3 超出范围(Out of Scope)
|
|
24
|
-
<显式列出不做什么,避免范围蔓延>
|
|
25
|
-
|
|
26
|
-
## 2. 用户角色与核心场景
|
|
27
|
-
|
|
28
|
-
| 角色 | 核心场景 | 优先级 |
|
|
29
|
-
| --- | --- | --- |
|
|
30
|
-
| <角色 A> | <场景描述> | P0 |
|
|
31
|
-
|
|
32
|
-
## 3. 功能需求(FR)
|
|
33
|
-
|
|
34
|
-
> 编号规则见 `zsk:spec`。每条 FR 必须可被下游 Design / Task / Verify 用编号引用。
|
|
35
|
-
|
|
36
|
-
- **FR-001**: <描述:做什么,不写怎么做>
|
|
37
|
-
- **FR-002**: <...>
|
|
38
|
-
|
|
39
|
-
## 4. 非功能需求(NFR)
|
|
40
|
-
|
|
41
|
-
> 7 大类:performance / a11y / security / i18n / compat / observability / reliability
|
|
42
|
-
> 项目级基线见 `project-config.md` 的 `quality.*`;模块级偏离单独声明。
|
|
43
|
-
|
|
44
|
-
- **NFR-001**: <描述 + 阈值 + 验证手法>
|
|
45
|
-
|
|
46
|
-
## 5. 验收条件(AC)
|
|
47
|
-
|
|
48
|
-
> Gherkin(Given/When/Then)或 BDD 可执行化。每条 AC 覆盖至少 1 个 FR。
|
|
49
|
-
|
|
50
|
-
- **AC-001**: Given <前置>, When <操作>, Then <期望结果> · 覆盖 `FR-001`
|
|
51
|
-
|
|
52
|
-
## 6. 用户故事(US)
|
|
53
|
-
|
|
54
|
-
> INVEST 原则。每个 US 关联若干 FR/AC。
|
|
55
|
-
|
|
56
|
-
- **US-001**: 作为 <角色>,我想 <目标>,以便 <价值> · 覆盖 `FR-001` / `AC-001`
|
|
57
|
-
|
|
58
|
-
## 7. 约束(Constraints)
|
|
59
|
-
|
|
60
|
-
<业务/合规/技术约束。技术约束尽量走 `project-config.md` 与 ADR,不在此重抄>
|
|
61
|
-
|
|
62
|
-
## 8. 术语表(Glossary)
|
|
63
|
-
|
|
64
|
-
> 可独立维护于 `docs/system/glossary.md`(zsk:glossary skill)。
|
|
65
|
-
|
|
66
|
-
| 术语 | 定义 |
|
|
67
|
-
| --- | --- |
|
|
68
|
-
| <Term A> | <定义> |
|
|
69
|
-
|
|
70
|
-
## 9. 开放问题
|
|
71
|
-
|
|
72
|
-
- [ ] <待澄清问题 1>
|
|
73
|
-
- [ ] <待澄清问题 2>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# API Contracts
|
|
2
|
-
|
|
3
|
-
Store upstream API contracts here, grouped by service or provider.
|
|
4
|
-
|
|
5
|
-
Recommended layout:
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
.raws/api-contracts/
|
|
9
|
-
└── {service}/
|
|
10
|
-
└── contracts/
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Do not edit generated or upstream-owned contracts to match frontend assumptions. If a contract conflicts with SRS, test cases, or design assets, record an issue and resolve the decision in `docs/{module}/`.
|