prizmkit 1.1.147 → 1.1.149

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 (30) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/skills/_metadata.json +1 -1
  3. package/bundled/skills/app-planner/SKILL.md +48 -40
  4. package/bundled/skills/app-planner/references/architecture-decisions.md +5 -11
  5. package/bundled/skills/app-planner/references/brainstorm-guide.md +1 -1
  6. package/bundled/skills/app-planner/references/frontend-design-guide.md +1 -1
  7. package/bundled/skills/app-planner/references/generated-plan-review.md +12 -9
  8. package/bundled/skills/app-planner/references/infrastructure-convention-discovery.md +2 -2
  9. package/bundled/skills/app-planner/references/project-brief-guide.md +8 -4
  10. package/bundled/skills/app-planner/references/project-conventions-discovery.md +1 -1
  11. package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +4 -2
  12. package/bundled/skills/app-planner/references/rules/backend/question-bank.md +1 -1
  13. package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +4 -2
  14. package/bundled/skills/app-planner/references/rules/database/question-bank.md +1 -1
  15. package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +4 -4
  16. package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +6 -6
  17. package/bundled/skills/app-planner/references/rules/frontend/template.md +1 -1
  18. package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +4 -2
  19. package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +1 -1
  20. package/bundled/skills/app-planner/references/rules-configuration.md +5 -1
  21. package/bundled/skills/bug-planner/SKILL.md +23 -13
  22. package/bundled/skills/bug-planner/references/generated-plan-review.md +10 -8
  23. package/bundled/skills/feature-planner/SKILL.md +22 -13
  24. package/bundled/skills/feature-planner/assets/planning-guide.md +5 -3
  25. package/bundled/skills/feature-planner/references/completeness-review.md +14 -9
  26. package/bundled/skills/feature-planner/references/generated-plan-review.md +10 -7
  27. package/bundled/skills/refactor-planner/SKILL.md +21 -11
  28. package/bundled/skills/refactor-planner/references/generated-plan-review.md +10 -8
  29. package/bundled/skills/refactor-planner/references/planning-phases.md +8 -6
  30. package/package.json +1 -1
@@ -46,7 +46,7 @@ For each selected layer, run the 4-phase rule generation pattern:
46
46
  - `options_vary_by: "<Qid>"` — the question is still asked; only its option list depends on that prior answer.
47
47
  - Legacy shortcut labels in question banks such as `recommended`, `default`, or `skip` are converted into selectable options in `AskUserQuestion`.
48
48
  - Do not ask the user to type these commands manually; selectable options prevent merged or missed decisions.
49
- - Record answers in memory after each group. Track which manifest questions are answered, auto-derived, or conditionally skipped so Phase D can verify coverage.
49
+ - Resolve each response to a complete semantic choice and record only that normalized internal value after each group. Track which manifest questions are answered, auto-derived, or conditionally skipped so Phase D can verify coverage; raw turns and answer tokens are never writer input.
50
50
 
51
51
  ### Phase C — Auto-derivation
52
52
 
@@ -58,9 +58,13 @@ For each selected layer, run the 4-phase rule generation pattern:
58
58
 
59
59
  - Read `${SKILL_DIR}/references/rules/<layer>/template.md`.
60
60
  - Fill all template placeholders with accumulated content from Phases A+B+C.
61
+ - Never copy raw answer text into a rendered rule. Convert option labels, custom replies, recommended/default shortcuts, and internal Q&A state into normalized semantic values that name the selected technology, behavior, constraint, or deferral.
62
+ - Internal question IDs, answer tokens, `answers[Qx]`, dialogue-role labels, recommendation markers, and planning chronology must not appear in generated rules, TL;DR tables, headers, appendices, comments, or metadata prose.
63
+ - Apply the same source durability rule during rendering: inline relevant meaning from non-code planning/evidence files and omit their transient paths; retain only purpose-tagged stable execution-time references.
61
64
  - Post-render self-check driven by `question-manifest.json` -> `template_placeholders`:
62
65
  1. Coverage pass — for every placeholder in `from_questions`, confirm it traces to an answered question OR an `auto_derived_when` path OR a conditionally-skipped question (`required_if` false). If a `from_questions` placeholder has no source, go back and ask it before writing.
63
66
  2. Residual pass — scan the rendered document for any residual `{{ ` or ` }}`; count must be 0. Placeholders in `from_fixed_rules`, `auto_generated`, and `metadata` are filled from fixed rules, Phase D generation, and project metadata.
67
+ 3. AI-readability pass — scan all AI-visible fields and sections. Every generated natural-language value must stand alone without the planning conversation; reject raw turns, Q&A provenance, unresolved relative wording, or transient source dependencies before writing.
64
68
  - Generate Appendix A (Deny List) and Appendix B (Recommended Tools) per template instructions.
65
69
  - Create `.prizmkit/rules/` directory if it doesn't exist.
66
70
  - Write `.prizmkit/rules/<layer>-rules.md`.
@@ -50,28 +50,38 @@ Every new or changed bug is an executable contract for a fresh AI session that h
50
50
  4. **Clarify, do not guess**: Ask the user for clarification whenever expected behavior, root-cause scope, material applicability, or a relative reference has multiple plausible meanings.
51
51
  5. **Bug isolation**: Each bug contract and its supplementary evidence contain only material relevant to that bug. Repeat shared environment or constraints only when explicitly global.
52
52
 
53
+ ### Artifact-Wide AI Readability
54
+
55
+ - Every generated natural-language value must be a standalone domain statement. This applies to all AI-visible fields and sections, including `project_description`, `global_context`, titles, descriptions, acceptance criteria, severity/priority rationale, `error_source`, affected-module and environment text, `user_context`, verification goals, comments, appendices, and parentheticals.
56
+ - Machine metadata such as schema markers, stable IDs, statuses, enums, and timestamps is exempt. Natural-language metadata is not exempt.
57
+ - Never emit dialogue-role or chronology labels such as `user said`, `user answered`, `original request`, `this round`, `previous discussion`, `as discussed earlier`, `用户本轮回答`, or `如前面讨论`. Never emit planning question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, or raw internal answer-map entries as domain content.
58
+ - `user_context` and `error_source` may hold independently intelligible evidence, not transcript fragments. Rewrite every confirmed turn into direct actual/expected behavior, scope, rationale, reproduction, or verification evidence before generation.
59
+
53
60
  ### Conversational Context Normalization
54
61
 
55
62
  - Never persist standalone option labels such as `A`, `B`, `C`, `方案A`, or `方案B` as execution context.
