@captain_z/zsk 1.7.0 → 1.8.2

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 (93) hide show
  1. package/dist/bin.js +196 -12
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/check.js +107 -16
  4. package/dist/commands/check.js.map +1 -1
  5. package/dist/commands/config.d.ts +11 -0
  6. package/dist/commands/config.js +132 -3
  7. package/dist/commands/config.js.map +1 -1
  8. package/dist/commands/demo.js +2 -2
  9. package/dist/commands/demo.js.map +1 -1
  10. package/dist/commands/dispatch.d.ts +11 -0
  11. package/dist/commands/dispatch.js +69 -0
  12. package/dist/commands/dispatch.js.map +1 -0
  13. package/dist/commands/doctor.d.ts +4 -0
  14. package/dist/commands/doctor.js +102 -0
  15. package/dist/commands/doctor.js.map +1 -0
  16. package/dist/commands/gate.d.ts +9 -0
  17. package/dist/commands/gate.js +48 -0
  18. package/dist/commands/gate.js.map +1 -0
  19. package/dist/commands/issue.d.ts +2 -1
  20. package/dist/commands/issue.js +72 -27
  21. package/dist/commands/issue.js.map +1 -1
  22. package/dist/commands/module.js +32 -0
  23. package/dist/commands/module.js.map +1 -1
  24. package/dist/commands/prep.d.ts +2 -4
  25. package/dist/commands/prep.js +1 -37
  26. package/dist/commands/prep.js.map +1 -1
  27. package/dist/commands/prepare.d.ts +17 -0
  28. package/dist/commands/prepare.js +259 -0
  29. package/dist/commands/prepare.js.map +1 -0
  30. package/dist/commands/project-init.d.ts +1 -0
  31. package/dist/commands/project-init.js +28 -24
  32. package/dist/commands/project-init.js.map +1 -1
  33. package/dist/commands/template.d.ts +2 -0
  34. package/dist/commands/template.js +34 -0
  35. package/dist/commands/template.js.map +1 -0
  36. package/dist/core/config.d.ts +86 -1
  37. package/dist/core/config.js +181 -21
  38. package/dist/core/config.js.map +1 -1
  39. package/dist/core/origin-detection.d.ts +10 -0
  40. package/dist/core/origin-detection.js +135 -0
  41. package/dist/core/origin-detection.js.map +1 -0
  42. package/dist/core/prepare-lifecycle.d.ts +54 -0
  43. package/dist/core/prepare-lifecycle.js +302 -0
  44. package/dist/core/prepare-lifecycle.js.map +1 -0
  45. package/dist/core/prepare-sync.d.ts +82 -0
  46. package/dist/core/prepare-sync.js +1499 -0
  47. package/dist/core/prepare-sync.js.map +1 -0
  48. package/dist/core/raw-manifest.d.ts +20 -0
  49. package/dist/core/raw-manifest.js +105 -4
  50. package/dist/core/raw-manifest.js.map +1 -1
  51. package/dist/core/source-draft.d.ts +14 -0
  52. package/dist/core/source-draft.js +251 -0
  53. package/dist/core/source-draft.js.map +1 -0
  54. package/dist/core/staffing-plan.d.ts +206 -0
  55. package/dist/core/staffing-plan.js +1115 -0
  56. package/dist/core/staffing-plan.js.map +1 -0
  57. package/dist/core/stage-quality.d.ts +56 -0
  58. package/dist/core/stage-quality.js +487 -0
  59. package/dist/core/stage-quality.js.map +1 -0
  60. package/dist/core/template-registry.d.ts +29 -0
  61. package/dist/core/template-registry.js +289 -0
  62. package/dist/core/template-registry.js.map +1 -0
  63. package/dist/core/workspace-layout.d.ts +5 -3
  64. package/dist/core/workspace-layout.js +34 -20
  65. package/dist/core/workspace-layout.js.map +1 -1
  66. package/package.json +2 -2
  67. package/schemas/zsk-config.schema.json +257 -111
  68. package/templates/issue/default/issue.md +5 -1
  69. package/templates/module/frontend-module/design.md +93 -0
  70. package/templates/module/frontend-module/proposal.md +43 -1
  71. package/templates/module/frontend-module/spec.md +30 -0
  72. package/templates/module/frontend-module/tasks.md +43 -0
  73. package/templates/project-init/.zsk/config.yaml +8 -94
  74. package/templates/project-init/.zsk/docs/PROJECT-CONFIG.md +34 -11
  75. package/templates/project-init/.zsk/docs/SYSTEM-SPEC.md +37 -5
  76. package/templates/project-init/.zsk/modules/index.md +7 -0
  77. package/templates/project-init/.zsk/raws/index.md +15 -0
  78. package/templates/project-init/.zsk/raws/manifest.json +4 -0
  79. package/templates/project-init/.zsk/raws/prepare/backend/index.md +4 -0
  80. package/templates/project-init/.zsk/raws/prepare/design/index.md +3 -0
  81. package/templates/project-init/.zsk/raws/prepare/index.md +4 -0
  82. package/templates/project-init/.zsk/raws/prepare/product/index.md +4 -0
  83. package/templates/project-init/.zsk/raws/prepare/qa/index.md +4 -0
  84. package/templates/project-init/.zsk/raws/prepare/ux/index.md +3 -0
  85. package/templates/project-init/.zsk/roles.yaml +129 -0
  86. package/templates/project-init/.zsk/evidence/.gitkeep +0 -1
  87. package/templates/project-init/.zsk/issues/README.md +0 -58
  88. package/templates/project-init/.zsk/issues/_taxonomy.md +0 -35
  89. package/templates/project-init/.zsk/issues/index.md +0 -7
  90. package/templates/project-init/.zsk/modules/.gitkeep +0 -1
  91. package/templates/project-init/.zsk/plans/.gitkeep +0 -1
  92. package/templates/project-init/.zsk/playwright/.gitkeep +0 -1
  93. package/templates/project-init/.zsk/resources/.gitkeep +0 -1
