@captain_z/zsk 1.3.0 → 1.4.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.
- package/README.md +25 -19
- package/dist/bin.js +52 -4
- package/dist/bin.js.map +1 -1
- package/dist/commands/add.js +2 -2
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/check.js +7 -4
- 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 +5 -5
- 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 +12 -5
- package/dist/core/scaffolder.js.map +1 -1
- package/package.json +3 -2
- 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/issue/default/assets/index.md +5 -0
- package/templates/issue/default/debug-logs/index.md +5 -0
- package/templates/issue/default/issue.md +45 -0
- 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 +31 -16
- package/templates/project-init/.raws/README.md +18 -32
- package/templates/project-init/.raws/api-contracts/index.md +22 -0
- package/templates/project-init/.raws/design-assets/index.md +25 -0
- package/templates/project-init/.raws/design-sources/index.md +24 -0
- package/templates/project-init/.raws/index.md +53 -0
- package/templates/project-init/.raws/requirements/index.md +23 -0
- package/templates/project-init/.raws/testing/index.md +22 -0
- package/templates/project-init/.zsk/config.yaml +39 -0
- package/templates/project-init/{SYSTEM-SPEC.md → docs/SYSTEM-SPEC.md} +16 -18
- package/templates/project-init/.issues/_templates/issue.md +0 -44
- 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
|
},
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# __ISSUE_ID__-__ISSUE_SLUG__
|
|
2
|
+
|
|
3
|
+
## 问题级别
|
|
4
|
+
|
|
5
|
+
__SEVERITY__
|
|
6
|
+
|
|
7
|
+
## 模块
|
|
8
|
+
|
|
9
|
+
`__MODULE_ID__`
|
|
10
|
+
|
|
11
|
+
## 环境
|
|
12
|
+
|
|
13
|
+
- 日期:__DATE__
|
|
14
|
+
- 分支:
|
|
15
|
+
- URL:
|
|
16
|
+
- 命令:
|
|
17
|
+
- 浏览器:
|
|
18
|
+
- 数据源:
|
|
19
|
+
- 工具:
|
|
20
|
+
|
|
21
|
+
## 复现步骤
|
|
22
|
+
|
|
23
|
+
1.
|
|
24
|
+
|
|
25
|
+
## 实际结果
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 预期结果
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## 日志 / 截图
|
|
32
|
+
|
|
33
|
+
- `assets/<file>`:
|
|
34
|
+
- `debug-logs/<file>`:
|
|
35
|
+
|
|
36
|
+
## 影响范围
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## 初步定位
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## 状态
|
|
43
|
+
|
|
44
|
+
- 状态:Open
|
|
45
|
+
- 复测:
|
|
@@ -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,26 +1,41 @@
|
|
|
1
|
-
#
|
|
1
|
+
# .issues — Local Verification And Bug Evidence
|
|
2
2
|
|
|
3
|
-
`.issues
|
|
3
|
+
This is the default issue root configured by `.zsk/config.yaml` `paths.issues`. It stores local review findings, bug reports, screenshots, logs, reproduction evidence, and verification records created during project work.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Directory Contract
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
.issues/
|
|
9
9
|
├── README.md
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
└── {area-or-module}/
|
|
11
|
+
├── README.md # optional module issue index
|
|
12
|
+
├── BUG-0001-short-slug/
|
|
13
|
+
│ ├── issue.md # required issue body
|
|
14
|
+
│ ├── analysis.md # optional root-cause notes
|
|
15
|
+
│ ├── reproduction.md # optional detailed repro script
|
|
16
|
+
│ ├── assets/ # screenshots, videos, HAR, exported state
|
|
17
|
+
│ │ └── index.md
|
|
18
|
+
│ └── debug-logs/ # console, test, network, investigation logs
|
|
19
|
+
│ └── index.md
|
|
20
|
+
├── _evidence/ # shared evidence referenced by multiple issues/docs
|
|
21
|
+
└── _debug-logs/ # untriaged or cross-issue historical logs only
|
|
17
22
|
```
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
Use `zsk issue create -m <module-id>` to generate issue folders from the packaged template. `zsk init` does not write `_templates/` into the project.
|
|
25
|
+
|
|
26
|
+
## Bug Directory Rules
|
|
20
27
|
|
|
21
28
|
- Keep one confirmed bug per `BUG-xxxx-short-slug/` directory.
|
|
22
|
-
-
|
|
23
|
-
- Put
|
|
24
|
-
- Put
|
|
25
|
-
-
|
|
26
|
-
-
|
|
29
|
+
- Put the issue body in `issue.md`.
|
|
30
|
+
- Put screenshots, recordings, HAR files, JSON payloads, exported browser state, and reproduction artifacts that belong to one bug under that bug's `assets/`.
|
|
31
|
+
- Put console output, test output, debug logs, and investigation notes that belong to one bug under that bug's `debug-logs/`.
|
|
32
|
+
- Use `analysis.md` only when root-cause reasoning is long enough that it would obscure the issue body.
|
|
33
|
+
- If two symptoms share one root cause, keep one bug directory and list all symptoms as evidence inside it.
|
|
34
|
+
|
|
35
|
+
## Relationship To Other Project Directories
|
|
36
|
+
|
|
37
|
+
| Directory | Purpose | May contain local screenshots/logs? |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `.raws/` | Upstream facts, mirrored snapshots, original external test cases | No |
|
|
40
|
+
| `docs/{module}/` | Human-authored module proposal/spec/design/tasks/verification | No |
|
|
41
|
+
| `.issues/{module}/` | Local defects, verification evidence, debug logs, issue-quality records | Yes |
|
|
@@ -1,40 +1,26 @@
|
|
|
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
|
+
Start from `index.md` for the human/AI resource entry point. Use `manifest.json` as the generated machine index.
|
|
15
8
|
|
|
16
|
-
##
|
|
9
|
+
## Expected Contents
|
|
17
10
|
|
|
18
|
-
|
|
11
|
+
- `index.md`: human/AI navigation entry point for raw resources.
|
|
12
|
+
- `manifest.json`: machine-readable index maintained by `zsk prep` / `zsk sync`.
|
|
13
|
+
- `requirements/`: SRS, PRD, acceptance notes, and other requirement snapshots.
|
|
14
|
+
- `api-contracts/`: OpenAPI files, backend API repository snapshots, or exported API notes.
|
|
15
|
+
- `design-sources/`: Figma, Modao, design handoff, and MCP capture snapshots.
|
|
16
|
+
- `design-assets/`: Icons, images, tokens, and other design asset snapshots.
|
|
17
|
+
- `testing/`: QA cases, acceptance cases, release cases, and imported test assets.
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
zsk.config.yaml:
|
|
22
|
-
sources:
|
|
23
|
-
srs:
|
|
24
|
-
path: .raws/SRS.md
|
|
25
|
-
testing:
|
|
26
|
-
path: .raws/testing
|
|
27
|
-
```
|
|
19
|
+
These directories are local landing zones only. The source addresses still belong in `.zsk/config.yaml` `sources`, so a resource can be online, a git repository path, a Figma/Modao URL, or a local file.
|
|
28
20
|
|
|
29
|
-
##
|
|
21
|
+
## Rules
|
|
30
22
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
## 原则
|
|
36
|
-
|
|
37
|
-
- **源文件不被 LLM 随意改写**:变更走人工/流程
|
|
38
|
-
- **变更即新 snapshot**:Figma 更新→新 snapshot 目录,不覆盖历史
|
|
39
|
-
- **编号锚稳定**:SRS 中的 `FR-001` / `US-001` / `AC-001` 一旦发布不改(仅废弃,合并/拆分留追踪)
|
|
40
|
-
- **测试用例是一等资产**:原始测试用例保存在 `.raws/testing/`,派生测试矩阵和自动化映射写入 `docs/{module}/`
|
|
23
|
+
- Preserve upstream wording. Do not rewrite snapshots to resolve conflicts.
|
|
24
|
+
- Prefer new snapshots over overwriting historical design/API captures.
|
|
25
|
+
- Keep runtime screenshots, debug logs, HAR files, and failed verification evidence out of this directory.
|
|
26
|
+
- Skills must resolve this path from `.zsk/config.yaml`; they must not hard-code `.raws`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# API Contracts Index
|
|
2
|
+
|
|
3
|
+
Use this directory for backend API contracts needed by the current project. Organize by backend service, not by frontend page.
|
|
4
|
+
|
|
5
|
+
## Organization
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.raws/api-contracts/
|
|
9
|
+
├── index.md
|
|
10
|
+
└── {service}/
|
|
11
|
+
├── index.md
|
|
12
|
+
└── contracts/
|
|
13
|
+
└── {contract}.md
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage Rules
|
|
17
|
+
|
|
18
|
+
- Configure API repositories, OpenAPI URLs, or local source paths in `.zsk/config.yaml` `sources`.
|
|
19
|
+
- Prefer service-level folders such as `organization/`, `user/`, or `billing/`.
|
|
20
|
+
- Keep selected frontend-facing contracts under `{service}/contracts/`.
|
|
21
|
+
- If contracts are mirrored from another repo, record the original repository/ref/path in `.zsk/config.yaml`.
|
|
22
|
+
- Avoid copying whole backend change directories unless the frontend module truly needs that context.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Design Assets Index
|
|
2
|
+
|
|
3
|
+
Use this directory for design-layer static assets: icons, images, theme tokens, CSS exports, screenshots, and other files consumed by implementation.
|
|
4
|
+
|
|
5
|
+
## Organization
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.raws/design-assets/
|
|
9
|
+
├── index.md
|
|
10
|
+
└── {module}/
|
|
11
|
+
├── index.md
|
|
12
|
+
├── *.json
|
|
13
|
+
├── *.css
|
|
14
|
+
└── {YYYY-MM-DD}-{snapshot}/
|
|
15
|
+
├── description.md
|
|
16
|
+
├── screenshot-main.png
|
|
17
|
+
└── screenshot-{state}.png
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage Rules
|
|
21
|
+
|
|
22
|
+
- Group assets by frontend module when possible.
|
|
23
|
+
- Reference assets from `docs/{module}/design.md` or module-specific design handoff docs.
|
|
24
|
+
- Record token/icon/component mapping decisions in module docs, not only in asset files.
|
|
25
|
+
- Keep runtime verification screenshots under `.issues/`, not here.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Design Sources Index
|
|
2
|
+
|
|
3
|
+
Use this directory for source-level design captures: Figma, Modao, design handoff exports, MCP readouts, and page/node metadata.
|
|
4
|
+
|
|
5
|
+
## Organization
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.raws/design-sources/
|
|
9
|
+
├── index.md
|
|
10
|
+
└── {module-or-product-area}/
|
|
11
|
+
├── index.md
|
|
12
|
+
├── figma.json
|
|
13
|
+
├── modao.json
|
|
14
|
+
└── {YYYY-MM-DD}-{snapshot}/
|
|
15
|
+
├── description.md
|
|
16
|
+
└── raw/
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage Rules
|
|
20
|
+
|
|
21
|
+
- Configure Figma/Modao URLs and node IDs in `.zsk/config.yaml` `sources`.
|
|
22
|
+
- Keep source captures separate from implementation docs.
|
|
23
|
+
- Use `description.md` when a snapshot needs human-readable layout, token, state, or interaction notes.
|
|
24
|
+
- Treat raw MCP responses as cacheable unless the project chooses to commit them.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# .raws — Raw Resource Index
|
|
2
|
+
|
|
3
|
+
This file is the human/AI entry point for upstream facts and local snapshots. It separates source configuration from local snapshot storage.
|
|
4
|
+
|
|
5
|
+
## Directory Contract
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
.raws/
|
|
9
|
+
├── README.md
|
|
10
|
+
├── index.md # this navigation index
|
|
11
|
+
├── manifest.json # generated machine index, refreshed by zsk prep
|
|
12
|
+
├── requirements/ # SRS, PRD, acceptance notes, requirement snapshots
|
|
13
|
+
│ └── index.md
|
|
14
|
+
├── api-contracts/ # API contracts, OpenAPI files, backend repo extracts
|
|
15
|
+
│ └── index.md
|
|
16
|
+
├── design-sources/ # Figma, Modao, MCP, design handoff captures
|
|
17
|
+
│ └── index.md
|
|
18
|
+
├── design-assets/ # icons, images, tokens, screenshots, raw design assets
|
|
19
|
+
│ └── index.md
|
|
20
|
+
└── testing/ # QA, acceptance, release, and imported test assets
|
|
21
|
+
└── index.md
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Source Configuration
|
|
25
|
+
|
|
26
|
+
Real origins belong in `.zsk/config.yaml` `sources`. A source can be an online URL, git repository, Figma/Modao URL, OpenAPI location, or local file. Use `snapshot` only when the resource is materialized under `.raws/`.
|
|
27
|
+
|
|
28
|
+
`manifest.json` is generated by `zsk prep` and records configured resources, snapshot existence, size, hash, and sync method. Do not edit it by hand unless recovering from a broken sync.
|
|
29
|
+
|
|
30
|
+
## Categories
|
|
31
|
+
|
|
32
|
+
| Category | Entry | Typical source types |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Requirements | `requirements/index.md` | `srs`, `prd`, `manual` |
|
|
35
|
+
| API contracts | `api-contracts/index.md` | `api_contract`, `vendor_doc` |
|
|
36
|
+
| Design sources | `design-sources/index.md` | `design`, Figma, Modao, MCP |
|
|
37
|
+
| Design assets | `design-assets/index.md` | `design_asset`, tokens, images |
|
|
38
|
+
| Testing assets | `testing/index.md` | `test_case`, QA sheets, acceptance cases |
|
|
39
|
+
|
|
40
|
+
## Boundary With Docs And Issues
|
|
41
|
+
|
|
42
|
+
| Directory | Purpose | Runtime screenshots/logs |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `.raws/` | Upstream facts and mirrored snapshots | No |
|
|
45
|
+
| `docs/` | Human-authored module proposal/spec/design/tasks/verification | No |
|
|
46
|
+
| `.issues/` | Local bugs, verification evidence, debug logs, screenshots | Yes |
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- Preserve upstream wording in snapshots.
|
|
51
|
+
- Prefer appending new snapshots over overwriting historical captures.
|
|
52
|
+
- Put source URLs and local origins in `.zsk/config.yaml`, not in scattered notes.
|
|
53
|
+
- Keep runtime evidence, failed verification artifacts, HAR files, and debug logs under `.issues/`.
|