56
- - Expand a selected option into complete meaning with inline traceability: `Selected decision: <complete meaning> (original response: "<exact response>")`.
63
+ - Expand a selected option into complete meaning and preserve substantive user rationale and constraints in durable prose at matching detail.
64
+ - Do not emit transcript annotations such as `(original response: "...")` in final bug artifacts. Bare option labels and relative shorthand are not independently intelligible and materially useful exact wording.
57
65
  - Resolve `上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, or `go with your recommendation` only when there is one provable antecedent. Otherwise ask the user for clarification; never guess.
58
- - Exclude conversational authorization such as `所有问题都按你的推荐处理` when it controls planning behavior but does not constrain the fix.
59
- - Do not present rejected root-cause or fix alternatives as active instructions; preserve one only when it defines a necessary non-goal.
66
+ - Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization. Apply the concrete accepted recommendations, then omit the raw approval; never repeat it once per accepted recommendation.
67
+ - Do not present rejected root-cause or fix alternatives as active instructions; preserve one only when it defines a necessary non-goal. Retain exact user wording only when it is independently intelligible and materially useful.
60
68
 
61
69
  ### Reference Material Handling
62
70
 
63
- - Every retained file path, URL, screenshot, log, stack trace, or document reference must be purpose-tagged: state why it is relevant and what the execution AI should inspect. This applies to paths and URLs in structured evidence and `user_context`.
64
- - Good: `logs/api-500.log lines 220-248 inspect the empty-password request, exception, and correlation ID`; Bad: `logs/api-500.log` alone.
65
- - For large materials, record title/location and purpose, preserve only task-relevant exact excerpts, and move confirmed expected behavior, selected scope, severity rationale, and verification decisions into `description` and `acceptance_criteria`.
71
+ - Every retained stable code, configuration, machine-consumed interface, or URL reference must be purpose-tagged: state why it is relevant and what the execution AI should inspect. This applies to paths and URLs in structured evidence and `user_context`.
72
+ - Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`, uploaded-report paths, screenshot paths, or ad-hoc log paths in durable bug contracts. Instead, copy or normalize the task-relevant content and exact evidence excerpt into `description` and `acceptance_criteria`; the bug must not depend on that source file still existing.
73
+ - Good: `src/auth/validation.ts inspect empty-password handling`; Bad: `logs/api-500.log inspect the failure`. For a transient log, inline the relevant request, exception, and correlation evidence without retaining the path.
74
+ - For large materials, preserve purpose and only task-relevant exact excerpts, and move confirmed expected behavior, selected scope, severity rationale, and verification decisions into `description` and `acceptance_criteria`. Retain a location only when it is a stable execution-time source of truth.
66
75
  - Embed complete large materials only when the execution session cannot access the source and all content is genuinely required.
67
76
 
68
77
  ### Good and Bad Normalization Examples
69
78
 
70
79
  - Bad: `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation` stored as selected fix scope.
71
- - Good: `Selected decision: reject empty passwords in request validation with HTTP 400 and do not enter credential verification (original response: "方案B")`.
72
- - Good: `Selected decision: reproduce against the API integration test and retain UI verification as a regression check (original response: "use option A")`.
73
- - Bad: storing `所有问题都按你的推荐处理` as a bug constraint; it is conversational authorization.
74
- - Bad: attaching a complete production log while saying only `fix this`. Good: retain the relevant exception excerpt and purpose-tagged log location, then state actual behavior, expected behavior, scope, and verification in the task contract.
80
+ - Bad: `Selected decision: reject empty passwords with HTTP 400 (original response: "方案B")`; the annotation still requires an unseen option list.
81
+ - Good: `Selected decision: reject empty passwords in request validation with HTTP 400 and do not enter credential verification`.
82
+ - Good: `Selected decision: reproduce against the API integration test and retain UI verification as a regression check`.
83
+ - Bad: storing or repeating `全部按照推荐` / `所有问题都按你的推荐处理` as a bug constraint; it is conversational authorization.
84
+ - Bad: attaching a complete production log or retaining its local path while saying only `fix this`. Good: inline the relevant exception excerpt, actual/expected behavior, scope, and verification; retain a monitoring URL only when it is a stable execution-time source of truth.
75
85
 
76
86
  **Multi-bug isolation example:**
77
87
  - User request includes: `Bug A: login crashes when password is empty`, `Bug B: CSV export loses Chinese characters`, and `Shared: production uses Node 20`.
@@ -194,7 +204,7 @@ Gather project metadata from the project's own configuration and documentation
194
204
  >
195
205
  > If none, we'll proceed with bug collection."
196
206
 
197
- If the user provides materials, require or infer only when unambiguous a bug-specific purpose for each material; otherwise ask what the execution AI should inspect. Read/fetch the relevant material before Phase 2. For web links, retrieve the relevant content; for images, analyze the relevant visual evidence. Preserve purpose-tagged locations and task-relevant exact excerpts, but do not inject complete large materials merely for verbatim preservation.
207
+ If the user provides materials, require or infer only when unambiguous a bug-specific purpose for each material; otherwise ask what the execution AI should inspect. Read/fetch the relevant material before Phase 2. For web links, retrieve the relevant content; for images, analyze the relevant visual evidence. Material ingestion follows the same durability rule as final output: copy or normalize task-relevant requirements and exact evidence, omit transient non-code paths, and retain only purpose-tagged stable execution-time sources. Do not inject complete large materials merely to preserve them.
198
208
 
199
209
  Output: `project_name`, `project_description`, `global_context` fields populated.
200
210
 
@@ -261,7 +271,7 @@ Only finalize the bug entry after user confirms all three points.
261
271
 
262
272
  ### Phase 4: Pre-Generation Headless Context Completeness Gate
263
273
 
264
- Before generating `.prizmkit/plans/bug-fix-list.json`, review every new or changed bug as if the reviewer has never seen the planning conversation. Preserve unchanged historical bugs; do not bulk-rewrite them. First remove `user_context` from the review view and answer from `description` plus `acceptance_criteria` alone:
274
+ Before generating `.prizmkit/plans/bug-fix-list.json`, review every new or changed bug as if the reviewer has never seen the planning conversation. Preserve unchanged historical bugs; do not bulk-rewrite them. Scan all AI-visible fields and sections first: every generated natural-language value in `project_description`, `global_context`, item fields, `error_source`, environment/evidence, `user_context`, comments, and parentheticals must be session-independent, with no dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, or planning provenance. Review changed root prose even when no bug item changed. Then remove `user_context` from the review view and answer from `description` plus `acceptance_criteria` alone:
265
275
 
266
276
  1. What exact problem or outcome is this task responsible for?
267
277
  2. What exists today, including actual behavior, and what must change to the expected behavior?
@@ -444,7 +454,7 @@ Recommend invoking `bugfix-pipeline-launcher` to configure and launch the pipeli
444
454
 
445
455
  After `.prizmkit/plans/bug-fix-list.json` is generated, validated, and reviewed, present:
446
456
  1. Summary of generated bugs (count, severity breakdown)
447
- 2. Local generated-plan review result: verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result
457
+ 2. Local generated-plan review result: verdict, reviewed bug IDs plus reviewed root prose when applicable, accepted fixes (or "none"), and final validation result
448
458
  3. Recommend: "Say 'start fixing' to launch the bugfix pipeline via `bugfix-pipeline-launcher`"
449
459
  4. Alternative: fix a single bug interactively via `bug-fix-workflow`
450
460
 
@@ -20,8 +20,8 @@ Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whethe
20
20
  ## Review Scope
21
21
 
22
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.
23
+ 2. Root project prose is reviewable content, not generator metadata. Review new or changed `project_description` and `global_context` even when no bug item changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
24
+ 3. Treat bugs as changed only when item fields changed; review newly added bug IDs and changed bug IDs.
25
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
26
  5. If no snapshot exists, review all bug entries produced by the current generation flow.
27
27
 