@@ -1,7 +1,49 @@
1
1
  # __MODULE_NAME__ Proposal
2
2
 
3
+ ## Project Rules Gate
4
+
5
+ | Rule Source | Rule / Constraint | Proposal Impact | Status |
6
+ | --- | --- | --- | --- |
7
+ | `.zsk/docs/PROJECT-CONFIG.md` | | | TODO |
8
+ | `.zsk/docs/SYSTEM-SPEC.md` | | | TODO |
9
+
10
+ Do not draft or pass this proposal until project-level path, source-priority, evidence, issue-routing, and stage-document rules from both files are reflected here or explicitly blocked.
11
+
12
+ ## Problem
13
+
14
+ - Target user / stakeholder:
15
+ - Problem:
16
+ - Why now:
17
+ - Source evidence:
18
+ - Project-rule evidence:
19
+
20
+ ## Scope
21
+
22
+ - In scope:
23
+ - Out of scope:
24
+ - Assumptions:
25
+ - Open questions / blockers:
26
+
27
+ ## Success Criteria
28
+
29
+ | Criterion | Evidence Source | Owner / Next Stage |
30
+ | --- | --- | --- |
31
+ | | | |
32
+
33
+ ## Risks And Rejected Alternatives
34
+
35
+ | Item | Decision | Rationale / Evidence |
36
+ | --- | --- | --- |
37
+ | | | |
38
+
39
+ ## Best-Practice Checklist
40
+
41
+ - [ ] Problem, target user, business outcome, scope, non-goals, success criteria, risks, and blockers are explicit.
42
+ - [ ] Local configured sources were used before external/current research.
43
+ - [ ] External/current research, if used, is separated from accepted product requirements.
44
+ - [ ] Conflicts with `PROJECT-CONFIG.md` or `SYSTEM-SPEC.md` are recorded as blockers or issues.
45
+
3
46
  ## Documentation Feedback
4
47
 
5
48
  - No-update rationale:
6
49
  - Created from the ZSK module template; no proposal has been drafted yet.
7
-
@@ -1,5 +1,26 @@
1
1
  # __MODULE_NAME__ Spec
2
2
 
3
+ ## Project Rules Gate
4
+
5
+ | Rule Source | Rule / Constraint | Behavior Impact | Status |
6
+ | --- | --- | --- | --- |
7
+ | `.zsk/docs/PROJECT-CONFIG.md` | | | TODO |
8
+ | `.zsk/docs/SYSTEM-SPEC.md` | | | TODO |
9
+
10
+ Do not freeze this spec until source-priority, conflict-routing, evidence, and stage-document rules from both project files are reflected in requirements, scenarios, and acceptance criteria.
11
+
12
+ ## Behavior Contract
13
+
14
+ | ID | Requirement | Type | Source / Decision | Priority | Observable Outcome |
15
+ | --- | --- | --- | --- | --- | --- |
16
+ | FR-001 | | FR | | P0 | |
17
+
18
+ ## Acceptance Criteria
19
+
20
+ | AC | Linked Requirement | Given / When / Then | Evidence Route |
21
+ | --- | --- | --- | --- |
22
+ | AC-001 | FR-001 | Given / When / Then | |
23
+
3
24
  ## Scenario Contracts
4
25
 
5
26
  | Scenario | User Goal | Entry | Preconditions | Observable Result | PRD/SRS / FR/AC | Automate |
@@ -10,9 +31,18 @@ Rules:
10
31
 
11
32
  - Define behavior and observable outcomes here.
12
33
  - Link every P0/P1 scenario back to the original PRD/SRS or accepted FR/AC.
