@captain_z/zsk 1.8.6 → 1.8.7

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 (70) hide show
  1. package/dist/bin.js +128 -0
  2. package/dist/bin.js.map +1 -1
  3. package/dist/commands/add-flow.js +7 -1
  4. package/dist/commands/add-flow.js.map +1 -1
  5. package/dist/commands/add.js +22 -5
  6. package/dist/commands/add.js.map +1 -1
  7. package/dist/commands/dispatch.d.ts +4 -0
  8. package/dist/commands/dispatch.js +483 -7
  9. package/dist/commands/dispatch.js.map +1 -1
  10. package/dist/commands/doctor.js +21 -5
  11. package/dist/commands/doctor.js.map +1 -1
  12. package/dist/commands/issue.d.ts +1 -0
  13. package/dist/commands/issue.js +2 -2
  14. package/dist/commands/issue.js.map +1 -1
  15. package/dist/commands/project-init.js +14 -8
  16. package/dist/commands/project-init.js.map +1 -1
  17. package/dist/commands/work.d.ts +34 -0
  18. package/dist/commands/work.js +1769 -0
  19. package/dist/commands/work.js.map +1 -0
  20. package/dist/commands/workflow.d.ts +32 -0
  21. package/dist/commands/workflow.js +270 -0
  22. package/dist/commands/workflow.js.map +1 -0
  23. package/dist/core/config.d.ts +29 -0
  24. package/dist/core/config.js +157 -1
  25. package/dist/core/config.js.map +1 -1
  26. package/dist/core/skill-classification.d.ts +13 -0
  27. package/dist/core/skill-classification.js +50 -0
  28. package/dist/core/skill-classification.js.map +1 -0
  29. package/dist/core/stage-clarity-verification.js +58 -7
  30. package/dist/core/stage-clarity-verification.js.map +1 -1
  31. package/dist/core/template-registry.js +26 -7
  32. package/dist/core/template-registry.js.map +1 -1
  33. package/dist/core/work-ledger.d.ts +44 -0
  34. package/dist/core/work-ledger.js +88 -0
  35. package/dist/core/work-ledger.js.map +1 -0
  36. package/dist/core/work-provider-adapters.d.ts +110 -0
  37. package/dist/core/work-provider-adapters.js +484 -0
  38. package/dist/core/work-provider-adapters.js.map +1 -0
  39. package/dist/core/workflow-graph.d.ts +100 -0
  40. package/dist/core/workflow-graph.js +655 -0
  41. package/dist/core/workflow-graph.js.map +1 -0
  42. package/dist/core/workspace-conformance.js +55 -0
  43. package/dist/core/workspace-conformance.js.map +1 -1
  44. package/dist/core/workspace-layout.d.ts +3 -1
  45. package/dist/core/workspace-layout.js +4 -0
  46. package/dist/core/workspace-layout.js.map +1 -1
  47. package/package.json +2 -2
  48. package/schemas/zsk-config.schema.json +112 -1
  49. package/templates/module/frontend-module/CONTEXT.md +22 -0
  50. package/templates/module/frontend-module/design.md +1 -1
  51. package/templates/module/frontend-module/proposal.md +1 -1
  52. package/templates/module/frontend-module/spec.md +1 -1
  53. package/templates/module/frontend-module/tasks.md +14 -1
  54. package/templates/project-init/.zsk/CONTEXT.md +35 -0
  55. package/templates/project-init/.zsk/README.md +94 -10
  56. package/templates/project-init/.zsk/config.yaml +2 -0
  57. package/templates/project-init/.zsk/docs/CONFIG-SCHEMA.md +13 -1
  58. package/templates/project-init/.zsk/docs/PROJECT-CONFIG.md +25 -7
  59. package/templates/project-init/.zsk/docs/SYSTEM-SPEC.md +1 -0
  60. package/templates/project-init/.zsk/team.yaml +218 -0
  61. package/templates/project-init/.zsk/work.yaml +75 -0
  62. package/templates/project-init/.zsk/evidence/README.md +0 -21
  63. package/templates/project-init/.zsk/evidence/prepare/README.md +0 -22
  64. package/templates/project-init/.zsk/issues/README.md +0 -10
  65. package/templates/project-init/.zsk/templates/module/README.md +0 -13
  66. package/templates/project-init/.zsk/templates/module/design.md +0 -22
  67. package/templates/project-init/.zsk/templates/module/module.yaml +0 -15
  68. package/templates/project-init/.zsk/templates/module/proposal.md +0 -20
  69. package/templates/project-init/.zsk/templates/module/spec.md +0 -22
  70. package/templates/project-init/.zsk/templates/module/tasks.md +0 -16
@@ -13,10 +13,14 @@ declares a durable entry source and the sync run produces a snapshot.
13
13
  | --- | --- | --- | --- |
14
14
  | `.zsk/config.yaml` | config | init/user | commit |
