@captain_z/zsk 1.4.2 → 1.5.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 +23 -11
- package/dist/bin.js +174 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/add-flow.js +3 -8
- package/dist/commands/add-flow.js.map +1 -1
- package/dist/commands/add.d.ts +1 -0
- package/dist/commands/add.js +22 -6
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/check.js +10 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/demo.d.ts +31 -0
- package/dist/commands/demo.js +533 -0
- package/dist/commands/demo.js.map +1 -0
- package/dist/commands/issue.d.ts +8 -0
- package/dist/commands/issue.js +170 -6
- package/dist/commands/issue.js.map +1 -1
- package/dist/commands/module.js +23 -2
- package/dist/commands/module.js.map +1 -1
- package/dist/commands/project-init.js +6 -2
- package/dist/commands/project-init.js.map +1 -1
- package/dist/commands/remove.js +1 -1
- package/dist/commands/remove.js.map +1 -1
- package/dist/core/config.d.ts +14 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/installer.d.ts +5 -0
- package/dist/core/installer.js +50 -6
- package/dist/core/installer.js.map +1 -1
- package/dist/core/skills.d.ts +3 -4
- package/dist/core/skills.js +34 -43
- package/dist/core/skills.js.map +1 -1
- package/dist/core/targets.js +1 -1
- package/dist/core/targets.js.map +1 -1
- package/package.json +2 -2
- package/schemas/module.schema.json +1 -1
- package/schemas/zsk-config.schema.json +122 -2
- package/templates/issue/default/issue.md +35 -2
- package/templates/module/frontend-module/acceptance.md +18 -0
- package/templates/module/frontend-module/archive.md +17 -0
- package/templates/module/frontend-module/commit.md +15 -0
- package/templates/module/frontend-module/demo-outline.md +59 -0
- package/templates/module/frontend-module/demo-report.md +23 -0
- package/templates/module/frontend-module/deploy.md +18 -0
- package/templates/module/frontend-module/design.md +12 -0
- package/templates/module/frontend-module/module.yaml +4 -1
- package/templates/module/frontend-module/proposal.md +7 -0
- package/templates/module/frontend-module/ready.md +12 -0
- package/templates/module/frontend-module/review.md +12 -0
- package/templates/module/frontend-module/scenarios/index.md +13 -0
- package/templates/module/frontend-module/scenarios/p0-happy-path.spec.ts +13 -0
- package/templates/module/frontend-module/smoke.md +21 -0
- package/templates/module/frontend-module/spec.md +14 -0
- package/templates/module/frontend-module/tasks.md +13 -0
- package/templates/module/frontend-module/verify.md +12 -0
- package/templates/project-init/.issues/README.md +17 -1
- package/templates/project-init/.issues/_taxonomy.md +35 -0
- package/templates/project-init/.issues/index.md +7 -0
- package/templates/project-init/.raws/README.md +2 -1
- package/templates/project-init/.raws/backend-repositories/index.md +12 -0
- package/templates/project-init/.raws/index.md +3 -0
- package/templates/project-init/.raws/issues/index.md +4 -0
- package/templates/project-init/.zsk/checkpoints/index.md +4 -0
- package/templates/project-init/.zsk/config.yaml +56 -1
- package/templates/project-init/.zsk/learning/index.md +14 -0
- package/templates/project-init/.zsk/learning/proposals/.gitkeep +1 -0
- package/templates/project-init/.zsk/resource-manifest.json +55 -0
- package/templates/project-init/.zsk/workflow-state.json +6 -0
- package/templates/project-init/project-config.md +154 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# __MODULE_NAME__ Scenarios
|
|
2
|
+
|
|
3
|
+
Reusable demo, verify, and regression scenarios for this module.
|
|
4
|
+
|
|
5
|
+
## Scenario Lifecycle
|
|
6
|
+
|
|
7
|
+
| Stage | Responsibility |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Spec | Define scenario contract and FR/AC linkage |
|
|
10
|
+
| Design | Define locator/state/auth/evidence strategy |
|
|
11
|
+
| Task | Create Playwright skeleton and fixture work |
|
|
12
|
+
| Demo | Execute, record, and promote scenarios |
|
|
13
|
+
| Verify | Reuse scenarios for fix verification |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
test.describe("__MODULE_NAME__ demo scenarios", () => {
|
|
4
|
+
test("P0 happy path", async ({ page }) => {
|
|
5
|
+
test.skip(!process.env.ZSK_DEMO_BASE_URL, "Set ZSK_DEMO_BASE_URL to run this scenario.");
|
|
6
|
+
|
|
7
|
+
await page.goto(process.env.ZSK_DEMO_BASE_URL);
|
|
8
|
+
|
|
9
|
+
// Replace this with the scenario contract from spec.md and locator strategy from design.md.
|
|
10
|
+
await expect(page).toHaveURL(/.+/);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# __MODULE_NAME__ Smoke
|
|
2
|
+
|
|
3
|
+
## Resource Contract
|
|
4
|
+
|
|
5
|
+
| Resource | Required | Source | Status | Used For | Blocker If Missing |
|
|
6
|
+
| --- | --- | --- | --- | --- | --- |
|
|
7
|
+
|
|
8
|
+
## Checks
|
|
9
|
+
|
|
10
|
+
| Check | Command | Result | Evidence |
|
|
11
|
+
| --- | --- | --- | --- |
|
|
12
|
+
|
|
13
|
+
## Test Alignment
|
|
14
|
+
|
|
15
|
+
| Test / Scenario | Source Requirement / Design / Issue | Expected Behavior | Accurate | Evidence |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
|
|
18
|
+
## Documentation Feedback
|
|
19
|
+
|
|
20
|
+
- No-update rationale:
|
|
21
|
+
- Created from the ZSK module template; no smoke has been performed yet.
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# __MODULE_NAME__ Spec
|
|
2
2
|
|
|
3
|
+
## Scenario Contracts
|
|
4
|
+
|
|
5
|
+
| Scenario | User Goal | Entry | Preconditions | Observable Result | PRD/SRS / FR/AC | Automate |
|
|
6
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
7
|
+
| P0 happy path | | | | | | yes |
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
|
|
11
|
+
- Define behavior and observable outcomes here.
|
|
12
|
+
- Link every P0/P1 scenario back to the original PRD/SRS or accepted FR/AC.
|
|
13
|
+
- Mark unclear or conflicting facts as blockers instead of choosing behavior silently.
|
|
14
|
+
- Do not write brittle selectors in spec.
|
|
15
|
+
- Mark which P0/P1 scenarios must become Playwright cases.
|
|
16
|
+
|
|
3
17
|
## Documentation Feedback
|
|
4
18
|
|
|
5
19
|
- No-update rationale:
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# __MODULE_NAME__ Tasks
|
|
2
2
|
|
|
3
|
+
## Playwright Case Tasks
|
|
4
|
+
|
|
5
|
+
| Task | Scenario Contract | Case File | Fixture/Auth | Reuse Target | Status |
|
|
6
|
+
| --- | --- | --- | --- | --- | --- |
|
|
7
|
+
| Create P0 happy path skeleton | P0 happy path | `scenarios/p0-happy-path.spec.ts` | | demo, verify, regression | TODO |
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
|
|
11
|
+
- Create Playwright skeletons before demo.
|
|
12
|
+
- Create or update source-aligned tests/scenarios before implementation for testable behavior changes.
|
|
13
|
+
- Tag cases as smoke/demo/verify/regression.
|
|
14
|
+
- Include tasks for labels/test ids required by stable locators.
|
|
15
|
+
|
|
3
16
|
## Documentation Feedback
|
|
4
17
|
|
|
5
18
|
- No-update rationale:
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
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
|
+
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
|
+
|
|
5
7
|
## Directory Contract
|
|
6
8
|
|
|
7
9
|
```text
|
|
8
10
|
.issues/
|
|
9
11
|
├── README.md
|
|
12
|
+
├── index.md # global module issue totals
|
|
10
13
|
└── {area-or-module}/
|
|
11
|
-
├──
|
|
14
|
+
├── index.md # module issue index and status table
|
|
12
15
|
├── BUG-0001-short-slug/
|
|
13
16
|
│ ├── issue.md # required issue body
|
|
14
17
|
│ ├── analysis.md # optional root-cause notes
|
|
@@ -17,12 +20,19 @@ This is the default issue root configured by `.zsk/config.yaml` `paths.issues`.
|
|
|
17
20
|
│ │ └── index.md
|
|
18
21
|
│ └── debug-logs/ # console, test, network, investigation logs
|
|
19
22
|
│ └── index.md
|
|
23
|
+
├── demo/ # optional stage view / evidence bucket
|
|
24
|
+
│ └── index.md
|
|
20
25
|
├── _evidence/ # shared evidence referenced by multiple issues/docs
|
|
21
26
|
└── _debug-logs/ # untriaged or cross-issue historical logs only
|
|
22
27
|
```
|
|
23
28
|
|
|
24
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.
|
|
25
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
|
+
|
|
26
36
|
## Bug Directory Rules
|
|
27
37
|
|
|
28
38
|
- Keep one confirmed bug per `BUG-xxxx-short-slug/` directory.
|
|
@@ -32,6 +42,12 @@ Use `zsk issue create -m <module-id>` to generate issue folders from the package
|
|
|
32
42
|
- Use `analysis.md` only when root-cause reasoning is long enough that it would obscure the issue body.
|
|
33
43
|
- If two symptoms share one root cause, keep one bug directory and list all symptoms as evidence inside it.
|
|
34
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
|
+
|
|
35
51
|
## Relationship To Other Project Directories
|
|
36
52
|
|
|
37
53
|
| Directory | Purpose | May contain local screenshots/logs? |
|
|
@@ -0,0 +1,35 @@
|
|
|
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.
|
|
@@ -11,7 +11,8 @@ Start from `index.md` for the human/AI resource entry point. Use `manifest.json`
|
|
|
11
11
|
- `index.md`: human/AI navigation entry point for raw resources.
|
|
12
12
|
- `manifest.json`: machine-readable index maintained by `zsk prep` / `zsk sync`.
|
|
13
13
|
- `requirements/`: SRS, PRD, acceptance notes, and other requirement snapshots.
|
|
14
|
-
- `api-contracts/`: OpenAPI files,
|
|
14
|
+
- `api-contracts/`: OpenAPI files, API schemas, or exported API notes.
|
|
15
|
+
- `backend-repositories/`: small backend repository extracts that prove API/domain behavior.
|
|
15
16
|
- `design-sources/`: Figma, Modao, design handoff, and MCP capture snapshots.
|
|
16
17
|
- `design-assets/`: Icons, images, tokens, and other design asset snapshots.
|
|
17
18
|
- `testing/`: QA cases, acceptance cases, release cases, and imported test assets.
|
|
@@ -0,0 +1,12 @@
|
|
|
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.
|
|
@@ -13,6 +13,8 @@ This file is the human/AI entry point for upstream facts and local snapshots. It
|
|
|
13
13
|
│ └── index.md
|
|
14
14
|
├── api-contracts/ # API contracts, OpenAPI files, backend repo extracts
|
|
15
15
|
│ └── index.md
|
|
16
|
+
├── backend-repositories/ # lightweight backend repo extracts
|
|
17
|
+
│ └── index.md
|
|
16
18
|
├── design-sources/ # Figma, Modao, MCP, design handoff captures
|
|
17
19
|
│ └── index.md
|
|
18
20
|
├── design-assets/ # icons, images, tokens, screenshots, raw design assets
|
|
@@ -33,6 +35,7 @@ Real origins belong in `.zsk/config.yaml` `sources`. A source can be an online U
|
|
|
33
35
|
|---|---|---|
|
|
34
36
|
| Requirements | `requirements/index.md` | `srs`, `prd`, `manual` |
|
|
35
37
|
| API contracts | `api-contracts/index.md` | `api_contract`, `vendor_doc` |
|
|
38
|
+
| Backend repositories | `backend-repositories/index.md` | `backend_repo`, git repository extracts |
|
|
36
39
|
| Design sources | `design-sources/index.md` | `design`, Figma, Modao, MCP |
|
|
37
40
|
| Design assets | `design-assets/index.md` | `design_asset`, tokens, images |
|
|
38
41
|
| Testing assets | `testing/index.md` | `test_case`, QA sheets, acceptance cases |
|
|
@@ -25,15 +25,70 @@ paths:
|
|
|
25
25
|
# kind: figma
|
|
26
26
|
# url: https://www.figma.com/file/...
|
|
27
27
|
# snapshot: .raws/design-sources/figma-main.json
|
|
28
|
+
# backend_api:
|
|
29
|
+
# type: backend_repo
|
|
30
|
+
# origin:
|
|
31
|
+
# kind: git
|
|
32
|
+
# repository: https://github.com/example/backend-api.git
|
|
33
|
+
# path: openapi.yaml
|
|
34
|
+
# snapshot: .raws/backend-repositories/backend-openapi.yaml
|
|
35
|
+
# acceptance_cases:
|
|
36
|
+
# type: test_case
|
|
37
|
+
# origin:
|
|
38
|
+
# kind: url
|
|
39
|
+
# url: https://example.com/qa-cases
|
|
40
|
+
# snapshot: .raws/testing/acceptance-cases.md
|
|
28
41
|
sources: {}
|
|
29
42
|
|
|
30
43
|
tools:
|
|
31
44
|
runtime_ui:
|
|
32
|
-
-
|
|
45
|
+
- playwright_cli
|
|
46
|
+
- playwright_mcp
|
|
47
|
+
- playwright
|
|
33
48
|
- browser_use
|
|
49
|
+
- computer_use
|
|
34
50
|
design:
|
|
35
51
|
- figma_mcp
|
|
36
52
|
|
|
37
53
|
modules:
|
|
38
54
|
index: docs/_module-index.md
|
|
39
55
|
root: docs
|
|
56
|
+
|
|
57
|
+
automation:
|
|
58
|
+
smoke:
|
|
59
|
+
commands:
|
|
60
|
+
- pnpm lint
|
|
61
|
+
- pnpm typecheck
|
|
62
|
+
- pnpm test
|
|
63
|
+
deploy:
|
|
64
|
+
command: pnpm deploy:staging
|
|
65
|
+
demo:
|
|
66
|
+
# Default hybrid lane:
|
|
67
|
+
# - Playwright CLI/UI mode is preferred for visible demo performance, controlled stop/pause, screenshots, traces, reports, and repeatable runs.
|
|
68
|
+
# - Playwright MCP inspects structured accessibility snapshots and proposes operations when needed.
|
|
69
|
+
# - Browser Use identifies the human-intent target and preserves existing logged-in browser/profile state when auth cannot be reproduced cheaply.
|
|
70
|
+
# - Computer Use is reserved for visual/system-level context that browser automation cannot expose.
|
|
71
|
+
# - Playwright consumes the handoff to pre-write/rehearse scenarios, then performs the external demo with visible trace/report evidence.
|
|
72
|
+
defaultMode: hybrid
|
|
73
|
+
baseUrl: http://localhost:3000
|
|
74
|
+
command: pnpm dev
|
|
75
|
+
evidenceDir: .issues/{module}/demo/_evidence
|
|
76
|
+
scenarioDir: docs/{module}/scenarios
|
|
77
|
+
playwright:
|
|
78
|
+
config: playwright.config.ts
|
|
79
|
+
project: chromium
|
|
80
|
+
cli: playwright-cli
|
|
81
|
+
computerUse:
|
|
82
|
+
enabled: false
|
|
83
|
+
role: understand-and-decide
|
|
84
|
+
bridge:
|
|
85
|
+
enabled: true
|
|
86
|
+
# decisionTool may be playwright_mcp for structured accessibility snapshots,
|
|
87
|
+
# browser_use for existing login/profile state, or computer_use for visual/system-level understanding.
|
|
88
|
+
decisionTool: playwright_mcp
|
|
89
|
+
executionTool: playwright
|
|
90
|
+
planFile: .zsk/demo-sessions/{module}/operation-plan.json
|
|
91
|
+
executionFile: .zsk/demo-sessions/{module}/playwright-execution.json
|
|
92
|
+
verify:
|
|
93
|
+
commands:
|
|
94
|
+
- pnpm test:e2e
|
|
@@ -0,0 +1,14 @@
|
|
|
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
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`
|