34
+ - Link every project-wide rule that changes behavior back to `PROJECT-CONFIG.md` or `SYSTEM-SPEC.md`.
13
35
  - Mark unclear or conflicting facts as blockers instead of choosing behavior silently.
14
36
  - Do not write brittle selectors in spec.
15
37
  - Mark which P0/P1 scenarios must become Playwright cases.
38
+ - Keep implementation choices out unless they are part of the product contract.
39
+
40
+ ## Best-Practice Checklist
41
+
42
+ - [ ] FR/NFR, scenarios, edge cases, and acceptance criteria are observable.
43
+ - [ ] Every P0/P1 behavior has a source link or is explicitly marked as an assumption/blocker.
44
+ - [ ] Project military rules from `PROJECT-CONFIG.md` and `SYSTEM-SPEC.md` are enforced or blocked.
45
+ - [ ] Design can proceed without hidden chat context.
16
46
 
17
47
  ## Documentation Feedback
18
48
 
@@ -1,5 +1,44 @@
1
1
  # __MODULE_NAME__ Tasks
2
2
 
3
+ ## Project Rules Gate
4
+
5
+ | Rule Source | Rule / Constraint | Task Impact | Status |
6
+ | --- | --- | --- | --- |
7
+ | `.zsk/docs/PROJECT-CONFIG.md` | | | TODO |
8
+ | `.zsk/docs/SYSTEM-SPEC.md` | | | TODO |
9
+
10
+ Do not start coding until path boundaries, evidence routing, issue routing, validation commands, and source-priority rules from both project files are reflected in the task list or recorded as blockers.
11
+
12
+ ## Task Todo List
13
+
14
+ - [ ] T-001:
15
+ - Owner:
16
+ - Depends on:
17
+ - Scope / files:
18
+ - Linked FR/AC:
19
+ - Evidence hook:
20
+ - Stop condition:
21
+ - [ ] T-001.1:
22
+ - Owner:
23
+ - Output:
24
+ - Evidence:
25
+ - [ ] T-001.2:
26
+ - Owner:
27
+ - Output:
28
+ - Evidence:
29
+
30
+ ## Dependency Order
31
+
32
+ | Order | Task / Subtask | Depends On | Can Run In Parallel With | Blocker / Decision Needed |
33
+ | --- | --- | --- | --- | --- |
34
+ | 1 | T-001.1 | | | |
35
+
36
+ ## Coverage Matrix
37
+
38
+ | FR/AC | Implementation Task/Subtask | Test / Scenario Task/Subtask | Docs / Issue / Evidence Task/Subtask |
39
+ | --- | --- | --- | --- |
40
+ | FR-001 / AC-001 | T-001.1 | T-001.2 | |
41
+
3
42
  ## Playwright Case Tasks
4
43
 
5
44
  | Task | Scenario Contract | Case File | Fixture/Auth | Reuse Target | Status |
@@ -8,10 +47,14 @@
8
47
 
9
48
  Rules:
10
49
 
50
+ - Use a Kiro-style checkbox hierarchy: task IDs for deliverables, subtask IDs for executable steps.
51
+ - Every task and subtask must have owner, dependency, output, evidence hook, and stop condition.
11
52
  - Create Playwright skeletons under `__PLAYWRIGHT_SPECS__` before demo.
12
53
  - Create or update source-aligned tests/scenarios before implementation for testable behavior changes.
13
54
  - Tag cases as smoke/demo/verify/regression.
14
55
  - Include tasks for labels/test ids required by stable locators.
56
+ - Do not create vague tasks such as "implement feature"; each task needs scope, dependency, and evidence.
57
+ - Do not treat docs feedback, issue updates, evidence capture, or verification as optional cleanup.
15
58
 
16
59
  ## Documentation Feedback
17
60
 
@@ -5,100 +5,14 @@ layoutVersion: 2
5
5
  project:
6
6
  name: "<project-name>"
7
7
 
8
- paths:
9
- docs: .zsk/docs
10
- modules: .zsk/modules
11
- resources: .zsk/resources
12
- issues: .zsk/issues
13
- evidence: .zsk/evidence
14
- playwright: .zsk/playwright
15
- plans: .zsk/plans
8
+ template:
9
+ id: founder-os
10
+ version: 1
16
11
 
