@captain_z/zsk-skills 1.8.1 → 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 (199) hide show
  1. package/acceptance/SKILL.md +4 -2
  2. package/acceptance/harness/THIS_SKILL.md +28 -0
  3. package/acceptance/harness/constraints/filesystem-boundaries.md +10 -0
  4. package/acceptance/harness/constraints/skill-role-contract.md +107 -1
  5. package/acceptance/harness/constraints/stage-gates.md +28 -0
  6. package/acceptance/harness/workflow/completion-contract.yaml +27 -0
  7. package/acceptance/harness/workflow/skill-io-contract.yaml +9 -0
  8. package/acceptance/harness/workflow/skill-quality-standards.yaml +44 -0
  9. package/acceptance/harness/workflow/stage-contracts.yaml +8 -8
  10. package/archive/SKILL.md +4 -2
  11. package/archive/harness/THIS_SKILL.md +30 -0
  12. package/archive/harness/constraints/filesystem-boundaries.md +10 -0
  13. package/archive/harness/constraints/skill-role-contract.md +107 -1
  14. package/archive/harness/constraints/stage-gates.md +28 -0
  15. package/archive/harness/workflow/completion-contract.yaml +27 -0
  16. package/archive/harness/workflow/skill-io-contract.yaml +9 -0
  17. package/archive/harness/workflow/skill-quality-standards.yaml +44 -0
  18. package/archive/harness/workflow/stage-contracts.yaml +8 -8
  19. package/coding/SKILL.md +9 -3
  20. package/coding/harness/THIS_SKILL.md +31 -1
  21. package/coding/harness/constraints/filesystem-boundaries.md +10 -0
  22. package/coding/harness/constraints/skill-role-contract.md +107 -1
  23. package/coding/harness/constraints/stage-gates.md +28 -0
  24. package/coding/harness/workflow/completion-contract.yaml +27 -0
  25. package/coding/harness/workflow/skill-io-contract.yaml +10 -0
  26. package/coding/harness/workflow/skill-quality-standards.yaml +48 -0
  27. package/coding/harness/workflow/stage-contracts.yaml +8 -8
  28. package/commit/SKILL.md +4 -2
  29. package/commit/harness/THIS_SKILL.md +28 -0
  30. package/commit/harness/constraints/filesystem-boundaries.md +10 -0
  31. package/commit/harness/constraints/skill-role-contract.md +107 -1
  32. package/commit/harness/constraints/stage-gates.md +28 -0
  33. package/commit/harness/workflow/completion-contract.yaml +27 -0
  34. package/commit/harness/workflow/skill-io-contract.yaml +9 -0
  35. package/commit/harness/workflow/skill-quality-standards.yaml +44 -0
  36. package/commit/harness/workflow/stage-contracts.yaml +8 -8
  37. package/defect/SKILL.md +4 -2
  38. package/defect/harness/THIS_SKILL.md +28 -0
  39. package/defect/harness/constraints/filesystem-boundaries.md +10 -0
  40. package/defect/harness/constraints/skill-role-contract.md +107 -1
  41. package/defect/harness/constraints/stage-gates.md +28 -0
  42. package/defect/harness/workflow/completion-contract.yaml +27 -0
  43. package/defect/harness/workflow/skill-io-contract.yaml +9 -0
  44. package/defect/harness/workflow/skill-quality-standards.yaml +44 -0
  45. package/defect/harness/workflow/stage-contracts.yaml +8 -8
  46. package/demo/SKILL.md +4 -2
  47. package/demo/harness/THIS_SKILL.md +28 -0
  48. package/demo/harness/constraints/filesystem-boundaries.md +10 -0
  49. package/demo/harness/constraints/skill-role-contract.md +107 -1
  50. package/demo/harness/constraints/stage-gates.md +28 -0
  51. package/demo/harness/workflow/completion-contract.yaml +27 -0
  52. package/demo/harness/workflow/skill-io-contract.yaml +9 -0
  53. package/demo/harness/workflow/skill-quality-standards.yaml +44 -0
  54. package/demo/harness/workflow/stage-contracts.yaml +8 -8
  55. package/deploy/SKILL.md +4 -2
  56. package/deploy/harness/THIS_SKILL.md +28 -0
  57. package/deploy/harness/constraints/filesystem-boundaries.md +10 -0
  58. package/deploy/harness/constraints/skill-role-contract.md +107 -1
  59. package/deploy/harness/constraints/stage-gates.md +28 -0
  60. package/deploy/harness/workflow/completion-contract.yaml +27 -0
  61. package/deploy/harness/workflow/skill-io-contract.yaml +9 -0
  62. package/deploy/harness/workflow/skill-quality-standards.yaml +44 -0
  63. package/deploy/harness/workflow/stage-contracts.yaml +8 -8
  64. package/design/SKILL.md +33 -6
  65. package/design/harness/THIS_SKILL.md +40 -2
  66. package/design/harness/constraints/filesystem-boundaries.md +10 -0
  67. package/design/harness/constraints/skill-role-contract.md +107 -1
  68. package/design/harness/constraints/stage-gates.md +28 -0
  69. package/design/harness/workflow/completion-contract.yaml +27 -0
  70. package/design/harness/workflow/skill-io-contract.yaml +15 -1
  71. package/design/harness/workflow/skill-quality-standards.yaml +57 -0
  72. package/design/harness/workflow/stage-contracts.yaml +8 -8
  73. package/dispatch/SKILL.md +2 -0
  74. package/dispatch/harness/THIS_SKILL.md +43 -3
  75. package/dispatch/harness/constraints/filesystem-boundaries.md +10 -0
  76. package/dispatch/harness/constraints/skill-role-contract.md +107 -1
  77. package/dispatch/harness/constraints/stage-gates.md +28 -0
  78. package/dispatch/harness/workflow/completion-contract.yaml +27 -0
  79. package/dispatch/harness/workflow/skill-io-contract.yaml +12 -0
  80. package/dispatch/harness/workflow/skill-quality-standards.yaml +69 -1
  81. package/dispatch/harness/workflow/stage-contracts.yaml +8 -8
  82. package/flow/SKILL.md +7 -4
  83. package/flow/harness/THIS_SKILL.md +41 -3
  84. package/flow/harness/constraints/filesystem-boundaries.md +10 -0
  85. package/flow/harness/constraints/skill-role-contract.md +107 -1
  86. package/flow/harness/constraints/stage-gates.md +28 -0
  87. package/flow/harness/workflow/completion-contract.yaml +27 -0
  88. package/flow/harness/workflow/skill-io-contract.yaml +11 -0
  89. package/flow/harness/workflow/skill-quality-standards.yaml +65 -1
  90. package/flow/harness/workflow/stage-contracts.yaml +8 -8
  91. package/issue/SKILL.md +4 -2
  92. package/issue/harness/THIS_SKILL.md +38 -2
  93. package/issue/harness/constraints/filesystem-boundaries.md +10 -0
  94. package/issue/harness/constraints/skill-role-contract.md +107 -1
  95. package/issue/harness/constraints/stage-gates.md +28 -0
  96. package/issue/harness/workflow/completion-contract.yaml +27 -0
  97. package/issue/harness/workflow/skill-io-contract.yaml +9 -0
  98. package/issue/harness/workflow/skill-quality-standards.yaml +66 -1
  99. package/issue/harness/workflow/stage-contracts.yaml +8 -8
  100. package/learn/SKILL.md +17 -8
  101. package/learn/harness/THIS_SKILL.md +42 -2
  102. package/learn/harness/constraints/filesystem-boundaries.md +10 -0
  103. package/learn/harness/constraints/skill-role-contract.md +107 -1
  104. package/learn/harness/constraints/stage-gates.md +28 -0
  105. package/learn/harness/workflow/completion-contract.yaml +27 -0
  106. package/learn/harness/workflow/skill-io-contract.yaml +9 -0
  107. package/learn/harness/workflow/skill-quality-standards.yaml +72 -1
  108. package/learn/harness/workflow/stage-contracts.yaml +8 -8
  109. package/package.json +1 -1
  110. package/prepare/SKILL.md +27 -14
  111. package/prepare/harness/THIS_SKILL.md +28 -0
  112. package/prepare/harness/constraints/filesystem-boundaries.md +10 -0
  113. package/prepare/harness/constraints/skill-role-contract.md +107 -1
  114. package/prepare/harness/constraints/stage-gates.md +28 -0
  115. package/prepare/harness/workflow/completion-contract.yaml +27 -0
  116. package/prepare/harness/workflow/skill-io-contract.yaml +9 -0
  117. package/prepare/harness/workflow/skill-quality-standards.yaml +44 -0
  118. package/prepare/harness/workflow/stage-contracts.yaml +8 -8
  119. package/proposal/SKILL.md +18 -8
  120. package/proposal/harness/THIS_SKILL.md +31 -0
  121. package/proposal/harness/constraints/filesystem-boundaries.md +10 -0
  122. package/proposal/harness/constraints/skill-role-contract.md +107 -1
  123. package/proposal/harness/constraints/stage-gates.md +28 -0
  124. package/proposal/harness/workflow/completion-contract.yaml +27 -0
  125. package/proposal/harness/workflow/skill-io-contract.yaml +12 -0
  126. package/proposal/harness/workflow/skill-quality-standards.yaml +44 -0
  127. package/proposal/harness/workflow/stage-contracts.yaml +8 -8
  128. package/ready/SKILL.md +4 -2
  129. package/ready/harness/THIS_SKILL.md +28 -0
  130. package/ready/harness/constraints/filesystem-boundaries.md +10 -0
  131. package/ready/harness/constraints/skill-role-contract.md +107 -1
  132. package/ready/harness/constraints/stage-gates.md +28 -0
  133. package/ready/harness/workflow/completion-contract.yaml +27 -0
  134. package/ready/harness/workflow/skill-io-contract.yaml +9 -0
  135. package/ready/harness/workflow/skill-quality-standards.yaml +44 -0
  136. package/ready/harness/workflow/stage-contracts.yaml +8 -8
  137. package/review/SKILL.md +9 -3
  138. package/review/harness/THIS_SKILL.md +31 -1
  139. package/review/harness/constraints/filesystem-boundaries.md +10 -0
  140. package/review/harness/constraints/skill-role-contract.md +107 -1
  141. package/review/harness/constraints/stage-gates.md +28 -0
  142. package/review/harness/workflow/completion-contract.yaml +27 -0
  143. package/review/harness/workflow/skill-io-contract.yaml +10 -0
  144. package/review/harness/workflow/skill-quality-standards.yaml +49 -0
  145. package/review/harness/workflow/stage-contracts.yaml +8 -8
  146. package/smoke/SKILL.md +4 -2
  147. package/smoke/harness/THIS_SKILL.md +31 -1
  148. package/smoke/harness/constraints/filesystem-boundaries.md +10 -0
  149. package/smoke/harness/constraints/skill-role-contract.md +107 -1
  150. package/smoke/harness/constraints/stage-gates.md +28 -0
  151. package/smoke/harness/workflow/completion-contract.yaml +27 -0
  152. package/smoke/harness/workflow/skill-io-contract.yaml +10 -0
  153. package/smoke/harness/workflow/skill-quality-standards.yaml +47 -0
  154. package/smoke/harness/workflow/stage-contracts.yaml +8 -8
  155. package/spec/SKILL.md +18 -8
  156. package/spec/harness/THIS_SKILL.md +32 -0
  157. package/spec/harness/constraints/filesystem-boundaries.md +10 -0
  158. package/spec/harness/constraints/skill-role-contract.md +107 -1
  159. package/spec/harness/constraints/stage-gates.md +28 -0
  160. package/spec/harness/workflow/completion-contract.yaml +27 -0
  161. package/spec/harness/workflow/skill-io-contract.yaml +12 -0
  162. package/spec/harness/workflow/skill-quality-standards.yaml +47 -0
  163. package/spec/harness/workflow/stage-contracts.yaml +8 -8
  164. package/task/SKILL.md +56 -6
  165. package/task/harness/THIS_SKILL.md +41 -0
  166. package/task/harness/constraints/filesystem-boundaries.md +10 -0
  167. package/task/harness/constraints/skill-role-contract.md +107 -1
  168. package/task/harness/constraints/stage-gates.md +28 -0
  169. package/task/harness/workflow/completion-contract.yaml +27 -0
  170. package/task/harness/workflow/skill-io-contract.yaml +14 -0
  171. package/task/harness/workflow/skill-quality-standards.yaml +56 -0
  172. package/task/harness/workflow/stage-contracts.yaml +8 -8
  173. package/verify/SKILL.md +8 -2
  174. package/verify/harness/THIS_SKILL.md +28 -0
  175. package/verify/harness/constraints/filesystem-boundaries.md +10 -0
  176. package/verify/harness/constraints/skill-role-contract.md +107 -1
  177. package/verify/harness/constraints/stage-gates.md +28 -0
  178. package/verify/harness/workflow/completion-contract.yaml +27 -0
  179. package/verify/harness/workflow/skill-io-contract.yaml +9 -0
  180. package/verify/harness/workflow/skill-quality-standards.yaml +44 -0
  181. package/verify/harness/workflow/stage-contracts.yaml +8 -8
  182. package/zsk/SKILL.md +6 -3
  183. package/zsk/harness/THIS_SKILL.md +38 -2
  184. package/zsk/harness/constraints/filesystem-boundaries.md +10 -0
  185. package/zsk/harness/constraints/skill-role-contract.md +107 -1
  186. package/zsk/harness/constraints/stage-gates.md +28 -0
  187. package/zsk/harness/workflow/completion-contract.yaml +27 -0
  188. package/zsk/harness/workflow/skill-io-contract.yaml +9 -0
  189. package/zsk/harness/workflow/skill-quality-standards.yaml +64 -1
  190. package/zsk/harness/workflow/stage-contracts.yaml +8 -8
  191. package/zskplan/SKILL.md +2 -0
  192. package/zskplan/harness/THIS_SKILL.md +38 -2
  193. package/zskplan/harness/constraints/filesystem-boundaries.md +10 -0
  194. package/zskplan/harness/constraints/skill-role-contract.md +107 -1
  195. package/zskplan/harness/constraints/stage-gates.md +28 -0
  196. package/zskplan/harness/workflow/completion-contract.yaml +27 -0
  197. package/zskplan/harness/workflow/skill-io-contract.yaml +9 -0
  198. package/zskplan/harness/workflow/skill-quality-standards.yaml +66 -1
  199. package/zskplan/harness/workflow/stage-contracts.yaml +8 -8
