@captain_z/zsk 1.6.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +24 -32
  2. package/dist/bin.js +22 -15
  3. package/dist/bin.js.map +1 -1
  4. package/dist/commands/check.d.ts +1 -0
  5. package/dist/commands/check.js +209 -12
  6. package/dist/commands/check.js.map +1 -1
  7. package/dist/commands/config.js +1 -1
  8. package/dist/commands/config.js.map +1 -1
  9. package/dist/commands/demo.d.ts +1 -0
  10. package/dist/commands/demo.js +341 -36
  11. package/dist/commands/demo.js.map +1 -1
  12. package/dist/commands/doctor.d.ts +4 -0
  13. package/dist/commands/doctor.js +102 -0
  14. package/dist/commands/doctor.js.map +1 -0
  15. package/dist/commands/issue.d.ts +2 -1
  16. package/dist/commands/issue.js +75 -30
  17. package/dist/commands/issue.js.map +1 -1
  18. package/dist/commands/module.js +42 -27
  19. package/dist/commands/module.js.map +1 -1
  20. package/dist/commands/prep.js +100 -6
  21. package/dist/commands/prep.js.map +1 -1
  22. package/dist/commands/project-init.js +63 -11
  23. package/dist/commands/project-init.js.map +1 -1
  24. package/dist/core/config.d.ts +14 -2
  25. package/dist/core/config.js +91 -12
  26. package/dist/core/config.js.map +1 -1
  27. package/dist/core/raw-manifest.d.ts +10 -0
  28. package/dist/core/raw-manifest.js +48 -1
  29. package/dist/core/raw-manifest.js.map +1 -1
  30. package/dist/core/scaffolder.js +5 -2
  31. package/dist/core/scaffolder.js.map +1 -1
  32. package/dist/core/workspace-layout.d.ts +53 -0
  33. package/dist/core/workspace-layout.js +108 -0
  34. package/dist/core/workspace-layout.js.map +1 -0
  35. package/package.json +2 -2
  36. package/schemas/zsk-config.schema.json +141 -11
  37. package/templates/issue/default/issue.md +9 -5
  38. package/templates/module/frontend-module/design.md +22 -0
  39. package/templates/module/frontend-module/module.yaml +4 -3
  40. package/templates/module/frontend-module/proposal.md +26 -1
  41. package/templates/module/frontend-module/spec.md +13 -0
  42. package/templates/module/frontend-module/tasks.md +15 -2
  43. package/templates/project-init/.zsk/config.yaml +41 -29
  44. package/templates/project-init/.zsk/docs/PROJECT-CONFIG.md +62 -0
  45. package/templates/project-init/.zsk/docs/SYSTEM-SPEC.md +59 -0
  46. package/templates/project-init/.zsk/modules/index.md +7 -0
  47. package/templates/project-init/.zsk/raws/backend/index.md +3 -0
  48. package/templates/project-init/.zsk/raws/index.md +7 -0
  49. package/templates/project-init/.zsk/raws/jira/index.md +3 -0
  50. package/templates/project-init/.zsk/raws/manual/index.md +3 -0
  51. package/templates/project-init/.zsk/raws/product/index.md +3 -0
  52. package/templates/project-init/.zsk/raws/qa/index.md +3 -0
  53. package/templates/project-init/.zsk/raws/ue/index.md +3 -0
  54. package/templates/module/frontend-module/acceptance.md +0 -18
  55. package/templates/module/frontend-module/archive.md +0 -17
  56. package/templates/module/frontend-module/commit.md +0 -15
  57. package/templates/module/frontend-module/demo-outline.md +0 -59
  58. package/templates/module/frontend-module/demo-report.md +0 -23
  59. package/templates/module/frontend-module/deploy.md +0 -18
  60. package/templates/module/frontend-module/ready.md +0 -12
  61. package/templates/module/frontend-module/review.md +0 -12
  62. package/templates/module/frontend-module/scenarios/index.md +0 -21
  63. package/templates/module/frontend-module/scenarios/p0-happy-path.spec.ts +0 -13
  64. package/templates/module/frontend-module/smoke.md +0 -21
  65. package/templates/module/frontend-module/verification.md +0 -6
  66. package/templates/module/frontend-module/verify.md +0 -12
  67. package/templates/project-init/.issues/README.md +0 -57
  68. package/templates/project-init/.issues/_taxonomy.md +0 -35
  69. package/templates/project-init/.issues/index.md +0 -7
  70. package/templates/project-init/.raws/README.md +0 -27
  71. package/templates/project-init/.raws/api-contracts/index.md +0 -22
  72. package/templates/project-init/.raws/backend-repositories/index.md +0 -12
  73. package/templates/project-init/.raws/design-assets/index.md +0 -25
  74. package/templates/project-init/.raws/design-sources/index.md +0 -24
  75. package/templates/project-init/.raws/index.md +0 -56
  76. package/templates/project-init/.raws/issues/index.md +0 -4
  77. package/templates/project-init/.raws/requirements/index.md +0 -23
  78. package/templates/project-init/.raws/testing/index.md +0 -22
  79. package/templates/project-init/.zsk/checkpoints/index.md +0 -4
  80. package/templates/project-init/.zsk/learning/index.md +0 -14
  81. package/templates/project-init/.zsk/learning/proposals/.gitkeep +0 -1
  82. package/templates/project-init/.zsk/resource-manifest.json +0 -55
  83. package/templates/project-init/.zsk/workflow-state.json +0 -6
  84. package/templates/project-init/docs/SYSTEM-SPEC.md +0 -53
  85. package/templates/project-init/docs/_module-index.md +0 -15
  86. package/templates/project-init/project-config.md +0 -154
  87. /package/templates/project-init/{.raws → .zsk/raws}/manifest.json +0 -0