17
- # Resource origins. AI or zsk config setup should fill these with online URLs,
18
- # git repositories, Figma/Modao links, OpenAPI locations, or local files.
19
- # Optional snapshots should land under paths.resources, for example:
20
- #
21
- # sources:
22
- # srs:
23
- # type: srs
24
- # origin:
25
- # kind: url
26
- # url: https://example.com/srs
27
- # snapshot: .zsk/resources/requirements/srs.md
28
- # figma_main:
29
- # type: design
30
- # origin:
31
- # kind: figma
32
- # url: https://www.figma.com/file/...
33
- # snapshot: .zsk/resources/design-sources/figma-main.json
34
- # backend_api:
35
- # type: backend_repo
36
- # origin:
37
- # kind: git
38
- # repository: https://github.com/example/backend-api.git
39
- # path: openapi.yaml
40
- # snapshot: .zsk/resources/backend-repositories/backend-openapi.yaml
41
- # acceptance_cases:
42
- # type: test_case
43
- # origin:
44
- # kind: url
45
- # url: https://example.com/qa-cases
46
- # snapshot: .zsk/resources/testing/acceptance-cases.md
47
- sources: {}
48
-
49
- tools:
50
- runtime_ui:
51
- - playwright_cli
52
- - playwright_mcp
53
- - playwright
54
- - computer_use
55
- - browser_use
56
- design:
57
- - figma_mcp
12
+ mode: standard
13
+ scale: auto
58
14
 
59
- modules:
60
- index: .zsk/modules/_module-index.md
61
- root: .zsk/modules
15
+ sources: {}
62
16
 
63
- automation:
64
- smoke:
65
- commands:
66
- - pnpm lint
67
- - pnpm typecheck
68
- - pnpm test
69
- deploy:
70
- command: pnpm deploy:staging
71
- demo:
72
- # Default optimized lane:
73
- # - Formal test cases come from module tests.raw_cases or sources.testing, normally snapshots under .zsk/resources/testing.
74
- # - Playwright storageState is the preferred way to reuse login/session state without stopping on login pages.
75
- # - Computer Use is the preferred visual/current-page observation lane when it is available and authorized.
76
- # - Browser Use is optional and runtime-specific; use it only where the agent platform supports it and permissions are available.
77
- # - If neither Computer Use nor Browser Use exists, use Playwright MCP/ARIA/CDP snapshots or documented manual evidence as the compatible handoff.
78
- # - zsk/agent generation writes test-plan.json, then Playwright CLI/Skills generate executable .spec.ts cases.
79
- # - Playwright Test executes/debugs and records evidence. No MCP or bridge fallback is used in optimized mode.
80
- # - Use --hybrid explicitly for the legacy bridge lane.
81
- defaultMode: optimized
82
- baseUrl: http://localhost:3000
83
- command: pnpm dev
84
- evidenceDir: .zsk/evidence/{module}/demo
85
- scenarioDir: .zsk/playwright/{module}/specs
86
- playwright:
87
- config: playwright.config.ts
88
- project: chromium
89
- cli: playwright-cli
90
- computerUse:
91
- enabled: false
92
- role: understand-and-decide
93
- bridge:
94
- enabled: true
95
- # Legacy hybrid-only bridge. Not used by defaultMode: optimized.
96
- # Prefer computer_use for visual/system-level understanding when available.
97
- # Fall back to playwright_mcp for structured accessibility snapshots, or browser_use only on runtimes that support it.
98
- decisionTool: playwright_mcp
99
- executionTool: playwright
100
- planFile: .zsk/playwright/{module}/execution/operation-plan.json
101
- executionFile: .zsk/playwright/{module}/execution/playwright-execution.json
102
- verify:
103
- commands:
104
- - pnpm test:e2e
17
+ customize:
18
+ roles: .zsk/roles.yaml
@@ -2,6 +2,16 @@
2
2
 
3
3
  This file is the human-readable companion to `.zsk/config.yaml`.
4
4
 
5
+ ## Halcyon Layer
6
+
7
+ This `.zsk/` workspace is project-specific. It is the Halcyon operating layer for this project: the place where AI agents read raw facts, produce stage documents, route issues/evidence, and prove stage completion. It is not a generic docs folder and it is not a replacement for the application's source tree.
8
+
9
+ Use this layer to answer three questions before execution:
10
+
11
+ - What facts and decisions are authoritative for this project?
12
+ - Which module/stage owns the next artifact?
13
+ - What evidence or issue update proves the stage is complete?
14
+
5
15
  ## Workspace Layout
6
16
 
7
17
  `zsk init` owns only the `.zsk/` workspace by default:
@@ -11,10 +21,11 @@ This file is the human-readable companion to `.zsk/config.yaml`.
11
21
  | `.zsk/config.yaml` | Machine-readable project config and path authority |
12
22
  | `.zsk/docs/` | Project-level docs such as this file and `SYSTEM-SPEC.md` |
13
23
  | `.zsk/modules/{module}/` | Module `module.yaml`, `proposal.md`, `spec.md`, `design.md`, `tasks.md` |
