prizmkit 1.1.141 → 1.1.143

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 (48) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/README.md +1 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +124 -4
  4. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +13 -1
  5. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +4 -1
  6. package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +20 -10
  7. package/bundled/dev-pipeline/scripts/check-session-status.py +11 -1
  8. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +2 -2
  9. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +2 -2
  10. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +2 -2
  11. package/bundled/dev-pipeline/scripts/prompt_framework.py +12 -1
  12. package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -0
  13. package/bundled/dev-pipeline/scripts/update-checkpoint.py +38 -9
  14. package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -0
  15. package/bundled/dev-pipeline/scripts/update-refactor-status.py +20 -0
  16. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +1 -1
  17. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  18. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +5 -1
  19. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +2 -2
  20. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
  21. package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
  22. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +231 -0
  23. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +26 -1
  24. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +4 -2
  25. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +5 -2
  26. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +147 -4
  27. package/bundled/skills/_metadata.json +1 -1
  28. package/bundled/skills/prizmkit/SKILL.md +6 -6
  29. package/bundled/skills/prizmkit/references/workflow-state-protocol.md +23 -11
  30. package/bundled/skills/prizmkit-code-review/SKILL.md +4 -4
  31. package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +23 -11
  32. package/bundled/skills/prizmkit-committer/SKILL.md +5 -4
  33. package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +23 -11
  34. package/bundled/skills/prizmkit-implement/SKILL.md +3 -2
  35. package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +23 -11
  36. package/bundled/skills/prizmkit-plan/SKILL.md +2 -1
  37. package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +23 -11
  38. package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
  39. package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +23 -11
  40. package/bundled/skills/prizmkit-test/SKILL.md +1 -1
  41. package/bundled/skills/prizmkit-test/references/test-report-template.md +1 -1
  42. package/bundled/skills/prizmkit-workflow/SKILL.md +13 -13
  43. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +23 -11
  44. package/bundled/templates/hooks/commit-intent-status.py +50 -0
  45. package/bundled/templates/hooks/commit-intent.json +2 -2
  46. package/bundled/templates/hooks/post-command-prizm-drift.py +44 -0
  47. package/package.json +1 -1
  48. package/src/scaffold.js +2 -0
@@ -69,12 +69,12 @@ Typos, pure formatting, small documentation edits, and other explicitly low-risk
69
69
 
70
70
  | Stage | Responsibility | Success handoff |
71
71
  |---|---|---|
72
- | `prizmkit-plan` | Clarify the requirement and create/review `spec.md` and `plan.md`. | `PLAN_READY` → `prizmkit-implement` |
73
- | `prizmkit-implement` | Execute the plan tasks and record completion. | `IMPLEMENTED` → `prizmkit-code-review` |
74
- | `prizmkit-code-review` | Main Agent reviews, repairs, verifies, and loops until convergence. | `REVIEW_PASS` → `prizmkit-test` |
75
- | `prizmkit-test` | Validate the final reviewed workspace with project-native tests and a consistent terminal report/result pair. | `TEST_PASS` → `prizmkit-retrospective` |
76
- | `prizmkit-retrospective` | Synchronize durable project documentation or record no documentation change. | `RETRO_COMPLETE` → `prizmkit-committer` |
77
- | `prizmkit-committer` | Verify gates, request commit confirmation, and create the local commit. | `COMMITTED` |
72
+ | `prizmkit-plan` | Clarify the requirement and create/review `spec.md` and `plan.md`. | `status=completed`, `stage_result=PLAN_READY` → `prizmkit-implement` |
73
+ | `prizmkit-implement` | Execute the plan tasks and record completion. | `status=completed`, `stage_result=IMPLEMENTED` → `prizmkit-code-review` |
74
+ | `prizmkit-code-review` | Main Agent reviews, repairs, verifies, and loops until convergence. | `status=completed`, `stage_result=REVIEW_PASS` → `prizmkit-test` |
75
+ | `prizmkit-test` | Validate the final reviewed workspace with project-native tests and a consistent terminal report/result pair. | `status=completed`, `stage_result=TEST_PASS` → `prizmkit-retrospective` |
76
+ | `prizmkit-retrospective` | Synchronize durable project documentation or record no documentation change. | `status=completed`, `stage_result=RETRO_COMPLETE` → `prizmkit-committer` |
77
+ | `prizmkit-committer` | Verify gates, request commit confirmation, and create the local commit. | `status=completed`, `stage_result=COMMITTED` |
78
78
 