@@ -27,8 +27,8 @@ doNotUseWhen:
27
27
  positiveExamples:
28
28
  - Run zsk:acceptance with the required inputs and produce the documented
29
29
  acceptance artifacts.
30
- - Continue the workflow at acceptance after the prerequisite evidence and
31
- blockers are resolved.
30
+ - Run this skill only for its owned outputs after prerequisites are present;
31
+ let workflow skills decide subsequent stage routing.
32
32
  negativeExamples:
33
33
  - Use zsk:acceptance to skip missing prerequisites or hide unresolved blockers.
34
34
  - Run acceptance for generic chat, unrelated implementation, or another ZSK
@@ -79,9 +79,11 @@ This core skill is governed by the ZSK harness. Enforce these rules even when on
79
79
  - Source of truth: read configured resources before inventing intent; record conflicts instead of choosing silently.
80
80
  - Issue taxonomy: route demo, smoke, review, test, verify, and acceptance findings to the correct issue type.
81
81
  - Skill role: execute the full expert role, including all relevant lanes; partial single-angle execution is a failing result.
82
+ - Collaboration: ordinary stage skills own their declared outputs and handoff quality; workflow skills own route selection. Do not hardcode the next stage inside a stage skill.
82
83
  - Dynamic state awareness: identify the active role/stage, project type, stack, runtime, domain, target users/market, and freshness-sensitive decisions before selecting practices or retrieval sources.