14
- | `.zsk/resources/` | Shared source snapshots and manually provided resources |
15
- | `.zsk/issues/` | Issues and issue indexes created on demand |
16
- | `.zsk/evidence/` | Runtime evidence, screenshots, traces, logs, and verification artifacts |
17
- | `.zsk/playwright/{module}/` | Playwright specs, plans, auth state, results, reports, and execution records |
24
+ | `.zsk/raws/` | Immutable raw fact sources and manifest/index files |
25
+ | `.zsk/modules/{module}/_issues/` | Module-private issue records, created on demand |
26
+ | `.zsk/modules/{module}/_evidence/` | Module-private evidence, screenshots, traces, logs, and verification artifacts, created on demand |
27
+ | `.zsk/modules/{module}/_playwright/` | Module-specific Playwright specs, plans, auth state, results, reports, and execution records, created on demand |
28
+ | `.zsk/playwright/` | Shared Playwright config/auth/helpers only, created on demand |
18
29
 
19
30
  Root `docs/`, `.raws/`, `.issues/`, and `.playwright/` are not default write targets. Use explicit export or migration tooling when you need project-root copies.
20
31
 
@@ -23,17 +34,29 @@ Root `docs/`, `.raws/`, `.issues/`, and `.playwright/` are not default write tar
23
34
  1. `.zsk/config.yaml`
24
35
  2. `.zsk/docs/SYSTEM-SPEC.md`
25
36
  3. Project resource origins listed under `.zsk/config.yaml#sources`
26
- 4. `.zsk/modules/{module}/module.yaml`
27
- 5. `.zsk/modules/{module}/spec.md`
28
- 6. `.zsk/modules/{module}/design.md`
29
- 7. Runtime evidence under `.zsk/evidence/` and `.zsk/playwright/`
37
+ 4. `.zsk/raws/manifest.json` and `.zsk/raws/index.md`
38
+ 5. `.zsk/modules/{module}/module.yaml`
39
+ 6. `.zsk/modules/{module}/spec.md`
40
+ 7. `.zsk/modules/{module}/design.md`
41
+ 8. Runtime evidence under module `_evidence` / `_playwright` or shared `.zsk/evidence` / `.zsk/playwright`
42
+
43
+ When sources conflict, record the conflict under the module `_issues` directory, or shared `.zsk/issues` only for cross-module/global issues, and update the affected module docs with a Documentation Feedback note or an explicit no-update rationale.
44
+
45
+ ## Authoring Rule
46
+
47
+ Every module stage document is a handoff contract:
48
+
49
+ - `proposal.md` explains why the work exists, who it serves, what is in scope, what is out of scope, and how success will be recognized.
50
+ - `spec.md` defines observable behavior, scenarios, acceptance criteria, edge cases, and source-linked assumptions.
51
+ - `design.md` maps approved behavior to implementation surfaces, interfaces, state, data flow, risks, and verification strategy.
52
+ - `tasks.md` breaks the design into ordered work with owners/scope, dependencies, FR/AC coverage, and evidence hooks.
30
53
 
31
- When sources conflict, record the conflict under `.zsk/issues/{module}/` and update the affected module docs with a Documentation Feedback note or an explicit no-update rationale.
54
+ If a document cannot answer its stage questions, stop and record the missing source, decision, blocker, or issue instead of filling the template.
32
55
 
33
56
  ## Maintenance Checklist
34
57
 
35
58
  - Update `.zsk/config.yaml` when paths, tools, or source origins change.
36
59
  - Keep project-wide reusable rules in `.zsk/docs/SYSTEM-SPEC.md`.
37
60
  - Keep module-specific decisions in `.zsk/modules/{module}/`.
38
- - Keep shared raw resources under `.zsk/resources/`.
39
- - Keep runtime outputs out of docs and under `.zsk/evidence/` or `.zsk/playwright/`.
61
+ - Keep shared raw source facts under `.zsk/raws/`.
62
+ - Keep runtime outputs out of docs and under module-private `_evidence` / `_playwright` unless they are deliberately shared under `.zsk/evidence` / `.zsk/playwright`.
@@ -2,20 +2,33 @@
2
2
 
3
3
  This document captures project-wide rules that should guide module work.
4
4
 
5
+ ## Operating Model
6
+
7
+ The `.zsk/` workspace is this project's Halcyon layer. It keeps AI execution grounded by separating:
8
+
9
+ - raw facts under `paths.raws`;
10
+ - project-wide rules under `paths.docs`;
11
+ - module-owned stage contracts under `paths.modules`;
12
+ - runtime evidence under module `_evidence` or shared `paths.evidence`;
13
+ - issue records under module `_issues` or shared/global `paths.issues`;
14
+ - Playwright plans/specs/results under module `_playwright` or shared `paths.playwright`.
15
+
16
+ Agents must use the smallest sufficient lane: read local sources first, run deterministic CLI checks when possible, delegate only when the work has independent expert lanes, and record blockers instead of filling missing facts from chat memory.
17
+
5
18
  ## Path Boundaries
6
19
 
7
20
  - `paths.docs` stores project-level docs only.
8
21
  - `paths.modules` stores module source-of-truth docs.
