prizmkit 1.1.113 → 1.1.115
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/.env.example +0 -1
- package/bundled/dev-pipeline/README.md +4 -6
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +40 -518
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +27 -99
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +283 -0
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +3 -13
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +25 -31
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -8
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +13 -7
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +13 -1
- package/bundled/dev-pipeline/scripts/continuation.py +8 -40
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +76 -261
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +16 -35
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -34
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +6 -0
- package/bundled/dev-pipeline/scripts/init-pipeline.py +6 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +6 -0
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
- package/bundled/dev-pipeline/scripts/prompt_framework.py +114 -63
- package/bundled/dev-pipeline/scripts/update-bug-status.py +3 -7
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +54 -22
- package/bundled/dev-pipeline/scripts/update-feature-status.py +3 -7
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +3 -7
- package/bundled/dev-pipeline/scripts/utils.py +14 -40
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +9 -91
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -66
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +10 -16
- package/bundled/dev-pipeline/templates/feature-list-schema.json +32 -17
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -16
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -16
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +1 -1
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +1 -1
- package/bundled/dev-pipeline/tests/conftest.py +1 -0
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +164 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +48 -76
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +25 -3
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +25 -5
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +128 -10
- package/bundled/dev-pipeline/tests/test_runtime_helper.py +23 -0
- package/bundled/dev-pipeline/tests/test_unified_cli.py +40 -9
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +18 -2
- package/bundled/skills/app-planner/references/generated-plan-review.md +67 -0
- package/bundled/skills/bug-planner/SKILL.md +24 -28
- package/bundled/skills/bug-planner/references/generated-plan-review.md +63 -0
- package/bundled/skills/bug-planner/references/verification.md +29 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +8 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +2 -2
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +1 -6
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +6 -12
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +0 -1
- package/bundled/skills/feature-planner/SKILL.md +30 -34
- package/bundled/skills/feature-planner/assets/planning-guide.md +2 -2
- package/bundled/skills/feature-planner/references/generated-plan-review.md +63 -0
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +8 -11
- package/bundled/skills/prizmkit-init/SKILL.md +2 -2
- package/bundled/skills/prizmkit-plan/SKILL.md +15 -1
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +101 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +1 -1
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +5 -5
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +2 -7
- package/bundled/skills/refactor-planner/SKILL.md +30 -34
- package/bundled/skills/refactor-planner/references/fast-path.md +2 -2
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +63 -0
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +9 -0
- package/bundled/team/prizm-dev-team.json +2 -9
- package/package.json +1 -1
- package/src/clean.js +60 -7
- package/src/config.js +61 -20
- package/src/gitignore-template.js +6 -3
- package/src/manifest.js +6 -2
- package/src/platforms.js +14 -0
- package/src/scaffold.js +198 -34
- package/src/upgrade.js +5 -2
- package/bundled/agents/prizm-dev-team-critic.md +0 -179
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +0 -8
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +0 -22
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +0 -61
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +0 -38
- package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +0 -22
- package/bundled/skills/bug-planner/references/critic-and-verification.md +0 -44
|
@@ -106,7 +106,7 @@ Trigger conditions are covered by the frontmatter `description`. Do NOT use this
|
|
|
106
106
|
8. **Browser interaction**: If present, may include `tool` and `verify_steps`; planner should add concrete `verify_steps` when known, but the schema permits an empty object for AI runtime exploration.
|
|
107
107
|
9. **Complexity enum**: If present, is one of: low, medium, high, critical
|
|
108
108
|
10. **Model field**: If present, is a non-empty string
|
|
109
|
-
11. **
|
|
109
|
+
11. **Retired fields**: `critic` and `critic_count` must not appear; validation fails if either field is present
|
|
110
110
|
12. **Root schema**: Has $schema='dev-pipeline-feature-list-v1', project_name, and non-empty features array
|
|
111
111
|
|
|
112
112
|
5. **Use script output as source of truth** — if validation fails, fix and re-run until pass
|
|
@@ -184,7 +184,7 @@ Assign `estimated_complexity` from concrete scope indicators, not from perceived
|
|
|
184
184
|
- acceptance-criteria count and edge-case breadth
|
|
185
185
|
- test coverage and verification difficulty
|
|
186
186
|
|
|
187
|
-
Use `low` for focused changes in 1 module with <=5 acceptance criteria and no public API/schema changes. Use `medium` for normal multi-file or 2-3 module work with bounded interfaces. Use `high` only when multiple concrete high indicators are present, such as 3+ modules plus public API changes, deep dependencies, weak tests, or substantial architectural risk. Use `critical` only for system-wide architectural/infrastructure changes or safety-critical work requiring
|
|
187
|
+
Use `low` for focused changes in 1 module with <=5 acceptance criteria and no public API/schema changes. Use `medium` for normal multi-file or 2-3 module work with bounded interfaces. Use `high` only when multiple concrete high indicators are present, such as 3+ modules plus public API changes, deep dependencies, weak tests, or substantial architectural risk. Use `critical` only for system-wide architectural/infrastructure changes or safety-critical work requiring the strongest orchestrator/reviewer/test guardrails.
|
|
188
188
|
|
|
189
189
|
### Required Planning Review Summary
|
|
190
190
|
|
|
@@ -253,8 +253,8 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
|
|
|
253
253
|
7. Build or append `.prizmkit/plans/feature-list.json`
|
|
254
254
|
8. Apply default testing strategy (see §Testing Defaults below)
|
|
255
255
|
9. Validate and fix until pass
|
|
256
|
-
10. Run the mandatory
|
|
257
|
-
11. Summarize final feature table with review result and validation outcome
|
|
256
|
+
10. Run the mandatory Local Generated-Plan Review Gate (see §Local Generated-Plan Review Gate below); apply accepted fixes to the draft/source plan, regenerate, and revalidate until pass
|
|
257
|
+
11. Summarize final feature table with local review result and validation outcome
|
|
258
258
|
|
|
259
259
|
### Checkpoints (Mandatory Gates)
|
|
260
260
|
|
|
@@ -266,11 +266,11 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
266
266
|
| **CP-FP-2** | Feature Proposals | Feature set with titles+deps identified (pre-validation) | 3-5 |
|
|
267
267
|
| **CP-FP-3** | DAG Validity | No cycles, dependencies resolved (validation dry-run) | 5 |
|
|
268
268
|
| **CP-FP-3.1** | Browser Interaction Applied | Qualifying features have `browser_interaction` field; user confirmed or opted out | 4 |
|
|
269
|
-
| **CP-FP-3.2** | Testing Defaults Applied | All features have appropriate
|
|
269
|
+
| **CP-FP-3.2** | Testing Defaults Applied | All features have appropriate testing expectations and no retired `critic`/`critic_count` fields | 7 |
|
|
270
270
|
| **CP-FP-3.3** | Completeness Review Passed | All features reviewed for description adequacy and cross-feature gaps | 6 |
|
|
271
271
|
| **CP-FP-4** | `.prizmkit/plans/feature-list.json` Generated | Schema validates, all required keys present | 7-8 |
|
|
272
272
|
| **CP-FP-5** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 9 |
|
|
273
|
-
| **CP-FP-6** | Plan Review Passed |
|
|
273
|
+
| **CP-FP-6** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed feature entries, applied accepted fixes through draft/source data, regenerated, and revalidated | 10 |
|
|
274
274
|
|
|
275
275
|
**Resume Detection**: If existing artifacts are found, read `${SKILL_DIR}/references/error-recovery.md` §Resume Support for checkpoint-based resumption.
|
|
276
276
|
|
|
@@ -320,7 +320,7 @@ For simple incremental planning, skip detailed Phase 2-3 analysis:
|
|
|
320
320
|
```bash
|
|
321
321
|
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
322
322
|
```
|
|
323
|
-
6. If valid → run the mandatory
|
|
323
|
+
6. If valid → run the mandatory Local Generated-Plan Review Gate, then summarize and recommend next step
|
|
324
324
|
7. If invalid → apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
325
325
|
|
|
326
326
|
## Browser Interaction Planning
|
|
@@ -357,13 +357,12 @@ Key requirements:
|
|
|
357
357
|
- `priority`: `"critical"`, `"high"`, `"medium"`, or `"low"` (string, NOT numeric)
|
|
358
358
|
- new items default `status: "pending"`
|
|
359
359
|
- English feature titles for stable slug generation
|
|
360
|
-
- `critic` / `critic_count` defaults per Testing Defaults section
|
|
361
360
|
- `browser_interaction` auto-generated for qualifying frontend features (with `tool` selection: `auto`/`playwright-cli`/`opencli`)
|
|
362
361
|
- descriptions: minimum 15 words (error), recommended minimum 30/50/80/100+ for low/medium/high/critical (warning). No upper limit — more detail prevents AI guessing
|
|
363
362
|
- `estimated_complexity` determines pipeline execution tier:
|
|
364
363
|
- `low` / `medium` → **lite** (single agent, no subagents)
|
|
365
|
-
- `high` → **standard** (orchestrator +
|
|
366
|
-
- `critical` → **full** (
|
|
364
|
+
- `high` → **standard** (orchestrator + reviewer guardrails, 3-agent metadata)
|
|
365
|
+
- `critical` → **full** (strongest orchestrator/reviewer guardrails). Use for: architectural changes touching 10+ files, cross-module refactoring with API surface changes, or safety/security/data-loss risk
|
|
367
366
|
|
|
368
367
|
**IMPORTANT: Do NOT hand-write the final JSON file.** Instead:
|
|
369
368
|
1. Write a draft JSON to a temporary path (e.g., `.prizmkit/plans/feature-list.draft.json`)
|
|
@@ -373,39 +372,36 @@ python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit
|
|
|
373
372
|
```
|
|
374
373
|
The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes. If validation fails, fix the draft and retry.
|
|
375
374
|
|
|
376
|
-
##
|
|
375
|
+
## Local Generated-Plan Review Gate
|
|
377
376
|
|
|
378
|
-
User requirement preserved verbatim:
|
|
377
|
+
User requirement preserved verbatim: `there is a litter bug for prizm-code-review will to check git diff in working space and staged space , however the .prizmkit will be gitignored in most situation. so do you think the content should be change to inline a new reference file instead of use prizmkit-code-review`
|
|
379
378
|
|
|
380
|
-
Run this gate **after** `.prizmkit/plans/feature-list.json` passes the validation/generate script and **before** the final handoff summary recommends `feature-pipeline-launcher`. This gate applies to full workflow and fast-path incremental planning.
|
|
379
|
+
Run this gate **after** `.prizmkit/plans/feature-list.json` passes the validation/generate script and **before** the final handoff summary recommends `feature-pipeline-launcher`. This gate applies to full workflow and fast-path incremental planning when the current session generated, appended, or rewrote final feature planning content. For validate-only, summary-only, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
381
380
|
|
|
382
|
-
1. **
|
|
383
|
-
2. **
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
- preservation of user-provided wording in `description`, `acceptance_criteria`, and `user_context`
|
|
389
|
-
- task-scoped `user_context` isolation: no unrelated sibling feature descriptions, file references, or supplementary materials, and shared context appears on multiple items only when explicitly global
|
|
390
|
-
- priority/complexity calibration: every reviewed feature has a short priority rationale and complexity rationale, medium/low assignments are allowed when criteria fit, and high/high is not used merely because work is framework-related, multi-file, or user-requested
|
|
391
|
-
3. **Keep the review planning-only**: do NOT start `feature-pipeline-launcher`, do NOT run the dev-pipeline, do NOT run tests/builds/installs, and do NOT implement source-code changes.
|
|
392
|
-
4. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/feature-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
381
|
+
1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for this planner-output review loop.
|
|
382
|
+
2. **Read actual planning artifacts directly**: inspect `.prizmkit/plans/feature-list.json`, `.prizmkit/plans/feature-list.draft.json` when present, and any pre-session or in-memory draft snapshot. Do not rely on `git status`, `git diff`, or `git diff --cached`, because `.prizmkit` planning artifacts are often gitignored or untracked.
|
|
383
|
+
3. **Identify review scope**: compare by stable feature IDs and item fields against the pre-session list when one existed. Ignore root generator metadata such as `$schema`, `created_at`, and `created_by`. Review only newly added or changed feature entries; preserve unchanged historical entries except when needed to verify dependency references.
|
|
384
|
+
4. **Run the local checklist** from the reference: schema compatibility, dependency/DAG soundness, description completeness, headless execution readiness, acceptance criteria measurability, user-provided wording preservation, task-scoped `user_context` isolation, priority/complexity calibration, and browser interaction fields when applicable.
|
|
385
|
+
5. **Keep the review planning-only**: do NOT start `feature-pipeline-launcher`, do NOT run the dev-pipeline, do NOT run tests/builds/installs, and do NOT implement source-code changes.
|
|
386
|
+
6. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/feature-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
393
387
|
```bash
|
|
394
388
|
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
395
389
|
```
|
|
396
390
|
Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
|
|
397
|
-
|
|
398
|
-
|
|
391
|
+
7. **Revalidate after every accepted fix batch**: the generate script must pass again before the planner can proceed. If validation fails, fix the draft and rerun until pass.
|
|
392
|
+
8. **Report the gate outcome** in the final summary: include local generated-plan review verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result.
|
|
399
393
|
|
|
400
394
|
## Testing Defaults (Phase 8)
|
|
401
395
|
|
|
402
|
-
Set default testing-related fields for each feature. The user can opt out.
|
|
396
|
+
Set default testing-related fields for each feature. The user can opt out of generated testing expectations, but do not generate retired review-agent configuration fields.
|
|
403
397
|
|
|
404
|
-
| Priority |
|
|
405
|
-
|
|
406
|
-
| high |
|
|
407
|
-
| medium |
|
|
408
|
-
| low |
|
|
398
|
+
| Priority | Testing expectation | Rationale |
|
|
399
|
+
|----------|---------------------|-----------|
|
|
400
|
+
| high | Require scoped tests and review-gate evidence | Higher-risk feature behavior needs stronger verification. |
|
|
401
|
+
| medium | Require focused tests for changed public behavior | Normal changes need meaningful boundary coverage. |
|
|
402
|
+
| low | Require the smallest relevant verification | Low-risk changes should stay lightweight. |
|
|
403
|
+
|
|
404
|
+
Never emit `critic` or `critic_count`; those fields are fully removed and the validator rejects them.
|
|
409
405
|
|
|
410
406
|
For frontend features with `browser_interaction`, browser verification is enabled by default. The `tool` field uses the user's choice from the mandatory browser tool question in Phase 4.2 (see §Browser Interaction Planning → Default Behavior).
|
|
411
407
|
|
|
@@ -445,11 +441,11 @@ When the session appears to be ending:
|
|
|
445
441
|
|
|
446
442
|
## Handoff Message Template
|
|
447
443
|
|
|
448
|
-
After successful validation and the
|
|
444
|
+
After successful validation and the Local Generated-Plan Review Gate, report:
|
|
449
445
|
1. Output file path
|
|
450
446
|
2. Total features + newly added features
|
|
451
447
|
3. Dependency and priority highlights
|
|
452
|
-
4.
|
|
448
|
+
4. Local generated-plan review result: verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result
|
|
453
449
|
5. Recommended next action: `feature-pipeline-launcher`
|
|
454
450
|
|
|
455
451
|
Then apply the post-planning handoff in §Scope Boundary (ask before proceeding; never auto-execute).
|
|
@@ -123,7 +123,7 @@ Complexity is an execution-scope estimate, not a priority or importance signal.
|
|
|
123
123
|
| low | 1 module/layer, 1-3 files, no public API/schema change, shallow dependencies, <=5 acceptance criteria, clear existing tests | 1-2 API endpoints, 1-2 pages, focused config or copy behavior | lite (1 agent) |
|
|
124
124
|
| medium | 2-3 modules/layers, 3-6 files, bounded API/interface changes, moderate dependency depth, 4-8 acceptance criteria, standard test updates | 3-5 API endpoints, 2-4 pages, normal integration work | lite (1 agent) |
|
|
125
125
|
| high | 3+ modules/layers plus public API/interface or schema impact, deep dependencies, weak test coverage, complex state, third-party integration risk, or 8+ acceptance criteria | 5+ API endpoints, complex interactions, cross-cutting behavior | standard (3 agents) |
|
|
126
|
-
| critical | System-wide architecture, new infrastructure, 10+ files with multi-module API surface changes, safety/security/data-loss risk requiring
|
|
126
|
+
| critical | System-wide architecture, new infrastructure, 10+ files with multi-module API surface changes, safety/security/data-loss risk requiring strongest review and test gates | System-wide refactoring, new infrastructure + app logic | full (5 agents + critic) |
|
|
127
127
|
|
|
128
128
|
### Complexity Indicator Checklist
|
|
129
129
|
|
|
@@ -152,7 +152,7 @@ Consider splitting a feature if it exhibits any of the following:
|
|
|
152
152
|
- If a feature is marked as `low` complexity, it should not have more than 5 acceptance criteria and should have no public API/schema changes.
|
|
153
153
|
- If a feature is marked as `medium` complexity, explain why the scope is bounded even if it touches multiple files.
|
|
154
154
|
- If a feature is marked as `high` complexity, it must have a clear concrete justification (e.g., "payment processing with webhook idempotency across API, persistence, and worker modules").
|
|
155
|
-
- Use `critical` complexity only for features requiring architectural changes that touch 10+ files, involve cross-module API surface changes, or need
|
|
155
|
+
- Use `critical` complexity only for features requiring architectural changes that touch 10+ files, involve cross-module API surface changes, or need stronger review and test gates for safety.
|
|
156
156
|
- When in doubt between two levels, choose the higher level only when the concrete scope indicators support it; do not use `high` as a safe default.
|
|
157
157
|
|
|
158
158
|
### Mixed Calibration Examples
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Generated Plan Review — Feature Planner
|
|
2
|
+
|
|
3
|
+
Use this local review loop after `.prizmkit/plans/feature-list.json` has been generated and validated. This is a planner-output review, not an implementation/code-diff review.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
|
|
7
|
+
Run only when the current `feature-planner` session generated, appended, or rewrote final feature planning content. For validate-only, summary-only, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
8
|
+
|
|
9
|
+
## Direct Artifact Reads
|
|
10
|
+
|
|
11
|
+
Planning artifacts may be gitignored, untracked, or absent from staged and unstaged diffs. Read the actual files directly:
|
|
12
|
+
|
|
13
|
+
- Final list: `.prizmkit/plans/feature-list.json`
|
|
14
|
+
- Draft/source list when present: `.prizmkit/plans/feature-list.draft.json`
|
|
15
|
+
- Pre-session final list snapshot if captured in memory before edits
|
|
16
|
+
- In-memory draft object if the session has not written a draft file yet
|
|
17
|
+
|
|
18
|
+
Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whether planner output exists or changed. Do not invoke `/prizmkit-code-review` for this planner-output gate; `/prizmkit-code-review` remains the implementation/code-diff review gate after `/prizmkit-implement`.
|
|
19
|
+
|
|
20
|
+
## Review Scope
|
|
21
|
+
|
|
22
|
+
1. If a pre-session final list exists, compare by stable feature IDs (`F-*`).
|
|
23
|
+
2. Treat features as changed only when item fields changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
|
|
24
|
+
3. Review newly added feature IDs and changed feature IDs.
|
|
25
|
+
4. Preserve unchanged historical features. Read unchanged entries only when needed to verify dependency references from reviewed features.
|
|
26
|
+
5. If no snapshot exists, review all feature entries produced by the current generation flow.
|
|
27
|
+
|
|
28
|
+
## Review Checklist
|
|
29
|
+
|
|
30
|
+
For every reviewed feature entry, check:
|
|
31
|
+
|
|
32
|
+
- Schema compatibility with `dev-pipeline-feature-list-v1` and `.prizmkit/dev-pipeline/templates/feature-list-schema.json`
|
|
33
|
+
- Dependency/DAG soundness: dependencies exist, no cycles, no poorly ordered prerequisite chains
|
|
34
|
+
- Description completeness and headless execution readiness
|
|
35
|
+
- Acceptance criteria specificity, measurability, and coverage of the described behavior
|
|
36
|
+
- User-provided wording preservation in `description`, `acceptance_criteria`, and `user_context`
|
|
37
|
+
- Task-scoped `user_context` isolation: no unrelated sibling feature descriptions, file references, or supplementary materials; shared context appears on multiple items only when explicitly global
|
|
38
|
+
- Priority/complexity calibration: every reviewed feature has short priority and complexity rationales, medium/low assignments are allowed when criteria fit, and high/high is not used merely because work is framework-related, multi-file, or user-requested
|
|
39
|
+
- Browser interaction fields for qualifying frontend/fullstack features when applicable
|
|
40
|
+
|
|
41
|
+
## Fix Loop
|
|
42
|
+
|
|
43
|
+
1. Present findings with IDs, severity, evidence, and suggested draft/source changes.
|
|
44
|
+
2. Accept only findings that improve planner correctness, completeness, or downstream execution readiness.
|
|
45
|
+
3. Apply accepted fixes to `.prizmkit/plans/feature-list.draft.json` or the in-memory draft object first.
|
|
46
|
+
4. Regenerate the final list through the existing generator:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
5. Re-run validation/generation until valid. Do not hand-patch `.prizmkit/plans/feature-list.json` as the source of truth.
|
|
53
|
+
6. Repeat the local review only for entries changed by accepted fixes.
|
|
54
|
+
|
|
55
|
+
## Report Format
|
|
56
|
+
|
|
57
|
+
Report in the final handoff summary:
|
|
58
|
+
|
|
59
|
+
- `Local generated-plan review: PASS` or `NEEDS_FIXES`
|
|
60
|
+
- Reviewed feature IDs
|
|
61
|
+
- Accepted fixes, or `none`
|
|
62
|
+
- Final validation result
|
|
63
|
+
- Note when review was not applicable because no new final planning content was written
|
|
@@ -335,17 +335,14 @@ def validate_feature_list(data, is_new_plan=True):
|
|
|
335
335
|
# -- Sub-features --
|
|
336
336
|
subs = feat.get("sub_features")
|
|
337
337
|
|
|
338
|
-
# --
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
errors.append(
|
|
347
|
-
"{}: 'critic_count' must be 1 or 3, got {}".format(label, critic_count)
|
|
348
|
-
)
|
|
338
|
+
# -- Retired fields --
|
|
339
|
+
for retired_field in ("critic", "critic_count"):
|
|
340
|
+
if retired_field in feat:
|
|
341
|
+
errors.append(
|
|
342
|
+
"{}: '{}' field is retired; remove it from feature-list data".format(
|
|
343
|
+
label, retired_field
|
|
344
|
+
)
|
|
345
|
+
)
|
|
349
346
|
|
|
350
347
|
# -- Browser interaction check (warning for frontend features) --
|
|
351
348
|
has_frontend = bool(
|
|
@@ -140,7 +140,7 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
140
140
|
- If "SaaS platform": follow up with platform selection (Vercel / Railway / Fly.io / Cloudflare / AWS / Other)
|
|
141
141
|
|
|
142
142
|
3. **Write results**:
|
|
143
|
-
- Append `### Infrastructure` section to the detected platform instruction file (`AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `CODEBUDDY.md` for CodeBuddy)
|
|
143
|
+
- Append `### Infrastructure` section to the detected **main** platform instruction file (`AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `CODEBUDDY.md` for CodeBuddy). Do not write Infrastructure to `AGENTS.private.md`, `CLAUDE.private.md`, or `CODEBUDDY.private.md`; private files are reserved for PrizmKit framework protocol imports. Format:
|
|
144
144
|
```markdown
|
|
145
145
|
### Infrastructure
|
|
146
146
|
|
|
@@ -302,7 +302,7 @@ Layer Detection:
|
|
|
302
302
|
Infrastructure Quick Scan:
|
|
303
303
|
Database: PostgreSQL (Prisma) — detected from dependencies
|
|
304
304
|
Deployment: Vercel — detected from vercel.json
|
|
305
|
-
→ Written to the detected platform instruction file `### Infrastructure`
|
|
305
|
+
→ Written to the detected main platform instruction file `### Infrastructure` (not `.private.md`)
|
|
306
306
|
|
|
307
307
|
Rules Quick Entry:
|
|
308
308
|
Matched layers: frontend (React), backend (Express.js), database (Prisma) → keeping default rules
|
|
@@ -96,7 +96,21 @@ Steps:
|
|
|
96
96
|
- Polish tasks when needed
|
|
97
97
|
- Checkpoint tasks between phases when integration risk exists
|
|
98
98
|
3. Mark parallel tasks with `[P]` only when they can safely run independently.
|
|
99
|
-
4. Run the verification checklist from `${SKILL_DIR}/references/verification-checklist.md` and fix issues before
|
|
99
|
+
4. Run the verification checklist from `${SKILL_DIR}/references/verification-checklist.md` and fix issues before the planning quality gate.
|
|
100
|
+
|
|
101
|
+
### Phase 3: Plan/Spec Review Loop
|
|
102
|
+
|
|
103
|
+
Run this phase every time `spec.md` and `plan.md` are created or updated, before reporting the plan or handing off to implementation.
|
|
104
|
+
|
|
105
|
+
1. Explicitly read `${SKILL_DIR}/references/review-plan-spec-loop.md`.
|
|
106
|
+
2. Execute that guide against the current `spec.md` and `plan.md`.
|
|
107
|
+
3. Apply all resolvable `BLOCKER` fixes and accepted `SHOULD_FIX` fixes directly to `spec.md` and/or `plan.md`.
|
|
108
|
+
4. Treat `OPTIONAL` findings as non-blocking.
|
|
109
|
+
5. Rerun the review once when fixes were applied, respecting the guide's maximum of 2 total rounds.
|
|
110
|
+
6. If unresolved `BLOCKER` findings remain, stop and ask targeted clarification questions in interactive mode; in non-interactive mode, record the blocker and stop. Do not escalate to a Critic agent.
|
|
111
|
+
7. Only proceed to `/prizmkit-implement` handoff after the loop has no unresolved blockers.
|
|
112
|
+
|
|
113
|
+
The review loop is planning-only. It must not start implementation, run tests/builds, launch a pipeline, create a separate skill, or require a Critic agent.
|
|
100
114
|
|
|
101
115
|
## Output
|
|
102
116
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Review Plan/Spec Loop
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Run this local planning-quality gate after `spec.md` and `plan.md` are drafted or updated, before handing off to `/prizmkit-implement`.
|
|
6
|
+
|
|
7
|
+
This is not a separate skill and it does not use a Critic agent. It is a bounded review loop executed inside `prizmkit-plan` to improve the planning artifacts only.
|
|
8
|
+
|
|
9
|
+
## Non-Goals
|
|
10
|
+
|
|
11
|
+
Do not do any of the following from this guide:
|
|
12
|
+
|
|
13
|
+
- Start implementation or edit product/source code.
|
|
14
|
+
- Run tests, builds, lint, or package commands.
|
|
15
|
+
- Launch a feature, bugfix, or refactor pipeline.
|
|
16
|
+
- Spawn or require a Critic agent.
|
|
17
|
+
- Create a separate review-loop skill.
|
|
18
|
+
- Expand scope beyond improving `spec.md` and `plan.md`.
|
|
19
|
+
|
|
20
|
+
## Required Inputs
|
|
21
|
+
|
|
22
|
+
- `spec.md` in the selected artifact directory.
|
|
23
|
+
- `plan.md` in the selected artifact directory.
|
|
24
|
+
- Relevant Prizm docs and source summaries already loaded by `prizmkit-plan`.
|
|
25
|
+
|
|
26
|
+
Use source reads sparingly. Prefer the context already loaded for planning. Read additional source only when a finding cannot be classified without confirming an existing interface, naming pattern, dependency, or constraint.
|
|
27
|
+
|
|
28
|
+
## Review Dimensions
|
|
29
|
+
|
|
30
|
+
Review both artifacts against these dimensions:
|
|
31
|
+
|
|
32
|
+
| Dimension | Check |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Ambiguity | Requirements, scope, terms, or expected behavior are unclear or internally inconsistent. |
|
|
35
|
+
| Acceptance criteria completeness | Each goal has verifiable acceptance criteria; edge/error cases are included when meaningful. |
|
|
36
|
+
| Missing constraints | Security, data, compatibility, performance, platform, deployment, migration, or non-goal constraints are absent where relevant. |
|
|
37
|
+
| Task ordering errors | Tasks are sequenced before their prerequisites, checkpoints are misplaced, or dependency order is unsafe. |
|
|
38
|
+
| Dependency assumptions | The plan assumes missing APIs, schemas, files, services, packages, auth, environment variables, or generated artifacts without evidence. |
|
|
39
|
+
| Scope drift | The plan adds unrelated work, backlog items, nice-to-haves, or implementation beyond the spec. |
|
|
40
|
+
| Overengineering | The plan introduces abstractions, services, agents, workflows, data stores, or cross-module rewrites that the spec does not justify. |
|
|
41
|
+
| Implementation readiness | Tasks are actionable, file-scoped when possible, testable, and resumable; blockers are explicit. |
|
|
42
|
+
| Source-reading overhead | The implementation plan avoids broad rereads and identifies the minimum context/files needed for execution. |
|
|
43
|
+
|
|
44
|
+
## Finding Classification
|
|
45
|
+
|
|
46
|
+
Use exactly these classifications:
|
|
47
|
+
|
|
48
|
+
### BLOCKER
|
|
49
|
+
|
|
50
|
+
A finding is `BLOCKER` when implementation would likely fail, produce the wrong behavior, or require user clarification before a safe plan exists.
|
|
51
|
+
|
|
52
|
+
Examples:
|
|
53
|
+
- Acceptance criteria contradict each other.
|
|
54
|
+
- A required interface/data model decision is unresolved.
|
|
55
|
+
- The task order starts implementation before required schema/context decisions.
|
|
56
|
+
- The plan includes scope that conflicts with explicit non-goals.
|
|
57
|
+
|
|
58
|
+
### SHOULD_FIX
|
|
59
|
+
|
|
60
|
+
A finding is `SHOULD_FIX` when the artifact can be improved directly without changing user intent or requiring clarification.
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
- Add missing acceptance criteria derived from the stated goal.
|
|
64
|
+
- Clarify a constraint already implied by the task context.
|
|
65
|
+
- Reorder dependent tasks.
|
|
66
|
+
- Remove an unjustified overengineered step.
|
|
67
|
+
- Add a minimal file/context note to reduce source-reading overhead.
|
|
68
|
+
|
|
69
|
+
### OPTIONAL
|
|
70
|
+
|
|
71
|
+
A finding is `OPTIONAL` when it is a nice-to-have improvement that does not block implementation readiness.
|
|
72
|
+
|
|
73
|
+
Examples:
|
|
74
|
+
- Extra detail that could help but is not necessary.
|
|
75
|
+
- Alternative task grouping with no correctness impact.
|
|
76
|
+
- A lower-risk cleanup suggestion outside current scope.
|
|
77
|
+
|
|
78
|
+
Optional findings do not block handoff.
|
|
79
|
+
|
|
80
|
+
## Loop Algorithm
|
|
81
|
+
|
|
82
|
+
1. Read this guide, then review the current `spec.md` and `plan.md` together.
|
|
83
|
+
2. Produce a concise internal finding list grouped by `BLOCKER`, `SHOULD_FIX`, and `OPTIONAL`.
|
|
84
|
+
3. Apply fixes directly to `spec.md` and/or `plan.md` for:
|
|
85
|
+
- every `BLOCKER` that can be resolved from existing task context;
|
|
86
|
+
- every `SHOULD_FIX` that is accepted as aligned with the user's intent.
|
|
87
|
+
4. Do not apply `OPTIONAL` findings unless they clearly improve readiness without expanding scope.
|
|
88
|
+
5. If any fixes were applied, rerun this review once.
|
|
89
|
+
6. Stop after at most 2 total review rounds.
|
|
90
|
+
7. If unresolved `BLOCKER` findings remain after the final round, stop planning and ask targeted clarification questions. Do not escalate to a Critic agent.
|
|
91
|
+
8. If no unresolved blockers remain, report that the planning quality gate passed and hand off to `/prizmkit-implement`.
|
|
92
|
+
|
|
93
|
+
## Output Summary
|
|
94
|
+
|
|
95
|
+
At handoff, include a short summary:
|
|
96
|
+
|
|
97
|
+
- Review rounds run: `1` or `2`.
|
|
98
|
+
- Fixes applied to `spec.md`: short list or `none`.
|
|
99
|
+
- Fixes applied to `plan.md`: short list or `none`.
|
|
100
|
+
- Optional findings deferred: short list or `none`.
|
|
101
|
+
- Unresolved blockers: `none` before handoff.
|
|
@@ -13,7 +13,7 @@ STEPS:
|
|
|
13
13
|
- HIERARCHY RULE: directory X inside top-level module M maps to .prizmkit/prizm-docs/<M>/<X>.prizm, never to .prizmkit/prizm-docs/<X>.prizm.
|
|
14
14
|
- Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizmkit/prizm-docs/, dev-pipeline/. If total module count > 30, ask user for include/exclude patterns.
|
|
15
15
|
3. Create .prizmkit/prizm-docs/ directory structure mirroring the source tree exactly. For each top-level module M that has sub-modules, create the subdirectory .prizmkit/prizm-docs/<M>/.
|
|
16
|
-
4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX with multi-level entries as needed for efficient navigation (constrained by 4KB limit), RULES extracted from
|
|
16
|
+
4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX with multi-level entries as needed for efficient navigation (constrained by 4KB limit), RULES extracted from user-facing main memory files (AGENTS.md, CLAUDE.md, CODEBUDDY.md), README, and linter configs. Do not extract RULES from AGENTS.private.md, CLAUDE.private.md, or CODEBUDDY.private.md because those files contain PrizmKit framework protocol text. Include PATTERNS and CROSS_CUTTING (cross-module concerns spanning 2+ modules). Set PRIZM_VERSION: 4. Max 4KB. No CHANGELOG sections/files, UPDATED/date metadata, feature/bug/refactor/task/session/run/pipeline/workflow IDs, branch names, absolute worktree paths, or `.prizmkit/specs` / `.prizmkit/dev-pipeline` artifact paths — git tracks history.
|
|
17
17
|
- If `.prizmkit/plans/project-brief.md` exists: add `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` to root.prizm (generated by prizmkit-init). If not present, skip — prizmkit-init Phase 7 will add it later.
|
|
18
18
|
- If module count > 15: use MODULE_GROUPS format instead of MODULE_INDEX — group modules by functional domain (3-8 domains, inferred from directory structure and module responsibilities). See prizm-docs-format.md for MODULE_GROUPS format.
|
|
19
19
|
- For each module entry, auto-generate 3-6 keyword tags by scanning the module's key source files for: exported function/class names, imported library names, domain-specific terms in file/directory names. Add tags in square brackets after the module name (e.g., `- auth [login, session, jwt]: ...`). Tags are optional but recommended for projects with 10+ modules.
|
|
@@ -166,12 +166,12 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
166
166
|
- Off — Skip post-task test verification (faster but riskier)
|
|
167
167
|
|
|
168
168
|
**Question 4 — Advanced config?** (multiSelect: false):
|
|
169
|
-
- No (default) — Use defaults for
|
|
170
|
-
- Yes — Configure
|
|
169
|
+
- No (default) — Use defaults for failure behavior
|
|
170
|
+
- Yes — Configure stop-on-failure, deploy-after-completion, and reasoning effort options
|
|
171
171
|
|
|
172
172
|
Note: Refactor filter defaults to all refactor items. Runtime selects eligible refactors in stable list order after dependencies are completed; planners should order unrelated refactors by user priority before launch. If the user selects "Other" on any option, handle their custom input.
|
|
173
173
|
|
|
174
|
-
**If user chose "Yes" to Advanced config**, run the advanced configuration round (a second `AskUserQuestion` round, plus a reasoning-effort follow-up). It applies to a minority of sessions, so the full question set lives in `${SKILL_DIR}/references/configuration.md` → **Advanced Configuration Round**.
|
|
174
|
+
**If user chose "Yes" to Advanced config**, run the advanced configuration round (a second `AskUserQuestion` round, plus a reasoning-effort follow-up). It applies to a minority of sessions, so the full question set lives in `${SKILL_DIR}/references/configuration.md` → **Advanced Configuration Round**.
|
|
175
175
|
|
|
176
176
|
Read `${SKILL_DIR}/references/configuration.md` for the current environment-variable mapping and advanced environment-variable tables.
|
|
177
177
|
|
|
@@ -184,7 +184,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
184
184
|
```
|
|
185
185
|
Selected-options example:
|
|
186
186
|
```bash
|
|
187
|
-
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1
|
|
187
|
+
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high \
|
|
188
188
|
python3 ./.prizmkit/dev-pipeline/cli.py refactor run .prizmkit/plans/refactor-list.json
|
|
189
189
|
```
|
|
190
190
|
|
|
@@ -195,7 +195,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
195
195
|
Selected-options example:
|
|
196
196
|
```bash
|
|
197
197
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor start .prizmkit/plans/refactor-list.json \
|
|
198
|
-
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1
|
|
198
|
+
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high"
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
|
|
@@ -13,7 +13,6 @@ Translating user responses to env vars:
|
|
|
13
13
|
| Max retries: N | `MAX_RETRIES=N` |
|
|
14
14
|
| Strict behavior: On | `STRICT_BEHAVIOR_CHECK=1` |
|
|
15
15
|
| Strict behavior: Off | `STRICT_BEHAVIOR_CHECK=0` |
|
|
16
|
-
| Critic: On | `ENABLE_CRITIC=true` |
|
|
17
16
|
| Stop on failure: On | `STOP_ON_FAILURE=1` |
|
|
18
17
|
| Deploy: Yes | `ENABLE_DEPLOY=1` |
|
|
19
18
|
| Effort: value | `PRIZMKIT_EFFORT=<value>` |
|
|
@@ -54,17 +53,13 @@ Not exposed in interactive menu, pass via `--env`:
|
|
|
54
53
|
|
|
55
54
|
Only run this when the user answered "Yes" to the **Advanced config?** question in step 6. It applies to a minority of sessions.
|
|
56
55
|
|
|
57
|
-
Ask a second round of `AskUserQuestion` with these
|
|
56
|
+
Ask a second round of `AskUserQuestion` with these 2 questions:
|
|
58
57
|
|
|
59
58
|
**Question 1 — Stop on failure** (multiSelect: false):
|
|
60
59
|
- Off (default) — Pipeline continues to next task after failure
|
|
61
60
|
- On — Pipeline halts immediately when a task exhausts all retries (`STOP_ON_FAILURE=1`)
|
|
62
61
|
|
|
63
|
-
**Question 2 —
|
|
64
|
-
- Off (default) — Skip adversarial review
|
|
65
|
-
- On — Enable adversarial critic review: an independent AI agent reviews the refactor plan for completeness and the implementation for regressions, missed edge cases, and behavior violations. Adds ~5-10 min per refactor task.
|
|
66
|
-
|
|
67
|
-
**Question 3 — Deploy after completion?** (multiSelect: false):
|
|
62
|
+
**Question 2 — Deploy after completion?** (multiSelect: false):
|
|
68
63
|
- No (default) — Skip deployment after pipeline completes
|
|
69
64
|
- Yes — Run /prizmkit-deploy automatically after all refactors complete successfully (`ENABLE_DEPLOY=1`). Deployment is blocked if any refactor did not complete successfully (status not 'completed' or manually 'skipped').
|
|
70
65
|
|
|
@@ -265,12 +265,12 @@ See `${SKILL_DIR}/references/planning-phases.md` for the full 5-step review chec
|
|
|
265
265
|
```
|
|
266
266
|
The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes.
|
|
267
267
|
3. If validation fails -> fix the draft and retry (max 3 attempts)
|
|
268
|
-
4. If validation passes -> run the mandatory
|
|
268
|
+
4. If validation passes -> run the mandatory Local Generated-Plan Review Gate (see §Local Generated-Plan Review Gate below); apply accepted fixes to the draft/source plan, regenerate, and revalidate until pass
|
|
269
269
|
5. If review and validation pass -> present final summary
|
|
270
270
|
|
|
271
271
|
**CHECKPOINT CP-RP-6**: `.prizmkit/plans/refactor-list.json` generated and validated.
|
|
272
272
|
|
|
273
|
-
**CHECKPOINT CP-RP-7**:
|
|
273
|
+
**CHECKPOINT CP-RP-7**: Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed refactor entries, applied accepted fixes through draft/source data, regenerated, and revalidated.
|
|
274
274
|
|
|
275
275
|
## Checkpoints (Mandatory Gates)
|
|
276
276
|
|
|
@@ -283,32 +283,26 @@ See `${SKILL_DIR}/references/planning-phases.md` for the full 5-step review chec
|
|
|
283
283
|
| **CP-RP-4** | Items Confirmed | User confirmed/modified/skipped each item | 5 |
|
|
284
284
|
| **CP-RP-5** | Completeness OK | DAG valid, preservation strategies declared, no gaps | 6 |
|
|
285
285
|
| **CP-RP-6** | Output Valid | `.prizmkit/plans/refactor-list.json` passes validation script | 7 |
|
|
286
|
-
| **CP-RP-7** | Plan Review Passed |
|
|
287
|
-
|
|
288
|
-
##
|
|
289
|
-
|
|
290
|
-
User requirement preserved verbatim:
|
|
291
|
-
|
|
292
|
-
Run this gate **after** `.prizmkit/plans/refactor-list.json` passes the validation/generate script and **before** the final handoff summary recommends `refactor-pipeline-launcher`. This gate applies to full workflow, Mode B from analysis, and fast-path refactor planning.
|
|
293
|
-
|
|
294
|
-
1. **
|
|
295
|
-
2. **
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
- `behavior_preservation` strategy quality and target scope consistency
|
|
301
|
-
- preservation of user-provided wording in `description`, `acceptance_criteria`, and `user_context`
|
|
302
|
-
- task-scoped `user_context` isolation: no unrelated sibling refactor goals, target files, constraints, or supplementary materials, and shared context appears on multiple items only when explicitly global
|
|
303
|
-
- priority/complexity calibration: every reviewed refactor has a short priority rationale and complexity rationale, medium/low assignments are allowed when criteria fit, and high/high is not used merely because the work is cleanup, framework-related, multi-file, or user-requested
|
|
304
|
-
3. **Keep the review planning-only**: do NOT start `refactor-pipeline-launcher`, do NOT run the refactor pipeline, do NOT run tests/builds/installs, and do NOT implement source-code refactors.
|
|
305
|
-
4. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/refactor-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
286
|
+
| **CP-RP-7** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed refactor entries, applied accepted fixes through draft/source data, regenerated, and revalidated | 7 |
|
|
287
|
+
|
|
288
|
+
## Local Generated-Plan Review Gate
|
|
289
|
+
|
|
290
|
+
User requirement preserved verbatim: `there is a litter bug for prizm-code-review will to check git diff in working space and staged space , however the .prizmkit will be gitignored in most situation. so do you think the content should be change to inline a new reference file instead of use prizmkit-code-review`
|
|
291
|
+
|
|
292
|
+
Run this gate **after** `.prizmkit/plans/refactor-list.json` passes the validation/generate script and **before** the final handoff summary recommends `refactor-pipeline-launcher`. This gate applies to full workflow, Mode B from analysis, and fast-path refactor planning when the current session generated, appended, or rewrote final refactor planning content. For validate-only, summary-only, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
293
|
+
|
|
294
|
+
1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for this planner-output review loop.
|
|
295
|
+
2. **Read actual planning artifacts directly**: inspect `.prizmkit/plans/refactor-list.json`, `.prizmkit/plans/refactor-list.draft.json` when present, and any pre-session or in-memory draft snapshot. Do not rely on `git status`, `git diff`, or `git diff --cached`, because `.prizmkit` planning artifacts are often gitignored or untracked.
|
|
296
|
+
3. **Identify review scope**: compare by stable refactor IDs and item fields against the pre-session list when one existed. Ignore root generator metadata such as `$schema`, `created_at`, and `created_by`. Review only newly added or changed refactor entries; preserve unchanged historical entries except when needed to verify dependency references or behavior-preservation interactions.
|
|
297
|
+
4. **Run the local checklist** from the reference: schema compatibility, dependency/DAG soundness, safe behavior-preserving order, description completeness, headless execution readiness, acceptance criteria measurability, `behavior_preservation` strategy quality, user-provided wording preservation, task-scoped `user_context` isolation, and priority/complexity calibration.
|
|
298
|
+
5. **Keep the review planning-only**: do NOT start `refactor-pipeline-launcher`, do NOT run the refactor pipeline, do NOT run tests/builds/installs, and do NOT implement source-code refactors.
|
|
299
|
+
6. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/refactor-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
306
300
|
```bash
|
|
307
301
|
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
308
302
|
```
|
|
309
303
|
Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
|
|
310
|
-
|
|
311
|
-
|
|
304
|
+
7. **Revalidate after every accepted fix batch**: the generate script must pass again before the planner can proceed. If validation fails, fix the draft and rerun until pass.
|
|
305
|
+
8. **Report the gate outcome** in the final summary: include local generated-plan review verdict, reviewed refactor IDs, accepted fixes (or "none"), and final validation result.
|
|
312
306
|
|
|
313
307
|
## Output Rules
|
|
314
308
|
|
|
@@ -326,16 +320,18 @@ Run this gate **after** `.prizmkit/plans/refactor-list.json` passes the validati
|
|
|
326
320
|
- `model` field is optional — omitting it means the pipeline uses $MODEL env or CLI default
|
|
327
321
|
- `scope` object with nested structure: `files` array (target file paths) and `modules` array (module names)
|
|
328
322
|
|
|
329
|
-
##
|
|
323
|
+
## Verification Defaults
|
|
324
|
+
|
|
325
|
+
Set behavior-preservation and testing expectations for each refactor item. Do not generate retired review-agent configuration fields.
|
|
330
326
|
|
|
331
|
-
|
|
327
|
+
| Priority | Complexity | Verification expectation |
|
|
328
|
+
|----------|-----------|--------------------------|
|
|
329
|
+
| critical | high | Strong behavior-preservation evidence plus scoped tests and review gate |
|
|
330
|
+
| critical | medium/low | Focused behavior-preservation evidence plus review gate |
|
|
331
|
+
| high | high | Scoped tests for changed boundaries plus review gate |
|
|
332
|
+
| other combinations | any | Smallest meaningful behavior-preservation check |
|
|
332
333
|
|
|
333
|
-
|
|
334
|
-
|----------|-----------|----------|----------------|
|
|
335
|
-
| critical | high | `true` | `3` |
|
|
336
|
-
| critical | medium/low | `true` | `1` |
|
|
337
|
-
| high | high | `true` | `1` |
|
|
338
|
-
| other combinations | any | `false` | (omitted) |
|
|
334
|
+
Never emit `critic` or `critic_count`; those fields are fully removed and validators reject them.
|
|
339
335
|
|
|
340
336
|
---
|
|
341
337
|
|
|
@@ -444,10 +440,10 @@ Prevent accidental session exit without deliverable completion.
|
|
|
444
440
|
|
|
445
441
|
## Handoff Message Template
|
|
446
442
|
|
|
447
|
-
After successful validation and the
|
|
443
|
+
After successful validation and the Local Generated-Plan Review Gate, report:
|
|
448
444
|
1. Output file path
|
|
449
445
|
2. Total refactor items
|
|
450
446
|
3. Dependency ordering highlights (which items must run first)
|
|
451
447
|
4. Behavior preservation strategy distribution (N items with test-gate, M with snapshot, etc.)
|
|
452
|
-
5.
|
|
448
|
+
5. Local generated-plan review result: verdict, reviewed refactor IDs, accepted fixes (or "none"), and final validation result
|
|
453
449
|
6. Recommended next action: `refactor-pipeline-launcher`
|
|
@@ -34,7 +34,7 @@ For simple refactoring with minimal scope.
|
|
|
34
34
|
```bash
|
|
35
35
|
python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input .prizmkit/plans/refactor-list.draft.json --output .prizmkit/plans/refactor-list.json
|
|
36
36
|
```
|
|
37
|
-
5. If valid -> run the mandatory
|
|
37
|
+
5. If valid -> run the mandatory Local Generated-Plan Review Gate from the main `refactor-planner` skill before summarizing or recommending `refactor-pipeline-launcher`.
|
|
38
38
|
6. If invalid -> apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
39
39
|
|
|
40
40
|
## When NOT to Use Fast Path
|
|
@@ -53,6 +53,6 @@ AI: [Uses AskUserQuestion with options: "Fast-path", "Full workflow"]
|
|
|
53
53
|
User: [Selects "Fast-path"]
|
|
54
54
|
AI: "Drafting R-001..."
|
|
55
55
|
AI: [Validates immediately]
|
|
56
|
-
AI: [Runs the
|
|
56
|
+
AI: [Runs the Local Generated-Plan Review Gate on R-001 only]
|
|
57
57
|
AI: "Ready to proceed to dev-pipeline."
|
|
58
58
|
```
|