prizmkit 1.1.140 → 1.1.142
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/README.md +1 -1
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +165 -125
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +13 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -6
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +5 -3
- package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +160 -0
- package/bundled/dev-pipeline/scripts/check-session-status.py +11 -1
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +23 -806
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +6 -8
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +1 -1
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +6 -8
- package/bundled/dev-pipeline/scripts/prompt_framework.py +68 -56
- package/bundled/dev-pipeline/scripts/update-bug-status.py +21 -2
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +52 -131
- package/bundled/dev-pipeline/scripts/update-feature-status.py +21 -2
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +21 -2
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +8 -19
- 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-review.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 +18 -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-review-full.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +1 -1
- 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/templates/session-status-schema.json +1 -1
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +494 -413
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +144 -684
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +20 -41
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +24 -24
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +176 -36
- package/bundled/skills/_metadata.json +6 -6
- package/bundled/skills/prizmkit/SKILL.md +13 -18
- package/bundled/skills/prizmkit/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-code-review/SKILL.md +7 -7
- package/bundled/skills/prizmkit-code-review/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-committer/SKILL.md +8 -7
- package/bundled/skills/prizmkit-committer/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-implement/SKILL.md +3 -2
- package/bundled/skills/prizmkit-implement/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-plan/SKILL.md +2 -1
- package/bundled/skills/prizmkit-plan/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-retrospective/SKILL.md +8 -6
- package/bundled/skills/prizmkit-retrospective/references/workflow-state-protocol.md +73 -80
- package/bundled/skills/prizmkit-test/SKILL.md +217 -189
- 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 +28 -36
- package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +73 -80
- package/package.json +1 -1
- package/bundled/skills/prizmkit-test/assets/authoritative-records.schema.json +0 -477
- 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 -107
- package/bundled/skills/prizmkit-test/references/workflow-state-protocol.md +0 -181
- package/bundled/skills/prizmkit-test/scripts/build_test_evidence.py +0 -1930
- package/bundled/skills/prizmkit-test/scripts/validate_test_evidence.py +0 -1847
|
@@ -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.
|
|
@@ -16,4 +16,4 @@ Missing required evidence, an unsafe repair, a failed verification, or failure t
|
|
|
16
16
|
- `REVIEW_NEEDS_FIXES` → route through bounded implementation/review/test repair; do not commit.
|
|
17
17
|
- `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect progress once, write `failure-log.md`, and stop. Do not accept old or incidental verdict text and do not synthesize a passing result outside the skill.
|
|
18
18
|
|
|
19
|
-
**Checkpoint update**: Set step `prizmkit-code-review` to `completed` with `stage_result=REVIEW_PASS` only for an accepted valid Final Result.
|
|
19
|
+
**Checkpoint update**: Set step `prizmkit-code-review` to `completed` with `stage_result=REVIEW_PASS` only for an accepted valid Final Result. Set it to `failed` with `stage_result=REVIEW_NEEDS_FIXES` when the review returns known unresolved findings.
|
|
@@ -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,29 @@ 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-plan` with `--status completed --stage-result PLAN_READY`.
|
|
23
|
+
- Complete `prizmkit-implement` with `--status completed --stage-result IMPLEMENTED`.
|
|
24
|
+
- Complete `prizmkit-code-review` only with `--status completed --stage-result REVIEW_PASS`.
|
|
25
|
+
- Complete `prizmkit-test` only after validating the sibling report/result pair, with `--status completed --stage-result TEST_PASS`.
|
|
26
|
+
- Complete `prizmkit-retrospective` with `--status completed --stage-result RETRO_COMPLETE`.
|
|
27
|
+
- Record commit authorization wait with `--status in_progress --stage-result COMMIT_PENDING`; after the local commit, use `--status completed --stage-result COMMITTED`.
|
|
28
|
+
- 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
29
|
- Omit `--note` when there is no useful failure or handoff note.
|
|
21
30
|
|
|
22
31
|
### Rules
|
|
23
32
|
|
|
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
|
|
33
|
+
1. Before each skill, verify its predecessor is `completed` or `skipped`.
|
|
34
|
+
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.
|
|
35
|
+
3. Pipeline metadata owns only `current_stage`, `next_stage`, `stage_result`, `repair_scope`, `repair_round`, `blocked_reason`, and `terminal_status`; lifecycle `status` belongs to each checkpoint step.
|
|
36
|
+
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.
|
|
37
|
+
5. Preserve all reports and session artifacts on recovery. Never replace skill artifacts with the pipeline checkpoint or merge their schemas.
|
|
38
|
+
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.
|
|
39
|
+
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.
|
|
40
|
+
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
41
|
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.
|
|
@@ -4,8 +4,8 @@ Review the completed implementation before the full Feature test gate runs. A re
|
|
|
4
4
|
|
|
5
5
|
Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/` so `/prizmkit-code-review` can read the spec, plan, context snapshot, implementation log, and current diff. Follow the skill's current review contract for review execution, repairs, verification, evidence, and handoff. Do not invoke another review skill or add a second review path outside that contract.
|
|
6
6
|
|
|
7
|
-
- `REVIEW_PASS` → update checkpoint metadata with `stage=code-review`, `status=
|
|
8
|
-
- `REVIEW_NEEDS_FIXES` → preserve findings, increment the shared outer `repair_round`, route `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`, and do not accept any test result from before the repaired review.
|
|
7
|
+
- `REVIEW_PASS` → update checkpoint metadata with `stage=code-review`, `status=completed`, `stage_result=REVIEW_PASS`, `next_stage=prizmkit-test`, and `resume_from=prizmkit-test`; then run the full test gate.
|
|
8
|
+
- `REVIEW_NEEDS_FIXES` → update the review step with `status=failed` and `stage_result=REVIEW_NEEDS_FIXES`, preserve findings, increment the shared outer `repair_round`, route `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`, and do not accept any test result from before the repaired review.
|
|
9
9
|
- If the outer repair round is already three, record `WORKFLOW_BLOCKED`; do not start another repair route.
|
|
10
10
|
|
|
11
11
|
Missing required evidence, unsafe repair, failed verification, or failure to converge under the review contract produces `REVIEW_NEEDS_FIXES`.
|
|
@@ -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.
|
|
@@ -16,4 +16,4 @@ Missing required evidence, an unsafe repair, a failed verification, or failure t
|
|
|
16
16
|
|
|
17
17
|
Verify directly that the review checks behavior preservation, public API compatibility, imports, tests, and rollback assumptions.
|
|
18
18
|
|
|
19
|
-
**Checkpoint update**: Set step `prizmkit-code-review` to `completed` with `stage_result=REVIEW_PASS` only for an accepted valid Final Result. Do not complete the checkpoint for incomplete or invalid reports.
|
|
19
|
+
**Checkpoint update**: Set step `prizmkit-code-review` to `completed` with `stage_result=REVIEW_PASS` only for an accepted valid Final Result. Set it to `failed` with `stage_result=REVIEW_NEEDS_FIXES` when the review returns known unresolved findings. Do not complete the checkpoint for incomplete or invalid reports.
|
|
@@ -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
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"status": {
|
|
17
17
|
"type": "string",
|
|
18
|
-
"enum": ["success", "partial", "failed", "commit_missing", "docs_missing", "merge_conflict", "context_overflow"]
|
|
18
|
+
"enum": ["success", "partial", "failed", "crashed", "timed_out", "infra_error", "commit_missing", "docs_missing", "merge_conflict", "context_overflow", "stalled_context_continuation", "workflow_blocked", "workflow_skipped"]
|
|
19
19
|
},
|
|
20
20
|
"completed_phases": {
|
|
21
21
|
"type": "array",
|