9
- - `paths.resources` stores shared source snapshots and manually provided resources.
10
- - `paths.issues` stores actionable issue records and indexes created on demand.
11
- - `paths.evidence` stores runtime evidence and verification artifacts.
12
- - `paths.playwright` stores Playwright specs, plans, auth state, results, reports, and execution records.
22
+ - `paths.raws` stores immutable shared source snapshots and manually provided fact sources.
23
+ - Module `_issues` stores module-specific actionable issue records; `paths.issues` is created on demand only for shared/global indexes or cross-module issues.
24
+ - Module `_evidence` stores module-specific runtime evidence and verification artifacts; `paths.evidence` is created on demand only for shared/global evidence.
25
+ - Module `_playwright` stores module-specific Playwright specs, plans, auth state, results, reports, and execution records; `paths.playwright` is created on demand only for shared Playwright assets.
13
26
 
14
27
  Root `docs/`, `.raws/`, `.issues/`, and `.playwright/` are legacy or export surfaces, not default zsk write targets.
15
28
 
16
29
  ## Testing Assets
17
30
 
18
- Original QA, acceptance, release, and manually supplied test cases belong in configured project sources and may be snapshotted under `paths.resources`. Module-derived test plans and Playwright specs belong under `paths.playwright/{module}`.
31
+ Original QA, acceptance, release, and manually supplied test cases belong in configured project sources and may be snapshotted under `paths.raws`, normally `.zsk/raws/qa/testing`. Module-derived test plans and Playwright specs belong under module `_playwright` unless they are intentionally shared under `paths.playwright`.
19
32
 
20
33
  ## Completion Feedback
21
34
 
@@ -25,3 +38,22 @@ Every stage document that changes durable behavior should include Documentation
25
38
  - an explicit no-update rationale.
26
39
 
27
40
  Runtime evidence should be linked from docs, not embedded in docs.
