prizmkit 1.1.195 → 1.1.197

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.
Files changed (107) hide show
  1. package/bin/create-prizmkit.js +0 -2
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +1 -1
  4. package/bundled/adapters/antigravity/rules-adapter.js +1 -13
  5. package/bundled/adapters/claude/paths.js +0 -1
  6. package/bundled/adapters/codex/paths.js +0 -1
  7. package/bundled/adapters/codex/settings-adapter.js +1 -1
  8. package/bundled/adapters/cursor/assets/prizmkit-hook.cjs +1 -1
  9. package/bundled/adapters/cursor/rules-adapter.js +1 -13
  10. package/bundled/adapters/pi/paths.js +0 -1
  11. package/bundled/dev-pipeline/.env.example +2 -2
  12. package/bundled/dev-pipeline/README.md +9 -6
  13. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +2 -2
  14. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +15 -25
  15. package/bundled/dev-pipeline/prizmkit_runtime/commands.py +31 -0
  16. package/bundled/dev-pipeline/prizmkit_runtime/iterate.py +1 -69
  17. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +1 -114
  18. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +2 -2
  19. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +78 -0
  20. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +4 -234
  21. package/bundled/dev-pipeline/prizmkit_runtime/status.py +0 -5
  22. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +9 -1
  23. package/bundled/dev-pipeline/scripts/feature_list_contract.py +0 -43
  24. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +15 -76
  25. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -112
  26. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +0 -13
  27. package/bundled/dev-pipeline/scripts/init-pipeline.py +0 -1
  28. package/bundled/dev-pipeline/scripts/prompt_framework.py +0 -79
  29. package/bundled/dev-pipeline/scripts/status_common.py +150 -4
  30. package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -2
  31. package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -2
  32. package/bundled/dev-pipeline/scripts/utils.py +6 -0
  33. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -5
  34. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -101
  35. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +0 -35
  36. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -52
  37. package/bundled/dev-pipeline/templates/feature-list-schema.json +0 -25
  38. package/bundled/dev-pipeline/templates/iterate/evaluate-prompt.md +5 -16
  39. package/bundled/dev-pipeline/templates/iterate/evaluation-schema.json +1 -58
  40. package/bundled/dev-pipeline/templates/iterate/headless-plan-prompt.md +1 -12
  41. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +0 -1
  42. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +0 -1
  43. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +2 -2
  44. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  45. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +1 -1
  46. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +0 -2
  47. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
  48. package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +0 -5
  49. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -2
  50. package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +1 -1
  51. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -3
  52. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
  53. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +3 -3
  54. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
  55. package/bundled/dev-pipeline/templates/sections/retrospective.md +3 -3
  56. package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +1 -1
  57. package/bundled/rules/USAGE.md +5 -19
  58. package/bundled/rules/general/coding-baseline.md +2 -2
  59. package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
  60. package/bundled/skills/_metadata.json +4 -4
  61. package/bundled/skills/app-planner/SKILL.md +1 -1
  62. package/bundled/skills/app-planner/references/generated-plan-review.md +1 -1
  63. package/bundled/skills/app-planner/references/rules-configuration.md +6 -7
  64. package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +2 -20
  65. package/bundled/skills/bug-planner/SKILL.md +5 -6
  66. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +1 -1
  67. package/bundled/skills/bug-planner/references/input-formats.md +2 -2
  68. package/bundled/skills/bug-planner/references/schema-validation.md +0 -1
  69. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +2 -9
  70. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +36 -25
  71. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +38 -31
  72. package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -25
  73. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +38 -31
  74. package/bundled/skills/feature-planner/SKILL.md +4 -10
  75. package/bundled/skills/feature-planner/references/completeness-review.md +2 -2
  76. package/bundled/skills/feature-planner/references/new-project-planning.md +0 -1
  77. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -25
  78. package/bundled/skills/iterate-pipeline-launcher/SKILL.md +53 -42
  79. package/bundled/skills/iterate-pipeline-launcher/references/configuration.md +52 -47
  80. package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
  81. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +2 -2
  82. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  83. package/bundled/skills/prizmkit-init/SKILL.md +6 -7
  84. package/bundled/skills/prizmkit-init/references/config-schema.md +5 -9
  85. package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +1 -1
  86. package/bundled/skills/prizmkit-plan/SKILL.md +1 -1
  87. package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
  88. package/bundled/skills/prizmkit-retrospective/references/rule-evolution-steps.md +11 -17
  89. package/bundled/skills/prizmkit-workflow/SKILL.md +6 -3
  90. package/bundled/skills/prizmkit-workflow/references/cold-start-rules.md +8 -7
  91. package/bundled/templates/project-memory-template.md +2 -1
  92. package/package.json +1 -1
  93. package/src/clean.js +29 -7
  94. package/src/config.js +13 -15
  95. package/src/index.js +1 -5
  96. package/src/manifest.js +3 -6
  97. package/src/platforms.js +0 -14
  98. package/src/scaffold.js +93 -313
  99. package/src/upgrade.js +32 -31
  100. package/bundled/adapters/claude/rules-adapter.js +0 -25
  101. package/bundled/adapters/codebuddy/rules-adapter.js +0 -30
  102. package/bundled/adapters/codex/rules-adapter.js +0 -30
  103. package/bundled/adapters/pi/rules-adapter.js +0 -13
  104. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +0 -10
  105. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -111
  106. package/bundled/skills/bug-planner/references/verification.md +0 -26
  107. package/bundled/skills/feature-planner/references/browser-interaction.md +0 -39
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Goal**: prove or strongly establish the root cause before editing code.
4
4
 
5
- 1. Read `.prizmkit/prizm-docs/root.prizm`, then only the relevant module indexes and detail docs for affected modules.
5
+ 1. Read `.prizmkit/prizm-docs/root.prizm`, then only the relevant module indexes and detail docs for affected modules. If the bug lands on `frontend`, `backend`, `database`, or `mobile` (mapping browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile), perform an exact path Read of `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and `.prizmkit/rules/<layer>-rules.md` (read both existing layer files if spanning two layers; never load all four layer files by default; do not depend on git tracking or glob). When `.prizmkit/rules/<layer>-rules.md` does not exist, do not block and do not silently skip—explicitly activate `framework-coding-baseline` (`coding-baseline` plus detected language/stack conventions).
6
6
  2. Trace from the error source to the likely root cause:
7
7
  - classify error type;
8
8
  - inspect relevant TRAPS/RULES;
@@ -13,7 +13,7 @@
13
13
  - Root Cause Hypothesis
14
14
  - Affected Files and Key Interfaces
15
15
  - Existing/Reproduction Tests
16
- - Relevant TRAPS/RULES
16
+ - Relevant TRAPS/RULES (record `- Active Rule Source: project-layer-rules (<paths>) | framework-coding-baseline (<detected language/stack conventions>) | not-applicable` and list only relevant rule highlights)
17
17
  4. Invoke `/prizmkit-plan` once with the exact `artifact_dir`, bug requirement, diagnosis context, and project context. It returns only `PLAN_READY` or `PLAN_BLOCKED`.
18
18
  5. On `PLAN_READY`, validate that `plan.md` starts with a reproduction test task that would fail before the fix. On `PLAN_BLOCKED`, record the blocker and stop.
19
19
  6. Do not create a FAST_PATH that bypasses code review or the mandatory post-review test gate; all committable Bugfixes use the same atomic stages.
@@ -12,7 +12,7 @@ Missing required evidence, an unsafe repair, a failed verification, or failure t
12
12
  {{RUNTIME_HELPER_CMD}} text final-verdict .prizmkit/bugfix/{{BUG_ID}}/review-report.md
13
13
  ```
14
14
 
15
- - Skill `PASS` with a valid report → map to `REVIEW_PASS` and proceed to configured verification.
15
+ - Skill `PASS` with a valid report → map to `REVIEW_PASS` and proceed to the test gate.
16
16
  - Skill `NEEDS_FIXES` with a valid report → map to `REVIEW_NEEDS_FIXES`, classify the concrete findings into an allowed `repair_scope`, record both values, and route through the bounded repair path. If no safe scope exists, block instead of guessing; do not commit.
17
17
  - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect progress once, run `{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step prizmkit-code-review --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason review_incomplete_or_invalid` (without `--stage-result`), write `failure-log.md`, and stop. Do not accept old or incidental verdict text and do not synthesize a passing result outside the skill.
18
18
 