@@ -32,17 +32,18 @@ For every reviewed bug entry, check:
32
32
  - Schema compatibility with `dev-pipeline-bug-fix-list-v1` and `.prizmkit/dev-pipeline/templates/bug-fix-list-schema.json`
33
33
  - Dependency/DAG consistency, duplicate handling, and root-cause overlap
34
34
  - Description completeness: objective, current/actual behavior, desired/expected behavior, selected scope, reproduction path, code-location hints, affected environment, relevant integrations, constraints, non-goals, edge cases, verification decisions, completion evidence, and headless execution readiness
35
+ - Artifact-wide readability: every generated natural-language value across all AI-visible fields and sections—including `project_description`, `global_context`, `error_source`, environment/evidence, rationales, `user_context`, comments, and parentheticals—is a standalone domain statement without dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, or planning provenance
35
36
  - Acceptance criteria specificity and measurable verification method
36
37
  - User-provided detail preservation at matching detail after conversational normalization
37
38
  - `user_context` is supplementary evidence only: it does not expand, replace, or contradict the bug contract; if `user_context` were removed, execution and verification remain unambiguous
38
39
  - 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
39
- - Purpose-tagged paths and URLs, screenshots, logs, stack traces, and documents; large materials retain title/location, purpose, and task-relevant exact excerpts rather than full-content injection
40
+ - Purpose-tagged stable code, configuration, machine-consumed interface, and URL references; transient non-code planning/evidence paths are replaced by inline task-relevant decisions and excerpts, and large materials are bounded rather than injected in full
40
41
  - 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
41
42
  - Browser interaction and verification fields for UI-reproducible bugs when applicable
42
43
 
43
44
  ## Headless Context Completeness Gate
44
45
 
45
- Repeat the pre-generation simulation for every reviewed new or changed bug as if the reviewer has never seen the planning conversation. From the artifact alone, answer:
46
+ Repeat the pre-generation simulation for every reviewed new or changed bug as if the reviewer has never seen the planning conversation. First scan all AI-visible fields and sections; machine metadata is exempt, but every generated natural-language value must be session-independent. From the artifact alone, answer:
46
47
 
47
48
  1. What exact problem or outcome is this task responsible for?
48
49
  2. What exists today and what must change from actual to expected behavior?
@@ -53,14 +54,15 @@ Repeat the pre-generation simulation for every reviewed new or changed bug as if
53
54
  7. Does any phrase require an unseen earlier question, recommendation, or option list?
54
55
  8. Do quoted source materials agree with the final task decision?
55
56
 
56
- Return `NEEDS_FIXES` if any answer is missing, ambiguous, available only in `user_context`, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`. Accept an expanded decision only when it states complete meaning with inline traceability such as `(original response: "方案B")`. Exclude conversational authorization that does not constrain implementation. Ask the user for clarification when there is not one provable antecedent.
57
+ Return `NEEDS_FIXES` if any answer is missing, ambiguous, available only in `user_context`, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`. Parenthetical notes are part of the artifact and must pass the same fresh-session test. Do not emit transcript annotations such as `(original response: "...")`; raw shorthand is not independently intelligible and materially useful. Preserve substantive rationale in the durable bug contract. Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization: write the concrete accepted decisions, omit the raw approval, and never repeat it once per accepted recommendation. Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`; copy or normalize the task-relevant content and evidence excerpt into the contract, which must not depend on that source file still existing. Ask the user for clarification when there is not one provable antecedent.
57
58
 
58
59
  Do not add new JSON fields, context objects, schema versions, or pipeline runtime structures. Apply this stricter gate prospectively to new or changed entries and preserve unchanged historical bugs.
59
60
 
60
61
  ### Good and Bad Review Examples
61
62
 
62
- - Bad: `按推荐走` as severity or verification scope; Good: `Selected decision: classify as medium because export is incorrect but a JSON workaround exists; verify with the existing Unicode export test (original response: "按推荐走")`.
63
- - Bad: a bare log path; Good: `logs/export.log lines 90-118 inspect encoding selection and the emitted response header` plus only task-relevant exact excerpts.
63
+ - Bad: `按推荐走` as severity or verification scope, including as `(original response: "按推荐走")`; Good: `Selected decision: classify as medium because export is incorrect but a JSON workaround exists; verify with the existing Unicode export test`.
64
+ - Bad: repeating `(original response: "全部按照推荐")` after each accepted bug decision; Good: write each concrete decision and omit the blanket approval.
65
+ - Bad: `.agents/brainstorm/export.md` or a transient log path in the final bug contract; Good: inline the selected behavior and exact relevant failure excerpt, and retain only a purpose-tagged stable code/interface path when execution must inspect it.
64
66
  - Bad: `所有问题都按你的推荐处理` as a fix constraint; Good: omit it as conversational authorization unless a concrete decision was separately confirmed.
65
67
 
66
68
  ## Fix Loop
@@ -83,7 +85,7 @@ python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/pla
83
85
  Report in the final handoff summary:
84
86
 
85
87
  - `Local generated-plan review: PASS` or `NEEDS_FIXES`
86
- - Reviewed bug IDs
88
+ - Reviewed bug IDs and reviewed root prose (`project_description` / `global_context`) when applicable
87
89
  - Accepted fixes, or `none`
88
90
  - Final validation result
89
91
  - Note when review was not applicable because no new final planning content was written
@@ -57,29 +57,38 @@ Every new or changed feature is an executable contract for a fresh AI session th
57
57
  3. **Clarify, do not guess**: Ask the user for clarification whenever requirements conflict or a reference has multiple plausible antecedents. Do not finalize the feature while ambiguity remains.
58
58
  4. **Feature isolation**: In multi-feature planning, each contract and its supplementary evidence contain only material relevant to that feature. Repeat shared context only when it explicitly applies to every affected feature. Ask the user to map material whose applicability is unclear.
59
59
 
60
+ ### Artifact-Wide AI Readability
61
+
62
+ - Every generated natural-language value must be a standalone domain statement. This applies to all AI-visible fields and sections, including `project_description`, `global_context`, titles, descriptions, acceptance criteria, rationales, `sub_features`, `completion_notes`, `testing`, `user_context`, evidence and environment text, browser verification goals, comments, appendices, and parentheticals.
63
+ - Machine metadata such as schema markers, stable IDs, statuses, enums, and timestamps is exempt. Natural-language metadata is not exempt.
64
+ - Never emit dialogue-role or chronology labels such as `user said`, `user answered`, `original request`, `this round`, `previous discussion`, `as discussed earlier`, `用户本轮回答`, or `如前面讨论`. Never emit planning question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, or raw internal answer-map entries as domain content.
65
+ - `user_context` may hold independently intelligible evidence, not transcript fragments. Rewrite every confirmed turn into direct product behavior, constraints, rationale, or verification evidence before generation.
66
+
60
67
  ### Conversational Context Normalization
61
68
 
62
69
  - Never persist standalone option labels such as `A`, `B`, `C`, `方案A`, or `方案B` as execution context.
63
- - Expand a selected option into its complete meaning and preserve the original response inline for traceability: `Selected decision: <complete meaning> (original response: "<exact response>")`.
70
+ - Expand a selected option into its complete meaning and preserve substantive user rationale and constraints in durable prose at matching detail.
71
+ - Do not emit transcript annotations such as `(original response: "...")` in final feature artifacts. Bare option labels and relative shorthand are not independently intelligible and materially useful exact wording.
64
72
  - Resolve relative statements such as `上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, or `go with your recommendation` only when there is one provable antecedent. If more than one antecedent is plausible, ask the user for clarification; never guess.