15
15
  | `.zsk/roles.yaml` | staffing policy | init/user | commit |
16
+ | `.zsk/team.yaml` | talent pool | init/user | commit |
17
+ | `.zsk/work.yaml` | work provider mapping | init/user | commit |
18
+ | `.zsk/work.jsonl` | work event ledger | task/issue/dispatch/work sync/status import | commit when created |
19
+ | `.zsk/CONTEXT.md` | project context | init/user/stages | commit |
16
20
  | `.zsk/docs/**` | governance docs | init/user | commit |
17
- | `.zsk/templates/**` | reusable templates | init | commit |
21
+ | `.zsk/templates/config.examples.yaml` | config examples | init | commit |
22
+ | `.zsk/templates/issue-card.md` | issue template | init | commit |
18
23
  | `.zsk/raws/README.md` | resource snapshot contract | init | commit |
19
- | `.zsk/evidence/prepare/README.md` | prepare collaboration contract | init | commit |
20
24
  | `.zsk/evidence/prepare/<run>/config-draft.yaml` | discovered source draft | prepare draft/plan/run | commit for review |
21
25
  | `.zsk/evidence/prepare/<run>/source-promotion-suggestions.md` | human review queue | prepare draft/plan/run | commit for review |
22
26
  | `.zsk/raws/**/snapshot.md` | generated summary | prepare sync | commit |
@@ -26,32 +30,112 @@ declares a durable entry source and the sync run produces a snapshot.
26
30
  | `.zsk/modules/index.md` | module registry view | init/module add | commit |
27
31
  | `.zsk/modules/<module>/**` | module work surface | module add/user | commit |
28
32
  | `.zsk/modules/<module>/_issues/**` | module task cards | prepare sync/user | commit |
29
- | `.zsk/issues/**` | global/cross-module issues | init/prepare/user | commit |
33
+ | `.zsk/issues/**` | global/cross-module issues | issue/prepare/user | commit |
30
34
  | `.zsk/evidence/prepare/sync-report.md` | prepare report | prepare sync | commit |
35
+ | `.zsk/plans/<run>/workflow-graph.{json,yaml,md}` | workflow graph | workflow plan/zskplan | commit |
36
+ | `.zsk/plans/current-workflow-graph.json` | workflow resume pointer | workflow plan/advance/mark | commit |
31
37
  | `.zsk/runs/**` | runtime state | commands | ignore |
32
38
  | `.zsk/state/**` | runtime state | commands | ignore |
33
39
  | `.zsk/tmp/**` | temporary files | commands | ignore |
34
40
 
41
+ ## Lazy Roots
42
+
43
+ `zsk init` does not create these roots. They appear only when an owning command
44
+ has real content to write:
45
+
46
+ | Path | Created When |
47
+ | --- | --- |
48
+ | `.zsk/issues/**` | A shared/global issue is created. |
49
+ | `.zsk/evidence/**` | Prepare, demo, verify, or review writes shared evidence. |
50
+ | `.zsk/resources/**` | A future registry/stage-pack layer earns a separate root. Current resource snapshots use `.zsk/raws/**`. |
51
+ | `.zsk/plans/**` | `zsk workflow plan` or `zskplan` writes a workflow graph or plan artifact. |
52
+ | `.zsk/playwright/**` | Shared Playwright config/auth/helper assets are required. Prefer module `_playwright` first. |
53
+
35
54
  ## Rules
36
55
 
37
56
  - Raw snapshots live under `.zsk/raws/**`.
57
+ - Project-wide terminology, naming decisions, and cross-module decomposition
58
+ rationale live in `.zsk/CONTEXT.md`.
38
59
  - Module work lives under `.zsk/modules/**`.
60
+ - Module-local terminology and decomposition rationale live in
61
+ `.zsk/modules/<module>/CONTEXT.md`.
39
62
  - Module-local issues live under `.zsk/modules/<module>/_issues/**`.
40
- - Global or cross-module blockers live under `.zsk/issues/**`.
63
+ - Global or cross-module blockers live under `.zsk/issues/**` only after a
64
+ scope decision proves they are not module-local.
65
+ - Module templates are owned by `zsk module init`; do not maintain duplicate
66
+ copies under `.zsk/templates/module/**`.
41
67
  - Provider connections are declared once in `.zsk/config.yaml`.
42
68
  - `.zsk/config.yaml` should keep durable entry sources, not every child page,
43
69
  node, issue, or file found during prepare.
44
70
  - Discovered child sources go through `config-draft.yaml` and
45
71
  `source-promotion-suggestions.md`; only human-approved entries are promoted
46
72
  back into `.zsk/config.yaml`.