@@ -1,12 +0,0 @@
1
- # __MODULE_NAME__ Verify
2
-
3
- ## Verification
4
-
5
- | Issue / AC | Evidence | Result |
6
- | --- | --- | --- |
7
-
8
- ## Documentation Feedback
9
-
10
- - No-update rationale:
11
- - Created from the ZSK module template; no verification has been performed yet.
12
-
@@ -1,57 +0,0 @@
1
- # .issues — Local Verification And Bug Evidence
2
-
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
-
5
- Every actionable finding from demo, smoke, review, formal test, verify, or acceptance should be persisted here or under the configured `paths.issues` root. Chat-only findings are not durable tracking.
6
-
7
- ## Directory Contract
8
-
9
- ```text
10
- .issues/
11
- ├── README.md
12
- ├── index.md # global module issue totals
13
- └── {area-or-module}/
14
- ├── index.md # module issue index and status table
15
- ├── BUG-0001-short-slug/
16
- │ ├── issue.md # required issue body
17
- │ ├── analysis.md # optional root-cause notes
18
- │ ├── reproduction.md # optional detailed repro script
19
- │ ├── assets/ # screenshots, videos, HAR, exported state
20
- │ │ └── index.md
21
- │ └── debug-logs/ # console, test, network, investigation logs
22
- │ └── index.md
23
- ├── demo/ # optional stage view / evidence bucket
24
- │ └── index.md
25
- ├── _evidence/ # shared evidence referenced by multiple issues/docs
26
- └── _debug-logs/ # untriaged or cross-issue historical logs only
27
- ```
28
-
29
- Use `zsk issue create -m <module-id>` to generate issue folders from the packaged template. `zsk init` does not write `_templates/` into the project.
30
-
31
- `zsk issue update -m <module-id> --id <issue-dir> --status <status>` updates the concrete issue and refreshes:
32
-
33
- - `.issues/{module}/index.md` — all issues and statuses for one module.
34
- - `.issues/index.md` — module totals across the project.
35
-
36
- ## Bug Directory Rules
37
-
38
- - Keep one confirmed bug per `BUG-xxxx-short-slug/` directory.
39
- - Put the issue body in `issue.md`.
40
- - Put screenshots, recordings, HAR files, JSON payloads, exported browser state, and reproduction artifacts that belong to one bug under that bug's `assets/`.
41
- - Put console output, test output, debug logs, and investigation notes that belong to one bug under that bug's `debug-logs/`.
42
- - Use `analysis.md` only when root-cause reasoning is long enough that it would obscure the issue body.
43
- - If two symptoms share one root cause, keep one bug directory and list all symptoms as evidence inside it.
44
-
45
- ## Closure And Documentation Feedback
46
-
47
- - Record the affected PRD/SRS, spec, design, task, test case, and evidence links in the issue.
48
- - After the fix is verified and confirmed by the user/product owner, update the relevant `docs/{module}/spec.md`, `docs/{module}/design.md`, `docs/{module}/tasks.md`, or project spec for gaps or vague behavior exposed by the issue.
49
- - Close the issue only after it links verification evidence, confirmation, documentation feedback update or no-update rationale, and regression guard.
50
-
51
- ## Relationship To Other Project Directories
52
-
53
- | Directory | Purpose | May contain local screenshots/logs? |
54
- |---|---|---|
55
- | `.raws/` | Upstream facts, mirrored snapshots, original external test cases | No |
56
- | `docs/{module}/` | Human-authored module proposal/spec/design/tasks/verification | No |
57
- | `.issues/{module}/` | Local defects, verification evidence, debug logs, issue-quality records | Yes |
@@ -1,35 +0,0 @@
1
- # Issue Taxonomy
2
-
3
- Managed issue records belong under `.issues/` or the configured `.zsk/config.yaml#paths.issues` root.
4
-
5
- Each module has a module index at `.issues/{module}/index.md`. The issue root has a global index at `.issues/index.md` with module totals. `zsk issue create` and `zsk issue update` refresh both indexes.
6
-
7
- | Type | Concrete Issue Directory | Prefix |
8
- | --- | --- | --- |
9
- | Demo Issue | `.issues/{module}/{prefix}-0001-slug/` | `DEMO` |
10
- | Smoke Issue | `.issues/{module}/{prefix}-0001-slug/` | `SMOKE` |
11
- | Review Issue | `.issues/{module}/{prefix}-0001-slug/` | `REV` |
12
- | Defect | `.issues/{module}/{prefix}-0001-slug/` | `DEFECT` |
13
- | Verify Issue | `.issues/{module}/{prefix}-0001-slug/` | `VER` |
14
- | Acceptance Issue | `.issues/{module}/{prefix}-0001-slug/` | `ACC` |
15
-
16
- Stage directories such as `.issues/{module}/demo/index.md` may exist as stage views or evidence buckets. The authoritative status indexes are `.issues/{module}/index.md` and `.issues/index.md`.
17
-
18
- `.raws/issues/` is reserved for imported external issue feeds or compatibility inputs.
19
-
20
- ## Required Intake
21
-
22
- Every actionable issue should include:
23
-
24
- - reproduction steps or triggering command;
25
- - actual/current behavior;
26
- - expected behavior;
27
- - severity and rationale;
28
- - environment/version/data source;
29
- - evidence links;
30
- - root-cause hypothesis and confidence;
31
- - fix route;
32
- - Documentation Feedback target or no-update rationale;
33
- - regression guard.
34
- - verification evidence and user/product confirmation before closing behavior-changing issues;
35
- - updated module index and global issue index.
@@ -1,7 +0,0 @@
1
- # Issues Index
2
-
3
- Module-level issue totals. `zsk issue create` and `zsk issue update` refresh this file.
4
-
5
- | Module | Total | Open | Closed |
6
- | --- | ---: | ---: | ---: |
7
- | | 0 | 0 | 0 |
@@ -1,27 +0,0 @@
1
- # Raw Snapshots
2
-
3
- This directory is the default local snapshot root configured by `.zsk/config.yaml` `paths.raws`.
4
-
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
-
7
- Start from `index.md` for the human/AI resource entry point. Use `manifest.json` as the generated machine index.
8
-
9
- ## Expected Contents
10
-
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, API schemas, or exported API notes.
15
- - `backend-repositories/`: small backend repository extracts that prove API/domain behavior.
16
- - `design-sources/`: Figma, Modao, design handoff, and MCP capture snapshots.
17
- - `design-assets/`: Icons, images, tokens, and other design asset snapshots.
18
- - `testing/`: QA cases, acceptance cases, release cases, and imported test assets.
19
-
20
- 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.
21
-
22
- ## Rules
23
-
24
- - Preserve upstream wording. Do not rewrite snapshots to resolve conflicts.
25
- - Prefer new snapshots over overwriting historical design/API captures.
26
- - Keep runtime screenshots, debug logs, HAR files, and failed verification evidence out of this directory.
27
- - Skills must resolve this path from `.zsk/config.yaml`; they must not hard-code `.raws`.
@@ -1,22 +0,0 @@
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.
@@ -1,12 +0,0 @@
1
- # Backend Repositories
2
-
3
- Store lightweight backend repository snapshots here when a module needs API or domain evidence from server code.
4
-
5
- Prefer small, provenance-rich extracts over full repository dumps:
6
-
7
- - OpenAPI or generated API contract files.
8
- - Route/controller index excerpts that prove endpoint behavior.
9
- - DTO/schema/type definitions used by frontend contracts.
10
- - README or integration notes that define runtime requirements.
11
-
12
- Record the real repository origin in `.zsk/config.yaml` `sources`; this directory is only the local snapshot landing zone.
@@ -1,25 +0,0 @@
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.
@@ -1,24 +0,0 @@
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.
@@ -1,56 +0,0 @@
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
- ├── backend-repositories/ # lightweight backend repo extracts
17
- │ └── index.md
18
- ├── design-sources/ # Figma, Modao, MCP, design handoff captures
19
- │ └── index.md
20
- ├── design-assets/ # icons, images, tokens, screenshots, raw design assets
21
- │ └── index.md
22
- └── testing/ # QA, acceptance, release, and imported test assets
23
- └── index.md
24
- ```
25
-
26
- ## Source Configuration
27
-
28
- 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/`.
29
-
30
- `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.
31
-
32
- ## Categories
33
-
34
- | Category | Entry | Typical source types |
35
- |---|---|---|
36
- | Requirements | `requirements/index.md` | `srs`, `prd`, `manual` |
37
- | API contracts | `api-contracts/index.md` | `api_contract`, `vendor_doc` |
38
- | Backend repositories | `backend-repositories/index.md` | `backend_repo`, git repository extracts |
39
- | Design sources | `design-sources/index.md` | `design`, Figma, Modao, MCP |
40
- | Design assets | `design-assets/index.md` | `design_asset`, tokens, images |
41
- | Testing assets | `testing/index.md` | `test_case`, QA sheets, acceptance cases |
42
-
43
- ## Boundary With Docs And Issues
44
-
45
- | Directory | Purpose | Runtime screenshots/logs |
46
- |---|---|---|
47
- | `.raws/` | Upstream facts and mirrored snapshots | No |
48
- | `docs/` | Human-authored module proposal/spec/design/tasks/verification | No |
49
- | `.issues/` | Local bugs, verification evidence, debug logs, screenshots | Yes |
50
-
51
- ## Rules
52
-
53
- - Preserve upstream wording in snapshots.
54
- - Prefer appending new snapshots over overwriting historical captures.
55
- - Put source URLs and local origins in `.zsk/config.yaml`, not in scattered notes.
56
- - Keep runtime evidence, failed verification artifacts, HAR files, and debug logs under `.issues/`.
@@ -1,4 +0,0 @@
1
- # Raw Issue Imports
2
-
3
- Use this directory for imported issue feeds from external systems. Normalized managed issues belong under `.issues/`.
4
-
@@ -1,23 +0,0 @@
1
- # Requirements Index
2
-
3
- Use this directory for local snapshots of SRS, PRD, acceptance notes, product decisions, and other requirement documents.
4
-
5
- ## Organization
6
-
7
- ```text
8
- .raws/requirements/
9
- ├── index.md
10
- ├── srs.md
11
- ├── prd.md
12
- └── {source-or-date}/
13
- ├── page.md
14
- ├── comments.json
15
- └── attachments/
16
- ```
17
-
18
- ## Usage Rules
19
-
20
- - Configure real origins in `.zsk/config.yaml` `sources`.
21
- - Use this directory for immutable or append-only snapshots.
22
- - Reference requirement snapshots from `docs/{module}/proposal.md` and `docs/{module}/spec.md`.
23
- - Do not rewrite upstream text to resolve conflicts; document conflict analysis in module docs or `.issues/`.
@@ -1,22 +0,0 @@
1
- # Testing Assets Index
2
-
3
- Use this directory for upstream or imported test assets: QA sheets, acceptance cases, release cases, manual verification scripts, and exported test documents.
4
-
5
- ## Organization
6
-
7
- ```text
8
- .raws/testing/
9
- ├── index.md
10
- ├── qa-cases.md
11
- ├── acceptance-cases.md
12
- └── {source-or-release}/
13
- ├── cases.md
14
- └── cases.xlsx
15
- ```
16
-
17
- ## Usage Rules
18
-
19
- - Configure real test case origins in `.zsk/config.yaml` `sources`.
20
- - Map module-level raw cases in `docs/{module}/module.yaml` `tests.raw_cases` or `sources.testing`.
21
- - Derived cases and automated tests belong in module docs or code test files.
22
- - `zsk check` treats non-index files here as raw test assets that should be mapped to a module.
@@ -1,4 +0,0 @@
1
- # ZSK Checkpoints
2
-
3
- Harness checkpoints and workflow traces belong here.
4
-
@@ -1,14 +0,0 @@
1
- # ZSK Learning
2
-
3
- Project feedback and learning proposals belong here. Learning artifacts may propose changes to templates, constraints, skills, or packs, but they must not auto-mutate core assets.
4
-
5
- ## Rules
6
-
7
- - Project-specific lessons stay in module archive docs or `docs/SYSTEM-SPEC.md`.
8
- - Reusable improvements become proposals under `.zsk/learning/proposals/`.
9
- - Core zsk changes require review, evidence, and a regression prompt before promotion.
10
- - Learning proposals may target harness constraints, templates, resource maps, root skills, or optional packs; they do not edit those targets automatically.
11
-
12
- ## Proposal Template
13
-
14
- Use `harness/learning/proposal-template.md` from the installed zsk source as the canonical shape.
@@ -1,55 +0,0 @@
1
- {
2
- "version": 1,
3
- "resources": {
4
- "configured-sources": {
5
- "source": ".zsk/config.yaml",
6
- "status": "present",
7
- "evidence": []
8
- },
9
- "resource-manifest": {
10
- "source": ".zsk/resource-manifest.json",
11
- "status": "present",
12
- "evidence": []
13
- },
14
- "requirements": {
15
- "source": ".raws/requirements",
16
- "status": "missing",
17
- "evidence": []
18
- },
19
- "api-contracts": {
20
- "source": ".raws/api-contracts",
21
- "status": "missing",
22
- "evidence": []
23
- },
24
- "backend-repositories": {
25
- "source": ".raws/backend-repositories",
26
- "status": "missing",
27
- "evidence": []
28
- },
29
- "design-sources": {
30
- "source": ".raws/design-sources",
31
- "status": "missing",
32
- "evidence": []
33
- },
34
- "design-assets": {
35
- "source": ".raws/design-assets",
36
- "status": "missing",
37
- "evidence": []
38
- },
39
- "test-cases": {
40
- "source": ".raws/testing",
41
- "status": "missing",
42
- "evidence": []
43
- },
44
- "issue-records": {
45
- "source": ".issues",
46
- "status": "present",
47
- "evidence": []
48
- },
49
- "learning-proposals": {
50
- "source": ".zsk/learning/proposals",
51
- "status": "present",
52
- "evidence": []
53
- }
54
- }
55
- }
@@ -1,6 +0,0 @@
1
- {
2
- "version": 1,
3
- "modules": {},
4
- "updatedAt": "__INIT_TIMESTAMP__"
5
- }
6
-
@@ -1,53 +0,0 @@
1
- # System Spec
2
-
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
-
5
- ## Source Priority
6
-
7
- When sources conflict, use this priority order until the project overrides it:
8
-
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`
15
-
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.
17
-
18
- ## Store Policy
19
-
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.
24
-
25
- ## Testing Policy
26
-
27
- Test cases are first-class project assets.
28
-
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.
32
- - A task is not done until the relevant test case is covered by automated tests or recorded as runtime/manual verification evidence.
33
-
34
- ## Documentation Feedback Policy
35
-
36
- Every project stage must feed confirmed conversation outcomes back into durable files.
37
-
38
- Required stage record:
39
-
40
- ```md
41
- ## Documentation Feedback
42
-
43
- - Conversation decisions captured:
44
- - {decision or "None"}
45
- - Durable files updated:
46
- - `{path}`: {what changed and why}
47
- - Source links:
48
- - `{path or issue}`: {source role}
49
- - No-update rationale:
50
- - {required when no file changed}
51
- ```
52
-
53
- A stage is not complete until its documentation feedback check is complete.
@@ -1,15 +0,0 @@
1
- # Module Index
2
-
3
- This file is the entry point for project modules. It is maintained by `zsk prep`, `zsk module init`, and AI-assisted module discovery.
4
-
5
- Use it to answer three questions before starting a skill stage:
6
-
7
- - which modules exist;
8
- - where each module's `module.yaml` lives;
9
- - whether the module is ready for proposal/spec/design/task/coding work.
10
-
11
- | Module | Name | Config | Status |
12
- | --- | --- | --- | --- |
13
- | `<module-id>` | `<module-name>` | `docs/<module-id>/module.yaml` | pending |
14
-
15
- Status values are project-owned. Recommended baseline: `pending`, `active`, `blocked`, `verified`, `archived`.
@@ -1,154 +0,0 @@
1
- ---
2
- meta:
3
- project_name: "<project-name>"
4
- project_type: "<project-type>"
5
- project_role: "<project-role>"
6
- created: "<YYYY-MM-DD>"
7
- maintainers: []
8
-
9
- config:
10
- machine_config: ".zsk/config.yaml"
11
- system_spec: "docs/SYSTEM-SPEC.md"
12
-
13
- paths:
14
- raws_root: ".raws"
15
- raws_index: ".raws/index.md"
16
- raws_manifest: ".raws/manifest.json"
17
- requirements_index: ".raws/requirements/index.md"
18
- api_contracts_index: ".raws/api-contracts/index.md"
19
- design_sources_index: ".raws/design-sources/index.md"
20
- design_assets_index: ".raws/design-assets/index.md"
21
- testing_index: ".raws/testing/index.md"
22
- docs_root: "docs"
23
- module_index: "docs/_module-index.md"
24
- issues_root: ".issues"
25
- issues_index: ".issues/README.md"
26
-
27
- source_registry:
28
- canonical: ".zsk/config.yaml#sources"
29
- local_snapshot_root: ".raws"
30
- generated_manifest: ".raws/manifest.json"
31
-
32
- modules:
33
- root: "docs"
34
- index: "docs/_module-index.md"
35
- module_config: "docs/{module}/module.yaml"
36
- module_docs: "docs/{module}/proposal.md | spec.md | design.md | tasks.md | verification.md"
37
- module_issues: ".issues/{module}"
38
-
39
- scripts:
40
- install: "<install command>"
41
- dev: "<dev command>"
42
- build: "<build command>"
43
- lint: "<lint command>"
44
- type_check: "<typecheck command>"
45
- test: "<test command>"
46
- format: "<format command>"
47
-
48
- stack:
49
- framework: "<framework>"
50
- language: "<language>"
51
- language_strict: true
52
- build_tool: "<build-tool>"
53
- css: "<css-stack>"
54
- ui_lib: "<ui-library>"
55
- test_framework: "<test-framework>"
56
-
57
- quality:
58
- documentation_feedback_required: true
59
- runtime_evidence_root: ".issues"
60
- raw_snapshot_root: ".raws"
61
- docs_runtime_artifacts_forbidden: true
62
-
63
- examples:
64
- module_id: "sample-module"
65
- issue_id: "BUG-0001"
66
- ---
67
-
68
- # Project Config — <project-name>
69
-
70
- > **定位**:项目级 AI 配置与机械查表锚点。
71
- > **维护方式**:与 [docs/SYSTEM-SPEC.md](./docs/SYSTEM-SPEC.md) 和 [.zsk/config.yaml](./.zsk/config.yaml) 同步维护。
72
- > **适用范围**:`.zsk/`、`.raws/`、`docs/`、`.issues/` 和项目代码。
73
- > **当前结论**:本文件面向人和 AI;机器校验以 `.zsk/config.yaml` 为准。
74
-
75
- ---
76
-
77
- ## 1. 配置入口
78
-
79
- | 文件 | 定位 | 维护方式 |
80
- |---|---|---|
81
- | `.zsk/config.yaml` | 机器可读配置:路径、sources、tools、module root | 由 AI/人工编辑,`zsk config check` 校验 |
82
- | `project-config.md` | 人读项目配置:技术栈、脚本、路径、约束查表 | 与系统规约同步维护 |
83
- | `docs/SYSTEM-SPEC.md` | 项目级规则、事实源优先级、质量门禁 | 稳定约束变更时更新 |
84
-
85
- ## 2. 资源入口
86
-
87
- | 资源 | 统一入口 | 机器索引 / 配置 | 说明 |
88
- |---|---|---|---|
89
- | Raw facts | `.raws/index.md` | `.raws/manifest.json` | 上游事实与本地快照导航 |
90
- | Requirements | `.raws/requirements/index.md` | `.zsk/config.yaml#sources` | SRS、PRD、验收说明 |
91
- | API contracts | `.raws/api-contracts/index.md` | `.zsk/config.yaml#sources` | OpenAPI、后端仓库、接口契约 |
92
- | Design sources | `.raws/design-sources/index.md` | `.zsk/config.yaml#sources` | Figma、Modao、MCP、设计交付源 |
93
- | Design assets | `.raws/design-assets/index.md` | `.zsk/config.yaml#sources` | token、图片、图标、截图、静态设计资产 |
94
- | Testing assets | `.raws/testing/index.md` | `.zsk/config.yaml#sources` + `docs/{module}/module.yaml` | QA、验收、发布测试用例 |
95
- | Issues / evidence | `.issues/README.md` / `.issues/index.md` / `.issues/{module}/index.md` | `.zsk/config.yaml#paths.issues` | bug、截图、日志、复测证据、模块状态索引、全局统计 |
96
-
97
- ## 3. `.raws` / `docs` / `.issues` 边界
98
-
99
- | 目录 | 存放内容 | 不应存放 |
100
- |---|---|---|
101
- | `.raws/` | 上游事实、外部资源快照、原始测试资产 | 本地运行截图、debug log、失败验证证据 |
102
- | `docs/` | 模块 proposal/spec/design/tasks/verification、系统规约 | 运行时证据、HAR、控制台日志 |
103
- | `.issues/` | 本地缺陷、验证证据、截图、debug log、复测记录 | 上游 SRS/API/Figma 原文快照 |
104
-
105
- ## 4. Module 文档如何引用资源
106
-
107
- 模块文档优先通过相对路径引用资源:
108
-
109
- ```md
110
- > 原始需求:`.raws/requirements/{file}`
111
- > API 契约:`.raws/api-contracts/{service}/contracts/{contract}.md`
112
- > 设计来源:`.raws/design-sources/{module}/`
113
- > 设计资产:`.raws/design-assets/{module}/`
114
- > 测试资产:`.raws/testing/{case-file}`
115
- > 本地问题:`.issues/{module}/BUG-0001-short-slug/issue.md`
116
- > 模块索引:`.issues/{module}/index.md`
117
- > 全局统计:`.issues/index.md`
118
- ```
119
-
120
- 模块级映射写入 `docs/{module}/module.yaml`,项目级来源写入 `.zsk/config.yaml#sources`。
121
-
122
- ## 5. Coding 约束查表
123
-
124
- | 维度 | 当前项目值 | 说明 |
125
- |---|---|---|
126
- | Framework | `<framework>` | 从项目实际依赖填写 |
127
- | Language | `<language>` | TypeScript / Java / Go / etc. |
128
- | Build | `<build command>` | 与 package manager 保持一致 |
129
- | Test | `<test command>` | CI 和本地验收都应可复用 |
130
- | UI / Runtime verification | `playwright_cli / playwright_mcp / browser_use / computer_use` | Playwright 默认执行与证据;Browser Use 复用登录态;Computer Use 处理视觉/系统级场景 |
131
-
132
- ## 6. 冲突处理顺序
133
-
134
- 1. 用户明确指令 / 仓库 `AGENTS.md`
135
- 2. `docs/SYSTEM-SPEC.md`
136
- 3. `project-config.md`
137
- 4. `.zsk/config.yaml`
138
- 5. `.raws/` 中的上游事实源
139
- 6. `docs/{module}/proposal.md|spec.md|design.md|tasks.md`
140
- 7. 通用 skills / 模板
141
-
142
- 如果两个上游事实源冲突,不要静默选择。应在 `.issues/{module}/` 记录冲突,并在模块 `spec.md` 或 `design.md` 的 Documentation Feedback 中写明处理结果。
143
-
144
- ## 7. 维护清单
145
-
146
- 项目硬约束新增或调整时,至少同步检查:
147
-
148
- - [ ] `.zsk/config.yaml`
149
- - [ ] `project-config.md`
150
- - [ ] `docs/SYSTEM-SPEC.md`
151
- - [ ] `.raws/index.md` 与相关分类 `index.md`
152
- - [ ] 受影响模块的 `docs/{module}/module.yaml`
153
- - [ ] 受影响模块的 `docs/{module}/spec.md` / `design.md`
154
- - [ ] 必要时新增或更新 `.issues/{module}/BUG-xxxx/issue.md`,并同步 `.issues/{module}/index.md` 与 `.issues/index.md`