65
- - Exclude conversational authorization such as `所有问题都按你的推荐处理` when it only controls how the planner asks or recommends and does not constrain implementation.
66
- - Do not present rejected alternatives as active instructions. Retain one only when its rejection defines a necessary non-goal.
73
+ - Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization. Apply the concrete accepted recommendations, then omit the raw approval; never repeat it once per accepted recommendation.
74
+ - Do not present rejected alternatives as active instructions. Retain one only when its rejection defines a necessary non-goal. Retain exact user wording only when it is independently intelligible and materially useful.
67
75
 
68
76
  ### Reference Material Handling
69
77
 
70
- - Every retained file path, URL, screenshot, log, stack trace, or document reference must be purpose-tagged: state why it is relevant and what the execution AI must inspect. This applies to paths and URLs in both the task contract and `user_context`.
71
- - Good: `src/auth/login.ts:42-78 inspect empty-password validation and the response-status transition`.
72
- - Bad: `src/auth/login.ts:42-78` with no purpose.
73
- - For large materials such as issues, PRDs, logs, or documents, record the title/location, explain the purpose, preserve only task-relevant exact excerpts, and move every confirmed requirement into `description` and `acceptance_criteria`.
78
+ - Every retained stable code, configuration, machine-consumed interface, or URL reference must be purpose-tagged: state why it is relevant and what the execution AI must inspect. This applies to paths and URLs in both the task contract and `user_context`.
79
+ - Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`, uploaded-document paths, screenshot paths, or ad-hoc log paths in durable feature contracts. Instead, copy or normalize the task-relevant content into `description` and `acceptance_criteria`; the task must not depend on that source file still existing.
80
+ - Good: `src/auth/login.ts:42-78 — inspect empty-password validation and the response-status transition`; Bad: `src/auth/login.ts:42-78` with no purpose.
81
+ - For large materials such as issues, PRDs, logs, or documents, explain the purpose, preserve only task-relevant exact excerpts, and move every confirmed requirement into `description` and `acceptance_criteria`. Retain a location only when it is a stable execution-time source of truth.
74
82
  - Embed complete large materials only when the execution session cannot access the source and all content is genuinely required. Reference material never substitutes for the task contract.
75
83
 
76
84
  ### Good and Bad Normalization Examples
77
85
 
78
86
  - Bad: `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation` stored alone.
79
- - Good: `Selected decision: keep saved filters account-scoped and sync them through the existing preferences API (original response: "方案B")`.
80
- - Good: `Selected decision: use cursor pagination with a 50-item default and preserve current sort order (original response: "use option A")`.
81
- - Bad: storing `所有问题都按你的推荐处理` as a feature requirement; it is conversational authorization, not execution context.
82
- - Bad: attaching an entire PRD only to preserve wording. Good: `Billing PRD §4 inspect retry and idempotency rules`, include the relevant exact excerpt, and restate the confirmed retry behavior in the feature contract.
87
+ - Bad: `Selected decision: keep saved filters account-scoped (original response: "方案B")`; the annotation still requires an unseen option list.
88
+ - Good: `Selected decision: keep saved filters account-scoped and sync them through the existing preferences API`.
89
+ - Good: `Selected decision: use cursor pagination with a 50-item default and preserve current sort order`.
90
+ - Bad: storing or repeating `全部按照推荐` / `所有问题都按你的推荐处理` as a feature requirement; it is conversational authorization, not execution context.
91
+ - Bad: attaching an entire PRD or transient PRD path only to preserve wording. Good: state the confirmed retry and idempotency behavior directly in the feature contract; retain a purpose-tagged PRD URL only when it is a stable execution-time source of truth.
83
92
 
84
93
  **Multi-feature isolation example:**
85
94
  - User request includes: `Feature A: add saved filters to the dashboard`, `Feature B: export filtered results as CSV`, and `Shared: preserve existing auth permissions`.
@@ -277,7 +286,7 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
277
286
  >
278
287
  > If none, we'll proceed with what's available in the codebase."
279
288
 
280
- If the user provides materials, require or infer only when unambiguous a task-specific purpose for each material; otherwise ask what the execution AI should inspect. Read/fetch them before Phase 2. For web links, retrieve and analyze the relevant content; for images, analyze the relevant visual evidence. Record purpose-tagged locations and task-relevant exact excerpts for traceability, but do not copy complete large materials into generated items merely to preserve them.
289
+ If the user provides materials, require or infer only when unambiguous a task-specific purpose for each material; otherwise ask what the execution AI should inspect. Read/fetch them before Phase 2. For web links, retrieve and analyze the relevant content; for images, analyze the relevant visual evidence. Material ingestion follows the same durability rule as final output: copy or normalize task-relevant requirements and exact evidence, omit transient non-code paths, and retain only purpose-tagged stable execution-time sources. Do not copy complete large materials merely to preserve them.
281
290
  2. Confirm constraints and existing architecture
282
291
  3. Propose feature set with dependencies
283
292
  4. Refine descriptions and acceptance criteria
@@ -465,7 +474,7 @@ After successful validation and the Local Generated-Plan Review Gate, report:
465
474
  1. Output file path
466
475
  2. Total features + newly added features
467
476
  3. Dependency and priority highlights
468
- 4. Local generated-plan review result: verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result
477
+ 4. Local generated-plan review result: verdict, reviewed feature IDs plus reviewed root prose when applicable, accepted fixes (or "none"), and final validation result
469
478
  5. Recommended next action: `feature-pipeline-launcher`
470
479
 
471
480
  Then apply the post-planning handoff in §Scope Boundary (ask before proceeding; never auto-execute).
@@ -75,12 +75,14 @@ When a feature depends on others, explicitly state what it needs from them:
75
75
  - Bad: "depends on F-001" — the fresh session cannot infer what F-001 built.
76
76
 
77
77
  **Reference descriptions:**
78
- - Good: `docs/billing-prd.md §4 — inspect webhook retry and idempotency requirements`; preserve only task-relevant exact excerpts and place confirmed behavior in the task contract.
79
- - Bad: `docs/billing-prd.md` or a full PRD copied into `user_context` without a purpose.
78
+ - Good: `src/billing/webhook.ts — inspect retry and idempotency behavior` for a stable execution target.
79
+ - Bad: `.agents/brainstorm/billing.md §4 inspect retry requirements`; copy the confirmed retry and idempotency requirements into the task contract and omit the transient planning path.
80
+ - Bad: a full PRD copied into `user_context` without a purpose. Preserve only task-relevant exact excerpts, and never make the task depend on the non-code source still existing.
80
81
 
81
82
  **Decision normalization:**
82
- - Good: `Selected decision: store saved filters per account through the existing preferences API (original response: "方案B")`.
83
+ - Good: `Selected decision: store saved filters per account through the existing preferences API`.
83
84
  - Bad: `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation` with no complete selected meaning.
85
+ - Bad: appending `(original response: "方案B")` or `(original response: "全部按照推荐")`; transcript provenance still requires an unseen prompt. Preserve substantive rationale in the decision prose, but omit blanket recommendation approval.
84
86
 
85
87
  **Self-test:** Review the entry as if you have never seen the planning conversation. Could you implement it and prove completion without asking a single question or reading `user_context`? If not, return `NEEDS_FIXES` and add the missing detail.
86
88
 
@@ -6,6 +6,8 @@ Before generating `.prizmkit/plans/feature-list.json`, review every new or chang
6
6
 
7
7
  The review input is the proposed artifact entry itself. `user_context` is supplementary evidence only: first assess `description` plus `acceptance_criteria` without it, then inspect supplementary evidence for scope and consistency.
8
8
 
9
+ Scan all AI-visible fields and sections, not only the main contract. Every generated natural-language value in `project_description`, `global_context`, item fields, `user_context`, evidence, comments, and parentheticals must stand alone. Review changed root prose even when no feature item changed. Return `NEEDS_FIXES` for dialogue-role/chronology labels, question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, or raw internal answer-map content.
10
+
9
11
  ## Step 1: Artifact-Alone Fresh-Session Simulation
10
12
 
11
13
  For each new or changed feature, answer all of these from `description` and `acceptance_criteria` alone:
@@ -25,23 +27,26 @@ If any answer is unavailable, ambiguous, or present only in `user_context`, the
25
27
 
26
28
  ## Step 2: Contract and Material Checks
27
29
 
28
- - Preserve substantive user requirements at matching detail; normalization must not collapse a detailed specification into a short summary.
29
- - Expand option shorthand into complete selected meaning with inline traceability, for example: `Selected decision: use cursor pagination with a 50-item default (original response: "use option A")`.
30
+ - Preserve substantive user requirements, rationale, and constraints at matching detail; normalization must not collapse a detailed specification into a short summary.
31
+ - Expand option shorthand into complete selected meaning, for example: `Selected decision: use cursor pagination with a 50-item default`.
32
+ - Do not emit transcript annotations such as `(original response: "...")`; parenthetical content must also be independently intelligible and materially useful.
30
33
  - Resolve `方案B`, `按推荐走`, `same as above`, or `go with your recommendation` only when there is one provable antecedent. Otherwise ask the user for clarification.
31
- - Exclude conversational authorization that controls planning but does not constrain implementation.
34
+ - Exclude `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval when it controls planning but does not constrain implementation; never repeat it once per accepted recommendation.
32
35
  - Do not present rejected alternatives as active requirements; retain them only as necessary non-goals.
