prizmkit 1.1.156 → 1.1.159

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 (24) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +1 -1
  3. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +20 -11
  4. package/bundled/dev-pipeline/scripts/update-feature-status.py +7 -0
  5. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +115 -4
  6. package/bundled/dev-pipeline/tests/test_reset_modes.py +137 -0
  7. package/bundled/dev-pipeline/tests/test_unified_cli.py +2 -1
  8. package/bundled/skills/_metadata.json +1 -1
  9. package/bundled/skills/prizmkit/SKILL.md +1 -13
  10. package/bundled/skills/prizmkit-code-review/SKILL.md +29 -10
  11. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +5 -4
  12. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +15 -0
  13. package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +61 -0
  14. package/bundled/skills/prizmkit-committer/SKILL.md +22 -17
  15. package/bundled/skills/prizmkit-init/SKILL.md +21 -25
  16. package/bundled/skills/prizmkit-init/references/config-schema.md +11 -7
  17. package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +3 -3
  18. package/bundled/skills/prizmkit-plan/SKILL.md +5 -4
  19. package/bundled/skills/prizmkit-plan/assets/plan-template.md +4 -1
  20. package/bundled/skills/prizmkit-plan/references/verification-checklist.md +3 -2
  21. package/bundled/skills/prizmkit-workflow/SKILL.md +35 -3
  22. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +24 -5
  23. package/package.json +1 -1
  24. package/bundled/skills/prizmkit/references/workflow-state-protocol.md +0 -178
