prizmkit 1.1.113 → 1.1.114

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.1.113",
3
- "bundledAt": "2026-07-09T01:22:22.762Z",
4
- "bundledFrom": "09ad715"
2
+ "frameworkVersion": "1.1.114",
3
+ "bundledAt": "2026-07-09T06:02:07.402Z",
4
+ "bundledFrom": "b1b5595"
5
5
  }
@@ -746,12 +746,17 @@ def resolve_prompt_platform(project_root):
746
746
  )
747
747
 
748
748
  def read_platform_conventions(project_root):
749
- """Resolve the platform-specific project conventions file.
749
+ """Resolve the platform-specific main project conventions file.
750
750
 
751
751
  Returns a path reference for the AI agent to read at runtime,
752
- rather than inlining the full file content into the prompt.
752
+ rather than inlining the full file content into the prompt. Private
753
+ framework memory files are intentionally excluded because project
754
+ conventions and Infrastructure live in the user-facing main files.
753
755
  """
754
- platform = os.environ.get("PRIZMKIT_PLATFORM", "claude")
756
+ try:
757
+ platform = resolve_prompt_platform(project_root)
758
+ except RuntimeError:
759
+ platform = os.environ.get("PRIZMKIT_PLATFORM", "claude")
755
760
  if platform == "codebuddy":
756
761
  candidates = ["CODEBUDDY.md", "CLAUDE.md", "AGENTS.md"]
757
762
  elif platform == "codex":
@@ -99,6 +99,29 @@ class TestPlatformExecutableAndPortHelpers:
99
99
  assert payload["platform"] == "codex"
100
100
  assert payload["path"].endswith(".agents/skills/playwright-cli")
101
101
 
102
+ def test_read_platform_conventions_uses_resolved_main_memory_file(self, tmp_path, monkeypatch):
103
+ from scripts.utils import read_platform_conventions
104
+
105
+ project = tmp_path / "project"
106
+ (project / ".prizmkit").mkdir(parents=True)
107
+ (project / ".prizmkit" / "config.json").write_text(
108
+ json.dumps({"platform": "codex", "ai_cli": "codex"}), encoding="utf-8"
109
+ )
110
+ (project / "AGENTS.md").write_text("### Project Conventions\n", encoding="utf-8")
111
+ (project / "AGENTS.private.md").write_text("framework protocol\n", encoding="utf-8")
112
+ monkeypatch.delenv("PRIZMKIT_PLATFORM", raising=False)
113
+
114
+ assert read_platform_conventions(project) == "`AGENTS.md`"
115
+
116
+ (project / ".prizmkit" / "config.json").write_text(
117
+ json.dumps({"platform": "codebuddy", "ai_cli": "cbc"}), encoding="utf-8"
118
+ )
119
+ (project / "CODEBUDDY.md").write_text("### Infrastructure\n", encoding="utf-8")
120
+ (project / "CODEBUDDY.private.md").write_text("framework protocol\n", encoding="utf-8")
121
+
122
+ assert read_platform_conventions(project) == "`CODEBUDDY.md`"
123
+ assert ".private.md" not in read_platform_conventions(project)
124
+
102
125
  def test_codebuddy_cli_env_wins_over_filesystem_markers(self, tmp_path, monkeypatch):
103
126
  from prizmkit_runtime.platform_detection import resolve_platform
104
127
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.113",
2
+ "version": "1.1.114",
3
3
  "skills": {
4
4
  "prizmkit": {
5
5
  "description": "Full-lifecycle dev toolkit. Covers spec-driven development, Prizm context docs, code quality, debugging, deployment, and knowledge management.",
@@ -180,7 +180,7 @@ Route by answer:
180
180
  - Proactively scan the project (same as brownfield behavior)
181
181
  - Generate project-brief.md from inferred context
182
182
  - Skip extensive brainstorming and constraint phases
183
- - Present brief for user confirmation → write → done
183
+ - Present brief for user confirmation → write → run CP-AP-6 Generated App-Plan Review Gate → completion summary
184
184
 
185
185
  Session goal tracking: Track the intent (`produce`, `explore`, or `quick_context`) throughout the session. If `explore`, always re-prompt before ending.
186
186
 
@@ -240,6 +240,21 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
240
240
  | **CP-AP-3** | Frontend Design Evaluated | For frontend projects: checked for existing UI/UX design system; user was asked if missing. **Auto-pass** for backend-only or non-UI projects. | 2 |
241
241
  | **CP-AP-4** | Project Brief Accumulated | `.prizmkit/plans/project-brief.md` exists at `.prizmkit/plans/` with at least 3 ideas listed. For brownfield: already-implemented items marked `[x]` count toward this total. | 3 |
242
242
  | **CP-AP-5** | Planning Complete | All project-level context captured: conventions, infrastructure config, tech stack, architecture decisions, project brief finalized | 4 |
243
+ | **CP-AP-6** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, directly reviewed current-session final app-planning artifacts, applied accepted fixes through source/writer paths, and rechecked changed sections | 4 |
244
+
245
+ ## Generated App-Plan Review Gate
246
+
247
+ User requirement preserved verbatim: `Add generated-plan review in app-planner also .`
248
+
249
+ Run this gate before any final handoff whenever the current `app-planner` session wrote or rewrote final app-level planning content. In full produce mode this runs after CP-AP-5; in Quick Context Mode it runs after the confirmed `.prizmkit/plans/project-brief.md` write; in conventions, infrastructure, architecture-decision, or rules-only final-write flows it runs after those writes and before the completion summary. This gate reviews generated planning artifacts directly, not implementation diffs.
250
+
251
+ 1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for app-planner generated content review.
252
+ 2. **Read actual planning artifacts directly**: inspect current-session final outputs such as `.prizmkit/plans/project-brief.md`, selected `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` sections, `.prizmkit/rules/<layer>-rules.md`, and `.prizmkit/prizm-docs/root.prizm` `RULES:` pointer line. Do not rely on `git status`, `git diff`, or `git diff --cached`, because `.prizmkit` planning artifacts are often gitignored or untracked.
253
+ 3. **Scope to new/changed app-planning content**: compare against pre-session snapshots or in-memory drafts when available. Preserve unchanged historical brief items, instruction-file sections, rules files, and Prizm doc content. For explore-only sessions, draft-save exits, or flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
254
+ 4. **Run the local checklist** from the reference: project brief completeness, consistency of conventions/infrastructure/architecture decisions, rules pointer consistency, user-provided wording preservation, app-planner writable-boundary compliance, and downstream `feature-planner` readiness to produce `.prizmkit/plans/feature-list.json` without guessing.
255
+ 5. **Apply accepted fixes through the source/writer path**: project brief fixes go through the draft/checklist source, instruction-file section fixes go through the selected platform instruction file section source with user confirmation when changing approved wording, rules fixes re-render from rules configuration answers/templates when available, and `root.prizm` fixes are limited to the `RULES:` pointer line.
256
+ 6. **Recheck changed sections directly** after every accepted fix batch.
257
+ 7. **Report CP-AP-6** in the completion summary: include local generated-plan review verdict, reviewed app-planning artifacts/sections, accepted fixes (or "none"), and final writer/validation result.
243
258
 
244
259
  ## Architecture Decision Capture
245
260
 
@@ -277,7 +292,7 @@ When the session appears to be ending:
277
292
 
278
293
  ## Completion Summary
279
294
 
280
- After all checkpoints pass, present a summary and end the session:
295
+ After CP-AP-6 passes or is reported not applicable, present a summary and end the session:
281
296
 
282
297
  1. **Summary** (as text): List all project-level artifacts produced:
283
298
  - Project conventions → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Project Conventions`
@@ -286,6 +301,7 @@ After all checkpoints pass, present a summary and end the session:
286
301
  - Architecture decisions (if any) → `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` `### Architecture Decisions`
287
302
  - Dev rules (if configured) → `.prizmkit/rules/<layer>-rules.md` (with `root.prizm` `RULES:` pointer)
288
303
  - Project brief → `.prizmkit/plans/project-brief.md`
304
+ - Local generated-plan review → verdict, reviewed app-planning artifacts/sections, accepted fixes (or "none"), and final writer/validation result
289
305
 
290
306
  2. **Suggest possible next steps** (as text, NOT auto-invoked):
291
307
  > Project-level planning is complete. When you're ready, here are some possible next steps:
@@ -0,0 +1,67 @@
1
+ # Generated Plan Review — App Planner
2
+
3
+ Use this local review loop before app-planner presents the final completion summary for current-session final planning artifacts. This is a planner-output review, not an implementation/code-diff review.
4
+
5
+ ## Trigger
6
+
7
+ Run only when the current `app-planner` session wrote or rewrote final app-level planning content. This includes project brief finalization, project conventions, infrastructure configuration, architecture decisions, rules files, or a `root.prizm` `RULES:` pointer update.
8
+
9
+ For explore-only sessions, draft-save exits, validate-only checks, or other flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
10
+
11
+ ## Direct Artifact Reads
12
+
13
+ Planning artifacts may be gitignored, untracked, or absent from staged and unstaged diffs. Read the actual files and source sections directly when they were produced or changed in the current session:
14
+
15
+ - Project brief: `.prizmkit/plans/project-brief.md`
16
+ - Draft brief when present: `.prizmkit/plans/project-brief.draft.md`
17
+ - Project instruction files selected by `.prizmkit/manifest.json`: `AGENTS.md`, `CLAUDE.md`, `CODEBUDDY.md`
18
+ - Generated rule files: `.prizmkit/rules/<layer>-rules.md`
19
+ - Prizm docs root pointer: `.prizmkit/prizm-docs/root.prizm` `RULES:` line only
20
+ - In-memory answers, draft brief data, rules configuration answers, or section snapshots captured before writes
21
+
22
+ Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whether app-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`.
23
+
24
+ ## Review Scope
25
+
26
+ 1. Compare current final artifacts with pre-session snapshots or in-memory drafts when available.
27
+ 2. Review only newly added or changed app-planning sections from the current session.
28
+ 3. Preserve unchanged historical project brief ideas, instruction-file sections, rules files, and Prizm doc content.
29
+ 4. For `.prizmkit/prizm-docs/root.prizm`, review only the `RULES:` pointer line managed by rules configuration.
30
+ 5. If no snapshot exists, review only the artifacts the current app-planner session reports as produced.
31
+
32
+ ## Source-of-Truth Map
33
+
34
+ - `project-brief.md` fixes go through the draft/checklist project brief source representation described in `project-brief-guide.md`, then rewrite the final brief through the existing project brief writer path.
35
+ - Project conventions, infrastructure, and architecture decisions are source sections in `AGENTS.md`, `CLAUDE.md`, or `CODEBUDDY.md`. If a fix changes user-approved wording or meaning, ask for user confirmation before rewriting.
36
+ - `.prizmkit/rules/<layer>-rules.md` fixes should re-render from the rules configuration answers and template inputs when available. If no structured source remains, update the source rule section explicitly and report that source path.
37
+ - `root.prizm` fixes are limited to correcting or adding the `RULES:` pointer line; do not rewrite unrelated root content.
38
+
39
+ ## Review Checklist
40
+
41
+ For every reviewed app-planning artifact or section, check:
42
+
43
+ - Project brief completeness: goal, users, differentiators, constraints, tech stack assumptions, and at least three actionable ideas when producing a final brief
44
+ - Consistency among conventions, infrastructure, architecture decisions, and project brief content
45
+ - Infrastructure completeness or explicit deferral for database, deployment, and cloud services topics when those flows ran
46
+ - Rules pointer consistency: generated `.prizmkit/rules/<layer>-rules.md` files are referenced by the `root.prizm` `RULES:` line when rules were configured
47
+ - User-provided wording preservation in project brief ideas, conventions, infrastructure notes, architecture decisions, and rules
48
+ - Downstream readiness: `feature-planner` has enough context to produce `.prizmkit/plans/feature-list.json` without guessing core app purpose, stack, constraints, or implementation conventions
49
+ - No implementation/scaffolding actions are introduced by the app plan; outputs stay within app-planner's writable boundary
50
+
51
+ ## Fix Loop
52
+
53
+ 1. Present findings with artifact path, section name, severity, evidence, and suggested source change.
54
+ 2. Accept only findings that improve planner correctness, consistency, user wording preservation, or downstream feature-planner readiness.
55
+ 3. Apply accepted fixes to the source representation first: brief draft/checklist, instruction-file section source, rules answer/template source, or `root.prizm` `RULES:` pointer source.
56
+ 4. Regenerate or rewrite final artifacts through the same writer path used by app-planner. Do not hand-patch final artifacts as a shortcut when a draft/source representation exists.
57
+ 5. Re-read the changed final artifacts directly and re-run the local review only for changed sections.
58
+
59
+ ## Report Format
60
+
61
+ Report in the final completion summary:
62
+
63
+ - `Local generated-plan review: PASS` or `NEEDS_FIXES`
64
+ - Reviewed app-planning sections/artifacts
65
+ - Accepted fixes, or `none`
66
+ - Final writer/validation result for each changed artifact
67
+ - Note when review was not applicable because no new final planning content was written
@@ -283,42 +283,37 @@ Only proceed to Phase 5 after user confirms.
283
283
  ```
284
284
  The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes.
285
285
  3. **If validation fails**: Fix the draft and retry (max 3 attempts). If the script is unavailable, use the checklist in `${SKILL_DIR}/references/schema-validation.md`.
286
- 4. **Run the mandatory Post-Generation Plan Review Gate** (see §Post-Generation Plan Review Gate below): invoke `/prizmkit-code-review` on only newly added/changed bug entries after validation passes and before success output.
287
- 5. **Output**: File path, summary, review result, validation outcome, and next steps
286
+ 4. **Run the mandatory Local Generated-Plan Review Gate** (see §Local Generated-Plan Review Gate below): load `${SKILL_DIR}/references/generated-plan-review.md` and review only newly added/changed bug entries after validation passes and before success output.
287
+ 5. **Output**: File path, summary, local generated-plan review result, validation outcome, and next steps
288
288
 
289
289
  **Gate → CP-BP-5**: `bug-fix-list.json` passes validation script with zero errors.
290
290
 
291
- **Gate → CP-BP-6**: `/prizmkit-code-review` reviewed only newly added/changed bug entries; accepted fixes were regenerated and revalidated.
291
+ **Gate → CP-BP-6**: Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed bug entries, applied accepted fixes through draft/source data, regenerated, and revalidated.
292
292
 
293
- ## Post-Generation Plan Review Gate
293
+ ## Local Generated-Plan Review Gate
294
294
 
295
- User requirement preserved verbatim: `每次完成任务规划的时候,应该调用/prizmkit-code-review 对新增的计划内容进行review,确保生成新增的计划的正确行和完整性。`
295
+ 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`
296
296
 
297
- Run this gate **after** `.prizmkit/plans/bug-fix-list.json` passes the validation/generate script and **before** any success output or next-step summary recommends `bugfix-pipeline-launcher`. This gate applies to Interactive Planning, From Log, From Tests, and any append-to-existing bug list flow.
297
+ Run this gate **after** `.prizmkit/plans/bug-fix-list.json` passes the validation/generate script and **before** any success output or next-step summary recommends `bugfix-pipeline-launcher`. This gate applies to Interactive Planning, From Log, From Tests, and append-to-existing bug list flows when the current session generated, appended, or rewrote final bug planning content. For Validate, Summary, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
298
298
 
299
- 1. **Identify review scope**: compare the final validated bug list against the pre-session list when one existed. Review only newly added or changed bug entries. Do not re-review unchanged historical entries except when needed to verify duplicate/root-cause overlap or dependency references.
300
- 2. **Invoke `/prizmkit-code-review` as a planning-quality gate** with an explicit prompt that this is a bug-plan-entry review, not an implementation review. The review must check:
301
- - schema correctness and compatibility with `dev-pipeline-bug-fix-list-v1`
302
- - dependency/DAG consistency, duplicate handling, and root-cause overlap
303
- - description completeness, including expected vs actual behavior, reproduction path, code-location hints, and headless execution readiness
304
- - acceptance criteria specificity and measurable verification method
305
- - preservation of user-provided wording in `description`, `acceptance_criteria`, and `user_context`
306
- - task-scoped `user_context` isolation: no unrelated sibling bug descriptions, logs, stack traces, reproduction steps, or supplementary materials, and shared context appears on multiple items only when explicitly global
307
- - severity/priority calibration: every reviewed bug has a short severity rationale and priority rationale, the preserved severity-to-priority mapping is followed, and high priority is not used without core outage, data loss/integrity, security/auth, timeout/crash, or no-workaround indicators
308
- 3. **Keep the review planning-only**: do NOT start `bugfix-pipeline-launcher`, do NOT run the bugfix pipeline, do NOT run tests/builds/installs, and do NOT implement source-code fixes.
309
- 4. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/bug-fix-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
299
+ 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.
300
+ 2. **Read actual planning artifacts directly**: inspect `.prizmkit/plans/bug-fix-list.json`, `.prizmkit/plans/bug-fix-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.
301
+ 3. **Identify review scope**: compare by stable bug 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 bug entries; preserve unchanged historical entries except when needed to verify duplicate/root-cause overlap or dependency references.
302
+ 4. **Run the local checklist** from the reference: schema compatibility, dependency/DAG consistency, duplicate handling, root-cause overlap, description completeness, expected vs actual behavior, reproduction path, code-location hints, acceptance criteria measurability, user-provided wording preservation, task-scoped `user_context` isolation, and severity/priority calibration.
303
+ 5. **Keep the review planning-only**: do NOT start `bugfix-pipeline-launcher`, do NOT run the bugfix pipeline, do NOT run tests/builds/installs, and do NOT implement source-code fixes.
304
+ 6. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/bug-fix-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
310
305
  ```bash
311
306
  python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
312
307
  ```
313
308
  Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
314
- 5. **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.
315
- 6. **Report the gate outcome** in the final summary: include `/prizmkit-code-review` verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result.
309
+ 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.
310
+ 8. **Report the gate outcome** in the final summary: include local generated-plan review verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result.
316
311
 
317
312
  #### Success Output
318
313
 
319
314
  ```
320
315
  .prizmkit/plans/bug-fix-list.json generated with 3 bugs (1 critical, 1 medium, 1 low)
321
- Review gate: /prizmkit-code-review PASS, reviewed B-001..B-003, accepted fixes: none, final validation: PASS
316
+ Local generated-plan review: PASS, reviewed B-001..B-003, accepted fixes: none, final validation: PASS
322
317
 
323
318
  Next steps:
324
319
  - Review: cat .prizmkit/plans/bug-fix-list.json
@@ -336,7 +331,7 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
336
331
  | **CP-BP-3** | Priorities Set | Severity/priority assigned, duplicates resolved | 3 |
337
332
  | **CP-BP-4** | Completeness Passed | All bugs pass headless execution readiness check | 4 |
338
333
  | **CP-BP-5** | File Generated | `bug-fix-list.json` passes validation script | 5 |
339
- | **CP-BP-6** | Plan Review Passed | `/prizmkit-code-review` reviewed only newly added/changed bug entries; accepted fixes were regenerated and revalidated | 5 |
334
+ | **CP-BP-6** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed bug entries, applied accepted fixes through draft/source data, regenerated, and revalidated | 5 |
340
335
 
341
336
  **Resume Detection**: If existing `.prizmkit/plans/bug-fix-list.json` or draft found, read `${SKILL_DIR}/references/error-recovery.md` §Resume Support for checkpoint-based resumption.
342
337
 
@@ -363,7 +358,7 @@ Batch-parse error logs with minimal interaction: parse automatically, then requi
363
358
  ```bash
364
359
  python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
365
360
  ```
366
- 7. If validation passes, run the mandatory Post-Generation Plan Review Gate before summarizing or recommending `bugfix-pipeline-launcher`.
361
+ 7. If validation passes, run the mandatory Local Generated-Plan Review Gate before summarizing or recommending `bugfix-pipeline-launcher`.
367
362
 
368
363
  ## Operation: From Tests
369
364
 
@@ -381,7 +376,7 @@ Batch-parse failed test output:
381
376
  ```bash
382
377
  python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
383
378
  ```
384
- 7. If validation passes, run the mandatory Post-Generation Plan Review Gate before summarizing or recommending `bugfix-pipeline-launcher`.
379
+ 7. If validation passes, run the mandatory Local Generated-Plan Review Gate before summarizing or recommending `bugfix-pipeline-launcher`.
385
380
 
386
381
  ## Operation: Validate
387
382
 
@@ -436,7 +431,7 @@ Recommend invoking `bugfix-pipeline-launcher` to configure and launch the pipeli
436
431
 
437
432
  After `.prizmkit/plans/bug-fix-list.json` is generated, validated, and reviewed, present:
438
433
  1. Summary of generated bugs (count, severity breakdown)
439
- 2. Review result: `/prizmkit-code-review` verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result
434
+ 2. Local generated-plan review result: verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result
440
435
  3. Recommend: "Say 'start fixing' to launch the bugfix pipeline via `bugfix-pipeline-launcher`"
441
436
  4. Alternative: fix a single bug interactively via `bug-fix-workflow`
442
437
 
@@ -0,0 +1,63 @@
1
+ # Generated Plan Review — Bug Planner
2
+
3
+ Use this local review loop after `.prizmkit/plans/bug-fix-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 `bug-planner` session generated, appended, or rewrote final bug 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/bug-fix-list.json`
14
+ - Draft/source list when present: `.prizmkit/plans/bug-fix-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 bug IDs (`B-*`).
23
+ 2. Treat bugs 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 bug IDs and changed bug IDs.
25
+ 4. Preserve unchanged historical bugs. Read unchanged entries only when needed to verify dependency references, duplicate handling, or root-cause overlap with reviewed bugs.
26
+ 5. If no snapshot exists, review all bug entries produced by the current generation flow.
27
+
28
+ ## Review Checklist
29
+
30
+ For every reviewed bug entry, check:
31
+
32
+ - Schema compatibility with `dev-pipeline-bug-fix-list-v1` and `.prizmkit/dev-pipeline/templates/bug-fix-list-schema.json`
33
+ - Dependency/DAG consistency, duplicate handling, and root-cause overlap
34
+ - Description completeness: expected vs actual behavior, reproduction path, code-location hints, affected environment, and headless execution readiness
35
+ - Acceptance criteria specificity and measurable verification method
36
+ - User-provided wording preservation in `description`, `acceptance_criteria`, and `user_context`
37
+ - Task-scoped `user_context` isolation: no unrelated sibling bug descriptions, logs, stack traces, reproduction steps, expected/actual behavior notes, or supplementary materials; shared context appears on multiple bugs only when explicitly global
38
+ - Severity/priority calibration: every reviewed bug has a short severity rationale and priority rationale, the preserved severity-to-priority mapping is followed, and high priority is not used without core outage, data loss/integrity, security/auth, timeout/crash, or no-workaround indicators
39
+ - Browser interaction and verification fields for UI-reproducible bugs 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 bug-fix execution readiness.
45
+ 3. Apply accepted fixes to `.prizmkit/plans/bug-fix-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-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
50
+ ```
51
+
52
+ 5. Re-run validation/generation until valid. Do not hand-patch `.prizmkit/plans/bug-fix-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 bug 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
@@ -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 Post-Generation Plan Review Gate (see §Post-Generation Plan Review Gate below); apply accepted fixes to the draft/source plan, regenerate, and revalidate until pass
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
 
@@ -270,7 +270,7 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
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 | `/prizmkit-code-review` reviewed only newly added/changed feature entries; accepted fixes were regenerated and revalidated | 10 |
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 Post-Generation Plan Review Gate, then summarize and recommend next step
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
@@ -373,29 +373,24 @@ python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit
373
373
  ```
374
374
  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
375
 
376
- ## Post-Generation Plan Review Gate
376
+ ## Local Generated-Plan Review Gate
377
377
 
378
- User requirement preserved verbatim: `每次完成任务规划的时候,应该调用/prizmkit-code-review 对新增的计划内容进行review,确保生成新增的计划的正确行和完整性。`
378
+ 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
379
 
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.
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 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
381
 
382
- 1. **Identify review scope**: compare the final validated feature list against the pre-session list when one existed. Review only newly added or changed feature entries. Do not re-review unchanged historical entries except when needed to verify dependency references.
383
- 2. **Invoke `/prizmkit-code-review` as a planning-quality gate** with an explicit prompt that this is a plan-entry review, not an implementation review. The review must check:
384
- - schema correctness and compatibility with `dev-pipeline-feature-list-v1`
385
- - dependency/DAG soundness, including missing, invalid, circular, or poorly ordered dependencies
386
- - description completeness and headless execution readiness
387
- - acceptance criteria specificity and measurability
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:
382
+ 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.
383
+ 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.
384
+ 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.
385
+ 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.
386
+ 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.
387
+ 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
388
  ```bash
394
389
  python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
395
390
  ```
396
391
  Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
397
- 5. **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.
398
- 6. **Report the gate outcome** in the final summary: include `/prizmkit-code-review` verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result.
392
+ 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.
393
+ 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
394
 
400
395
  ## Testing Defaults (Phase 8)
401
396
 
@@ -445,11 +440,11 @@ When the session appears to be ending:
445
440
 
446
441
  ## Handoff Message Template
447
442
 
448
- After successful validation and the Post-Generation Plan Review Gate, report:
443
+ After successful validation and the Local Generated-Plan Review Gate, report:
449
444
  1. Output file path
450
445
  2. Total features + newly added features
451
446
  3. Dependency and priority highlights
452
- 4. Review result: `/prizmkit-code-review` verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result
447
+ 4. Local generated-plan review result: verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result
453
448
  5. Recommended next action: `feature-pipeline-launcher`
454
449
 
455
450
  Then apply the post-planning handoff in §Scope Boundary (ask before proceeding; never auto-execute).
@@ -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
@@ -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) with detection results and user answers. Format:
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
@@ -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 CODEBUDDY.md/CLAUDE.md/README/linter configs, 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.
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.