prizmkit 1.1.140 → 1.1.142
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.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/README.md +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +165 -125
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +13 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +5 -3
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +160 -0
- package/bundled/dev-pipeline/scripts/check-session-status.py +11 -1
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +23 -806
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +6 -8
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +6 -8
- package/bundled/dev-pipeline/scripts/prompt_framework.py +68 -56
- package/bundled/dev-pipeline/scripts/update-bug-status.py +21 -2
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +52 -131
- package/bundled/dev-pipeline/scripts/update-feature-status.py +21 -2
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +21 -2
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +8 -19
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +5 -5
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +13 -10
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +1 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +18 -9
- package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +14 -26
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +13 -10
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +1 -1
- package/bundled/dev-pipeline/templates/session-status-schema.json +1 -1
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +494 -413
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +144 -684
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +20 -41
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +24 -24
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +176 -36
- package/bundled/skills/_metadata.json +6 -6
- package/bundled/skills/prizmkit/SKILL.md +13 -18
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-code-review/SKILL.md +7 -7
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-committer/SKILL.md +8 -7
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-implement/SKILL.md +3 -2
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-plan/SKILL.md +2 -1
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-retrospective/SKILL.md +8 -6
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-test/SKILL.md +217 -189
- package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +119 -0
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +269 -0
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +193 -0
- package/bundled/skills/prizmkit-test/references/test-report-template.md +164 -79
- package/bundled/skills/prizmkit-workflow/SKILL.md +28 -36
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +73 -80
- package/package.json +1 -1
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +0 -477
- package/bundled/skills/prizmkit-test/assets/behavior-risk-matrix.schema.json +0 -116
- package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +0 -111
- package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +0 -66
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +0 -104
- package/bundled/skills/prizmkit-test/references/contract-mock-protocol.md +0 -65
- package/bundled/skills/prizmkit-test/references/evidence-protocol.md +0 -208
- package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +0 -80
- package/bundled/skills/prizmkit-test/references/examples.md +0 -100
- package/bundled/skills/prizmkit-test/references/service-boundary-test-catalog.md +0 -228
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +0 -118
- package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +0 -107
- package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +0 -181
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +0 -1930
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +0 -1847
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Atomically update one semantic
|
|
2
|
+
"""Atomically update one semantic pipeline workflow checkpoint."""
|
|
3
3
|
|
|
4
4
|
import argparse
|
|
5
5
|
import json
|
|
@@ -15,12 +15,16 @@ if _PIPELINE_ROOT not in sys.path:
|
|
|
15
15
|
from prizmkit_runtime.checkpoint_state import ( # noqa: E402
|
|
16
16
|
MAX_OUTER_REPAIR_ROUNDS,
|
|
17
17
|
REVIEW_RESULTS,
|
|
18
|
+
SKILL_WORKFLOW_STAGES,
|
|
18
19
|
STEP_ID_PATTERN,
|
|
19
20
|
TERMINAL_STEP_STATUSES,
|
|
20
21
|
TEST_RESULTS,
|
|
21
22
|
VALID_CHECKPOINT_STATUSES,
|
|
23
|
+
VALID_STAGE_RESULTS,
|
|
22
24
|
VALID_REPAIR_SCOPES,
|
|
23
25
|
VALID_TERMINAL_STATUSES,
|
|
26
|
+
expected_status_for_stage_result,
|
|
27
|
+
stage_result_allowed_for_skill,
|
|
24
28
|
load_checkpoint_state,
|
|
25
29
|
semantic_state_key,
|
|
26
30
|
validate_checkpoint_data,
|
|
@@ -120,13 +124,11 @@ def _mandatory_predecessor_verdict_error(steps, index, workflow_type):
|
|
|
120
124
|
return None
|
|
121
125
|
|
|
122
126
|
def _normalize_semantic_update(semantic_update):
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
values["authoritative_evidence_paths"] = evidence
|
|
129
|
-
return {key: value for key, value in values.items() if value is not None}
|
|
127
|
+
return {
|
|
128
|
+
key: value
|
|
129
|
+
for key, value in dict(semantic_update or {}).items()
|
|
130
|
+
if value is not None
|
|
131
|
+
}
|
|
130
132
|
|
|
131
133
|
|
|
132
134
|
def _validate_semantic_update(step, semantic_update):
|
|
@@ -136,6 +138,12 @@ def _validate_semantic_update(step, semantic_update):
|
|
|
136
138
|
return "Review verdicts may only be recorded on prizmkit-code-review"
|
|
137
139
|
if stage_result in TEST_RESULTS and skill != "prizmkit-test":
|
|
138
140
|
return "Test verdicts may only be recorded on prizmkit-test"
|
|
141
|
+
if not stage_result_allowed_for_skill(skill, stage_result):
|
|
142
|
+
return "{} cannot record stage result {}".format(skill, stage_result)
|
|
143
|
+
expected_status = expected_status_for_stage_result(stage_result)
|
|
144
|
+
if expected_status is not None and semantic_update.get("status") is not None:
|
|
145
|
+
if semantic_update["status"] != expected_status:
|
|
146
|
+
return "{} requires status={}".format(stage_result, expected_status)
|
|
139
147
|
repair_scope = semantic_update.get("repair_scope")
|
|
140
148
|
if repair_scope is not None and repair_scope not in VALID_REPAIR_SCOPES:
|
|
141
149
|
return "Invalid repair_scope '{}'".format(repair_scope)
|
|
@@ -145,28 +153,29 @@ def _validate_semantic_update(step, semantic_update):
|
|
|
145
153
|
terminal_status = semantic_update.get("terminal_status")
|
|
146
154
|
if terminal_status is not None and terminal_status not in VALID_TERMINAL_STATUSES:
|
|
147
155
|
return "Invalid terminal_status '{}'".format(terminal_status)
|
|
148
|
-
evidence = semantic_update.get("authoritative_evidence_paths")
|
|
149
|
-
if evidence is not None and set(evidence) != {"manifest", "verdict", "validation"}:
|
|
150
|
-
return "Authoritative test evidence requires manifest, verdict, and validation paths"
|
|
151
156
|
if terminal_status == "WORKFLOW_BLOCKED" and not semantic_update.get("blocked_reason"):
|
|
152
157
|
return "WORKFLOW_BLOCKED requires blocked_reason"
|
|
153
158
|
return None
|
|
154
159
|
|
|
155
160
|
|
|
156
161
|
def _apply_repair_policy(l4_state, stage_result, repair_scope):
|
|
157
|
-
if stage_result not in {"REVIEW_NEEDS_FIXES", "
|
|
158
|
-
return
|
|
162
|
+
if stage_result not in {"REVIEW_NEEDS_FIXES", "TEST_NEEDS_FIXES", "TEST_BLOCKED"}:
|
|
163
|
+
return False
|
|
159
164
|
current_round = l4_state.get("repair_round", 0)
|
|
160
165
|
if not isinstance(current_round, int) or isinstance(current_round, bool):
|
|
161
166
|
current_round = MAX_OUTER_REPAIR_ROUNDS
|
|
162
|
-
if stage_result
|
|
167
|
+
if stage_result in {"TEST_NEEDS_FIXES", "TEST_BLOCKED"}:
|
|
163
168
|
l4_state.update(
|
|
164
169
|
terminal_status="WORKFLOW_BLOCKED",
|
|
165
|
-
blocked_reason=
|
|
170
|
+
blocked_reason=(
|
|
171
|
+
"test_needs_fixes"
|
|
172
|
+
if stage_result == "TEST_NEEDS_FIXES"
|
|
173
|
+
else "test_blocked"
|
|
174
|
+
),
|
|
166
175
|
current_stage=None,
|
|
167
176
|
next_stage=None,
|
|
168
177
|
)
|
|
169
|
-
return
|
|
178
|
+
return False
|
|
170
179
|
if current_round >= MAX_OUTER_REPAIR_ROUNDS:
|
|
171
180
|
l4_state.update(
|
|
172
181
|
repair_round=MAX_OUTER_REPAIR_ROUNDS,
|
|
@@ -175,7 +184,7 @@ def _apply_repair_policy(l4_state, stage_result, repair_scope):
|
|
|
175
184
|
current_stage=None,
|
|
176
185
|
next_stage=None,
|
|
177
186
|
)
|
|
178
|
-
return
|
|
187
|
+
return False
|
|
179
188
|
if repair_scope not in VALID_REPAIR_SCOPES:
|
|
180
189
|
l4_state.update(
|
|
181
190
|
terminal_status="WORKFLOW_BLOCKED",
|
|
@@ -183,14 +192,15 @@ def _apply_repair_policy(l4_state, stage_result, repair_scope):
|
|
|
183
192
|
current_stage=None,
|
|
184
193
|
next_stage=None,
|
|
185
194
|
)
|
|
186
|
-
return
|
|
195
|
+
return False
|
|
187
196
|
l4_state["repair_round"] = current_round + 1
|
|
188
197
|
l4_state["terminal_status"] = None
|
|
189
198
|
l4_state["blocked_reason"] = None
|
|
190
199
|
l4_state["next_stage"] = "prizmkit-implement"
|
|
200
|
+
return True
|
|
191
201
|
|
|
192
202
|
|
|
193
|
-
def _sync_cursor(data, l4_state):
|
|
203
|
+
def _sync_cursor(data, l4_state, preserve_next_stage=False):
|
|
194
204
|
active = next(
|
|
195
205
|
(step for step in data["steps"] if step.get("status") not in TERMINAL_STEP_STATUSES),
|
|
196
206
|
None,
|
|
@@ -199,11 +209,9 @@ def _sync_cursor(data, l4_state):
|
|
|
199
209
|
l4_state["current_stage"] = None
|
|
200
210
|
l4_state["next_stage"] = None
|
|
201
211
|
return
|
|
212
|
+
routed_stage = l4_state.get("next_stage") if preserve_next_stage else None
|
|
202
213
|
l4_state["current_stage"] = active.get("skill") if active else None
|
|
203
|
-
l4_state["next_stage"] = active.get("skill") if active else None
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
214
|
+
l4_state["next_stage"] = routed_stage or (active.get("skill") if active else None)
|
|
207
215
|
|
|
208
216
|
def _checkpoint_project_root(checkpoint_path):
|
|
209
217
|
"""Resolve the project root from a conventional .prizmkit checkpoint path."""
|
|
@@ -213,69 +221,6 @@ def _checkpoint_project_root(checkpoint_path):
|
|
|
213
221
|
return str(parent.parent)
|
|
214
222
|
return str(path.parent)
|
|
215
223
|
|
|
216
|
-
def _discover_test_evidence_paths(checkpoint_path, data):
|
|
217
|
-
"""Discover the latest finalized test package from the artifact handoff pointer."""
|
|
218
|
-
project_root = Path(_checkpoint_project_root(checkpoint_path))
|
|
219
|
-
candidates = []
|
|
220
|
-
artifact_dir = data.get("artifact_dir")
|
|
221
|
-
if isinstance(artifact_dir, str) and artifact_dir:
|
|
222
|
-
candidates.append(project_root / artifact_dir)
|
|
223
|
-
for state_key in ("feature_state", "bugfix_state", "refactor_state"):
|
|
224
|
-
state = data.get(state_key)
|
|
225
|
-
if isinstance(state, dict) and isinstance(state.get("artifact_dir"), str):
|
|
226
|
-
candidates.append(project_root / state["artifact_dir"])
|
|
227
|
-
item_slug = data.get("item_slug")
|
|
228
|
-
if isinstance(item_slug, str) and item_slug:
|
|
229
|
-
candidates.append(project_root / ".prizmkit" / "specs" / item_slug)
|
|
230
|
-
candidates.append(project_root / ".prizmkit" / "bugfix" / item_slug)
|
|
231
|
-
candidates.append(project_root / ".prizmkit" / "refactor" / item_slug)
|
|
232
|
-
|
|
233
|
-
for artifact in candidates:
|
|
234
|
-
pointer = artifact / "test-report-path.txt"
|
|
235
|
-
try:
|
|
236
|
-
report = Path(pointer.read_text(encoding="utf-8").strip()).resolve()
|
|
237
|
-
except (OSError, ValueError):
|
|
238
|
-
continue
|
|
239
|
-
evidence_dir = report.parent
|
|
240
|
-
evidence_root = (project_root / ".prizmkit" / "test" / "evidence").resolve()
|
|
241
|
-
try:
|
|
242
|
-
relative_evidence = evidence_dir.resolve().relative_to(evidence_root)
|
|
243
|
-
except (OSError, ValueError):
|
|
244
|
-
continue
|
|
245
|
-
if len(relative_evidence.parts) != 1:
|
|
246
|
-
continue
|
|
247
|
-
paths = {
|
|
248
|
-
"manifest": evidence_dir / "manifest.json",
|
|
249
|
-
"verdict": evidence_dir / "verdict.json",
|
|
250
|
-
"validation": evidence_dir / "validation.json",
|
|
251
|
-
}
|
|
252
|
-
if not all(path.is_file() for path in paths.values()):
|
|
253
|
-
continue
|
|
254
|
-
try:
|
|
255
|
-
manifest = json.loads(paths["manifest"].read_text(encoding="utf-8"))
|
|
256
|
-
verdict = json.loads(paths["verdict"].read_text(encoding="utf-8"))
|
|
257
|
-
validation = json.loads(paths["validation"].read_text(encoding="utf-8"))
|
|
258
|
-
except (OSError, UnicodeDecodeError, json.JSONDecodeError):
|
|
259
|
-
continue
|
|
260
|
-
if not all(isinstance(record, dict) for record in (manifest, verdict, validation)):
|
|
261
|
-
continue
|
|
262
|
-
if (
|
|
263
|
-
manifest.get("evidence_id") != evidence_dir.name
|
|
264
|
-
or manifest.get("final_verdict") != "TEST_BLOCKED"
|
|
265
|
-
or verdict.get("verdict") != "TEST_BLOCKED"
|
|
266
|
-
or validation.get("result") != "passed"
|
|
267
|
-
or validation.get("verdict") != "TEST_BLOCKED"
|
|
268
|
-
):
|
|
269
|
-
continue
|
|
270
|
-
try:
|
|
271
|
-
return {
|
|
272
|
-
key: str(path.resolve().relative_to(project_root.resolve()))
|
|
273
|
-
for key, path in paths.items()
|
|
274
|
-
}
|
|
275
|
-
except (OSError, ValueError):
|
|
276
|
-
continue
|
|
277
|
-
return None
|
|
278
|
-
|
|
279
224
|
|
|
280
225
|
def _finalize_semantics(checkpoint_path, data, state_key):
|
|
281
226
|
"""Derive a deterministic terminal status after an atomic mutation."""
|
|
@@ -313,7 +258,7 @@ def update_checkpoint(
|
|
|
313
258
|
note=None,
|
|
314
259
|
semantic_update=None,
|
|
315
260
|
):
|
|
316
|
-
"""Update one step and its cohesive semantic
|
|
261
|
+
"""Update one step and its cohesive semantic pipeline state atomically."""
|
|
317
262
|
if new_status not in VALID_STATUSES:
|
|
318
263
|
return {
|
|
319
264
|
"ok": False,
|
|
@@ -350,24 +295,11 @@ def update_checkpoint(
|
|
|
350
295
|
return {"ok": False, "error": verdict_error}
|
|
351
296
|
|
|
352
297
|
semantic_update = _normalize_semantic_update(semantic_update)
|
|
353
|
-
if semantic_update.get("stage_result") == "TEST_BLOCKED" and not semantic_update.get("authoritative_evidence_paths"):
|
|
354
|
-
discovered = _discover_test_evidence_paths(checkpoint_path, data)
|
|
355
|
-
if discovered:
|
|
356
|
-
semantic_update["authoritative_evidence_paths"] = discovered
|
|
357
298
|
semantic_error = _validate_semantic_update(step, semantic_update)
|
|
358
299
|
if semantic_error:
|
|
359
300
|
return {"ok": False, "error": semantic_error}
|
|
360
301
|
|
|
361
302
|
stage_result = semantic_update.get("stage_result")
|
|
362
|
-
if step.get("skill") == "prizmkit-test" and stage_result in TEST_RESULTS:
|
|
363
|
-
evidence = semantic_update.get("authoritative_evidence_paths") or step.get("authoritative_evidence_paths")
|
|
364
|
-
if stage_result != "TEST_BLOCKED" and (
|
|
365
|
-
not isinstance(evidence, dict) or set(evidence) != {"manifest", "verdict", "validation"}
|
|
366
|
-
):
|
|
367
|
-
return {
|
|
368
|
-
"ok": False,
|
|
369
|
-
"error": "Every terminal test verdict requires manifest, verdict, and validation evidence paths",
|
|
370
|
-
}
|
|
371
303
|
if new_status == "completed" and step.get("skill") == "prizmkit-code-review":
|
|
372
304
|
stage_result = stage_result or step.get("stage_result")
|
|
373
305
|
if stage_result != "REVIEW_PASS":
|
|
@@ -376,9 +308,12 @@ def update_checkpoint(
|
|
|
376
308
|
stage_result = stage_result or step.get("stage_result")
|
|
377
309
|
if stage_result != "TEST_PASS":
|
|
378
310
|
return {"ok": False, "error": "Test completion requires TEST_PASS"}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
311
|
+
expected_status = expected_status_for_stage_result(stage_result)
|
|
312
|
+
if expected_status is not None and new_status != expected_status:
|
|
313
|
+
return {
|
|
314
|
+
"ok": False,
|
|
315
|
+
"error": "{} requires status={}".format(stage_result, expected_status),
|
|
316
|
+
}
|
|
382
317
|
|
|
383
318
|
old_status = step.get("status", "unknown")
|
|
384
319
|
step["status"] = new_status
|
|
@@ -386,20 +321,8 @@ def update_checkpoint(
|
|
|
386
321
|
step["note"] = note
|
|
387
322
|
if stage_result:
|
|
388
323
|
step["stage_result"] = stage_result
|
|
389
|
-
|
|
390
|
-
step
|
|
391
|
-
if new_status == "completed" and step.get("skill") == "prizmkit-test":
|
|
392
|
-
candidate = validate_checkpoint_data(
|
|
393
|
-
data,
|
|
394
|
-
path=checkpoint_path,
|
|
395
|
-
exists=True,
|
|
396
|
-
project_root=_checkpoint_project_root(checkpoint_path),
|
|
397
|
-
)
|
|
398
|
-
if not candidate.valid or not candidate.semantic.evidence_valid:
|
|
399
|
-
return {
|
|
400
|
-
"ok": False,
|
|
401
|
-
"error": "Test completion requires validator-attested authoritative evidence",
|
|
402
|
-
}
|
|
324
|
+
else:
|
|
325
|
+
step.pop("stage_result", None)
|
|
403
326
|
|
|
404
327
|
workflow_type = str(data.get("workflow_type") or "")
|
|
405
328
|
state_key = semantic_state_key(workflow_type)
|
|
@@ -410,7 +333,6 @@ def update_checkpoint(
|
|
|
410
333
|
"stage_result",
|
|
411
334
|
"repair_scope",
|
|
412
335
|
"repair_round",
|
|
413
|
-
"authoritative_evidence_paths",
|
|
414
336
|
"blocked_reason",
|
|
415
337
|
"terminal_status",
|
|
416
338
|
):
|
|
@@ -418,12 +340,19 @@ def update_checkpoint(
|
|
|
418
340
|
l4_state[key] = semantic_update[key]
|
|
419
341
|
l4_state["schema_version"] = 1
|
|
420
342
|
l4_state["orchestrator"] = "prizmkit-l4"
|
|
343
|
+
skill = step.get("skill")
|
|
344
|
+
l4_state["stage"] = SKILL_WORKFLOW_STAGES.get(skill, skill)
|
|
345
|
+
l4_state["status"] = new_status
|
|
421
346
|
if stage_result:
|
|
422
347
|
l4_state["stage_result"] = stage_result
|
|
423
|
-
|
|
424
|
-
l4_state
|
|
425
|
-
|
|
426
|
-
|
|
348
|
+
else:
|
|
349
|
+
l4_state.pop("stage_result", None)
|
|
350
|
+
repair_route_selected = _apply_repair_policy(
|
|
351
|
+
l4_state,
|
|
352
|
+
stage_result,
|
|
353
|
+
semantic_update.get("repair_scope") or l4_state.get("repair_scope"),
|
|
354
|
+
)
|
|
355
|
+
_sync_cursor(data, l4_state, preserve_next_stage=repair_route_selected)
|
|
427
356
|
_finalize_semantics(checkpoint_path, data, state_key)
|
|
428
357
|
|
|
429
358
|
final_state = validate_checkpoint_data(
|
|
@@ -462,12 +391,9 @@ def main():
|
|
|
462
391
|
parser.add_argument("--step", required=True)
|
|
463
392
|
parser.add_argument("--status", required=True, choices=sorted(VALID_STATUSES))
|
|
464
393
|
parser.add_argument("--note", default=None)
|
|
465
|
-
parser.add_argument("--stage-result", choices=sorted(
|
|
394
|
+
parser.add_argument("--stage-result", choices=sorted(VALID_STAGE_RESULTS), default=None)
|
|
466
395
|
parser.add_argument("--repair-scope", choices=sorted(VALID_REPAIR_SCOPES), default=None)
|
|
467
396
|
parser.add_argument("--repair-round", type=int, default=None)
|
|
468
|
-
parser.add_argument("--manifest-path", default=None)
|
|
469
|
-
parser.add_argument("--verdict-path", default=None)
|
|
470
|
-
parser.add_argument("--validation-path", default=None)
|
|
471
397
|
parser.add_argument("--blocked-reason", default=None)
|
|
472
398
|
parser.add_argument("--terminal-status", choices=sorted(VALID_TERMINAL_STATUSES), default=None)
|
|
473
399
|
|
|
@@ -476,11 +402,6 @@ def main():
|
|
|
476
402
|
"stage_result": args.stage_result,
|
|
477
403
|
"repair_scope": args.repair_scope,
|
|
478
404
|
"repair_round": args.repair_round,
|
|
479
|
-
"authoritative_evidence_paths": {
|
|
480
|
-
"manifest": args.manifest_path,
|
|
481
|
-
"verdict": args.verdict_path,
|
|
482
|
-
"validation": args.validation_path,
|
|
483
|
-
},
|
|
484
405
|
"blocked_reason": args.blocked_reason,
|
|
485
406
|
"terminal_status": args.terminal_status,
|
|
486
407
|
}
|
|
@@ -51,6 +51,7 @@ SESSION_STATUS_VALUES = [
|
|
|
51
51
|
"context_overflow",
|
|
52
52
|
"stalled_context_continuation",
|
|
53
53
|
"workflow_blocked",
|
|
54
|
+
"workflow_skipped",
|
|
54
55
|
"commit_missing",
|
|
55
56
|
"docs_missing",
|
|
56
57
|
"merge_conflict",
|
|
@@ -156,7 +157,7 @@ def parse_args():
|
|
|
156
157
|
parser.add_argument(
|
|
157
158
|
"--checkpoint-state",
|
|
158
159
|
default=None,
|
|
159
|
-
help="JSON semantic
|
|
160
|
+
help="JSON semantic pipeline checkpoint snapshot captured after the session.",
|
|
160
161
|
)
|
|
161
162
|
return parser.parse_args()
|
|
162
163
|
|
|
@@ -370,7 +371,6 @@ SEMANTIC_CHECKPOINT_FIELDS = (
|
|
|
370
371
|
"stage_result",
|
|
371
372
|
"repair_scope",
|
|
372
373
|
"repair_round",
|
|
373
|
-
"authoritative_evidence_paths",
|
|
374
374
|
"blocked_reason",
|
|
375
375
|
"terminal_status",
|
|
376
376
|
)
|
|
@@ -1022,6 +1022,20 @@ def action_update(args, feature_list_path, state_dir):
|
|
|
1022
1022
|
if err:
|
|
1023
1023
|
error_out("Failed to update .prizmkit/plans/feature-list.json: {}".format(err))
|
|
1024
1024
|
return
|
|
1025
|
+
elif session_status == "workflow_skipped":
|
|
1026
|
+
# A completed AI CLI session without authoritative workflow evidence is
|
|
1027
|
+
# skipped, not crashed. Preserve diagnostics and spend no retry budget.
|
|
1028
|
+
new_status = "skipped"
|
|
1029
|
+
fs["continuation_pending"] = False
|
|
1030
|
+
fs.pop("continuation_reason", None)
|
|
1031
|
+
fs.pop("terminal_status", None)
|
|
1032
|
+
fs.pop("blocked_reason", None)
|
|
1033
|
+
fs["needs_attention"] = True
|
|
1034
|
+
fs["skipped_reason"] = "workflow_completion_evidence_invalid"
|
|
1035
|
+
err = update_feature_in_list(feature_list_path, feature_id, new_status)
|
|
1036
|
+
if err:
|
|
1037
|
+
error_out("Failed to update .prizmkit/plans/feature-list.json: {}".format(err))
|
|
1038
|
+
return
|
|
1025
1039
|
elif session_status == "workflow_blocked":
|
|
1026
1040
|
# Semantic terminal state: preserve partial work without consuming any retry budget.
|
|
1027
1041
|
new_status = "failed"
|
|
@@ -1120,6 +1134,11 @@ def action_update(args, feature_list_path, state_dir):
|
|
|
1120
1134
|
summary["restart_policy"] = "context_overflow_continuation"
|
|
1121
1135
|
summary.update(continuation_metadata_summary(fs))
|
|
1122
1136
|
summary["artifacts_preserved"] = True
|
|
1137
|
+
elif session_status == "workflow_skipped":
|
|
1138
|
+
summary["restart_policy"] = "terminal_skipped"
|
|
1139
|
+
summary.update(continuation_metadata_summary(fs))
|
|
1140
|
+
summary["checkpoint_state"] = semantic_checkpoint
|
|
1141
|
+
summary["artifacts_preserved"] = True
|
|
1123
1142
|
elif session_status == "workflow_blocked":
|
|
1124
1143
|
summary["restart_policy"] = "terminal_blocked"
|
|
1125
1144
|
summary.update(continuation_metadata_summary(fs))
|
|
@@ -48,6 +48,7 @@ SESSION_STATUS_VALUES = [
|
|
|
48
48
|
"context_overflow",
|
|
49
49
|
"stalled_context_continuation",
|
|
50
50
|
"workflow_blocked",
|
|
51
|
+
"workflow_skipped",
|
|
51
52
|
"commit_missing",
|
|
52
53
|
"docs_missing",
|
|
53
54
|
"merge_conflict",
|
|
@@ -101,7 +102,7 @@ def parse_args():
|
|
|
101
102
|
parser.add_argument("--continuation-summary-path", default=None, help="Optional continuation summary artifact path.")
|
|
102
103
|
parser.add_argument("--no-progress-count", type=int, default=None, help="Consecutive context-overflow sessions without objective progress.")
|
|
103
104
|
parser.add_argument("--progress-fingerprint", default=None, help="JSON progress fingerprint captured after the session.")
|
|
104
|
-
parser.add_argument("--checkpoint-state", default=None, help="JSON semantic
|
|
105
|
+
parser.add_argument("--checkpoint-state", default=None, help="JSON semantic pipeline checkpoint snapshot captured after the session.")
|
|
105
106
|
return parser.parse_args()
|
|
106
107
|
|
|
107
108
|
|
|
@@ -260,7 +261,6 @@ SEMANTIC_CHECKPOINT_FIELDS = (
|
|
|
260
261
|
"stage_result",
|
|
261
262
|
"repair_scope",
|
|
262
263
|
"repair_round",
|
|
263
|
-
"authoritative_evidence_paths",
|
|
264
264
|
"blocked_reason",
|
|
265
265
|
"terminal_status",
|
|
266
266
|
)
|
|
@@ -598,6 +598,20 @@ def action_update(args, refactor_list_path, state_dir):
|
|
|
598
598
|
if err:
|
|
599
599
|
error_out("Failed to update .prizmkit/plans/refactor-list.json: {}".format(err))
|
|
600
600
|
return
|
|
601
|
+
elif session_status == "workflow_skipped":
|
|
602
|
+
# A completed AI CLI session without authoritative workflow evidence is
|
|
603
|
+
# skipped, not crashed. Preserve diagnostics and spend no retry budget.
|
|
604
|
+
new_status = "skipped"
|
|
605
|
+
rs["continuation_pending"] = False
|
|
606
|
+
rs.pop("continuation_reason", None)
|
|
607
|
+
rs.pop("terminal_status", None)
|
|
608
|
+
rs.pop("blocked_reason", None)
|
|
609
|
+
rs["needs_attention"] = True
|
|
610
|
+
rs["skipped_reason"] = "workflow_completion_evidence_invalid"
|
|
611
|
+
err = update_refactor_in_list(refactor_list_path, refactor_id, new_status)
|
|
612
|
+
if err:
|
|
613
|
+
error_out("Failed to update .prizmkit/plans/refactor-list.json: {}".format(err))
|
|
614
|
+
return
|
|
601
615
|
elif session_status == "workflow_blocked":
|
|
602
616
|
# Semantic terminal state: preserve partial work without consuming any retry budget.
|
|
603
617
|
new_status = "failed"
|
|
@@ -691,6 +705,11 @@ def action_update(args, refactor_list_path, state_dir):
|
|
|
691
705
|
summary["restart_policy"] = "context_overflow_continuation"
|
|
692
706
|
summary.update(continuation_metadata_summary(rs))
|
|
693
707
|
summary["artifacts_preserved"] = True
|
|
708
|
+
elif session_status == "workflow_skipped":
|
|
709
|
+
summary["restart_policy"] = "terminal_skipped"
|
|
710
|
+
summary.update(continuation_metadata_summary(rs))
|
|
711
|
+
summary["checkpoint_state"] = semantic_checkpoint
|
|
712
|
+
summary["artifacts_preserved"] = True
|
|
694
713
|
elif session_status == "workflow_blocked":
|
|
695
714
|
summary["restart_policy"] = "terminal_blocked"
|
|
696
715
|
summary.update(continuation_metadata_summary(rs))
|
|
@@ -24,7 +24,7 @@ Infer what needs to be done from the feature context above and follow the active
|
|
|
24
24
|
|
|
25
25
|
### Execution Steps
|
|
26
26
|
|
|
27
|
-
1. **Read context**: Read `.prizmkit/prizm-docs/root.prizm` and relevant
|
|
27
|
+
1. **Read context**: Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs to understand the codebase.
|
|
28
28
|
|
|
29
29
|
2. **Plan**: Run `/prizmkit-plan` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` to produce `spec.md` and `plan.md`.
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Infer what needs to be done from the feature context above and follow the active
|
|
|
32
32
|
|
|
33
33
|
4. **Review**: Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` and follow the skill's current review contract for review execution, repairs, verification, evidence, and handoff. Require the last `## Final Result`. `REVIEW_PASS` proceeds to test; `REVIEW_NEEDS_FIXES` increments the shared outer repair round and routes implement → code-review → test. Do not invoke another review entry point or add a second review path outside the skill contract.
|
|
34
34
|
|
|
35
|
-
5. **Test**: After review passes, run `/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`.
|
|
35
|
+
5. **Test**: After review passes, run `/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. Consume the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to retrospective. `TEST_NEEDS_FIXES` or `TEST_BLOCKED` preserves its known correction or blocker and stops truthfully. Do not require an evidence package, reinterpret a testing result as a runtime crash, or recreate the skill's bounded review and repair loops.
|
|
36
36
|
|
|
37
37
|
6. **Retrospective**: Run `/prizmkit-retrospective` to sync `.prizmkit/prizm-docs/` with code changes.
|
|
38
38
|
|
|
@@ -46,5 +46,5 @@ Infer what needs to be done from the feature context above and follow the active
|
|
|
46
46
|
- If a step fails after 3 attempts, write a status report and stop.
|
|
47
47
|
- **Never re-read unmodified files**: once you read a file into context, do NOT read it again unless it was modified by an Edit/Write after your last read — use `grep -n`/`sed -n` for specific lines. Before issuing a Read, ask: "Have I read this file before, and has it changed since?" If no — do NOT read it. Follow the active skill and runtime contracts when an execution unit is created; do not infer its permissions, continuation, or retry behavior from this fallback prompt.
|
|
48
48
|
- **Read offset safety**: if Read returns "shorter than offset"/"empty" — run `wc -l` then `sed -n`, do NOT retry same offset.
|
|
49
|
-
-
|
|
49
|
+
- Follow each skill's own bounded loops; do not add a second cross-skill test-fix loop in this fallback prompt.
|
|
50
50
|
- **Layered test**: debug with single-file tests, only run full suite as gate when single-file is green.
|
|
@@ -128,7 +128,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
128
128
|
|
|
129
129
|
**Step A — Build Context Snapshot** (skip if `context-snapshot.md` already exists):
|
|
130
130
|
|
|
131
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant
|
|
131
|
+
1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs
|
|
132
132
|
2. Detect source code directories from KEY_FILES and STRUCTURE sections in `root.prizm`; if root docs are unavailable, use the helper to list likely source files:
|
|
133
133
|
```bash
|
|
134
134
|
{{RUNTIME_HELPER_CMD}} artifact source-files . --json
|
|
@@ -138,7 +138,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
138
138
|
4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
139
139
|
- **Section 1 — Feature Brief**: feature description (2-3 lines) + acceptance criteria (copy from above)
|
|
140
140
|
- **Section 2 — Verification Gates**: copy the gate checklist from the Task Contract above
|
|
141
|
-
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from
|
|
141
|
+
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from the loaded Prizm docs that apply to files in this scope. Do NOT copy complete documentation files.
|
|
142
142
|
- **Section 4 — File Manifest**: For each file relevant to this feature, list: file path, why it's needed (modify/reference/test), key interface signatures (function names + params + return types). Do NOT include full file content — agents read files on-demand. Format:
|
|
143
143
|
### Files to Modify
|
|
144
144
|
| File | Why Needed | Key Interfaces |
|
|
@@ -151,7 +151,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
151
151
|
| `<source-dir>/security/permission-guard.js` | Permission check integration | `checkCommandPermission(userId, cmd)` |
|
|
152
152
|
|
|
153
153
|
### Known TRAPS (from .prizmkit/prizm-docs/)
|
|
154
|
-
- <trap entries extracted from
|
|
154
|
+
- <trap entries extracted from the loaded Prizm docs>
|
|
155
155
|
4. Confirm: `{{RUNTIME_HELPER_CMD}} artifact exists .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`
|
|
156
156
|
|
|
157
157
|
**After Step A**: Use context-snapshot.md Section 4 File Manifest to guide targeted file reads. Do NOT scan directories or read unrelated files.
|
|
@@ -237,7 +237,7 @@ For each Verification Gate from the Task Contract, write one evidence line to Im
|
|
|
237
237
|
|
|
238
238
|
Review the completed implementation before the full Feature test gate. Run `/prizmkit-code-review artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` and follow the skill's current review contract for review execution, repairs, verification, evidence, and handoff. Do not invoke another review skill or add a second review path outside that contract.
|
|
239
239
|
|
|
240
|
-
- `REVIEW_PASS` → record `stage=code-review`, `status=
|
|
240
|
+
- `REVIEW_PASS` → record `stage=code-review`, `status=completed`, `stage_result=REVIEW_PASS`, `next_stage=prizmkit-test`, and `resume_from=prizmkit-test`; then run the test gate.
|
|
241
241
|
- `REVIEW_NEEDS_FIXES` → increment the shared outer `repair_round` and route `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`.
|
|
242
242
|
- Stop as `WORKFLOW_BLOCKED` when the outer repair round is already three. The Main-Agent review loop has its separate limit of up to ten completed rounds.
|
|
243
243
|
|
|
@@ -252,26 +252,15 @@ Only `REVIEW_PASS` can proceed to the structured Feature test gate. `REVIEW_INCO
|
|
|
252
252
|
|
|
253
253
|
### Scoped Feature Test Gate — PrizmKit Test
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
{{RUNTIME_HELPER_CMD}} artifact ensure-dir .prizmkit/specs/{{FEATURE_SLUG}}
|
|
259
|
-
{{RUNTIME_HELPER_CMD}} artifact touch .prizmkit/specs/{{FEATURE_SLUG}}/.prizmkit-test-started
|
|
260
|
-
```
|
|
255
|
+
Invoke the Feature test gate:
|
|
261
256
|
|
|
262
257
|
```text
|
|
263
258
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
264
259
|
```
|
|
265
260
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
Repair routes:
|
|
269
|
-
- `TEST_FAIL` with `repair_scope=test-infrastructure` → implement → test, without speculative production edits.
|
|
270
|
-
- `TEST_FAIL` with production/runtime/schema/dependency/public-interface scope → implement → code-review → test.
|
|
271
|
-
- Unknown unsafe scope → `WORKFLOW_BLOCKED`; do not guess a production edit.
|
|
272
|
-
- `TEST_BLOCKED` → preserve evidence/artifacts, perform bounded environment recovery, then resume from test or finish terminal `WORKFLOW_BLOCKED`; never edit production speculatively.
|
|
261
|
+
Consume `.prizmkit/specs/{{FEATURE_SLUG}}/test-report.md` and `test-result.json`. They must agree. `TEST_PASS` completes the gate; `TEST_NEEDS_FIXES` preserves a known correction or delta-review requirement and stops truthfully; `TEST_BLOCKED` preserves the blocker and becomes `WORKFLOW_BLOCKED`. Do not require an evidence package, manifest, hashes, attestation, or test-internal checkpoint, and do not reinterpret a testing result as an AI CLI crash.
|
|
273
262
|
|
|
274
|
-
Record `stage`, `status`, `stage_result`, `repair_scope`, `repair_round`,
|
|
263
|
+
Record only caller-owned `stage`, `status`, `stage_result`, `repair_scope`, `repair_round`, `next_stage`, and `resume_from` in recovery metadata. Keep testing reports/results separate from `workflow-checkpoint.json`. The skill owns its internal ten-round Main-Agent review, five-response optional independent review, and three-round execution-failure repair budgets.
|
|
275
264
|
|
|
276
265
|
{{IF_BROWSER_INTERACTION}}
|
|
277
266
|
### Phase 5.5: Browser Verification — MANDATORY
|
|
@@ -448,7 +437,7 @@ git log --oneline
|
|
|
448
437
|
**6b.** Run `/prizmkit-retrospective` (**before commit**, maintains `.prizmkit/prizm-docs/` architecture index):
|
|
449
438
|
- **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
|
|
450
439
|
- **Architecture knowledge** (feature sessions only): extract TRAPS, RULES, DECISIONS from completed work into `.prizmkit/prizm-docs/`
|
|
451
|
-
- **
|
|
440
|
+
- **Detail-doc coverage check**: For any module/sub-module with source files created or significantly modified in this session but no detail `.prizm` doc — evaluate whether one is warranted and create it when needed. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
452
441
|
- Stage doc changes: `git add .prizmkit/prizm-docs/`
|
|
453
442
|
⚠️ Do NOT commit here. Only stage.
|
|
454
443
|
|
|
@@ -104,7 +104,7 @@ Use this protocol only when the bug is UI/frontend-reproducible. Evidence must c
|
|
|
104
104
|
|
|
105
105
|
**Step 1 — Diagnose the bug**:
|
|
106
106
|
|
|
107
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant
|
|
107
|
+
1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs for affected modules
|
|
108
108
|
2. Trace the bug:
|
|
109
109
|
- Classify error type (Runtime / Network / Auth / Data / Logic / Config / External)
|
|
110
110
|
- Check `.prizmkit/prizm-docs/` TRAPS sections for matching known issues
|
|
@@ -203,18 +203,18 @@ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to task policy. `REVIEW_
|
|
|
203
203
|
|
|
204
204
|
### Phase 4: Post-Review Test Gate — PrizmKit Test
|
|
205
205
|
|
|
206
|
-
After a valid code-review PASS, run the mandatory
|
|
206
|
+
After a valid code-review PASS, run the mandatory test gate against the same artifact root:
|
|
207
207
|
|
|
208
208
|
```text
|
|
209
209
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
Read the
|
|
212
|
+
Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to retrospective and commit. `TEST_NEEDS_FIXES` preserves the known correction or delta-review requirement and stops truthfully. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
213
213
|
|
|
214
|
-
Only
|
|
214
|
+
Only `TEST_PASS` may proceed to commit.
|
|
215
215
|
|
|
216
216
|
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
217
|
-
**MANUAL/HYBRID AUTOMATION**: This
|
|
217
|
+
**MANUAL/HYBRID AUTOMATION**: This pipeline session is always headless. Execute manual/hybrid verification with available deterministic browser, CLI/API, fixture, or test tooling. Document the method and verification basis, then continue through `/prizmkit-retrospective` and `/prizmkit-committer`; never ask for UAT, wait for a user, or stop as `partial`.
|
|
218
218
|
- Do not write `verifying` to the external bug-list status field; fine-grained verification is session/checkpoint metadata, while the external list status remains one of `pending`, `in_progress`, `completed`, `failed`, `skipped`, or `needs_info`.
|
|
219
219
|
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
220
220
|
|
|
@@ -224,7 +224,7 @@ Only validated `TEST_PASS` may proceed to commit.
|
|
|
224
224
|
|
|
225
225
|
### Headless Commit Authorization
|
|
226
226
|
|
|
227
|
-
This pipeline launch authorizes one local task commit only after
|
|
227
|
+
This pipeline launch authorizes one local task commit only after Code Review and a consistent `TEST_PASS` report/result pair. Never ask a question, wait for input, or request confirmation. Invoke `/prizmkit-committer` with `mode=l4-headless`, `owner=prizmkit-l4`, and `local_commit_authorized=true`. The runtime controls any optional remote publication after the local commit; do not make a publication decision in this session.
|
|
228
228
|
|
|
229
229
|
**Bug Fix Documentation Policy**:
|
|
230
230
|
- **DEFAULT**: Run `/prizmkit-retrospective` with structural sync only (Job 1). Skip knowledge injection.
|
|
@@ -159,15 +159,15 @@ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to behavior-preservation
|
|
|
159
159
|
|
|
160
160
|
### Phase 5: Post-Review Test Gate — PrizmKit Test
|
|
161
161
|
|
|
162
|
-
After a valid code-review PASS, run the mandatory
|
|
162
|
+
After a valid code-review PASS, run the mandatory test gate against the same artifact root:
|
|
163
163
|
|
|
164
164
|
```text
|
|
165
165
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
Behavior-preservation
|
|
168
|
+
Behavior-preservation context remains supporting input. Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to browser verification or retrospective. `TEST_NEEDS_FIXES` preserves the known correction or delta-review requirement and stops truthfully. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
169
169
|
|
|
170
|
-
Only
|
|
170
|
+
Only `TEST_PASS` may proceed to browser verification or commit.
|
|
171
171
|
|
|
172
172
|
---
|
|
173
173
|
|
|
@@ -187,7 +187,7 @@ Record tool choice, URL, steps, screenshot path if available, result, and cleanu
|
|
|
187
187
|
|
|
188
188
|
### Headless Commit Authorization
|
|
189
189
|
|
|
190
|
-
This pipeline launch authorizes one local task commit only after
|
|
190
|
+
This pipeline launch authorizes one local task commit only after Code Review, a consistent `TEST_PASS` report/result pair, and required behavior-preservation gates pass. Never ask a question, wait for input, or request confirmation. Invoke `/prizmkit-committer` with `mode=l4-headless`, `owner=prizmkit-l4`, and `local_commit_authorized=true`. The runtime controls any optional remote publication after the local commit; do not make a publication decision in this session.
|
|
191
191
|
|
|
192
192
|
Run `/prizmkit-retrospective` using the current working tree and staged changes as input context. Do not rely only on `git diff --cached`.
|
|
193
193
|
|
|
@@ -266,7 +266,7 @@ Before exiting, write `{{SESSION_STATUS_PATH}}`:
|
|
|
266
266
|
|
|
267
267
|
## Reminders
|
|
268
268
|
|
|
269
|
-
- Use
|
|
269
|
+
- Use the atomic skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-retrospective`, `/prizmkit-committer`.
|
|
270
270
|
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|
|
271
271
|
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path
|
|
272
272
|
- Behavior preservation is the first priority.
|