prizmkit 1.1.153 → 1.1.155
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 +120 -113
- package/bundled/dev-pipeline/assets/skill-subagent-integration.md +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +355 -15
- package/bundled/dev-pipeline/prizmkit_runtime/cli.py +189 -110
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +146 -111
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +4 -20
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +48 -14
- package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/reset.py +122 -15
- package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +50 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -10
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +139 -74
- package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +482 -0
- package/bundled/dev-pipeline/prizmkit_runtime/status.py +106 -1
- 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/init-bugfix-pipeline.py +2 -2
- package/bundled/dev-pipeline/scripts/prompt_framework.py +36 -41
- package/bundled/dev-pipeline/scripts/update-bug-status.py +197 -71
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +77 -16
- package/bundled/dev-pipeline/scripts/update-feature-status.py +46 -121
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +46 -123
- package/bundled/dev-pipeline/scripts/utils.py +119 -0
- 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/bug-fix-list-schema.json +3 -2
- 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_auto_skip.py +111 -32
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +617 -30
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +262 -194
- 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 +281 -206
- package/bundled/dev-pipeline/tests/test_recovery_workflow.py +322 -0
- package/bundled/dev-pipeline/tests/test_reset_modes.py +935 -0
- package/bundled/dev-pipeline/tests/test_reset_preserve.py +5 -7
- package/bundled/dev-pipeline/tests/test_runtime_commit.py +608 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +617 -188
- 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/bug-planner/references/schema-validation.md +1 -1
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -13
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +22 -14
- 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 +11 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +63 -77
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/retrospective-result-schema.json +138 -0
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +17 -23
- 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 +9 -6
- package/bundled/skills/recovery-workflow/evals/evals.json +2 -2
- package/bundled/skills/recovery-workflow/references/detection.md +7 -6
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +16 -6
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +21 -13
- package/bundled/templates/project-memory-template.md +19 -11
- package/package.json +1 -1
- package/src/scaffold.js +33 -22
- package/bundled/dev-pipeline/prizmkit_runtime/runner_recovery.py +0 -228
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +0 -767
- 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
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Location and Identity
|
|
6
6
|
|
|
7
|
+
The state filename uses the validated exact basename of `artifact_dir` without a second slug transformation:
|
|
8
|
+
|
|
7
9
|
```text
|
|
8
|
-
.prizmkit/state/workflows/<requirement-
|
|
10
|
+
.prizmkit/state/workflows/<requirement-identity>.json
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
The active `artifact_dir` is preserved exactly across every stage:
|
|
13
|
+
An existing state path whose recorded `artifact_dir` differs from the active artifact is a blocking collision; never overwrite, merge, or suffix it automatically. The active `artifact_dir` is preserved exactly across every stage:
|
|
12
14
|
|
|
13
15
|
```text
|
|
14
16
|
.prizmkit/specs/<requirement-slug>/
|
|
@@ -31,7 +33,7 @@ The state file is an index, not the authority for stage completion:
|
|
|
31
33
|
| Terminal testing result | `{artifact_dir}/test-result.json` |
|
|
32
34
|
| Retrospective completion | `{artifact_dir}/retrospective-result.json` |
|
|
33
35
|
| Durable architecture knowledge | `.prizmkit/prizm-docs/` |
|
|
34
|
-
| Local commit | Git history and
|
|
36
|
+
| Local commit | Git history and runtime- or user-verified commit identity |
|
|
35
37
|
| Current stage, orchestrator, and resume entry | Workflow state |
|
|
36
38
|
| External orchestration progress | External host checkpoint |
|
|
37
39
|
|
|
@@ -64,7 +66,7 @@ Every consumer compares workflow state with the skill-owned artifacts and curren
|
|
|
64
66
|
| `orchestrator` | Semantic coordinator identifier, or null for direct stage use. |
|
|
65
67
|
| `stage` | Stage that most recently wrote state. |
|
|
66
68
|
| `status` | Lifecycle status: `pending`, `in_progress`, `completed`, `failed`, or `skipped`. |
|
|
67
|
-
| `stage_result` |
|
|
69
|
+
| `stage_result` | Coordinator-recorded lifecycle result mapped from a validated atomic result and its required artifacts, such as `PLAN_READY`, `IMPLEMENTED`, `REVIEW_PASS`, `REVIEW_NEEDS_FIXES`, `TEST_*`, `RETRO_COMPLETE`, or `COMMITTED`. |
|
|
68
70
|
| `completed_stages` | Ordered stages completed for this requirement. |
|
|
69
71
|
| `repair_scope` | Optional caller-owned routing scope. The test skill reports high-risk repairs through `test-result.json` instead of scheduling another stage. |
|
|
70
72
|
| `repair_round` | Optional outer cross-stage repair round, from 0 through 3. It is not a test-internal repair counter. |
|
|
@@ -97,10 +99,10 @@ review-report NEEDS_FIXES → status=failed, stage_result=REVIEW_NEED
|
|
|
97
99
|
test-result TEST_PASS → status=completed, stage_result=TEST_PASS
|
|
98
100
|
test-result TEST_NEEDS_FIXES → status=failed, stage_result=TEST_NEEDS_FIXES
|
|
99
101
|
test-result TEST_BLOCKED → status=failed, stage_result=TEST_BLOCKED
|
|
100
|
-
retrospective DOCS_UPDATED
|
|
101
|
-
retrospective NO_DOC_CHANGE
|
|
102
|
-
retrospective
|
|
103
|
-
commit
|
|
102
|
+
retrospective outcome=RETRO_COMPLETE, result=DOCS_UPDATED → status=completed, stage_result=RETRO_COMPLETE
|
|
103
|
+
retrospective outcome=RETRO_COMPLETE, result=NO_DOC_CHANGE → status=completed, stage_result=RETRO_COMPLETE
|
|
104
|
+
retrospective outcome=RETRO_BLOCKED → status=failed, stage_result=RETRO_BLOCKED
|
|
105
|
+
runtime commit preparation → status=in_progress, stage_result=COMMIT_PENDING
|
|
104
106
|
local commit confirmed → status=completed, stage_result=COMMITTED
|
|
105
107
|
commit blocked → status=failed, stage_result=COMMIT_BLOCKED
|
|
106
108
|
```
|
|
@@ -115,8 +117,8 @@ commit blocked → status=failed, stage_result=COMMIT_BLOC
|
|
|
115
117
|
|
|
116
118
|
```text
|
|
117
119
|
TEST_NEEDS_FIXES
|
|
118
|
-
→ known correction
|
|
119
|
-
→ caller decides whether and how to arrange another
|
|
120
|
+
→ a known correction remains
|
|
121
|
+
→ caller decides whether and how to arrange another invocation
|
|
120
122
|
|
|
121
123
|
TEST_BLOCKED
|
|
122
124
|
→ truth, input, safe environment, or reliable execution prevents a verdict
|
|
@@ -132,30 +134,32 @@ Any outer repair or continuation policy is independently owned by the caller and
|
|
|
132
134
|
|
|
133
135
|
1. An atomic stage performs only its own stage, writes its truthful result and artifact paths, and returns control.
|
|
134
136
|
2. When `orchestrator` is non-null, only that orchestrator invokes the next skill.
|
|
135
|
-
3. Direct
|
|
137
|
+
3. Direct atomic use returns only its local result and artifacts; it does not report or select another invocation.
|
|
136
138
|
4. Every handoff preserves the same `artifact_dir`.
|
|
137
139
|
5. External automation invokes atomic stages directly and does not nest the composite workflow.
|
|
138
140
|
6. Workflow state never replaces or absorbs an external host checkpoint.
|
|
139
141
|
|
|
140
|
-
## Commit
|
|
142
|
+
## Commit Execution Ownership
|
|
141
143
|
|
|
142
144
|
Interactive execution:
|
|
143
145
|
|
|
144
146
|
```text
|
|
145
147
|
committer previews intended files and message
|
|
146
148
|
→ waits for explicit current-user confirmation
|
|
147
|
-
→ creates the local commit
|
|
149
|
+
→ stages, creates, and verifies the local commit
|
|
148
150
|
```
|
|
149
151
|
|
|
150
|
-
|
|
152
|
+
Pipeline execution:
|
|
151
153
|
|
|
152
154
|
```text
|
|
153
|
-
|
|
154
|
-
→ committer
|
|
155
|
+
external coordinator validates its required gates and supplies exact readiness evidence
|
|
156
|
+
→ committer validates only that evidence and writes an exact runtime-commit-request.json
|
|
157
|
+
→ external coordinator maps COMMIT_REQUEST_READY to its checkpoint's in_progress/COMMIT_PENDING state
|
|
158
|
+
→ Python runtime validates the request, commits, verifies Git, and writes checkpoint completed/COMMITTED
|
|
155
159
|
→ remote publication remains separate
|
|
156
160
|
```
|
|
157
161
|
|
|
158
|
-
|
|
162
|
+
The preparation request is data for runtime validation, not prompt-level authorization. The committer must not stage, commit, or predeclare COMMITTED in pipeline preparation mode.
|
|
159
163
|
|
|
160
164
|
## Recovery
|
|
161
165
|
|
|
@@ -171,4 +175,4 @@ When state is missing, stale, or inconsistent:
|
|
|
171
175
|
8. Reconstruct the latest safe predecessor and report the reconstruction.
|
|
172
176
|
9. Continue only from the first incomplete or invalid stage.
|
|
173
177
|
|
|
174
|
-
Stale state never bypasses review, testing, retrospective, commit
|
|
178
|
+
Stale state never bypasses review, testing, retrospective, commit preparation/execution, or external checkpoint enforcement.
|
|
@@ -1,49 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-code-review"
|
|
3
|
-
description: "Review
|
|
3
|
+
description: "Review one supplied complete change with a bounded Main-Agent review/repair loop and optional capability-gated independent correctness review. Produces review-report.md and returns PASS or NEEDS_FIXES. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Code Review
|
|
7
7
|
|
|
8
|
-
`/prizmkit-code-review`
|
|
8
|
+
`/prizmkit-code-review` reviews one caller-supplied complete change. The current Main Agent owns the complete baseline review loop: it discovers findings, adjudicates them, directly repairs accepted findings, verifies repairs, and continues until the review converges or stops safely. After convergence, one strictly capability-gated independent Reviewer may objectively check the complete current implementation without taking mutation or final-decision authority.
|
|
9
9
|
|
|
10
10
|
## Execution Boundary
|
|
11
11
|
|
|
12
12
|
- Main-Agent review remains mandatory and must not be delegated directly or indirectly.
|
|
13
13
|
- After Main-Agent convergence only, this skill may create the single independent Reviewer defined by `${SKILL_DIR}/references/independent-code-review.md` when every structural capability in that reference is proven.
|
|
14
|
-
- Do not invoke another review
|
|
14
|
+
- Do not invoke another review process from inside this skill.
|
|
15
15
|
- Do not launch any additional review work through a general-purpose execution unit or relabel it as a finder, verifier, audit, compatibility review, verification, or gap sweep.
|
|
16
16
|
- The independent Reviewer cannot mutate, execute arbitrary commands, or create downstream execution units; prompt instructions never substitute for these structural guarantees.
|
|
17
17
|
- The Main Agent may directly read, search, edit, and run targeted verification in the active workspace.
|
|
18
|
-
- Review repairs
|
|
18
|
+
- Review repairs use targeted verification appropriate to each accepted finding.
|
|
19
19
|
- `{artifact_dir}/review-report.md` is the only persisted review artifact for this execution.
|
|
20
20
|
|
|
21
21
|
## Atomic Stage Boundary
|
|
22
22
|
|
|
23
|
-
`prizmkit-code-review` owns the complete
|
|
23
|
+
`prizmkit-code-review` owns the complete review, accepted-correction repairs, targeted verification, and `review-report.md` for one supplied change. It returns `PASS` or `NEEDS_FIXES` and stops.
|
|
24
24
|
|
|
25
25
|
## When to Use
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- When the user asks for a complete review or commit readiness decision.
|
|
27
|
+
- A caller supplies a complete implementation for review.
|
|
28
|
+
- A caller supplies a production-affecting repair for delta review.
|
|
29
|
+
- The user asks for a complete current-change correctness review.
|
|
31
30
|
|
|
32
31
|
## When NOT to Use
|
|
33
32
|
|
|
34
33
|
- No valid `spec.md` and `plan.md` exist for the active requirement.
|
|
35
34
|
- Implementation tasks or required repair work remain incomplete.
|
|
36
|
-
-
|
|
37
|
-
- The request is a direct low-risk edit outside the formal requirement lifecycle.
|
|
35
|
+
- The request has no review input and does not require this bounded review contract.
|
|
38
36
|
|
|
39
|
-
## Input
|
|
37
|
+
## Input
|
|
40
38
|
|
|
41
39
|
| Parameter | Required | Description |
|
|
42
40
|
|---|---|---|
|
|
43
|
-
| `artifact_dir` |
|
|
41
|
+
| `artifact_dir` | Yes | Caller-supplied directory containing the exact `spec.md` and `plan.md` for this review. |
|
|
44
42
|
| `review_scope` | No | `full` for the initial review; `delta` for a production-affecting repair after a prior review pass. |
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
Review only the caller-supplied `artifact_dir`; never discover a different recent artifact. Missing or inconsistent stage input produces `NEEDS_FIXES` with the exact input blocker.
|
|
47
45
|
|
|
48
46
|
## Phase 0: Initialize Report and Reuse Current Context
|
|
49
47
|
|
|
@@ -51,7 +49,7 @@ Every invocation must reuse the same `artifact_dir`. If workflow state is missin
|
|
|
51
49
|
2. At the start of each execution, replace any prior report with a new execution header using `${SKILL_DIR}/references/review-report-template.md`.
|
|
52
50
|
3. Within that execution, append progress after every review round, repair batch, final verification, and exactly one `## Final Result`.
|
|
53
51
|
4. Start from the Main Agent's current requirement context and inspect the complete workspace change first: `git status --short`, the staged diff, and the unstaged diff. Include untracked, deleted, and renamed files in the review scope.
|
|
54
|
-
5.
|
|
52
|
+
5. Reuse current context and load only missing or potentially stale material required to resolve a concrete ambiguity, verify an acceptance criterion, or understand a changed contract.
|
|
55
53
|
6. Inspect unchanged callers, dependents, contracts, or tests only when the diff changes or may violate an interface, shared behavior, or regression boundary. Do not perform an unconditional repository-wide dependency sweep.
|
|
56
54
|
7. For `review_scope=delta`, focus on files and behavior affected since the prior review pass and expand only across contracts implicated by that delta.
|
|
57
55
|
8. If no changes exist, record final verification and `PASS` only when the current requirement context and prior implementation state prove there is nothing left to review.
|
|
@@ -109,7 +107,7 @@ For accepted findings while the round limit remains:
|
|
|
109
107
|
3. Inspect the complete resulting diff for unrelated changes and regressions.
|
|
110
108
|
4. Append repair verification and continue the review loop.
|
|
111
109
|
|
|
112
|
-
Do not
|
|
110
|
+
Do not turn review verification into a broad unrelated test campaign; use targeted checks that establish each repair.
|
|
113
111
|
|
|
114
112
|
If a repair is unsafe, incomplete, or unverifiable, record an unresolved finding and finish with `NEEDS_FIXES`.
|
|
115
113
|
|
|
@@ -141,49 +139,15 @@ Valid results:
|
|
|
141
139
|
PASS | NEEDS_FIXES
|
|
142
140
|
```
|
|
143
141
|
|
|
144
|
-
`PASS` requires review convergence, no unresolved findings, and credible targeted verification. `NEEDS_FIXES` means
|
|
142
|
+
`PASS` requires review convergence, no unresolved findings, and credible targeted verification. `NEEDS_FIXES` means a concrete correction remains or safe completion was not established.
|
|
145
143
|
|
|
146
|
-
##
|
|
144
|
+
## Output
|
|
147
145
|
|
|
148
|
-
|
|
146
|
+
Return only review-stage outputs:
|
|
149
147
|
|
|
150
|
-
|
|
148
|
+
- `artifact_dir` and `review-report.md` path;
|
|
149
|
+
- `PASS` when review converged with all accepted findings repaired;
|
|
150
|
+
- `NEEDS_FIXES` when accepted or unresolved findings remain;
|
|
151
|
+
- finding counts, repair verification, and concrete remaining findings.
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
{
|
|
154
|
-
"stage": "code-review",
|
|
155
|
-
"status": "completed",
|
|
156
|
-
"stage_result": "REVIEW_PASS",
|
|
157
|
-
"completed_stages": ["plan", "implement", "code-review"],
|
|
158
|
-
"next_stage": "test",
|
|
159
|
-
"resume_from": "prizmkit-test"
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
On `NEEDS_FIXES` caused by code findings, update workflow state:
|
|
164
|
-
|
|
165
|
-
```json
|
|
166
|
-
{
|
|
167
|
-
"stage": "code-review",
|
|
168
|
-
"status": "failed",
|
|
169
|
-
"stage_result": "REVIEW_NEEDS_FIXES",
|
|
170
|
-
"repair_scope": "production",
|
|
171
|
-
"next_stage": "implement",
|
|
172
|
-
"resume_from": "prizmkit-implement"
|
|
173
|
-
}
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Increment the outer `repair_round` only when returning to implementation; the review-internal ten-round loop never increments it. The outer workflow permits at most three repair rounds and must return a truthful unresolved `NEEDS_FIXES` result instead of beginning a fourth.
|
|
177
|
-
|
|
178
|
-
## Handoff
|
|
179
|
-
|
|
180
|
-
After `PASS`:
|
|
181
|
-
|
|
182
|
-
```text
|
|
183
|
-
REVIEW_PASS
|
|
184
|
-
→ /prizmkit-test
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
If workflow state names an active `orchestrator`, return `REVIEW_PASS`, the report/state paths, and `next_stage=test` to it; do not invoke test independently. For direct stage use, report the exact `/prizmkit-test` invocation and same `artifact_dir`; a host may perform that semantic handoff on the user's behalf.
|
|
188
|
-
|
|
189
|
-
After `NEEDS_FIXES`, stop and hand off to `/prizmkit-implement`; do not test or commit the unrepaired production change.
|
|
153
|
+
Return only the listed review outputs. Do not invoke another Skill.
|
|
@@ -47,7 +47,7 @@ Rules:
|
|
|
47
47
|
|
|
48
48
|
## Review Input
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Use the exact caller-supplied review identity on every response:
|
|
51
51
|
|
|
52
52
|
```text
|
|
53
53
|
artifact_dir: [EXACT_ARTIFACT_DIR]
|
|
@@ -95,7 +95,7 @@ Execution boundaries:
|
|
|
95
95
|
- Complete this review personally.
|
|
96
96
|
- Do not create, schedule, resume, continue, request, or coordinate another execution unit.
|
|
97
97
|
- Do not ask the Main Agent to create a helper.
|
|
98
|
-
- Do not re-enter
|
|
98
|
+
- Do not re-enter delegation or another review process.
|
|
99
99
|
- Do not modify, create, delete, rename, stage, commit, or otherwise mutate files.
|
|
100
100
|
- Do not execute shell, Git, tests, builds, network calls, external processes, or any operation that can change state.
|
|
101
101
|
- Use read-only checkout access beyond changed files only for concrete module, caller, consumer, schema, type, configuration, fixture, or test coupling.
|
|
@@ -139,7 +139,7 @@ All initial execution boundaries and the Reviewer Output Protocol remain mandato
|
|
|
139
139
|
|
|
140
140
|
## Reviewer Output Protocol
|
|
141
141
|
|
|
142
|
-
Return exactly one of these forms. Do not add severity, confidence, dimension,
|
|
142
|
+
Return exactly one of these forms. Do not add severity, confidence, dimension, caller routing, or acceptance fields.
|
|
143
143
|
|
|
144
144
|
### No Correction Needed
|
|
145
145
|
|
|
@@ -187,7 +187,7 @@ Every correction contains only `Target`, `Problem`, `Evidence`, and `Correction`
|
|
|
187
187
|
No review verdict was produced.
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
`REVIEW_BLOCKED` is an internal independent-review result, not
|
|
190
|
+
`REVIEW_BLOCKED` is an internal independent-review result, not the code-review stage verdict.
|
|
191
191
|
|
|
192
192
|
## Main-Agent Adjudication
|
|
193
193
|
|
|
@@ -234,11 +234,11 @@ Behavior:
|
|
|
234
234
|
6. Reviewer input problems may be corrected within remaining shared budget using native continuation or a compliant replacement.
|
|
235
235
|
7. Report temporary input-cleanup failures honestly; cleanup failure does not change an otherwise verified review result.
|
|
236
236
|
|
|
237
|
-
Strict downgrade is visible reduced assurance, not a new
|
|
237
|
+
Strict downgrade is visible reduced assurance, not a new terminal review verdict and not permission to weaken the gate.
|
|
238
238
|
|
|
239
239
|
## Report Recording
|
|
240
240
|
|
|
241
|
-
Use the existing append-only `review-report.md`
|
|
241
|
+
Use the existing append-only `review-report.md` structure and renderer events:
|
|
242
242
|
|
|
243
243
|
- `independent-review-round`: response number `1..5`, result, correction count, adjudication counts, and next action;
|
|
244
244
|
- `independent-adjudication`: correction summary, `accepted | rejected | unresolved`, evidence, and actual modification;
|
|
@@ -114,7 +114,7 @@ Exactly one Final Result terminates a completed execution:
|
|
|
114
114
|
- Start of a new execution removes stale progress and terminal results from prior executions.
|
|
115
115
|
- A phase appends its result before the next phase starts.
|
|
116
116
|
- Main-Agent round numbers are from `1` through `10`; independent Reviewer response numbers are from `1` through `5`.
|
|
117
|
-
- Independent Reviewer results are `NO_CORRECTION_NEEDED`, `CORRECTION_NEEDED`, or `REVIEW_BLOCKED`; they never replace the terminal
|
|
117
|
+
- Independent Reviewer results are `NO_CORRECTION_NEEDED`, `CORRECTION_NEEDED`, or `REVIEW_BLOCKED`; they never replace the terminal review verdict.
|
|
118
118
|
- For an independent round, `accepted + rejected + unresolved = corrections`; `NO_CORRECTION_NEEDED` requires zero corrections.
|
|
119
119
|
- Finding counts satisfy `accepted + rejected + unresolved = findings`.
|
|
120
120
|
- `PASS` requires every accepted finding fixed and zero unresolved findings.
|
|
@@ -122,4 +122,4 @@ Exactly one Final Result terminates a completed execution:
|
|
|
122
122
|
- An IN_PROGRESS report without Final Result is incomplete.
|
|
123
123
|
- Generic or incidental verdict text outside the last Final Result does not prove completion.
|
|
124
124
|
- Do not append any section after Final Result.
|
|
125
|
-
-
|
|
125
|
+
- Do not create a separate review-state JSON file; `review-report.md` is the complete stage artifact.
|
|
@@ -1,179 +1,129 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-committer"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Perform one commit stage for a caller-supplied final change. Either preview and create an explicitly confirmed interactive local commit, or validate the final diff and write an exact runtime-commit-request.json without Git mutation. Returns only commit-stage results. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Committer
|
|
7
7
|
|
|
8
|
-
`/prizmkit-committer`
|
|
8
|
+
`/prizmkit-committer` handles one caller-supplied final change through one explicit operation:
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
→ prizmkit-implement
|
|
13
|
-
→ prizmkit-code-review
|
|
14
|
-
→ prizmkit-test
|
|
15
|
-
→ prizmkit-retrospective
|
|
16
|
-
→ prizmkit-committer
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
It does not decide which formal gates can be omitted. It verifies that all five preceding stages completed for the same `artifact_dir`, then applies the commit authorization semantics for the current execution context.
|
|
20
|
-
|
|
21
|
-
## Atomic Stage Boundary
|
|
22
|
-
|
|
23
|
-
`prizmkit-committer` owns only final gate verification, authorization-boundary handling, local staging, commit creation, and commit verification. It writes its truthful terminal result and returns control; it must not invoke deployment or any hidden seventh stage. The active orchestrator owns lifecycle completion reporting.
|
|
24
|
-
|
|
25
|
-
## When to Use
|
|
26
|
-
|
|
27
|
-
- Workflow state reports `status=completed` with `stage_result=RETRO_COMPLETE` and a valid `retrospective-result.json` for the active formal requirement.
|
|
28
|
-
- An interactive user confirms they want to create the local commit.
|
|
29
|
-
- A trusted headless execution context authorizes an automatic local commit.
|
|
30
|
-
- User says "commit", "submit", "finish", or "done" after the formal gates have completed.
|
|
31
|
-
|
|
32
|
-
## When NOT to Use
|
|
10
|
+
- `operation=interactive-commit`: preview, confirm, stage, commit, and verify locally.
|
|
11
|
+
- `operation=prepare-runtime-commit`: validate the intended change and write an exact commit request without staging or committing.
|
|
33
12
|
|
|
34
|
-
|
|
35
|
-
- Any preceding formal stage is missing, failed, blocked, or associated with a different artifact directory.
|
|
36
|
-
- Review has `NEEDS_FIXES` or tests have `TEST_NEEDS_FIXES`/`TEST_BLOCKED`.
|
|
37
|
-
- Retrospective has not completed, including an explicit `NO_DOC_CHANGE` result.
|
|
38
|
-
- User says only "ship it"; clarify commit versus deployment in interactive mode.
|
|
39
|
-
- A merge conflict is unresolved.
|
|
40
|
-
- An unknown headless caller has not supplied trusted commit authorization.
|
|
13
|
+
Remote publication is outside this Skill.
|
|
41
14
|
|
|
42
|
-
##
|
|
15
|
+
## Input
|
|
43
16
|
|
|
44
|
-
|
|
17
|
+
| Parameter | Required | Description |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| `artifact_dir` | Yes | Exact caller-supplied artifact root for this commit stage. |
|
|
20
|
+
| `operation` | Yes | `interactive-commit` or `prepare-runtime-commit`. |
|
|
21
|
+
| `evidence_paths` | Yes | Exact caller-supplied project-relative artifacts that establish commit readiness. |
|
|
22
|
+
| `excluded_paths` | No | Exact caller-owned metadata paths that must remain outside the commit and are also excluded by the selected operation's consumer contract. It is not an allowlist for unrelated project changes. |
|
|
23
|
+
| `request_path` | Preparation only | Must equal `{artifact_dir}/runtime-commit-request.json`. |
|
|
45
24
|
|
|
46
|
-
|
|
47
|
-
|---|---|
|
|
48
|
-
| Plan | `spec.md`, `plan.md`, and `PLAN_READY` for the same `artifact_dir` |
|
|
49
|
-
| Implement | All required tasks complete and `IMPLEMENTED` |
|
|
50
|
-
| Code review | Final `review-report.md` result `PASS` |
|
|
51
|
-
| Test | Consistent `TEST_PASS` report/result pair for the final reviewed workspace |
|
|
52
|
-
| Retrospective | `retrospective-result.json` with workflow `status=completed`, `stage_result=RETRO_COMPLETE`, and artifact `result=DOCS_UPDATED` or `result=NO_DOC_CHANGE` |
|
|
25
|
+
Do not discover another artifact root or infer the operation from provider, platform, prompt style, or human availability.
|
|
53
26
|
|
|
54
|
-
|
|
27
|
+
## Stage Boundary
|
|
55
28
|
|
|
56
|
-
|
|
29
|
+
This Skill owns only final-change inspection and its selected commit operation. It does not invoke another Skill.
|
|
57
30
|
|
|
58
|
-
|
|
31
|
+
In preparation mode it must not stage, unstage, commit, amend, reset, merge, or push.
|
|
59
32
|
|
|
60
|
-
1
|
|
61
|
-
2. Verify `spec.md`, `plan.md`, final `review-report.md`, the consistent `test-report.md`/`test-result.json` pair, `retrospective-result.json`, and the current workspace.
|
|
62
|
-
3. Inspect:
|
|
33
|
+
## Step 1: Validate Supplied Evidence and Final Change
|
|
63
34
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
35
|
+
1. Resolve `artifact_dir` and every `evidence_paths` entry exactly as supplied by the caller.
|
|
36
|
+
2. Reject missing, unreadable, stale, contradictory, blocked, or explicitly non-passing evidence.
|
|
37
|
+
3. Inspect staged, unstaged, untracked, deleted, and renamed files with bounded Git status/diff commands.
|
|
38
|
+
4. Confirm every changed path belongs to the supplied change, a concrete dependency, its tests, durable documentation, or caller-required artifacts.
|
|
39
|
+
5. Reject unresolved merge state and sensitive files such as real environment files, credentials, secrets, private keys, certificates, or local settings.
|
|
40
|
+
6. Confirm no requested task output remains to be generated after this stage.
|
|
69
41
|
|
|
70
|
-
|
|
71
|
-
5. Warn about sensitive-looking files such as `.env*`, credentials, secrets, private keys, and certificates.
|
|
72
|
-
6. Stop when any required gate is missing, stale, contradictory, failed, or blocked.
|
|
42
|
+
The caller decides which evidence is required and how the returned commit-stage result is used. This Skill validates the supplied evidence but does not infer a larger stage sequence.
|
|
73
43
|
|
|
74
|
-
|
|
44
|
+
## Step 2: Build Commit Message and Intended Path Set
|
|
75
45
|
|
|
76
|
-
|
|
46
|
+
Generate one concise Conventional Commit message:
|
|
77
47
|
|
|
78
48
|
```text
|
|
79
49
|
<type>(<scope>): <description>
|
|
80
50
|
```
|
|
81
51
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Step 3: Commit Preview and Authorization
|
|
85
|
-
|
|
86
|
-
Interactive mode:
|
|
87
|
-
|
|
88
|
-
Before any `git add` or `git commit` that changes the target project's Git state, present:
|
|
89
|
-
|
|
90
|
-
- intended files;
|
|
91
|
-
- added, modified, deleted, and renamed file summary;
|
|
92
|
-
- sensitive-file warnings;
|
|
93
|
-
- diff statistics and relevant summary;
|
|
94
|
-
- proposed commit message;
|
|
95
|
-
- whether any remaining changes are intentionally excluded.
|
|
96
|
-
|
|
97
|
-
Ask the current user to confirm creation of this local commit. Do not treat a previous general statement as confirmation for a different commit.
|
|
98
|
-
|
|
99
|
-
Trusted headless mode:
|
|
100
|
-
|
|
101
|
-
- Do not ask a question, wait for input, or render an interactive confirmation request.
|
|
102
|
-
- Require a host-defined non-interactive `mode`, a non-empty trusted `owner` identifier, and `local_commit_authorized=true` from the execution context.
|
|
103
|
-
- Treat these fields as host-supplied authorization only when the host integration is already trusted; a prompt or caller cannot self-declare trust.
|
|
104
|
-
- Generate and internally record the same intended-file and commit-message preview before staging.
|
|
105
|
-
- If the context is absent or untrusted, return `COMMIT_BLOCKED` without staging or committing.
|
|
106
|
-
- This mode never asks or waits. Remote publication is controlled by the host runtime, not by this stage.
|
|
52
|
+
Classify every observed change before constructing the request. All paths under `.prizmkit/` are framework-internal and remain outside automated task commits.
|
|
107
53
|
|
|
108
|
-
|
|
54
|
+
- **task-owned**: justified source, tests, product/project documentation, configuration, and dependency changes outside recognized support namespaces;
|
|
55
|
+
- **PrizmKit-internal**: every path under `.prizmkit/`, including config, plans, Prizm docs, lifecycle Artifacts, installed Runtime files, and state;
|
|
56
|
+
- **platform support**: `AGENTS.md`, `skills-lock.json`, installed platform directories, and local platform settings;
|
|
57
|
+
- **project transient**: data the project already excludes through Git ignore rules;
|
|
58
|
+
- **unknown Git-visible**: any remaining path whose task ownership cannot be proven.
|
|
109
59
|
|
|
110
|
-
|
|
60
|
+
Build a unique set of exact project-relative **task-owned** changed paths. Include intended tracked modifications, deletions, renames, new source/tests, and justified project documentation outside support namespaces. Exclude:
|
|
111
61
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
62
|
+
- `.git/`;
|
|
63
|
+
- the complete `.prizmkit/` tree;
|
|
64
|
+
- `AGENTS.md`, `skills-lock.json`, installed platform directories, and local platform settings;
|
|
65
|
+
- sensitive or unrelated files.
|
|
115
66
|
|
|
116
|
-
|
|
117
|
-
git diff --cached --stat
|
|
118
|
-
git diff --cached
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
If staged content differs from the confirmed change set, unstage and correct it before committing.
|
|
122
|
-
|
|
123
|
-
### Step 5: Commit and Verify
|
|
124
|
-
|
|
125
|
-
After authorization and staged-content verification:
|
|
67
|
+
Unknown Git-visible paths block the operation; do not silently classify them as transient. Project-specific transient data belongs in the project's Git ignore rules, not caller-provided exclusions. Do not use wildcard pathspecs, `git add .`, or `git add -A` as an intended-path description. In preparation mode, reject an `excluded_paths` entry unless the Python Runtime independently excludes that exact caller-owned metadata class; unrelated or user-authored project changes cannot be hidden from exact-path coverage.
|
|
126
68
|
|
|
127
|
-
|
|
128
|
-
git commit -m "<type>(<scope>): <description>"
|
|
129
|
-
git log -1 --stat
|
|
130
|
-
git status
|
|
131
|
-
```
|
|
69
|
+
## Step 3A: Interactive Commit
|
|
132
70
|
|
|
133
|
-
|
|
71
|
+
For `operation=interactive-commit`:
|
|
134
72
|
|
|
135
|
-
|
|
73
|
+
1. Present intended paths, change summary, sensitive-file warnings, diff statistics, proposed message, and intentionally excluded changes.
|
|
74
|
+
2. Ask the current user to confirm that exact local commit.
|
|
75
|
+
3. Only after confirmation, stage tracked changes safely and new files explicitly.
|
|
76
|
+
4. Verify the staged diff exactly matches the confirmed path set.
|
|
77
|
+
5. Create the local commit and verify its hash, committed paths, and remaining workspace changes.
|
|
78
|
+
6. Return `COMMITTED`, the commit hash/message, committed paths, and intentional remaining changes.
|
|
136
79
|
|
|
137
|
-
|
|
80
|
+
If confirmation is declined, return `COMMIT_DECLINED` without Git mutation.
|
|
138
81
|
|
|
139
|
-
##
|
|
82
|
+
## Step 3B: Runtime Commit Request
|
|
140
83
|
|
|
141
|
-
|
|
84
|
+
For `operation=prepare-runtime-commit`:
|
|
142
85
|
|
|
143
|
-
|
|
86
|
+
1. Require `request_path={artifact_dir}/runtime-commit-request.json`.
|
|
87
|
+
2. Read the current full `HEAD` hash as `base_head`.
|
|
88
|
+
3. Write this JSON atomically:
|
|
144
89
|
|
|
145
90
|
```json
|
|
146
91
|
{
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
|
|
92
|
+
"schema_version": 1,
|
|
93
|
+
"artifact_dir": ".prizmkit/specs/example",
|
|
94
|
+
"base_head": "<full current HEAD hash>",
|
|
95
|
+
"commit_message": "feat(scope): concise description",
|
|
96
|
+
"intended_paths": [
|
|
97
|
+
"src/example.py",
|
|
98
|
+
"tests/test_example.py"
|
|
99
|
+
]
|
|
153
100
|
}
|
|
154
101
|
```
|
|
155
102
|
|
|
156
|
-
|
|
103
|
+
4. Verify:
|
|
104
|
+
- `artifact_dir` identifies the supplied artifact root;
|
|
105
|
+
- `base_head` equals current `HEAD`;
|
|
106
|
+
- `commit_message` is one non-empty line;
|
|
107
|
+
- `intended_paths` is non-empty, unique, exact, project-relative, and covers the complete task-owned Git-visible change outside recognized support namespaces;
|
|
108
|
+
- no path escapes the checkout or enters `.prizmkit/`, another support namespace, or a sensitive location;
|
|
109
|
+
- every unknown Git-visible path caused a block rather than an implicit exclusion.
|
|
110
|
+
5. Return `COMMIT_REQUEST_READY`, the request path, message, intended paths, and explicit confirmation that no Git mutation occurred.
|
|
111
|
+
6. Stop.
|
|
157
112
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
113
|
+
The request is preparation data. Its consumer independently validates it before any Git mutation.
|
|
114
|
+
|
|
115
|
+
## Output
|
|
116
|
+
|
|
117
|
+
Interactive operation returns exactly one of:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
COMMITTED | COMMIT_DECLINED | COMMIT_BLOCKED
|
|
164
121
|
```
|
|
165
122
|
|
|
166
|
-
|
|
123
|
+
Preparation operation returns exactly one of:
|
|
167
124
|
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
"stage": "committer",
|
|
171
|
-
"status": "completed",
|
|
172
|
-
"stage_result": "COMMITTED",
|
|
173
|
-
"completed_stages": ["plan", "implement", "code-review", "test", "retrospective", "committer"],
|
|
174
|
-
"next_stage": null,
|
|
175
|
-
"resume_from": null
|
|
176
|
-
}
|
|
125
|
+
```text
|
|
126
|
+
COMMIT_REQUEST_READY | COMMIT_BLOCKED
|
|
177
127
|
```
|
|
178
128
|
|
|
179
|
-
|
|
129
|
+
Every blocked result includes concrete missing evidence, unsafe paths, or validation errors. Return only the listed commit-operation outputs.
|