prizmkit 1.1.139 → 1.1.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +41 -121
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +1 -2
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +150 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +21 -804
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +4 -6
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +4 -6
- package/bundled/dev-pipeline/scripts/prompt_framework.py +56 -55
- package/bundled/dev-pipeline/scripts/update-bug-status.py +1 -2
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +14 -96
- package/bundled/dev-pipeline/scripts/update-feature-status.py +1 -2
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +1 -2
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +7 -18
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +5 -5
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +13 -10
- package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +1 -1
- package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +14 -9
- package/bundled/dev-pipeline/templates/sections/headless-commit-authorization.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-lite-suffix.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-lite.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +14 -26
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +13 -10
- package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +1 -1
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +287 -384
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +119 -684
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +17 -40
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +20 -23
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +29 -32
- package/bundled/skills/_metadata.json +6 -6
- package/bundled/skills/prizmkit/SKILL.md +8 -13
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-code-review/SKILL.md +3 -3
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -3
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-retrospective/SKILL.md +2 -2
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +61 -80
- package/bundled/skills/prizmkit-test/SKILL.md +217 -187
- package/bundled/skills/prizmkit-test/references/external-contract-mock-guidance.md +119 -0
- package/bundled/skills/prizmkit-test/references/independent-test-review.md +269 -0
- package/bundled/skills/prizmkit-test/references/test-coverage-model.md +193 -0
- package/bundled/skills/prizmkit-test/references/test-report-template.md +164 -79
- package/bundled/skills/prizmkit-workflow/SKILL.md +15 -23
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +61 -80
- package/package.json +1 -1
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +0 -476
- package/bundled/skills/prizmkit-test/assets/behavior-risk-matrix.schema.json +0 -116
- package/bundled/skills/prizmkit-test/assets/evidence-manifest.schema.json +0 -111
- package/bundled/skills/prizmkit-test/assets/evidence-package-template.json +0 -66
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +0 -104
- package/bundled/skills/prizmkit-test/references/contract-mock-protocol.md +0 -65
- package/bundled/skills/prizmkit-test/references/evidence-protocol.md +0 -208
- package/bundled/skills/prizmkit-test/references/evidence-request-protocol.md +0 -80
- package/bundled/skills/prizmkit-test/references/examples.md +0 -100
- package/bundled/skills/prizmkit-test/references/service-boundary-test-catalog.md +0 -228
- package/bundled/skills/prizmkit-test/references/test-generation-steps.md +0 -118
- package/bundled/skills/prizmkit-test/references/trusted-evidence-execution.md +0 -110
- package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +0 -181
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +0 -1851
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +0 -1793
|
@@ -104,7 +104,7 @@ Use this protocol only when the bug is UI/frontend-reproducible. Evidence must c
|
|
|
104
104
|
|
|
105
105
|
**Step 1 — Diagnose the bug**:
|
|
106
106
|
|
|
107
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant
|
|
107
|
+
1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs for affected modules
|
|
108
108
|
2. Trace the bug:
|
|
109
109
|
- Classify error type (Runtime / Network / Auth / Data / Logic / Config / External)
|
|
110
110
|
- Check `.prizmkit/prizm-docs/` TRAPS sections for matching known issues
|
|
@@ -203,18 +203,18 @@ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to task policy. `REVIEW_
|
|
|
203
203
|
|
|
204
204
|
### Phase 4: Post-Review Test Gate — PrizmKit Test
|
|
205
205
|
|
|
206
|
-
After a valid code-review PASS, run the mandatory
|
|
206
|
+
After a valid code-review PASS, run the mandatory test gate against the same artifact root:
|
|
207
207
|
|
|
208
208
|
```text
|
|
209
209
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
Read the
|
|
212
|
+
Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to retrospective and commit. `TEST_NEEDS_FIXES` preserves the known correction or delta-review requirement and stops truthfully. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
213
213
|
|
|
214
|
-
Only
|
|
214
|
+
Only `TEST_PASS` may proceed to commit.
|
|
215
215
|
|
|
216
216
|
{{IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
217
|
-
**MANUAL/HYBRID AUTOMATION**: This
|
|
217
|
+
**MANUAL/HYBRID AUTOMATION**: This pipeline session is always headless. Execute manual/hybrid verification with available deterministic browser, CLI/API, fixture, or test tooling. Document the method and verification basis, then continue through `/prizmkit-retrospective` and `/prizmkit-committer`; never ask for UAT, wait for a user, or stop as `partial`.
|
|
218
218
|
- Do not write `verifying` to the external bug-list status field; fine-grained verification is session/checkpoint metadata, while the external list status remains one of `pending`, `in_progress`, `completed`, `failed`, `skipped`, or `needs_info`.
|
|
219
219
|
{{END_IF_VERIFICATION_MANUAL_OR_HYBRID}}
|
|
220
220
|
|
|
@@ -224,7 +224,7 @@ Only validated `TEST_PASS` may proceed to commit.
|
|
|
224
224
|
|
|
225
225
|
### Headless Commit Authorization
|
|
226
226
|
|
|
227
|
-
This pipeline launch authorizes one local task commit only after
|
|
227
|
+
This pipeline launch authorizes one local task commit only after Code Review and a consistent `TEST_PASS` report/result pair. Never ask a question, wait for input, or request confirmation. Invoke `/prizmkit-committer` with `mode=l4-headless`, `owner=prizmkit-l4`, and `local_commit_authorized=true`. The runtime controls any optional remote publication after the local commit; do not make a publication decision in this session.
|
|
228
228
|
|
|
229
229
|
**Bug Fix Documentation Policy**:
|
|
230
230
|
- **DEFAULT**: Run `/prizmkit-retrospective` with structural sync only (Job 1). Skip knowledge injection.
|
|
@@ -159,15 +159,15 @@ Handle `REVIEW_PASS` and `REVIEW_NEEDS_FIXES` according to behavior-preservation
|
|
|
159
159
|
|
|
160
160
|
### Phase 5: Post-Review Test Gate — PrizmKit Test
|
|
161
161
|
|
|
162
|
-
After a valid code-review PASS, run the mandatory
|
|
162
|
+
After a valid code-review PASS, run the mandatory test gate against the same artifact root:
|
|
163
163
|
|
|
164
164
|
```text
|
|
165
165
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
Behavior-preservation
|
|
168
|
+
Behavior-preservation context remains supporting input. Read the sibling `test-report.md` and `test-result.json`; they must agree. `TEST_PASS` proceeds to browser verification or retrospective. `TEST_NEEDS_FIXES` preserves the known correction or delta-review requirement and stops truthfully. `TEST_BLOCKED` preserves its blocker and records `WORKFLOW_BLOCKED`. Do not require a manifest/attestation package, reinterpret the testing result as a runtime crash, or recreate the skill's internal loops.
|
|
169
169
|
|
|
170
|
-
Only
|
|
170
|
+
Only `TEST_PASS` may proceed to browser verification or commit.
|
|
171
171
|
|
|
172
172
|
---
|
|
173
173
|
|
|
@@ -187,7 +187,7 @@ Record tool choice, URL, steps, screenshot path if available, result, and cleanu
|
|
|
187
187
|
|
|
188
188
|
### Headless Commit Authorization
|
|
189
189
|
|
|
190
|
-
This pipeline launch authorizes one local task commit only after
|
|
190
|
+
This pipeline launch authorizes one local task commit only after Code Review, a consistent `TEST_PASS` report/result pair, and required behavior-preservation gates pass. Never ask a question, wait for input, or request confirmation. Invoke `/prizmkit-committer` with `mode=l4-headless`, `owner=prizmkit-l4`, and `local_commit_authorized=true`. The runtime controls any optional remote publication after the local commit; do not make a publication decision in this session.
|
|
191
191
|
|
|
192
192
|
Run `/prizmkit-retrospective` using the current working tree and staged changes as input context. Do not rely only on `git diff --cached`.
|
|
193
193
|
|
|
@@ -266,7 +266,7 @@ Before exiting, write `{{SESSION_STATUS_PATH}}`:
|
|
|
266
266
|
|
|
267
267
|
## Reminders
|
|
268
268
|
|
|
269
|
-
- Use
|
|
269
|
+
- Use the atomic 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
271
|
- On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path
|
|
272
272
|
- Behavior preservation is the first priority.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
### Phase 4: Commit & Learn
|
|
2
2
|
|
|
3
|
-
This phase follows successful automated, manual, or hybrid verification and runs only after
|
|
3
|
+
This phase follows successful automated, manual, or hybrid verification and runs only after a valid `TEST_PASS` report/result pair permits commit.
|
|
4
4
|
|
|
5
5
|
**Bug Fix Documentation Policy**:
|
|
6
6
|
- Default: run `/prizmkit-retrospective` with structural sync only.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Goal**: prove or strongly establish the root cause before editing code.
|
|
4
4
|
|
|
5
|
-
1. Read `.prizmkit/prizm-docs/root.prizm`, then only the relevant
|
|
5
|
+
1. Read `.prizmkit/prizm-docs/root.prizm`, then only the relevant module indexes and detail docs for affected modules.
|
|
6
6
|
2. Trace from the error source to the likely root cause:
|
|
7
7
|
- classify error type;
|
|
8
8
|
- inspect relevant TRAPS/RULES;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`verification_type` is `{{VERIFICATION_TYPE}}`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The pipeline session is always headless and must complete manual/hybrid verification automatically. Do not ask for a user, wait for UAT, or stop as `partial`.
|
|
6
6
|
|
|
7
7
|
1. Select the available non-interactive verification path: browser tooling, CLI/API checks, fixtures, project test commands, or another deterministic local check.
|
|
8
8
|
2. Cover the reported behavior and acceptance criteria; for browser-visible behavior, capture both the original reproduction and post-fix result when the configured tooling is available.
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
### Bugfix Test Gate — PrizmKit Test
|
|
2
2
|
|
|
3
|
-
After Main-Agent
|
|
3
|
+
After Main-Agent Code Review returns `PASS`, run the mandatory test stage against the same Bugfix artifact root:
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
6
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Consume the sibling terminal artifacts:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- `.prizmkit/bugfix/{{BUG_ID}}/test-report.md`
|
|
12
|
+
- `.prizmkit/bugfix/{{BUG_ID}}/test-result.json`
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
- `TEST_FAIL` with `repair_scope=test-infrastructure`: return to `/prizmkit-implement`, then return directly to this test gate; do not make speculative production edits.
|
|
15
|
-
- `TEST_FAIL` with `repair_scope=production|runtime|schema|dependency|public-interface`: return to implementation, obtain a fresh code-review result, then return to this test gate.
|
|
16
|
-
- `TEST_FAIL` with an unknown or missing `repair_scope`: record `WORKFLOW_BLOCKED` and leave a safe checkpoint at the test stage; do not guess a production edit.
|
|
17
|
-
- `TEST_BLOCKED`: preserve all evidence and artifacts, perform only bounded automatic environment recovery, then terminate as `WORKFLOW_BLOCKED` with `blocked_reason=test_blocked`. Never edit production speculatively and never ask the user.
|
|
14
|
+
They must agree on the testing result and unresolved items. Do not require an evidence package, manifest, hashes, attestation, or test-internal checkpoint.
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
Gate outcomes:
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
- `TEST_PASS`: mark the test checkpoint step completed and continue to retrospective.
|
|
19
|
+
- `TEST_NEEDS_FIXES`: preserve the report/result and stop truthfully. A high-risk production repair reports `review_required=true` and `review_scope=delta`; the caller owns any review-and-retest route.
|
|
20
|
+
- `TEST_BLOCKED`: preserve the report/result and blocker, then record terminal `WORKFLOW_BLOCKED`. Do not reinterpret the result as a runtime crash or make speculative production edits.
|
|
21
|
+
|
|
22
|
+
The skill itself diagnoses and repairs valid execution failures for at most three rounds before returning. The caller must not recreate that repair loop or maintain test-internal state.
|
|
23
|
+
|
|
24
|
+
**Checkpoint update**: Only `TEST_PASS` plus `test-report.md` and `test-result.json` completes `prizmkit-test` and allows retrospective.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Reminders
|
|
2
2
|
|
|
3
|
-
- Use
|
|
3
|
+
- Use the atomic skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-retrospective`, `/prizmkit-committer`.
|
|
4
4
|
- All bugfix skills use `artifact_dir=.prizmkit/bugfix/{{BUG_ID}}/`.
|
|
5
5
|
- The first plan task must prove the bug with a reproduction test when feasible.
|
|
6
6
|
- Commit with `fix(<scope>):`, not `feat:`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Workflow Checkpoint System
|
|
2
2
|
|
|
3
|
-
A checkpoint file tracks this task family's
|
|
3
|
+
A checkpoint file tracks this task family's pipeline execution. It is not a skill result or a replacement for skill-owned reports.
|
|
4
4
|
|
|
5
5
|
**Path**: `{{CHECKPOINT_PATH}}`
|
|
6
6
|
|
|
@@ -13,20 +13,25 @@ Use this helper to update checkpoint status. Do not hand-edit `workflow-checkpoi
|
|
|
13
13
|
--checkpoint-path {{CHECKPOINT_PATH}} \
|
|
14
14
|
--step <step-id-or-skill-name> \
|
|
15
15
|
--status <in_progress|completed|failed|skipped> \
|
|
16
|
+
--stage-result <optional-domain-result> \
|
|
16
17
|
--note "<optional note>"
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
- Use the step `skill` value such as `prizmkit-implement`, or the step id such as `S04`.
|
|
21
|
+
- Omit `--stage-result` for stages without a domain result.
|
|
22
|
+
- Complete `prizmkit-code-review` only with `--status completed --stage-result REVIEW_PASS`.
|
|
23
|
+
- Complete `prizmkit-test` only after validating the sibling report/result pair, with `--status completed --stage-result TEST_PASS`.
|
|
24
|
+
- For `TEST_NEEDS_FIXES` or `TEST_BLOCKED`, use `--status failed --stage-result <result>` and preserve its report/result and blocker; never mark the test step completed.
|
|
20
25
|
- Omit `--note` when there is no useful failure or handoff note.
|
|
21
26
|
|
|
22
27
|
### Rules
|
|
23
28
|
|
|
24
|
-
1. Before each skill,
|
|
25
|
-
2. Starting a skill marks its step `in_progress`;
|
|
26
|
-
3.
|
|
27
|
-
4.
|
|
28
|
-
5. Preserve all
|
|
29
|
-
6.
|
|
30
|
-
7.
|
|
31
|
-
8. `WORKFLOW_COMPLETED` is valid only when the expected family
|
|
29
|
+
1. Before each skill, verify its predecessor is `completed` or `skipped`.
|
|
30
|
+
2. Starting a skill marks its step `in_progress`; a valid success marks it `completed`; a non-pass records its truthful `stage_result` and leaves later stages incomplete.
|
|
31
|
+
3. Pipeline metadata owns only `current_stage`, `next_stage`, `stage_result`, `repair_scope`, `repair_round`, `blocked_reason`, and `terminal_status`.
|
|
32
|
+
4. Skills own their reports and terminal results. The pipeline must not duplicate a skill's internal state machine or require evidence manifests, hashes, or attestations.
|
|
33
|
+
5. Preserve all reports and session artifacts on recovery. Never replace skill artifacts with the pipeline checkpoint or merge their schemas.
|
|
34
|
+
6. `TEST_NEEDS_FIXES` is a known testing-domain non-pass. `TEST_BLOCKED` records terminal `WORKFLOW_BLOCKED` with a deterministic reason. Neither is an AI CLI crash.
|
|
35
|
+
7. Any cross-stage continuation or retry policy belongs to the pipeline and must remain separate from the test skill's internal review and repair budgets.
|
|
36
|
+
8. `WORKFLOW_COMPLETED` is valid only when the expected family sequence is complete, Code Review records `REVIEW_PASS`, the test stage records `TEST_PASS`, and every declared artifact exists.
|
|
32
37
|
9. On session exit, leave the checkpoint at the truthful stage. Do not mark future steps completed.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This pipeline session is non-interactive. Do not ask questions, wait for user input, or request commit confirmation.
|
|
4
4
|
|
|
5
|
-
The pipeline launch has already authorized local commits for this task. Invoke `/prizmkit-committer` with the
|
|
5
|
+
The pipeline launch has already authorized local commits for this task. Invoke `/prizmkit-committer` with the pipeline-managed execution context:
|
|
6
6
|
|
|
7
7
|
```json
|
|
8
8
|
{
|
|
@@ -15,7 +15,7 @@ git log --oneline
|
|
|
15
15
|
**b.** Run `/prizmkit-retrospective` (**before commit**, maintains `.prizmkit/prizm-docs/` architecture index):
|
|
16
16
|
1. **Structural sync**: update KEY_FILES/INTERFACES/DEPENDENCIES/file counts for changed modules
|
|
17
17
|
2. **Architecture knowledge**: extract TRAPS, RULES, DECISIONS from completed work into `.prizmkit/prizm-docs/`
|
|
18
|
-
3. **
|
|
18
|
+
3. **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.
|
|
19
19
|
4. Stage doc changes: `git add .prizmkit/prizm-docs/`
|
|
20
20
|
⚠️ Do NOT commit here. Only stage.
|
|
21
21
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
**a.** Run `/prizmkit-retrospective` — maintains `.prizmkit/prizm-docs/` (architecture index):
|
|
4
4
|
1. **Structural sync**: Use `git diff --cached --name-status` to locate changed modules, update KEY_FILES/INTERFACES/DEPENDENCIES/file counts in affected `.prizmkit/prizm-docs/` files
|
|
5
5
|
2. **Architecture knowledge** (feature sessions only): Extract TRAPS/RULES/DECISIONS from completed work into `.prizmkit/prizm-docs/`
|
|
6
|
-
3. **
|
|
6
|
+
3. **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.
|
|
7
7
|
4. Stage doc changes: `git add .prizmkit/prizm-docs/`
|
|
8
8
|
⚠️ Do NOT commit here. Only stage.
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from
|
|
1
|
+
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from the loaded Prizm docs. Do NOT copy complete documentation files — the orchestrator already loaded them.
|
|
2
2
|
- **Section 4 — File Manifest**: For each file, list: path, why needed, and a **key-content summary** so you do NOT need to re-read the file. Format depends on file type:
|
|
3
3
|
- **Code files** (JS/TS/Python/Go): function signatures. Example: `config` (Zod object), `loadConfig(path)→Config`.
|
|
4
4
|
- **Shell scripts** (`.sh`): command-line args, key behavior branches, sourced libs, critical line ranges. Example: `args: --feature-id; sources lib/common.sh; lines 120-180 worktree logic`.
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
| `package.json` | Test cmd+deps | scripts:{test:vitest}, deps:{vitest} |
|
|
20
20
|
|
|
21
21
|
### Known TRAPS (from .prizmkit/prizm-docs/)
|
|
22
|
-
- <trap entries extracted from
|
|
22
|
+
- <trap entries extracted from the loaded Prizm docs>
|
|
23
23
|
|
|
24
24
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
If MISSING — build it now:
|
|
8
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant
|
|
8
|
+
1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs
|
|
9
9
|
2. Read source files listed in the feature's scope (use prizm-docs KEY_FILES for guidance)
|
|
10
10
|
3. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
11
11
|
- **Section 1 — Feature Brief**: 2-3 line feature description from Task Contract
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from
|
|
1
|
+
- **Section 3 — Key TRAPS & RULES**: extract only relevant TRAPS/RULES from the loaded Prizm docs that apply to files in this scope. Do NOT copy complete documentation files.
|
|
2
2
|
- **Section 4 — File Manifest**: For each relevant file, list path, why needed, key interface signatures. Use table format:
|
|
3
3
|
|
|
4
4
|
### Files to Modify
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
- If implementation is delegated to a subagent, the subagent must read `plan.md` and `context-snapshot.md` before editing
|
|
12
12
|
- Uses context from `context-snapshot.md` (Prizm docs, TRAPS, file manifest) for targeted source reads; avoid re-reading source files already summarized there unless they changed after the snapshot
|
|
13
13
|
- Implements task-by-task, marking each `[x]` immediately
|
|
14
|
-
- Creates/updates
|
|
14
|
+
- Creates/updates detail `.prizm` docs when creating new modules or significantly modifying existing ones — AI selectively decides which modules warrant detail documentation based on complexity and importance
|
|
15
15
|
- Does not run the scoped/full test gate; testing happens after code review in the PrizmKit Test phase
|
|
16
16
|
- Writes '## Implementation Log' to `context-snapshot.md`
|
|
17
17
|
|
|
@@ -1,42 +1,30 @@
|
|
|
1
1
|
### Scoped Feature Test Gate — PrizmKit Test
|
|
2
2
|
|
|
3
|
-
**Goal**: After Code Review completes,
|
|
3
|
+
**Goal**: After Code Review completes, use `/prizmkit-test` to analyze the complete affected business module and Regression Ring, add project-native tests, repair valid failures within the skill's bounded loop, and produce the terminal report/result pair.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
{{RUNTIME_HELPER_CMD}} artifact ensure-dir .prizmkit/specs/{{FEATURE_SLUG}}
|
|
9
|
-
{{RUNTIME_HELPER_CMD}} artifact touch .prizmkit/specs/{{FEATURE_SLUG}}/.prizmkit-test-started
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Run `/prizmkit-test` with the Feature artifact directory. This gate is Feature-only: never substitute `.prizmkit/bugfix/` or `.prizmkit/refactor/` artifact roots.
|
|
5
|
+
Run the skill with the current Feature artifact directory:
|
|
13
6
|
|
|
14
7
|
```text
|
|
15
8
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/
|
|
16
9
|
```
|
|
17
10
|
|
|
18
|
-
##
|
|
11
|
+
## Testing Result Gate
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Consume these sibling terminal artifacts:
|
|
21
14
|
|
|
22
|
-
- `.prizmkit/test
|
|
23
|
-
- `.prizmkit/test
|
|
24
|
-
- `.prizmkit/test/evidence/<evidence-id>/validation.json`
|
|
15
|
+
- `.prizmkit/specs/{{FEATURE_SLUG}}/test-report.md`
|
|
16
|
+
- `.prizmkit/specs/{{FEATURE_SLUG}}/test-result.json`
|
|
25
17
|
|
|
26
|
-
|
|
18
|
+
The JSON is the minimal terminal result projection and the report contains semantic coverage, native execution, Main-Agent review, optional independent Test Reviewer, and repair details. They must agree. Do not require an evidence package, manifest, hashes, attestation, package lifecycle, or test-internal checkpoint.
|
|
27
19
|
|
|
28
|
-
##
|
|
20
|
+
## Caller Routing
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
The caller checkpoint records only the returned testing result and caller-owned routing state. It must not ask the skill to manage sessions or checkpoints.
|
|
31
23
|
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
35
|
-
- `TEST_FAIL` with unknown or unsafe scope → do not guess a production edit; record `WORKFLOW_BLOCKED` and a safe resume entry.
|
|
36
|
-
- `TEST_BLOCKED` → preserve all evidence and artifacts, perform only bounded environment recovery, then finish terminal `WORKFLOW_BLOCKED` with `blocked_reason=test_blocked`; never edit production speculatively. When a finalized blocked package exists, pass its validated `manifest`, `verdict`, and `validation` paths to the checkpoint; do not leave these paths null.
|
|
37
|
-
- The builder's evidence-protocol recovery budget is separate from the outer `repair_round`: after bounded preflight/package attempts, stop creating evidence versions and return `TEST_BLOCKED`.
|
|
38
|
-
- The outer `repair_round` is shared across review/test failures and may not exceed three. The Code Review internal loop limit remains separate and is at most ten completed rounds.
|
|
24
|
+
- `TEST_PASS` → mark `prizmkit-test` completed and continue to retrospective.
|
|
25
|
+
- `TEST_NEEDS_FIXES` → stop the current caller path truthfully. If `review_required=true` and `review_scope=delta`, a caller may route the repaired delta through Code Review before invoking test again. Any continuation policy is caller-owned, not part of the test skill.
|
|
26
|
+
- `TEST_BLOCKED` → preserve the report, result, and blocker; record terminal `WORKFLOW_BLOCKED`. Do not reinterpret it as an AI CLI crash or perform speculative production edits.
|
|
39
27
|
|
|
40
|
-
A
|
|
28
|
+
A test execution failure inside the skill is not automatically terminal: `/prizmkit-test` owns up to three direct diagnosis-and-repair rounds. The caller handles only the terminal result returned after that loop.
|
|
41
29
|
|
|
42
|
-
**CP-4**:
|
|
30
|
+
**CP-4**: `TEST_PASS` plus the required `test-report.md` and `test-result.json` completes the test step. `TEST_NEEDS_FIXES` and `TEST_BLOCKED` are truthful non-pass testing results and cannot complete later stages.
|
|
@@ -20,7 +20,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
20
20
|
|
|
21
21
|
**Step A — Build Context Snapshot** (skip if `context-snapshot.md` already exists):
|
|
22
22
|
|
|
23
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant
|
|
23
|
+
1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs
|
|
24
24
|
2. Detect source code directories from KEY_FILES and STRUCTURE sections in `root.prizm`; if root docs are unavailable, use the helper to list likely source files:
|
|
25
25
|
```bash
|
|
26
26
|
{{RUNTIME_HELPER_CMD}} artifact source-files . --json
|
|
@@ -30,7 +30,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
30
30
|
4. Write `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`:
|
|
31
31
|
- **Section 1 — Feature Brief**: feature description (copy from Task Contract above, 2-3 lines only)
|
|
32
32
|
- **Section 2 — Verification Gates**: copy the gate checklist from the Task Contract above
|
|
33
|
-
- **Section 3 — Key TRAPS & RULES**: extract TRAPS and RULES entries from loaded
|
|
33
|
+
- **Section 3 — Key TRAPS & RULES**: extract TRAPS and RULES entries from the loaded Prizm docs that apply to files in this feature's scope. Do NOT copy complete documentation files — include only the specific TRAPS/RULES lines relevant to the files listed in Section 4.
|
|
34
34
|
- **Section 4 — File Manifest**: For each file relevant to this feature, list path, why needed (modify/reference/test), key interface signatures. Do NOT include full file content. Format:
|
|
35
35
|
### Files to Modify
|
|
36
36
|
| File | Why Needed | Key Interfaces |
|
|
@@ -43,7 +43,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
|
|
|
43
43
|
| `<source-dir>/security/permission-guard.js` | Permission check integration | `checkCommandPermission(userId, cmd)` |
|
|
44
44
|
|
|
45
45
|
### Known TRAPS (from .prizmkit/prizm-docs/)
|
|
46
|
-
- <trap entries extracted from
|
|
46
|
+
- <trap entries extracted from the loaded Prizm docs>
|
|
47
47
|
5. Confirm: `{{RUNTIME_HELPER_CMD}} artifact exists .prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md`
|
|
48
48
|
|
|
49
49
|
**After Step A**: Use context-snapshot.md Section 4 File Manifest to guide targeted file reads. Do NOT scan directories or read unrelated files.
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
### Refactor Test Gate — PrizmKit Test
|
|
2
2
|
|
|
3
|
-
After Main-Agent
|
|
3
|
+
After Main-Agent Code Review returns `PASS`, run the mandatory test stage against the same Refactor artifact root. Existing behavior-preservation context is input to testing; the final current-state native executions remain required.
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
6
|
/prizmkit-test scope=this-change artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Consume the sibling terminal artifacts:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- `.prizmkit/refactor/{{REFACTOR_ID}}/test-report.md`
|
|
12
|
+
- `.prizmkit/refactor/{{REFACTOR_ID}}/test-result.json`
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
- `TEST_FAIL` with `repair_scope=test-infrastructure`: return to `/prizmkit-implement`, preserve the behavior baseline, then return directly to this test gate; do not make speculative production edits.
|
|
15
|
-
- `TEST_FAIL` with `repair_scope=production|runtime|schema|dependency|public-interface`: return to implementation, obtain a fresh code-review result, then return to this test gate.
|
|
16
|
-
- `TEST_FAIL` with an unknown or missing `repair_scope`: record `WORKFLOW_BLOCKED` and leave a safe checkpoint at the test stage; do not guess a production edit.
|
|
17
|
-
- `TEST_BLOCKED`: preserve all evidence and artifacts, perform only bounded automatic environment recovery, then terminate as `WORKFLOW_BLOCKED` with `blocked_reason=test_blocked`. Never edit production speculatively and never ask the user.
|
|
14
|
+
They must agree on the testing result and unresolved items. Do not require an evidence package, manifest, hashes, attestation, or test-internal checkpoint.
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
Gate outcomes:
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
- `TEST_PASS`: verify required behavior-preservation coverage is included, mark the test step completed, and continue to retrospective.
|
|
19
|
+
- `TEST_NEEDS_FIXES`: preserve the report/result and stop truthfully. A high-risk production repair reports `review_required=true` and `review_scope=delta`; the caller owns any review-and-retest route.
|
|
20
|
+
- `TEST_BLOCKED`: preserve the report/result and blocker, then record terminal `WORKFLOW_BLOCKED`. Do not reinterpret the result as a runtime crash or make speculative production edits.
|
|
21
|
+
|
|
22
|
+
The skill itself diagnoses and repairs valid execution failures for at most three rounds before returning. The caller must not recreate that repair loop or maintain test-internal state.
|
|
23
|
+
|
|
24
|
+
**Checkpoint update**: Only `TEST_PASS` plus `test-report.md` and `test-result.json` completes `prizmkit-test` and allows retrospective.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Reminders
|
|
2
2
|
|
|
3
|
-
- Use
|
|
3
|
+
- Use the atomic skills: `/prizmkit-plan`, `/prizmkit-implement`, `/prizmkit-code-review`, `/prizmkit-retrospective`, `/prizmkit-committer`.
|
|
4
4
|
- All refactor skills use `artifact_dir=.prizmkit/refactor/{{REFACTOR_ID}}/`.
|
|
5
5
|
- Behavior preservation is the first priority.
|
|
6
6
|
- Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries
|