83
84
  - Filesystem boundaries: write ZSK-managed outputs only under the configured `.zsk` workspace paths.
84
85
  - Learning loop: reusable gaps become learning proposals; never mutate core constraints, templates, packs, or skills automatically.
86
+ - Learning authority: reusable ZSK core learning must target the canonical ZSK source repo `.zsk/learning/proposals/`; project-local learning may stay in the current project.
85
87
 
86
88
  When a `harness/` directory is installed beside this file, treat it as the local contract source:
87
89
 
@@ -35,6 +35,20 @@ This file is generated for the installed skill. Read it before executing this sk
35
35
  - `documentation feedback`
36
36
  - `accept/reject evidence`
37
37
 
38
+ ## Collaboration Discipline
39
+
40
+ - Own only this skill's required outputs; do not redefine upstream artifacts or approve downstream work on another skill's behalf.
41
+ - Before handoff, confirm required inputs were consumed, outputs are complete or explicitly BLOCKED, and the next consumer can act without chat memory.
42
+ - If another stage is missing, stale, contradictory, or under-specified, record a blocker, issue, or documentation feedback instead of silently fixing it inside this skill.
43
+
44
+ ## Best-Practice Baseline
45
+
46
+ - Judge lifecycle function, not terminology: accept equivalent project artifacts only when they satisfy the same responsibility, handoff, and evidence need.
47
+ - Treat missing mandatory artifacts, mandatory evidence, required owners, required gates, or downstream-consumable outputs as FAIL or BLOCKED.
48
+ - Write unsupplied numeric thresholds, quality bars, SLOs, coverage targets, and business targets as `未指定`; suggestions must be labeled separately from current policy.
49
+ - Avoid provider lock-in: do not assume Jira, Confluence, Figma, GitHub, GitLab, Linear, Notion, browser tooling, or any platform unless configured sources or evidence identify it.
50
+ - For each required output or finding, name owner, dependency, acceptance condition, verification evidence, and next action.
51
+
38
52
  ## Document Quality Standard
39
53
 
40
54
  - Document mode: `decisionRecord`
@@ -53,6 +67,14 @@ This file is generated for the installed skill. Read it before executing this sk
53
67
  - Links each important claim to a source artifact, command output, issue, scenario, or human decision.
54
68
  - States what is out of scope so later stages do not silently expand work.
55
69
  - Makes the next stage executable without requiring hidden context from chat.
70
+ - Includes a Project Rules Gate that cites PROJECT-CONFIG.md and SYSTEM-SPEC.md constraints, impacts, and blockers.
71
+ - Confirms upstream/downstream consistency before handoff: inputs consumed, outputs complete or blocked, and next consumer can act without chat memory.
72
+ - Accepts different project methods and artifact names only when they provide an equivalent control point with evidence.
73
+ - Uses PASS, FAIL, BLOCKED, or N/A only with evidence; missing mandatory evidence remains a failure, not an assumption.
74
+ - Records numeric targets or thresholds as `未指定` when the project has not supplied them; never invents thresholds to make an output look complete.
75
+ - Names owner, dependency, acceptance condition, and verification evidence for every required output or blocker.
76
+ - Runs or references the stage-entry quality gate before downstream handoff; below-threshold but non-blocking gaps require explicit risk acceptance instead of silent progression.
77
+ - For testable work, verifies test correctness, not only test execution: traceable test basis, meaningful assertions, negative/boundary/regression coverage, and skipped/unrun checks called out.
56
78
  - Links verify report, demo evidence, accepted criteria, and residual risks.
57
79
  - Records documentation feedback or no-update rationale for confirmed learnings.
58
80
 
@@ -78,10 +100,16 @@ This file is generated for the installed skill. Read it before executing this sk
78
100
  ## Document Anti-Patterns
79
101
 
80
102
  - Template-shaped filler that does not resolve a decision.
103
+ - Skipping PROJECT-CONFIG.md or SYSTEM-SPEC.md, or treating their project rules as optional suggestions.
81
104
  - Untraceable claims such as 'should work', 'best practice', or 'user friendly' without evidence or criteria.
82
105
  - Mixing raw source facts, decisions, runtime evidence, and tasks in one undifferentiated section.
83
106
  - Skipping unresolved contradictions instead of recording a blocker, risk, or question.
84
107
  - Optimizing wording while leaving acceptance, evidence, ownership, or next action ambiguous.
108
+ - Passing because a familiar term appears while the equivalent lifecycle function is absent.
109
+ - Inventing project policy, quality thresholds, source mappings, or platform behavior without configured evidence.
110
+ - Treating missing evidence as low risk when the stage output depends on that evidence.
111
+ - Letting a delayed subagent packet block indefinitely instead of marking it stale and falling back or re-emitting.
112
+ - Claiming tests prove behavior when they have no traceable basis, no meaningful assertion, or only prove implementation details.
85
113
  - Accepting without verification evidence.
86
114
  - Letting residual risks remain ownerless.
87
115
 
@@ -16,6 +16,16 @@ Default project paths:
16
16
 
17
17
  Root `docs/`, `.raws/`, `.issues/`, `.playwright/`, and `plans/` are not default write targets for ZSK skills. Use explicit export, promote, import, or migration commands when project-facing root documentation is needed.
18
18
 
19
+ ## Learning Output Authority
20
+
21
+ Learning artifacts must be written according to what they are meant to change:
22
+
23
+ - Project-local learning that only affects the current business/product project may use the current project's `.zsk/learning/proposals/`, created lazily.
24
+ - Reusable ZSK core learning that would change ZSK skills, harness contracts, templates, packs, CLI behavior, defaults, or installer behavior must be written to the canonical ZSK source checkout: `<zsk-core>/.zsk/learning/proposals/`.
25
+ - Resolve `<zsk-core>` from explicit configuration/environment first: `ZSK_LEARNING_REPO`, then `ZSK_CORE_REPO`. If neither is set, the current repository qualifies only when it contains `skills/`, `harness/`, and `packages/cli/`.
26
+ - If no canonical ZSK source checkout is available or writable, do not create a substitute core-learning proposal in the consuming project. Record `BLOCKED` with the missing root, intended proposal title, source evidence, and next action.
27
+ - `zsk init` must not create `.zsk/learning/`; learning directories remain lazy outputs created by `learn` or `archive` only when a concrete proposal is written.
28
+
19
29
  ## Scope Routing Rule