33
- - Require purpose-tagged paths and URLs, screenshots, logs, stack traces, and documents.
34
- - For large materials, preserve title/location, purpose, and task-relevant exact excerpts; move confirmed requirements into the task contract rather than embedding the entire source.
36
+ - Require purpose-tagged paths and URLs when they identify stable execution targets.
37
+ - Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`, uploads, screenshots, or ad-hoc logs. Instead, copy or normalize the task-relevant content into the contract, which must not depend on that source file still existing.
38
+ - For large materials, preserve purpose and task-relevant exact excerpts; move confirmed requirements into the task contract rather than embedding the entire source, and retain a location only when it is a stable execution-time source of truth.
35
39
  - If `user_context` were removed, `description` and `acceptance_criteria` must remain sufficient for execution and verification.
36
40
 
37
41
  ### Good and Bad Examples
38
42
 
39
- - Bad: `方案B`.
40
- - Good: `Selected decision: keep saved filters account-scoped and sync through the existing preferences API (original response: "方案B")`.
43
+ - Bad: `方案B` or `Selected decision: keep saved filters account-scoped (original response: "方案B")`.
44
+ - Good: `Selected decision: keep saved filters account-scoped and sync through the existing preferences API`.
45
+ - Bad: repeating `(original response: "全部按照推荐")` after each accepted default; write each concrete default and omit the blanket approval.
41
46
  - Bad: `same as above` when multiple earlier decisions exist.
42
47
  - Good: ask which earlier decision applies, then record its complete meaning.
43
- - Bad: `docs/search-rfc.md`.
44
- - Good: `docs/search-rfc.md §3 inspect ranking tie-breakers and empty-query behavior`.
48
+ - Bad: `.agents/brainstorm/search.md — inspect ranking choices`.
49
+ - Good: state the selected ranking tie-breakers and empty-query behavior in the task contract; retain only a purpose-tagged stable code or interface path when execution must inspect it.
45
50
  - Bad: copy a complete issue into `user_context` while leaving the feature description as `implement the issue`.
46
51
  - Good: retain the issue URL and relevant exact excerpts as evidence, then state all confirmed behavior and completion checks in the feature contract.
47
52
 
@@ -20,8 +20,8 @@ Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whethe
20
20
  ## Review Scope
21
21
 
22
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.
23
+ 2. Root project prose is reviewable content, not generator metadata. Review new or changed `project_description` and `global_context` even when no feature item changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
24
+ 3. Treat features as changed only when item fields changed; review newly added feature IDs and changed feature IDs.
25
25
  4. Preserve unchanged historical features. Read unchanged entries only when needed to verify dependency references from reviewed features.
26
26
  5. If no snapshot exists, review all feature entries produced by the current generation flow.
27
27
 
@@ -32,17 +32,18 @@ For every reviewed feature entry, check:
32
32
  - Schema compatibility with `dev-pipeline-feature-list-v1` and `.prizmkit/dev-pipeline/templates/feature-list-schema.json`
33
33
  - Dependency/DAG soundness: dependencies exist, no cycles, no poorly ordered prerequisite chains
34
34
  - Description completeness and headless execution readiness: `description` plus `acceptance_criteria` defines objective, current state, desired state, selected decisions, constraints, non-goals, relevant integrations, edge cases, and completion evidence without conversation history
35
+ - Artifact-wide readability: every generated natural-language value across all AI-visible fields and sections—including `project_description`, `global_context`, titles, rationales, `user_context`, evidence, comments, and parentheticals—is a standalone domain statement without dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, or planning provenance
35
36
  - Acceptance criteria specificity, measurability, and coverage of the described behavior
36
37
  - User-provided detail preservation at matching detail after conversational normalization
37
38
  - `user_context` is supplementary evidence only: it does not expand, replace, or contradict the task contract; if `user_context` were removed, execution and verification remain unambiguous
38
39
  - 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
39
- - Purpose-tagged paths and URLs, screenshots, logs, stack traces, and documents; large materials retain title/location, purpose, and task-relevant exact excerpts rather than full-content injection
40
+ - Purpose-tagged stable code, configuration, machine-consumed interface, and URL references; transient non-code planning/evidence paths are replaced by inline task-relevant decisions and excerpts, and large materials are bounded rather than injected in full
40
41
  - 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
41
42
  - Browser interaction fields for qualifying frontend/fullstack features when applicable
42
43
 
43
44
  ## Headless Context Completeness Gate
44
45
 
45
- Repeat the pre-generation simulation for every reviewed new or changed feature as if the reviewer has never seen the planning conversation. From the artifact alone, answer:
46
+ Repeat the pre-generation simulation for every reviewed new or changed feature as if the reviewer has never seen the planning conversation. First scan all AI-visible fields and sections; machine metadata is exempt, but every generated natural-language value must be session-independent. From the artifact alone, answer:
46
47
 
47
48
  1. What exact problem or outcome is this task responsible for?
48
49
  2. What exists today and what must change?
@@ -53,14 +54,16 @@ Repeat the pre-generation simulation for every reviewed new or changed feature a
53
54
  7. Does any phrase require an unseen earlier question, recommendation, or option list?
54
55
  8. Do quoted source materials agree with the final task decision?
55
56
 
56
- Return `NEEDS_FIXES` if any answer is missing, ambiguous, available only in `user_context`, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`. Accept an expanded decision only when it includes complete meaning and inline traceability such as `(original response: "方案B")`. Exclude conversational authorization that does not constrain implementation. Ask the user for clarification when there is not one provable antecedent.
57
+ Return `NEEDS_FIXES` if any answer is missing, ambiguous, available only in `user_context`, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`. Parenthetical notes are part of the artifact and must pass the same fresh-session test. Do not emit transcript annotations such as `(original response: "...")`; raw shorthand is not independently intelligible and materially useful. Preserve substantive rationale in the durable task contract. Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization: write the concrete accepted decisions, omit the raw approval, and never repeat it once per accepted recommendation. Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`; copy or normalize the task-relevant content into the contract, which must not depend on that source file still existing. Ask the user for clarification when there is not one provable antecedent.
57
58
 