47
- - Staffing policy lives in `.zsk/roles.yaml`; a specific run's chosen agents
48
- belong in evidence, not in the template.
73
+ - Talent pool policy lives in `.zsk/team.yaml`; roles, agents, and squads stay
74
+ provider-agnostic while provider-specific ids live under adapter references.
75
+ Dispatch maps staffing-plan roles to team roles through
76
+ `assignmentPolicy.dispatch.roleMappings`, then uses
77
+ `assignmentPolicy.dispatch.stageRoutes`, role `subagentTypes`, agent
78
+ `stages/modules/subagentTypes/capacity/priority`, and optional
79
+ `providerCatalogs` to select the most suitable expert. Project-specific
80
+ experts belong in `.zsk/team.yaml` or a configured provider catalog rather
81
+ than CLI code.
82
+ - Work provider mapping lives in `.zsk/work.yaml`; Multica is a default adapter
83
+ reference, but `.zsk/work.jsonl` events stay generic for other providers.
84
+ - `.zsk/work.jsonl` is lazy. Do not create an empty ledger; create it only when
85
+ a skill emits a real work event.
86
+ - `zsk work emit-tasks` reads module `tasks.md` Kiro-style task groups and
87
+ subtasks, then appends generic `work.item.upserted` and parent-child
88
+ `work.item.linked` events to `.zsk/work.jsonl`. Use `--dry-run` first; it
89
+ never calls provider APIs or CLIs.
90
+ - `zsk work sync --dry-run` writes a provider command plan from generic work
91
+ events. Assignment commands preserve role/stage/subagent/selection evidence
92
+ under command `metadata` for adapter-specific execution later. The plan is
93
+ reviewable evidence only; it does not call provider APIs or CLIs.
94
+ - `zsk work import-experts --dry-run` previews normalization of a provider
95
+ expert export into the generic catalog shape. Without `--dry-run`, it writes
96
+ a local catalog only. Dispatch auto-discovers
97
+ `.zsk/providers/<provider>/experts.yaml` when present, so a Multica-style
98
+ talent export can enrich assignment without changing the work ledger schema.
99
+ - `zsk workflow mark --status blocked` and blocked `zsk workflow advance`
100
+ decisions append generic `work.item.blocked` events. Provider updates still
101
+ require `zsk work sync --dry-run` review.
102
+ - `zsk dispatch plan --item <id> --emit-work-assignments` appends generic
103
+ `work.assignment.requested` events for the bound work item from the staffing
104
+ plan, `.zsk/team.yaml` dispatch role mappings, stage routes, role
105
+ `subagentTypes`, local agent pool, and optional provider expert catalog; it
106
+ records the selection source, score, and reasons, and does not call provider
107
+ APIs or CLIs.
108
+ - `zsk work assign --dry-run` previews a `work.assignment.requested` event and
109
+ provider assignment command plan from `.zsk/team.yaml` roles, agents, squads,
110
+ and `.zsk/work.yaml` project mapping.
111
+ - `zsk work assign` without `--dry-run` appends only a generic local
112
+ `work.assignment.requested` event to `.zsk/work.jsonl`; provider assignment
113
+ remains behind `zsk work sync --dry-run`.
114
+ - `zsk work import-status` may append `work.provider_status.imported` events
115
+ from provider exports. When a record explicitly links a local `issue.md`,
116
+ it also updates that issue status block and refreshes issue indexes. When a
117
+ record explicitly links a module `tasks.md`, it updates only a matching
118
+ `zsk-task-status` marker block. It never calls provider APIs or CLIs.
119
+ - Dynamic workflow state lives in `.zsk/plans/**`. Use
120
+ `zsk workflow plan|next|advance|mark` to create, resume, or conservatively
121
+ advance it from existing local evidence; do not create a
122
+ separate top-level runs directory for stage routing.
123
+ - Project-facing documents must use portable paths such as `.zsk/...`,
124
+ `src/...`, `$HOME/...`, or `<workspace>/...`; do not copy personal absolute
125
+ paths like `/Users/<name>/...`, `/home/<name>/...`, `C:\Users\<name>\...`, or
126
+ `/private/var/...` into proposal, spec, design, tasks, Context Records,
127
+ handoffs, archives, issues, or evidence summaries.
49
128
 
50
129
  ## Next Steps
51
130
 
52
131
  1. Edit `.zsk/config.yaml`.
53
- 2. Add modules with `zsk module init -m <module-id> --name "<Module Name>"`.
54
- 3. Run `zsk config check`.
55
- 4. Run `zsk prepare draft` or `zsk prepare plan` to review discovered source
132
+ 2. Review `.zsk/team.yaml` and `.zsk/work.yaml` before syncing or assigning
133
+ work to any external provider.
134
+ 3. Add modules with `zsk module init -m <module-id> --name "<Module Name>"`.
135
+ 4. Run `zsk config check`.
136
+ 5. Run `zsk workflow plan --goal "<goal>"` when a durable stage graph is useful.
137
+ 6. Run `zsk workflow advance` after a stage writes decisive local gate or
138
+ prepare evidence.
139
+ 7. Run `zsk prepare draft` or `zsk prepare plan` to review discovered source
56
140
  candidates before changing `.zsk/config.yaml`.
