prizmkit 1.1.136 → 1.1.138
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/runner_models.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +3 -5
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +24 -40
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +3 -5
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +4 -5
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +3 -5
- package/bundled/dev-pipeline/scripts/prompt_framework.py +0 -5
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +24 -26
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +5 -4
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-mission.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +2 -10
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +2 -1
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +2 -12
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +2 -10
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-mission.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +2 -10
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +2 -1
- package/bundled/dev-pipeline/templates/sections/subagent-timeout-recovery.md +5 -4
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +11 -17
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +3 -1
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +1 -6
- package/bundled/dev-pipeline/tests/test_unified_cli.py +3 -5
- package/bundled/skills/_metadata.json +2 -2
- package/bundled/skills/prizmkit-test/SKILL.md +18 -22
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +6 -78
- package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +1 -2
- package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +9 -56
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +2 -2
- package/bundled/skills/prizmkit-test/references/evidence-protocol.md +13 -13
- package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +8 -16
- package/bundled/skills/prizmkit-test/references/examples.md +3 -5
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +6 -8
- package/bundled/skills/prizmkit-test/references/test-report-template.md +4 -7
- package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +6 -8
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +70 -247
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +251 -201
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -96,7 +96,6 @@ def generate_prompt(
|
|
|
96
96
|
output_path=output_path,
|
|
97
97
|
model=str(data.get("model") or ""),
|
|
98
98
|
pipeline_mode=str(data.get("pipeline_mode") or ""),
|
|
99
|
-
agent_count=int(data.get("agent_count") or 0),
|
|
100
99
|
checkpoint_path=Path(str(checkpoint)) if checkpoint else None,
|
|
101
100
|
artifact_path=_artifact_path(family, visible_root, item_id, data),
|
|
102
101
|
raw=data,
|
|
@@ -424,16 +424,14 @@ def _child_log_activity_summary(progress: Mapping[str, object]) -> str:
|
|
|
424
424
|
def _emit_prompt_summary(prompt: PromptGenerationResult, session_id: str) -> None:
|
|
425
425
|
if prompt.pipeline_mode:
|
|
426
426
|
_emit_info(f"Pipeline mode: {_pipeline_mode_label(prompt.pipeline_mode)}")
|
|
427
|
-
if prompt.agent_count:
|
|
428
|
-
_emit_info(f"Agents: {prompt.agent_count}")
|
|
429
427
|
_emit_info(f"Spawning AI CLI session: {session_id}")
|
|
430
428
|
|
|
431
429
|
|
|
432
430
|
def _pipeline_mode_label(mode: str) -> str:
|
|
433
431
|
labels = {
|
|
434
|
-
"lite": "lite (Tier 1 —
|
|
435
|
-
"standard": "standard (Tier 2 —
|
|
436
|
-
"full": "full (
|
|
432
|
+
"lite": "lite (Tier 1 — Scoped Guidance)",
|
|
433
|
+
"standard": "standard (Tier 2 — Review Gates)",
|
|
434
|
+
"full": "full (Full Guidance)",
|
|
437
435
|
}
|
|
438
436
|
return labels.get(mode, mode)
|
|
439
437
|
|
|
@@ -993,7 +993,6 @@ def validate_feature_test_evidence(project_root, artifact_dir):
|
|
|
993
993
|
return None
|
|
994
994
|
for stage in stages:
|
|
995
995
|
if (not isinstance(stage, dict) or stage.get("status") not in {"complete", "not_applicable"} or
|
|
996
|
-
not _is_sha256(stage.get("input_sha256")) or
|
|
997
996
|
not isinstance(stage.get("outputs"), list)):
|
|
998
997
|
return None
|
|
999
998
|
if (not _is_sha256(manifest.get("working_diff_sha256")) or
|
|
@@ -1616,13 +1615,10 @@ def _tier_header(pipeline_mode):
|
|
|
1616
1615
|
"The standard label remains metadata only for compatibility.\n",
|
|
1617
1616
|
),
|
|
1618
1617
|
"full": (
|
|
1619
|
-
"# Dev-Pipeline Session Bootstrap —
|
|
1620
|
-
"
|
|
1621
|
-
"
|
|
1622
|
-
"
|
|
1623
|
-
"implementation directly, then runs mandatory Main-Agent review. "
|
|
1624
|
-
"After convergence, the review skill may use only its strict-gated "
|
|
1625
|
-
"skill-owned independent Reviewer.\n",
|
|
1618
|
+
"# Dev-Pipeline Session Bootstrap — Full Guidance\n",
|
|
1619
|
+
"**Full Guidance**: Follow the active skills and runtime contracts "
|
|
1620
|
+
"for context, planning, implementation, review, testing, recovery, "
|
|
1621
|
+
"and commit.\n",
|
|
1626
1622
|
),
|
|
1627
1623
|
}
|
|
1628
1624
|
return headers.get(pipeline_mode, headers["lite"])
|
|
@@ -1635,8 +1631,8 @@ def _tier_reminders(pipeline_mode):
|
|
|
1635
1631
|
"— never skip these",
|
|
1636
1632
|
"- Build context-snapshot.md FIRST; use it throughout instead of "
|
|
1637
1633
|
"re-reading files",
|
|
1638
|
-
"- `/prizmkit-committer` is mandatory
|
|
1639
|
-
"
|
|
1634
|
+
"- `/prizmkit-committer` is mandatory after all required gates pass — "
|
|
1635
|
+
"do NOT replace it with manual git commit commands",
|
|
1640
1636
|
"- Do NOT run `git add`/`git commit` during implementation phases — "
|
|
1641
1637
|
"all changes are committed once in the commit phase",
|
|
1642
1638
|
"- If any files remain after the commit, amend the existing commit — "
|
|
@@ -1658,34 +1654,27 @@ def _tier_reminders(pipeline_mode):
|
|
|
1658
1654
|
"Code Review writes only review-report.md",
|
|
1659
1655
|
"- Gate checks require the Implementation Log (with Gate Evidence) "
|
|
1660
1656
|
"and a valid review-report.md Final Result before proceeding",
|
|
1661
|
-
"-
|
|
1662
|
-
"
|
|
1663
|
-
"- On timeout outside Code Review: check snapshot + git diff HEAD "
|
|
1664
|
-
"→ model:lite → remaining steps only → max 2 retries per phase → "
|
|
1665
|
-
"Main Agent fallback",
|
|
1657
|
+
"- Follow the active skills and runtime contracts for execution "
|
|
1658
|
+
"units, review ownership, timeout, and recovery",
|
|
1666
1659
|
]
|
|
1667
1660
|
else: # full
|
|
1668
1661
|
specific = [
|
|
1669
|
-
"- Tier 3:
|
|
1670
|
-
"
|
|
1662
|
+
"- Tier 3: follow the active skills and runtime contracts for "
|
|
1663
|
+
"execution topology and review ownership",
|
|
1671
1664
|
"- context-snapshot.md is the implementation knowledge base; "
|
|
1672
1665
|
"Code Review writes only review-report.md",
|
|
1673
1666
|
"- Gate checks require the Implementation Log and a valid "
|
|
1674
1667
|
"review-report.md Final Result before proceeding",
|
|
1675
|
-
"-
|
|
1676
|
-
"
|
|
1677
|
-
"
|
|
1678
|
-
"agents outside Code Review",
|
|
1679
|
-
"- If a normal work Agent call fails with team/config/lock errors, "
|
|
1680
|
-
"retry at most once; after a second failure, use the documented "
|
|
1681
|
-
"inline/recovery fallback or write `failure-log.md` rather than "
|
|
1682
|
-
"spawning variants or polling indefinitely",
|
|
1668
|
+
"- Review execution outside the owning skill contract is forbidden",
|
|
1669
|
+
"- Do not infer execution-unit permissions or retry behavior from "
|
|
1670
|
+
"this prompt; use the owning skill/runtime contract",
|
|
1683
1671
|
"- NEVER delete, modify, or touch any file under `.prizmkit/state/` "
|
|
1684
1672
|
"— those are pipeline runtime files managed by the runner",
|
|
1685
1673
|
"- NEVER run `rm -rf`, `git clean`, or destructive filesystem "
|
|
1686
1674
|
"cleanup during the feature session",
|
|
1687
|
-
"- On timeout:
|
|
1688
|
-
"
|
|
1675
|
+
"- On execution-unit timeout: preserve the active checkout and "
|
|
1676
|
+
"artifacts and follow the owning contract's recovery or downgrade "
|
|
1677
|
+
"path",
|
|
1689
1678
|
]
|
|
1690
1679
|
|
|
1691
1680
|
lines = ["## Reminders\n"] + specific + common
|
|
@@ -1716,18 +1705,16 @@ def assemble_sections(pipeline_mode, sections_dir, init_done, is_resume,
|
|
|
1716
1705
|
"## Your Mission\n\n"
|
|
1717
1706
|
"You are the **session orchestrator**. Implement Feature "
|
|
1718
1707
|
"{{FEATURE_ID}}: \"{{FEATURE_TITLE}}\".\n\n"
|
|
1719
|
-
"**CRITICAL**:
|
|
1720
|
-
"
|
|
1708
|
+
"**CRITICAL**: Do not exit while recoverable work remains. "
|
|
1709
|
+
"If a required gate is blocked or the workflow cannot safely "
|
|
1710
|
+
"continue, record the blocker and stop with a truthful blocked "
|
|
1711
|
+
"status; do not claim success or commit an incomplete change."
|
|
1721
1712
|
)
|
|
1722
1713
|
if pipeline_mode != "lite":
|
|
1723
1714
|
mission += (
|
|
1724
|
-
"
|
|
1725
|
-
"
|
|
1726
|
-
|
|
1727
|
-
if pipeline_mode == "full":
|
|
1728
|
-
mission += (
|
|
1729
|
-
" Do NOT spawn work agents in background and exit — "
|
|
1730
|
-
"that kills the session."
|
|
1715
|
+
" Follow the active skill and runtime contracts for any "
|
|
1716
|
+
"execution units they create, including completion, timeout, "
|
|
1717
|
+
"resume, and failure handling."
|
|
1731
1718
|
)
|
|
1732
1719
|
mission += "\n\n" + tier_desc
|
|
1733
1720
|
sections.append(("mission", mission))
|
|
@@ -1754,7 +1741,7 @@ def assemble_sections(pipeline_mode, sections_dir, init_done, is_resume,
|
|
|
1754
1741
|
sections.append(("directory-convention",
|
|
1755
1742
|
load_section(sections_dir, dc_file)))
|
|
1756
1743
|
|
|
1757
|
-
# ---
|
|
1744
|
+
# --- Execution-unit timeout recovery ---
|
|
1758
1745
|
if pipeline_mode in ("standard", "full"):
|
|
1759
1746
|
sections.append(("timeout-recovery",
|
|
1760
1747
|
load_section(sections_dir,
|
|
@@ -2311,14 +2298,11 @@ def main():
|
|
|
2311
2298
|
|
|
2312
2299
|
# ── Success JSON ───────────────────────────────────────────────────
|
|
2313
2300
|
feature_model = feature.get("model", "")
|
|
2314
|
-
mode_agent_counts = {"lite": 1, "standard": 3, "full": 3}
|
|
2315
|
-
agent_count = mode_agent_counts.get(pipeline_mode, 1)
|
|
2316
2301
|
output = {
|
|
2317
2302
|
"success": True,
|
|
2318
2303
|
"output_path": os.path.abspath(args.output),
|
|
2319
2304
|
"model": feature_model,
|
|
2320
2305
|
"pipeline_mode": pipeline_mode,
|
|
2321
|
-
"agent_count": agent_count,
|
|
2322
2306
|
"render_mode": "sections" if use_sections else "legacy",
|
|
2323
2307
|
"validation_warnings": len(warnings),
|
|
2324
2308
|
"validation_errors": len(errors),
|
|
@@ -20,7 +20,6 @@ from prompt_framework import (
|
|
|
20
20
|
generate_checkpoint_from_sections,
|
|
21
21
|
load_section,
|
|
22
22
|
merge_checkpoint_state,
|
|
23
|
-
mode_agent_count,
|
|
24
23
|
normalize_mode,
|
|
25
24
|
pipeline_checkpoint_metadata,
|
|
26
25
|
read_text_file,
|
|
@@ -386,9 +385,9 @@ def render_template(template_content, replacements, bug):
|
|
|
386
385
|
def _bugfix_header(pipeline_mode):
|
|
387
386
|
title = "# Dev-Pipeline Bug Fix Session Bootstrap — {}\n".format(pipeline_mode.title())
|
|
388
387
|
desc = {
|
|
389
|
-
"lite": "**Tier 1 —
|
|
390
|
-
"standard": "**Tier 2 —
|
|
391
|
-
"full": "**Tier 3 — Full Bugfix Guardrails**:
|
|
388
|
+
"lite": "**Tier 1 — Scoped Bugfix Guidance**: use the active skills and runtime contracts for diagnosis, implementation, review, and verification.",
|
|
389
|
+
"standard": "**Tier 2 — Bugfix Review Gates**: use the active skills and runtime contracts for diagnosis, implementation, review, and verification.",
|
|
390
|
+
"full": "**Tier 3 — Full Bugfix Guardrails**: use the active skills and runtime contracts for diagnosis, implementation, review, recovery, and verification.",
|
|
392
391
|
}.get(pipeline_mode, "**Bugfix pipeline**")
|
|
393
392
|
return title + "\n" + desc + "\n"
|
|
394
393
|
|
|
@@ -574,7 +573,6 @@ def main():
|
|
|
574
573
|
"checkpoint_path": checkpoint_path,
|
|
575
574
|
"model": bug.get("model", ""),
|
|
576
575
|
"pipeline_mode": pipeline_mode,
|
|
577
|
-
"agent_count": mode_agent_count(pipeline_mode),
|
|
578
576
|
"render_mode": "sections" if use_sections else "legacy",
|
|
579
577
|
"validation_warnings": len(warnings),
|
|
580
578
|
"validation_errors": len(errors),
|
|
@@ -97,11 +97,10 @@ Implement the minimal fix (red → green):
|
|
|
97
97
|
"""\
|
|
98
98
|
Verify fix quality:
|
|
99
99
|
1. Run `/prizmkit-code-review` with the current bugfix artifact directory.
|
|
100
|
-
2.
|
|
101
|
-
3.
|
|
102
|
-
4.
|
|
103
|
-
5.
|
|
104
|
-
6. `review-report.md` is the only persisted review artifact. Continue only after its last Final Result is valid; preserve append-only progress for recovery.""",
|
|
100
|
+
2. Follow the skill's current review contract for review execution, repairs, verification, evidence, and handoff.
|
|
101
|
+
3. Do not invoke another review skill or add a second review path outside the skill contract.
|
|
102
|
+
4. Continue only after `review-report.md` has a valid last Final Result; preserve append-only progress for recovery.
|
|
103
|
+
5. A missing, incomplete, unsafe, or non-converged review produces NEEDS_FIXES rather than a synthesized pass.""",
|
|
105
104
|
),
|
|
106
105
|
6: (
|
|
107
106
|
"User Verification",
|
|
@@ -20,7 +20,6 @@ from prompt_framework import (
|
|
|
20
20
|
generate_checkpoint_from_sections,
|
|
21
21
|
load_section,
|
|
22
22
|
merge_checkpoint_state,
|
|
23
|
-
mode_agent_count,
|
|
24
23
|
normalize_mode,
|
|
25
24
|
pipeline_checkpoint_metadata,
|
|
26
25
|
read_text_file,
|
|
@@ -410,9 +409,9 @@ def render_template(template_content, replacements, resume_phase, refactor):
|
|
|
410
409
|
def _refactor_header(pipeline_mode):
|
|
411
410
|
title = "# Dev-Pipeline Refactor Session Bootstrap — {}\n".format(pipeline_mode.title())
|
|
412
411
|
desc = {
|
|
413
|
-
"lite": "**Tier 1 —
|
|
414
|
-
"standard": "**Tier 2 —
|
|
415
|
-
"full": "**Tier 3 — Full Refactor Guardrails**:
|
|
412
|
+
"lite": "**Tier 1 — Scoped Refactor Guidance**: use the active skills and runtime contracts for planning, implementation, review, and behavior verification.",
|
|
413
|
+
"standard": "**Tier 2 — Refactor Review Gates**: use the active skills and runtime contracts for planning, implementation, review, and behavior verification.",
|
|
414
|
+
"full": "**Tier 3 — Full Refactor Guardrails**: use the active skills and runtime contracts for planning, implementation, review, recovery, and behavior verification.",
|
|
416
415
|
}.get(pipeline_mode, "**Refactor pipeline**")
|
|
417
416
|
return title + "\n" + desc + "\n"
|
|
418
417
|
|
|
@@ -592,7 +591,6 @@ def main():
|
|
|
592
591
|
"checkpoint_path": checkpoint_path,
|
|
593
592
|
"model": refactor.get("model", ""),
|
|
594
593
|
"pipeline_mode": pipeline_mode,
|
|
595
|
-
"agent_count": mode_agent_count(pipeline_mode),
|
|
596
594
|
"render_mode": "sections" if use_sections else "legacy",
|
|
597
595
|
"validation_warnings": len(warnings),
|
|
598
596
|
"validation_errors": len(errors),
|
|
@@ -444,11 +444,6 @@ def normalize_mode(value, default="lite"):
|
|
|
444
444
|
return value if value in {"lite", "standard", "full"} else default
|
|
445
445
|
|
|
446
446
|
|
|
447
|
-
def mode_agent_count(pipeline_mode):
|
|
448
|
-
"""Return the prompt metadata agent count for a mode."""
|
|
449
|
-
return {"lite": 1, "standard": 3, "full": 3}.get(pipeline_mode, 1)
|
|
450
|
-
|
|
451
|
-
|
|
452
447
|
def detect_dev_server_port(project_root):
|
|
453
448
|
"""Return a detected dev-server port string, or an unknown placeholder."""
|
|
454
449
|
unknown = "<UNKNOWN_DETECT_FROM_PROJECT_CONFIG>"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
## Instructions
|
|
21
21
|
|
|
22
22
|
You are running in **headless non-interactive mode** — no human is available for input.
|
|
23
|
-
Infer what needs to be done from the feature context above and follow the
|
|
23
|
+
Infer what needs to be done from the feature context above and follow the active skill and runtime contracts. Do not exit while recoverable work remains. If a required gate is blocked or the workflow cannot safely continue, record the blocker and stop with a truthful blocked status; do not claim success or commit an incomplete change.
|
|
24
24
|
|
|
25
25
|
### Execution Steps
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ Infer what needs to be done from the feature context above and follow the standa
|
|
|
30
30
|
|
|
31
31
|
3. **Implement**: Run `/prizmkit-implement` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` to execute the plan using TDD (write tests first, then implement).
|
|
32
32
|
|
|
33
|
-
4. **Review**: Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}
|
|
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
35
|
5. **Test**: After review passes, run `/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. Treat the Markdown report only as a derived view. Consume `.prizmkit/test/evidence/<evidence-id>/manifest.json`, `verdict.json`, and `validation.json`; verify identity/scope, every manifest hash, verdict/validator agreement, and current target hashes before accepting `TEST_PASS`. `TEST_FAIL/test-infrastructure` routes implement → test; production/runtime/schema/dependency/public-interface routes implement → code-review → test; unknown unsafe scope blocks. `TEST_BLOCKED` allows bounded environment recovery or a test-stage resume but never speculative production edits. Stop outer repairs after three rounds; preserve evidence and truthful recovery metadata.
|
|
36
36
|
|
|
@@ -44,7 +44,7 @@ Infer what needs to be done from the feature context above and follow the standa
|
|
|
44
44
|
- Remote publication is controlled by the runtime after the local commit; do not make a publication decision in this session.
|
|
45
45
|
- Write all artifacts to `.prizmkit/specs/{{FEATURE_SLUG}}/`.
|
|
46
46
|
- If a step fails after 3 attempts, write a status report and stop.
|
|
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.
|
|
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
|
- **Hard Round Cap**: after 6 total test-fix rounds, STOP trial-and-error. Switch to read-once-then-rewrite. Do NOT exceed 7 rounds.
|
|
50
50
|
- **Layered test**: debug with single-file tests, only run full suite as gate when single-file is green.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Dev-Pipeline Session Bootstrap —
|
|
1
|
+
# Dev-Pipeline Session Bootstrap — Full Guidance
|
|
2
2
|
|
|
3
3
|
## Session Context
|
|
4
4
|
|
|
@@ -10,15 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATURE_TITLE}}".
|
|
12
12
|
|
|
13
|
-
**CRITICAL**:
|
|
13
|
+
**CRITICAL**: Do not exit while recoverable work remains. If a required gate is blocked or the workflow cannot safely continue, record the blocker and stop with a truthful blocked status; do not claim success or commit an incomplete change.
|
|
14
14
|
|
|
15
|
-
**Tier 3 —
|
|
15
|
+
**Tier 3 — Full Guardrails**: Follow the active skills and runtime contracts for context loading, planning, implementation, review, testing, recovery, and commit. The active contracts determine the execution topology and permissions for any execution units they create.
|
|
16
16
|
|
|
17
|
-
**
|
|
18
|
-
-
|
|
19
|
-
- If
|
|
20
|
-
-
|
|
21
|
-
- Apply the same cap to any re-spawn for report repair or resume prompts; do not burn multiple minutes on identical team/config/lock failures.
|
|
17
|
+
**Execution-unit failure policy**:
|
|
18
|
+
- Do not invoke another review skill/workflow or add review execution outside the contract owned by `prizmkit-code-review`.
|
|
19
|
+
- If an execution unit cannot be created or resumed under its owning skill's contract, follow that contract's downgrade or recovery path; do not create an unapproved replacement.
|
|
20
|
+
- Do not enter indefinite polling or repeated retries after the owning contract's retry budget is exhausted.
|
|
22
21
|
|
|
23
22
|
### Feature Description
|
|
24
23
|
|
|
@@ -50,9 +49,9 @@ You are running in **headless non-interactive mode** with a FINITE context windo
|
|
|
50
49
|
|
|
51
50
|
0. **NON-INTERACTIVE MODE** — There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, NEVER use interactive prompts (e.g. "Would you like me to…"). If a skill has an interactive step (e.g. offer remediation, ask for approval), skip it and proceed autonomously. Make decisions based on the data available and move forward.
|
|
52
51
|
|
|
53
|
-
1. **context-snapshot.md is your single source of truth** — After Phase 1-2 makes it available, use it instead of re-reading individual source files. If you just created or updated it in this session, continue from the in-context content; read it only when resuming/continuing, after context compaction/loss, or when handing work to
|
|
52
|
+
1. **context-snapshot.md is your single source of truth** — After Phase 1-2 makes it available, use it instead of re-reading individual source files. If you just created or updated it in this session, continue from the in-context content; read it only when resuming/continuing, after context compaction/loss, or when handing work to an execution unit.
|
|
54
53
|
2. **Never re-read your own writes** — After you create/modify a file, do NOT read it back to verify. Trust your write was correct.
|
|
55
|
-
3. **Never re-read unmodified files** — Once you have read a file into context, do NOT read it again unless it was modified by an Edit/Write operation after your last read. Use platform file/search tools for targeted lookup; when shell-free helper lookup is needed, run `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<pattern>" --json`, then read only the smallest bounded range with the platform file-reading tool instead of full-file Read. Before issuing a Read, ask yourself: "Have I read this file before, and has it changed since?" If the answer is "no, it hasn't changed" — do NOT read it. This applies to all files including those summarized in context-snapshot.md Section 4.
|
|
54
|
+
3. **Never re-read unmodified files** — Once you have read a file into context, do NOT read it again unless it was modified by an Edit/Write operation after your last read. Use platform file/search tools for targeted lookup; when shell-free helper lookup is needed, run `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<pattern>" --json`, then read only the smallest bounded range with the platform file-reading tool instead of full-file Read. Before issuing a Read, ask yourself: "Have I read this file before, and has it changed since?" If the answer is "no, it hasn't changed" — do NOT read it. This applies to all files including those summarized in context-snapshot.md Section 4. Follow the active skill and runtime contracts when an execution unit is created; do not infer its permissions, continuation, or retry behavior from this bootstrap.
|
|
56
55
|
4. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
|
|
57
56
|
4. **One task at a time** — In Phase 4 (implement), complete and test one task before starting the next.
|
|
58
57
|
5. **Minimize tool output** — Never load full command output into context. First capture command output to a temp file using the command/tool output option or the host-appropriate redirection, then inspect only the final relevant lines and use targeted search helpers to extract the information needed for the current task. Only read the filtered result — never the raw full output.
|
|
@@ -76,14 +75,13 @@ You are running in **headless non-interactive mode** with a FINITE context windo
|
|
|
76
75
|
|
|
77
76
|
---
|
|
78
77
|
|
|
79
|
-
##
|
|
78
|
+
## Execution-Unit Timeout Recovery
|
|
80
79
|
|
|
81
|
-
If
|
|
80
|
+
If an execution unit times out:
|
|
82
81
|
1. `{{RUNTIME_HELPER_CMD}} artifact list .prizmkit/specs/{{FEATURE_SLUG}}` — check what exists
|
|
83
|
-
2. If `context-snapshot.md` exists: open recovery prompt with `"Read .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md for project context and the Implementation Log from previous
|
|
84
|
-
3.
|
|
85
|
-
|
|
86
|
-
---
|
|
82
|
+
2. If `context-snapshot.md` exists: open a recovery prompt with `"Read .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md for project context and the Implementation Log from the previous execution. Run git diff HEAD to see actual code changes already made. Do NOT re-read individual source files unless the File Manifest directs you to."` + only remaining steps + `model: "lite"`
|
|
83
|
+
3. Apply the owning skill or runtime contract for retry, native continuation, strict downgrade, or Main-Agent fallback. Do not create an unapproved replacement execution unit.
|
|
84
|
+
4. Do not poll indefinitely after the owning contract's retry budget is exhausted; write `failure-log.md` with the timeout and last observable state when recovery is blocked.
|
|
87
85
|
|
|
88
86
|
## Execution
|
|
89
87
|
|
|
@@ -181,7 +179,7 @@ Before proceeding past CP-1, verify:
|
|
|
181
179
|
|
|
182
180
|
### Phase 3: Plan Self-Check — Orchestrator Direct
|
|
183
181
|
|
|
184
|
-
|
|
182
|
+
The active planning skill and runtime determine whether any additional planning execution is appropriate. Do not treat this bounded self-check as a substitute for the planning skill's own review contract:
|
|
185
183
|
|
|
186
184
|
1. Re-read only `context-snapshot.md`, `spec.md`, and `plan.md`.
|
|
187
185
|
2. Cross-check spec.md and plan.md Tasks against the feature description and acceptance criteria.
|
|
@@ -191,26 +189,26 @@ Do not delegate planning analysis. The current Main Agent performs a bounded sel
|
|
|
191
189
|
**CP-2**: Plan self-check complete; no CRITICAL plan issues remain.
|
|
192
190
|
|
|
193
191
|
|
|
194
|
-
### Implement —
|
|
192
|
+
### Implement — Plan Execution
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
Execute the reviewed plan through the active implementation skill. The skill and runtime determine the execution topology; preserve the shared artifact directory, active checkout, and task checkpoints.
|
|
197
195
|
|
|
198
196
|
Before starting, check plan.md Tasks:
|
|
199
197
|
```bash
|
|
200
198
|
{{RUNTIME_HELPER_CMD}} text count .prizmkit/specs/{{FEATURE_SLUG}}/plan.md --pattern "- [ ]"
|
|
201
199
|
```
|
|
202
200
|
- If result is `0` (all tasks already `[x]`) → **SKIP to Review**.
|
|
203
|
-
- If non-zero →
|
|
201
|
+
- If non-zero → execute the remaining tasks below.
|
|
204
202
|
|
|
205
203
|
**Build artifacts rule**: After any build/compile command, ensure output is in `.gitignore`. Never commit binaries/build output.
|
|
206
204
|
|
|
207
205
|
**3a.** Run `/prizmkit-implement` directly:
|
|
208
206
|
- Continue from the `spec.md` / `plan.md` / `context-snapshot.md` content you created in Phase 1-2; do not re-read self-authored artifacts just because implementation starts
|
|
209
207
|
- Re-read `plan.md` or `context-snapshot.md` only when resuming/continuing, when current context was compacted or lost, or when task checkbox state may have changed outside this session
|
|
210
|
-
-
|
|
208
|
+
- Follow the implementation skill's current execution and delegation contract
|
|
211
209
|
- Use context-snapshot.md Section 4 File Manifest for targeted source reads; avoid re-reading source files already summarized there unless they changed after the snapshot
|
|
212
210
|
- Implements task-by-task, marking each `[x]` immediately
|
|
213
|
-
-
|
|
211
|
+
- Remember to update checkpoints after finishing a series of tasks
|
|
214
212
|
|
|
215
213
|
**3b. Focused checks only (no test gate here)**:
|
|
216
214
|
- During implementation, do not run mandatory periodic or full-suite tests.
|
|
@@ -237,7 +235,7 @@ For each Verification Gate from the Task Contract, write one evidence line to Im
|
|
|
237
235
|
|
|
238
236
|
### Review — Code Review
|
|
239
237
|
|
|
240
|
-
Review the completed implementation before the full Feature test gate. Run `/prizmkit-code-review artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`
|
|
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.
|
|
241
239
|
|
|
242
240
|
- `REVIEW_PASS` → record `stage=code-review`, `status=REVIEW_PASS`, `stage_result=PASS`, `next_stage=prizmkit-test`, and `resume_from=prizmkit-test`; then run the test gate.
|
|
243
241
|
- `REVIEW_NEEDS_FIXES` → increment the shared outer `repair_round` and route `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`.
|
|
@@ -524,14 +522,14 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
|
|
|
524
522
|
|
|
525
523
|
## Reminders
|
|
526
524
|
|
|
527
|
-
- Tier 3: orchestrator
|
|
525
|
+
- Tier 3: orchestrator follows the active skill and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|
|
528
526
|
- context-snapshot.md contains Main-Agent implementation context; Code Review writes only review-report.md
|
|
529
527
|
- Gate checks require the Implementation Log and a valid review-report.md Final Result before proceeding
|
|
530
|
-
- Review execution outside the skill contract is forbidden;
|
|
528
|
+
- Review execution outside the owning skill contract is forbidden; execution-unit retry and background behavior come from the active skill/runtime contract
|
|
531
529
|
- Commit phase must use `/prizmkit-committer`; do NOT replace with manual git commit commands
|
|
532
530
|
- **NEVER delete, modify, or touch any file under `.prizmkit/state/`** — those are pipeline runtime files managed by the runner
|
|
533
531
|
- NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
|
|
534
532
|
- Do NOT run `git add`/`git commit` during Phase 1-5 — all changes are committed once in Phase 6
|
|
535
533
|
- If any files remain after the commit, amend the existing commit — do NOT create a follow-up commit
|
|
536
534
|
- When staging files, always use explicit file names — NEVER use `git add -A` or `git add .`
|
|
537
|
-
- On timeout:
|
|
535
|
+
- On execution-unit timeout: follow the owning skill/runtime contract, preserve the active checkout and artifacts, and record a truthful blocker when recovery is exhausted
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
|
|
13
13
|
|
|
14
|
-
**CRITICAL**:
|
|
14
|
+
**CRITICAL**: Do not exit while recoverable work remains. If a required gate is blocked or the workflow cannot safely continue, record the blocker and stop with a truthful blocked status; do not claim success or commit an incomplete change.
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**Execution model**: Follow the active skills and runtime contracts for planning, implementation, review, recovery, and commit. Those contracts determine the execution topology, permissions, and delegation boundaries.
|
|
17
17
|
|
|
18
18
|
**NON-INTERACTIVE MODE**: There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input. Make decisions autonomously and move forward.
|
|
19
19
|
|
|
@@ -46,7 +46,7 @@ You are the **bug fix session agent**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}".
|
|
|
46
46
|
0. **NON-INTERACTIVE MODE** — NEVER ask for confirmation. Proceed autonomously.
|
|
47
47
|
1. **context-snapshot.md is your single source of truth** — After it is built, read context-snapshot.md instead of re-reading individual source files.
|
|
48
48
|
2. **Never re-read your own writes** — Trust your write was correct.
|
|
49
|
-
3. **Never re-read unmodified files** — Once you
|
|
49
|
+
3. **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` or `sed -n` for targeted lookups instead of full-file Read. 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 bootstrap.
|
|
50
50
|
4. **Stay focused** — Do NOT explore code unrelated to this bug.
|
|
51
51
|
4. **Minimize tool output** — Capture to temp file, scan head/tail, filter with grep/sed/awk. Never load full output.
|
|
52
52
|
5. **No intermediate commits** — All changes committed once at the end via `/prizmkit-committer`.
|
|
@@ -315,7 +315,8 @@ Write to: `{{SESSION_STATUS_PATH}}`
|
|
|
315
315
|
|
|
316
316
|
## Reminders
|
|
317
317
|
|
|
318
|
-
-
|
|
318
|
+
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|
|
319
|
+
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path
|
|
319
320
|
- All skills use `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`
|
|
320
321
|
- plan.md first task MUST be reproduction test (RED → GREEN TDD)
|
|
321
322
|
- Commit with `fix(<scope>):` prefix, NOT `feat:`
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"high",
|
|
76
76
|
"critical"
|
|
77
77
|
],
|
|
78
|
-
"description": "Estimated implementation complexity. Determines
|
|
78
|
+
"description": "Estimated implementation complexity. Determines prompt depth and guardrails: low/medium → lite, high → standard, critical → full. Execution topology is defined by the active skills and runtime, not by this field."
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"type": "array",
|
|
@@ -17,7 +17,7 @@ You are the **refactor session orchestrator**. Execute Refactor {{REFACTOR_ID}}:
|
|
|
17
17
|
|
|
18
18
|
**NON-INTERACTIVE MODE**: You are running in headless non-interactive mode. There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, and NEVER use interactive prompts. Resolve uncertainty from existing code, project docs, and conservative behavior-preserving defaults.
|
|
19
19
|
|
|
20
|
-
**
|
|
20
|
+
**Execution model**: Follow the active skills and runtime contracts for planning, implementation, review, recovery, and commit. Those contracts determine the execution topology, permissions, and delegation boundaries.
|
|
21
21
|
|
|
22
22
|
**REFACTOR DOCUMENTATION POLICY**:
|
|
23
23
|
- Default: run `/prizmkit-retrospective` with full sync because refactoring changes structure and interfaces.
|
|
@@ -267,7 +267,8 @@ Before exiting, write `{{SESSION_STATUS_PATH}}`:
|
|
|
267
267
|
## Reminders
|
|
268
268
|
|
|
269
269
|
- Use L1 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
|
+
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path
|
|
271
272
|
- Behavior preservation is the first priority.
|
|
272
273
|
- Browser verification is a mandatory attempt by default; it blocks only when explicitly required.
|
|
273
274
|
- If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
|
|
@@ -6,4 +6,4 @@ You are the **bug fix session orchestrator**. Fix Bug {{BUG_ID}}: "{{BUG_TITLE}}
|
|
|
6
6
|
|
|
7
7
|
**NON-INTERACTIVE MODE**: There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input. Make decisions autonomously from the bug report, existing code, tests, and conservative project patterns.
|
|
8
8
|
|
|
9
|
-
**Execution model**:
|
|
9
|
+
**Execution model**: Follow the active skills and runtime contracts for planning, implementation, review, recovery, and commit. Those contracts determine the execution topology, permissions, and delegation boundaries.
|
|
@@ -2,17 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Code review is mandatory for every committable Bugfix, including small or obvious fixes. Do not create a FAST_PATH that skips this gate.
|
|
4
4
|
|
|
5
|
-
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}
|
|
5
|
+
Run `/prizmkit-code-review` with `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/` and follow the skill's complete 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.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- Do not delegate the mandatory Main-Agent review or invoke another review skill or workflow.
|
|
10
|
-
- Do not add review execution outside the single optional Reviewer owned and gated by `prizmkit-code-review`.
|
|
11
|
-
- The optional Reviewer must be structurally read-only, unable to execute arbitrary commands or downstream execution, and natively resumable as the same unit; otherwise strict downgrade applies.
|
|
12
|
-
- Direct reading, searching, editing, and testing by the current Main Agent remain allowed.
|
|
13
|
-
- `review-report.md` is the only persisted review artifact; do not append separate Review Notes to another artifact.
|
|
14
|
-
|
|
15
|
-
Missing required evidence, an unsafe repair, a failed verification, or failure to converge by round ten produces `NEEDS_FIXES`.
|
|
7
|
+
Missing required evidence, an unsafe repair, a failed verification, or failure to converge under the review contract produces `NEEDS_FIXES`.
|
|
16
8
|
|
|
17
9
|
**Gate Check — Final Review Result**:
|
|
18
10
|
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
- The first plan task must prove the bug with a reproduction test when feasible.
|
|
6
6
|
- Commit with `fix(<scope>):`, not `feat:`.
|
|
7
7
|
- Do not write TRAP dates into `.prizmkit/prizm-docs/`.
|
|
8
|
-
-
|
|
8
|
+
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries.
|
|
9
|
+
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path.
|
|
9
10
|
- Checkpoint state is the recovery truth; skipped steps must be marked `skipped`.
|
|
10
11
|
- Browser verification is a mandatory attempt by default; it blocks only when explicitly required.
|
|
11
12
|
- If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
|
|
@@ -4,9 +4,9 @@ You are running in **headless non-interactive mode** with a FINITE context windo
|
|
|
4
4
|
|
|
5
5
|
0. **NON-INTERACTIVE MODE** — There is NO human on the other end. NEVER ask for user confirmation, NEVER wait for user input, NEVER use interactive prompts (e.g. "Would you like me to…"). If a skill has an interactive step (e.g. offer remediation, ask for approval), skip it and proceed autonomously. Make decisions based on the data available and move forward.
|
|
6
6
|
|
|
7
|
-
1. **context-snapshot.md is your single source of truth** — After it is available, use it instead of re-reading individual source files. If you just created or updated it in this session, continue from the in-context content; read it only when resuming/continuing, after context compaction/loss, or when handing work to
|
|
7
|
+
1. **context-snapshot.md is your single source of truth** — After it is available, use it instead of re-reading individual source files. If you just created or updated it in this session, continue from the in-context content; read it only when resuming/continuing, after context compaction/loss, or when handing work to an execution unit.
|
|
8
8
|
2. **Never re-read your own writes** — After you create/modify a file, do NOT read it back to verify. Trust your write was correct.
|
|
9
|
-
3. **Never re-read unmodified files** — Once you have read a file into context, do NOT read it again unless it was modified by an Edit/Write operation after your last read. Use platform file/search tools for targeted lookup; when shell-free helper lookup is needed, run `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<pattern>" --json`, then read only the smallest bounded range with the platform file-reading tool instead of full-file Read. Before issuing a Read, ask yourself: "Have I read this file before, and has it changed since?" If the answer is "no, it hasn't changed" — do NOT read it. This applies to all files summarized in context-snapshot.md Section 4.
|
|
9
|
+
3. **Never re-read unmodified files** — Once you have read a file into context, do NOT read it again unless it was modified by an Edit/Write operation after your last read. Use platform file/search tools for targeted lookup; when shell-free helper lookup is needed, run `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<pattern>" --json`, then read only the smallest bounded range with the platform file-reading tool instead of full-file Read. Before issuing a Read, ask yourself: "Have I read this file before, and has it changed since?" If the answer is "no, it hasn't changed" — do NOT read it. This applies to all files summarized in context-snapshot.md Section 4. Follow the active skill and runtime contracts when an execution unit is created; do not infer its permissions, continuation, or retry behavior from this prompt.
|
|
10
10
|
4. **Stay focused** — Do NOT explore code unrelated to this feature. No curiosity-driven reads.
|
|
11
11
|
5. **One task at a time** — Complete and test one task before starting the next.
|
|
12
12
|
6. **Minimize tool output** — Never load full command output into context. First capture command output to a temp file using the command/tool output option or the host-appropriate redirection, then inspect only the final relevant lines and use targeted search helpers to extract the information needed for the current task. Only read the filtered result — never the raw full output.
|