79
79
  ### `prizmkit-workflow`
80
80
 
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
45
45
  "artifact_dir": ".prizmkit/specs/example",
46
46
  "orchestrator": "prizmkit-workflow",
47
47
  "stage": "test",
48
- "status": "TEST_PASS",
48
+ "status": "completed",
49
49
  "stage_result": "TEST_PASS",
50
50
  "completed_stages": ["plan", "implement", "code-review", "test"],
51
51
  "repair_scope": null,
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
63
63
  | `artifact_dir` | Generic requirement artifact root reused by every stage. |
64
64
  | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
65
65
  | `stage` | Stage that most recently wrote state. |
66
- | `status` | Lifecycle progression status, distinct from `stage_result`. |
67
- | `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
66
+ | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
67
+ | `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
68
68
  | `completed_stages` | Ordered stages completed for this requirement. |
69
69
  | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
70
70
  | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
71
71
  | `next_stage` | Next semantic stage, or null when stopped. |
72
72
  | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
73
73
 
74
+ `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
75
+
74
76
  ## Lifecycle and Result Mappings
75
77
 
76
78
  ```text
@@ -83,18 +85,28 @@ PLAN_READY
83
85
  → COMMITTED
84
86
  ```
85
87
 
86
- No formal stage is silently optional. Domain artifacts map as follows:
88
+ No formal stage is silently optional. Domain artifacts map to workflow state as follows:
87
89
 
88
90
  ```text
89
- review-report PASS → status=REVIEW_PASS, stage_result=PASS
90
- review-report NEEDS_FIXES → status=REVIEW_NEEDS_FIXES, stage_result=NEEDS_FIXES
91
- test-result TEST_PASS → status=TEST_PASS, stage_result=TEST_PASS
92
- test-result TEST_NEEDS_FIXES → status=TEST_NEEDS_FIXES, stage_result=TEST_NEEDS_FIXES
93
- test-result TEST_BLOCKED → status=TEST_BLOCKED, stage_result=TEST_BLOCKED
94
- retrospective DOCS_UPDATED → status=RETRO_COMPLETE, stage_result=DOCS_UPDATED
95
- retrospective NO_DOC_CHANGE → status=RETRO_COMPLETE, stage_result=NO_DOC_CHANGE
91
+ plan PLAN_READY → status=completed, stage_result=PLAN_READY
92
+ plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
93
+ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
94
+ implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
95
+ review-report PASS → status=completed, stage_result=REVIEW_PASS
96
+ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
97
+ test-result TEST_PASS → status=completed, stage_result=TEST_PASS
98
+ test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
99
+ test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
100
+ retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
101
+ retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
102
+ retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
103
+ commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
104
+ local commit confirmed → status=completed, stage_result=COMMITTED
105
+ commit blocked → status=failed, stage_result=COMMIT_BLOCKED
96
106
  ```
97
107
 
108
+ `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
109
+
98
110
  `TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
99
111
 
100
112
  ## Non-Pass Results and Routing Boundary
@@ -152,8 +152,8 @@ On `PASS`, update workflow state:
152
152
  ```json