57
- 5. Run `zsk prepare sync` when resource acquisition is intentionally allowed.
141
+ 8. Run `zsk prepare sync` when resource acquisition is intentionally allowed.
@@ -57,3 +57,5 @@ sources: {}
57
57
 
58
58
  customize:
59
59
  roles: .zsk/roles.yaml
60
+ team: .zsk/team.yaml
61
+ work: .zsk/work.yaml
@@ -13,7 +13,7 @@ not runtime results.
13
13
  | `resources` | Durable entry-source intents to prepare, such as repository roots, issue feeds, document entry pages, design entry nodes, or command/MCP outputs. |
14
14
  | `routes` | Delivery rules from prepared resources to module or shared consumption surfaces. |
15
15
  | `modules` | Module discovery settings and optional module registry entries. |
16
- | `customize` / `staffing` | Pointers to role, workflow, provider, or gate policy files. |
16
+ | `customize` / `staffing` | Pointers to role, workflow, team, work-provider, or gate policy files. |
17
17
  | `sources` | Compatibility source tree for durable grouped prepare entries. Auto-discovered children stay in draft evidence until promoted. |
18
18
 
19
19
  ## Materialization
@@ -27,9 +27,21 @@ The workspace does not pre-create resource directories.
27
27
  - `routes` entries may update `.zsk/modules/<module>/_issues/**`,
28
28
  `.zsk/modules/<module>/sources.yaml`, or other controlled artifacts.
29
29
  - `zsk prepare sync` writes `.zsk/evidence/prepare/sync-report.md`.
30
+ - `.zsk/work.jsonl` is created lazily only after a skill or future work sync
31
+ command emits a real provider-agnostic work event.
30
32
  - Missing provider credentials or route conflicts must be visible in the report
31
33
  with a clear state, reason, output path, and next action.
32
34
 
35
+ ## Work Management
36
+
37
+ `customize.team` points to `.zsk/team.yaml`, the talent-pool file for roles,
38
+ agents, squads, capacity hints, and assignment policy.
39
+
40
+ `customize.work` points to `.zsk/work.yaml`, the provider mapping file for work
41
+ items, project/module linkage, status mapping, sync policy, and adapter defaults.
42
+ Multica is the default provider, but events remain provider-agnostic so another
43
+ adapter can consume the same ledger later.
44
+
33
45
  ## Resource Output
34
46
 
35
47
  Default raw output is derived from `type + id`, but a resource may override it
@@ -20,8 +20,11 @@ Use this layer to answer three questions before execution:
20
20
  | --- | --- |
21
21
  | `.zsk/config.yaml` | Machine-readable project config and path authority |
22
22
  | `.zsk/roles.yaml` | Project staffing policy and role pool overrides |
23
+ | `.zsk/team.yaml` | Talent pool: roles, agents, squads, and assignment policy |
24
+ | `.zsk/work.yaml` | Work provider mapping, status mapping, sync policy, and adapter defaults |
25
+ | `.zsk/work.jsonl` | Lazy append-only Work Event Ledger, created only after a real work event |
23
26
  | `.zsk/docs/` | Project-level docs such as this file, `SYSTEM-SPEC.md`, `CONFIG-SCHEMA.md`, and `SECURITY.md` |
24
- | `.zsk/modules/{module}/` | Module `module.yaml`, `proposal.md`, `spec.md`, `design.md`, `tasks.md` |
27
+ | `.zsk/modules/{module}/` | Module `CONTEXT.md`, `module.yaml`, `proposal.md`, `spec.md`, `design.md`, `tasks.md` |
25
28
  | `.zsk/raws/` | Entry-driven Resource Snapshot Library |
26
29
  | `.zsk/evidence/prepare/{run}/config-draft.yaml` | Auto-discovered source candidate tree for review |
27
30
  | `.zsk/evidence/prepare/{run}/source-promotion-suggestions.md` | Human review queue for promoting candidates into config |
@@ -32,17 +35,29 @@ Use this layer to answer three questions before execution:
32
35
 
33
36
  Root `docs/`, `.raws/`, `.issues/`, and `.playwright/` are not default write targets. Use explicit export or migration tooling when you need project-root copies.
34
37
 
38
+ ## Path Privacy
39
+
40
+ Stage documents, Context Records, handoffs, archives, issues, and evidence
41
+ summaries should use `.zsk/...`, repo-relative, `$HOME/...`, or `<workspace>/...`
42
+ references. Do not preserve personal home-directory absolute paths such as
43
+ `/Users/<name>/...`, `/home/<name>/...`, `C:\Users\<name>\...`, or
44
+ `/private/var/...` in reusable project docs. If raw acquisition metadata needs
45
+ the original absolute path, keep it in raw/evidence metadata and provide a
46
+ portable alias for downstream design/spec/task docs.
47
+
35
48
  ## Source Priorities