20
30
 
21
31
  Before any skill writes an artifact, classify its scope:
@@ -2,6 +2,107 @@
2
2
 
3
3
  Every ZSK skill is an expert role, not a loose prompt. Before acting, the skill must identify its responsibility, required inputs, required outputs, forbidden scope, expert checks, and evidence obligations from `harness/THIS_SKILL.md`, `workflow/skill-io-contract.yaml`, and this file.
4
4
 
5
+ ## Method-Neutral Best-Practice Baseline
6
+
7
+ ZSK skills must work across project types, team methods, tools, and platforms. A skill must judge the lifecycle function, not the label.
8
+
9
+ - Equivalent artifacts are accepted only with evidence. For example, a project may use use cases instead of user stories, an architecture note instead of a formal C4 diagram, or a release checklist instead of a named release skill, but the artifact must still satisfy the same responsibility and handoff need.
10
+ - Missing mandatory artifacts, mandatory evidence, required owners, required gates, or required downstream-consumable outputs are `FAIL` or `BLOCKED`, not a soft recommendation.
11
+ - Numeric thresholds, quality bars, SLOs, coverage targets, or business targets that are not supplied by project config, docs, or accepted decisions must be written as `未指定`. A skill may propose suggested values separately, but must not present them as current policy.
12
+ - Every required output or finding needs an owner, dependency, acceptance condition, verification evidence, and next action.
13
+ - Security, privacy, data safety, release readiness, test traceability, and continuous improvement are lifecycle concerns. They are N/A only when the project context proves they do not apply.
14
+
15
+ ## Cross-Project Portability Rule
16
+
17
+ Core skills and harness rules must be generic by default.
18
+
19
+ - Do not hardcode Jira, Confluence, Figma, GitHub, GitLab, Linear, Notion, browser tooling, design tooling, or any provider as the only valid path.
20
+ - Detect source/provider behavior from `.zsk/config.yaml`, source URLs, local manifests, exports, and user-approved auth/session evidence.
21
+ - When a provider is unsupported, prefer generic fetch, Playwright/browser capture, local export ingestion, or a clearly blocked adapter request rather than silently dropping the source.
22
+ - If source-to-lane mapping is uncertain, record a question or blocker and ask before choosing. Do not invent that a URL is product, design, QA, backend, or UX without evidence.
23
+
24
+ ## Learning Output Authority
25
+
26
+ Learning output has two different authorities:
27
+
28
+ - Project-specific delivery learning stays with the current project: module archives, `.zsk/docs/SYSTEM-SPEC.md`, module `_issues`, shared/global issue buckets, or project-local `.zsk/learning/proposals/` when the proposal only affects that project.
29
+ - Reusable ZSK core learning belongs to the canonical ZSK source repository: `<zsk-core>/.zsk/learning/proposals/`, because it is intended to change ZSK skills, harness, templates, packs, CLI behavior, or defaults.
30
+
31
+ Resolve `<zsk-core>` in this order:
32
+
33
+ 1. Explicit environment/configured root such as `ZSK_LEARNING_REPO` or `ZSK_CORE_REPO`.
34
+ 2. The current repository if it is recognizably the ZSK source repo, containing `skills/`, `harness/`, and `packages/cli/`.
35
+ 3. Otherwise `BLOCKED`: report the missing canonical ZSK source root and do not scatter reusable core-learning notes into the consuming project.
36
+
37
+ ## Skill Responsibility Matrix
38
+
39
+ Each skill owns one stage contract. Workflow skills may route or schedule work, but ordinary stage skills must not hardcode the next stage, redefine upstream facts, or accept downstream work on behalf of another skill.
40
+
41
+ | Skill | Owns | Does Not Own | Consistency / Handoff |
42
+ | --- | --- | --- | --- |
43
+ | `prepare` | Source discovery, configured origin validation, raws snapshots, manifest, source gaps | Product interpretation, requirements decisions, design choices | Hands source manifest, raws indexes, conflicts, and blockers to `proposal` / `spec`; asks before uncertain source-to-lane mapping |
44
+ | `proposal` | Problem, goal, scope, non-goals, stakeholders, risks, success metrics, decision request | Detailed behavior, architecture, task breakdown, implementation | Every goal and metric must trace to sources or accepted assumptions; hands bounded scope to `spec` |
45
+ | `spec` | FR/NFR, acceptance criteria, scenarios, edge cases, constraints, traceability | Architecture, file/module design, implementation tasks | Every P0/P1 requirement must trace to proposal/source and be testable; hands behavior contract to `design` and `task` |
46
+ | `design` | Architecture, interfaces, data/state flow, design views/diagrams, ADRs or equivalent decisions, tradeoffs, rollout and verification surfaces | Rewriting requirements, task sequencing, coding, decorative diagrams | Every design decision and diagram must trace to spec/AC/NFR, ADR, risk, or verification need; hands implementation map to `task` |
47
+ | `task` | Kiro-style nested checkbox task groups/subtasks, owners, dependencies, scope/files, evidence hooks, coverage matrix | Changing proposal/spec/design intent, coding, review approval | Every task group must align to proposal/spec/design IDs; every subtask must be executable and evidence-backed before `coding` |
48
+ | `coding` | Scoped implementation, changed tests, implementation notes, local validation evidence | Requirements changes, broad refactors, final approval | Every diff maps to task IDs and preserves upstream intent; hands changed files and evidence to `smoke` / `review` |
49
+ | `smoke` | Smallest credible local proof of changed behavior, failure classification, smoke issues | Full acceptance, final verification, release approval | Hands command/scenario evidence and failures to `review`, `defect`, or `ready` |
50
+ | `review` | Scope drift, correctness, maintainability, security, test adequacy, harness compliance findings | Implementing fixes, independent verification, business acceptance | Findings must reference files/artifacts and route fix work to `issue` / `defect` / `coding`; no PASS without evidence adequacy |
51
+ | `commit` | Scoped staging, Lore commit message, commit evidence, known verification gaps | Feature validation, release readiness | Hands immutable change intent and tested/not-tested evidence to `deploy` / `archive` |
52
+ | `deploy` | Release target, deployment command, environment/version, health checks, rollback owner | Product acceptance, postmortem, unrelated infra changes | Hands runtime URL/version, smoke evidence, and rollback path to `demo`, `verify`, or `archive` |
53
+ | `demo` | Source-backed user-visible flow rehearsal, scenario evidence, demo issues | Formal testing, acceptance, invented flows | Consumes spec/design/task case skeletons; routes gaps to `defect` or upstream docs feedback |
54
+ | `defect` | Reproducible defect records, severity, dedupe, fix route | Fix implementation, broad redesign | Links failures to FR/AC/evidence and hands fix route to `coding` / `ready` |
55
+ | `ready` | Verification handoff, issue-evidence matrix, exact claim and version | Fixing defects, independent pass/fail decision | Hands replayable claims and evidence paths to `verify` |
56
+ | `verify` | Independent replay, pass/fail decision, issue status update, regression evidence | Implementation, business acceptance, release changes | Verifies against ready/spec/AC with fresh evidence; hands decision to `acceptance` |
57
+ | `acceptance` | Accept/reject decision, residual risk, business/user confirmation, documentation feedback | New verification, implementation fixes | Hands accepted state, waived risks, or rejection reasons to `archive` / `issue` |
58
+ | `archive` | Final artifact preservation, closed issue audit, learning proposals, release notes | Changing delivered scope, reopening decisions without issue evidence | Preserves decisions/evidence and promotes reusable gaps to `learn` |
59
+ | `learn` | Learning proposal intake, pattern comparison, optimization batch planning, reusable ZSK core proposal routing | Unreviewed mutation of core skills/harness/templates, scattering core learning into consuming projects | Writes project-local learning only for project-specific change; writes reusable core learning to canonical ZSK source repo proposals; requires review/regression before promotion |
60
+ | `issue` | Persistent issue/defect/risk/question records, indexes, owner/status/evidence fields | Resolving the issue by assertion, replacing review/verify | Provides the shared feedback and closure ledger for all stages |
61
+ | `dispatch` | Runtime staffing plan, active roles, write scopes, evidence obligations, durable emit packets, packet status ledger | Business or technical stage output | Supports any stage skill from the resource pool; stale or delayed packets fall back to leader-sequential role simulation |
62
+ | `flow` | Next legal stage decision from state, resources, blockers, profile, and stage-entry quality assessment | Stage artifact production | Routes only when gates allow; reports blockers or quality-confirmation needs instead of forcing progression |
63
+ | `zskplan` | Route freeze, selected skills, output map, expert lane plan, evidence plan, blockers | Implementation and verification | Produces the plan contract that `zsk` executes |
64
+ | `zsk` | End-to-end execution loop, skill dispatch, expert lane integration, validation/fix loop | Skipping selected skill contracts or evidence gates | Executes the frozen or inferred route until complete or blocked |
65
+
66
+ ## Collaboration Consistency Gate
67
+
68
+ Before a skill reports `PASS`, `READY`, `DONE`, or an unblocked handoff, it must prove the following chain remains intact:
69
+
70
+ ```text
71
+ prepare sources
72
+ -> proposal goals / scope / success metrics
73
+ -> spec FR / AC / NFR / scenarios
74
+ -> design decisions / ADRs / interfaces / data flow
75
+ -> task checkbox groups / subtasks / evidence hooks
76
+ -> coding diff / changed tests
77
+ -> smoke or demo evidence
78
+ -> review findings
79
+ -> ready claim
80
+ -> verify result
81
+ -> acceptance decision
82
+ -> archive / learn
83
+ ```
84
+
85
+ Consistency checks:
86
+
87
+ - Upstream input exists, is current enough for the decision, and is explicitly referenced.
88
+ - Current-stage required outputs are complete or marked `BLOCKED` with owner, missing input, impact, and next action.
89
+ - Downstream consumers can use the output without hidden chat memory.
90
+ - Facts, decisions, assumptions, open questions, and evidence are separated.
91
+ - No skill silently changes another skill's artifact; it records a feedback item, issue, or blocker instead.
92
+ - Workflow skills (`flow`, `zskplan`, `zsk`) choose the route. Stage skills state status, blockers, handoff needs, and next legal candidates only.
93
+
94
+ ## Kiro-Style Task Handoff
95
+
96
+ `task` must use nested Markdown checkboxes as the primary execution surface:
97
+
98
+ ```md
99
+ - [ ] 1. <task group>
100
+ - [ ] 1.1 <subtask>
101
+ - [ ] 1.2 <subtask>
102
+ ```
103
+
104
+ Metadata belongs under the relevant checkbox item, not in a detached table alone. Each task group needs proposal/spec/design alignment, owner, dependencies, scope/files, expected output, evidence, and stop condition. Each subtask needs at least source ID, owner, scope/files, expected output, acceptance, and evidence. A task artifact without this hierarchy is not execution-ready.
105
+
5
106
  ## Role Completeness
