prizmkit 1.1.147 → 1.1.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +22 -14
- package/bundled/skills/app-planner/references/brainstorm-guide.md +1 -1
- package/bundled/skills/app-planner/references/generated-plan-review.md +10 -7
- package/bundled/skills/app-planner/references/project-brief-guide.md +8 -4
- package/bundled/skills/app-planner/references/project-conventions-discovery.md +1 -1
- package/bundled/skills/app-planner/references/rules/backend/derivation-rules.md +4 -2
- package/bundled/skills/app-planner/references/rules/backend/question-bank.md +1 -1
- package/bundled/skills/app-planner/references/rules/database/derivation-rules.md +4 -2
- package/bundled/skills/app-planner/references/rules/database/question-bank.md +1 -1
- package/bundled/skills/app-planner/references/rules/frontend/derivation-rules.md +4 -4
- package/bundled/skills/app-planner/references/rules/frontend/question-bank.md +6 -6
- package/bundled/skills/app-planner/references/rules/frontend/template.md +1 -1
- package/bundled/skills/app-planner/references/rules/mobile/derivation-rules.md +4 -2
- package/bundled/skills/app-planner/references/rules/mobile/question-bank.md +1 -1
- package/bundled/skills/app-planner/references/rules-configuration.md +5 -1
- package/bundled/skills/bug-planner/SKILL.md +23 -13
- package/bundled/skills/bug-planner/references/generated-plan-review.md +10 -8
- package/bundled/skills/feature-planner/SKILL.md +22 -13
- package/bundled/skills/feature-planner/assets/planning-guide.md +5 -3
- package/bundled/skills/feature-planner/references/completeness-review.md +14 -9
- package/bundled/skills/feature-planner/references/generated-plan-review.md +10 -7
- package/bundled/skills/refactor-planner/SKILL.md +21 -11
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +10 -8
- package/bundled/skills/refactor-planner/references/planning-phases.md +8 -6
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -60,33 +60,43 @@ If you believe the task is better suited for a different workflow, you MUST:
|
|
|
60
60
|
|
|
61
61
|
Every new or changed project brief line, convention, infrastructure decision, architecture decision, and rule must be understandable by a fresh AI session that has never seen the planning conversation. Durable app context records the actual selected product or technical decision, not the answer token used in chat.
|
|
62
62
|
|
|
63
|
+
### Artifact-Wide AI Readability
|
|
64
|
+
|
|
65
|
+
- Every generated natural-language value must be a standalone domain statement. This applies to all AI-visible fields and sections in project briefs and drafts, project instruction files, conventions, infrastructure, architecture decisions, generated layer rules, appendices, comments, brainstorm summaries, quoted evidence, and parentheticals.
|
|
66
|
+
- Machine metadata such as schema markers, stable IDs, statuses, enums, and timestamps is exempt. Natural-language metadata is not exempt.
|
|
67
|
+
- 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.
|
|
68
|
+
- Internal Q&A may drive derivation, but final writers render complete product or technical meaning. Quotes are allowed only as independently intelligible source evidence, never as planning-turn provenance.
|
|
69
|
+
|
|
63
70
|
### Conversational Context Normalization
|
|
64
71
|
|
|
65
72
|
- Never persist standalone option labels such as `A`, `B`, `C`, `方案A`, or `方案B`.
|
|
66
|
-
- Expand each selected option into complete meaning
|
|
73
|
+
- Expand each selected option into complete decision meaning. Preserve substantive user rationale and constraints in durable prose at matching detail.
|
|
74
|
+
- Do not emit transcript annotations such as `(original response: "...")` in final app-planning artifacts. Bare option labels and relative shorthand are not independently intelligible and materially useful exact wording.
|
|
67
75
|
- Resolve `上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, or `go with your recommendation` only when there is one provable antecedent. If multiple antecedents are plausible, ask the user for clarification; never guess.
|
|
68
|
-
-
|
|
76
|
+
- Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization. Apply the concrete accepted defaults, then omit the approval; never repeat it once per accepted recommendation.
|
|
69
77
|
- Do not present rejected alternatives as active decisions. Include one only when it defines a necessary non-goal or compatibility boundary.
|
|
70
|
-
- Preserve detailed user requirements at matching detail; normalization must not simplify away substantive product, infrastructure, architecture, or development rules.
|
|
78
|
+
- Preserve detailed user requirements at matching detail; normalization must not simplify away substantive product, infrastructure, architecture, or development rules. Retain an exact excerpt only when the wording itself is independently intelligible and materially useful.
|
|
71
79
|
|
|
72
80
|
### Reference Material Handling
|
|
73
81
|
|
|
74
|
-
- Every retained
|
|
75
|
-
-
|
|
76
|
-
-
|
|
82
|
+
- Every retained stable code, configuration, machine-consumed interface, or URL reference must be purpose-tagged: say why it matters and what a downstream AI should inspect. This applies to paths and URLs in all app-planning artifacts.
|
|
83
|
+
- 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 app artifacts. Instead, copy or normalize the task-relevant content into the brief, conventions, architecture decisions, or rules; the artifact must not depend on that source file still existing.
|
|
84
|
+
- Good: `src/auth/ — inspect identity-provider and session ownership`; Bad: `.agents/brainstorm/design.md — inspect accepted architecture`. For the latter, write the accepted architecture, rationale, constraints, and risks inline and omit the path.
|
|
85
|
+
- For large materials, record purpose, preserve only task-relevant exact excerpts, and move confirmed product or technical decisions into the durable app-planning artifact. Retain a location only when it is a stable execution-time source of truth.
|
|
77
86
|
- Embed complete large materials only when future sessions cannot access the source and all content is genuinely required.
|
|
78
87
|
|
|
79
88
|
### Good and Bad Normalization Examples
|
|
80
89
|
|
|
81
90
|
- Bad: `[ ] 使用方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`.
|
|
82
|
-
-
|
|
83
|
-
- Good: `
|
|
84
|
-
-
|
|
91
|
+
- Bad: `[ ] Authentication uses organization-scoped OAuth with server-side sessions (original response: "方案B")`; the decision is complete, but the transcript annotation still requires an unseen option list.
|
|
92
|
+
- Good: `[ ] Authentication uses organization-scoped OAuth with server-side sessions`.
|
|
93
|
+
- Good: `Deployment target: managed container service with PostgreSQL in the same region`.
|
|
94
|
+
- Bad: storing or repeating `全部按照推荐` / `所有问题都按你的推荐处理` as project conventions; they are conversational authorization.
|
|
85
95
|
- Bad: attaching an entire infrastructure proposal while recording only `follow this`. Good: retain a purpose-tagged proposal section and task-relevant exact excerpts, then name the actual network, database, and deployment decisions.
|
|
86
96
|
|
|
87
97
|
## Pre-Generation Headless Context Completeness Gate
|
|
88
98
|
|
|
89
|
-
Before any final app-planning writer runs, review every new or changed brief line, convention, infrastructure decision, architecture decision, and rule as if the reviewer has never seen the planning conversation. Preserve unchanged historical content; do not bulk-rewrite it. From the proposed artifact alone, answer:
|
|
99
|
+
Before any final app-planning writer runs, review every new or changed brief line, convention, infrastructure decision, architecture decision, and rule as if the reviewer has never seen the planning conversation. Preserve unchanged historical content; do not bulk-rewrite it. First scan all AI-visible fields and sections: every generated natural-language value must be session-independent, with no dialogue-role labels, question IDs, answer tokens, planning-option recommendation markers, checkpoint provenance, raw answer-map content, or transient planning-source dependencies. From the proposed artifact alone, answer:
|
|
90
100
|
|
|
91
101
|
1. What exact product outcome or technical decision does this line record?
|
|
92
102
|
2. What exists today and what desired state or constraint applies?
|
|
@@ -128,7 +138,7 @@ Do NOT use this skill when:
|
|
|
128
138
|
|
|
129
139
|
→ Read `${SKILL_DIR}/references/project-conventions-discovery.md` for the full AI-driven discovery procedure (Analyze → Reason → Present via AskUserQuestion).
|
|
130
140
|
|
|
131
|
-
→
|
|
141
|
+
→ Normalize each proposed convention into a standalone domain rule, run the Pre-Generation Headless Context Completeness Gate, then save only passing convention meanings to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` (one bullet per convention; no raw answers or planning provenance)
|
|
132
142
|
→ Output format will naturally vary per project — that is the intended behavior
|
|
133
143
|
|
|
134
144
|
**Infrastructure Convention Discovery (Database + Deployment)**
|
|
@@ -139,7 +149,7 @@ Do NOT use this skill when:
|
|
|
139
149
|
|
|
140
150
|
4. **Project brief accumulation** — throughout all interactive phases:
|
|
141
151
|
→ Read `${SKILL_DIR}/references/project-brief-guide.md` for template and rules
|
|
142
|
-
→
|
|
152
|
+
→ After each meaningful response containing business intent, constraints, or design decisions, normalize its substantive meaning into standalone domain prose before updating the in-memory or `.prizmkit/plans/project-brief.draft.md` source; never store the raw turn or answer token; do not write the final `.prizmkit/plans/project-brief.md` until the Pre-Generation Headless Context Completeness Gate passes
|
|
143
153
|
|
|
144
154
|
## Rules Configuration (after Infrastructure)
|
|
145
155
|
|
|
@@ -289,8 +299,6 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
289
299
|
|
|
290
300
|
## Generated App-Plan Review Gate
|
|
291
301
|
|
|
292
|
-
User requirement preserved verbatim: `Add generated-plan review in app-planner also .`
|
|
293
|
-
|
|
294
302
|
Run this gate before any final handoff whenever the current `app-planner` session wrote or rewrote final app-level planning content. In full produce mode this runs after CP-AP-5.5 and the passing content's final writes; in Quick Context Mode it runs after the confirmed `.prizmkit/plans/project-brief.md` write; in conventions, infrastructure, architecture-decision, or rules-only final-write flows it runs after those writes and before the completion summary. This gate reviews generated planning artifacts directly, not implementation diffs.
|
|
295
303
|
|
|
296
304
|
1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for app-planner generated content review.
|
|
@@ -75,7 +75,7 @@ Produce a structured summary:
|
|
|
75
75
|
[2-3 approaches with pros/cons/effort]
|
|
76
76
|
|
|
77
77
|
## Selected Approach
|
|
78
|
-
[
|
|
78
|
+
[Complete selected approach and rationale, written as standalone design context without answer tokens or dialogue provenance]
|
|
79
79
|
|
|
80
80
|
## Assumptions
|
|
81
81
|
[All assumptions explicitly listed]
|
|
@@ -44,16 +44,17 @@ For every reviewed app-planning artifact or section, check:
|
|
|
44
44
|
- Consistency among conventions, infrastructure, architecture decisions, and project brief content
|
|
45
45
|
- Infrastructure completeness or explicit deferral for database, deployment, and cloud services topics when those flows ran
|
|
46
46
|
- Rules pointer consistency: generated `.prizmkit/rules/<layer>-rules.md` files are referenced by the `root.prizm` `RULES:` line when rules were configured
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
47
|
+
- Substantive user meaning and detail preservation at matching detail after conversational normalization in project brief ideas, conventions, infrastructure notes, architecture decisions, and rules
|
|
48
|
+
- 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
|
|
49
|
+
- Every selected product or technical decision is expressed by complete meaning rather than `A`, `B`, `C`, `方案A`, `方案B`, or another unseen option label; substantive rationale remains durable, while opaque transcript provenance is absent
|
|
50
|
+
- Purpose-tagged stable code, configuration, machine-consumed interface, and URL references; non-code planning/evidence source paths are replaced by inline task-relevant decisions and excerpts, and large materials are bounded rather than injected in full
|
|
50
51
|
- Conversational authorization is excluded when it controls planning but does not constrain implementation; rejected alternatives appear only as necessary non-goals
|
|
51
52
|
- Downstream readiness: `feature-planner` has enough context to produce `.prizmkit/plans/feature-list.json` without guessing core app purpose, stack, constraints, or implementation conventions
|
|
52
53
|
- No implementation/scaffolding actions are introduced by the app plan; outputs stay within app-planner's writable boundary
|
|
53
54
|
|
|
54
55
|
## Headless Context Completeness Gate
|
|
55
56
|
|
|
56
|
-
Repeat the pre-generation simulation for every reviewed new or changed app-planning line or section as if the reviewer has never seen the planning conversation. From the artifact alone, answer:
|
|
57
|
+
Repeat the pre-generation simulation for every reviewed new or changed app-planning line or section 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:
|
|
57
58
|
|
|
58
59
|
1. What exact product outcome or technical decision does this content record?
|
|
59
60
|
2. What exists today and what desired state or constraint applies?
|
|
@@ -64,20 +65,22 @@ Repeat the pre-generation simulation for every reviewed new or changed app-plann
|
|
|
64
65
|
7. Does any phrase require an unseen earlier question, recommendation, or option list?
|
|
65
66
|
8. Do quoted source materials agree with the final task decision?
|
|
66
67
|
|
|
67
|
-
Return `NEEDS_FIXES` if any answer is missing, ambiguous, or dependent on shorthand such as `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`.
|
|
68
|
+
Return `NEEDS_FIXES` if any answer is missing, ambiguous, 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. Ask the user for clarification when there is not one provable antecedent. 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 durable artifact, which must not depend on that source file still existing.
|
|
68
69
|
|
|
69
70
|
Apply this stricter gate prospectively to new or changed content and preserve unchanged historical app-planning content.
|
|
70
71
|
|
|
71
72
|
### Good and Bad Review Examples
|
|
72
73
|
|
|
73
|
-
- Bad: `[ ] 使用方案B
|
|
74
|
+
- Bad: `[ ] 使用方案B` or `[ ] Authentication uses organization-scoped OAuth with server-side sessions (original response: "方案B")`; Good: `[ ] Authentication uses organization-scoped OAuth with server-side sessions`.
|
|
75
|
+
- Bad: repeating `(original response: "全部按照推荐")` after each convention; Good: omit the blanket approval after normalizing every accepted convention into concrete meaning.
|
|
74
76
|
- Bad: a bare architecture URL; Good: `Architecture RFC §5 — inspect identity ownership and session boundaries`, plus only task-relevant exact excerpts.
|
|
77
|
+
- Bad: `.agents/brainstorm/design.md — inspect accepted risks` in a final brief; Good: write the accepted risks and resulting constraints inline, then omit the transient planning path.
|
|
75
78
|
- Bad: a rejected serverless alternative listed as an active infrastructure decision; Good: include it only as a non-goal when preserving the selected container deployment boundary requires that fact.
|
|
76
79
|
|
|
77
80
|
## Fix Loop
|
|
78
81
|
|
|
79
82
|
1. Present findings with artifact path, section name, severity, evidence, and suggested source change.
|
|
80
|
-
2. Accept only findings that improve planner correctness, consistency,
|
|
83
|
+
2. Accept only findings that improve planner correctness, consistency, substantive meaning preservation, or downstream feature-planner readiness.
|
|
81
84
|
3. Apply accepted fixes to the source representation first: brief draft/checklist, instruction-file section source, rules answer/template source, or `root.prizm` `RULES:` pointer source.
|
|
82
85
|
4. Regenerate or rewrite final artifacts through the same writer path used by app-planner. Do not hand-patch final artifacts as a shortcut when a draft/source representation exists.
|
|
83
86
|
5. Re-read the changed final artifacts directly and repeat the Headless Context Completeness Gate only for changed sections.
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
- Bad: `[x] User authentication -> src/auth/, src/middleware/auth.ts` because neither the selected behavior nor path purpose is clear
|
|
34
34
|
- This lets future AI sessions locate the implementation without guessing or broad rescanning
|
|
35
35
|
7. **Complete decision meaning**: Every line names the actual product or technical decision. Never write only `A`, `B`, `C`, `方案A`, `方案B`, `按推荐走`, `use option A`, `same as above`, or `go with your recommendation`.
|
|
36
|
-
8. **
|
|
36
|
+
8. **Artifact-safe normalization**: Every natural-language line, comment, quote, and parenthetical is written for an AI with no planning-session access. Preserve substantive rationale and constraints in durable prose. Do not emit transcript annotations, dialogue-role/chronology labels, question IDs, answer tokens, planning-option recommendation markers, or raw answer-map content; bare selection tokens are not independently intelligible and materially useful exact wording.
|
|
37
37
|
9. **Ambiguous references**: Resolve shorthand only with one provable antecedent. Otherwise ask the user for clarification; never guess.
|
|
38
|
-
10. **Conversational authorization**:
|
|
39
|
-
11. **References**:
|
|
38
|
+
10. **Conversational authorization**: Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as dialogue control. Write each concrete accepted default, omit the raw approval, and never repeat it once per accepted recommendation.
|
|
39
|
+
11. **References**: Purpose-tag stable code, configuration, machine-consumed interface, and URL references. Do not retain non-code planning-source paths such as `.agents/brainstorm/<note>.md`, uploads, screenshots, or ad-hoc logs in the brief; copy or normalize the task-relevant content inline so the brief must not depend on that source file still existing. For large materials, retain purpose and task-relevant exact excerpts rather than complete source content, and retain a location only when it is a stable execution-time source of truth.
|
|
40
40
|
12. **Alternatives**: Do not present rejected alternatives as active brief items; include them only as necessary non-goals.
|
|
41
41
|
|
|
42
42
|
## Brownfield Init
|
|
@@ -93,9 +93,13 @@ Once all criteria are met:
|
|
|
93
93
|
### Good and Bad Brief Examples
|
|
94
94
|
|
|
95
95
|
- Bad: `[ ] 使用方案B`.
|
|
96
|
-
-
|
|
96
|
+
- Bad: `[ ] Authentication uses organization-scoped OAuth with server-side sessions (original response: "方案B")`; the parenthetical still depends on an unseen option list.
|
|
97
|
+
- Good: `[ ] Authentication uses organization-scoped OAuth with server-side sessions`.
|
|
98
|
+
- Bad: repeating `(original response: "全部按照推荐")` on accepted conventions; omit the blanket approval after writing each convention's concrete meaning.
|
|
97
99
|
- Bad: `[ ] same as above` when several prior decisions exist.
|
|
98
100
|
- Good: ask the user which decision applies, then record its complete meaning.
|
|
99
101
|
- Bad: `[ ] Follow https://example.test/platform-rfc`.
|
|
100
102
|
- Good: `[ ] Deployment uses a managed container service with regional PostgreSQL; Platform RFC §3 — inspect region and failover constraints`.
|
|
103
|
+
- Bad: `[ ] 首期采用通用电商方图;.agents/brainstorm/design.md — inspect accepted risks` because the brief breaks when the planning note is deleted.
|
|
104
|
+
- Good: state the accepted dimensions, deferred platform templates, and accepted risks directly in the brief, with no brainstorm-file path.
|
|
101
105
|
|
|
@@ -55,5 +55,5 @@ Then ask in text: "Anything I missed that you'd like to standardize?" — if the
|
|
|
55
55
|
|
|
56
56
|
## After Discovery
|
|
57
57
|
|
|
58
|
-
→ Save
|
|
58
|
+
→ Save resolved convention meanings to `AGENTS.md` / `CLAUDE.md` / `CODEBUDDY.md` under `### Project Conventions` (one standalone domain rule per bullet). Do not copy raw answers, option labels, recommendation markers, question IDs, or dialogue provenance.
|
|
59
59
|
→ Output format will naturally vary per project — that is the intended behavior
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
|
-
- [Phase 2
|
|
9
|
+
- [Phase 2 Normalized Semantic Fill Table](#phase-2-normalized-semantic-fill-table)
|
|
10
10
|
- [Trigger Map](#trigger-map)
|
|
11
11
|
- [Rule Block Definitions](#rule-block-definitions)
|
|
12
12
|
- [Template Placeholder Coverage Self-Check](#template-placeholder-coverage-self-check)
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
## Phase 2
|
|
17
|
+
## Phase 2 Normalized Semantic Fill Table
|
|
18
|
+
|
|
19
|
+
Resolve each selected option or custom reply into the complete semantic value shown by the examples. Never copy raw answer tokens, recommendation markers, question IDs, dialogue labels, or planning chronology into placeholders. The Source column is internal derivation metadata only and never appears in generated rules.
|
|
18
20
|
|
|
19
21
|
| Template Placeholder | Source | Example Fill |
|
|
20
22
|
|---------------------|--------|-------------|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> This file is read on demand by SKILL.md in Phase 2. The AI must strictly follow the group order defined in this file, asking **one group at a time (1–3 questions)**, never dumping all questions at once.
|
|
4
4
|
> For every question, show the user: question number, question text, options, **recommended choice (marked "Recommended")**, and a one-line description.
|
|
5
|
-
> After each
|
|
5
|
+
> After each response, resolve it to the complete option or custom meaning and record that internal-only semantic choice in `answers[Qx]`. Never store raw answer tokens, and never render question IDs or answer-map entries into generated artifacts.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -6,14 +6,16 @@
|
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
|
-
- [Phase 2
|
|
9
|
+
- [Phase 2 Normalized Semantic Fill Table](#phase-2-normalized-semantic-fill-table)
|
|
10
10
|
- [Trigger Map](#trigger-map)
|
|
11
11
|
- [Rule Block Definitions](#rule-block-definitions)
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
## Phase 2
|
|
16
|
+
## Phase 2 Normalized Semantic Fill Table
|
|
17
|
+
|
|
18
|
+
Resolve each selected option or custom reply into the complete semantic value shown by the examples. Never copy raw answer tokens, recommendation markers, question IDs, dialogue labels, or planning chronology into placeholders. The Source column is internal derivation metadata only and never appears in generated rules.
|
|
17
19
|
|
|
18
20
|
| Template Placeholder | Source | Example Fill |
|
|
19
21
|
|---------------------|--------|-------------|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> This file is read on demand by SKILL.md in Phase 2. The AI must strictly follow the group order defined in this file, asking **one group at a time (1–3 questions)**, never dumping all questions at once.
|
|
4
4
|
> For every question, show the user: question number, question text, options, **recommended choice (marked "Recommended")**, and a one-line description.
|
|
5
|
-
> After each
|
|
5
|
+
> After each response, resolve it to the complete option or custom meaning and record that internal-only semantic choice in `answers[Qx]`. Never store raw answer tokens, and never render question IDs or answer-map entries into generated artifacts.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## Table of Contents
|
|
10
10
|
|
|
11
|
-
- [Phase 2
|
|
11
|
+
- [Phase 2 Normalized Semantic Fill Table](#phase-2-normalized-semantic-fill-table)
|
|
12
12
|
- [Trigger Map](#trigger-map)
|
|
13
13
|
- [Rule Block Definitions](#rule-block-definitions)
|
|
14
14
|
- [Template Placeholder Coverage Self-Check Table (Mandatory Check Before Phase 4 Rendering)](#template-placeholder-coverage-self-check-table-mandatory-check-before-phase-4-rendering)
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
## Phase 2
|
|
19
|
+
## Phase 2 Normalized Semantic Fill Table
|
|
20
20
|
|
|
21
|
-
> These placeholders **don't need rule blocks**.
|
|
21
|
+
> These placeholders **don't need rule blocks**. Resolve the selected option or custom reply into the complete semantic value shown by the examples. Never copy raw answer tokens, recommendation markers, question IDs, dialogue labels, or planning chronology into placeholders. The Source column is internal derivation metadata only and never appears in generated rules.
|
|
22
22
|
|
|
23
23
|
| Template Placeholder | Source | Example Fill |
|
|
24
24
|
|---------------------|--------|-------------|
|
|
25
25
|
| `{{ project_name }}` | Phase 0 auto-read from `package.json` `name` field; if unavailable, ask the user | `robot-svc` |
|
|
26
26
|
| `{{ generated_at }}` | Phase 4, AI writes current ISO date | `2026-05-18` |
|
|
27
27
|
| `{{ project_scope }}` | Phase 0 ask user ("Which directories/subprojects does this spec apply to?") | `apps/web, apps/admin` |
|
|
28
|
-
| `{{ design_source }}` | Q8 answer | `
|
|
28
|
+
| `{{ design_source }}` | Q8 answer | `Responsive layout, token, and component constraints extracted into this rules document; transient planning source omitted` |
|
|
29
29
|
| `{{ framework }}` | Q1 answer | `React 18+` |
|
|
30
30
|
| `{{ meta_framework }}` | Q2 answer | `Next.js (App Router)` |
|
|
31
31
|
| `{{ package_manager }}` | Q3 answer | `pnpm` |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> This file is read on demand by SKILL.md in Phase 2. The AI must strictly follow the group order defined in this file, asking **one group at a time (1–5 questions)**, never dumping all questions at once.
|
|
4
4
|
> For every question, show the user: question number, question text, options, **recommended choice (marked "Recommended")**, and a one-line description.
|
|
5
|
-
> After each
|
|
5
|
+
> After each response, resolve it to the complete option or custom meaning and record that internal-only semantic choice in `answers[Qx]`. Never store raw answer tokens, and never render question IDs or answer-map entries into generated artifacts.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -153,13 +153,13 @@ Total: 25 questions.
|
|
|
153
153
|
|
|
154
154
|
## G4 — Design System
|
|
155
155
|
|
|
156
|
-
### Q8. Primary Design/Mockup
|
|
156
|
+
### Q8. Primary Design/Mockup Basis
|
|
157
157
|
- **Options**:
|
|
158
|
-
- A) Existing HTML prototype
|
|
159
|
-
- B) Existing Figma
|
|
160
|
-
- C) Other
|
|
158
|
+
- A) Existing HTML prototype committed as a stable project artifact
|
|
159
|
+
- B) Existing Figma design with a stable accessible URL
|
|
160
|
+
- C) Other stable execution-time design source
|
|
161
161
|
- D) None, starting from scratch
|
|
162
|
-
- **Note**: If
|
|
162
|
+
- **Note**: If a source is transient—such as a brainstorm note, upload path, screenshot path, or temporary directory—extract its relevant layout, token, component, and interaction constraints into the generated rules and omit the path. Retain only purpose-tagged stable code/interface paths or URLs that the execution AI must inspect. D triggers a "recommend doing a style direction first" hint.
|
|
163
163
|
- **Maps to**: `{{ design_source }}` (document header metadata)
|
|
164
164
|
|
|
165
165
|
### Q9. Token Naming Layers
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> This document was generated by the `frontend-rules` skill on {{ generated_at }}
|
|
4
4
|
> Scope: {{ project_scope }}
|
|
5
|
-
> Design
|
|
5
|
+
> Design basis: {{ design_source }}
|
|
6
6
|
> Audience: All human developers + all AI coding assistants on this project
|
|
7
7
|
>
|
|
8
8
|
> **Usage**:
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
|
-
- [Phase 2
|
|
9
|
+
- [Phase 2 Normalized Semantic Fill Table](#phase-2-normalized-semantic-fill-table)
|
|
10
10
|
- [Trigger Map](#trigger-map)
|
|
11
11
|
- [Rule Block Definitions](#rule-block-definitions)
|
|
12
12
|
- [Template Placeholder Coverage Self-Check](#template-placeholder-coverage-self-check)
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
## Phase 2
|
|
17
|
+
## Phase 2 Normalized Semantic Fill Table
|
|
18
|
+
|
|
19
|
+
Resolve each selected option or custom reply into the complete semantic value shown by the examples. Never copy raw answer tokens, recommendation markers, question IDs, dialogue labels, or planning chronology into placeholders. The Source column is internal derivation metadata only and never appears in generated rules.
|
|
18
20
|
|
|
19
21
|
| Template Placeholder | Source | Example Fill |
|
|
20
22
|
|---------------------|--------|-------------|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> This file is read on demand by SKILL.md in Phase 2. The AI must strictly follow the group order defined in this file, asking **one group at a time (1–3 questions)**, never dumping all questions at once.
|
|
4
4
|
> For every question, show the user: question number, question text, options, **recommended choice (marked "Recommended")**, and a one-line description.
|
|
5
|
-
> After each
|
|
5
|
+
> After each response, resolve it to the complete option or custom meaning and record that internal-only semantic choice in `answers[Qx]`. Never store raw answer tokens, and never render question IDs or answer-map entries into generated artifacts.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -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
|
-
-
|
|
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
|
|
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
|
-
-
|
|
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
|
|
64
|
-
-
|
|
65
|
-
-
|
|
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
|
-
-
|
|
72
|
-
- Good: `Selected decision:
|
|
73
|
-
-
|
|
74
|
-
- Bad:
|
|
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.
|
|
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.
|
|
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.
|
|
24
|
-
3.
|
|
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
|
|
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`.
|
|
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
|
|
63
|
-
- Bad:
|
|
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
|
|
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
|
-
-
|
|
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
|
|
71
|
-
-
|
|
72
|
-
- Bad: `src/auth/login.ts:42-78` with no purpose.
|
|
73
|
-
- For large materials such as issues, PRDs, logs, or documents,
|
|
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
|
-
-
|
|
80
|
-
- Good: `Selected decision:
|
|
81
|
-
-
|
|
82
|
-
- Bad:
|
|
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.
|
|
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: `
|
|
79
|
-
- Bad:
|
|
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
|
|
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
|
|
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
|
|
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
|
|
34
|
-
-
|
|
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
|
|
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:
|
|
44
|
-
- Good:
|
|
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.
|
|
24
|
-
3.
|
|
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
|
|
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`.
|
|
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
|
|
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
|
|
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
|
-
-
|
|
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
|
|
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,
|
|
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
|
-
-
|
|
77
|
-
- Good: `Selected decision:
|
|
78
|
-
-
|
|
79
|
-
- Bad:
|
|
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.
|
|
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.
|
|
24
|
-
3.
|
|
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
|
|
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`.
|
|
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
|
|
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
|
|
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.
|
|
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
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
-
|
|
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
|
|