prizmkit 1.1.154 → 1.1.156
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/adapters/codex/skill-adapter.js +1 -1
- package/bundled/adapters/pi/skill-adapter.js +2 -1
- package/bundled/dev-pipeline/.env.example +2 -6
- package/bundled/dev-pipeline/README.md +21 -27
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +341 -15
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +1 -15
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +48 -14
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +50 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -9
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +120 -22
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +482 -0
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +64 -11
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +145 -367
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +91 -62
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +105 -69
- package/bundled/dev-pipeline/scripts/prompt_framework.py +36 -41
- package/bundled/dev-pipeline/scripts/update-bug-status.py +1 -4
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +61 -13
- package/bundled/dev-pipeline/scripts/update-feature-status.py +1 -4
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +1 -4
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +22 -27
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +71 -104
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +59 -111
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +37 -72
- package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +39 -0
- package/bundled/dev-pipeline/templates/sections/bugfix-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +8 -25
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +4 -4
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +7 -4
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +14 -27
- package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +20 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +8 -71
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +7 -7
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +4 -4
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +5 -17
- package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +3 -1
- package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +10 -23
- package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +2 -2
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +7 -7
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -1
- package/bundled/dev-pipeline/templates/sections/retrospective.md +12 -0
- package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +35 -0
- package/bundled/dev-pipeline/templates/session-status-schema.json +45 -62
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +469 -18
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +262 -175
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +62 -23
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +76 -28
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +168 -18
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +111 -0
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -2
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +608 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +167 -25
- package/bundled/skills/_metadata.json +9 -9
- package/bundled/skills/app-planner/SKILL.md +3 -3
- package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +56 -64
- package/bundled/skills/app-planner/references/rules/backend/fixed-rules.md +85 -240
- package/bundled/skills/app-planner/references/rules/backend/question-bank.md +25 -25
- package/bundled/skills/app-planner/references/rules/backend/question-manifest.json +16 -7
- package/bundled/skills/app-planner/references/rules/backend/template.md +74 -92
- package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +93 -93
- package/bundled/skills/app-planner/references/rules/database/fixed-rules.md +66 -173
- package/bundled/skills/app-planner/references/rules/database/question-bank.md +31 -26
- package/bundled/skills/app-planner/references/rules/database/question-manifest.json +13 -4
- package/bundled/skills/app-planner/references/rules/database/template.md +76 -98
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +68 -95
- package/bundled/skills/app-planner/references/rules/frontend/fixed-rules.md +93 -166
- package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +46 -36
- package/bundled/skills/app-planner/references/rules/frontend/question-manifest.json +11 -2
- package/bundled/skills/app-planner/references/rules/frontend/template.md +79 -257
- package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +91 -99
- package/bundled/skills/app-planner/references/rules/mobile/fixed-rules.md +73 -246
- package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +17 -17
- package/bundled/skills/app-planner/references/rules/mobile/question-manifest.json +17 -2
- package/bundled/skills/app-planner/references/rules/mobile/template.md +73 -85
- package/bundled/skills/app-planner/references/rules-configuration.md +133 -65
- package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +291 -0
- package/bundled/skills/prizmkit/SKILL.md +17 -18
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/prizmkit-code-review/SKILL.md +22 -58
- package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +6 -6
- package/bundled/skills/prizmkit-code-review/references/review-report-template.md +2 -2
- package/bundled/skills/prizmkit-committer/SKILL.md +82 -132
- package/bundled/skills/prizmkit-deploy/SKILL.md +27 -11
- package/bundled/skills/prizmkit-deploy/assets/deploy-document-template.md +89 -0
- package/bundled/skills/prizmkit-deploy/references/ci-cd-workflows.md +44 -14
- package/bundled/skills/prizmkit-deploy/references/cloud-platform-deploy.md +19 -3
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +22 -12
- package/bundled/skills/prizmkit-deploy/references/deploy-config-schema.md +3 -1
- package/bundled/skills/prizmkit-deploy/references/deploy-history-schema.md +22 -6
- package/bundled/skills/prizmkit-deploy/references/deploy-metadata-schema.json +49 -0
- package/bundled/skills/prizmkit-deploy/references/live-validation-notes.md +1 -1
- package/bundled/skills/prizmkit-deploy/references/pending-input-schema.json +164 -0
- package/bundled/skills/prizmkit-deploy/references/ssh-adapter-flow.md +9 -8
- package/bundled/skills/prizmkit-deploy/references/ssh-execution-flow.md +6 -6
- package/bundled/skills/prizmkit-implement/SKILL.md +30 -66
- package/bundled/skills/prizmkit-implement/references/implementation-subagent-procedure.md +4 -4
- package/bundled/skills/prizmkit-init/SKILL.md +4 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +21 -64
- package/bundled/skills/prizmkit-plan/references/artifact-identity.md +38 -0
- package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +4 -4
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +5 -5
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +75 -11
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +191 -56
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +18 -18
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +14 -8
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +12 -5
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +23 -12
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +13 -9
- package/bundled/skills/prizmkit-retrospective/SKILL.md +94 -97
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +79 -37
- package/bundled/skills/prizmkit-retrospective/references/retrospective-result-schema.json +138 -0
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +111 -54
- package/bundled/skills/prizmkit-test/SKILL.md +64 -51
- package/bundled/skills/prizmkit-test/references/boundary-contract-and-test-double-guidance.md +206 -0
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +17 -9
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +45 -21
- package/bundled/skills/prizmkit-test/references/test-report-template.md +20 -13
- package/bundled/skills/prizmkit-workflow/SKILL.md +35 -37
- package/bundled/skills/prizmkit-workflow/references/artifact-identity.md +34 -0
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +22 -18
- package/bundled/skills/recovery-workflow/SKILL.md +2 -1
- package/bundled/skills/recovery-workflow/references/detection.md +4 -3
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +15 -5
- package/bundled/templates/hooks/validate-prizm-docs.py +124 -12
- package/package.json +1 -1
- package/src/scaffold.js +33 -22
- package/bundled/dev-pipeline/templates/sections/bugfix-artifacts.md +0 -16
- package/bundled/dev-pipeline/templates/sections/bugfix-session-status.md +0 -31
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -7
- package/bundled/dev-pipeline/templates/sections/critical-paths-lite.md +0 -7
- package/bundled/dev-pipeline/templates/sections/directory-convention-agent.md +0 -9
- package/bundled/dev-pipeline/templates/sections/directory-convention-lite.md +0 -6
- package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +0 -15
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +0 -61
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +0 -24
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +0 -12
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +0 -44
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +0 -25
- package/bundled/dev-pipeline/templates/sections/phase-plan-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-plan-lite.md +0 -20
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +0 -20
- package/bundled/dev-pipeline/templates/sections/refactor-artifacts.md +0 -17
- package/bundled/dev-pipeline/templates/sections/refactor-session-status.md +0 -28
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-agent.md +0 -52
- package/bundled/dev-pipeline/templates/sections/test-failure-recovery-lite.md +0 -52
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +0 -174
- package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +0 -119
|
@@ -1398,11 +1398,8 @@ def action_status(feature_list_data, state_dir, feature_filter=None, project_roo
|
|
|
1398
1398
|
fstatus = feature.get("status", "pending")
|
|
1399
1399
|
fs = load_feature_status(state_dir, fid)
|
|
1400
1400
|
feature_slug = _build_feature_slug(fid, title)
|
|
1401
|
-
# Read
|
|
1401
|
+
# Read the authoritative checkpoint cursor without mutating cached runtime state.
|
|
1402
1402
|
resume_phase = _checkpoint_phase_or_cached(project_root, feature_slug, fs)
|
|
1403
|
-
if resume_phase != fs.get("resume_from_phase"):
|
|
1404
|
-
fs["resume_from_phase"] = resume_phase
|
|
1405
|
-
save_feature_status(state_dir, fid, fs)
|
|
1406
1403
|
degraded_reason = degraded_reason_map.get(fid)
|
|
1407
1404
|
|
|
1408
1405
|
# Count statuses
|
|
@@ -1010,11 +1010,8 @@ def action_status(refactor_list_data, state_dir, project_root=None):
|
|
|
1010
1010
|
rs = load_refactor_status(state_dir, rid)
|
|
1011
1011
|
retry_count = rs.get("retry_count", 0)
|
|
1012
1012
|
max_retries_val = rs.get("max_retries", 3)
|
|
1013
|
-
# Read
|
|
1013
|
+
# Read the authoritative checkpoint cursor without mutating cached runtime state.
|
|
1014
1014
|
resume_phase = _checkpoint_phase_or_cached(project_root, rid, rs)
|
|
1015
|
-
if resume_phase != rs.get("resume_from_phase"):
|
|
1016
|
-
rs["resume_from_phase"] = resume_phase
|
|
1017
|
-
save_refactor_status(state_dir, rid, rs)
|
|
1018
1015
|
|
|
1019
1016
|
if rstatus in counts:
|
|
1020
1017
|
counts[rstatus] += 1
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# Dev-Pipeline
|
|
1
|
+
# Dev-Pipeline Custom Feature Prompt Compatibility Template
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> renders modular full guidance from `templates/sections/`. If sections are unavailable,
|
|
5
|
-
> it tries `bootstrap-tier3.md` before this last-resort fallback.
|
|
3
|
+
> Canonical pipeline generation uses `templates/sections/`. This monolithic file is retained only as an explicit `--template` compatibility input.
|
|
6
4
|
|
|
7
5
|
## Feature Context
|
|
8
6
|
|
|
@@ -17,34 +15,31 @@
|
|
|
17
15
|
|
|
18
16
|
{{ACCEPTANCE_CRITERIA}}
|
|
19
17
|
|
|
20
|
-
##
|
|
18
|
+
## Your Mission
|
|
21
19
|
|
|
22
|
-
|
|
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.
|
|
20
|
+
Complete the feature in headless non-interactive mode using the active atomic skills and Python runtime contracts. Resolve only safe deterministic uncertainty; otherwise record a truthful blocker. Do not claim a failed gate passed and do not mutate Git.
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
## Context and State Boundaries
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
- Read `root.prizm`, then only relevant module/detail docs and source files.
|
|
25
|
+
- Use `context-snapshot.md` for navigation, not as a substitute for current source, diffs, or authoritative artifacts.
|
|
26
|
+
- Verify modifications with bounded reads, diffs, static checks, and focused tests as appropriate.
|
|
27
|
+
- Atomic Skills return stage-local artifacts/results only. This injected session owns stage order, routing, and checkpoint updates; never hand-edit runner-owned family/session/heartbeat/progress/retry/checkout/daemon/log state.
|
|
28
|
+
- Do not stage, commit, amend, merge, push, reset, clean, or perform destructive filesystem cleanup.
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
{{CHECKPOINT_SYSTEM}}
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
## Execution
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
1. Invoke `/prizmkit-plan` with the exact artifact root; validate `PLAN_READY`, then this session updates the planning checkpoint.
|
|
35
|
+
2. Invoke `/prizmkit-implement` with the reviewed artifacts and any explicit repair input; validate `IMPLEMENTED`, then this session updates the implementation checkpoint.
|
|
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. Complete configured Browser/Manual verification before the authoritative Test stage.
|
|
38
|
+
5. 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, configured verification, and Test. Do not duplicate the Skill's internal repair loop.
|
|
39
|
+
6. Write `completion-summary.json` before retrospective and commit preparation.
|
|
40
|
+
7. Invoke `/prizmkit-retrospective` with the exact artifact root, non-`.prizmkit/` `change_paths`, and `change_summary`; validate `outcome=RETRO_COMPLETE`.
|
|
41
|
+
8. Before commit preparation, all `.prizmkit/**` paths are PrizmKit-internal and stay outside `intended_paths` together with recognized platform support; project-specific transient data must already be Git-ignored, while unknown Git-visible paths block. After validating every required artifact, invoke `/prizmkit-committer operation=prepare-runtime-commit artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/ evidence_paths=<exact paths> excluded_paths=.prizmkit/specs/{{FEATURE_SLUG}}/workflow-checkpoint.json request_path=.prizmkit/specs/{{FEATURE_SLUG}}/runtime-commit-request.json`. Require `COMMIT_REQUEST_READY`; this session then records `COMMIT_PENDING` and stops. The Python runtime executes and verifies the local commit.
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
## Failure Capture
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
7. **Commit**: Run `/prizmkit-committer` to commit all changes.
|
|
40
|
-
|
|
41
|
-
### Critical Rules
|
|
42
|
-
|
|
43
|
-
- Do NOT ask for user input — decide autonomously.
|
|
44
|
-
- Remote publication is controlled by the runtime after the local commit; do not make a publication decision in this session.
|
|
45
|
-
- Write all artifacts to `.prizmkit/specs/{{FEATURE_SLUG}}/`.
|
|
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. 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
|
-
- **Read offset safety**: if Read returns "shorter than offset"/"empty" — run `wc -l` then `sed -n`, do NOT retry same offset.
|
|
49
|
-
- Follow each skill's own bounded loops; do not add a second cross-skill test-fix loop in this fallback prompt.
|
|
50
|
-
- **Layered test**: debug with single-file tests, only run full suite as gate when single-file is green.
|
|
45
|
+
Before an incomplete exit, write `.prizmkit/specs/{{FEATURE_SLUG}}/failure-log.md` with the failed stage, root cause, attempted recovery, next safe action, and any durable traps discovered.
|
|
@@ -12,7 +12,7 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
12
12
|
|
|
13
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
|
-
**
|
|
15
|
+
**Canonical Guardrails**: Follow the active skills and runtime contracts for context loading, planning, implementation, review, testing, recovery, retrospective, and runtime-owned commit execution. The active contracts determine the execution topology and permissions for any execution units they create.
|
|
16
16
|
|
|
17
17
|
**Execution-unit failure policy**:
|
|
18
18
|
- Do not invoke another review skill/workflow or add review execution outside the contract owned by `prizmkit-code-review`.
|
|
@@ -43,34 +43,44 @@ You are the **session orchestrator**. Implement Feature {{FEATURE_ID}}: "{{FEATU
|
|
|
43
43
|
|
|
44
44
|
{{GLOBAL_CONTEXT}}
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Context and Execution Rules
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
This is a finite, headless, non-interactive session. Preserve correctness first, then minimize unnecessary context use.
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
11. **Read offset safety (BLOCKING)** — If Read returns "shorter than offset"/"File is empty"/"Wasted call" — do NOT retry same offset. Use the platform file-reading tool to refresh bounded line information, or locate an anchor with `{{RUNTIME_HELPER_CMD}} text search <file> --pattern "<anchor>" --json` before reading a small bounded range. 2 consecutive offset errors → STOP Reading that file. Never guess offsets or prescribe POSIX-only lookup commands.
|
|
50
|
+
1. Resolve safe uncertainty from the task contract, current code, and project documentation. If no safe deterministic choice exists, record a truthful blocker.
|
|
51
|
+
2. Read `root.prizm`, then only relevant module/detail docs and source. Use `context-snapshot.md` for navigation and handoff, not as a substitute for current source, diffs, or stage artifacts.
|
|
52
|
+
3. Avoid repeated full-file reads, but reread the smallest relevant range after edits, compaction, possible staleness, or when verification requires final content. Never trust an unverified write.
|
|
53
|
+
4. Verify edits with the smallest appropriate diff, parser, formatter, type check, focused test, or bounded read.
|
|
54
|
+
5. Keep scope tied to the task contract, concrete dependency/caller evidence, and mandatory lifecycle gates.
|
|
55
|
+
6. Use focused implementation checks; `/prizmkit-test` exclusively owns the complete affected-module gate and its bounded repair loop.
|
|
56
|
+
7. Bound command output with host-appropriate temporary locations and inspect only relevant summaries. Do not require a fixed POSIX-only path.
|
|
57
|
+
8. Follow project package-manager, lockfile, registry, and version-pinning conventions; do not guess versions.
|
|
58
|
+
9. Keep generated binaries, caches, and temporary output out of the intended commit unless they are source artifacts.
|
|
59
|
+
10. Do not stage, commit, amend, merge, push, reset, clean, or perform destructive filesystem cleanup. The committer prepares a request and the Python runtime executes the local commit.
|
|
60
|
+
11. Atomic Skills return only stage-local artifacts and results. This injected session owns stage order, result routing, and checkpoint updates; never hand-edit runner-owned family/session/heartbeat/progress/retry/checkout/daemon/log state.
|
|
61
|
+
12. After a failed bounded read, refresh a stable anchor or file length before another attempt; do not repeat an invalid offset.
|
|
63
62
|
|
|
64
63
|
---
|
|
65
64
|
|
|
66
|
-
##
|
|
65
|
+
## Requirement Artifact Manifest
|
|
67
66
|
|
|
68
67
|
```
|
|
69
|
-
.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
69
|
+
├── spec.md
|
|
70
|
+
├── plan.md
|
|
71
|
+
├── context-snapshot.md
|
|
72
|
+
├── review-report.md
|
|
73
|
+
├── test-report.md
|
|
74
|
+
├── test-result.json
|
|
75
|
+
├── completion-summary.json
|
|
76
|
+
├── retrospective-result.json
|
|
77
|
+
├── failure-log.md
|
|
78
|
+
├── workflow-checkpoint.json
|
|
79
|
+
└── runtime-commit-request.json
|
|
72
80
|
```
|
|
73
81
|
|
|
82
|
+
{{CHECKPOINT_SYSTEM}}
|
|
83
|
+
|
|
74
84
|
**`context-snapshot.md`** is the implementation knowledge base. The Main Agent writes Sections 1-4 and the Implementation Log. Code Review writes only `review-report.md` and never appends separate Review Notes.
|
|
75
85
|
|
|
76
86
|
---
|
|
@@ -79,7 +89,7 @@ You are running in **headless non-interactive mode** with a FINITE context windo
|
|
|
79
89
|
|
|
80
90
|
If an execution unit times out:
|
|
81
91
|
1. `{{RUNTIME_HELPER_CMD}} artifact list .prizmkit/specs/{{FEATURE_SLUG}}` — check what exists
|
|
82
|
-
2. If `context-snapshot.md` exists
|
|
92
|
+
2. If `context-snapshot.md` exists, use it for recovery navigation together with the current diff and the smallest relevant current-source reads. Continue only the remaining steps under the owning skill's execution budget.
|
|
83
93
|
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
94
|
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.
|
|
85
95
|
|
|
@@ -113,9 +123,9 @@ Check existing artifacts first:
|
|
|
113
123
|
{{RUNTIME_HELPER_CMD}} artifact exists .prizmkit/specs/{{FEATURE_SLUG}}
|
|
114
124
|
```
|
|
115
125
|
|
|
116
|
-
- Both
|
|
117
|
-
- `context-snapshot.md` exists → use it directly
|
|
118
|
-
- Some missing → generate only missing files
|
|
126
|
+
- Both `spec.md` and `plan.md` exist → preserve them; the planning Skill still validates them and returns the local result
|
|
127
|
+
- `context-snapshot.md` exists → use it directly and skip snapshot rebuilding
|
|
128
|
+
- Some planning artifacts are missing → let the planning Skill generate only the missing files
|
|
119
129
|
|
|
120
130
|
Before planning, check whether feature code already exists in the project (use the helper to search source directories identified from `root.prizm` or the project tree scan):
|
|
121
131
|
```bash
|
|
@@ -163,8 +173,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
163
173
|
{{RUNTIME_HELPER_CMD}} artifact exists .prizmkit/specs/{{FEATURE_SLUG}}/plan.md
|
|
164
174
|
```
|
|
165
175
|
|
|
166
|
-
|
|
167
|
-
- plan.md missing: Run `/prizmkit-plan` → generate plan.md (architecture, components, interface design, data model, testing strategy, risk assessment, and Tasks section with `[ ]` checkboxes)
|
|
176
|
+
Invoke `/prizmkit-plan` once with the exact `artifact_dir`, requirement description, and loaded project context. It creates or validates both artifacts and returns only `PLAN_READY` or `PLAN_BLOCKED`. This injected session maps `PLAN_READY` to the planning checkpoint step; `PLAN_BLOCKED` records the blocker and stops.
|
|
168
177
|
|
|
169
178
|
> All files go under `.prizmkit/specs/{{FEATURE_SLUG}}/`. Confirm each with `ls` after writing.
|
|
170
179
|
|
|
@@ -175,44 +184,33 @@ Before proceeding past CP-1, verify:
|
|
|
175
184
|
3. No unresolved data model uncertainty remains in the Data Model section — resolve by reading existing code and making a conservative choice that matches existing patterns. Document the resolution in plan.md.
|
|
176
185
|
4. If a DB design decision genuinely cannot be resolved from existing code alone, document the assumption made and flag it in the Implementation Log for user review.
|
|
177
186
|
|
|
178
|
-
**CP-1**:
|
|
179
|
-
|
|
180
|
-
### Phase 3: Plan Self-Check — Orchestrator Direct
|
|
181
|
-
|
|
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:
|
|
183
|
-
|
|
184
|
-
1. Re-read only `context-snapshot.md`, `spec.md`, and `plan.md`.
|
|
185
|
-
2. Cross-check spec.md and plan.md Tasks against the feature description and acceptance criteria.
|
|
186
|
-
3. Verify the plan references the File Manifest and avoids unrelated work.
|
|
187
|
-
4. If you find CRITICAL issues, fix ONLY those issues in spec.md/plan.md before continuing.
|
|
188
|
-
|
|
189
|
-
**CP-2**: Plan self-check complete; no CRITICAL plan issues remain.
|
|
187
|
+
**CP-1**: The Skill returned `PLAN_READY`; spec.md and plan.md exist and passed its planning review. This injected session validates artifact presence but does not perform a second planning review.
|
|
190
188
|
|
|
191
189
|
|
|
192
190
|
### Implement — Plan Execution
|
|
193
191
|
|
|
194
|
-
|
|
192
|
+
Invoke the implementation Skill with the reviewed `spec.md`, `plan.md`, and any explicit repair scope. It returns only `IMPLEMENTED` or `IMPLEMENT_BLOCKED`; this injected session preserves the artifact directory/checkout and updates the checkpoint after validating the result.
|
|
195
193
|
|
|
196
194
|
Before starting, check plan.md Tasks:
|
|
197
195
|
```bash
|
|
198
196
|
{{RUNTIME_HELPER_CMD}} text count .prizmkit/specs/{{FEATURE_SLUG}}/plan.md --pattern "- [ ]"
|
|
199
197
|
```
|
|
200
|
-
- If result is `0
|
|
201
|
-
- If non-zero
|
|
198
|
+
- If result is `0`, proceed only when the current checkpoint already has a valid `IMPLEMENTED` result and the implementation evidence still matches; otherwise invoke the implementation Skill to reconcile and validate the supplied work.
|
|
199
|
+
- If non-zero, invoke the implementation Skill for the remaining tasks.
|
|
202
200
|
|
|
203
201
|
**Build artifacts rule**: After any build/compile command, ensure output is in `.gitignore`. Never commit binaries/build output.
|
|
204
202
|
|
|
205
203
|
**3a.** Run `/prizmkit-implement` directly:
|
|
206
204
|
- 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
|
|
207
205
|
- 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
|
|
208
|
-
- Follow the implementation skill's
|
|
206
|
+
- Follow the implementation skill's stage-local execution contract
|
|
209
207
|
- 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
|
|
210
|
-
-
|
|
211
|
-
-
|
|
208
|
+
- Implement task-by-task, marking each `[x]` immediately
|
|
209
|
+
- Return the stage result; only this injected session updates the checkpoint
|
|
212
210
|
|
|
213
211
|
**3b. Focused checks only (no test gate here)**:
|
|
214
212
|
- During implementation, do not run mandatory periodic or full-suite tests.
|
|
215
|
-
- If a tiny targeted check is needed to understand a local failure, run only the smallest relevant command and
|
|
213
|
+
- If a tiny targeted check is needed to understand a local failure, run only the smallest relevant command and bound its output using a host-appropriate temporary location.
|
|
216
214
|
- The scoped feature test gate runs after code review; do not declare implementation success based on an early full-suite run.
|
|
217
215
|
|
|
218
216
|
**3c. Verification Gate Self-Check (BLOCKING — before declaring implement done)**:
|
|
@@ -235,32 +233,20 @@ For each Verification Gate from the Task Contract, write one evidence line to Im
|
|
|
235
233
|
|
|
236
234
|
### Review — Code Review
|
|
237
235
|
|
|
238
|
-
|
|
236
|
+
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.
|
|
239
237
|
|
|
240
|
-
- `
|
|
241
|
-
- `
|
|
238
|
+
- Skill `PASS` with a valid report → map to `REVIEW_PASS`, mark the review checkpoint step completed, and continue to configured Browser/Manual verification; invoke `prizmkit-test` only after those checks finish.
|
|
239
|
+
- 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` → configured verification → `prizmkit-test`, while unknown/unsafe scope blocks.
|
|
242
240
|
- Stop as `WORKFLOW_BLOCKED` when the outer repair round is already three. The Main-Agent review loop has its separate limit of up to ten completed rounds.
|
|
243
241
|
|
|
244
|
-
`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 `REVIEW_NEEDS_FIXES`.
|
|
242
|
+
`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`.
|
|
245
243
|
|
|
246
244
|
**Gate Check — Final Review Result**:
|
|
247
245
|
```bash
|
|
248
246
|
{{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/specs/{{FEATURE_SLUG}}/review-report.md
|
|
249
247
|
```
|
|
250
248
|
|
|
251
|
-
Only `REVIEW_PASS` can proceed to the structured Feature test gate. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` writes `failure-log.md` and stops.
|
|
252
|
-
|
|
253
|
-
### Scoped Feature Test Gate — PrizmKit Test
|
|
254
|
-
|
|
255
|
-
Invoke the Feature test gate:
|
|
256
|
-
|
|
257
|
-
```text
|
|
258
|
-
/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
Consume `.prizmkit/specs/{{FEATURE_SLUG}}/test-report.md` and `test-result.json`. They must agree. `TEST_PASS` completes the gate; `TEST_NEEDS_FIXES` preserves a known correction or delta-review requirement and stops truthfully; `TEST_BLOCKED` preserves the blocker and becomes `WORKFLOW_BLOCKED`. Do not require an evidence package, manifest, hashes, attestation, or test-internal checkpoint, and do not reinterpret a testing result as an AI CLI crash.
|
|
262
|
-
|
|
263
|
-
Record only caller-owned `stage`, `status`, `stage_result`, `repair_scope`, `repair_round`, `next_stage`, and `resume_from` in recovery metadata. Keep testing reports/results separate from `workflow-checkpoint.json`. The skill owns its internal ten-round Main-Agent review, five-response optional independent review, and three-round execution-failure repair budgets.
|
|
249
|
+
Only `REVIEW_PASS` can proceed to configured verification and the structured Feature test gate. `REVIEW_INCOMPLETE` or `REVIEW_INVALID` writes `failure-log.md` and stops.
|
|
264
250
|
|
|
265
251
|
{{IF_BROWSER_INTERACTION}}
|
|
266
252
|
### Phase 5.5: Browser Verification — MANDATORY
|
|
@@ -420,50 +406,23 @@ If verification fails:
|
|
|
420
406
|
You MUST attempt verification and MUST clean up the dev server in both cases.
|
|
421
407
|
{{END_IF_BROWSER_INTERACTION}}
|
|
422
408
|
|
|
423
|
-
###
|
|
424
|
-
|
|
425
|
-
**Feature Documentation Policy**:
|
|
426
|
-
- Run `/prizmkit-retrospective` before commit to update `.prizmkit/prizm-docs/` with durable structural knowledge from this feature.
|
|
427
|
-
- Capture architecture knowledge when the feature adds interfaces, dependencies, observable behavior, modules, or durable TRAPS/RULES/DECISIONS.
|
|
428
|
-
- Commit prefix: `feat({{FEATURE_ID}}):`.
|
|
429
|
-
|
|
430
|
-
**6a.** Check if feature already committed by inspecting recent git history for `{{FEATURE_ID}}`:
|
|
431
|
-
```bash
|
|
432
|
-
git log --oneline
|
|
433
|
-
```
|
|
434
|
-
- If a commit for `{{FEATURE_ID}}` already exists → **skip 6d** (do NOT run /prizmkit-committer, do NOT run git reset, do NOT stage or unstage anything). Proceed directly to 6e Final verification.
|
|
435
|
-
- If no existing commit → proceed normally with 6b–6d.
|
|
409
|
+
### Scoped Feature Test Gate — PrizmKit Test
|
|
436
410
|
|
|
437
|
-
|
|
438
|
-
- **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
|
|
439
|
-
- **Architecture knowledge** (feature sessions only): extract TRAPS, RULES, DECISIONS from completed work into `.prizmkit/prizm-docs/`
|
|
440
|
-
- **Detail-doc coverage check**: For any module/sub-module with source files created or significantly modified in this session but no detail `.prizm` doc — evaluate whether one is warranted and create it when needed. The current session has the best context for accurate KEY_FILES, TRAPS, and DECISIONS.
|
|
441
|
-
- Stage doc changes: `git add .prizmkit/prizm-docs/`
|
|
442
|
-
⚠️ Do NOT commit here. Only stage.
|
|
411
|
+
After configured Browser/Manual verification, invoke the Feature test gate:
|
|
443
412
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
git add <specific-files-created-or-modified>
|
|
447
|
-
git add .prizmkit/prizm-docs/
|
|
413
|
+
```text
|
|
414
|
+
/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
448
415
|
```
|
|
449
416
|
|
|
450
|
-
|
|
451
|
-
`feat({{FEATURE_ID}}): {{FEATURE_TITLE}}`
|
|
452
|
-
This single commit includes: feature code + tests + .prizmkit/prizm-docs/ updates.
|
|
453
|
-
- MANDATORY: commit must be done via `/prizmkit-committer` skill. Do NOT run manual `git add`/`git commit` as a substitute.
|
|
454
|
-
- Do NOT run `update-feature-status.py` here — the pipeline runner handles feature-list.json updates automatically after session exit.
|
|
417
|
+
Consume `.prizmkit/specs/{{FEATURE_SLUG}}/test-report.md` and `test-result.json`. They must agree. `TEST_PASS` completes the gate. 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, configured verification, 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.
|
|
455
418
|
|
|
456
|
-
|
|
457
|
-
```bash
|
|
458
|
-
git status --short
|
|
459
|
-
```
|
|
460
|
-
Working tree MUST be clean after this step. If any feature-related files remain, stage them explicitly and amend the SAME commit with `git commit --amend --no-edit`; do NOT create a separate commit.
|
|
419
|
+
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.
|
|
461
420
|
|
|
462
|
-
|
|
421
|
+
### Phase 6: Reports, Retrospective & Runtime Commit Handoff — DO NOT SKIP
|
|
463
422
|
|
|
464
|
-
**
|
|
423
|
+
**6a. Completion summary before commit preparation**
|
|
465
424
|
|
|
466
|
-
Write `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` with the key changes from this session
|
|
425
|
+
Write `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` with the key changes from this session before retrospective and commit preparation.
|
|
467
426
|
|
|
468
427
|
```json
|
|
469
428
|
{
|
|
@@ -483,6 +442,16 @@ Rules for writing completion notes:
|
|
|
483
442
|
- Do NOT include test files, config changes, or internal implementation details unless they affect other features
|
|
484
443
|
- If this feature has no downstream dependents, still write the summary (it serves as documentation)
|
|
485
444
|
|
|
445
|
+
**6b. Retrospective**
|
|
446
|
+
|
|
447
|
+
Invoke `/prizmkit-retrospective` with the exact artifact root, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. Validate `outcome=RETRO_COMPLETE`; do not stage or commit.
|
|
448
|
+
|
|
449
|
+
**6c. Runtime commit preparation**
|
|
450
|
+
|
|
451
|
+
Before commit preparation, all `.prizmkit/**` paths are PrizmKit-internal and stay outside `intended_paths`, together with `AGENTS.md`, `skills-lock.json`, installed platform directories, and local platform settings. Project-specific transient data must already be covered by Git ignore rules. Unknown Git-visible paths are not silently ignored: justify and include them as task output or block.
|
|
452
|
+
|
|
453
|
+
After this injected session validates every required artifact, invoke `/prizmkit-committer operation=prepare-runtime-commit artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/ evidence_paths=<exact paths> excluded_paths=.prizmkit/specs/{{FEATURE_SLUG}}/workflow-checkpoint.json request_path=.prizmkit/specs/{{FEATURE_SLUG}}/runtime-commit-request.json`. Require `COMMIT_REQUEST_READY`; this session records `COMMIT_PENDING` and stops. The Python runtime validates the request, executes/verifies the local commit, and finalizes checkpoint `COMMITTED`.
|
|
454
|
+
|
|
486
455
|
## Critical Paths
|
|
487
456
|
|
|
488
457
|
| Resource | Path |
|
|
@@ -511,14 +480,12 @@ If you encounter an unrecoverable error, context overflow, or are about to exit
|
|
|
511
480
|
|
|
512
481
|
## Reminders
|
|
513
482
|
|
|
514
|
-
-
|
|
483
|
+
- The orchestrator follows the active skill and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|
|
515
484
|
- context-snapshot.md contains Main-Agent implementation context; Code Review writes only review-report.md
|
|
516
485
|
- Gate checks require the Implementation Log and a valid review-report.md Final Result before proceeding
|
|
517
486
|
- Review execution outside the owning skill contract is forbidden; execution-unit retry and background behavior come from the active skill/runtime contract
|
|
518
|
-
-
|
|
519
|
-
-
|
|
487
|
+
- `/prizmkit-committer operation=prepare-runtime-commit` validates gates and writes the exact request without Git mutation
|
|
488
|
+
- Atomic Skills remain stage-local; this injected session alone maps their results to checkpoint transitions and later invocations
|
|
520
489
|
- NEVER run `rm -rf`, `git clean`, or any destructive filesystem operations
|
|
521
|
-
- Do
|
|
522
|
-
- If any files remain after the commit, amend the existing commit — do NOT create a follow-up commit
|
|
523
|
-
- When staging files, always use explicit file names — NEVER use `git add -A` or `git add .`
|
|
490
|
+
- Do not stage, commit, amend, merge, reset, or push; the Python runtime executes and verifies the prepared local commit
|
|
524
491
|
- 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
|