6
107
 
7
108
  Each skill run must cover its whole declared role:
@@ -70,6 +171,8 @@ For `DEEP` review, dispatch at least three independent expert lanes when subagen
70
171
  - `zskplan` freezes the route and writes the plan artifact under `.zsk/plans/`: selected skills, required inputs, `.zsk` output map, expert lanes, subagent plan, Playwright/auth/evidence plan, fix loop, blockers, and stop condition.
71
172
  - `zsk` executes the frozen or inferred route: it selects the legal skill, dispatches required expert lanes, integrates results, writes only `.zsk` artifacts, validates, fixes, and repeats until the plan is complete or blocked.
72
173
  - Neither entry point may skip a selected skill's own contract, forbidden scope, required inputs, issue routing, or evidence gate.
174
+ - Before entering a downstream stage, the workflow must evaluate required upstream artifact quality or record why the gate is N/A. Below-threshold quality gaps require an explicit risk acceptance; missing mandatory artifacts remain blocked.
175
+ - Every emitted subagent packet must be durable: `runId`, `packetId`, heartbeat/deadline policy, status path, write scope, evidence obligation, stop condition, and fallback route. Stale packets must be completed by fallback evidence or re-emitted; they cannot count as completed work.
73
176
  - When no frozen route exists, `zsk` must perform the `zskplan` route-freeze work first and state the resulting plan.
74
177
  - Plans, Playwright specs, auth state, runtime execution JSON, traces, reports, reusable evidence, issues, and learning proposals must use the configured `.zsk` workspace paths.
75
178
  - Module-local runtime/supporting artifacts use module-private `_issues`, `_evidence`, and `_playwright`; shared, global, or public artifacts use the corresponding outer `.zsk/{kind}` scope bucket.
@@ -83,7 +186,10 @@ For `DEEP` review, dispatch at least three independent expert lanes when subagen
83
186
  - ingest user-supplied public skill or harness references, including URLs, repos, markdown, examples, screenshots, or pasted excerpts;
84
187
  - compare external patterns against current ZSK contracts, source rights, project constraints, and regression needs;
85
188
  - record module-local delivery-impacting problems under module `_issues`, or outer `.zsk/issues/{shared|global|public}` only when the issue scope is not owned by one module;
86
- - write reusable improvement proposals under `.zsk/learning/proposals/`;
189
+ - classify the learning target as project-local, optional-pack, team-local, or reusable ZSK core before writing;
190
+ - write project-local proposals under the current project's `.zsk/learning/proposals/` only when the proposal affects that project alone;
191
+ - write reusable ZSK core proposals under the canonical ZSK source repo `.zsk/learning/proposals/`, resolved by `ZSK_LEARNING_REPO`, `ZSK_CORE_REPO`, or a recognized ZSK source checkout;
192
+ - if the canonical ZSK source repo cannot be resolved or is not writable, report `BLOCKED` with the missing root, intended proposal name, evidence, and next action instead of writing core learning into the consuming project;
87
193
  - group accepted proposals into one optimization batch with target files, regression prompts, risks, and review status.
88
194
 
89
195
  `learn` must not mutate core skills, harness constraints, packs, templates, or generated artifacts from one unreviewed incident. It must not copy external skills or harnesses wholesale; it adapts principles and testable constraints into ZSK proposals with source notes. Promotion requires review evidence and regression prompts.
@@ -17,6 +17,31 @@ The harness computes gate status. Skills may propose outputs and record evidence
17
17
  - `smoke`, `review`, and `verify` must reject tests that cannot be traced to PRD/SRS, spec/design, task, issue, or accepted user clarification.
18
18
  - If the test contract is unclear, the stage is `blocked` until the uncertainty is clarified or recorded as a resource gap.