58
59
  Do not add new JSON fields, context objects, schema versions, or pipeline runtime structures. Apply this stricter gate prospectively to new or changed entries and preserve unchanged historical plans.
59
60
 
60
61
  ### Good and Bad Review Examples
61
62
 
62
- - Bad: `same as above`; Good: the complete selected API behavior plus `(original response: "same as above")` after its single antecedent is proven.
63
+ - Bad: `same as above` or a complete API decision followed by `(original response: "same as above")`; Good: record only the complete selected API behavior after its single antecedent is proven.
64
+ - Bad: repeating `(original response: "全部按照推荐")` on accepted defaults; Good: omit the blanket approval after normalizing each default into concrete behavior.
63
65
  - Bad: a bare URL; Good: `https://example.test/search-rfc — inspect ranking tie-breakers and empty-query behavior` plus only task-relevant exact excerpts.
66
+ - Bad: `.agents/brainstorm/search.md — inspect selected behavior` in a final contract; Good: write the selected behavior inline and omit the transient planning path.
64
67
  - Bad: `所有问题都按你的推荐处理` as an implementation rule; Good: omit it as conversational authorization unless a concrete selected decision was separately confirmed.
65
68
 
66
69
  ## Fix Loop
@@ -83,7 +86,7 @@ python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit
83
86
  Report in the final handoff summary:
84
87
 
85
88
  - `Local generated-plan review: PASS` or `NEEDS_FIXES`
86
- - Reviewed feature IDs
89
+ - Reviewed feature IDs and reviewed root prose (`project_description` / `global_context`) when applicable
87
90
  - Accepted fixes, or `none`
88
91
  - Final validation result
89
92
  - Note when review was not applicable because no new final planning content was written
@@ -55,28 +55,38 @@ Every new or changed refactor item is an executable contract for a fresh AI sess
55
55
  4. **Clarify, do not guess**: Ask the user for clarification whenever target architecture, scope boundaries, preservation behavior, material applicability, or a relative reference has multiple plausible meanings.
56
56
  5. **Item isolation**: Each refactor contract and its supplementary evidence contain only relevant goals, paths, constraints, desired end state, and preservation evidence.
57
57
 
58
+ ### Artifact-Wide AI Readability
59
+
60
+ - Every generated natural-language value must be a standalone domain statement. This applies to all AI-visible fields and sections, including `project_description`, `global_context`, titles, descriptions, scope explanations, complexity/priority rationale, `behavior_preservation`, `completion_notes`, acceptance criteria, `user_context`, verification goals, comments, appendices, and parentheticals.
61
+ - Machine metadata such as schema markers, stable IDs, statuses, enums, and timestamps is exempt. Natural-language metadata is not exempt.
62
+ - Never emit dialogue-role or chronology labels such as `user said`, `user answered`, `original request`, `this round`, `previous discussion`, `as discussed earlier`, `用户本轮回答`, or `如前面讨论`. Never emit planning question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, or raw internal answer-map entries as domain content.
63
+ - `user_context` may hold independently intelligible evidence, not transcript fragments. Rewrite every confirmed turn into direct current/target architecture, scope, constraints, rationale, preservation, or verification evidence before generation.
64
+
58
65
  ### Conversational Context Normalization
59
66
 
60
67
  - Never persist standalone option labels such as `A`, `B`, `C`, `方案A`, or `方案B` as execution context.
61
- - Expand a selected option into complete meaning with inline traceability: `Selected decision: <complete meaning> (original response: "<exact response>")`.
68
+ - Expand a selected option into complete meaning and preserve substantive user rationale and constraints in durable prose at matching detail.
69
+ - Do not emit transcript annotations such as `(original response: "...")` in final refactor artifacts. Bare option labels and relative shorthand are not independently intelligible and materially useful exact wording.
62
70
  - Resolve `上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, or `go with your recommendation` only when there is one provable antecedent. Otherwise ask the user for clarification; never guess.
63
- - Exclude conversational authorization such as `所有问题都按你的推荐处理` when it controls planning behavior but does not constrain implementation.
64
- - Do not present rejected architectures as active instructions; preserve one only when it defines a necessary non-goal or compatibility boundary.
71
+ - Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization. Apply the concrete accepted recommendations, then omit the raw approval; never repeat it once per accepted recommendation.
72
+ - Do not present rejected architectures as active instructions; preserve one only when it defines a necessary non-goal or compatibility boundary. Retain exact user wording only when it is independently intelligible and materially useful.
65
73
 
66
74
  ### Reference Material Handling
67
75
 
68
- - Every retained file path, URL, screenshot, log, dependency graph, analysis, or document reference must be purpose-tagged: state why it is relevant and what the execution AI should inspect. This applies to paths and URLs in the task contract and `user_context`.
76
+ - Every retained stable code, configuration, machine-consumed interface, or URL reference must be purpose-tagged: state why it is relevant and what the execution AI should inspect. This applies to paths and URLs in the task contract and `user_context`.
77
+ - Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`, uploaded-analysis paths, screenshot paths, or ad-hoc log paths in durable refactor contracts. Instead, copy or normalize the task-relevant content into `description` and `acceptance_criteria`; the item must not depend on that source file still existing.
69
78
  - Good: `src/auth/validation.ts — inspect exported signatures and current error semantics before extracting middleware`; Bad: `src/auth/validation.ts` alone.
70
- - For large materials, record title/location and purpose, preserve only task-relevant exact excerpts, and move confirmed target architecture, scope boundaries, constraints, and preservation decisions into `description` and `acceptance_criteria`.
79
+ - For large materials, preserve purpose and only task-relevant exact excerpts, and move confirmed target architecture, scope boundaries, constraints, and preservation decisions into `description` and `acceptance_criteria`. Retain a location only when it is a stable execution-time source of truth.
71
80
  - Embed complete large materials only when the execution session cannot access the source and all content is genuinely required.
72
81
 
73
82
  ### Good and Bad Normalization Examples
74
83
 
75
84
  - Bad: `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation` stored as the target architecture.
