prizmkit 1.1.139 → 1.1.141
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/prizmkit_runtime/checkpoint_state.py +41 -121
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +1 -2
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +150 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +21 -804
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +4 -6
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +4 -6
- package/bundled/dev-pipeline/scripts/prompt_framework.py +56 -55
- package/bundled/dev-pipeline/scripts/update-bug-status.py +1 -2
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +14 -96
- package/bundled/dev-pipeline/scripts/update-feature-status.py +1 -2
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +1 -2
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +7 -18
- 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-test.md +13 -10
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +1 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +14 -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-specify-plan-full.md +3 -3
- 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/tests/test_checkpoint_state.py +287 -384
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +119 -684
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +17 -40
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +20 -23
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +29 -32
- package/bundled/skills/_metadata.json +6 -6
- package/bundled/skills/prizmkit/SKILL.md +8 -13
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-code-review/SKILL.md +3 -3
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -3
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-retrospective/SKILL.md +2 -2
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-test/SKILL.md +217 -187
- 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 +15 -23
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +61 -80
- package/package.json +1 -1
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +0 -476
- 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 -110
- package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +0 -181
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +0 -1851
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +0 -1793
|
@@ -500,66 +500,43 @@ class TestBugfixCheckpointGeneration:
|
|
|
500
500
|
test_step = checkpoint["steps"][4]
|
|
501
501
|
assert test_step["depends_on"] == "S04"
|
|
502
502
|
assert test_step["required_artifacts"] == [
|
|
503
|
-
".prizmkit/test
|
|
504
|
-
".prizmkit/test
|
|
505
|
-
".prizmkit/test/evidence/*/validation.json",
|
|
503
|
+
".prizmkit/bugfix/B-001/test-report.md",
|
|
504
|
+
".prizmkit/bugfix/B-001/test-result.json",
|
|
506
505
|
]
|
|
507
506
|
assert checkpoint["steps"][5]["depends_on"] == "S05"
|
|
508
507
|
|
|
509
|
-
def
|
|
508
|
+
def test_bugfix_result_routing_stops_test_non_pass(self):
|
|
510
509
|
review = route_bugfix_repair("REVIEW_NEEDS_FIXES", repair_round=0)
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
)
|
|
514
|
-
production = route_bugfix_repair("TEST_FAIL", "public-interface", repair_round=2)
|
|
510
|
+
needs_fixes = route_bugfix_repair("TEST_NEEDS_FIXES", repair_round=1)
|
|
511
|
+
blocked = route_bugfix_repair("TEST_BLOCKED", repair_round=1)
|
|
515
512
|
|
|
516
513
|
assert review["route"] == [
|
|
517
514
|
"prizmkit-implement", "prizmkit-code-review", "prizmkit-test",
|
|
518
515
|
]
|
|
519
|
-
assert
|
|
520
|
-
assert
|
|
521
|
-
|
|
522
|
-
]
|
|
523
|
-
assert production["repair_round"] == 3
|
|
524
|
-
|
|
525
|
-
def test_bugfix_repair_routing_blocks_unsafe_blocked_and_exhausted_results(self):
|
|
526
|
-
unknown = route_bugfix_repair("TEST_FAIL", "unknown", repair_round=1)
|
|
527
|
-
blocked = route_bugfix_repair("TEST_BLOCKED", "production", repair_round=1)
|
|
528
|
-
exhausted = route_bugfix_repair("TEST_FAIL", "production", repair_round=3)
|
|
529
|
-
|
|
530
|
-
assert unknown["blocked"] is True
|
|
531
|
-
assert unknown["route"] == []
|
|
516
|
+
assert review["repair_round"] == 1
|
|
517
|
+
assert needs_fixes["blocked"] is True
|
|
518
|
+
assert needs_fixes["route"] == []
|
|
519
|
+
assert needs_fixes["blocked_reason"] == "test_needs_fixes"
|
|
532
520
|
assert blocked["blocked"] is True
|
|
533
521
|
assert blocked["resumable"] is False
|
|
534
522
|
assert blocked["next_stage"] is None
|
|
535
523
|
assert blocked["terminal_status"] == "WORKFLOW_BLOCKED"
|
|
536
524
|
assert blocked["blocked_reason"] == "test_blocked"
|
|
537
|
-
assert blocked["route"] == []
|
|
538
|
-
assert "cannot safely edit production" in blocked["reason"]
|
|
539
|
-
assert exhausted["blocked"] is True
|
|
540
|
-
assert exhausted["repair_round"] == 3
|
|
541
525
|
|
|
542
|
-
def
|
|
526
|
+
def test_bugfix_checkpoint_metadata_has_no_evidence_handoff(self):
|
|
543
527
|
metadata = bugfix_checkpoint_metadata(
|
|
544
528
|
".prizmkit/bugfix/B-001",
|
|
545
|
-
evidence={
|
|
546
|
-
"manifest_path": ".prizmkit/test/evidence/id/manifest.json",
|
|
547
|
-
"verdict_path": ".prizmkit/test/evidence/id/verdict.json",
|
|
548
|
-
"validation_path": ".prizmkit/test/evidence/id/validation.json",
|
|
549
|
-
},
|
|
550
529
|
stage="test",
|
|
551
|
-
status="
|
|
552
|
-
stage_result="
|
|
553
|
-
|
|
554
|
-
|
|
530
|
+
status="TEST_NEEDS_FIXES",
|
|
531
|
+
stage_result="TEST_NEEDS_FIXES",
|
|
532
|
+
repair_round=0,
|
|
533
|
+
next_stage=None,
|
|
534
|
+
resume_from=None,
|
|
555
535
|
)
|
|
556
536
|
|
|
557
537
|
assert metadata["artifact_dir"] == ".prizmkit/bugfix/B-001"
|
|
558
|
-
assert metadata["
|
|
559
|
-
|
|
560
|
-
)
|
|
561
|
-
assert metadata["repair_round"] == 2
|
|
562
|
-
assert metadata["resume_from"] == "prizmkit-implement"
|
|
538
|
+
assert metadata["stage_result"] == "TEST_NEEDS_FIXES"
|
|
539
|
+
assert "authoritative_evidence_paths" not in metadata
|
|
563
540
|
|
|
564
541
|
def test_manual_bugfix_uses_automatic_verification_and_keeps_commit_gate(self):
|
|
565
542
|
sections = assemble_bugfix_sections(
|
|
@@ -59,12 +59,12 @@ class TestRefactorCheckpointMerge:
|
|
|
59
59
|
existing["refactor_state"] = refactor_checkpoint_metadata(
|
|
60
60
|
".prizmkit/refactor/R-008",
|
|
61
61
|
stage="test",
|
|
62
|
-
status="
|
|
63
|
-
stage_result="
|
|
62
|
+
status="TEST_NEEDS_FIXES",
|
|
63
|
+
stage_result="TEST_NEEDS_FIXES",
|
|
64
64
|
repair_scope="public-interface",
|
|
65
65
|
repair_round=2,
|
|
66
|
-
next_stage=
|
|
67
|
-
resume_from=
|
|
66
|
+
next_stage=None,
|
|
67
|
+
resume_from=None,
|
|
68
68
|
)
|
|
69
69
|
existing["steps"][0]["status"] = "skipped"
|
|
70
70
|
|
|
@@ -215,7 +215,7 @@ def test_template_source_is_clean_for_headless_prompt_contract():
|
|
|
215
215
|
assert "/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/" in content
|
|
216
216
|
assert "local_commit_authorized=true" in content
|
|
217
217
|
assert "push_authorized" not in content
|
|
218
|
-
assert "Behavior-preservation
|
|
218
|
+
assert "Behavior-preservation context remains supporting input" in content
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
# ---------------------------------------------------------------------------
|
|
@@ -349,35 +349,32 @@ class TestRefactorCheckpointGeneration:
|
|
|
349
349
|
"completion-summary",
|
|
350
350
|
]
|
|
351
351
|
assert checkpoint["steps"][4]["depends_on"] == "S04"
|
|
352
|
+
assert checkpoint["steps"][4]["required_artifacts"] == [
|
|
353
|
+
".prizmkit/refactor/R-001/test-report.md",
|
|
354
|
+
".prizmkit/refactor/R-001/test-result.json",
|
|
355
|
+
]
|
|
352
356
|
assert checkpoint["steps"][5]["depends_on"] == "S05"
|
|
353
357
|
|
|
354
|
-
def
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
)
|
|
358
|
-
production = route_refactor_repair("TEST_FAIL", "public-interface", repair_round=1)
|
|
359
|
-
blocked = route_refactor_repair("TEST_BLOCKED", "production", repair_round=1)
|
|
358
|
+
def test_refactor_result_routing_stops_test_non_pass(self):
|
|
359
|
+
review = route_refactor_repair("REVIEW_NEEDS_FIXES", repair_round=0)
|
|
360
|
+
needs_fixes = route_refactor_repair("TEST_NEEDS_FIXES", repair_round=1)
|
|
361
|
+
blocked = route_refactor_repair("TEST_BLOCKED", repair_round=1)
|
|
360
362
|
|
|
361
|
-
assert
|
|
362
|
-
assert production["route"] == [
|
|
363
|
+
assert review["route"] == [
|
|
363
364
|
"prizmkit-implement", "prizmkit-code-review", "prizmkit-test",
|
|
364
365
|
]
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
assert
|
|
368
|
-
assert unknown["route"] == []
|
|
369
|
-
assert exhausted["blocked"] is True
|
|
370
|
-
assert exhausted["repair_round"] == 3
|
|
366
|
+
assert needs_fixes["blocked"] is True
|
|
367
|
+
assert needs_fixes["route"] == []
|
|
368
|
+
assert needs_fixes["blocked_reason"] == "test_needs_fixes"
|
|
371
369
|
assert blocked["blocked"] is True
|
|
372
370
|
assert blocked["route"] == []
|
|
373
371
|
assert blocked["next_stage"] is None
|
|
374
372
|
assert blocked["terminal_status"] == "WORKFLOW_BLOCKED"
|
|
375
373
|
assert blocked["blocked_reason"] == "test_blocked"
|
|
376
374
|
|
|
377
|
-
def
|
|
375
|
+
def test_refactor_checkpoint_metadata_has_no_evidence_handoff(self):
|
|
378
376
|
metadata = refactor_checkpoint_metadata(
|
|
379
377
|
".prizmkit/refactor/R-001",
|
|
380
|
-
evidence={"manifest_path": "manifest.json"},
|
|
381
378
|
stage="test",
|
|
382
379
|
status="TEST_PASS",
|
|
383
380
|
stage_result="TEST_PASS",
|
|
@@ -386,7 +383,7 @@ class TestRefactorCheckpointGeneration:
|
|
|
386
383
|
)
|
|
387
384
|
|
|
388
385
|
assert metadata["artifact_dir"] == ".prizmkit/refactor/R-001"
|
|
389
|
-
assert
|
|
386
|
+
assert "authoritative_evidence_paths" not in metadata
|
|
390
387
|
assert metadata["next_stage"] == "prizmkit-retrospective"
|
|
391
388
|
assert metadata["resume_from"] == "prizmkit-retrospective"
|
|
392
389
|
|
|
@@ -397,7 +394,7 @@ class TestRefactorCheckpointGeneration:
|
|
|
397
394
|
"/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/R-001/"
|
|
398
395
|
) < prompt.index("### Headless Commit Authorization")
|
|
399
396
|
assert "prizmkit-workflow" not in prompt
|
|
400
|
-
assert "
|
|
397
|
+
assert "Existing behavior-preservation context is input to testing" in prompt
|
|
401
398
|
assert '"local_commit_authorized": true' in prompt
|
|
402
399
|
assert "push_authorized" not in prompt
|
|
403
400
|
assert "Remote publication is controlled by the runtime" in prompt
|
|
@@ -92,12 +92,6 @@ def _item_id_from_next_result(kind, result):
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
def _write_semantic_completion_checkpoint(project_root, artifact_dir, workflow_type="feature-pipeline"):
|
|
95
|
-
validator = (
|
|
96
|
-
project_root / ".claude" / "command-assets" / "prizmkit-test"
|
|
97
|
-
/ "scripts" / "validate_test_evidence.py"
|
|
98
|
-
)
|
|
99
|
-
validator.parent.mkdir(parents=True, exist_ok=True)
|
|
100
|
-
validator.write_text("import sys\nsys.exit(0)\n", encoding="utf-8")
|
|
101
95
|
contracts = {
|
|
102
96
|
"feature-pipeline": (
|
|
103
97
|
"feature_state",
|
|
@@ -123,25 +117,6 @@ def _write_semantic_completion_checkpoint(project_root, artifact_dir, workflow_t
|
|
|
123
117
|
),
|
|
124
118
|
}
|
|
125
119
|
state_key, skills = contracts[workflow_type]
|
|
126
|
-
evidence_id = "semantic-evidence"
|
|
127
|
-
evidence_dir = project_root / ".prizmkit" / "test" / "evidence" / evidence_id
|
|
128
|
-
evidence_dir.mkdir(parents=True, exist_ok=True)
|
|
129
|
-
evidence = {
|
|
130
|
-
"manifest": evidence_dir / "manifest.json",
|
|
131
|
-
"verdict": evidence_dir / "verdict.json",
|
|
132
|
-
"validation": evidence_dir / "validation.json",
|
|
133
|
-
}
|
|
134
|
-
evidence["manifest"].write_text(
|
|
135
|
-
json.dumps({"evidence_id": evidence_id, "final_verdict": "TEST_PASS"}),
|
|
136
|
-
encoding="utf-8",
|
|
137
|
-
)
|
|
138
|
-
evidence["verdict"].write_text(json.dumps({"verdict": "TEST_PASS"}), encoding="utf-8")
|
|
139
|
-
evidence["validation"].write_text(
|
|
140
|
-
json.dumps({"verdict": "TEST_PASS", "result": "passed"}), encoding="utf-8"
|
|
141
|
-
)
|
|
142
|
-
relative_evidence = {
|
|
143
|
-
key: str(path.relative_to(project_root)) for key, path in evidence.items()
|
|
144
|
-
}
|
|
145
120
|
steps = []
|
|
146
121
|
previous = None
|
|
147
122
|
for index, skill in enumerate(skills, start=1):
|
|
@@ -157,10 +132,38 @@ def _write_semantic_completion_checkpoint(project_root, artifact_dir, workflow_t
|
|
|
157
132
|
step["stage_result"] = "REVIEW_PASS"
|
|
158
133
|
if skill == "prizmkit-test":
|
|
159
134
|
step["stage_result"] = "TEST_PASS"
|
|
160
|
-
|
|
135
|
+
relative_artifact = artifact_dir.relative_to(project_root)
|
|
136
|
+
step["required_artifacts"] = [
|
|
137
|
+
str(relative_artifact / "test-report.md"),
|
|
138
|
+
str(relative_artifact / "test-result.json"),
|
|
139
|
+
]
|
|
161
140
|
steps.append(step)
|
|
162
141
|
previous = step["id"]
|
|
163
142
|
artifact_dir.mkdir(parents=True, exist_ok=True)
|
|
143
|
+
(artifact_dir / "test-report.md").write_text(
|
|
144
|
+
"# Test Report\n\n## Final Result\n\n- Result: TEST_PASS\n",
|
|
145
|
+
encoding="utf-8",
|
|
146
|
+
)
|
|
147
|
+
(artifact_dir / "test-result.json").write_text(
|
|
148
|
+
json.dumps({
|
|
149
|
+
"schema_version": 1,
|
|
150
|
+
"result": "TEST_PASS",
|
|
151
|
+
"report": "test-report.md",
|
|
152
|
+
"main_review_rounds": 1,
|
|
153
|
+
"independent_review": {
|
|
154
|
+
"status": "downgraded",
|
|
155
|
+
"responses": 0,
|
|
156
|
+
"downgrade_reason": "read-only continuation capability unavailable",
|
|
157
|
+
"final_state_rechecked": False,
|
|
158
|
+
},
|
|
159
|
+
"repair_rounds": 0,
|
|
160
|
+
"production_changed": False,
|
|
161
|
+
"review_required": False,
|
|
162
|
+
"review_scope": None,
|
|
163
|
+
"unresolved_items": [],
|
|
164
|
+
}),
|
|
165
|
+
encoding="utf-8",
|
|
166
|
+
)
|
|
164
167
|
checkpoint = artifact_dir / "workflow-checkpoint.json"
|
|
165
168
|
checkpoint.write_text(
|
|
166
169
|
json.dumps({
|
|
@@ -169,7 +172,6 @@ def _write_semantic_completion_checkpoint(project_root, artifact_dir, workflow_t
|
|
|
169
172
|
"steps": steps,
|
|
170
173
|
state_key: {
|
|
171
174
|
"repair_round": 0,
|
|
172
|
-
"authoritative_evidence_paths": relative_evidence,
|
|
173
175
|
"terminal_status": "WORKFLOW_COMPLETED",
|
|
174
176
|
},
|
|
175
177
|
}),
|
|
@@ -3877,11 +3879,6 @@ def test_family_status_persists_identical_semantic_blocked_snapshot_without_retr
|
|
|
3877
3879
|
"stage_result": "TEST_BLOCKED",
|
|
3878
3880
|
"repair_scope": "production",
|
|
3879
3881
|
"repair_round": 2,
|
|
3880
|
-
"authoritative_evidence_paths": {
|
|
3881
|
-
"manifest": ".prizmkit/test/evidence/id/manifest.json",
|
|
3882
|
-
"verdict": ".prizmkit/test/evidence/id/verdict.json",
|
|
3883
|
-
"validation": ".prizmkit/test/evidence/id/validation.json",
|
|
3884
|
-
},
|
|
3885
3882
|
"blocked_reason": "test_blocked",
|
|
3886
3883
|
"terminal_status": "WORKFLOW_BLOCKED",
|
|
3887
3884
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.141",
|
|
3
3
|
"skills": {
|
|
4
4
|
"prizmkit": {
|
|
5
5
|
"description": "Framework introduction and navigation for the formal single-requirement lifecycle, project initialization, Prizm docs, and independent deployment.",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"hasScripts": false
|
|
10
10
|
},
|
|
11
11
|
"prizmkit-workflow": {
|
|
12
|
-
"description": "Composite
|
|
12
|
+
"description": "Composite workflow for one explicitly requested formal requirement: plan → implement → code-review → test → retrospective → committer, with stable artifact identity and deterministic repair routing.",
|
|
13
13
|
"tier": "foundation",
|
|
14
14
|
"category": "prizmkit-skill",
|
|
15
15
|
"hasAssets": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"hasScripts": true
|
|
45
45
|
},
|
|
46
46
|
"prizmkit-committer": {
|
|
47
|
-
"description": "Final formal-requirement commit gate: verifies all prior stages, confirms interactive commits or performs authorized
|
|
47
|
+
"description": "Final formal-requirement commit gate: verifies all prior stages, confirms interactive commits or performs authorized headless pipeline commits, and never pushes automatically.",
|
|
48
48
|
"tier": "1",
|
|
49
49
|
"category": "prizmkit-skill",
|
|
50
50
|
"hasAssets": false,
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
"hasScripts": false
|
|
73
73
|
},
|
|
74
74
|
"prizmkit-test": {
|
|
75
|
-
"description": "
|
|
75
|
+
"description": "AI-led project-native testing for the affected business module and Regression Ring, with bounded failure repair, mandatory Main-Agent review, optional strict independent Test Reviewer, and TEST_PASS/TEST_NEEDS_FIXES/TEST_BLOCKED results.",
|
|
76
76
|
"tier": "1",
|
|
77
77
|
"category": "prizmkit-skill",
|
|
78
|
-
"hasAssets":
|
|
79
|
-
"hasScripts":
|
|
78
|
+
"hasAssets": false,
|
|
79
|
+
"hasScripts": false
|
|
80
80
|
},
|
|
81
81
|
"feature-workflow": {
|
|
82
82
|
"description": "Thin feature scenario router. Clarifies whether the request needs direct single-requirement guidance, app planning, feature planning, or command construction from an existing feature list.",
|
|
@@ -72,7 +72,7 @@ Typos, pure formatting, small documentation edits, and other explicitly low-risk
|
|
|
72
72
|
| `prizmkit-plan` | Clarify the requirement and create/review `spec.md` and `plan.md`. | `PLAN_READY` → `prizmkit-implement` |
|
|
73
73
|
| `prizmkit-implement` | Execute the plan tasks and record completion. | `IMPLEMENTED` → `prizmkit-code-review` |
|
|
74
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
|
|
75
|
+
| `prizmkit-test` | Validate the final reviewed workspace with project-native tests and a consistent terminal report/result pair. | `TEST_PASS` → `prizmkit-retrospective` |
|
|
76
76
|
| `prizmkit-retrospective` | Synchronize durable project documentation or record no documentation change. | `RETRO_COMPLETE` → `prizmkit-committer` |
|
|
77
77
|
| `prizmkit-committer` | Verify gates, request commit confirmation, and create the local commit. | `COMMITTED` |
|
|
78
78
|
|
|
@@ -108,19 +108,14 @@ REVIEW_NEEDS_FIXES
|
|
|
108
108
|
→ prizmkit-implement
|
|
109
109
|
→ prizmkit-code-review
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
→
|
|
113
|
-
→
|
|
114
|
-
|
|
115
|
-
TEST_FAIL affecting production code, runtime configuration, schema,
|
|
116
|
-
dependencies, or public interfaces
|
|
117
|
-
→ prizmkit-implement
|
|
118
|
-
→ prizmkit-code-review
|
|
119
|
-
→ prizmkit-test
|
|
111
|
+
TEST_NEEDS_FIXES
|
|
112
|
+
→ preserve test-report.md and test-result.json
|
|
113
|
+
→ stop with the known correction or delta-review requirement
|
|
114
|
+
→ caller owns any later review/retest route
|
|
120
115
|
|
|
121
116
|
TEST_BLOCKED
|
|
122
|
-
→
|
|
123
|
-
→
|
|
117
|
+
→ preserve the blocker without speculative code changes
|
|
118
|
+
→ caller owns recovery after truth, input, safety, environment, or reliability is restored
|
|
124
119
|
```
|
|
125
120
|
|
|
126
121
|
Automatic outer repair is limited to three rounds. The workflow stops with a resumable blocked result when the limit is reached or a gate cannot be safely completed.
|
|
@@ -141,7 +136,7 @@ An active requirement may use:
|
|
|
141
136
|
|
|
142
137
|
This runtime state records the current stage, terminal status, repair scope, repair round, and resume entry. The skill set does not prescribe whether the target project commits, ignores, or shares this file.
|
|
143
138
|
|
|
144
|
-
Read `${SKILL_DIR}/references/workflow-state-protocol.md` for the state protocol. If the state file is missing or stale, use `spec.md`, `plan.md`, review
|
|
139
|
+
Read `${SKILL_DIR}/references/workflow-state-protocol.md` for the state protocol. If the state file is missing or stale, use `spec.md`, `plan.md`, the review report, `test-report.md`, and `test-result.json` to reconstruct the safest recoverable stage and report that reconstruction.
|
|
145
140
|
|
|
146
141
|
## Quick Start
|
|
147
142
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PrizmKit Workflow State Protocol
|
|
2
2
|
|
|
3
|
-
`workflow-state.json` is lifecycle
|
|
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
4
|
|
|
5
5
|
## Location and Identity
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.prizmkit/state/workflows/<requirement-slug>.json
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The active `artifact_dir` is preserved exactly across every stage:
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
14
|
.prizmkit/specs/<requirement-slug>/
|
|
@@ -16,7 +16,7 @@ The state file is created only when a lifecycle runs. The active `artifact_dir`
|
|
|
16
16
|
.prizmkit/refactor/<refactor-id>/
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Never select
|
|
19
|
+
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.
|
|
20
20
|
|
|
21
21
|
## Authority
|
|
22
22
|
|
|
@@ -26,16 +26,16 @@ The state file is an index, not the authority for stage completion:
|
|
|
26
26
|
|---|---|
|
|
27
27
|
| Requirement goals and acceptance criteria | `{artifact_dir}/spec.md` |
|
|
28
28
|
| Implementation tasks and completion | `{artifact_dir}/plan.md` plus current workspace |
|
|
29
|
-
| Review findings and
|
|
30
|
-
| Test
|
|
31
|
-
|
|
|
32
|
-
| Retrospective completion
|
|
29
|
+
| Review findings and result | `{artifact_dir}/review-report.md` |
|
|
30
|
+
| Test semantics and native execution | `{artifact_dir}/test-report.md` |
|
|
31
|
+
| Terminal testing result | `{artifact_dir}/test-result.json` |
|
|
32
|
+
| Retrospective completion | `{artifact_dir}/retrospective-result.json` |
|
|
33
33
|
| Durable architecture knowledge | `.prizmkit/prizm-docs/` |
|
|
34
34
|
| Local commit | Git history and confirmed or authorized commit identity |
|
|
35
35
|
| Current stage, orchestrator, and resume entry | Workflow state |
|
|
36
|
-
| External orchestration progress |
|
|
36
|
+
| External orchestration progress | External host checkpoint |
|
|
37
37
|
|
|
38
|
-
Every consumer compares workflow state with
|
|
38
|
+
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.
|
|
39
39
|
|
|
40
40
|
## Schema
|
|
41
41
|
|
|
@@ -59,88 +59,71 @@ Every consumer compares workflow state with authoritative artifacts and the curr
|
|
|
59
59
|
|
|
60
60
|
| Field | Meaning |
|
|
61
61
|
|---|---|
|
|
62
|
-
| `schema_version` | State schema version.
|
|
63
|
-
| `artifact_dir` |
|
|
64
|
-
| `orchestrator` |
|
|
65
|
-
| `stage` |
|
|
66
|
-
| `status` | Lifecycle progression status, distinct from
|
|
62
|
+
| `schema_version` | State schema version. |
|
|
63
|
+
| `artifact_dir` | Generic requirement artifact root reused by every stage. |
|
|
64
|
+
| `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
|
|
65
|
+
| `stage` | Stage that most recently wrote state. |
|
|
66
|
+
| `status` | Lifecycle progression status, distinct from `stage_result`. |
|
|
67
67
|
| `stage_result` | Domain result such as `PASS`, `NEEDS_FIXES`, `TEST_*`, `DOCS_UPDATED`, or `NO_DOC_CHANGE`. |
|
|
68
68
|
| `completed_stages` | Ordered stages completed for this requirement. |
|
|
69
|
-
| `repair_scope` |
|
|
70
|
-
| `repair_round` |
|
|
71
|
-
| `next_stage` | Next semantic stage, or
|
|
72
|
-
| `resume_from` | Exact atomic skill that can resume, or
|
|
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
|
+
| `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
|
|
71
|
+
| `next_stage` | Next semantic stage, or null when stopped. |
|
|
72
|
+
| `resume_from` | Exact atomic skill that can resume, or null when none is selected. |
|
|
73
73
|
|
|
74
|
-
## Lifecycle and
|
|
75
|
-
|
|
76
|
-
The mandatory formal lifecycle is:
|
|
74
|
+
## Lifecycle and Result Mappings
|
|
77
75
|
|
|
78
76
|
```text
|
|
79
77
|
PLAN_READY
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
→ IMPLEMENTED
|
|
79
|
+
→ REVIEW_PASS
|
|
80
|
+
→ TEST_PASS
|
|
81
|
+
→ RETRO_COMPLETE
|
|
82
|
+
→ COMMIT_PENDING
|
|
83
|
+
→ COMMITTED
|
|
86
84
|
```
|
|
87
85
|
|
|
88
|
-
No formal stage is silently optional. Domain
|
|
86
|
+
No formal stage is silently optional. Domain artifacts map as follows:
|
|
89
87
|
|
|
90
88
|
```text
|
|
91
|
-
review-report
|
|
92
|
-
review-report
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
retrospective
|
|
97
|
-
retrospective
|
|
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
|
|
98
96
|
```
|
|
99
97
|
|
|
100
|
-
`
|
|
101
|
-
|
|
102
|
-
## Repair Routing
|
|
103
|
-
|
|
104
|
-
```text
|
|
105
|
-
REVIEW_NEEDS_FIXES
|
|
106
|
-
→ implement
|
|
107
|
-
→ code-review
|
|
108
|
-
→ test
|
|
98
|
+
`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.
|
|
109
99
|
|
|
110
|
-
|
|
111
|
-
→ implement
|
|
112
|
-
→ test
|
|
100
|
+
## Non-Pass Results and Routing Boundary
|
|
113
101
|
|
|
114
|
-
|
|
115
|
-
→ implement
|
|
116
|
-
→ code-review
|
|
117
|
-
→ test
|
|
102
|
+
`prizmkit-test` performs its own bounded failure repair and review loops before returning. The test skill never invokes another lifecycle stage.
|
|
118
103
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
104
|
+
```text
|
|
105
|
+
TEST_NEEDS_FIXES
|
|
106
|
+
→ known correction or required delta review remains
|
|
107
|
+
→ caller decides whether and how to arrange another stage
|
|
122
108
|
|
|
123
109
|
TEST_BLOCKED
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
RETRO_BLOCKED
|
|
129
|
-
→ WORKFLOW_BLOCKED
|
|
130
|
-
WORKFLOW_BLOCKED
|
|
131
|
-
→ resume only after the recorded blocker is resolved
|
|
110
|
+
→ truth, input, safe environment, or reliable execution prevents a verdict
|
|
111
|
+
→ never make speculative production edits
|
|
112
|
+
→ caller or external host owns recovery policy
|
|
132
113
|
```
|
|
133
114
|
|
|
134
|
-
|
|
115
|
+
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.
|
|
116
|
+
|
|
117
|
+
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.
|
|
135
118
|
|
|
136
119
|
## Orchestrator Ownership and Handoff
|
|
137
120
|
|
|
138
|
-
1. An atomic stage performs only its own stage, writes
|
|
139
|
-
2. When `orchestrator` is non-null, only that orchestrator invokes the next skill.
|
|
140
|
-
3. Direct stage use may report
|
|
121
|
+
1. An atomic stage performs only its own stage, writes its truthful result and artifact paths, and returns control.
|
|
122
|
+
2. When `orchestrator` is non-null, only that orchestrator invokes the next skill.
|
|
123
|
+
3. Direct stage use may report a possible next invocation but does not claim it ran.
|
|
141
124
|
4. Every handoff preserves the same `artifact_dir`.
|
|
142
|
-
5. External automation invokes atomic stages directly and does not
|
|
143
|
-
6. Workflow state never replaces or absorbs an external host
|
|
125
|
+
5. External automation invokes atomic stages directly and does not nest the composite workflow.
|
|
126
|
+
6. Workflow state never replaces or absorbs an external host checkpoint.
|
|
144
127
|
|
|
145
128
|
## Commit Authorization
|
|
146
129
|
|
|
@@ -148,34 +131,32 @@ Interactive execution:
|
|
|
148
131
|
|
|
149
132
|
```text
|
|
150
133
|
committer previews intended files and message
|
|
151
|
-
→ waits for explicit
|
|
134
|
+
→ waits for explicit current-user confirmation
|
|
152
135
|
→ creates the local commit
|
|
153
136
|
```
|
|
154
137
|
|
|
155
138
|
Trusted headless execution:
|
|
156
139
|
|
|
157
140
|
```text
|
|
158
|
-
|
|
159
|
-
→ host injects mode=<host-defined-headless-mode>, owner=<trusted-host-identifier>,
|
|
160
|
-
local_commit_authorized=true
|
|
141
|
+
trusted host explicitly authorizes the current local task commit
|
|
161
142
|
→ committer verifies gates and commits automatically
|
|
162
|
-
→
|
|
143
|
+
→ remote publication remains separate
|
|
163
144
|
```
|
|
164
145
|
|
|
165
|
-
A self-declared or
|
|
146
|
+
A self-declared or untrusted headless context does not authorize a commit.
|
|
166
147
|
|
|
167
148
|
## Recovery
|
|
168
149
|
|
|
169
150
|
When state is missing, stale, or inconsistent:
|
|
170
151
|
|
|
171
|
-
1.
|
|
172
|
-
2. Inspect task markers and
|
|
173
|
-
3. Read the
|
|
174
|
-
4. Validate
|
|
152
|
+
1. Reuse current context, then read `spec.md` and `plan.md` only when needed.
|
|
153
|
+
2. Inspect task markers and current workspace.
|
|
154
|
+
3. Read the current review report when needed to establish review authority.
|
|
155
|
+
4. Validate that `test-report.md` and terminal `test-result.json` exist, agree, and reflect the claimed result.
|
|
175
156
|
5. Validate `retrospective-result.json` when retrospective is claimed complete.
|
|
176
157
|
6. Verify the commit when commit is claimed complete.
|
|
177
|
-
7.
|
|
158
|
+
7. Let an active external host validate its own checkpoint independently.
|
|
178
159
|
8. Reconstruct the latest safe predecessor and report the reconstruction.
|
|
179
160
|
9. Continue only from the first incomplete or invalid stage.
|
|
180
161
|
|
|
181
|
-
Stale state never bypasses review, testing, retrospective, commit authorization, or external
|
|
162
|
+
Stale state never bypasses review, testing, retrospective, commit authorization, or external checkpoint enforcement.
|
|
@@ -15,7 +15,7 @@ description: "Review the complete current change for a formal PrizmKit requireme
|
|
|
15
15
|
- Do not launch any additional review work through a general-purpose execution unit or relabel it as a finder, verifier, audit, compatibility review, verification, or gap sweep.
|
|
16
16
|
- The independent Reviewer cannot mutate, execute arbitrary commands, or create downstream execution units; prompt instructions never substitute for these structural guarantees.
|
|
17
17
|
- The Main Agent may directly read, search, edit, and run targeted verification in the active workspace.
|
|
18
|
-
- Review repairs occur before the full `/prizmkit-test` stage so
|
|
18
|
+
- Review repairs occur before the full `/prizmkit-test` stage so project-native tests run against the final reviewed workspace.
|
|
19
19
|
- `{artifact_dir}/review-report.md` is the only persisted review artifact for this execution.
|
|
20
20
|
|
|
21
21
|
## Atomic Stage Boundary
|
|
@@ -26,7 +26,7 @@ description: "Review the complete current change for a formal PrizmKit requireme
|
|
|
26
26
|
|
|
27
27
|
- After `/prizmkit-implement` reports `IMPLEMENTED`.
|
|
28
28
|
- After implementation repairs that changed production code, runtime configuration, schema, dependencies, or public interfaces.
|
|
29
|
-
- When
|
|
29
|
+
- When a caller routes a high-risk production repair reported by `prizmkit-test` back for delta review.
|
|
30
30
|
- When the user asks for a complete review or commit readiness decision.
|
|
31
31
|
|
|
32
32
|
## When NOT to Use
|
|
@@ -43,7 +43,7 @@ description: "Review the complete current change for a formal PrizmKit requireme
|
|
|
43
43
|
| `artifact_dir` | No | Directory containing `spec.md` and `plan.md`. Reuse the caller's directory or workflow-state value. |
|
|
44
44
|
| `review_scope` | No | `full` for the initial review; `delta` for a production-affecting repair after a prior review pass. |
|
|
45
45
|
|
|
46
|
-
Every invocation must reuse the same `artifact_dir`. If workflow state is missing, reconstruct it from `spec.md`, `plan.md`, `review-report.md`, the current diff, and any test
|
|
46
|
+
Every invocation must reuse the same `artifact_dir`. If workflow state is missing, reconstruct it from `spec.md`, `plan.md`, `review-report.md`, the current diff, and any current test report/result pair, and report the reconstruction.
|
|
47
47
|
|
|
48
48
|
## Phase 0: Initialize Report and Reuse Current Context
|
|
49
49
|
|