19
19
 
20
+ ## Stage Entry Quality Gate
21
+
22
+ - Before a downstream stage starts, the harness must assess the required upstream artifacts for that stage with `zsk gate assess --stage <stage>`.
23
+ - The assessment must write a score, PASS/FAIL criteria, blockers, gaps, and next action under `.zsk/evidence/gates/`.
24
+ - A score below the configured threshold is not an infinite hard stop by itself. If all required artifacts exist and only quality gaps remain, the stage may continue only after an explicit human risk acceptance is recorded with `--accept-risk`.
25
+ - Missing required artifacts, placeholder-only upstream docs, missing project/system rules for governed stages, or missing mandatory test basis remain `BLOCKED`; a risk waiver must not convert those into PASS. Very short but non-placeholder artifacts are quality gaps, not hard blockers.
26
+ - Thresholds are project policy. When no project threshold is configured, the CLI default is an advisory 9/10 gate; documents must still record unsupplied numeric thresholds as `未指定` instead of inventing policy.
27
+
28
+ ## Test Correctness Gate
29
+
30
+ - A passing test suite is not sufficient evidence when the tests do not prove the intended behavior.
31
+ - New or changed behavior needs a traceable test basis: PRD/SRS, spec acceptance criteria, design decision, task, issue, or accepted user clarification.
32
+ - Tests must include the meaningful negative, boundary, and regression cases implied by the acceptance criteria. If a case is intentionally omitted, record the omitted case, reason, risk, and owner.
33
+ - For TDD work, prefer a red/green proof or equivalent evidence that the new test fails without the fix. If that is impractical, review must explain the substitute evidence.
34
+ - `smoke`, `review`, and `verify` must reject fake passes: skipped tests, tests with no assertions, tests that only assert mocks were called while ignoring user-visible behavior, tests that assert implementation details instead of contract behavior, or tests that pass because expected data is hardcoded to the implementation.
35
+ - Every test report must distinguish passed, failed, skipped, flaky, unrun, and not-applicable checks. Skipped or unrun checks are not PASS.
36
+
37
+ ## Durable Dispatch Gate
38
+
39
+ - Every dispatched role/subagent lane must have a durable emit packet with `runId`, `packetId`, write scope, evidence obligation, stop condition, status path, and fallback route.
40
+ - Dispatch must write an emit ledger under `.zsk/evidence/dispatch/{run}/emit-ledger.json` plus per-packet status files.
41
+ - Long-running packets must heartbeat before their deadline. A pending or running packet with no heartbeat past deadline becomes `stale`.
42
+ - Stale packets do not block forever. The lead-integrator must either fall back to leader-sequential execution for that lane or re-emit a new bounded packet.
43
+ - A stale, failed, blocked, or waived packet cannot be counted as completed evidence unless the lead-integrator records the fallback result or accepted risk.
44
+
20
45
  ## Gate Status
21
46
 
22
47
  - `blocked`: required resource or evidence is missing.
@@ -25,3 +50,6 @@ The harness computes gate status. Skills may propose outputs and record evidence
25
50
  - `failed`: stage ran but produced blocking findings.
26
51
  - `paused`: resumable session state exists, used by interruptible demo.
27
52
  - `terminated`: session intentionally stopped; follow-up owner is required.
53
+ - `needs-confirmation`: required artifacts exist, but quality score/gaps require human decision before proceeding.
54
+ - `waived`: explicit human risk acceptance allows progression despite non-blocking quality gaps; waiver evidence must be linked.
55
+ - `stale`: a dispatched packet missed its heartbeat/deadline and must fall back or be re-emitted.
@@ -7,6 +7,8 @@ defaults:
7
7
  issue_sync: "Actionable findings must classify scope, update the concrete issue in module-private or shared/global/public storage, and refresh module/global issue indexes."
8
8
  documentation_feedback: "Confirmed learnings must update spec/design/task docs or record a no-update rationale."
9
9
  execution: "Completion work may be done by a skill-local script or by the agent's normal file-editing tools, but the harness contract decides the required outputs."
10
+ stage_gate: "Downstream progression requires a recorded gate assessment or explicit N/A rationale; non-blocking quality gaps need risk acceptance before continuing."
11
+ durable_dispatch: "Dispatched lanes must leave a durable ledger and packet statuses; stale or timed-out lanes require fallback evidence before completion."
10
12
  scopeRouting:
11
13
  moduleFinal: ".zsk/modules/{module}/{stage}.md"
12
14
  modulePrivate:
@@ -107,6 +109,28 @@ outputs:
107
109
  - ".zsk/modules/{module}/archive.md"
108
110
  - ".zsk/learning/proposals/"
109
111
  feedbackTargets: [".zsk/modules/{module}/archive.md", ".zsk/learning/proposals/"]
112
+ learn:
113
+ artifacts:
114
+ - "<zsk-core>/.zsk/learning/proposals/ for reusable ZSK core improvements"
115
+ - ".zsk/learning/proposals/ only for project-local learning"
116
+ - ".zsk/issues/{shared|global|public}/ or .zsk/modules/{module}/_issues/ for delivery-impacting findings"
117
+ feedbackTargets:
118
+ - "<zsk-core>/.zsk/learning/proposals/"
119
+ - ".zsk/learning/proposals/"
120
+ - "harness/learning/promotion-rules.yaml"
121
+ dispatch:
122
+ artifacts:
123
+ - ".zsk/evidence/dispatch/{run}/staffing-plan.json"
124
+ - ".zsk/evidence/dispatch/{run}/staffing-plan.md"
125
+ - ".zsk/evidence/dispatch/{run}/emit-packets.jsonl"
126
+ - ".zsk/evidence/dispatch/{run}/emit-ledger.json"
127
+ - ".zsk/evidence/dispatch/{run}/packet-status/"
128
+ feedbackTargets: [".zsk/evidence/dispatch/{run}/staffing-plan.md"]
129
+ flow:
130
+ artifacts:
131
+ - ".zsk/evidence/gates/{run}/gate-assessment.json"
132
+ - ".zsk/evidence/gates/{run}/gate-assessment.md"
133
+ feedbackTargets: [".zsk/evidence/gates/{run}/gate-assessment.md"]
110
134
  postRun:
111
135
  issueIndexes:
112
136
  module: ".zsk/modules/{module}/_issues/index.md"
@@ -117,6 +141,9 @@ postRun:
117
141
  targets: ["spec", "design", "tasks", "SYSTEM-SPEC", "learning-proposal"]
118
142
  learning:
119
143
  proposalPath: ".zsk/learning/proposals/"
144
+ coreProposalPath: "<zsk-core>/.zsk/learning/proposals/"
145
+ coreRootResolution: "ZSK_LEARNING_REPO -> ZSK_CORE_REPO -> current checkout containing skills/, harness/, and packages/cli/ -> BLOCKED"
146
+ targetRule: "Project-local learning stays in the current project; reusable ZSK core learning must target the canonical ZSK source checkout."
120
147
  createPolicy: "lazy; do not create during zsk init or unrelated stages"
121
148
  createWhen: "only when learn/archive writes a concrete reusable improvement proposal"
122
149
  promoteBy: "harness/learning/promotion-rules.yaml"
@@ -30,6 +30,15 @@ principles:
30
30
  ask, or record a resource gap."
31
31
  - "TDD first for testable behavior: tests and scenarios must be accurate and
32
32
  traceable to PRD/SRS, spec/design, task, issue, or accepted clarification."