@@ -17,7 +17,7 @@ Gate outcomes:
17
17
 
18
18
  - `TEST_PASS` with consistent `production_changed=false`: mark the test checkpoint step completed and continue to fix report (`fix-report.md`) before retrospective.
19
19
  - `TEST_PASS` with consistent `production_changed=true`: do NOT mark the test step completed; within the shared 3-round outer repair budget (`repair_round < 3`), re-enter `prizmkit-code-review` (`--status in_progress --repair-scope production`), run `/prizmkit-code-review` in delta mode (`review_scope=delta`), and re-run `/prizmkit-test` before continuing (if `repair_round >= 3`, record `WORKFLOW_BLOCKED` with `repair_round_limit`).
20
- - `TEST_NEEDS_FIXES`: this injected session classifies the exact unresolved correction into an allowed `repair_scope` and records both on the failed test step. If scope and outer budget permit, start `prizmkit-implement` with that explicit repair input; the helper rewinds stale downstream steps, then fresh review, configured verification, and test results are mandatory. If scope is unsafe/unknown or budget is exhausted, record terminal `WORKFLOW_BLOCKED`. Never recreate the testing-local repair loop.
20
+ - `TEST_NEEDS_FIXES`: this injected session classifies the exact unresolved correction into an allowed `repair_scope` and records both on the failed test step. If scope and outer budget permit, start `prizmkit-implement` with that explicit repair input; the helper rewinds stale downstream steps, then fresh review and test results are mandatory. If scope is unsafe/unknown or budget is exhausted, record terminal `WORKFLOW_BLOCKED`. Never recreate the testing-local repair loop.
21
21
  - `TEST_BLOCKED`: preserve the report/result and blocker, then record terminal `WORKFLOW_BLOCKED`. Do not reinterpret the result as a runtime crash or make speculative production edits.
22
22
 
23
23
  The skill itself diagnoses and repairs valid execution failures for at most three rounds before returning. The caller must not recreate that repair loop or maintain test-internal state.
@@ -8,5 +8,3 @@
8
8
  - Follow the active skills and runtime contracts; they determine execution topology, review ownership, and delegation boundaries.
9
9
  - On execution-unit timeout, preserve the active checkout and artifacts and follow the owning contract's recovery or downgrade path.
10
10
  - Checkpoint state is recovery guidance; mandatory stage results and their authoritative artifacts remain required.
11
- - Browser verification is present only when configured; follow its configured blocking policy.
12
- - If `DEV_PORT` is unknown, discover it from project config; do not guess port 3000.
@@ -3,4 +3,3 @@
3
3
  - **Bug ID**: {{BUG_ID}} | **Session**: {{SESSION_ID}} | **Run**: {{RUN_ID}}
4
4
  - **Bug Title**: {{BUG_TITLE}}
5
5
  - **Severity**: {{SEVERITY}}
6
- - **Verification Type**: {{VERIFICATION_TYPE}}
@@ -17,11 +17,6 @@ Fix {{BUG_ID}}: "{{BUG_TITLE}}".
17
17
 
18
18
  {{ENVIRONMENT}}
19
19
 
20
- ### Verification Contract
21
-
22
- - **Verification Type**: {{VERIFICATION_TYPE}}
23
- - **Manual/Hybrid Policy**: {{MANUAL_VERIFICATION_POLICY}}
24
-
25
20
  ### Acceptance Criteria
26
21
 
27
22
  {{ACCEPTANCE_CRITERIA}}
@@ -27,8 +27,7 @@ Use this helper to update checkpoint status. Do not hand-edit `workflow-checkpoi
27
27
  - After this injected session validates required gates and `/prizmkit-committer` returns `COMMIT_REQUEST_READY` with `runtime-commit-request.json`, stop normal work without another checkpoint-helper call for the committer. The Python Runtime alone validates the request, publishes commit readiness, executes the local commit, and advances the step to `completed/COMMITTED`.
28
28
  - For `REVIEW_NEEDS_FIXES` or `TEST_NEEDS_FIXES`, classify the concrete correction into one allowed `--repair-scope`, record the failed step and result, and let the helper select the bounded implementation route. If the scope cannot be established safely, record `WORKFLOW_BLOCKED` rather than guessing.
29
29
  - Record `PLAN_BLOCKED`, `IMPLEMENT_BLOCKED`, `TEST_BLOCKED`, or `RETRO_BLOCKED` with `--status failed --stage-result <result>` and a useful note. Record `COMMIT_BLOCKED` only when Committer returned it without producing `runtime-commit-request.json`; after a request exists, stop and leave all remaining committer transitions to Runtime. The helper records terminal `WORKFLOW_BLOCKED`; never mark a failed step completed.
30
- - When the routed implementation step is marked `in_progress`, the helper rewinds later checkpoint steps to pending while preserving their stage-owned reports for historical evidence. Fresh Review, configured verification, and Test results are still mandatory.
31
- - Complete `manual-verification` when configured; do not skip a required manual/hybrid evidence gate.
30
+ - When the routed implementation step is marked `in_progress`, the helper rewinds later checkpoint steps to pending while preserving their stage-owned reports for historical evidence. Fresh Review and Test results are still mandatory.
32
31
  - Omit `--note` when there is no useful failure or handoff note.
33
32
 
34
33
  ### Rules
@@ -1,6 +1,6 @@
1
1
  ### Feature Completion Summary
2
2
 
3
- After `TEST_PASS` and any configured browser verification, write `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` before retrospective and commit preparation:
3
+ After `TEST_PASS`, write `.prizmkit/specs/{{FEATURE_SLUG}}/completion-summary.json` before retrospective and commit preparation:
4
4
 
5
5
  ```json