76
- - Good: `Selected decision: extract validation behind an auth-owned middleware interface while preserving all handler exports (original response: "方案B")`.
77
- - Good: `Selected decision: migrate imports in one compatibility-preserving phase and remove no public paths (original response: "use option A")`.
78
- - Bad: storing `所有问题都按你的推荐处理` as a preservation rule; it is conversational authorization.
79
- - Bad: attaching a full architecture RFC while saying only `apply this`. Good: retain purpose-tagged RFC sections and relevant exact excerpts, then state the complete selected target architecture and non-goals in the item contract.
85
+ - Bad: `Selected decision: extract auth validation (original response: "方案B")`; the annotation still requires an unseen option list.
86
+ - Good: `Selected decision: extract validation behind an auth-owned middleware interface while preserving all handler exports`.
87
+ - Good: `Selected decision: migrate imports in one compatibility-preserving phase and remove no public paths`.
88
+ - Bad: storing or repeating `全部按照推荐` / `所有问题都按你的推荐处理` as a preservation rule; it is conversational authorization.
89
+ - Bad: attaching a full architecture RFC or `.agents/brainstorm/refactor.md` path while saying only `apply this`. Good: copy the relevant architecture, scope, and preservation decisions into the item contract and omit the transient planning path.
80
90
 
81
91
  **Multi-refactor isolation example:**
82
92
  - User request includes: `Refactor A: extract auth validation into middleware`, `Refactor B: split dashboard chart utilities`, and `Shared: preserve all public APIs`.
@@ -176,7 +186,7 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
176
186
  >
177
187
  > If none, we'll proceed with what's available in the codebase."
178
188
 
179
- If the user provides materials, require or infer only when unambiguous a refactor-specific purpose for each material; otherwise ask what the execution AI should inspect. Read/fetch the relevant material before Phase 2. For web links, retrieve the relevant content; for images, analyze the relevant visual evidence. Preserve purpose-tagged locations and task-relevant exact excerpts, but do not inject complete large materials merely for verbatim preservation. This context is critical for understanding the target architecture and constraints.
189
+ If the user provides materials, require or infer only when unambiguous a refactor-specific purpose for each material; otherwise ask what the execution AI should inspect. Read/fetch the relevant material before Phase 2. For web links, retrieve the relevant content; for images, analyze the relevant visual evidence. Material ingestion follows the same durability rule as final output: copy or normalize task-relevant requirements and exact evidence, omit transient non-code paths, and retain only purpose-tagged stable execution-time sources. Do not inject complete large materials merely to preserve them. This context is critical for understanding the target architecture and constraints.
180
190
 
181
191
  **CHECKPOINT CP-RP-0**: Project context loaded, tech stack and test suite status known.
182
192
 
@@ -415,5 +425,5 @@ After successful validation and the Local Generated-Plan Review Gate, report:
415
425
  2. Total refactor items
416
426
  3. Dependency ordering highlights (which items must run first)
417
427
  4. Behavior preservation strategy distribution (N items with test-gate, M with snapshot, etc.)
418
- 5. Local generated-plan review result: verdict, reviewed refactor IDs, accepted fixes (or "none"), and final validation result
428
+ 5. Local generated-plan review result: verdict, reviewed refactor IDs plus reviewed root prose when applicable, accepted fixes (or "none"), and final validation result
419
429
  6. Recommended next action: `refactor-pipeline-launcher`
@@ -20,8 +20,8 @@ Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whethe
20
20
  ## Review Scope
21
21
 
22
22
  1. If a pre-session final list exists, compare by stable refactor IDs (`R-*`).
23
- 2. Treat refactors 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 refactor IDs and changed refactor IDs.
23
+ 2. Root project prose is reviewable content, not generator metadata. Review new or changed `project_description` and `global_context` even when no refactor item changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
24
+ 3. Treat refactors as changed only when item fields changed; review newly added refactor IDs and changed refactor IDs.
25
25
  4. Preserve unchanged historical refactors. Read unchanged entries only when needed to verify dependency references or behavior-preservation interactions with reviewed refactors.
26
26
  5. If no snapshot exists, review all refactor entries produced by the current generation flow.
27
27
 
@@ -32,17 +32,18 @@ For every reviewed refactor entry, check:
32
32
  - Schema compatibility with `dev-pipeline-refactor-list-v1` and `.prizmkit/dev-pipeline/templates/refactor-list-schema.json`
33
33
  - Dependency/DAG soundness, including safe behavior-preserving order
34
34
  - Description completeness: objective, current state, desired target architecture, selected decisions, scope boundaries, constraints, non-goals, relevant integrations and consumers, edge cases, behavior-preservation decisions, completion evidence, and headless execution readiness
35
+ - Artifact-wide readability: every generated natural-language value across all AI-visible fields and sections—including `project_description`, `global_context`, scope explanations, rationales, behavior-preservation/evidence text, `user_context`, comments, and parentheticals—is a standalone domain statement without dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, or planning provenance
35
36
  - Acceptance criteria specificity and measurable behavior-preservation verification
36
37
  - `behavior_preservation` strategy quality and consistency with target scope and existing tests
37
38
  - User-provided detail preservation at matching detail after conversational normalization
38
39
  - `user_context` is supplementary evidence only: it does not expand, replace, or contradict the refactor contract; if `user_context` were removed, execution and verification remain unambiguous
39
40
  - Task-scoped `user_context` isolation: no unrelated sibling refactor goals, target files, constraints, desired end states, or supplementary materials; shared context appears on multiple items only when explicitly global
40
- - Purpose-tagged target paths and URLs, diagrams, analyses, and documents; large materials retain title/location, purpose, and task-relevant exact excerpts rather than full-content injection
41
+ - Purpose-tagged stable code, configuration, machine-consumed interface, and URL targets; transient non-code planning/evidence paths are replaced by inline task-relevant decisions and excerpts, and large materials are bounded rather than injected in full
41
42
  - Priority/complexity calibration: every reviewed refactor has short priority and complexity rationales, medium/low assignments are allowed when criteria fit, and high/high is not used merely because the work is cleanup, framework-related, multi-file, or user-requested
42
43
 
43
44
  ## Headless Context Completeness Gate
44
45
 
45
- Repeat the pre-generation simulation for every reviewed new or changed refactor as if the reviewer has never seen the planning conversation. From the artifact alone, answer:
46
+ Repeat the pre-generation simulation for every reviewed new or changed refactor as if the reviewer has never seen the planning conversation. First scan all AI-visible fields and sections; machine metadata is exempt, but every generated natural-language value must be session-independent. From the artifact alone, answer:
46
47
 
47
48
  1. What exact problem or outcome is this task responsible for?
48
49
  2. What current architecture exists and what target architecture must replace it?
@@ -53,15 +54,16 @@ Repeat the pre-generation simulation for every reviewed new or changed refactor
53
54
  7. Does any phrase require an unseen earlier question, recommendation, or option list?
54
55
  8. Do quoted source materials agree with the final task decision?
55
56
 