41
+
42
+ ## Stage Document Standards
43
+
44
+ ZSK stage documents are decision artifacts. They are complete only when the next stage can act without hidden chat context.
45
+
46
+ | Stage | Document Mode | Must Prove |
47
+ | --- | --- | --- |
48
+ | `prepare` | Evidence report | Source origins, freshness, conflicts, and raw snapshot paths are known before planning. |
49
+ | `proposal` | Decision brief | Problem, user/business outcome, scope, non-goals, risks, and success criteria are explicit. |
50
+ | `spec` | Behavior contract | FR/NFR, scenarios, edge cases, and acceptance criteria are observable and source-linked. |
51
+ | `design` | Implementation contract | Behavior maps to files/modules/interfaces/state/data flow, with risks and verification strategy. |
52
+ | `task` | Execution plan | Work is ordered, owned, independently reviewable, and tied to FR/AC plus evidence hooks. |
53
+ | `coding` | Implementation evidence | Changed files, behavior, tests, and residual risks are tied back to tasks. |
54
+ | `smoke` | Evidence report | Local proof names the claim, command/scenario, result, artifacts, and failures. |
55
+ | `review` | Evidence report | Findings are severity-ranked, traceable, and cover scope, correctness, tests, risk, and harness compliance. |
56
+ | `ready` | Verification handoff | Fixed issues, AC, evidence, replay steps, version, and residual risks are mapped. |
57
+ | `verify` | Independent evidence | The ready claim is replayed with fresh evidence and pass/fail issue status updates. |
58
+
59
+ Each stage document must separate facts, decisions, assumptions, open questions, evidence, and next action. Do not leave template filler, untraceable "best practice" claims, vague tasks, or unresolved contradictions in a stage artifact.
@@ -0,0 +1,7 @@
1
+ # Module Index
2
+
3
+ Generated and refreshed as modules are added.
4
+
5
+ | Module | Status | Notes |
6
+ | --- | --- | --- |
7
+ | | | |
@@ -0,0 +1,15 @@
1
+ # Raw Source Index
2
+
3
+ Immutable fact sources for this project. Generated and refreshed by `zsk prep`.
4
+
5
+ Active source snapshots should be organized by prepare responsibility lane:
6
+
7
+ - `prepare/product/` for SRS, PRD, business process, acceptance semantics, and work items.
8
+ - `prepare/backend/` for backend repositories, API contracts, data model, and service-boundary evidence.
9
+ - `prepare/design/` for design/prototype sources, screen maps, and visual assets.
10
+ - `prepare/ux/` for user flows, interaction notes, IA, and usability evidence.
11
+ - `prepare/qa/` for test cases, acceptance scenarios, regression matrices, and QA evidence.
12
+
13
+ | Provider | Type | Status | Snapshot / Origin |
14
+ | --- | --- | --- | --- |
15
+ | | | | |
@@ -0,0 +1,4 @@
1
+ {
2
+ "version": 1,
3
+ "resources": []
4
+ }
@@ -0,0 +1,4 @@
1
+ # Backend Sources
2
+
3
+ Backend repositories, API contracts, OpenAPI files, data model notes, auth boundaries, and integration evidence.
4
+
@@ -0,0 +1,3 @@
1
+ # Design Sources
2
+
3
+ Design handoff files, wireframes, prototype exports, visual assets, design tokens, and platform snapshots.
@@ -0,0 +1,4 @@
1
+ # Prepare Source Lanes
2
+
3
+ Reusable source snapshots for prepare. Iterations and releases should reference these snapshots instead of copying source content.
4
+
@@ -0,0 +1,4 @@
1
+ # Product Sources
2
+
3
+ SRS, PRD, business process, acceptance semantics, product decisions, and work items.
4
+
@@ -0,0 +1,4 @@
1
+ # QA Sources
2
+
3
+ QA cases, acceptance cases, regression matrices, test data, and verification source material.
4
+
@@ -0,0 +1,3 @@
1
+ # UX Sources
2
+
3
+ User flows, interaction maps, screen behavior notes, usability findings, and experience research artifacts.
@@ -0,0 +1,129 @@
1
+ # ZSK role resource pool.
2
+ # Skills dispatch work to these roles as needed; stages and lanes are routing
3
+ # hints, not hard limits. Projects may add roles or lane aliases freely.
4
+
5
+ version: 1
6
+
7
+ roles:
8
+ lead-integrator:
9
+ subagentType: planner
10
+ required: true
11
+ activation: required
12
+ reason: Own stage scope, dispatch boundaries, integration, and final evidence.
13
+
14
+ product-owner:
15
+ subagentType: analyst
16
+ stages: [prepare, proposal, spec, review, verify, acceptance]
17
+ lanes: [product, pm, requirement, requirements, srs, prd]
18
+ activation: when product or requirement evidence is configured or in scope
19
+ reason: Interpret product scope, requirement semantics, priorities, and acceptance gaps.
20
+
21
+ business-analyst:
22
+ subagentType: analyst
23
+ stages: [proposal, spec]
24
+ lanes: [business, domain, process, rules]
25
+ activation: when domain process or business-rule evidence is configured or in scope
26
+ reason: Map domain process, terminology, business rules, and edge cases.
27
+
28
+ architect:
29
+ subagentType: architect
30
+ stages: [proposal, spec, design, review]
31
+ activation: when architecture, API, system-boundary, or dependency decisions are in scope
32
+ reason: Review system boundaries, module relationships, contracts, and technical risks.
33
+
34
+ backend-engineer:
35
+ subagentType: executor
36
+ stages: [prepare, design]
37
+ lanes: [backend, api, service, server, repository, repo, repos]
38
+ activation: when backend, API, service, repository, or data sources are configured
39
+ reason: Inspect backend sources, API contracts, data models, and service-boundary gaps.
40
+
41
+ frontend-engineer:
42
+ subagentType: executor
43
+ stages: [design]
44
+ lanes: [frontend, web, client, mobile]
45
+ activation: when frontend implementation, routing, state, or UI integration is in scope
46
+ reason: Map UI implementation, routing, state, and component integration risk.
47
+
48
+ design-specialist:
49
+ subagentType: designer
50
+ stages: [prepare, design]
51
+ lanes: [design, ui, visual]
52
+ activation: when design, UI, visual, prototype, or asset sources are configured
53
+ reason: Inspect design assets, screens, visual states, and design-source gaps.
54
+
55
+ ux-specialist:
56
+ subagentType: designer
57
+ stages: [prepare]
58
+ lanes: [ux, ue, user-experience, research]
59
+ activation: when UX, UE, user-flow, or research sources are configured
60
+ reason: Inspect user flows, interaction constraints, and usability ambiguity.
61
+
62
+ qa-engineer:
63
+ subagentType: test-engineer
64
+ stages: [prepare, spec, task, coding, review, verify]
65
+ lanes: [qa, test, testing, quality]
66
+ activation: when QA, test, acceptance, or quality evidence is configured or in scope
67
+ reason: Connect requirements to acceptance scenarios, test coverage, and verification evidence.
68
+
69
+ security-reviewer:
70
+ subagentType: security-reviewer
71
+ stages: [spec, design, review]
72
+ lanes: [security, sec, auth]
73
+ activation: when auth, permission, privacy, or data-safety boundaries are in scope
74
+ reason: Review trust boundaries, credentials, privacy, and abuse cases.
75
+
76
+ operations-engineer:
77
+ subagentType: executor
78
+ lanes: [ops, devops, release, deploy, platform]
79
+ activation: when environment, CI/CD, deployment, or platform risks are configured or in scope
80
+ reason: Review release, deployment, rollback, and operational risks.
81
+
82
+ auth-fetch-agent:
83
+ subagentType: researcher
84
+ stages: [prepare]
85
+ remoteSources: true
86
+ activation: when remote or provider-managed sources are configured
87
+ reason: Materialize remote/provider sources through explicit auth, session, and fetch contracts.
88
+
89
+ researcher:
90
+ subagentType: researcher
91
+ stages: [prepare]
92
+ activation: optional when current official or external evidence is required
93
+ reason: Collect official/current external references only when configured local sources are insufficient.
94
+
95
+ planner:
96
+ subagentType: planner
97
+ stages: [task]
98
+ activation: when task sequencing, dependencies, and risk flags are in scope
99
+ reason: Sequence implementation tasks, dependencies, ownership, and evidence hooks.
100
+
101
+ executor:
102
+ subagentType: executor
103
+ stages: [task, coding]
104
+ activation: when implementation ownership, write scope, or scoped code changes are in scope
105
+ reason: Implement or estimate scoped code ownership and write boundaries.
106
+
107
+ technical-writer:
108
+ subagentType: writer
109
+ stages: [proposal, archive]
110
+ activation: when documentation structure, decision records, or handoff clarity are in scope
111
+ reason: Preserve traceable docs, decisions, and reusable learning.
112
+
113
+ senior-engineering-reviewer:
114
+ subagentType: code-reviewer
115
+ stages: [review]
116
+ activation: when execution-path correctness, maintainability, regressions, or API compatibility need review
117
+ reason: Review execution-path correctness, maintainability, regressions, and API boundaries.
118
+
119
+ ue-a11y-reviewer:
120
+ subagentType: designer
121
+ stages: [review]
122
+ activation: when UI, UX, accessibility, i18n, or visual behavior is touched
123
+ reason: Review UX, accessibility, i18n, and visual impacts when UI is touched.
124
+
125
+ verifier:
126
+ subagentType: verifier
127
+ required: true
128
+ activation: required
129
+ reason: Verify stage outputs against source authority and command evidence.
@@ -1,58 +0,0 @@
1
- # .zsk/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
- .zsk/issues/
11
- ├── README.md
12
- ├── _taxonomy.md
13
- ├── index.md # global module issue totals
14
- └── {area-or-module}/
15
- ├── index.md # module issue index and status table
16
- ├── BUG-0001-short-slug/
17
- │ ├── issue.md # required issue body
18
- │ ├── analysis.md # optional root-cause notes
19
- │ ├── reproduction.md # optional detailed repro script
20
- │ ├── assets/ # screenshots, videos, HAR, exported state
21
- │ │ └── index.md
22
- │ └── debug-logs/ # console, test, network, investigation logs
23
- │ └── index.md
24
- ├── demo/ # optional stage view / evidence bucket
25
- │ └── index.md
26
- ├── _evidence/ # shared evidence referenced by multiple issues/docs
27
- └── _debug-logs/ # untriaged or cross-issue historical logs only
28
- ```
29
-
30
- Use `zsk issue create -m <module-id>` to generate issue folders from the packaged template. `zsk init` does not write `_templates/` into the project.
31
-
32
- `zsk issue update -m <module-id> --id <issue-dir> --status <status>` updates the concrete issue and refreshes:
33
-
34
- - `.zsk/issues/{module}/index.md` - all issues and statuses for one module.
35
- - `.zsk/issues/index.md` - module totals across the project.
36
-
37
- ## Bug Directory Rules
38
-
39
- - Keep one confirmed bug per `BUG-xxxx-short-slug/` directory.
40
- - Put the issue body in `issue.md`.
41
- - Put screenshots, recordings, HAR files, JSON payloads, exported browser state, and reproduction artifacts that belong to one bug under that bug's `assets/`.
42
- - Put console output, test output, debug logs, and investigation notes that belong to one bug under that bug's `debug-logs/`.
43
- - Use `analysis.md` only when root-cause reasoning is long enough that it would obscure the issue body.
44
- - If two symptoms share one root cause, keep one bug directory and list all symptoms as evidence inside it.
45
-
46
- ## Closure And Documentation Feedback
47
-
48
- - Record the affected PRD/SRS, spec, design, task, test case, and evidence links in the issue.
49
- - After the fix is verified and confirmed by the user/product owner, update the relevant `.zsk/modules/{module}/spec.md`, `.zsk/modules/{module}/design.md`, `.zsk/modules/{module}/tasks.md`, or `.zsk/docs/SYSTEM-SPEC.md` for gaps or vague behavior exposed by the issue.
50
- - Close the issue only after it links verification evidence, confirmation, documentation feedback update or no-update rationale, and regression guard.
51
-
52
- ## Relationship To Other Project Directories
53
-
54
- | Directory | Purpose | May contain local screenshots/logs? |
55
- |---|---|---|
56
- | `.zsk/resources/` | Upstream facts, mirrored snapshots, original external test cases | No |
57
- | `.zsk/modules/{module}/` | Human-authored module proposal/spec/design/tasks | No |
58
- | `.zsk/issues/{module}/` | Local defects, verification evidence, debug logs, issue-quality records | Yes |