153
153
  {
154
154
  "stage": "code-review",
155
- "status": "REVIEW_PASS",
156
- "stage_result": "PASS",
155
+ "status": "completed",
156
+ "stage_result": "REVIEW_PASS",
157
157
  "completed_stages": ["plan", "implement", "code-review"],
158
158
  "next_stage": "test",
159
159
  "resume_from": "prizmkit-test"
@@ -165,8 +165,8 @@ On `NEEDS_FIXES` caused by code findings, update workflow state:
165
165
  ```json
166
166
  {
167
167
  "stage": "code-review",
168
- "status": "REVIEW_NEEDS_FIXES",
169
- "stage_result": "NEEDS_FIXES",
168
+ "status": "failed",
169
+ "stage_result": "REVIEW_NEEDS_FIXES",
170
170
  "repair_scope": "production",
171
171
  "next_stage": "implement",
172
172
  "resume_from": "prizmkit-implement"
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
45
45
  "artifact_dir": ".prizmkit/specs/example",
46
46
  "orchestrator": "prizmkit-workflow",
47
47
  "stage": "test",
48
- "status": "TEST_PASS",
48
+ "status": "completed",
49
49
  "stage_result": "TEST_PASS",
50
50
  "completed_stages": ["plan", "implement", "code-review", "test"],
51
51
  "repair_scope": null,
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
63
63
  | `artifact_dir` | Generic requirement artifact root reused by every stage. |
64
64
  | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
65
65
  | `stage` | Stage that most recently wrote state. |
66
- | `status` | Lifecycle progression status, distinct from `stage_result`. |
67
- | `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
66
+ | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
67
+ | `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
68
68
  | `completed_stages` | Ordered stages completed for this requirement. |
69
69
  | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
70
70
  | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
71
71
  | `next_stage` | Next semantic stage, or null when stopped. |
72
72
  | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
73
73
 
74
+ `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
75
+
74
76
  ## Lifecycle and Result Mappings
75
77
 
76
78
  ```text
@@ -83,18 +85,28 @@ PLAN_READY
83
85
  → COMMITTED
84
86
  ```
85
87
 
86
- No formal stage is silently optional. Domain artifacts map as follows:
88
+ No formal stage is silently optional. Domain artifacts map to workflow state as follows:
87
89
 
88
90
  ```text
89
- review-report PASS → status=REVIEW_PASS, stage_result=PASS
90
- review-report NEEDS_FIXES → status=REVIEW_NEEDS_FIXES, stage_result=NEEDS_FIXES
91
- test-result TEST_PASS → status=TEST_PASS, stage_result=TEST_PASS
92
- test-result TEST_NEEDS_FIXES → status=TEST_NEEDS_FIXES, stage_result=TEST_NEEDS_FIXES
93
- test-result TEST_BLOCKED → status=TEST_BLOCKED, stage_result=TEST_BLOCKED
94
- retrospective DOCS_UPDATED → status=RETRO_COMPLETE, stage_result=DOCS_UPDATED
95
- retrospective NO_DOC_CHANGE → status=RETRO_COMPLETE, stage_result=NO_DOC_CHANGE
91
+ plan PLAN_READY → status=completed, stage_result=PLAN_READY
92
+ plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
93
+ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
94
+ implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
95
+ review-report PASS → status=completed, stage_result=REVIEW_PASS
96
+ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
97
+ test-result TEST_PASS → status=completed, stage_result=TEST_PASS
98
+ test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
99
+ test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
100
+ retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
101
+ retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
102
+ retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
103
+ commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
104
+ local commit confirmed → status=completed, stage_result=COMMITTED
105
+ commit blocked → status=failed, stage_result=COMMIT_BLOCKED
96
106
  ```
97
107
 
108
+ `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
109
+
98
110
  `TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
99
111
 
100
112
  ## Non-Pass Results and Routing Boundary
@@ -24,7 +24,7 @@ It does not decide which formal gates can be omitted. It verifies that all five
24
24
 
25
25
  ## When to Use
26
26
 
27
- - Workflow state reports `RETRO_COMPLETE` with a valid `retrospective-result.json` for the active formal requirement.
27
+ - Workflow state reports `status=completed` with `stage_result=RETRO_COMPLETE` and a valid `retrospective-result.json` for the active formal requirement.
28
28
  - An interactive user confirms they want to create the local commit.
29
29
  - A trusted headless execution context authorizes an automatic local commit.
30
30
  - User says "commit", "submit", "finish", or "done" after the formal gates have completed.
@@ -49,7 +49,7 @@ For a formal requirement, all gates are mandatory:
49
49
  | Implement | All required tasks complete and `IMPLEMENTED` |
50
50
  | Code review | Final `review-report.md` result `PASS` |
51
51
  | Test | Consistent `TEST_PASS` report/result pair for the final reviewed workspace |
52
- | Retrospective | `retrospective-result.json` with `status=RETRO_COMPLETE` and `result=DOCS_UPDATED` or `result=NO_DOC_CHANGE` |
52
+ | Retrospective | `retrospective-result.json` with workflow `status=completed`, `stage_result=RETRO_COMPLETE`, and artifact `result=DOCS_UPDATED` or `result=NO_DOC_CHANGE` |
53
53
 
54
54
  The committer must reject a state that merely claims a gate passed when the underlying artifact or current workspace contradicts it. If workflow state is missing, reconstruct it from authoritative artifacts and report the reconstruction before asking for confirmation.
55
55
 
@@ -145,7 +145,7 @@ Before the authorization preview, set or validate:
145
145
  ```json
146
146
  {
147
147
  "stage": "committer",
148
- "status": "COMMIT_PENDING",
148
+ "status": "in_progress",
149
149
  "stage_result": "COMMIT_PENDING",
150
150
  "completed_stages": ["plan", "implement", "code-review", "test", "retrospective"],
151
151
  "next_stage": "committer",
@@ -168,7 +168,8 @@ After a successful local commit, update the runtime state to:
168
168
  ```json
169
169
  {
170
170
  "stage": "committer",
171
- "status": "COMMITTED",
171
+ "status": "completed",
172
+ "stage_result": "COMMITTED",
172
173
  "completed_stages": ["plan", "implement", "code-review", "test", "retrospective", "committer"],
173
174
  "next_stage": null,
174
175
  "resume_from": null
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
45
45
  "artifact_dir": ".prizmkit/specs/example",
46
46
  "orchestrator": "prizmkit-workflow",
47
47
  "stage": "test",
48
- "status": "TEST_PASS",
48
+ "status": "completed",
49
49
  "stage_result": "TEST_PASS",
50
50
  "completed_stages": ["plan", "implement", "code-review", "test"],
51
51
  "repair_scope": null,
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
63
63
  | `artifact_dir` | Generic requirement artifact root reused by every stage. |
64
64
  | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
65
65
  | `stage` | Stage that most recently wrote state. |
66
- | `status` | Lifecycle progression status, distinct from `stage_result`. |
67
- | `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
66
+ | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
67
+ | `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
68
68
  | `completed_stages` | Ordered stages completed for this requirement. |
69
69
  | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
70
70
  | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
71
71
  | `next_stage` | Next semantic stage, or null when stopped. |
72
72
  | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
73
73
 
74
+ `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
75
+
74
76
  ## Lifecycle and Result Mappings
75
77
 
76
78
  ```text
@@ -83,18 +85,28 @@ PLAN_READY
83
85
  → COMMITTED
84
86
  ```
85
87
 
86
- No formal stage is silently optional. Domain artifacts map as follows:
88
+ No formal stage is silently optional. Domain artifacts map to workflow state as follows:
87
89
 
88
90
  ```text
89
- review-report PASS → status=REVIEW_PASS, stage_result=PASS
90
- review-report NEEDS_FIXES → status=REVIEW_NEEDS_FIXES, stage_result=NEEDS_FIXES
91
- test-result TEST_PASS → status=TEST_PASS, stage_result=TEST_PASS
92
- test-result TEST_NEEDS_FIXES → status=TEST_NEEDS_FIXES, stage_result=TEST_NEEDS_FIXES
93
- test-result TEST_BLOCKED → status=TEST_BLOCKED, stage_result=TEST_BLOCKED
94
- retrospective DOCS_UPDATED → status=RETRO_COMPLETE, stage_result=DOCS_UPDATED
95
- retrospective NO_DOC_CHANGE → status=RETRO_COMPLETE, stage_result=NO_DOC_CHANGE
91
+ plan PLAN_READY → status=completed, stage_result=PLAN_READY
92
+ plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
93
+ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
94
+ implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
95
+ review-report PASS → status=completed, stage_result=REVIEW_PASS
96
+ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
97
+ test-result TEST_PASS → status=completed, stage_result=TEST_PASS
98
+ test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
99
+ test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
100
+ retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
101
+ retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
102
+ retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
103
+ commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
104
+ local commit confirmed → status=completed, stage_result=COMMITTED
105
+ commit blocked → status=failed, stage_result=COMMIT_BLOCKED
96
106
  ```
97
107
 
108
+ `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
109
+
98
110
  `TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
99
111
 
100
112
  ## Non-Pass Results and Routing Boundary
@@ -89,7 +89,8 @@ On successful implementation, update `.prizmkit/state/workflows/<requirement-slu
89
89
  ```json
90
90
  {
91
91
  "stage": "implement",
92
- "status": "IMPLEMENTED",
92
+ "status": "completed",
93
+ "stage_result": "IMPLEMENTED",
93
94
  "completed_stages": ["plan", "implement"],
94
95
  "repair_round": 0,
95
96
  "repair_scope": null,
@@ -98,7 +99,7 @@ On successful implementation, update `.prizmkit/state/workflows/<requirement-slu
98
99
  }
99
100
  ```
100
101
 
101
- For a repair, increment `repair_round`, set `status` to `IMPLEMENT_REPAIR`, preserve the triggering failure in the state, and select the next stage according to `repair_scope`. The outer workflow permits at most three repair rounds; the implementation stage must return a blocked result rather than start a fourth round.
102
+ For a repair, increment `repair_round`, set `status=failed` and `stage_result=IMPLEMENT_REPAIR`, preserve the triggering failure in the state, and select the next stage according to `repair_scope`. The outer workflow permits at most three repair rounds; the implementation stage must return a blocked result rather than start a fourth round.
102
103
 
103
104
  ## Output and Handoff
104
105
 
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
45
45
  "artifact_dir": ".prizmkit/specs/example",
46
46
  "orchestrator": "prizmkit-workflow",
47
47
  "stage": "test",
48
- "status": "TEST_PASS",
48
+ "status": "completed",
49
49
  "stage_result": "TEST_PASS",
50
50
  "completed_stages": ["plan", "implement", "code-review", "test"],
51
51
  "repair_scope": null,
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
63
63
  | `artifact_dir` | Generic requirement artifact root reused by every stage. |
64
64
  | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
65
65
  | `stage` | Stage that most recently wrote state. |
66
- | `status` | Lifecycle progression status, distinct from `stage_result`. |
67
- | `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
66
+ | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
67
+ | `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
68
68
  | `completed_stages` | Ordered stages completed for this requirement. |
69
69
  | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
70
70
  | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
71
71
  | `next_stage` | Next semantic stage, or null when stopped. |
72
72
  | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
73
73
 
74
+ `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
75
+
74
76
  ## Lifecycle and Result Mappings
75
77
 
76
78
  ```text
@@ -83,18 +85,28 @@ PLAN_READY
83
85
  → COMMITTED
84
86
  ```
85
87
 
86
- No formal stage is silently optional. Domain artifacts map as follows:
88
+ No formal stage is silently optional. Domain artifacts map to workflow state as follows:
87
89
 
88
90
  ```text
89
- review-report PASS → status=REVIEW_PASS, stage_result=PASS
90
- review-report NEEDS_FIXES → status=REVIEW_NEEDS_FIXES, stage_result=NEEDS_FIXES
91
- test-result TEST_PASS → status=TEST_PASS, stage_result=TEST_PASS
92
- test-result TEST_NEEDS_FIXES → status=TEST_NEEDS_FIXES, stage_result=TEST_NEEDS_FIXES
93
- test-result TEST_BLOCKED → status=TEST_BLOCKED, stage_result=TEST_BLOCKED
94
- retrospective DOCS_UPDATED → status=RETRO_COMPLETE, stage_result=DOCS_UPDATED
95
- retrospective NO_DOC_CHANGE → status=RETRO_COMPLETE, stage_result=NO_DOC_CHANGE
91
+ plan PLAN_READY → status=completed, stage_result=PLAN_READY
92
+ plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
93
+ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
94
+ implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
95
+ review-report PASS → status=completed, stage_result=REVIEW_PASS
96
+ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
97
+ test-result TEST_PASS → status=completed, stage_result=TEST_PASS
98
+ test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
99
+ test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
100
+ retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
101
+ retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
102
+ retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
103
+ commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
104
+ local commit confirmed → status=completed, stage_result=COMMITTED
105
+ commit blocked → status=failed, stage_result=COMMIT_BLOCKED
96
106
  ```
97
107
 
108
+ `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
109
+
98
110
  `TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
99
111
 
100
112
  ## Non-Pass Results and Routing Boundary
@@ -144,7 +144,8 @@ Follow the bundled protocol. At minimum record:
144
144
  "schema_version": 1,
145
145
  "artifact_dir": ".prizmkit/specs/001-example",
146
146
  "stage": "plan",
147
- "status": "PLAN_READY",
147
+ "status": "completed",
148
+ "stage_result": "PLAN_READY",
148
149
  "completed_stages": ["plan"],
149
150
  "repair_round": 0,
150
151
  "repair_scope": null,
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
45
45
  "artifact_dir": ".prizmkit/specs/example",
46
46
  "orchestrator": "prizmkit-workflow",
47
47
  "stage": "test",
48
- "status": "TEST_PASS",
48
+ "status": "completed",
49
49
  "stage_result": "TEST_PASS",
50
50
  "completed_stages": ["plan", "implement", "code-review", "test"],
51
51
  "repair_scope": null,
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
63
63
  | `artifact_dir` | Generic requirement artifact root reused by every stage. |
64
64
  | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
65
65
  | `stage` | Stage that most recently wrote state. |
66
- | `status` | Lifecycle progression status, distinct from `stage_result`. |
67
- | `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
66
+ | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
67
+ | `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
68
68
  | `completed_stages` | Ordered stages completed for this requirement. |
69
69
  | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
70
70
  | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
71
71
  | `next_stage` | Next semantic stage, or null when stopped. |
72
72
  | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
73
73
 
74
+ `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
75
+
74
76
  ## Lifecycle and Result Mappings
75
77
 
76
78
  ```text
@@ -83,18 +85,28 @@ PLAN_READY
83
85
  → COMMITTED
84
86
  ```
85
87
 
86
- No formal stage is silently optional. Domain artifacts map as follows:
88
+ No formal stage is silently optional. Domain artifacts map to workflow state as follows:
87
89
 
88
90
  ```text
89
- review-report PASS → status=REVIEW_PASS, stage_result=PASS
90
- review-report NEEDS_FIXES → status=REVIEW_NEEDS_FIXES, stage_result=NEEDS_FIXES
91
- test-result TEST_PASS → status=TEST_PASS, stage_result=TEST_PASS
92
- test-result TEST_NEEDS_FIXES → status=TEST_NEEDS_FIXES, stage_result=TEST_NEEDS_FIXES
93
- test-result TEST_BLOCKED → status=TEST_BLOCKED, stage_result=TEST_BLOCKED
94
- retrospective DOCS_UPDATED → status=RETRO_COMPLETE, stage_result=DOCS_UPDATED
95
- retrospective NO_DOC_CHANGE → status=RETRO_COMPLETE, stage_result=NO_DOC_CHANGE
91
+ plan PLAN_READY → status=completed, stage_result=PLAN_READY
92
+ plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
93
+ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
94
+ implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
95
+ review-report PASS → status=completed, stage_result=REVIEW_PASS
96
+ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
97
+ test-result TEST_PASS → status=completed, stage_result=TEST_PASS
98
+ test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
99
+ test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
100
+ retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
101
+ retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
102
+ retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
103
+ commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
104
+ local commit confirmed → status=completed, stage_result=COMMITTED
105
+ commit blocked → status=failed, stage_result=COMMIT_BLOCKED
96
106
  ```
97
107
 
108
+ `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
109
+
98
110
  `TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
99
111
 
100
112
  ## Non-Pass Results and Routing Boundary
@@ -102,7 +102,8 @@ Write `{artifact_dir}/retrospective-result.json` for every formal requirement:
102
102
 
103
103
  ```json
104
104
  {
105
- "status": "RETRO_COMPLETE",
105
+ "status": "completed",
106
+ "stage_result": "RETRO_COMPLETE",
106
107
  "result": "DOCS_UPDATED",
107
108
  "reason": "Durable module interfaces and traps changed",
108
109
  "review_verdict": "PASS",
@@ -110,7 +111,7 @@ Write `{artifact_dir}/retrospective-result.json` for every formal requirement:
110
111
  }
111
112
  ```
112
113
 
113
- `status=RETRO_COMPLETE` is the stable completion status. `result` must be exactly `DOCS_UPDATED` or `NO_DOC_CHANGE`; do not use either result as a substitute for completion status. Use `result=NO_DOC_CHANGE` with a concrete reason when no documentation update is warranted. This artifact is the retrospective gate evidence consumed by the committer and external automation; workflow state alone does not prove completion.
114
+ `status=completed` is the stable lifecycle status. `stage_result=RETRO_COMPLETE` marks successful retrospective completion; `result` must be exactly `DOCS_UPDATED` or `NO_DOC_CHANGE`. Use `result=NO_DOC_CHANGE` with a concrete reason when no documentation update is warranted. This artifact is the retrospective gate evidence consumed by the committer and external automation; workflow state alone does not prove completion.
114
115
 
115
116
  ## Workflow State and Handoff
116
117
 
@@ -121,14 +122,15 @@ On successful completion, update `.prizmkit/state/workflows/<requirement-slug>.j
121
122
  ```json
122
123
  {
123
124
  "stage": "retrospective",
124
- "status": "RETRO_COMPLETE",
125
+ "status": "completed",
126
+ "stage_result": "RETRO_COMPLETE",
125
127
  "completed_stages": ["plan", "implement", "code-review", "test", "retrospective"],
126
128
  "next_stage": "committer",
127
129
  "resume_from": "prizmkit-committer"
128
130
  }
129
131
  ```
130
132
 
131
- Use `status=RETRO_COMPLETE` for both successful outcomes, with `result=DOCS_UPDATED` when durable docs changed or `result=NO_DOC_CHANGE` when the stage completed without a docs update. Both result values permit the commit stage.
133
+ Use `status=completed` and `stage_result=RETRO_COMPLETE` for both successful outcomes, with `result=DOCS_UPDATED` when durable docs changed or `result=NO_DOC_CHANGE` when the stage completed without a docs update. Both result values permit the commit stage.
132
134
 
133
135
  If documentation validation or synchronization cannot safely complete, return `RETRO_BLOCKED`, do not commit, and provide the exact recovery entry.
134
136
 
@@ -45,7 +45,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
45
45
  "artifact_dir": ".prizmkit/specs/example",
46
46
  "orchestrator": "prizmkit-workflow",
47
47
  "stage": "test",
48
- "status": "TEST_PASS",
48
+ "status": "completed",
49
49
  "stage_result": "TEST_PASS",
50
50
  "completed_stages": ["plan", "implement", "code-review", "test"],
51
51
  "repair_scope": null,
@@ -63,14 +63,16 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
63
63
  | `artifact_dir` | Generic requirement artifact root reused by every stage. |
64
64
  | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
65
65
  | `stage` | Stage that most recently wrote state. |
66
- | `status` | Lifecycle progression status, distinct from `stage_result`. |
67
- | `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
66
+ | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
67
+ | `stage_result` | Domain result for the current stage, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
68
68
  | `completed_stages` | Ordered stages completed for this requirement. |
69
69
  | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
70
70
  | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
71
71
  | `next_stage` | Next semantic stage, or null when stopped. |
72
72
  | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
73
73
 
74
+ `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
75
+
74
76
  ## Lifecycle and Result Mappings
75
77
 
76
78
  ```text
@@ -83,18 +85,28 @@ PLAN_READY
83
85
  → COMMITTED
84
86
  ```
85
87
 
86
- No formal stage is silently optional. Domain artifacts map as follows:
88
+ No formal stage is silently optional. Domain artifacts map to workflow state as follows:
87
89
 
88
90
  ```text
89
- review-report PASS → status=REVIEW_PASS, stage_result=PASS
90
- review-report NEEDS_FIXES → status=REVIEW_NEEDS_FIXES, stage_result=NEEDS_FIXES
91
- test-result TEST_PASS → status=TEST_PASS, stage_result=TEST_PASS
92
- test-result TEST_NEEDS_FIXES → status=TEST_NEEDS_FIXES, stage_result=TEST_NEEDS_FIXES
93
- test-result TEST_BLOCKED → status=TEST_BLOCKED, stage_result=TEST_BLOCKED
94
- retrospective DOCS_UPDATED → status=RETRO_COMPLETE, stage_result=DOCS_UPDATED
95
- retrospective NO_DOC_CHANGE → status=RETRO_COMPLETE, stage_result=NO_DOC_CHANGE
91
+ plan PLAN_READY → status=completed, stage_result=PLAN_READY
92
+ plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
93
+ implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
94
+ implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
95
+ review-report PASS → status=completed, stage_result=REVIEW_PASS
96
+ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
97
+ test-result TEST_PASS → status=completed, stage_result=TEST_PASS
98
+ test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
99
+ test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
100
+ retrospective DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
101
+ retrospective NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
102
+ retrospective blocked → status=failed, stage_result=RETRO_BLOCKED
103
+ commit authorization pending → status=in_progress, stage_result=COMMIT_PENDING
104
+ local commit confirmed → status=completed, stage_result=COMMITTED
105
+ commit blocked → status=failed, stage_result=COMMIT_BLOCKED
96
106
  ```
97
107
 
108
+ `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
109
+
98
110
  `TEST_PASS` requires both `test-report.md` and a consistent `test-result.json`. No manifest, attestation, evidence package, or test-internal checkpoint is part of this contract.
99
111
 
100
112
  ## Non-Pass Results and Routing Boundary
@@ -284,7 +284,7 @@ No conditional pass exists.
284
284
 
285
285
  ## Terminal Report and Result
286
286
 
287
- Read `${SKILL_DIR}/references/test-report-template.md` before finalization. Write `test-report.md` and `test-result.json` together for every terminal outcome.
287
+ Read `${SKILL_DIR}/references/test-report-template.md` before finalization. Write `test-report.md` and `test-result.json` together for every terminal outcome. The report must use the exact canonical `## Final Result` section and `- Result: <TEST_*>` marker from that template; do not rename it to `Terminal Result`, `Final Decision`, or another heading.
288
288
 
289
289
  `test-result.json` is a terminal projection, not a checkpoint:
290
290
 
@@ -1,6 +1,6 @@
1
1
  # Test Report Template
2
2
 
3
- Create one human-readable report for every terminal result. Replace an older report for the same invocation context; do not append duplicate final-result sections.
3
+ Create one human-readable report for every terminal result. Replace an older report for the same invocation context; do not append duplicate final-result sections. Use the exact `## Final Result` heading and `- Result: <TEST_*>` marker shown below. Do not rename this machine-read contract to `Terminal Result`, `Final Decision`, or another heading.
4
4
 
5
5
  ```markdown
6
6
  # Test Report
@@ -92,12 +92,12 @@ Expected transitions:
92
92
 
93
93
  | Stage | Required success | Next stage |
94
94
  |---|---|---|
95
- | `prizmkit-plan` | `PLAN_READY` | `prizmkit-implement` |
96
- | `prizmkit-implement` | `IMPLEMENTED` | `prizmkit-code-review` |
97
- | `prizmkit-code-review` | `REVIEW_PASS` | `prizmkit-test` |
98
- | `prizmkit-test` | `TEST_PASS` | `prizmkit-retrospective` |
99
- | `prizmkit-retrospective` | `status=RETRO_COMPLETE` with result `DOCS_UPDATED` or `NO_DOC_CHANGE` | `prizmkit-committer` |
100
- | `prizmkit-committer` | explicit interactive confirmation, then `COMMITTED` | end |
95
+ | `prizmkit-plan` | `status=completed`, `stage_result=PLAN_READY` | `prizmkit-implement` |
96
+ | `prizmkit-implement` | `status=completed`, `stage_result=IMPLEMENTED` | `prizmkit-code-review` |
97
+ | `prizmkit-code-review` | `status=completed`, `stage_result=REVIEW_PASS` | `prizmkit-test` |
98
+ | `prizmkit-test` | `status=completed`, `stage_result=TEST_PASS` | `prizmkit-retrospective` |
99
+ | `prizmkit-retrospective` | `status=completed`, `stage_result=RETRO_COMPLETE`, with artifact result `DOCS_UPDATED` or `NO_DOC_CHANGE` | `prizmkit-committer` |
100
+ | `prizmkit-committer` | explicit interactive confirmation, then `status=completed` with `stage_result=COMMITTED` | end |
101
101
 
102
102
  `TEST_NOT_APPLICABLE` is not a valid lifecycle success. Lightweight changes must execute deterministic verification and return `TEST_PASS`.
103
103
 
@@ -231,18 +231,18 @@ At successful completion, report:
231
231
  WORKFLOW_COMPLETE
232
232
  artifact_dir: <path>
233
233
  stages:
234
- - PLAN_READY
235
- - IMPLEMENTED
236
- - REVIEW_PASS
237
- - TEST_PASS
238
- - RETRO_COMPLETE (DOCS_UPDATED | NO_DOC_CHANGE)
239
- - COMMITTED
234
+ - status=completed, stage_result=PLAN_READY
235
+ - status=completed, stage_result=IMPLEMENTED
236
+ - status=completed, stage_result=REVIEW_PASS
237
+ - status=completed, stage_result=TEST_PASS
238
+ - status=completed, stage_result=RETRO_COMPLETE (result=DOCS_UPDATED | NO_DOC_CHANGE)
239
+ - status=completed, stage_result=COMMITTED
240
240
  commit: <hash>
241
241
  push: not performed automatically
242
242
  next_action: invoke /prizmkit-deploy separately if deployment is needed
243
243
  ```
244
244
 
245
- If the user declines interactive commit confirmation, report `COMMIT_PENDING` rather than `WORKFLOW_COMPLETE` and provide the exact `/prizmkit-committer` resume entry.
245
+ If the user declines interactive commit confirmation, report `status=in_progress`, `stage_result=COMMIT_PENDING` rather than `WORKFLOW_COMPLETE` and provide the exact `/prizmkit-committer` resume entry.
246
246
 
247
247
  If blocked, report:
248
248