56
- Return `NEEDS_FIXES` if any answer is missing, ambiguous, available only in `user_context`, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`. Accept an expanded decision only when it states complete meaning with inline traceability such as `(original response: "方案B")`. Exclude conversational authorization that does not constrain implementation. Ask the user for clarification when there is not one provable antecedent.
57
+ Return `NEEDS_FIXES` if any answer is missing, ambiguous, available only in `user_context`, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`. Parenthetical notes are part of the artifact and must pass the same fresh-session test. Do not emit transcript annotations such as `(original response: "...")`; raw shorthand is not independently intelligible and materially useful. Preserve substantive rationale in the durable refactor contract. Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization: write the concrete accepted decisions, omit the raw approval, and never repeat it once per accepted recommendation. Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`; copy or normalize the task-relevant content into the contract, which must not depend on that source file still existing. Ask the user for clarification when there is not one provable antecedent.
57
58
 
58
59
  Do not add new JSON fields, context objects, schema versions, or pipeline runtime structures. Apply this stricter gate prospectively to new or changed entries and preserve unchanged historical refactors.
59
60
 
60
61
  ### Good and Bad Review Examples
61
62
 
62
- - Bad: `go with your recommendation` as target architecture; Good: `Selected decision: reverse the auth/user dependency through a shared identity interface and retain existing public imports (original response: "go with your recommendation")`.
63
+ - Bad: `go with your recommendation` as target architecture or as `(original response: "go with your recommendation")`; Good: `Selected decision: reverse the auth/user dependency through a shared identity interface and retain existing public imports`.
64
+ - Bad: repeating `(original response: "全部按照推荐")`; Good: omit the blanket approval after writing each concrete accepted decision.
63
65
  - Bad: bare `src/auth/`; Good: `src/auth/ — inspect public exports, dependency direction, and compatibility call sites before restructuring`.
64
- - Bad: an entire RFC pasted into evidence; Good: a purpose-tagged RFC location, task-relevant exact excerpts, and all confirmed target decisions in the task contract.
66
+ - Bad: an entire RFC pasted into evidence or `.agents/brainstorm/refactor.md` retained as a requirement; Good: inline task-relevant excerpts and all confirmed target decisions, then omit the transient planning path.
65
67
 
66
68
  ## Fix Loop
67
69
 
@@ -83,7 +85,7 @@ python3 ${SKILL_DIR}/scripts/validate-and-generate-refactor.py generate --input
83
85
  Report in the final handoff summary:
84
86
 
85
87
  - `Local generated-plan review: PASS` or `NEEDS_FIXES`
86
- - Reviewed refactor IDs
88
+ - Reviewed refactor IDs and reviewed root prose (`project_description` / `global_context`) when applicable
87
89
  - Accepted fixes, or `none`
88
90
  - Final validation result
89
91
  - Note when review was not applicable because no new final planning content was written
@@ -47,7 +47,7 @@ Offer `Accept`, `Modify`, and `Skip` as selectable options. Re-display modified
47
47
  2. **Behavior preservation check**: Every item must have a declared preservation strategy. Flag any item with `manual` strategy and no test coverage.
48
48
  3. **Gap detection**: Are there intermediate steps needed between items? Does item A's output match item B's input assumption?
49
49
  4. **Cross-module impact**: Do any items affect modules outside the declared scope?
50
- 5. **Headless Context Completeness Gate**: Review every new or changed item as if the reviewer has never seen the planning conversation. Preserve unchanged historical items. First assess `description` plus `acceptance_criteria` without `user_context`, then answer from the artifact alone:
50
+ 5. **Headless Context Completeness Gate**: Review every new or changed item as if the reviewer has never seen the planning conversation. Preserve unchanged historical items. Scan all AI-visible fields and sections first: every generated natural-language value in `project_description`, `global_context`, item fields, scope explanations, behavior-preservation/evidence text, `user_context`, comments, and parentheticals must be session-independent, with no dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, or planning provenance. Review changed root prose even when no refactor item changed. Then assess `description` plus `acceptance_criteria` without `user_context` and answer from the artifact alone:
51
51
  1. What exact problem or outcome is this task responsible for?
52
52
  2. What current architecture exists and what target architecture must replace it?
53
53
  3. Which approach was selected, expressed by meaning rather than an option label?
@@ -58,7 +58,7 @@ Offer `Accept`, `Modify`, and `Skip` as selectable options. Re-display modified
58
58
  8. Does any phrase require an unseen earlier question, recommendation, or option list?
59
59
  9. Do quoted source materials agree with the final task decision?
60
60
 
61
- Return `NEEDS_FIXES` whenever any answer is missing, ambiguous, or available only in `user_context`. Ask the user for clarification when a relative statement has more than one plausible antecedent; never guess.
61
+ Return `NEEDS_FIXES` whenever any answer is missing, ambiguous, or available only in `user_context`. Parenthetical notes must pass the same gate. Do not emit transcript annotations such as `(original response: "...")`; preserve substantive rationale, but omit bare selection tokens and `全部按照推荐` or equivalent blanket recommendation approval after normalization. Ask the user for clarification when a relative statement has more than one plausible antecedent; never guess.
62
62
 
63
63
  - **Scope clarity**: List all affected files and explain each file or coherent group as purpose-tagged target paths.
64
64
  - **Target architecture**: State concrete module ownership, interfaces, dependency direction, compatibility boundaries, and desired end state.
@@ -66,10 +66,12 @@ Offer `Accept`, `Modify`, and `Skip` as selectable options. Re-display modified
66
66
  - **Dependency context**: State which exact earlier refactor output this item consumes.
67
67
  - **Good**: `Extract validateEmail, validatePhone, and validateUrl from src/utils/helpers.ts into src/utils/validation.ts; update all 12 import sites; preserve signatures and error semantics. src/utils/helpers.ts — inspect current exports and callers before extraction.`
68
68
  - **Bad**: `Clean up the utils module`, `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`.
69
- - **Good normalization**: `Selected decision: introduce an auth-owned validation module while retaining existing public imports through compatibility re-exports (original response: "方案B")`.
70
- - **Bad material handling**: embed an entire architecture RFC while saying `apply this`.
71
- - **Good material handling**: `Auth Architecture RFC §5 inspect dependency-direction and compatibility requirements`, preserve task-relevant exact excerpts, and move confirmed decisions into the task contract.
72
- - Exclude conversational authorization such as `所有问题都按你的推荐处理` when it does not constrain implementation.
69
+ - **Bad normalization**: append `(original response: "方案B")` to a complete architecture decision; the annotation is not independently intelligible and materially useful.
70
+ - **Good normalization**: `Selected decision: introduce an auth-owned validation module while retaining existing public imports through compatibility re-exports`.
71
+ - **Bad material handling**: embed an entire architecture RFC while saying `apply this`, or retain `.agents/brainstorm/refactor.md` as a final requirement source.
72
+ - Do not retain non-code planning-source paths in the final contract.
73
+ - **Good material handling**: copy or normalize the task-relevant content and exact excerpts into the contract; retain only purpose-tagged stable execution targets. The item must not depend on that source file still existing.
74
+ - Exclude `所有问题都按你的推荐处理`, `全部按照推荐`, and equivalent conversational authorization when it does not constrain implementation; never repeat it once per accepted recommendation.
73
75
  - `user_context` is supplementary evidence only. If `user_context` were removed, execution and verification must remain unambiguous at matching detail.
74
76
  - Do not add new JSON fields, context objects, schema versions, or pipeline runtime structures.
75
77