36
49
 
37
50
  1. `.zsk/config.yaml`
38
51
  2. `.zsk/docs/SYSTEM-SPEC.md`
39
52
  3. Project provider/entry-source/route intent in `.zsk/config.yaml`
40
- 4. Prepare drafts and promotion suggestions under `.zsk/evidence/prepare/{run}/`
41
- 5. Materialized resource snapshots under `.zsk/raws/**`
42
- 6. `.zsk/modules/{module}/module.yaml`
43
- 7. `.zsk/modules/{module}/spec.md`
44
- 8. `.zsk/modules/{module}/design.md`
45
- 9. Runtime evidence under module `_evidence` / `_playwright` or shared `.zsk/evidence` / `.zsk/playwright`
53
+ 4. Talent and work-provider policy in `.zsk/team.yaml` and `.zsk/work.yaml`
54
+ 5. Prepare drafts and promotion suggestions under `.zsk/evidence/prepare/{run}/`
55
+ 6. Materialized resource snapshots under `.zsk/raws/**`
56
+ 7. `.zsk/modules/{module}/CONTEXT.md`
57
+ 8. `.zsk/modules/{module}/module.yaml`
58
+ 8. `.zsk/modules/{module}/spec.md`
59
+ 9. `.zsk/modules/{module}/design.md`
60
+ 10. Runtime evidence under module `_evidence` / `_playwright` or shared `.zsk/evidence` / `.zsk/playwright`
46
61
 
47
62
  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.
48
63
 
@@ -118,6 +133,9 @@ narrower page/frame split is justified in the raw artifact.
118
133
  ## Maintenance Checklist
119
134
 
120
135
  - Update `.zsk/config.yaml` when providers, durable entry sources, routes, modules, paths, or tools change.
136
+ - Update `.zsk/team.yaml` when role, agent, squad, capacity, or assignment policy changes.
137
+ - Update `.zsk/work.yaml` when provider, project/module mapping, status mapping, or sync policy changes.
138
+ - Do not create `.zsk/work.jsonl` manually; skills or future work sync commands create it when they emit real work events.
121
139
  - Review `config-draft.yaml` and `source-promotion-suggestions.md` before
122
140
  promoting discovered child resources into `.zsk/config.yaml`.
123
141
  - Keep project-wide reusable rules in `.zsk/docs/SYSTEM-SPEC.md`.
@@ -93,6 +93,7 @@ artifact and any reusable `CONTEXT.md` term, then stop after minimal validation.
93
93
  | FR, NFR, acceptance criteria, scenarios, edge cases | `spec` | Creates observable behavior contracts from proposal/source evidence. Missing quality targets remain `未指定` instead of invented. |
94
94
  | ADR / decision records for architecture, interfaces, state/data flow, storage, migration, dependency, rollback, integration, security, permission, privacy, or public API decisions | `design` | Required only for design-significant decisions. N/A must cite why no such decision exists. |
95
95
  | Proposal/spec/design/ADR alignment and executable work | `task` | Preserves FR/AC/NFR/ADR traceability into task groups, subtasks, evidence, and stop conditions. |
96
+ | Provider-agnostic work items, assignment requests, provider comments, and status sync | `task`, `issue`, `dispatch`, `coding`, `verify` | `task` may create or update work items but must not auto-start provider agents. Dispatch owns assignment requests. Verify owns final verified/done claims. |
96
97
 
97
98
  Downstream stages consume reviewed upstream revisions. They may report gaps, but
98
99
  must not silently rewrite another stage's source of truth.