33
+ - Stage skills own their declared outputs and handoff quality; workflow skills
34
+ own route selection. Every handoff must preserve upstream/downstream
35
+ consistency instead of relying on chat memory.
36
+ - Before entering a downstream stage, assess upstream artifact quality and
37
+ record READY, NEEDS_CONFIRMATION, BLOCKED, or WAIVED with evidence instead
38
+ of relying on chat confidence.
39
+ - "Subagent dispatch is durable: every emit packet needs a status file,
40
+ heartbeat deadline, timeout policy, and fallback route so delayed lanes
41
+ cannot block the workflow indefinitely."
33
42
  toolPolicy:
34
43
  localFirst:
35
44
  - filesystem
@@ -11,6 +11,19 @@ framework:
11
11
  quality criteria."
12
12
  - "Review workflows: a stage is not complete until another reader can
13
13
  inspect artifacts, evidence, decisions, and unresolved risks."
14
+ - "ISO/IEC/IEEE 12207 and 15288: lifecycle coverage should be method-neutral
15
+ and accepted by equivalent artifacts or control points only when evidence
16
+ exists."
17
+ - "ISO/IEC/IEEE 29148: requirements work must produce traceable, testable
18
+ information items, not only narrative intent."
19
+ - "ISO/IEC/IEEE 42010, C4, and ADR practice: architecture and design
20
+ decisions need context, viewpoints or equivalent structure, rationale,
21
+ tradeoffs, alternatives, and consequences."
22
+ - "ISO/IEC/IEEE 29119 and ISTQB: testing needs test basis, traceability,
23
+ coverage, entry/exit criteria, regression, defect closure, and reports."
24
+ - "NIST SSDF, OWASP ASVS/SAMM, DORA, Scrum, and SAFe: security, release
25
+ readiness, delivery metrics, and continuous improvement must remain part
26
+ of the lifecycle."
14
27
  documentModes:
15
28
  decisionBrief: Frames a decision with context, options, recommendation, risks,
16
29
  and success criteria.
@@ -27,8 +40,29 @@ defaults:
27
40
  scenario, or human decision.
28
41
  - States what is out of scope so later stages do not silently expand work.
29
42
  - Makes the next stage executable without requiring hidden context from chat.
43
+ - Includes a Project Rules Gate that cites PROJECT-CONFIG.md and
44
+ SYSTEM-SPEC.md constraints, impacts, and blockers.
45
+ - "Confirms upstream/downstream consistency before handoff: inputs consumed,
46
+ outputs complete or blocked, and next consumer can act without chat
47
+ memory."
48
+ - Accepts different project methods and artifact names only when they
49
+ provide an equivalent control point with evidence.
50
+ - Uses PASS, FAIL, BLOCKED, or N/A only with evidence; missing mandatory
51
+ evidence remains a failure, not an assumption.
52
+ - Records numeric targets or thresholds as `未指定` when the project has not
53
+ supplied them; never invents thresholds to make an output look complete.
54
+ - Names owner, dependency, acceptance condition, and verification evidence
55
+ for every required output or blocker.
56
+ - Runs or references the stage-entry quality gate before downstream handoff;
57
+ below-threshold but non-blocking gaps require explicit risk acceptance
58
+ instead of silent progression.
59
+ - "For testable work, verifies test correctness, not only test execution:
60
+ traceable test basis, meaningful assertions, negative/boundary/regression
61
+ coverage, and skipped/unrun checks called out."
30
62
  antiPatterns:
31
63
  - Template-shaped filler that does not resolve a decision.
64
+ - Skipping PROJECT-CONFIG.md or SYSTEM-SPEC.md, or treating their project
65
+ rules as optional suggestions.
32
66
  - Untraceable claims such as 'should work', 'best practice', or 'user
33
67
  friendly' without evidence or criteria.
34
68
  - Mixing raw source facts, decisions, runtime evidence, and tasks in one
@@ -37,6 +71,16 @@ defaults:
37
71
  or question.
38
72
  - Optimizing wording while leaving acceptance, evidence, ownership, or next
39
73
  action ambiguous.
74
+ - Passing because a familiar term appears while the equivalent lifecycle
75
+ function is absent.
76
+ - Inventing project policy, quality thresholds, source mappings, or platform
77
+ behavior without configured evidence.
78
+ - Treating missing evidence as low risk when the stage output depends on
79
+ that evidence.
80
+ - Letting a delayed subagent packet block indefinitely instead of marking it
81
+ stale and falling back or re-emitting.
82
+ - Claiming tests prove behavior when they have no traceable basis, no
83
+ meaningful assertion, or only prove implementation details.
40
84
  stages:
41
85
  acceptance:
42
86
  documentMode: decisionRecord
@@ -5,20 +5,20 @@ contracts:
5
5
  optionalResources: [requirements, api-contracts, backend-repositories, design-sources, design-assets, test-cases, market-research, competitor-research, pricing-research, user-research]
6
6
  outputs: [resource-manifest, resource-gaps]
7
7
  proposal:
8
- requiredResources: [requirements]
8
+ requiredResources: [project-config, system-spec, requirements]
9
9
  optionalResources: [market-research, competitor-research, pricing-research, user-personas, user-research, business-model, regulatory-sources]
10
- outputs: [proposal]
10
+ outputs: [project-rules-gate, proposal]
11
11
  spec:
12
- requiredResources: [requirements, proposal]
12
+ requiredResources: [project-config, system-spec, requirements, proposal]
13
13
  optionalResources: [market-research, user-personas, pricing-research, competitor-research]
14
- outputs: [spec, scenario-contracts]
14
+ outputs: [project-rules-gate, spec, scenario-contracts]
15
15
  design:
16
- requiredResources: [spec, code]
16
+ requiredResources: [project-config, system-spec, spec, code]
17
17
  optionalResources: [api-contracts, design-sources, design-assets, user-personas, competitive-benchmarks]
18
- outputs: [design, locator-strategy, playwright-scenario-plan]
18
+ outputs: [project-rules-gate, design, design-views, locator-strategy, playwright-scenario-plan]
19
19
  task:
20
- requiredResources: [spec, design]
21
- outputs: [tasks, playwright-case-skeletons, scenario-synthesis-plan]
20
+ requiredResources: [project-config, system-spec, spec, design]
21
+ outputs: [project-rules-gate, kiro-style-nested-checkbox-todo-list, proposal-spec-design-alignment-matrix, tasks, playwright-case-skeletons, scenario-synthesis-plan]
22
22
  coding:
23
23
  requiredResources: [tasks, code]
24
24
  outputs: [implementation]
package/archive/SKILL.md CHANGED
@@ -26,8 +26,8 @@ doNotUseWhen:
26
26
  positiveExamples:
27
27
  - Run zsk:archive with the required inputs and produce the documented archive
28
28
  artifacts.
29
- - Continue the workflow at archive after the prerequisite evidence and
30
- blockers are resolved.
29
+ - Run this skill only for its owned outputs after prerequisites are present;
30
+ let workflow skills decide subsequent stage routing.
31
31
  negativeExamples:
32
32
  - Use zsk:archive to skip missing prerequisites or hide unresolved blockers.
33
33
  - Run archive for generic chat, unrelated implementation, or another ZSK
@@ -74,9 +74,11 @@ This core skill is governed by the ZSK harness. Enforce these rules even when on
74
74
  - Source of truth: read configured resources before inventing intent; record conflicts instead of choosing silently.