@@ -1,178 +0,0 @@
1
- # PrizmKit Workflow State Protocol
2
-
3
- `workflow-state.json` is lifecycle metadata for one formal requirement. It preserves stage handoff, orchestrator ownership, and resume information without replacing skill-owned artifacts or any host-owned execution checkpoint.
4
-
5
- ## Location and Identity
6
-
7
- The state filename uses the validated exact basename of `artifact_dir` without a second slug transformation:
8
-
9
- ```text
10
- .prizmkit/state/workflows/<requirement-identity>.json
11
- ```
12
-
13
- An existing state path whose recorded `artifact_dir` differs from the active artifact is a blocking collision; never overwrite, merge, or suffix it automatically. The active `artifact_dir` is preserved exactly across every stage:
14
-
15
- ```text
16
- .prizmkit/specs/<requirement-slug>/
17
- .prizmkit/bugfix/<bug-id>/
18
- .prizmkit/refactor/<refactor-id>/
19
- ```
20
-
21
- Never select another recent plan when resuming. Any external execution checkpoint remains separate from this state. Never merge, substitute, or infer one schema from the other.
22
-
23
- ## Authority
24
-
25
- The state file is an index, not the authority for stage completion:
26
-
27
- | Information | Authority |
28
- |---|---|
29
- | Requirement goals and acceptance criteria | `{artifact_dir}/spec.md` |
30
- | Implementation tasks and completion | `{artifact_dir}/plan.md` plus current workspace |
31
- | Review findings and result | `{artifact_dir}/review-report.md` |
32
- | Test semantics and native execution | `{artifact_dir}/test-report.md` |
33
- | Terminal testing result | `{artifact_dir}/test-result.json` |
34
- | Retrospective completion | `{artifact_dir}/retrospective-result.json` |
35
- | Durable architecture knowledge | `.prizmkit/prizm-docs/` |
36
- | Local commit | Git history and runtime- or user-verified commit identity |
37
- | Current stage, orchestrator, and resume entry | Workflow state |
38
- | External orchestration progress | External host checkpoint |
39
-
40
- Every consumer compares workflow state with the skill-owned artifacts and current workspace. Missing or stale state is reconstructed from those sources and is never accepted as success by itself.
41
-
42
- ## Schema
43
-
44
- ```json
45
- {
46
- "schema_version": 1,
47
- "artifact_dir": ".prizmkit/specs/example",
48
- "orchestrator": "prizmkit-workflow",
49
- "stage": "test",
50
- "status": "completed",
51
- "stage_result": "TEST_PASS",
52
- "completed_stages": ["plan", "implement", "code-review", "test"],
53
- "repair_scope": null,
54
- "repair_round": 0,
55
- "next_stage": "retrospective",
56
- "resume_from": "prizmkit-retrospective"
57
- }
58
- ```
59
-
60
- ### Fields
61
-
62
- | Field | Meaning |
63
- |---|---|
64
- | `schema_version` | State schema version. |
65
- | `artifact_dir` | Generic requirement artifact root reused by every stage. |
66
- | `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
67
- | `stage` | Stage that most recently wrote state. |
68
- | `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
69
- | `stage_result` | Coordinator-recorded lifecycle result mapped from a validated atomic result and its required artifacts, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
70
- | `completed_stages` | Ordered stages completed for this requirement. |
71
- | `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
72
- | `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
73
- | `next_stage` | Next semantic stage, or null when stopped. |
74
- | `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
75
-
76
- `status` and `stage_result` are deliberately separate. Lifecycle status values must never be replaced with domain result values.
77
-
78
- ## Lifecycle and Result Mappings
79
-
80
- ```text
81
- PLAN_READY
82
- → IMPLEMENTED
83
- → REVIEW_PASS
84
- → TEST_PASS
85
- → RETRO_COMPLETE
86
- → COMMIT_PENDING
87
- → COMMITTED
88
- ```
89
-
90
- No formal stage is silently optional. Domain artifacts map to workflow state as follows:
91
-
92
- ```text
93
- plan PLAN_READY → status=completed, stage_result=PLAN_READY
94
- plan PLAN_BLOCKED → status=failed, stage_result=PLAN_BLOCKED
95
- implementation IMPLEMENTED → status=completed, stage_result=IMPLEMENTED
96
- implementation repair/block → status=failed, stage_result=IMPLEMENT_REPAIR or IMPLEMENT_BLOCKED
97
- review-report PASS → status=completed, stage_result=REVIEW_PASS
98
- review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEEDS_FIXES
99
- test-result TEST_PASS → status=completed, stage_result=TEST_PASS
100
- test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
101
- test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
102
- retrospective outcome=RETRO_COMPLETE, result=DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
103
- retrospective outcome=RETRO_COMPLETE, result=NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
104
- retrospective outcome=RETRO_BLOCKED → status=failed, stage_result=RETRO_BLOCKED
105
- runtime commit preparation → status=in_progress, stage_result=COMMIT_PENDING
106
- local commit confirmed → status=completed, stage_result=COMMITTED
107
- commit blocked → status=failed, stage_result=COMMIT_BLOCKED
108
- ```
109
-
110
- `DOCS_UPDATED` and `NO_DOC_CHANGE` remain retrospective artifact `result` values. The workflow `stage_result` is the retrospective stage result `RETRO_COMPLETE`.
111
-
112
- `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.
113
-
114
- ## Non-Pass Results and Routing Boundary
115
-
116
- `prizmkit-test` performs its own bounded failure repair and review loops before returning. The test skill never invokes another lifecycle stage.
117
-
118
- ```text
119
- TEST_NEEDS_FIXES
120
- → a known correction remains
121
- → caller decides whether and how to arrange another invocation
122
-
123
- TEST_BLOCKED
124
- → truth, input, safe environment, or reliable execution prevents a verdict
125
- → never make speculative production edits
126
- → caller or external host owns recovery policy
127
- ```
128
-
129
- A test result is not an AI CLI session classification. `TEST_NEEDS_FIXES` and `TEST_BLOCKED` must not be rewritten as crash or infrastructure failure merely because they stop lifecycle progression.
130
-
131
- Any outer repair or continuation policy is independently owned by the caller and cannot alter the test report. The Main-Agent test review limit of ten rounds, independent Test Reviewer limit of five responses, and execution-failure repair limit of three rounds are internal to one test invocation and do not update outer counters.
132
-
133
- ## Orchestrator Ownership and Handoff
134
-
135
- 1. An atomic stage performs only its own stage, writes its truthful result and artifact paths, and returns control.
136
- 2. When `orchestrator` is non-null, only that orchestrator invokes the next skill.
137
- 3. Direct atomic use returns only its local result and artifacts; it does not report or select another invocation.
138
- 4. Every handoff preserves the same `artifact_dir`.
139
- 5. External automation invokes atomic stages directly and does not nest the composite workflow.
140
- 6. Workflow state never replaces or absorbs an external host checkpoint.
141
-
142
- ## Commit Execution Ownership
143
-
144
- Interactive execution:
145
-
146
- ```text
147
- committer previews intended files and message
148
- → waits for explicit current-user confirmation
149
- → stages, creates, and verifies the local commit
150
- ```
151
-
152
- Pipeline execution:
153
-
154
- ```text
155
- external coordinator validates its required gates and supplies exact readiness evidence
156
- → committer validates only that evidence and writes an exact runtime-commit-request.json
157
- → external coordinator maps COMMIT_REQUEST_READY to its checkpoint's in_progress/COMMIT_PENDING state
158
- → Python runtime validates the request, commits, verifies Git, and writes checkpoint completed/COMMITTED
159
- → remote publication remains separate
160
- ```
161
-
162
- The preparation request is data for runtime validation, not prompt-level authorization. The committer must not stage, commit, or predeclare COMMITTED in pipeline preparation mode.
163
-
164
- ## Recovery
165
-
166
- When state is missing, stale, or inconsistent:
167
-
168
- 1. Reuse current context, then read `spec.md` and `plan.md` only when needed.
169
- 2. Inspect task markers and current workspace.
170
- 3. Read the current review report when needed to establish review authority.
171
- 4. Validate that `test-report.md` and terminal `test-result.json` exist, agree, and reflect the claimed result.
172
- 5. Validate `retrospective-result.json` when retrospective is claimed complete.
173
- 6. Verify the commit when commit is claimed complete.
174
- 7. Let an active external host validate its own checkpoint independently.
175
- 8. Reconstruct the latest safe predecessor and report the reconstruction.
176
- 9. Continue only from the first incomplete or invalid stage.
177
-
178
- Stale state never bypasses review, testing, retrospective, commit preparation/execution, or external checkpoint enforcement.