6
6
  {
@@ -1,12 +1,12 @@
1
1
  ### Retrospective — Durable Documentation Sync
2
2
 
3
- After validating Code Review, configured verification, `TEST_PASS`, and the Feature completion summary, invoke `/prizmkit-retrospective` with the exact artifact root, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. It returns only `RETRO_COMPLETE` or `RETRO_BLOCKED`.
3
+ After validating Code Review, `TEST_PASS`, and the Feature completion summary, invoke `/prizmkit-retrospective` with the exact artifact root, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. It returns only `RETRO_COMPLETE` or `RETRO_BLOCKED`.
4
4
 
5
5
  Use `artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/`. The retrospective must:
6
6
 
7
7
  1. Treat only the exact supplied non-`.prizmkit/` `change_paths` as authoritative input; do not expand scope.
8
- 2. Synchronize `.prizmkit/prizm-docs/` only when durable structure, interfaces, dependencies, behavior, TRAPS, RULES, or DECISIONS changed.
9
- 3. Write `.prizmkit/specs/{{FEATURE_SLUG}}/retrospective-result.json` with `outcome=RETRO_COMPLETE` and `result=DOCS_UPDATED|NO_DOC_CHANGE`.
8
+ 2. Synchronize `.prizmkit/prizm-docs/` only when durable structure, interfaces, dependencies, behavior, TRAPS, RULES, or DECISIONS changed, and run optional Phase B rule evolution over existing `.prizmkit/rules/<layer>-rules.md` files when applicable (never modifying `.prizmkit/rules/builtin/*`).
9
+ 3. Write `.prizmkit/specs/{{FEATURE_SLUG}}/retrospective-result.json` with `outcome=RETRO_COMPLETE`, `result=DOCS_UPDATED|NO_DOC_CHANGE`, and optional `rule_evolution`.
10
10
  4. Validate any changed Prizm docs.
11
11
 
12
12
  Do not stage or commit. This injected session validates `retrospective-result.json`, maps `RETRO_COMPLETE` to the completed checkpoint step, and stops on `RETRO_BLOCKED`.
@@ -1,6 +1,6 @@
1
1
  ### Scoped Feature Test Gate — PrizmKit Test
2
2
 
3
- **Goal**: After Code Review and all configured Browser/Manual verification complete, use `/prizmkit-test` to analyze the complete affected business module and Regression Ring, add project-native tests, repair valid failures within the skill's bounded loop, and produce the terminal report/result pair.
3
+ **Goal**: After Code Review completes, use `/prizmkit-test` to analyze the complete affected business module and Regression Ring, add project-native tests, repair valid failures within the skill's bounded loop, and produce the terminal report/result pair.
4
4
 
5
5
  Run the skill with the current Feature artifact directory:
6
6
 
@@ -22,8 +22,8 @@ The JSON is the minimal terminal result projection and the report contains seman
22
22
  The caller checkpoint records only the returned testing result and caller-owned routing state. It must not ask the skill to manage sessions or checkpoints.
23
23
 
24
24
  - `TEST_PASS` with consistent `production_changed=false` across `test-report.md` and `test-result.json` → mark `prizmkit-test` completed and continue to completion summary (`completion-summary.json`) before retrospective.
25
- - `TEST_PASS` with consistent `production_changed=true` across `test-report.md` and `test-result.json` → do NOT complete `prizmkit-test`; check the shared outer repair budget (`repair_round < 3`). If budget permits, re-enter `prizmkit-code-review` (`--status in_progress --repair-scope production`), run `/prizmkit-code-review` in delta mode (`review_scope=delta`), re-run configured post-review verification (if present), and run `/prizmkit-test` again until `TEST_PASS` has `production_changed=false`. If `repair_round >= 3`, record `WORKFLOW_BLOCKED` (`blocked_reason=repair_round_limit`) and stop.
26
- - `TEST_NEEDS_FIXES` → this injected session classifies the exact unresolved correction into an allowed `repair_scope` and records both on the failed test step. If scope and outer budget permit, start `prizmkit-implement` with that explicit repair input; the checkpoint helper rewinds stale downstream steps, after which fresh `prizmkit-code-review`, configured verification, and `prizmkit-test` results are mandatory. If scope is unsafe/unknown or budget is exhausted, record terminal `WORKFLOW_BLOCKED`. Never recreate the testing-local repair loop.
25
+ - `TEST_PASS` with consistent `production_changed=true` across `test-report.md` and `test-result.json` → do NOT complete `prizmkit-test`; check the shared outer repair budget (`repair_round < 3`). If budget permits, re-enter `prizmkit-code-review` (`--status in_progress --repair-scope production`), run `/prizmkit-code-review` in delta mode (`review_scope=delta`), and run `/prizmkit-test` again until `TEST_PASS` has `production_changed=false`. If `repair_round >= 3`, record `WORKFLOW_BLOCKED` (`blocked_reason=repair_round_limit`) and stop.
26
+ - `TEST_NEEDS_FIXES` → this injected session classifies the exact unresolved correction into an allowed `repair_scope` and records both on the failed test step. If scope and outer budget permit, start `prizmkit-implement` with that explicit repair input; the checkpoint helper rewinds stale downstream steps, after which fresh `prizmkit-code-review` and `prizmkit-test` results are mandatory. If scope is unsafe/unknown or budget is exhausted, record terminal `WORKFLOW_BLOCKED`. Never recreate the testing-local repair loop.
27
27
  - `TEST_BLOCKED` → preserve the report, result, and blocker; record terminal `WORKFLOW_BLOCKED`. Do not reinterpret it as an AI CLI crash or perform speculative production edits.
28
28
 
29
29
  A test execution failure inside the skill is not automatically terminal: `/prizmkit-test` owns up to three direct diagnosis-and-repair rounds. The caller handles only the terminal result returned after that loop.
@@ -4,8 +4,8 @@ Review the completed implementation before the full Feature test gate runs. A re
4
4
 
5
5
  Invoke `/prizmkit-code-review` with the exact `artifact_dir`, spec, plan, and current change. The Skill owns review/repair and returns only `PASS` or `NEEDS_FIXES`; this injected session validates `review-report.md`, maps the result, updates checkpoint state, and chooses routing.
6
6
 
7
- - Skill `PASS` with a valid report → map to `REVIEW_PASS`, mark the review checkpoint step completed, and continue to the next configured Browser/Manual verification step; invoke `prizmkit-test` only after those configured checks finish.
8
- - Skill `NEEDS_FIXES` with a valid report → map to `REVIEW_NEEDS_FIXES`, classify the concrete findings into an allowed `repair_scope`, and update the failed review step with both values. The checkpoint helper increments the shared outer `repair_round`; then route `prizmkit-implement` → `prizmkit-code-review` → configured verification → `prizmkit-test`, and do not accept any result from before the repaired review. If no safe scope can be established, block instead of guessing.
7
+ - Skill `PASS` with a valid report → map to `REVIEW_PASS`, mark the review checkpoint step completed, and continue to `prizmkit-test`.
8
+ - Skill `NEEDS_FIXES` with a valid report → map to `REVIEW_NEEDS_FIXES`, classify the concrete findings into an allowed `repair_scope`, and update the failed review step with both values. The checkpoint helper increments the shared outer `repair_round`; then route `prizmkit-implement` → `prizmkit-code-review` → `prizmkit-test`, and do not accept any result from before the repaired review. If no safe scope can be established, block instead of guessing.
9
9
  - If the outer repair round is already three, record `WORKFLOW_BLOCKED`; do not start another repair route.
10
10
 
11
11
  Missing required evidence, unsafe repair, failed verification, or failure to converge under the review contract produces `REVIEW_NEEDS_FIXES`.
@@ -18,7 +18,7 @@ Missing required evidence, unsafe repair, failed verification, or failure to con
18
18
 
19
19
  Handle the marker:
20
20
 
21
- - `REVIEW_PASS` → proceed through configured Browser/Manual verification, then the structured test gate.
21
+ - `REVIEW_PASS` → proceed to the structured test gate.
22
22
  - `REVIEW_NEEDS_FIXES` → follow the repair route above; do not externally restart the review loop.
23
23
  - `REVIEW_INCOMPLETE` or `REVIEW_INVALID` → inspect append-only progress once, run `{{CHECKPOINT_PYTHON_CMD}} --checkpoint-path {{CHECKPOINT_PATH}} --step prizmkit-code-review --status failed --terminal-status WORKFLOW_BLOCKED --blocked-reason review_incomplete_or_invalid` (without `--stage-result`), write `failure-log.md`, and stop. Do not accept old/incidental verdict text or synthesize a pass.
24
24
 
@@ -17,7 +17,7 @@ If `EXISTING_CODE` is non-empty: your spec/plan/tasks must reflect this existing
17
17
 
18
18
  **Step A — Build Context Snapshot** (skip if `context-snapshot.md` already exists):
19
19
 
20
- 1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs. If the feature lands on `frontend`, `backend`, `database`, or `mobile` (mapping browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile), perform an exact path Read of `.prizmkit/rules/<layer>-rules.md` (read both existing files if spanning two layers; never load all four files by default; do not depend on git tracking or glob). When the target file does not exist, do not block and do not silently skip—explicitly activate `framework-coding-baseline` (`coding-baseline` plus detected language/stack conventions).
20
+ 1. Read `.prizmkit/prizm-docs/root.prizm` and the relevant module indexes and detail docs. If the feature lands on `frontend`, `backend`, `database`, or `mobile` (mapping browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile), perform an exact path Read of `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and `.prizmkit/rules/<layer>-rules.md` (read both existing layer files if spanning two layers; never load all four layer files by default; do not depend on git tracking or glob). When `.prizmkit/rules/<layer>-rules.md` does not exist, do not block and do not silently skip—explicitly activate `framework-coding-baseline` (`coding-baseline` plus detected language/stack conventions).
21
21
  2. Detect source code directories from KEY_FILES and STRUCTURE sections in `root.prizm`; if root docs are unavailable, use the helper to list likely source files:
22
22
  ```bash
23
23
  {{RUNTIME_HELPER_CMD}} artifact source-files . --json
@@ -1,12 +1,12 @@
1
1
  ### Retrospective — Durable Documentation Sync
2
2
 
3
- After validating Code Review, configured verification, `TEST_PASS`, and family reports/summaries, invoke `/prizmkit-retrospective` with the exact `artifact_dir`, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. The Skill returns only `RETRO_COMPLETE` or `RETRO_BLOCKED`.
3
+ After validating Code Review, `TEST_PASS`, and family reports/summaries, invoke `/prizmkit-retrospective` with the exact `artifact_dir`, exact non-`.prizmkit/` `change_paths`, and a concise `change_summary`. The Skill returns only `RETRO_COMPLETE` or `RETRO_BLOCKED`.
4
4
 
5
5
  The retrospective must:
6
6
 
7
7
  1. Treat only the exact supplied non-`.prizmkit/` `change_paths` as authoritative input; do not expand scope.
8
- 2. Synchronize `.prizmkit/prizm-docs/` only for durable structure, interfaces, dependencies, behavior, TRAPS, RULES, or DECISIONS.
9
- 3. Write `{{ARTIFACT_DIR}}/retrospective-result.json` with `outcome=RETRO_COMPLETE` and `result=DOCS_UPDATED|NO_DOC_CHANGE`.
8
+ 2. Synchronize `.prizmkit/prizm-docs/` only for durable structure, interfaces, dependencies, behavior, TRAPS, RULES, or DECISIONS, and run optional Phase B rule evolution over existing `.prizmkit/rules/<layer>-rules.md` files when applicable (never modifying `.prizmkit/rules/builtin/*`).
9
+ 3. Write `{{ARTIFACT_DIR}}/retrospective-result.json` with `outcome=RETRO_COMPLETE`, `result=DOCS_UPDATED|NO_DOC_CHANGE`, and optional `rule_evolution`.
10
10
  4. Validate any changed Prizm docs.
11
11
 
12
12
  Do not stage or commit. This injected session validates `retrospective-result.json` and maps `RETRO_COMPLETE` to the completed checkpoint step. `RETRO_BLOCKED` records the blocker and stops.
@@ -2,7 +2,7 @@
2
2
 
3
3
  The Python runtime, not the AI session, executes the pipeline's local Git commit. This stage contains no prompt-level commit authorization.
4
4
 
5
- After Code Review, all configured verification, `TEST_PASS`, family reports/summaries, and retrospective have completed:
5
+ After Code Review, `TEST_PASS`, family reports/summaries, and retrospective have completed:
6
6
 
7
7
  1. As the session orchestrator, validate every required stage artifact and result first. Atomic Skills do not perform this sequencing check.
8
8
  2. Re-inventory the complete final Git-visible workspace: staged, unstaged, added, deleted, renamed, copied, and non-ignored untracked content. Confirm Code Review and Test authority covers every behavior-affecting change, including correct work that predated this session or lives in framework, generated, instruction, lock, or host-support paths. If production behavior changed after those gates, re-enter them before commit preparation.
@@ -41,14 +41,11 @@ All rules registered in `core/rules/_rules-metadata.json` are installed automati
41
41
 
42
42
  ## Installed File Locations
43
43
 
44
- | Platform | Install Directory | Format |
45
- |----------|------------------|--------|
46
- | Claude Code | `.claude/rules/<name>.md` | Markdown + YAML frontmatter |
47
- | CodeBuddy | `.codebuddy/rules/<name>.mdc` | `.mdc` format (auto-converted) |
48
- | Codex | `.agents/rules/<name>.md` | Behavioral Markdown guidance |
49
- | Pi | `.pi/rules/<name>.md` | Behavioral Markdown guidance |
50
- | Cursor | `.cursor/rules/<name>.mdc` | Always-applied `.mdc` without temporal metadata |
51
- | Antigravity | `.agents/plugins/prizmkit/rules/<name>.md` | Always-applied Markdown + YAML frontmatter (`trigger: always_on`) |
44
+ All 6 supported platforms (`claude`, `codebuddy`, `codex`, `pi`, `cursor`, `antigravity`) install built-in rules uniformly once under the project's framework rules directory:
45
+
46
+ - Built-in rules: `.prizmkit/rules/builtin/<name>.md` (plain Markdown, managed by `install` / `upgrade` / `uninstall`)
47
+ - Project layer rules: `.prizmkit/rules/{frontend,backend,database,mobile}-rules.md` (project-owned; never overwritten by `upgrade` or deleted by `uninstall`)
48
+ - Host-native framework entrypoints: Cursor retains `.cursor/rules/prizmkit-framework.mdc` and Antigravity retains `.agents/plugins/prizmkit/rules/prizmkit-framework.md`; Claude Code, CodeBuddy, Codex, and Pi receive framework guidance via their project memory files (`CLAUDE.private.md`, `CODEBUDDY.private.md`, `AGENTS.private.md`, `.pi/APPEND_SYSTEM.md`).
52
49
 
53
50
  Rule names use `category/filename` path format (e.g., `prizm/prizm-documentation`). During installation, the last segment is used as the filename (`prizm-documentation.md`).
54
51
 
@@ -111,14 +108,3 @@ After modifying `core/rules/`, update the npm package's `bundled/` contents:
111
108
  ```bash
112
109
  npm run bundle
113
110
  ```
114
-
115
- ---
116
-
117
- ## CodeBuddy `.mdc` Format Conversion
118
-
119
- When installing to CodeBuddy, `.md` files are automatically converted to `.mdc` format by `adapters/codebuddy/rules-adapter.js`:
120
-
121
- - The original `description` field is preserved
122
- - `alwaysApply: true`, `enabled: true`, and `updatedAt` fields are automatically added
123
- - The `globs` field (if present) is kept unchanged
124
- - Rule body content remains unchanged
@@ -4,12 +4,12 @@ description: "Zero-config coding baseline covering clear intent, modular boundar
4
4
 
5
5
  # Coding Baseline
6
6
 
7
- Apply these falsifiable baselines when planning, implementing, or reviewing code. When no matching `.prizmkit/rules/<layer>-rules.md` exists, explicitly activate `framework-coding-baseline` with detected language/stack conventions (e.g., strict typing and handled promises in TypeScript, no bare `except:` or mutable defaults in Python, explicit `err` handling in Go, parameterized SQL).
7
+ Apply these falsifiable baselines (`.prizmkit/rules/builtin/coding-baseline.md` and `.prizmkit/rules/builtin/cohesive-modeling.md`) when planning, implementing, or reviewing code. When no matching `.prizmkit/rules/<layer>-rules.md` exists, explicitly activate `framework-coding-baseline` with detected language/stack conventions (e.g., strict typing and handled promises in TypeScript, no bare `except:` or mutable defaults in Python, explicit `err` handling in Go, parameterized SQL).
8
8
 
9
9
  ## Six Baseline Pillars
10
10
 
11
11
  1. **Intent-Revealing Naming & Single Responsibility**: Name modules, types, functions, and variables by domain intent. Keep each unit to one cohesive responsibility rather than mixing I/O, business logic, and formatting.
12
- 2. **Modular Boundaries**: Complement `cohesive-modeling.md` by isolating domain logic behind explicit interfaces; prevent circular imports and hidden cross-module state coupling.
12
+ 2. **Modular Boundaries**: Complement `.prizmkit/rules/builtin/cohesive-modeling.md` by isolating domain logic behind explicit interfaces; prevent circular imports and hidden cross-module state coupling.
13
13
  3. **Boundary Input Validation & Explicit Error Handling**: Validate untrusted or cross-boundary inputs (requests, CLI args, config/env, deserialized payloads) at the entry boundary and fail fast with contextual errors; never swallow failures with empty catch/except blocks or silent fallbacks.
14
14
  4. **Zero Dead Code & No Duplicated Core Logic**: Remove unused code, unreachable branches, commented-out blocks, and obsolete flags; centralize shared invariants instead of copy-pasting core logic.
15
15
  5. **Baseline Security**: Use parameterized queries and structured command arguments (never interpolate untrusted input into SQL or shell strings); never hardcode or log secrets/tokens; enforce least privilege and explicit authorization checks.
@@ -5,7 +5,8 @@ description: "PrizmKit progressive context loading protocol"
5
5
  This project uses PrizmKit's progressive loading protocol:
6
6
  - ON SESSION START: Read exact `.prizmkit/prizm-docs/root.prizm` (L0 project map) when it exists.
7
7
  - ON TASK: Read only relevant direct-child L1 documents (`.prizmkit/prizm-docs/<module>.prizm`) selected through root MODULE_INDEX/MODULE_GROUPS pointers.
8
- - LAYER_RULES: If the current task lands on frontend, backend, database, or mobile, Read `.prizmkit/rules/<layer>-rules.md` when that exact convention path exists and enforce it consciously for planning, implementation HOW refinement, and code review. Never load all four files by default. If a task spans two layers, read both existing files. Map browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile. Discover by exact path Read; do not depend on git tracking or glob. When the file does not exist, do not block and do not silently skip—explicitly activate the built-in `coding-baseline` plus detected language/stack conventions (e.g., strict typing and no unhandled promises in TypeScript, no bare `except:` or mutable default arguments in Python, explicit `err` handling in Go, parameterized SQL) and record the active rule source (`project-layer-rules` vs `framework-coding-baseline`). Enforce three-tier override precedence without a clarification pause: Tier 1 (highest) repository explicit contracts, current source and L2 `.prizm` facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions; Tier 2 `.prizmkit/rules/<layer>-rules.md`; Tier 3 (fallback) framework `coding-baseline` and language conventions—when rules conflict, those current sources win without a clarification pause. L0 `RULES:` MUST/NEVER remain authoritative for that key.
8
+ - BUILTIN_RULES: Framework built-in rules live in `.prizmkit/rules/builtin/` (`coding-baseline.md`, `cohesive-modeling.md`, `agent-operational-rules.md`, `prefer-linux-commands.md`, `prizm-progressive-loading.md`, `prizm-documentation.md`, `prizm-commit-workflow.md`); read the relevant files before planning, implementation, review, commit, or documentation work.
9
+ - LAYER_RULES: If the current task lands on frontend, backend, database, or mobile, perform an exact path Read of `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and `.prizmkit/rules/<layer>-rules.md` when those paths exist, and enforce them consciously for planning, implementation HOW refinement, and code review. Never load all four files by default. If a task spans two layers, read both existing files. Map browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile. Discover by exact path Read; do not depend on git tracking or glob. When `.prizmkit/rules/<layer>-rules.md` does not exist, do not block and do not silently skip—explicitly activate the built-in `coding-baseline` plus detected language/stack conventions (e.g., strict typing and no unhandled promises in TypeScript, no bare `except:` or mutable default arguments in Python, explicit `err` handling in Go, parameterized SQL) and record the active rule source (`project-layer-rules` vs `framework-coding-baseline`). Enforce three-tier override precedence without a clarification pause: Tier 1 (highest) repository explicit contracts, current source and L2 `.prizm` facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions; Tier 2 `.prizmkit/rules/<layer>-rules.md`; Tier 3 (fallback) framework `coding-baseline` and language conventions—when rules conflict, those current sources win without a clarification pause. L0 `RULES:` MUST/NEVER remain authoritative for that key.
9
10
  - ON FILE EDIT: Read the complete relevant nested L2 document and complete parent/child documents needed to resolve its SUBDIRS or DETAILS pointer before modification. Grep-only fragments are insufficient modification context.
10
11
  - IF L2 IS ABSENT: Inspect only bounded target source and narrowly implicated contracts; proceed without creating a placeholder. Documentation creation belongs to brownfield core initialization, Retrospective, or explicit documentation repair and requires complete Value-Gate-qualified content.
11
12
  - NEVER load all L1/L2 documents at session start, create L3, or load unrelated modules.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.195",
2
+ "version": "1.1.197",
3
3
  "skills": {
4
4
  "prizmkit": {
5
5
  "description": "Framework introduction and navigation for the formal single-requirement lifecycle, project initialization, Prizm docs, and independent deployment.",
@@ -111,7 +111,7 @@
111
111
  "hasScripts": true
112
112
  },
113
113
  "feature-pipeline-launcher": {
114
- "description": "Build feature pipeline start, status, logs, stop, and safe retry commands from a validated feature-list.json with optional on-demand read-only AI CLI capability probing, without executing pipelines.",
114
+ "description": "Build feature pipeline start, status, logs, stop, and safe retry commands from a validated feature-list.json with start-time bounded read-only AI CLI capability probing (skipped on non-start intents), without executing pipelines.",
115
115
  "tier": "companion",
116
116
  "category": "orchestration-skill",
117
117
  "subcategory": "pipelines",
@@ -119,7 +119,7 @@
119
119
  "hasScripts": false
120
120
  },
121
121
  "bugfix-pipeline-launcher": {
122
- "description": "Build bugfix pipeline start, status, logs, stop, and safe retry commands from a validated bug-fix-list.json with optional on-demand read-only AI CLI capability probing, without executing pipelines.",
122
+ "description": "Build bugfix pipeline start, status, logs, stop, and safe retry commands from a validated bug-fix-list.json with start-time bounded read-only AI CLI capability probing (skipped on non-start intents), without executing pipelines.",
123
123
  "tier": "companion",
124
124
  "category": "orchestration-skill",
125
125
  "subcategory": "pipelines",
@@ -127,7 +127,7 @@
127
127
  "hasScripts": false
128
128
  },
129
129
  "iterate-pipeline-launcher": {
130
- "description": "Build autonomous product-iteration start, status, logs, stop, and post-pause resume commands with optional on-demand read-only AI CLI capability probing, without executing pipelines.",
130
+ "description": "Build autonomous product-iteration start, status, logs, stop, and post-pause resume commands with start-time bounded read-only AI CLI capability probing (skipped on non-start intents), without executing pipelines.",
131
131
  "tier": "companion",
132
132
  "category": "orchestration-skill",
133
133
  "subcategory": "pipelines",
@@ -64,7 +64,7 @@ Return `NEEDS_FIXES` whenever any answer is unavailable or ambiguous. Ask the us
64
64
  - **Conventions & Infrastructure discovery** (after Intent Confirmation): resolve the target once through **Current-host project instruction target resolution**, inspect `### Project Conventions` (if missing/incomplete, read `${SKILL_DIR}/references/project-conventions-discovery.md` for project-specific AI discovery via `AskUserQuestion`—no fixed checklist; normalize & pass the Pre-Generation gate before saving under `### Project Conventions`). Then check `### Infrastructure` using `${SKILL_DIR}/references/infrastructure-convention-discovery.md` (DB/deployment/cloud services via `AskUserQuestion`, each question offering `"Skip — decide later"` → `<!-- [topic]: deferred -->`), pass the gate, and update `### Infrastructure`.
65
65
  - **Rules Configuration (after CP-AP-1.5)**: optional per-layer rules (`.prizmkit/rules/<layer>-rules.md` — skip freely if declined). Read `${SKILL_DIR}/references/rules-configuration.md`: present detected/confirmed layers once with `AI Auto-Synthesize (Recommended)` as the default path (fusing project facts including pointed detail `.prizm` docs, canonical `references/rules/<layer>/` assets, built-in rule deduplication, and conflict-gated stack risks into the unified 5-section contract, upgrading any `Mode: cold-start-lightweight` file while preserving `## 5. Project-Evolved Rules`), plus `Advanced Manual Questionnaire (Quick / Full)` and `Skip rules configuration`. Run `${SKILL_DIR}/scripts/validate-rules-configuration.py --rules-root ${SKILL_DIR}/references/rules` before synthesis/questioning and `--validate-output` after rendering; pass both conflict and Pre-Generation gates before finalizing `.prizmkit/rules/` or updating `.prizmkit/prizm-docs/root.prizm` (`LAYER_RULES:` block only).
66
66
  - **Project brief accumulation**: maintain normalized checklist items in memory or `.prizmkit/plans/project-brief.draft.md`; do not write the final `.prizmkit/plans/project-brief.md` until the Pre-Generation Headless Context Completeness Gate passes.
67
- - **Prerequisites** (read-only, never block, do not create `config.json` here): check `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json` (`tech_stack` pre-fill — confirm instead of re-asking), and resolved `### Project Conventions` / `### Infrastructure`.
67
+ - **Prerequisites** (read-only, never block, do not create `config.json` here): check `.prizmkit/prizm-docs/root.prizm`, `.prizmkit/config.json` (`detected_layers` and `tech_stack` pre-fill — confirm instead of re-asking), and resolved `### Project Conventions` / `### Infrastructure`.
68
68
 
69
69
  ## Interaction Style & Intent Confirmation
70
70
 
@@ -46,7 +46,7 @@ For every reviewed app-planning artifact or section, check:
46
46
  - Project brief completeness: goal, users, differentiators, constraints, tech stack assumptions, and at least three actionable ideas when producing a final brief
47
47
  - Consistency among conventions, infrastructure, architecture decisions, and project brief content
48
48
  - Infrastructure completeness or explicit deferral for database, deployment, and cloud services topics when those flows ran
49
- - Rules Configuration integrity: both deterministic validators passed (`--rules-root` static check and `--validate-output` returning `valid: true` on every written `.prizmkit/rules/<layer>-rules.md`); unified metadata headers (`Owner: app-planner`, `Mode`, `Layer`, `Stack Snapshot`) and all five sections (`## 1.`–`## 5.`) are present; `ai-synthesized` Section 1 entries carry provenance (`verified-from-code`, `confirmed-by-user`, or `ai-inferred-default`); Quick defaults were explicitly authorized when manual mode ran; upgraded `cold-start-lightweight` files preserved all pre-existing `## 5. Project-Evolved Rules` entries verbatim; fixed content contains only invariants without duplicating `coding-baseline.md` or `cohesive-modeling.md`; selected decisions own their policy domains; no active rule conflicts with the decision ledger or Deny List; unmatched/not-applicable choices are explicit; dual-native decisions remain in separate iOS/Android profiles; raw UTF-8 size stays <= 16 KB (warning at 12 KB) and `## 5. Project-Evolved Rules` <= 20 entries; and rendered files contain no residual placeholders
49
+ - Rules Configuration integrity: both deterministic validators passed (`--rules-root` static check and `--validate-output` returning `valid: true` on every written `.prizmkit/rules/<layer>-rules.md`); unified metadata headers (`Owner: app-planner`, `Mode`, `Layer`, `Stack Snapshot`) and all five sections (`## 1.`–`## 5.`) are present; `ai-synthesized` Section 1 entries carry provenance (`verified-from-code`, `confirmed-by-user`, or `ai-inferred-default`); Quick defaults were explicitly authorized when manual mode ran; upgraded `cold-start-lightweight` files preserved all pre-existing `## 5. Project-Evolved Rules` entries verbatim; fixed content contains only invariants without duplicating `coding-baseline.md` or `cohesive-modeling.md`; selected decisions own their policy domains; no active rule conflicts with the decision ledger or Deny List; unmatched/not-applicable choices are explicit; dual-native decisions remain in separate iOS/Android profiles; rules stay high-signal, falsifiable, non-redundant, and free of residual placeholders
50
50
  - Rules pointer consistency: generated `.prizmkit/rules/<layer>-rules.md` files are referenced by the `root.prizm` `LAYER_RULES:` pointer block when rules were configured; `RULES:` remains MUST/NEVER and is not a file pointer
51
51
  - Substantive user meaning and detail preservation at matching detail after conversational normalization in project brief ideas, conventions, infrastructure notes, architecture decisions, and rules
52
52
  - Artifact-wide readability: every generated natural-language value across all AI-visible fields and sections—including briefs/drafts, instruction sections, generated rules, appendices, comments, brainstorm summaries, quoted evidence, and parentheticals—is a standalone domain statement without dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, raw answer-map content, or planning provenance
@@ -46,15 +46,14 @@ Every file written by `app-planner` at `.prizmkit/rules/<layer>-rules.md` (in bo
46
46
  <!-- Governed incremental rules evolved from verified review/test evidence; seeded empty on fresh generation and preserved verbatim on upgrade -->
47
47
  ```
48
48
 
49
- Size and hygiene limits (enforced by `--validate-output`):
49
+ Quality and hygiene requirements (enforced by `--validate-output`):
50
50
 
51
- - Target size: under **12 KB (12,288 bytes)** raw UTF-8 (soft warning band at 12 KB; hard failure above **16 KB / 16,384 bytes**).
52
- - Evolution cap: maximum **20 entries** under `## 5. Project-Evolved Rules`.
51
+ - Every clause must be high-signal, falsifiable, non-redundant with automated tooling or `.prizmkit/rules/builtin/{coding-baseline,cohesive-modeling}.md`, and conflict-free, with non-append-only semantic deduplication and obsolete-rule cleanup (no artificial byte or item-count caps).
53
52
  - Zero unresolved `{{ ... }}` placeholders, raw question IDs, option-letter shorthand, transcript-provenance annotations, platform-specific skill paths, retired independent layer-rules skill names, workflow task IDs, or branch names.
54
53
 
55
54
  ## Step 1: Detect Layers and Inspect Existing Layer Files
56
55
 
57
- 1. Prefer `.prizmkit/config.json` `tech_stack` and confirmed earlier app-planner decisions when present.
56
+ 1. Prefer `.prizmkit/config.json` `detected_layers`, `.prizmkit/config.json` `tech_stack`, and confirmed earlier app-planner decisions when present.
58
57
  2. Otherwise infer active layers from project files and confirmed scope:
59
58
  - `frontend`: browser UI framework, bundler, or frontend package indicators;
60
59
  - `backend`: service framework, API entrypoint, or server runtime indicators;
@@ -98,7 +97,7 @@ For each confirmed layer, synthesize the unified five-section rule file by fusin
98
97
  - For **frontend**: preserve invariant data-shape constraints, render the M1–M9 UI/UX design modules (keeping M1–M5 and M7 invariants, selecting M6 and M8 from responsive/localization/chrome facts, keeping M9 explicit not-applicable statement, keeping gate notes source-only, and keeping WCAG targets with the accessibility decision), name selected options then follow installed `package.json` versions and existing codegen/framework-docs entrypoints, mark compatible recommendations as non-binding (never Must-install unless selected or already present), and honor dependency-forbid constraints.
99
98
  - For **mobile**: preserve dual-native `iOS` and `Android` profile separation when dual-native is detected or confirmed.
100
99
  3. **Built-in Global Rules Deduplication**:
101
- - Check built-in framework rules (`coding-baseline.md` and `cohesive-modeling.md`) and active project linters/formatters/compilers.
100
+ - Check built-in framework rules (`.prizmkit/rules/builtin/coding-baseline.md` and `.prizmkit/rules/builtin/cohesive-modeling.md`) and active project linters/formatters/compilers.
102
101
  - Do **not** repeat generic rules already enforced by `coding-baseline.md`, `cohesive-modeling.md`, or automated tooling; keep layer rules focused on concrete stack-specific, project-specific, and layer-invariant constraints.
103
102
  4. **Conflict-Gated AI Stack-Specific Engineering Risk Rules**:
104
103
  - Add concise, falsifiable `MUST:` / `NEVER:` rules for high-impact engineering risks specific to the project's stack (such as concurrency, data integrity, schema/migration safety, SSR/hydration boundaries, auth/session boundaries, or wire-compatibility redlines).
@@ -194,7 +193,7 @@ Check every invariant, derived, and AI-synthesized rule against the ledger:
194
193
  --validate-output .prizmkit/rules/<layer>-rules.md
195
194
  ```
196
195
  (Or run `--validate-output .prizmkit/rules` once all configured layers are written.)
197
- 4. Require `valid: true` (exit code 0). If validation returns `valid: false` (exit code 1), fix the underlying synthesis/ledger source, re-render while preserving `## 5. Project-Evolved Rules`, and rerun `--validate-output` until it passes. If the 12 KB soft warning triggers, tighten redundant prose when safe while keeping all verified constraints and evolved rules intact.
196
+ 4. Require `valid: true` (exit code 0). If validation returns `valid: false` (exit code 1), fix the underlying synthesis/ledger source, re-render while preserving `## 5. Project-Evolved Rules`, and rerun `--validate-output` until it passes. Keep wording concise and high-signal without artificial size truncation.
198
197
 
199
198
  ## Step 8: Update `root.prizm`
200
199
 
@@ -216,6 +215,6 @@ Report:
216
215
  - mode used per layer (`ai-synthesized` or `manual-questionnaire` with Quick/Full depth);
217
216
  - provenance summary (`verified-from-code`, `confirmed-by-user`, `ai-inferred-default`) or manual decision status summary;
218
217
  - preserved `## 5. Project-Evolved Rules` entry count on upgrades;
219
- - deterministic static resource validation (`--rules-root`) and generated output validation (`--validate-output`) results including byte size and warnings;
218
+ - deterministic static resource validation (`--rules-root`) and generated output validation (`--validate-output`) results including measured byte size and warnings;
220
219
  - conflict-gate result;
221
220
  - `root.prizm` `LAYER_RULES:` pointer result.
@@ -43,10 +43,6 @@ FIXED_RULE_FORBIDDEN_PATTERNS = (
43
43
  )
44
44
 
45
45
  # Output validation constants and contracts
46
- OUTPUT_SOFT_WARN_BYTES = 12 * 1024 # 12 KB
47
- OUTPUT_HARD_MAX_BYTES = 16 * 1024 # 16 KB
48
- MAX_EVOLVED_ENTRIES = 20
49
-
50
46
  UNIFIED_SECTIONS = (
51
47
  "## 1. Confirmed Stack & Scope Decisions",
52
48
  "## 2. Invariant Baseline",
@@ -611,16 +607,6 @@ def _validate_output_file(file_path: Path) -> OutputFileReport:
611
607
  return report
612
608
 
613
609
  report.bytes = len(raw_bytes)
614
- if report.bytes > OUTPUT_HARD_MAX_BYTES:
615
- report.errors.append(
616
- f"raw UTF-8 size {report.bytes} bytes exceeds 16 KB hard limit "
617
- f"({OUTPUT_HARD_MAX_BYTES} bytes)"
618
- )
619
- elif report.bytes >= OUTPUT_SOFT_WARN_BYTES:
620
- report.warnings.append(
621
- f"raw UTF-8 size {report.bytes} bytes reached 12 KB soft warning band "
622
- f"({OUTPUT_SOFT_WARN_BYTES} bytes)"
623
- )
624
610
 
625
611
  try:
626
612
  text = raw_bytes.decode("utf-8")
@@ -732,11 +718,6 @@ def _validate_output_file(file_path: Path) -> OutputFileReport:
732
718
  section5_clean = HTML_COMMENT_RE.sub("", section5)
733
719
  evolved_entries = LIST_ITEM_RE.findall(section5_clean)
734
720
  report.evolved_count = len(evolved_entries)
735
- if report.evolved_count > MAX_EVOLVED_ENTRIES:
736
- report.errors.append(
737
- f"## 5. Project-Evolved Rules has {report.evolved_count} entries "
738
- f"(exceeds hard cap of {MAX_EVOLVED_ENTRIES})"
739
- )
740
721
 
741
722
  _check_contradictions(text, report.errors)
742
723
  return report
@@ -754,7 +735,8 @@ def validate_output(target: Path) -> dict[str, object]:
754
735
  file_reports.append(file_report)
755
736
  elif target.is_dir():
756
737
  entries = sorted(
757
- entry for entry in target.iterdir() if not entry.name.startswith(".")
738
+ entry for entry in target.iterdir()
739
+ if not entry.name.startswith(".") and not (entry.is_dir() and entry.name == "builtin")
758
740
  )
759
741
  if not entries:
760
742
  errors.append(f"no layer-rules files found in directory: {target}")
@@ -37,7 +37,7 @@ Consume only root metadata (`project_description`, `global_context`), `task_coun
37
37
 
38
38
  ## Priority, Severity & Scenario Routing
39
39
 
40
- Preserve exact Severity → Priority mapping (`critical`/`high` → `high`, `medium` → `medium`, `low` → `low`). During bug extraction and prioritization, follow `${SKILL_DIR}/references/severity-rules.md`: do not collapse into uniform `high/high`; require a concrete high-impact indicator (core outage, data loss/integrity, security/auth failure, timeout/crash/500, no workaround) and show `ID | Title | Severity | Severity Rationale | Priority | Priority Rationale | Verification` before writing.
40
+ Preserve exact Severity → Priority mapping (`critical`/`high` → `high`, `medium` → `medium`, `low` → `low`). During bug extraction and prioritization, follow `${SKILL_DIR}/references/severity-rules.md`: do not collapse into uniform `high/high`; require a concrete high-impact indicator (core outage, data loss/integrity, security/auth failure, timeout/crash/500, no workaround) and show `ID | Title | Severity | Severity Rationale | Priority | Priority Rationale` before writing.
41
41
 
42
42
  **Operations**: **Interactive Planning** (`plan bug fixes`, `report bugs`) · **From Log** (`parse errors`, stack traces) · **From Tests** (`these tests are failing`, `parse test output`) · **Validate** (`validate bug list`) · **Summary** (`bug summary`, `list bugs`). Route A generates a new list (`Phase 1-5`); Route B appends via bounded `context` → draft → `append`.
43
43
 
@@ -48,7 +48,7 @@ Gather `project_name`, `project_description`, `global_context` (`tech_stack`, `t
48
48
  **Upfront Material Detection (Hard Rule)**: If materials were supplied upfront, acknowledge them ("I received the following materials: [list]"), read/fetch them immediately, AND still ask "Are there any additional materials you'd like to provide?". Otherwise ask once for code paths, docs/API specs, error screenshots, web links, or log files. Tag bug-specific purposes and normalize cleanly: Material ingestion follows the same durability rule as final output (inline excerpts, omit transient non-code paths, retain purpose-tagged stable refs).
49
49
 
50
50
  ### Phase 2: Bug Collection (CP-BP-2)
51
- Read `${SKILL_DIR}/references/severity-rules.md` and `${SKILL_DIR}/references/input-formats.md` (and `${SKILL_DIR}/references/verification.md` when `verification_type` is `manual`/`hybrid` or involves UI/browser flows) to extract Title, Description (expected vs actual + severity rationale), Severity, Environment, Verification type (`automated` default), Acceptance criteria (verifiable, never subjective), and optional model override.
51
+ Read `${SKILL_DIR}/references/severity-rules.md` and `${SKILL_DIR}/references/input-formats.md` to extract Title, Description (expected vs actual + severity rationale), Severity, Environment, Acceptance criteria (verifiable, never subjective), and optional model override.
52
52
  - **Per-bug clarification**: require confirmed actual/expected behavior, scope, severity rationale, and verification decisions; keep unverified root cause/location as evidence-backed hypotheses or unknowns.
53
53
  - **Per-bug confirmation (mandatory)** — present the structured summary using `${SKILL_DIR}/assets/bug-confirmation-template.md`, ask its three confirmation questions, finalize only after user confirms all three, and ask "Any more bugs to add? (yes/no)".
54
54
 
@@ -87,22 +87,21 @@ Read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the sin
87
87
 
88
88
  ## Operation: From Log
89
89
  Triggers: `"parse this error log"`, `"here's a stack trace"`, `"parse these errors"`.
90
- 1. Accept log path/content, deduplicate unique errors, and generate entries (Severity via `severity-rules.md`, `error_source`, `verification_type: "automated"`, measurable criteria).
90
+ 1. Accept log path/content, deduplicate unique errors, and generate entries (Severity via `severity-rules.md`, `error_source`, measurable criteria).
91
91
  2. Write `.prizmkit/plans/bug-fix-list.draft.json`. Run the Phase 4 Headless Context Completeness Gate on every parsed bug (clarifying missing expected behavior, scope, rationale, or verification).
92
92
  3. Run merge check (`--dry-run` if list exists) and §Local Generated-Plan Review Gate (`PASS`), insert once, complete §Draft Lifecycle cleanup, and present final result. For later adjustments, recreate the minimum source draft from confirmed in-memory entries or exact-ID `show`, then rerun `generate` or `append --replace-tail` before recommending `bugfix-pipeline-launcher`.
93
93
 
94
94
  ## Operation: From Tests
95
95
  Triggers: `"these tests are failing"`, `"parse test output"`.
96
- 1. Parse failed test cases (`failed_test_path`, `error_message`, `verification_type: "automated"`).
96
+ 1. Parse failed test cases (`failed_test_path`, `error_message`).
97
97
  2. Write `.prizmkit/plans/bug-fix-list.draft.json`. Run the Phase 4 Headless Context Completeness Gate on every parsed failed-test bug (clarifying consequential missing expectations/scope; allow edits/merges/removals).
98
98
  3. Run merge check + §Local Generated-Plan Review Gate (`PASS`), insert once, complete §Draft Lifecycle cleanup, and present final result. For later adjustments, recreate the minimum source draft from confirmed in-memory entries or exact-ID `show`, then rerun `generate` or `append --replace-tail` before recommending `bugfix-pipeline-launcher`.
99
99
 
100
100
  ## Operation: Validate & Operation: Summary
101
101
  - **Validate** (`"validate bug list"`, `"check .prizmkit/plans/bug-fix-list.json"`): run `python3 ${SKILL_DIR}/scripts/validate-bug-list.py validate .prizmkit/plans/bug-fix-list.json` and report errors/warnings without modifying source code.
102
- - **Summary** (`"bug summary"`, `"show bug list"`, `"list bugs"`): print totals by severity/status and prioritized `[B-NNN] Title (SEVERITY) — verification_type` summary.
102
+ - **Summary** (`"bug summary"`, `"show bug list"`, `"list bugs"`): print totals by severity/status and prioritized `[B-NNN] Title (SEVERITY)` summary.
103
103
 
104
104
  ## Verification, Policy, Errors & Output
105
- - **Verification Defaults**: Apply `${SKILL_DIR}/references/verification.md` defaults (`automated`/`manual`/`hybrid`; `browser_interaction` for UI bugs) when not already resolved in Phase 2.
106
105
  - **Next-Step Execution Policy**: Report bug summary/counts, Local generated-plan review result (verdict, reviewed batch IDs plus reviewed root prose when applicable, accepted fixes), single insert `appended_ids` + validation result, Draft cleanup result: `removed`, or retained path and recovery reason, and recommend `bugfix-pipeline-launcher` (or `bug-fix-workflow` for a single interactive bug). Never run scripts directly or auto-execute.
107
106
  - **Error Handling**: Read `${SKILL_DIR}/references/error-recovery.md` on validation failures/interruptions (ask clarifying questions on unparseable logs, ambiguous severity, potential duplicates, empty input, or broken dependencies).
108
107
  - **Output**: `.prizmkit/plans/bug-fix-list.json` conforming to `.prizmkit/dev-pipeline/templates/bug-fix-list-schema.json` (plus validation/summary report when requested).
@@ -8,7 +8,7 @@ Present this after extracting and clarifying each bug:
8
8
  ┌─ Bug Confirmation: B-NNN ─────────────────────────────
9
9
  │ Title: <auto-suggested title>
10
10
  │ Description: <expected vs actual behavior>
11
- │ Severity: <auto-classified> | Verification: <type>
11
+ │ Severity: <auto-classified>
12
12
  │
13
13
  │ Reproduction: <confirmed steps/evidence, or "unknown — bounded discovery required">
14
14
  │ Affected: <evidence-backed module/feature, or "unknown">
@@ -58,7 +58,7 @@ Every new or changed bug is an executable contract for a fresh AI session that h
58
58
 
59
59
  1. **Self-contained contract**: `description` and `acceptance_criteria`, read together, MUST define the objective, current state and actual behavior, desired state and expected behavior, selected scope and decisions, severity rationale, constraints, non-goals, relevant integrations, edge cases, reproduction conditions, verification decisions, and completion evidence. Include the durable severity rationale in `description`. AI rewrite is allowed; dropping a confirmed item is not. There is no word-count or acceptance-criteria count upper limit.
60
60
  2. **Supplementary evidence only**: `user_context` is supplementary evidence only. Logs, stack traces, screenshots, and source excerpts may support diagnosis, but MUST NOT expand, replace, or contradict the contract. If `user_context` were removed, a fresh bug-fix session must still know what fails, where/when it fails, correct behavior, selected scope, and verification. Preserve substantive requirements and constraints in durable prose at matching detail.
61
- 3. **Severity and verification are durable decisions**: Write complete severity rationale, selected scope, environment, reproduction path, verification type, and verification decisions by meaning; never store only an option label or conversational answer.
61
+ 3. **Severity and verification are durable decisions**: Write complete severity rationale, selected scope, environment, reproduction path, and verification expectations by meaning; never store only an option label or conversational answer.
62
62
  4. **Clarify by impact, do not guess**: Clarify expected behavior, selected scope, applicability, and relative references when ambiguity changes the contract. Root cause, code location, and fix approach may stay explicitly labeled as evidence-backed hypotheses or unknowns (`do not force certainty or invent a fix`).
63
63
  5. **Bug isolation**: Keep one bug per task unless bugs share the same root cause or failing contract and the user confirms merging (never domain-merge unrelated bugs in the same module). Repeat shared environment or constraints only when global.
64
64
 
@@ -82,4 +82,4 @@ Every new or changed bug is an executable contract for a fresh AI session that h
82
82
 
83
83
  ## Bounded Existing-List Context (Hard Rule)
84
84
 
85
- For append flows on `.prizmkit/plans/bug-fix-list.json`, NEVER read the complete existing list or NEVER perform default full-history keyword search. Inspect the five most recently appended `{id, description}` pairs from `context` only for material continuation, duplication, conflict, shared public contract, or real prerequisite (`Chronology, broad module overlap, shared technology, reusable implementation ideas, or similar wording alone do not establish relevance`; Add no historical content by default; incorporate only the minimum exact information whose omission would make scope, behavior, compatibility, acceptance criteria, or dependency ordering incorrect; no vague `related to B-123`; add an old ID to `dependencies` only when it is a real execution prerequisite). Use `show --id B-NNN` only for explicit old IDs or validation errors. Write additions-only `{ "bugs": [...] }` (required draft fields: `id`, `title`, `description`, `severity`, `error_source`, `verification_type`, `acceptance_criteria`; `status` defaults to `pending`) in `.prizmkit/plans/bug-fix-list.draft.json`, check `append --dry-run` (Do not ask for separate user approval merely to promote the draft into the final list), pass Local Generated-Plan Review, insert once, delete the draft immediately, and present the final written result. Conditions that must keep a draft live in `references/error-recovery.md`. Preserve unchanged historical bugs.
85
+ For append flows on `.prizmkit/plans/bug-fix-list.json`, NEVER read the complete existing list or NEVER perform default full-history keyword search. Inspect the five most recently appended `{id, description}` pairs from `context` only for material continuation, duplication, conflict, shared public contract, or real prerequisite (`Chronology, broad module overlap, shared technology, reusable implementation ideas, or similar wording alone do not establish relevance`; Add no historical content by default; incorporate only the minimum exact information whose omission would make scope, behavior, compatibility, acceptance criteria, or dependency ordering incorrect; no vague `related to B-123`; add an old ID to `dependencies` only when it is a real execution prerequisite). Use `show --id B-NNN` only for explicit old IDs or validation errors. Write additions-only `{ "bugs": [...] }` (required draft fields: `id`, `title`, `description`, `severity`, `error_source`, `acceptance_criteria`; `status` defaults to `pending`) in `.prizmkit/plans/bug-fix-list.draft.json`, check `append --dry-run` (Do not ask for separate user approval merely to promote the draft into the final list), pass Local Generated-Plan Review, insert once, delete the draft immediately, and present the final written result. Conditions that must keep a draft live in `references/error-recovery.md`. Preserve unchanged historical bugs.
@@ -15,7 +15,6 @@ Use this checklist for manual validation when `validate-bug-list.py` is not avai
15
15
  - [ ] `description`: non-empty string
16
16
  - [ ] `severity`: one of `critical`, `high`, `medium`, `low`
17
17
  - [ ] `error_source.type`: one of `stack_trace`, `user_report`, `failed_test`, `log_pattern`, `monitoring_alert`
18
- - [ ] `verification_type`: one of `automated`, `manual`, `hybrid`
19
18
  - [ ] `acceptance_criteria`: non-empty array of strings
20
19
  - [ ] `status`: one of `pending`, `in_progress`, `completed`, `failed`, `skipped`, `needs_info`, `auto_skipped`; new bugs should start as `pending`, while `auto_skipped` is runtime-managed for blocked descendants
21
20
  - [ ] `dependencies` if present: array of existing `B-NNN` IDs; no self-dependencies
@@ -37,7 +37,6 @@ from datetime import datetime, timezone
37
37
 
38
38
  VALID_SEVERITIES = {"critical", "high", "medium", "low"}
39
39
  VALID_SOURCE_TYPES = {"stack_trace", "user_report", "failed_test", "log_pattern", "monitoring_alert"}
40
- VALID_VERIFICATION_TYPES = {"automated", "manual", "hybrid"}
41
40
  VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "needs_info", "auto_skipped"}
42
41
  ALLOWED_LIST_FIELDS = {
43
42
  "$schema", "project_name", "project_description", "created_at",
@@ -50,8 +49,8 @@ ALLOWED_GLOBAL_CONTEXT_FIELDS = {
50
49
  }
51
50
  ALLOWED_BUG_FIELDS = {
52
51
  "id", "title", "description", "severity", "priority", "error_source",
53
- "environment", "affected_modules", "verification_type", "dependencies",
54
- "acceptance_criteria", "status", "user_context", "browser_interaction",
52
+ "environment", "affected_modules", "dependencies",
53
+ "acceptance_criteria", "status", "user_context",
55
54
  "model",
56
55
  }
57
56
  BUG_ID_PATTERN = re.compile(r"^B-\d{3}$")
@@ -236,12 +235,6 @@ def validate(data, feature_ids=None):
236
235
  errors.append("{} ({}): invalid error_source.type '{}' — must be one of {}".format(
237
236
  prefix, bug_id, source_type, sorted(VALID_SOURCE_TYPES)))
238
237
 
239
- # verification_type
240
- vtype = bug.get("verification_type", "")
241
- if vtype not in VALID_VERIFICATION_TYPES:
242
- errors.append("{} ({}): invalid verification_type '{}' — must be one of {}".format(
243
- prefix, bug_id, vtype, sorted(VALID_VERIFICATION_TYPES)))
244
-
245
238
  # acceptance_criteria
246
239
  ac = bug.get("acceptance_criteria", [])
247
240
  if not ac or not isinstance(ac, list):