prizmkit 1.1.196 → 1.1.197
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/bin/create-prizmkit.js +0 -2
- package/bundled/VERSION.json +3 -3
- package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +1 -1
- package/bundled/adapters/antigravity/rules-adapter.js +1 -13
- package/bundled/adapters/claude/paths.js +0 -1
- package/bundled/adapters/codex/paths.js +0 -1
- package/bundled/adapters/codex/settings-adapter.js +1 -1
- package/bundled/adapters/cursor/assets/prizmkit-hook.cjs +1 -1
- package/bundled/adapters/cursor/rules-adapter.js +1 -13
- package/bundled/adapters/pi/paths.js +0 -1
- package/bundled/dev-pipeline/.env.example +2 -2
- package/bundled/dev-pipeline/README.md +6 -5
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +2 -2
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +15 -25
- package/bundled/dev-pipeline/prizmkit_runtime/iterate.py +1 -69
- package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +1 -114
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +2 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +78 -0
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +4 -234
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +0 -5
- package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +9 -1
- package/bundled/dev-pipeline/scripts/feature_list_contract.py +0 -43
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +15 -76
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -112
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +0 -13
- package/bundled/dev-pipeline/scripts/init-pipeline.py +0 -1
- package/bundled/dev-pipeline/scripts/prompt_framework.py +0 -79
- package/bundled/dev-pipeline/scripts/status_common.py +150 -4
- package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -2
- package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -2
- package/bundled/dev-pipeline/scripts/utils.py +6 -0
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -5
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -101
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +0 -35
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -52
- package/bundled/dev-pipeline/templates/feature-list-schema.json +0 -25
- package/bundled/dev-pipeline/templates/iterate/evaluate-prompt.md +5 -16
- package/bundled/dev-pipeline/templates/iterate/evaluation-schema.json +1 -58
- package/bundled/dev-pipeline/templates/iterate/headless-plan-prompt.md +1 -12
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +0 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +0 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +0 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +0 -5
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -2
- package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/retrospective.md +3 -3
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +1 -1
- package/bundled/rules/USAGE.md +5 -19
- package/bundled/rules/general/coding-baseline.md +2 -2
- package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +1 -1
- package/bundled/skills/app-planner/references/generated-plan-review.md +1 -1
- package/bundled/skills/app-planner/references/rules-configuration.md +6 -7
- package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +2 -20
- package/bundled/skills/bug-planner/SKILL.md +5 -6
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +1 -1
- package/bundled/skills/bug-planner/references/input-formats.md +2 -2
- package/bundled/skills/bug-planner/references/schema-validation.md +0 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +2 -9
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +36 -25
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +32 -26
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -25
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +32 -26
- package/bundled/skills/feature-planner/SKILL.md +4 -10
- package/bundled/skills/feature-planner/references/completeness-review.md +2 -2
- package/bundled/skills/feature-planner/references/new-project-planning.md +0 -1
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -25
- package/bundled/skills/iterate-pipeline-launcher/SKILL.md +53 -42
- package/bundled/skills/iterate-pipeline-launcher/references/configuration.md +47 -43
- package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +2 -2
- package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
- package/bundled/skills/prizmkit-init/SKILL.md +6 -7
- package/bundled/skills/prizmkit-init/references/config-schema.md +5 -9
- package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +1 -1
- package/bundled/skills/prizmkit-plan/SKILL.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/rule-evolution-steps.md +11 -17
- package/bundled/skills/prizmkit-workflow/SKILL.md +6 -3
- package/bundled/skills/prizmkit-workflow/references/cold-start-rules.md +8 -7
- package/bundled/templates/project-memory-template.md +2 -1
- package/package.json +1 -1
- package/src/clean.js +29 -7
- package/src/config.js +13 -15
- package/src/index.js +1 -5
- package/src/manifest.js +3 -6
- package/src/platforms.js +0 -14
- package/src/scaffold.js +93 -313
- package/src/upgrade.js +32 -31
- package/bundled/adapters/claude/rules-adapter.js +0 -25
- package/bundled/adapters/codebuddy/rules-adapter.js +0 -30
- package/bundled/adapters/codex/rules-adapter.js +0 -30
- package/bundled/adapters/pi/rules-adapter.js +0 -13
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +0 -10
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -111
- package/bundled/skills/bug-planner/references/verification.md +0 -26
- package/bundled/skills/feature-planner/references/browser-interaction.md +0 -39
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from datetime import datetime, timezone
|
|
4
4
|
import json
|
|
5
5
|
import os
|
|
6
|
+
import re
|
|
6
7
|
import sys
|
|
7
8
|
|
|
8
9
|
from utils import (
|
|
@@ -10,6 +11,7 @@ from utils import (
|
|
|
10
11
|
load_json_file,
|
|
11
12
|
orphaned_auto_skipped_ids,
|
|
12
13
|
read_checkpoint_cursor,
|
|
14
|
+
read_checkpoint_step_display,
|
|
13
15
|
write_json_file,
|
|
14
16
|
)
|
|
15
17
|
|
|
@@ -175,15 +177,23 @@ def reset_continuation_metadata(status_data):
|
|
|
175
177
|
status_data.pop(key, None)
|
|
176
178
|
|
|
177
179
|
|
|
178
|
-
def
|
|
179
|
-
|
|
180
|
-
checkpoint_path = os.path.join(
|
|
180
|
+
def _checkpoint_file_path(project_root, *artifact_parts):
|
|
181
|
+
return os.path.join(
|
|
181
182
|
os.path.abspath(project_root) if project_root else _default_project_root(),
|
|
182
183
|
".prizmkit",
|
|
183
184
|
*artifact_parts,
|
|
184
185
|
"workflow-checkpoint.json",
|
|
185
186
|
)
|
|
186
|
-
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def read_checkpoint_phase(project_root, *artifact_parts):
|
|
190
|
+
"""Read the integer step cursor from a task family workflow checkpoint."""
|
|
191
|
+
return read_checkpoint_cursor(_checkpoint_file_path(project_root, *artifact_parts))
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def read_checkpoint_phase_display(project_root, *artifact_parts):
|
|
195
|
+
"""Read (cursor, step_name) from a task family workflow checkpoint."""
|
|
196
|
+
return read_checkpoint_step_display(_checkpoint_file_path(project_root, *artifact_parts))
|
|
187
197
|
|
|
188
198
|
|
|
189
199
|
def _load_progress_fingerprint(raw):
|
|
@@ -589,3 +599,139 @@ def action_pause(state_dir, *, write_json_fn=None):
|
|
|
589
599
|
"paused_at": data["paused_at"],
|
|
590
600
|
}
|
|
591
601
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
def _build_feature_slug_name(item_id, title):
|
|
605
|
+
"""Build deterministic spec directory name matching update-feature-status."""
|
|
606
|
+
numeric = item_id.replace("F-", "").replace("f-", "").zfill(3)
|
|
607
|
+
cleaned = re.sub(r"[^a-z0-9\s-]", "", (title or "").lower())
|
|
608
|
+
cleaned = re.sub(r"[\s]+", "-", cleaned.strip())
|
|
609
|
+
cleaned = re.sub(r"-+", "-", cleaned).strip("-")
|
|
610
|
+
if not cleaned:
|
|
611
|
+
cleaned = "feature"
|
|
612
|
+
return "{}-{}".format(numeric, cleaned)
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
def _find_retrospective_result_file(project_root, family, item):
|
|
616
|
+
"""Locate retrospective-result.json for a feature or bugfix item."""
|
|
617
|
+
item_id = item.get("id")
|
|
618
|
+
if not project_root or not isinstance(item_id, str) or not item_id:
|
|
619
|
+
return None, None
|
|
620
|
+
prizm_root = os.path.join(project_root, ".prizmkit")
|
|
621
|
+
if family == "feature":
|
|
622
|
+
specs_root = os.path.join(prizm_root, "specs")
|
|
623
|
+
candidates = []
|
|
624
|
+
raw_slug = item.get("slug")
|
|
625
|
+
if isinstance(raw_slug, str) and raw_slug.strip():
|
|
626
|
+
candidates.append(raw_slug.strip())
|
|
627
|
+
title_slug = _build_feature_slug_name(item_id, item.get("title", ""))
|
|
628
|
+
if title_slug not in candidates:
|
|
629
|
+
candidates.append(title_slug)
|
|
630
|
+
numeric = item_id.replace("F-", "").replace("f-", "").zfill(3)
|
|
631
|
+
prefix = "{}-".format(numeric)
|
|
632
|
+
if os.path.isdir(specs_root):
|
|
633
|
+
try:
|
|
634
|
+
for entry in sorted(os.listdir(specs_root)):
|
|
635
|
+
full_dir = os.path.join(specs_root, entry)
|
|
636
|
+
if os.path.isdir(full_dir) and entry.startswith(prefix) and entry not in candidates:
|
|
637
|
+
candidates.append(entry)
|
|
638
|
+
except OSError:
|
|
639
|
+
pass
|
|
640
|
+
if item_id not in candidates:
|
|
641
|
+
candidates.append(item_id)
|
|
642
|
+
for dirname in candidates:
|
|
643
|
+
candidate_path = os.path.join(specs_root, dirname, "retrospective-result.json")
|
|
644
|
+
if os.path.isfile(candidate_path):
|
|
645
|
+
return candidate_path, ".prizmkit/specs/{}/retrospective-result.json".format(dirname)
|
|
646
|
+
return None, None
|
|
647
|
+
|
|
648
|
+
candidate_path = os.path.join(prizm_root, "bugfix", item_id, "retrospective-result.json")
|
|
649
|
+
if os.path.isfile(candidate_path):
|
|
650
|
+
return candidate_path, ".prizmkit/bugfix/{}/retrospective-result.json".format(item_id)
|
|
651
|
+
return None, None
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
def _extract_pending_rule_proposals(result_path):
|
|
655
|
+
"""Read RULES_PROPOSED proposals safely without failing status on bad files."""
|
|
656
|
+
try:
|
|
657
|
+
with open(result_path, "r", encoding="utf-8") as handle:
|
|
658
|
+
payload = json.load(handle)
|
|
659
|
+
except (OSError, ValueError, TypeError):
|
|
660
|
+
return []
|
|
661
|
+
if not isinstance(payload, dict):
|
|
662
|
+
return []
|
|
663
|
+
rule_evolution = payload.get("rule_evolution")
|
|
664
|
+
if not isinstance(rule_evolution, dict):
|
|
665
|
+
return []
|
|
666
|
+
if rule_evolution.get("status") != "RULES_PROPOSED":
|
|
667
|
+
return []
|
|
668
|
+
proposals = rule_evolution.get("proposals")
|
|
669
|
+
if not isinstance(proposals, list):
|
|
670
|
+
return []
|
|
671
|
+
normalized = []
|
|
672
|
+
for entry in proposals:
|
|
673
|
+
if not isinstance(entry, dict):
|
|
674
|
+
continue
|
|
675
|
+
target_path = entry.get("target_path")
|
|
676
|
+
clause = entry.get("clause")
|
|
677
|
+
reason = entry.get("reason")
|
|
678
|
+
if (
|
|
679
|
+
isinstance(target_path, str)
|
|
680
|
+
and target_path.strip()
|
|
681
|
+
and isinstance(clause, str)
|
|
682
|
+
and clause.strip()
|
|
683
|
+
and isinstance(reason, str)
|
|
684
|
+
and reason.strip()
|
|
685
|
+
):
|
|
686
|
+
normalized.append(
|
|
687
|
+
{
|
|
688
|
+
"target_path": target_path.strip(),
|
|
689
|
+
"clause": clause.strip(),
|
|
690
|
+
"reason": reason.strip(),
|
|
691
|
+
}
|
|
692
|
+
)
|
|
693
|
+
return normalized
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
def collect_pending_rule_proposals(project_root, family, items):
|
|
697
|
+
"""Collect RULES_PROPOSED entries from retrospective-result.json artifacts."""
|
|
698
|
+
if not project_root or not isinstance(items, list):
|
|
699
|
+
return []
|
|
700
|
+
collected = []
|
|
701
|
+
for item in items:
|
|
702
|
+
if not isinstance(item, dict):
|
|
703
|
+
continue
|
|
704
|
+
item_id = item.get("id")
|
|
705
|
+
if not isinstance(item_id, str) or not item_id:
|
|
706
|
+
continue
|
|
707
|
+
result_path, rel_display = _find_retrospective_result_file(project_root, family, item)
|
|
708
|
+
if not result_path:
|
|
709
|
+
continue
|
|
710
|
+
proposals = _extract_pending_rule_proposals(result_path)
|
|
711
|
+
if proposals:
|
|
712
|
+
collected.append(
|
|
713
|
+
{
|
|
714
|
+
"item_id": item_id,
|
|
715
|
+
"result_path": rel_display,
|
|
716
|
+
"proposals": proposals,
|
|
717
|
+
}
|
|
718
|
+
)
|
|
719
|
+
return collected
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
def format_pending_rule_proposals(entries):
|
|
723
|
+
"""Format collected RULES_PROPOSED entries for human-readable status output."""
|
|
724
|
+
if not entries:
|
|
725
|
+
return []
|
|
726
|
+
lines = ["", "Pending Rule Evolution Proposals (confirm manually):"]
|
|
727
|
+
for entry in entries:
|
|
728
|
+
lines.append(" - {} (see {}):".format(entry["item_id"], entry["result_path"]))
|
|
729
|
+
for proposal in entry["proposals"]:
|
|
730
|
+
lines.append(
|
|
731
|
+
" * [{}] {} — {}".format(
|
|
732
|
+
proposal["target_path"],
|
|
733
|
+
proposal["clause"],
|
|
734
|
+
proposal["reason"],
|
|
735
|
+
)
|
|
736
|
+
)
|
|
737
|
+
return lines
|
|
@@ -45,13 +45,16 @@ from status_common import ( # noqa: E402
|
|
|
45
45
|
auto_skip_blocked_items,
|
|
46
46
|
cleanup_continuation_artifacts as cleanup_continuation_artifacts,
|
|
47
47
|
clear_pending_continuation_metadata as clear_pending_continuation_metadata,
|
|
48
|
+
collect_pending_rule_proposals,
|
|
48
49
|
continuation_metadata_summary as continuation_metadata_summary,
|
|
50
|
+
format_pending_rule_proposals,
|
|
49
51
|
get_item_status_from_list,
|
|
50
52
|
has_pending_continuation_metadata as has_pending_continuation_metadata,
|
|
51
53
|
load_item_status,
|
|
52
54
|
load_session_status as load_session_status,
|
|
53
55
|
now_iso as now_iso,
|
|
54
56
|
read_checkpoint_phase,
|
|
57
|
+
read_checkpoint_phase_display,
|
|
55
58
|
reconcile_orphaned_auto_skipped_items,
|
|
56
59
|
reset_continuation_metadata as reset_continuation_metadata,
|
|
57
60
|
save_item_status,
|
|
@@ -144,6 +147,11 @@ def _read_bugfix_checkpoint_phase(project_root, bug_id):
|
|
|
144
147
|
return read_checkpoint_phase(project_root, "bugfix", bug_id)
|
|
145
148
|
|
|
146
149
|
|
|
150
|
+
def _read_bugfix_checkpoint_phase_display(project_root, bug_id):
|
|
151
|
+
"""Read (phase_index, step_name) from the bugfix checkpoint file."""
|
|
152
|
+
return read_checkpoint_phase_display(project_root, "bugfix", bug_id)
|
|
153
|
+
|
|
154
|
+
|
|
147
155
|
def _checkpoint_phase_or_cached(project_root, bug_id, status_data):
|
|
148
156
|
"""Return live checkpoint phase from the authoritative checkpoint only."""
|
|
149
157
|
return _read_bugfix_checkpoint_phase(project_root, bug_id)
|
|
@@ -714,7 +722,11 @@ def action_status(bug_list_data, state_dir, project_root=None):
|
|
|
714
722
|
retry_count = bs.get("retry_count", 0)
|
|
715
723
|
max_retries_val = bs.get("max_retries", 3)
|
|
716
724
|
# Read the authoritative checkpoint cursor without mutating cached runtime state.
|
|
717
|
-
resume_phase =
|
|
725
|
+
resume_phase, step_name = (
|
|
726
|
+
_read_bugfix_checkpoint_phase_display(project_root, bid)
|
|
727
|
+
if bstatus == "in_progress"
|
|
728
|
+
else (None, "")
|
|
729
|
+
)
|
|
718
730
|
|
|
719
731
|
if bstatus in counts:
|
|
720
732
|
counts[bstatus] += 1
|
|
@@ -747,7 +759,10 @@ def action_status(bug_list_data, state_dir, project_root=None):
|
|
|
747
759
|
if retry_count > 0:
|
|
748
760
|
parts.append("retry {}/{}".format(retry_count, max_retries_val))
|
|
749
761
|
if resume_phase is not None:
|
|
750
|
-
|
|
762
|
+
if step_name:
|
|
763
|
+
parts.append("CP-BF-{}: {}".format(resume_phase, step_name))
|
|
764
|
+
else:
|
|
765
|
+
parts.append("CP-BF-{}".format(resume_phase))
|
|
751
766
|
if parts:
|
|
752
767
|
detail = " ({})".format(", ".join(parts))
|
|
753
768
|
elif bstatus == "failed":
|
|
@@ -821,6 +836,9 @@ def action_status(bug_list_data, state_dir, project_root=None):
|
|
|
821
836
|
for line in bug_lines:
|
|
822
837
|
print("║" + pad_right(" {}".format(line), inner) + " ║")
|
|
823
838
|
print("╚" + "═" * BOX_WIDTH + "╝")
|
|
839
|
+
pending_proposals = collect_pending_rule_proposals(project_root, "bugfix", bugs)
|
|
840
|
+
for proposal_line in format_pending_rule_proposals(pending_proposals):
|
|
841
|
+
print(proposal_line)
|
|
824
842
|
|
|
825
843
|
|
|
826
844
|
# ---------------------------------------------------------------------------
|
|
@@ -49,13 +49,16 @@ from status_common import ( # noqa: E402
|
|
|
49
49
|
auto_skip_blocked_items,
|
|
50
50
|
cleanup_continuation_artifacts as cleanup_continuation_artifacts,
|
|
51
51
|
clear_pending_continuation_metadata as clear_pending_continuation_metadata,
|
|
52
|
+
collect_pending_rule_proposals,
|
|
52
53
|
continuation_metadata_summary as continuation_metadata_summary,
|
|
54
|
+
format_pending_rule_proposals,
|
|
53
55
|
get_item_status_from_list,
|
|
54
56
|
has_pending_continuation_metadata as has_pending_continuation_metadata,
|
|
55
57
|
load_item_status,
|
|
56
58
|
load_session_status as load_session_status,
|
|
57
59
|
now_iso as now_iso,
|
|
58
60
|
read_checkpoint_phase,
|
|
61
|
+
read_checkpoint_phase_display,
|
|
59
62
|
reconcile_orphaned_auto_skipped_items,
|
|
60
63
|
reset_continuation_metadata as reset_continuation_metadata,
|
|
61
64
|
save_item_status,
|
|
@@ -248,6 +251,11 @@ def _read_feature_checkpoint_phase(project_root, feature_slug):
|
|
|
248
251
|
return read_checkpoint_phase(project_root, "specs", feature_slug)
|
|
249
252
|
|
|
250
253
|
|
|
254
|
+
def _read_feature_checkpoint_phase_display(project_root, feature_slug):
|
|
255
|
+
"""Read (phase_index, step_name) from the feature checkpoint file."""
|
|
256
|
+
return read_checkpoint_phase_display(project_root, "specs", feature_slug)
|
|
257
|
+
|
|
258
|
+
|
|
251
259
|
def _checkpoint_phase_or_cached(project_root, feature_slug, status_data):
|
|
252
260
|
"""Return live checkpoint phase from the authoritative checkpoint only."""
|
|
253
261
|
return _read_feature_checkpoint_phase(project_root, feature_slug)
|
|
@@ -1083,7 +1091,11 @@ def action_status(feature_list_data, state_dir, feature_filter=None, project_roo
|
|
|
1083
1091
|
fs = load_feature_status(state_dir, fid)
|
|
1084
1092
|
feature_slug = _build_feature_slug(fid, title)
|
|
1085
1093
|
# Read the authoritative checkpoint cursor without mutating cached runtime state.
|
|
1086
|
-
resume_phase =
|
|
1094
|
+
resume_phase, step_name = (
|
|
1095
|
+
_read_feature_checkpoint_phase_display(project_root, feature_slug)
|
|
1096
|
+
if fstatus == "in_progress"
|
|
1097
|
+
else (None, "")
|
|
1098
|
+
)
|
|
1087
1099
|
degraded_reason = degraded_reason_map.get(fid)
|
|
1088
1100
|
|
|
1089
1101
|
# Count statuses
|
|
@@ -1135,7 +1147,10 @@ def action_status(feature_list_data, state_dir, feature_filter=None, project_roo
|
|
|
1135
1147
|
if blocking:
|
|
1136
1148
|
detail = " (blocked by {})".format(", ".join(blocking))
|
|
1137
1149
|
elif fstatus == "in_progress" and resume_phase is not None:
|
|
1138
|
-
|
|
1150
|
+
if step_name:
|
|
1151
|
+
detail = " (CP-F-{}: {})".format(resume_phase, step_name)
|
|
1152
|
+
else:
|
|
1153
|
+
detail = " (CP-F-{})".format(resume_phase)
|
|
1139
1154
|
elif fstatus == "auto_skipped":
|
|
1140
1155
|
if fid in orphaned_ids:
|
|
1141
1156
|
detail = " (orphaned: no blocking dependency)"
|
|
@@ -1236,6 +1251,9 @@ def action_status(feature_list_data, state_dir, feature_filter=None, project_roo
|
|
|
1236
1251
|
for line in feature_lines:
|
|
1237
1252
|
print("║" + pad_right(" {}".format(line), inner) + " ║")
|
|
1238
1253
|
print("╚" + "═" * BOX_WIDTH + "╝")
|
|
1254
|
+
pending_proposals = collect_pending_rule_proposals(project_root, "feature", features)
|
|
1255
|
+
for proposal_line in format_pending_rule_proposals(pending_proposals):
|
|
1256
|
+
print(proposal_line)
|
|
1239
1257
|
|
|
1240
1258
|
|
|
1241
1259
|
# ---------------------------------------------------------------------------
|
|
@@ -19,6 +19,7 @@ if _PIPELINE_ROOT not in sys.path:
|
|
|
19
19
|
from prizmkit_runtime.atomic_io import write_json_atomic # noqa: E402
|
|
20
20
|
from prizmkit_runtime.checkpoint_state import ( # noqa: E402
|
|
21
21
|
read_checkpoint_cursor as shared_read_checkpoint_cursor,
|
|
22
|
+
read_checkpoint_step_display as shared_read_checkpoint_step_display,
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
|
|
@@ -943,3 +944,8 @@ def read_platform_conventions(project_root):
|
|
|
943
944
|
def read_checkpoint_cursor(checkpoint_path):
|
|
944
945
|
"""Read the phase cursor from a valid workflow-checkpoint.json file."""
|
|
945
946
|
return shared_read_checkpoint_cursor(checkpoint_path)
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
def read_checkpoint_step_display(checkpoint_path):
|
|
950
|
+
"""Read (cursor, step_name) from a valid workflow-checkpoint.json file."""
|
|
951
|
+
return shared_read_checkpoint_step_display(checkpoint_path)
|
|
@@ -34,11 +34,10 @@ Complete the feature in headless non-interactive mode using the active atomic sk
|
|
|
34
34
|
1. Invoke `/prizmkit-plan` with the exact artifact root; validate `PLAN_READY`, then this session updates the planning checkpoint.
|
|
35
35
|
2. Invoke `/prizmkit-implement` with the reviewed artifacts and any explicit repair input; validate `IMPLEMENTED`, then this session updates the implementation checkpoint.
|
|
36
36
|
3. Invoke `/prizmkit-code-review`; map Skill `PASS`/`NEEDS_FIXES` to caller `REVIEW_PASS`/`REVIEW_NEEDS_FIXES` and own any bounded repair route.
|
|
37
|
-
4.
|
|
38
|
-
5.
|
|
39
|
-
6.
|
|
40
|
-
7.
|
|
41
|
-
8. Before commit preparation, validate the complete Git-visible workspace regardless of when or where each correct change originated. Final Review/Test authority must cover every behavior-affecting visible change; ignored paths remain local, while merge conflicts, Secrets, sensitive content, stale evidence, and known incorrect or unverifiable content block. After validating every required artifact, invoke `/prizmkit-committer operation=prepare-runtime-commit artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/ evidence_paths=<exact paths> request_path=.prizmkit/specs/{{FEATURE_SLUG}}/runtime-commit-request.json`. Require a schema-v2 pathless request and `COMMIT_REQUEST_READY`, then stop without another committer checkpoint update or request validator. The Python Runtime validates the request, publishes commit readiness, and commits the complete non-ignored workspace with only exact causal request/checkpoint bookkeeping omitted.
|
|
37
|
+
4. Invoke `/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. Validate its report/result pair. For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; unknown/unsafe scope blocks, while a safe in-budget route re-enters Implement and requires fresh Review and Test. Do not duplicate the Skill's internal repair loop.
|
|
38
|
+
5. Write `completion-summary.json` before retrospective and commit preparation.
|
|
39
|
+
6. Invoke `/prizmkit-retrospective` with the exact artifact root, non-`.prizmkit/` `change_paths`, and `change_summary`; validate `outcome=RETRO_COMPLETE`.
|
|
40
|
+
7. Before commit preparation, validate the complete Git-visible workspace regardless of when or where each correct change originated. Final Review/Test authority must cover every behavior-affecting visible change; ignored paths remain local, while merge conflicts, Secrets, sensitive content, stale evidence, and known incorrect or unverifiable content block. After validating every required artifact, invoke `/prizmkit-committer operation=prepare-runtime-commit artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/ evidence_paths=<exact paths> request_path=.prizmkit/specs/{{FEATURE_SLUG}}/runtime-commit-request.json`. Require a schema-v2 pathless request and `COMMIT_REQUEST_READY`, then stop without another committer checkpoint update or request validator. The Python Runtime validates the request, publishes commit readiness, and commits the complete non-ignored workspace with only exact causal request/checkpoint bookkeeping omitted.
|
|
42
41
|
|
|
43
42
|
## Failure Capture
|
|
44
43
|
|
|
@@ -227,8 +227,8 @@ For each Verification Gate from the Task Contract, write one evidence line to Im
|
|
|
227
227
|
|
|
228
228
|
Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and complete current change. It returns only `PASS` or `NEEDS_FIXES`; this injected session validates `review-report.md`, maps that result, updates the checkpoint, and chooses routing.
|
|
229
229
|
|
|
230
|
-
- Skill `PASS` with a valid report → map to `REVIEW_PASS`, mark the review checkpoint step completed, and continue to
|
|
231
|
-
- Skill `NEEDS_FIXES` with a valid report → map to `REVIEW_NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`, and record both. The helper increments the outer `repair_round`; safe in-budget repair routes through `prizmkit-implement` → `prizmkit-code-review` →
|
|
230
|
+
- Skill `PASS` with a valid report → map to `REVIEW_PASS`, mark the review checkpoint step completed, and continue to `prizmkit-test`.
|
|
231
|
+
- Skill `NEEDS_FIXES` with a valid report → map to `REVIEW_NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`, and record both. The helper increments the outer `repair_round`; safe in-budget repair routes through `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`, while unknown/unsafe scope blocks.
|
|
232
232
|
- 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.
|
|
233
233
|
|
|
234
234
|
`review-report.md` is the only persisted review artifact; do not append separate Review Notes to `context-snapshot.md`. Missing evidence, unsafe repair, failed verification, or non-convergence produces Skill `NEEDS_FIXES`, which this session maps to `REVIEW_NEEDS_FIXES`.
|
|
@@ -238,113 +238,17 @@ Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and com
|
|
|
238
238
|
{{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Only `REVIEW_PASS` can proceed to
|
|
242
|
-
|
|
243
|
-
{{IF_BROWSER_INTERACTION}}
|
|
244
|
-
### Phase 5.5: Browser Verification — MANDATORY
|
|
245
|
-
|
|
246
|
-
You MUST execute this phase. Do NOT skip it.
|
|
247
|
-
|
|
248
|
-
**Browser Tool**: {{BROWSER_TOOL}}
|
|
249
|
-
|
|
250
|
-
**Using: playwright-cli**
|
|
251
|
-
|
|
252
|
-
**CRITICAL CONSTRAINT — playwright-cli ONLY, NO Playwright MCP**:
|
|
253
|
-
- You MUST use `playwright-cli` (the CLI tool) for ALL browser interactions in this phase
|
|
254
|
-
- **NEVER** use Playwright MCP server, Playwright MCP tools, or any MCP-based browser automation
|
|
255
|
-
- If you have Playwright MCP configured, IGNORE it entirely — use the CLI command `playwright-cli` exclusively
|
|
256
|
-
- All browser actions go through `playwright-cli <command>` via the shell/terminal command tool, not through any MCP tool call
|
|
257
|
-
|
|
258
|
-
**Step 0 — Playwright CLI Readiness Check (BLOCKING — must pass before any browser action)**:
|
|
259
|
-
|
|
260
|
-
0a. Check if `playwright-cli` is installed:
|
|
261
|
-
```bash
|
|
262
|
-
{{RUNTIME_HELPER_CMD}} executable version playwright-cli --arg=--version
|
|
263
|
-
```
|
|
264
|
-
If output is `NOT_INSTALLED`, install it:
|
|
265
|
-
```bash
|
|
266
|
-
npm install -g @playwright/cli@latest
|
|
267
|
-
```
|
|
268
|
-
Then verify installation succeeded: `{{RUNTIME_HELPER_CMD}} executable version playwright-cli --arg=--version`. If installation fails, log `## Browser Verification: SKIPPED — playwright-cli installation failed` in context-snapshot.md and proceed to the next phase.
|
|
269
|
-
|
|
270
|
-
0b. Learn playwright-cli usage (run once per session):
|
|
271
|
-
```bash
|
|
272
|
-
playwright-cli --help
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
0c. Check if playwright-cli skill is installed for the current AI platform:
|
|
276
|
-
```bash
|
|
277
|
-
{{RUNTIME_HELPER_CMD}} platform skill playwright-cli --prefix
|
|
278
|
-
```
|
|
279
|
-
If `SKILL_MISSING`: run `playwright-cli install --skills`. If current platform is NOT claude, copy the installed skill from the Claude user skills directory to the path shown by the helper output for the current platform.
|
|
280
|
-
|
|
281
|
-
0d. Read the installed playwright-cli skill (SKILL.md) for workflow guidance. Use its recommended patterns to construct your verification flow.
|
|
282
|
-
|
|
283
|
-
**Step 1 — Start Dev Server**:
|
|
284
|
-
|
|
285
|
-
You know this project's tech stack. Detect and start the dev server yourself:
|
|
286
|
-
|
|
287
|
-
1. Identify the dev server start command from project config (`package.json` scripts, `Makefile`, `docker-compose.yml`, etc.)
|
|
288
|
-
2. Determine the dev server port from the pre-detected pipeline value (`{{DEV_PORT}}`) or project config. Do NOT hardcode or guess the port. Record it as `DEV_PORT` in your notes.
|
|
289
|
-
3. Verify the port is available:
|
|
290
|
-
```bash
|
|
291
|
-
{{RUNTIME_HELPER_CMD}} port check {{DEV_PORT}}
|
|
292
|
-
```
|
|
293
|
-
4. Start the dev server in background, capture PID:
|
|
294
|
-
```bash
|
|
295
|
-
{{RUNTIME_HELPER_CMD}} process start --pid-file .prizmkit/state/browser-dev-server.pid -- <start-command tokens>
|
|
296
|
-
```
|
|
297
|
-
5. Wait for server to be ready: run `{{RUNTIME_HELPER_CMD}} web wait-ready --url http://localhost:{{DEV_PORT}} --timeout 30 --interval 2`
|
|
298
|
-
6. Open the app in playwright-cli: `playwright-cli open http://localhost:{{DEV_PORT}}`
|
|
299
|
-
7. If the page requires authentication, use playwright-cli to register a test user and log in first
|
|
300
|
-
|
|
301
|
-
**Step 2 — Verification**:
|
|
302
|
-
|
|
303
|
-
Use `playwright-cli snapshot` on the running app to discover actual element refs, then verify these goals:
|
|
304
|
-
{{BROWSER_VERIFY_STEPS}}
|
|
305
|
-
|
|
306
|
-
Construct your verification workflow based on: (1) the playwright-cli skill documentation, (2) the `--help` output, (3) the current task's acceptance criteria. Decide the concrete playwright-cli actions yourself. Take a final screenshot: `playwright-cli screenshot`.
|
|
307
|
-
|
|
308
|
-
**Step 3 — Cleanup (REQUIRED — you started it, you stop it)**:
|
|
309
|
-
|
|
310
|
-
1. Close the playwright-cli browser: `playwright-cli close`
|
|
311
|
-
2. Kill the dev server process: `{{RUNTIME_HELPER_CMD}} process cleanup-pid <pid-from-.prizmkit/state/browser-dev-server.pid>`
|
|
312
|
-
3. Verify port is released: `{{RUNTIME_HELPER_CMD}} port check {{DEV_PORT}}`
|
|
313
|
-
|
|
314
|
-
**Step 4 — Reporting**:
|
|
315
|
-
|
|
316
|
-
Append results to `context-snapshot.md`:
|
|
317
|
-
```
|
|
318
|
-
## Browser Verification
|
|
319
|
-
Tool: playwright-cli
|
|
320
|
-
URL: http://localhost:{{DEV_PORT}}
|
|
321
|
-
Dev Server Command: <actual command used>
|
|
322
|
-
Tool version: <version>
|
|
323
|
-
Steps executed: [list of commands used]
|
|
324
|
-
Screenshot: [path]
|
|
325
|
-
Result: PASS / FAIL (reason)
|
|
326
|
-
Server cleanup: confirmed
|
|
327
|
-
Browser cleanup: confirmed
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
Browser blocking policy: `{{BROWSER_BLOCKING}}`.
|
|
331
|
-
|
|
332
|
-
If verification fails:
|
|
333
|
-
- If `{{BROWSER_BLOCKING}}` is `true`: update checkpoint step `browser-verification` to failed with terminal `WORKFLOW_BLOCKED` (`{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step browser-verification --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason browser_verification_failed`), write `failure-log.md` with browser evidence, clean up the dev server/browser, and stop before commit.
|
|
334
|
-
- If `{{BROWSER_BLOCKING}}` is `false`: log the failure details, mark checkpoint step `browser-verification` according to the evidence, clean up the dev server/browser, and continue.
|
|
335
|
-
|
|
336
|
-
You MUST attempt verification and MUST clean up the dev server in both cases.
|
|
337
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
241
|
+
Only `REVIEW_PASS` can proceed to the structured Feature test gate. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` marks checkpoint step `prizmkit-code-review` `failed` with `--terminal-status WORKFLOW_BLOCKED` (omitting `--stage-result`), writes `failure-log.md`, and stops.
|
|
338
242
|
|
|
339
243
|
### Scoped Feature Test Gate — PrizmKit Test
|
|
340
244
|
|
|
341
|
-
After
|
|
245
|
+
After `REVIEW_PASS`, invoke the Feature test gate:
|
|
342
246
|
|
|
343
247
|
```text
|
|
344
248
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
345
249
|
```
|
|
346
250
|
|
|
347
|
-
Consume `.prizmkit/specs/{{FEATURE_SLUG}}/test-report.md` and `test-result.json`. They must agree. `TEST_PASS` with consistent `production_changed=false` completes the gate; `TEST_PASS` with consistent `production_changed=true` keeps `prizmkit-test` incomplete and re-enters `prizmkit-code-review` in delta mode within the shared 3-round outer repair budget (`repair_round_limit` records `WORKFLOW_BLOCKED`). For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper and requires fresh Review
|
|
251
|
+
Consume `.prizmkit/specs/{{FEATURE_SLUG}}/test-report.md` and `test-result.json`. They must agree. `TEST_PASS` with consistent `production_changed=false` completes the gate; `TEST_PASS` with consistent `production_changed=true` keeps `prizmkit-test` incomplete and re-enters `prizmkit-code-review` in delta mode within the shared 3-round outer repair budget (`repair_round_limit` records `WORKFLOW_BLOCKED`). For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper and requires fresh Review and Test, while unknown/unsafe scope or exhausted budget blocks. `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.
|
|
348
252
|
|
|
349
253
|
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.
|
|
350
254
|
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"description",
|
|
39
39
|
"severity",
|
|
40
40
|
"error_source",
|
|
41
|
-
"verification_type",
|
|
42
41
|
"acceptance_criteria",
|
|
43
42
|
"status"
|
|
44
43
|
],
|
|
@@ -152,15 +151,6 @@
|
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
},
|
|
155
|
-
"verification_type": {
|
|
156
|
-
"type": "string",
|
|
157
|
-
"enum": [
|
|
158
|
-
"automated",
|
|
159
|
-
"manual",
|
|
160
|
-
"hybrid"
|
|
161
|
-
],
|
|
162
|
-
"description": "automated=unit/integration-test; manual=human-UAT; hybrid=both"
|
|
163
|
-
},
|
|
164
154
|
"completion_notes": {
|
|
165
155
|
"type": "array",
|
|
166
156
|
"items": {
|
|
@@ -199,31 +189,6 @@
|
|
|
199
189
|
"model": {
|
|
200
190
|
"type": "string",
|
|
201
191
|
"description": "AI model ID for this bug fix. Overrides $MODEL env var."
|
|
202
|
-
},
|
|
203
|
-
"browser_interaction": {
|
|
204
|
-
"type": "object",
|
|
205
|
-
"description": "Browser verification config for bugs reproducible via UI using playwright-cli. AI auto-detects dev server command, URL, and port from project config at runtime.",
|
|
206
|
-
"properties": {
|
|
207
|
-
"tool": {
|
|
208
|
-
"type": "string",
|
|
209
|
-
"enum": [
|
|
210
|
-
"playwright-cli"
|
|
211
|
-
],
|
|
212
|
-
"default": "playwright-cli",
|
|
213
|
-
"description": "Browser tool to use. Always uses 'playwright-cli' for local dev server verification in an isolated browser."
|
|
214
|
-
},
|
|
215
|
-
"blocking": {
|
|
216
|
-
"type": "boolean",
|
|
217
|
-
"description": "Whether browser verification failure blocks commit. Defaults to false when omitted."
|
|
218
|
-
},
|
|
219
|
-
"verify_steps": {
|
|
220
|
-
"type": "array",
|
|
221
|
-
"description": "Verification goals describing HOW to reproduce and verify the bug fix (e.g., 'Click login button and verify error message is gone', 'Open dashboard and confirm performance metrics display'). AI decides concrete browser tool actions at runtime. If omitted, AI auto-reproduces from error description.",
|
|
222
|
-
"items": {
|
|
223
|
-
"type": "string"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
192
|
}
|
|
228
193
|
},
|
|
229
194
|
"additionalProperties": false
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
- **Bug ID**: {{BUG_ID}}
|
|
6
6
|
- **Bug Title**: {{BUG_TITLE}}
|
|
7
7
|
- **Severity**: {{SEVERITY}}
|
|
8
|
-
- **Verification Type**: {{VERIFICATION_TYPE}}
|
|
9
8
|
|
|
10
9
|
## Your Mission
|
|
11
10
|
|
|
@@ -79,21 +78,6 @@ You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
|
|
|
79
78
|
{{RUNTIME_HELPER_CMD}} artifact ensure-dir .prizmkit/bugfix/{{BUG_ID}}
|
|
80
79
|
```
|
|
81
80
|
|
|
82
|
-
{{IF_BROWSER_INTERACTION}}
|
|
83
|
-
|
|
84
|
-
#### Browser Verification Protocol
|
|
85
|
-
|
|
86
|
-
The bug may be reproducible via the UI. Use this single browser protocol for planning, implementation, review, and final reporting:
|
|
87
|
-
|
|
88
|
-
- **Browser Tool**: playwright-cli (local isolated browser against dev server)
|
|
89
|
-
|
|
90
|
-
**Browser Verification Goals**:
|
|
91
|
-
{{BROWSER_VERIFY_STEPS}}
|
|
92
|
-
|
|
93
|
-
Use this protocol only when the bug is UI/frontend-reproducible. Evidence must cover: original bug reproduction, post-fix behavior, related UI regression smoke tests, tool used, and any manual verification steps.
|
|
94
|
-
|
|
95
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
96
|
-
|
|
97
81
|
### Phase 1: Diagnose & Plan
|
|
98
82
|
|
|
99
83
|
**Goal**: Identify root cause, build project context, produce spec.md + plan.md.
|
|
@@ -124,22 +108,12 @@ Invoke `/prizmkit-plan` once with the exact artifact root, bug requirement, and
|
|
|
124
108
|
- Subsequent tasks implement the minimal fix to make the test pass (GREEN state)
|
|
125
109
|
- Resolve uncertain fix details autonomously from the bug report, failing behavior, existing code, and conservative existing-project patterns.
|
|
126
110
|
|
|
127
|
-
{{IF_BROWSER_INTERACTION}}
|
|
128
|
-
- **Browser Verification**: If the bug is UI-reproducible, plan.md should reference the Browser Verification Protocol above instead of redefining browser steps.
|
|
129
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
130
|
-
|
|
131
111
|
**ATOMIC GATE**: Every committable Bugfix must complete code review and the mandatory post-review `prizmkit-test` stage. Small or obvious fixes do not bypass either gate.
|
|
132
112
|
|
|
133
113
|
**CP-1**: spec.md and plan.md exist with Tasks section.
|
|
134
114
|
|
|
135
115
|
**Checkpoint update**: This injected session sets `bug-diagnosis-and-plan` completed with `stage_result=PLAN_READY` only after artifact validation; `PLAN_BLOCKED` is recorded as failed.
|
|
136
116
|
|
|
137
|
-
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
138
|
-
**NOTE**: verification_type is '{{VERIFICATION_TYPE}}'. The plan.md MUST also include:
|
|
139
|
-
- Manual Verification Plan section with UAT checklist
|
|
140
|
-
- User Review Required section specifying reviewer and blocking behavior
|
|
141
|
-
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
142
|
-
|
|
143
117
|
---
|
|
144
118
|
|
|
145
119
|
### Phase 2: Implement & Fix
|
|
@@ -178,54 +152,31 @@ Invoke `/prizmkit-code-review` with the exact artifact root, spec, plan, and com
|
|
|
178
152
|
```
|
|
179
153
|
This injected session maps Skill `PASS`/`NEEDS_FIXES` to `REVIEW_PASS`/`REVIEW_NEEDS_FIXES`. For `NEEDS_FIXES`, classify concrete findings into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper, while unknown/unsafe scope blocks. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` means review did not complete: inspect progress once, mark checkpoint step `prizmkit-code-review` `failed` with `--terminal-status WORKFLOW_BLOCKED`, write `failure-log.md`, and stop. Do not accept stale verdict text or replace required independent review with Main-Agent self-review.
|
|
180
154
|
|
|
181
|
-
{{IF_BROWSER_INTERACTION}}
|
|
182
|
-
|
|
183
|
-
**Code Review — Browser Verification Check**: Confirm that UI-reproducible bug evidence follows the Browser Verification Protocol above.
|
|
184
|
-
|
|
185
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
186
|
-
|
|
187
155
|
**CP-3**: Code review returned `PASS`, `review-report.md` is valid, and review-local verification is recorded.
|
|
188
156
|
|
|
189
157
|
**Checkpoint update**: Set step `prizmkit-code-review` to `"completed"` only for an accepted valid Final Result.
|
|
190
158
|
|
|
191
159
|
---
|
|
192
160
|
|
|
193
|
-
{{IF_BROWSER_INTERACTION}}
|
|
194
|
-
### Phase 4: Configured Browser Verification
|
|
195
|
-
|
|
196
|
-
After valid code-review PASS and before Test, execute the configured Browser Verification Protocol above. Record evidence and cleanup. A blocking failure stops before Test; a non-blocking unavailable check is recorded and may continue according to task policy.
|
|
197
|
-
|
|
198
|
-
{{END_IF_BROWSER_INTERACTION}}
|
|
199
|
-
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
200
|
-
### Phase 4b: Manual / Hybrid Verification
|
|
201
|
-
|
|
202
|
-
Complete the declared UAT checklist automatically with available browser, CLI, API, fixture, and test evidence. Record the evidence before Test. If required evidence cannot be established, write `failure-log.md` and stop truthfully.
|
|
203
|
-
|
|
204
|
-
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
205
161
|
### Phase 5: Post-Review Test Gate — PrizmKit Test
|
|
206
162
|
|
|
207
|
-
After valid code-review PASS
|
|
163
|
+
After valid code-review PASS, run the mandatory test gate against the same artifact root:
|
|
208
164
|
|
|
209
165
|
```text
|
|
210
166
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/
|
|
211
167
|
```
|
|
212
168
|
|
|
213
|
-
Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` with `production_changed=false` proceeds to the fix report and retrospective; `TEST_PASS` with consistent `production_changed=true` keeps `prizmkit-test` incomplete and re-enters `prizmkit-code-review` in delta mode within the shared 3-round outer repair budget (`repair_round_limit` records `WORKFLOW_BLOCKED`). For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper and requires fresh Review
|
|
169
|
+
Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` with `production_changed=false` proceeds to the fix report and retrospective; `TEST_PASS` with consistent `production_changed=true` keeps `prizmkit-test` incomplete and re-enters `prizmkit-code-review` in delta mode within the shared 3-round outer repair budget (`repair_round_limit` records `WORKFLOW_BLOCKED`). For `TEST_NEEDS_FIXES`, classify the concrete correction into an allowed `repair_scope`; safe in-budget repair re-enters Implement through the helper and requires fresh Review and Test, while unknown/unsafe scope or exhausted budget blocks. `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.
|
|
214
170
|
|
|
215
171
|
Only `TEST_PASS` with `production_changed=false` may proceed to commit.
|
|
216
172
|
|
|
217
|
-
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
218
|
-
**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`.
|
|
219
|
-
- 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` (plus runtime-managed `auto_skipped`).
|
|
220
|
-
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
221
|
-
|
|
222
173
|
---
|
|
223
174
|
|
|
224
175
|
### Phase 6: Report, Retrospective & Runtime Commit Handoff
|
|
225
176
|
|
|
226
177
|
**a. Fix report before commit preparation**
|
|
227
178
|
|
|
228
|
-
Write `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` after `TEST_PASS`. Include the resolution summary, changed behavior, reproduction before/after, regression and review results,
|
|
179
|
+
Write `.prizmkit/bugfix/{{BUG_ID}}/fix-report.md` after `TEST_PASS`. Include the resolution summary, changed behavior, reproduction before/after, regression and review results, durable knowledge captured, and acceptance-criteria checklist. Do not require a commit hash because the report must exist before the local commit.
|
|
229
180
|
|
|
230
181
|
Mark `bug-report` completed only after the report is valid.
|
|
231
182
|
|
|
@@ -260,4 +211,5 @@ Runtime session status is written by the Python runtime. Do not write or edit `s
|
|
|
260
211
|
- Commit with `fix(<scope>):` prefix, NOT `feat:`
|
|
261
212
|
- DEFAULT: `/prizmkit-retrospective` structural sync only (Job 1). Full retrospective when fix changes interfaces/dependencies/behavior
|
|
262
213
|
- Runtime owns session-status.json; never hand-edit it
|
|
214
|
+
- Never write fine-grained session phases (`triaging`, `reproducing`, `fixing`, `verifying`) to the external bug-list status field; external statuses remain `pending`, `in_progress`, `completed`, `failed`, `skipped`, or `needs_info` (plus runtime-managed `auto_skipped`).
|
|
263
215
|
- Do NOT run `git add`/`git commit`; the Python runtime executes the prepared local commit
|