@@ -0,0 +1,218 @@
1
+ # ZSK talent pool.
2
+ #
3
+ # Roles describe responsibility. Agents describe concrete execution capacity.
4
+ # Squads group agents behind a leader for cross-functional or ambiguous work.
5
+ # Provider-specific ids are adapter references, not ZSK role names.
6
+
7
+ version: 1
8
+
9
+ roles:
10
+ product-owner:
11
+ responsibilities:
12
+ - Own product outcome, scope, priority, and acceptance intent.
13
+ - Keep proposal/spec/task claims tied to sourced product evidence.
14
+ stages: [prepare, preproposal, proposal, spec, task, acceptance]
15
+ subagentTypes: [analyst]
16
+
17
+ business-analyst:
18
+ responsibilities:
19
+ - Convert product, policy, and workflow material into requirements and edge cases.
20
+ - Preserve open questions and conflicts as issues instead of assumptions.
21
+ stages: [prepare, preproposal, proposal, spec]
22
+ subagentTypes: [analyst]
23
+
24
+ researcher:
25
+ responsibilities:
26
+ - Gather and validate external or provider-backed evidence when local sources are insufficient.
27
+ - Record source freshness, uncertainty, and gaps.
28
+ stages: [prepare, preproposal, proposal]
29
+ subagentTypes: [researcher]
30
+
31
+ architect:
32
+ responsibilities:
33
+ - Own module boundaries, interfaces, data flow, integration risks, and ADR-worthy decisions.
34
+ - Keep implementation tasks aligned with design decisions.
35
+ stages: [design, task, review]
36
+ subagentTypes: [architect]
37
+
38
+ frontend-engineer:
39
+ responsibilities:
40
+ - Own browser-facing implementation, UI state, accessibility, and visual/runtime evidence.
41
+ - Preserve TDD and demo evidence for assigned work items.
42
+ stages: [task, coding, demo, smoke]
43
+ subagentTypes: [executor]
44
+
45
+ backend-engineer:
46
+ responsibilities:
47
+ - Own API, data, integration, permission, and service behavior.
48
+ - Preserve contract, migration, and rollback evidence for assigned work items.
49
+ stages: [task, coding, smoke]
50
+ subagentTypes: [executor]
51
+
52
+ test-engineer:
53
+ responsibilities:
54
+ - Define RED/GREEN/REFACTOR expectations, regression coverage, and verification strategy.
55
+ - Reject untestable acceptance criteria or missing evidence hooks.
56
+ stages: [spec, design, task, coding, smoke, verify]
57
+ subagentTypes: [test-engineer, verifier]
58
+
59
+ reviewer:
60
+ responsibilities:
61
+ - Review behavioral risk, maintainability, regressions, and missing evidence.
62
+ - Report findings without taking implementation ownership.
63
+ stages: [review]
64
+ subagentTypes: [code-reviewer, reviewer]
65
+
66
+ verifier:
67
+ responsibilities:
68
+ - Prove or block completion claims against acceptance criteria and fresh evidence.
69
+ - Keep provider done status separate from ZSK verified status.
70
+ stages: [verify, acceptance]
71
+ subagentTypes: [verifier]
72
+
73
+ agents:
74
+ solo-lead:
75
+ roles: [product-owner, architect, reviewer, verifier]
76
+ route: leader-sequential
77
+ capacity: primary
78
+
79
+ product-agent:
80
+ roles: [product-owner, business-analyst, researcher]
81
+ stages: [prepare, preproposal, proposal, spec]
82
+ subagentTypes: [analyst, researcher]
83
+ route: native-or-provider
84
+ capacity: high
85
+ priority: 4
86
+ providerRefs:
87
+ multica:
88
+ agent: product-agent
89
+
90
+ architecture-agent:
91
+ roles: [architect, reviewer]
92
+ stages: [design, task, review]
93
+ subagentTypes: [architect, code-reviewer]
94
+ route: native-or-provider
95
+ capacity: high
96
+ priority: 4
97
+ providerRefs:
98
+ multica:
99
+ agent: architecture-agent
100
+
101
+ frontend-agent:
102
+ roles: [frontend-engineer, test-engineer]
103
+ stages: [task, coding, demo, smoke]
104
+ subagentTypes: [executor, test-engineer]
105
+ route: native-or-provider
106
+ capacity: high
107
+ priority: 4
108
+ providerRefs:
109
+ multica:
110
+ agent: frontend-agent
111
+
112
+ backend-agent:
113
+ roles: [backend-engineer, test-engineer]
114
+ stages: [task, coding, smoke]
115
+ subagentTypes: [executor, test-engineer]
116
+ route: native-or-provider
117
+ capacity: high
118
+ priority: 4
119
+ providerRefs:
120
+ multica:
121
+ agent: backend-agent
122
+
123
+ verification-agent:
124
+ roles: [test-engineer, reviewer, verifier]
125
+ stages: [smoke, review, verify, acceptance]
126
+ subagentTypes: [test-engineer, code-reviewer, verifier]
127
+ route: native-or-provider
128
+ capacity: high
129
+ priority: 4
130
+ providerRefs:
131
+ multica:
132
+ agent: verification-agent
133
+
134
+ squads:
135
+ product:
136
+ leader: product-agent
137
+ members: [product-agent, architecture-agent, verification-agent]
138
+ useWhen:
139
+ - Product direction, resource readiness, or acceptance intent is unclear.
140
+ - External research or source conflict resolution is required.
141
+
142
+ design:
143
+ leader: architecture-agent
144
+ members: [architecture-agent, frontend-agent, backend-agent, verification-agent]
145
+ useWhen:
146
+ - Interfaces, data flow, UX, integration, security, or rollback decisions are coupled.
147
+ - A design decision affects more than one module or implementation lane.
148
+
149
+ delivery:
150
+ leader: solo-lead
151
+ members: [frontend-agent, backend-agent, verification-agent]
152
+ useWhen:
153
+ - Approved task work needs implementation, tests, and verification evidence.
154
+ - Multiple implementation lanes can proceed without write-scope conflict.
155
+
156
+ # Optional provider expert catalogs can enrich the local talent pool without
157
+ # making the work ledger provider-specific. A Multica export can be normalized
158
+ # into a generic experts.yaml with id/providerAgent/roles/stages/modules.
159
+ # `zsk work import-experts` writes `.zsk/providers/<provider>/experts.yaml`,
160
+ # and dispatch auto-discovers that default path when the file exists.
161
+ providerCatalogs:
162
+ # multica:
163
+ # path: .zsk/providers/multica/experts.yaml
164
+
165
+ assignmentPolicy:
166
+ defaultMode: squad-for-ambiguous-direct-for-clear
167
+ directWhen:
168
+ - Work item has a single module, clear role, clear write scope, and test contract.
169
+ squadWhen:
170
+ - Work item crosses product, design, implementation, or verification concerns.
171
+ - Required source, acceptance, or evidence ownership is uncertain.
172
+ neverAutoStartFromStages:
173
+ - task
174
+ requiresDispatchBeforeProviderAssignment: true
175
+ dispatch:
176
+ assignmentMode: agent
177
+ ownerRoleHints:
178
+ enabledForStaffingRoles: [executor, planner]
179
+ stageRoutes:
180
+ prepare:
181
+ roles: [product-owner, business-analyst, researcher, test-engineer]
182
+ subagentTypes: [analyst, researcher, test-engineer]
183
+ proposal:
184
+ roles: [product-owner, business-analyst, architect, researcher]
185
+ subagentTypes: [analyst, architect, researcher]
186
+ spec:
187
+ roles: [product-owner, business-analyst, architect, test-engineer]
188
+ subagentTypes: [analyst, architect, test-engineer]
189
+ design:
190
+ roles: [architect, frontend-engineer, backend-engineer, test-engineer]
191
+ subagentTypes: [architect, executor, test-engineer]
192
+ task:
193
+ roles: [architect, frontend-engineer, backend-engineer, test-engineer]
194
+ subagentTypes: [planner, architect, executor, test-engineer]
195
+ coding:
196
+ roles: [frontend-engineer, backend-engineer, test-engineer]
197
+ subagentTypes: [executor, test-engineer]
198
+ demo:
199
+ roles: [frontend-engineer, test-engineer]
200
+ subagentTypes: [executor, test-engineer]
201
+ review:
202
+ roles: [reviewer, architect, test-engineer]
203
+ subagentTypes: [code-reviewer, architect, test-engineer]
204
+ verify:
205
+ roles: [verifier, test-engineer]
206
+ subagentTypes: [verifier, test-engineer]
207
+ roleMappings:
208
+ auth-fetch-agent: [researcher]
209
+ design-specialist: [frontend-engineer]
210
+ executor: [frontend-engineer, backend-engineer]
211
+ lead-integrator: [verifier, architect, product-owner]
212
+ market-researcher: [researcher]
213
+ planner: [architect, product-owner]
214
+ qa-engineer: [test-engineer]
215
+ senior-engineering-reviewer: [reviewer]
216
+ technical-writer: [product-owner]
217
+ ue-a11y-reviewer: [reviewer, frontend-engineer]
218
+ ux-specialist: [frontend-engineer]
@@ -0,0 +1,75 @@
1
+ # ZSK work management policy.
2
+ #
3
+ # This file maps provider-agnostic ZSK Work Events to external work systems.
4
+ # Multica is the default adapter reference, but .zsk/work.jsonl remains generic
5
+ # and can be translated to Jira, GitHub Issues, GitLab, Linear, or local Markdown.
6
+
7
+ version: 1
8
+
9
+ ledger:
10
+ path: .zsk/work.jsonl
11
+ format: jsonl
12
+ createWhen: first-work-event
13
+ providerAgnostic: true
14
+
15
+ defaultProvider: multica
16
+
17
+ providers:
18
+ multica:
19
+ adapter: multica
20
+ mode: dry-run-until-explicit-sync
21
+ workspace: "<workspace-slug>"
22
+ # Optional generic expert catalog exported or normalized from the provider.
23
+ # Dispatch also auto-discovers .zsk/providers/<provider>/experts.yaml when
24
+ # `zsk work import-experts` creates it.
25
+ # Prefer `.zsk/team.yaml providerCatalogs` when the catalog is part of the
26
+ # local talent-pool contract.
27
+ # expertCatalog:
28
+ # path: .zsk/providers/multica/experts.yaml
29
+ commandPlan:
30
+ executable: multica
31
+ mode: dry-run-template
32
+ projectMapping:
33
+ strategy: module-to-project
34
+ projects: {}
35
+ statusMapping:
36
+ draft: backlog
37
+ ready: todo
38
+ implementing: in_progress
39
+ review: in_review
40
+ verified: done
41
+ blocked: blocked
42
+ cancelled: cancelled
43
+ assignment:
44
+ taskCreatesIssuesOnly: true
45
+ dispatchAssignsAgentsOrSquads: true
46
+ verifyControlsDone: true
47
+
48
+ events:
49
+ accepted:
50
+ - work.item.upserted
51
+ - work.item.linked
52
+ - work.item.status_changed
53
+ - work.provider_status.imported
54
+ - work.assignment.requested
55
+ - work.assignment.accepted
56
+ - work.comment.added
57
+ - work.item.verified
58
+ - work.item.blocked
59
+
60
+ syncPolicy:
61
+ idempotency:
62
+ localKey: workItem.id
63
+ remoteRefPath: externalRefs
64
+ dryRunFirst: true
65
+ createRemoteWhen:
66
+ - provider is configured
67
+ - work item has project, module, stage, local id, title, status, and source artifacts
68
+ updateRemoteWhen:
69
+ - local work item has an existing remote reference
70
+ - status, source links, assignment, comments, or evidence changed
71
+ neverSync:
72
+ - secrets
73
+ - raw credential values
74
+ - provider cookies
75
+ - private auth state paths
@@ -1,21 +0,0 @@
1
- # Shared Evidence
2
-
3
- Use this directory for shared evidence and reports that are not owned by a single
4
- module.
5
-
6
- `zsk prepare sync` writes human-readable preparation reports here, such as:
7
-
8
- ```text
9
- .zsk/evidence/prepare/<run>/config-draft.yaml
10
- .zsk/evidence/prepare/<run>/source-promotion-suggestions.md
11
- .zsk/evidence/prepare/sync-report.md
12
- .zsk/evidence/prepare/blocked-resources.md
13
- ```
14
-
15
- `config-draft.yaml` and `source-promotion-suggestions.md` are review artifacts.
16
- They do not mutate `.zsk/config.yaml`; selected entries must be applied only
17
- after human confirmation.
18
-
19
- Runtime state, temporary files, traces, videos, and raw provider payloads must
20
- stay out of committed evidence unless a workflow explicitly promotes a redacted
21
- artifact.
@@ -1,22 +0,0 @@
1
- # Prepare Evidence
2
-
3
- Prepare runs write per-run artifacts here:
4
-
5
- ```text
6
- .zsk/evidence/prepare/<run>/
7
- repo-inventory.json
8
- config-draft.yaml
9
- source-promotion-suggestions.md
10
- acquisition-plan.json
11
- blocked-sources.md
12
- correspondence-questions.md
13
- ```
14
-
15
- Default collaboration rule:
16
-
17
- - `config-draft.yaml` is a candidate tree, not an applied config.
18
- - `source-promotion-suggestions.md` explains which candidates are ready or need
19
- review.
20
- - `.zsk/config.yaml` changes only after human confirmation.
21
- - `sync-report.md` summarizes actual materialization results after
22
- `zsk prepare sync`.
@@ -1,10 +0,0 @@
1
- # Global Issues
2
-
3
- Use this directory for global or cross-module issues:
4
-
5
- - missing provider credentials;
6
- - blocked resource preparation;
7
- - route conflicts across multiple modules;
8
- - architecture or governance blockers that are not owned by one module.
9
-
10
- Module-specific work belongs in `.zsk/modules/<module>/_issues/**`.
@@ -1,13 +0,0 @@
1
- # Module Template
2
-
3
- Copy this template through `zsk module init`; do not create real module
4
- directories by hand unless the same file contract is preserved.
5
-
6
- Required files:
7
-
8
- - `module.yaml`
9
- - `README.md`
10
- - `proposal.md`
11
- - `spec.md`
12
- - `design.md`
13
- - `tasks.md`
@@ -1,22 +0,0 @@
1
- # Design
2
-
3
- ## Output Quality Check
4
-
5
- status: NEEDS_CLARIFICATION
6
- owner: design
7
- source_basis: []
8
- blocking_items:
9
- - Map approved behavior to implementation surfaces.
10
- next_action: Resolve Interface, data flow, rollout, and verification gaps.
11
-
12
- ## Module
13
-
14
- ## Interfaces
15
-
16
- ## Implementation
17
-
18
- ## Data Flow
19
-
20
- ## Risks
21
-
22
- ## Verification
@@ -1,15 +0,0 @@
1
- # yaml-language-server: $schema=__ZSK_MODULE_SCHEMA_URL__
2
-
3
- module:
4
- id: "<module-id>"
5
- name: "<Module Name>"
6
-
7
- outputs:
8
- docs: .zsk/modules/<module-id>
9
- issues: .zsk/modules/<module-id>/_issues
10
-
11
- tests:
12
- raw_cases: []
13
- derived_cases: []
14
- automated:
15
- e2e: []