75
75
  - Issue taxonomy: route demo, smoke, review, test, verify, and acceptance findings to the correct issue type.
76
76
  - Skill role: execute the full expert role, including all relevant lanes; partial single-angle execution is a failing result.
77
+ - Collaboration: ordinary stage skills own their declared outputs and handoff quality; workflow skills own route selection. Do not hardcode the next stage inside a stage skill.
77
78
  - Dynamic state awareness: identify the active role/stage, project type, stack, runtime, domain, target users/market, and freshness-sensitive decisions before selecting practices or retrieval sources.
78
79
  - Filesystem boundaries: write ZSK-managed outputs only under the configured `.zsk` workspace paths.
79
80
  - Learning loop: reusable gaps become learning proposals; never mutate core constraints, templates, packs, or skills automatically.
81
+ - Learning authority: reusable ZSK core learning must target the canonical ZSK source repo `.zsk/learning/proposals/`; project-local learning may stay in the current project.
80
82
 
81
83
  When a `harness/` directory is installed beside this file, treat it as the local contract source:
82
84
 
@@ -35,6 +35,22 @@ This file is generated for the installed skill. Read it before executing this sk
35
35
  - `learning proposal extraction`
36
36
  - `release notes`
37
37
 
38
+ ## Collaboration Discipline
39
+
40
+ - Own only this skill's required outputs; do not redefine upstream artifacts or approve downstream work on another skill's behalf.
41
+ - Before handoff, confirm required inputs were consumed, outputs are complete or explicitly BLOCKED, and the next consumer can act without chat memory.
42
+ - If another stage is missing, stale, contradictory, or under-specified, record a blocker, issue, or documentation feedback instead of silently fixing it inside this skill.
43
+
44
+ ## Best-Practice Baseline
45
+
46
+ - Judge lifecycle function, not terminology: accept equivalent project artifacts only when they satisfy the same responsibility, handoff, and evidence need.
47
+ - Treat missing mandatory artifacts, mandatory evidence, required owners, required gates, or downstream-consumable outputs as FAIL or BLOCKED.
48
+ - Write unsupplied numeric thresholds, quality bars, SLOs, coverage targets, and business targets as `未指定`; suggestions must be labeled separately from current policy.
49
+ - Avoid provider lock-in: do not assume Jira, Confluence, Figma, GitHub, GitLab, Linear, Notion, browser tooling, or any platform unless configured sources or evidence identify it.
50
+ - For each required output or finding, name owner, dependency, acceptance condition, verification evidence, and next action.
51
+ - Classify learning authority before writing: project-local learning stays in the current project; reusable ZSK core learning targets the canonical ZSK source repo.
52
+ - Resolve the ZSK core repo from `ZSK_LEARNING_REPO`, then `ZSK_CORE_REPO`, then the current checkout only if it contains `skills/`, `harness/`, and `packages/cli/`; otherwise report BLOCKED.
53
+
38
54
  ## Document Quality Standard
39
55
 
40
56
  - Document mode: `decisionRecord`
@@ -53,6 +69,14 @@ This file is generated for the installed skill. Read it before executing this sk
53
69
  - Links each important claim to a source artifact, command output, issue, scenario, or human decision.
54
70
  - States what is out of scope so later stages do not silently expand work.
55
71
  - Makes the next stage executable without requiring hidden context from chat.
72
+ - Includes a Project Rules Gate that cites PROJECT-CONFIG.md and SYSTEM-SPEC.md constraints, impacts, and blockers.
73
+ - Confirms upstream/downstream consistency before handoff: inputs consumed, outputs complete or blocked, and next consumer can act without chat memory.
74
+ - Accepts different project methods and artifact names only when they provide an equivalent control point with evidence.
75
+ - Uses PASS, FAIL, BLOCKED, or N/A only with evidence; missing mandatory evidence remains a failure, not an assumption.
76
+ - Records numeric targets or thresholds as `未指定` when the project has not supplied them; never invents thresholds to make an output look complete.
77
+ - Names owner, dependency, acceptance condition, and verification evidence for every required output or blocker.
78
+ - Runs or references the stage-entry quality gate before downstream handoff; below-threshold but non-blocking gaps require explicit risk acceptance instead of silent progression.
79
+ - For testable work, verifies test correctness, not only test execution: traceable test basis, meaningful assertions, negative/boundary/regression coverage, and skipped/unrun checks called out.
56
80
  - Indexes final artifacts, closed/open issues, evidence, decisions, and learning candidates.
57
81
  - Distinguishes accepted behavior from future improvement ideas.
58
82
 
@@ -80,10 +104,16 @@ This file is generated for the installed skill. Read it before executing this sk
80
104
  ## Document Anti-Patterns
81
105
 
82
106
  - Template-shaped filler that does not resolve a decision.
107
+ - Skipping PROJECT-CONFIG.md or SYSTEM-SPEC.md, or treating their project rules as optional suggestions.
83
108
  - Untraceable claims such as 'should work', 'best practice', or 'user friendly' without evidence or criteria.
84
109
  - Mixing raw source facts, decisions, runtime evidence, and tasks in one undifferentiated section.
85
110
  - Skipping unresolved contradictions instead of recording a blocker, risk, or question.
86
111
  - Optimizing wording while leaving acceptance, evidence, ownership, or next action ambiguous.
112
+ - Passing because a familiar term appears while the equivalent lifecycle function is absent.
113
+ - Inventing project policy, quality thresholds, source mappings, or platform behavior without configured evidence.
114
+ - Treating missing evidence as low risk when the stage output depends on that evidence.
115
+ - Letting a delayed subagent packet block indefinitely instead of marking it stale and falling back or re-emitting.
116
+ - Claiming tests prove behavior when they have no traceable basis, no meaningful assertion, or only prove implementation details.
87
117
  - Archiving chat summaries instead of durable artifact links.
88
118
  - Promoting one-off preferences into core rules without review.
89
119
 
@@ -16,6 +16,16 @@ Default project paths:
16
16
 
17
17
  Root `docs/`, `.raws/`, `.issues/`, `.playwright/`, and `plans/` are not default write targets for ZSK skills. Use explicit export, promote, import, or migration commands when project-facing root documentation is needed.
18
18
 
19
+ ## Learning Output Authority
20
+
21
+ Learning artifacts must be written according to what they are meant to change:
22
+
23
+ - Project-local learning that only affects the current business/product project may use the current project's `.zsk/learning/proposals/`, created lazily.
24
+ - Reusable ZSK core learning that would change ZSK skills, harness contracts, templates, packs, CLI behavior, defaults, or installer behavior must be written to the canonical ZSK source checkout: `<zsk-core>/.zsk/learning/proposals/`.
25
+ - Resolve `<zsk-core>` from explicit configuration/environment first: `ZSK_LEARNING_REPO`, then `ZSK_CORE_REPO`. If neither is set, the current repository qualifies only when it contains `skills/`, `harness/`, and `packages/cli/`.
26
+ - If no canonical ZSK source checkout is available or writable, do not create a substitute core-learning proposal in the consuming project. Record `BLOCKED` with the missing root, intended proposal title, source evidence, and next action.
27
+ - `zsk init` must not create `.zsk/learning/`; learning directories remain lazy outputs created by `learn` or `archive` only when a concrete proposal is written.
28
+
19
29
  ## Scope Routing Rule
20
30
 
21
31
  Before any skill writes an artifact, classify its scope: