@sireai/optimus 0.1.42 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/cli/optimus.js +59 -39
  2. package/dist/cli/optimus.js.map +1 -1
  3. package/dist/integrations/feishu/feishu-doc-service.d.ts +14 -2
  4. package/dist/integrations/feishu/feishu-doc-service.js +33 -12
  5. package/dist/integrations/feishu/feishu-doc-service.js.map +1 -1
  6. package/dist/integrations/feishu/feishu-document-reader.d.ts +33 -0
  7. package/dist/integrations/feishu/feishu-document-reader.js +597 -0
  8. package/dist/integrations/feishu/feishu-document-reader.js.map +1 -0
  9. package/dist/problem-solving-core/codex/codex-runner.d.ts +8 -0
  10. package/dist/problem-solving-core/codex/codex-runner.js +210 -5
  11. package/dist/problem-solving-core/codex/codex-runner.js.map +1 -1
  12. package/dist/task-environment/delivery/delivery-warning-copy.d.ts +2 -0
  13. package/dist/task-environment/delivery/delivery-warning-copy.js +17 -0
  14. package/dist/task-environment/delivery/delivery-warning-copy.js.map +1 -0
  15. package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +32 -2
  16. package/dist/task-environment/delivery/feishu-analysis-doc-service.js +343 -17
  17. package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -1
  18. package/dist/task-environment/delivery/feishu-card-primitives.d.ts +33 -0
  19. package/dist/task-environment/delivery/feishu-card-primitives.js +95 -0
  20. package/dist/task-environment/delivery/feishu-card-primitives.js.map +1 -0
  21. package/dist/task-environment/delivery/feishu-card-renderer.d.ts +1 -0
  22. package/dist/task-environment/delivery/feishu-card-renderer.js +34 -71
  23. package/dist/task-environment/delivery/feishu-card-renderer.js.map +1 -1
  24. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js +1 -0
  25. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js.map +1 -1
  26. package/dist/task-environment/delivery/feishu-notifier.js +4 -0
  27. package/dist/task-environment/delivery/feishu-notifier.js.map +1 -1
  28. package/dist/task-environment/delivery/pm-feishu-card-renderer.d.ts +21 -0
  29. package/dist/task-environment/delivery/pm-feishu-card-renderer.js +203 -0
  30. package/dist/task-environment/delivery/pm-feishu-card-renderer.js.map +1 -0
  31. package/dist/task-environment/delivery/sentry-feishu-card-renderer.d.ts +1 -0
  32. package/dist/task-environment/delivery/sentry-feishu-card-renderer.js +33 -70
  33. package/dist/task-environment/delivery/sentry-feishu-card-renderer.js.map +1 -1
  34. package/dist/task-environment/delivery/task-delivery-service.d.ts +3 -1
  35. package/dist/task-environment/delivery/task-delivery-service.js +28 -7
  36. package/dist/task-environment/delivery/task-delivery-service.js.map +1 -1
  37. package/dist/task-environment/observability/logger.js +2 -0
  38. package/dist/task-environment/observability/logger.js.map +1 -1
  39. package/dist/task-environment/orchestration/task-orchestrator.js +2 -1
  40. package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
  41. package/dist/types.d.ts +2 -0
  42. package/package.json +2 -2
  43. package/task-harnesses/bugfix/ACCEPT.md +3 -2
  44. package/task-harnesses/bugfix/CONSTRAINTS.md +10 -4
  45. package/task-harnesses/bugfix/EVOLUTION.md +2 -8
  46. package/task-harnesses/bugfix/ROLE.md +7 -11
  47. package/task-harnesses/bugfix/STANDARD.md +82 -0
  48. package/task-harnesses/pm/ACCEPT.md +27 -57
  49. package/task-harnesses/pm/CONSTRAINTS.md +35 -39
  50. package/task-harnesses/pm/CONTEXT.md +31 -41
  51. package/task-harnesses/pm/EVOLUTION.md +61 -27
  52. package/task-harnesses/pm/ROLE.md +25 -27
  53. package/task-harnesses/pm/STANDARD.md +305 -130
  54. package/task-harnesses/pm/ANNOTATION_PATTERN.md +0 -58
@@ -1,68 +1,244 @@
1
1
  # STANDARD
2
2
 
3
- Defines the mandatory execution sequence, result contract, and closure standard.
3
+ Defines the mandatory PM execution flow, artifact contract, and delivery standard.
4
4
 
5
5
  ## Execution sequence
6
6
  Complete work in this order:
7
7
 
8
8
  1. `Read`
9
9
  - read the full source requirement document
10
- - extract explicit goals, users, flows, states, constraints, and missing information
11
- - identify review-critical rules such as thresholds, counts, ordering, gating, frequency limits, role boundaries, and content-type distinctions
10
+ - extract goals, users, flows, states, constraints, open questions, and explicit source facts
11
+ - identify review-critical rules such as thresholds, counts, ordering, gating, permissions, formulas, and content-type distinctions
12
12
 
13
13
  2. `Map`
14
14
  - build a requirement map before designing screens or writing HTML
15
- - include at minimum:
15
+ - include:
16
16
  - product goal
17
17
  - target user
18
+ - bounded scope
18
19
  - entry point
19
20
  - core flow
20
21
  - key states
21
- - requirement-critical rules
22
+ - critical rules
22
23
  - explicit non-goals
23
24
  - open questions
24
25
 
25
26
  3. `Plan Representation`
26
- - for each requirement-critical rule, choose exactly one:
27
+ - for each critical rule, choose exactly one:
27
28
  - `Represented Interactively`
28
- - `Represented via Annotation`
29
29
  - `Downgraded / Simulated`
30
30
  - `Not Represented`
31
- - prefer interaction for core user behavior and decision-critical meaning
32
- - use annotation when meaning is review-critical but not faithfully expressible through lightweight interaction
33
- - use downgrade/simulation only when it still supports useful review
34
- - choose `Represented Interactively` only when the prototype will contain clear behavioral evidence of that rule
35
- - if the rule is mainly conveyed by explanation, scenario toggles, or approximation rather than direct behavior, classify it as `Represented via Annotation` or `Downgraded / Simulated`
31
+ - use `Represented Interactively` only when the prototype will contain direct behavioral evidence
36
32
 
37
33
  4. `Frame`
38
- - define the minimum prototype scope that makes the core flow reviewable
39
- - decide covered screens, transitions, states, and review-mode needs
34
+ - define the minimum screen and state set that makes the accepted scope reviewable
40
35
  - reduce breadth before inventing detail
41
- - record only the minimum assumptions needed for continuity
36
+ - keep assumptions minimal and explicit
42
37
 
43
38
  5. `Build`
44
- - produce one reviewable interactive HTML prototype package
45
- - convert requirement meaning into UI structure, interaction, and visible states
46
- - add review mode when rule meaning cannot be carried clearly by interaction alone
47
- - use annotation content to mark `Confirmed`, `Simulated`, and `Open Question` where helpful
39
+ - produce one reviewable `prototype.html`
40
+ - make the main path, major states, and key transitions inspectable
41
+ - keep `prototype.html` focused on product interaction; move scope, exclusion, truth-status, simulation, and open-question commentary into `result.md` unless the source explicitly defines them as in-product UI
48
42
 
49
- 6. `Deliver`
43
+ 6. `Review`
44
+ - explicitly spawn one reviewer subagent after the first build
45
+ - reviewer input must include:
46
+ - source requirement document
47
+ - source URL when available
48
+ - accepted scope
49
+ - requirement map
50
+ - representation plan
51
+ - `prototype.html` when present
52
+ - `result.md`
53
+ - previous review findings and builder revisions when this is round 2 or 3
54
+ - current round number and maximum round count
55
+ - reviewer must judge against the reviewer rubric defined below
56
+ - record one review round log entry containing:
57
+ - round number
58
+ - reviewer verdict
59
+ - key gaps
60
+ - recommended revisions or explicit approval
61
+ - if reviewer subagent invocation fails, log the failure, skip the reviewer loop for this run, and continue normal artifact finalization; do not hang waiting for the reviewer path to recover
62
+
63
+ 7. `Revise`
64
+ - if the reviewer finds material gaps, revise the prototype and rerun the reviewer subagent
65
+ - maximum review rounds: 3 total
66
+ - stop early when:
67
+ - the reviewer approves closure, or
68
+ - another revise-and-review pass is unlikely to improve trustworthiness materially
69
+ - if the final reviewer verdict still finds material gaps after the maximum rounds, downgrade closure instead of looping further
70
+ - the builder must read the latest reviewer output before revising
71
+ - each new review round must include:
72
+ - the previous reviewer findings
73
+ - what the builder changed
74
+ - what the builder intentionally did not change and why
75
+
76
+ 8. `Deliver`
50
77
  - generate `result.md`
51
- - declare outputs precisely
52
- - surface assumptions, open questions, uncovered areas, and representation choices explicitly
78
+ - generate `review-log.md` whenever the reviewer loop ran
79
+ - declare deviations, simulations, and unresolved implementation-critical points precisely
53
80
 
54
81
  If execution stops early, explain which step could not be completed and why.
55
82
 
83
+ ## Review loop standard
84
+ - the reviewer subagent must be explicitly requested; do not assume it will appear automatically
85
+ - the reviewer must not rewrite the prototype directly; it judges and recommends
86
+ - the builder applies revisions and owns the updated artifacts
87
+ - provide the reviewer with facts first, not builder conclusions first
88
+ - the reviewer should treat the source requirement and produced artifacts as primary evidence; builder framing is supporting context only
89
+ - reviewer findings do not justify unlimited scope growth, denser chrome, or extra speculative screens by default
90
+ - each review round should classify every material finding as one of:
91
+ - `Must Fix Before Complete`
92
+ - `Can Ship As Partial`
93
+ - `Open Question`
94
+ - examples of `Must Fix Before Complete`:
95
+ - missing core flow coverage
96
+ - important requirement content is omitted, misunderstood, or inconsistent with the source document
97
+ - missing or materially wrong key rule representation
98
+ - deeper business or interaction logic is only described textually and not demonstrated clearly enough through the prototype
99
+ - explicit source fact drift that changes review interpretation
100
+ - simulated behavior presented as if it were faithful interaction
101
+ - the artifact set is too weak to guide downstream AI coding without major guessing about rules, state behavior, or implementation intent
102
+ - UI quality is materially below design-review expectations, especially when the requirement document already contains screenshots, diagrams, or strong structural visual cues that were not meaningfully used
103
+ - examples of `Can Ship As Partial`:
104
+ - useful prototype exists, but some non-core states remain merged or downgraded
105
+ - some important but secondary rules remain simulated or unresolved in direct interaction
106
+ - the core design direction is usable, but parts of the visual system or interaction polish still fall below designer-grade expectations
107
+ - examples of `Open Question`:
108
+ - requirement ambiguity prevents stronger representation without invention
109
+
110
+ ## Reviewer input contract
111
+ Each reviewer round should receive these inputs in this priority order:
112
+
113
+ 1. `Source facts`
114
+ - requirement document
115
+ - source URL when available
116
+ - explicit accepted scope
117
+
118
+ 2. `Produced artifacts`
119
+ - `prototype.html` when present
120
+ - `result.md`
121
+
122
+ 3. `Builder framing`
123
+ - requirement map
124
+ - representation plan
125
+ - declared deviations, simulations, and unresolved points
126
+
127
+ 4. `Round context`
128
+ - current round number
129
+ - maximum rounds: `3`
130
+ - previous reviewer findings and builder revisions for rounds 2 and 3
131
+
132
+ ## Reviewer output contract
133
+ Each reviewer round must produce a compact review record that the builder can consume directly.
134
+
135
+ Minimum fields:
136
+ - `Round`
137
+ - `Reviewer Verdict`
138
+ - `Coverage Assessment`
139
+ - `Logic Demonstrability Assessment`
140
+ - `AI Coding Readiness Assessment`
141
+ - `UI Fidelity Assessment`
142
+ - `Core Panel Visibility Check`
143
+ - `New Regression Since Previous Round`
144
+ - `Must Fix Before Complete`
145
+ - `Can Ship As Partial`
146
+ - `Open Questions`
147
+ - `Suggested Revisions`
148
+
149
+ Allowed `Reviewer Verdict` values:
150
+ - `Must Fix Before Complete`
151
+ - `Can Ship As Partial`
152
+ - `Approved for Prototype Complete`
153
+
154
+ ## Builder handoff contract
155
+ After each review round, the builder must:
156
+ - read the full reviewer output
157
+ - revise the prototype and companion artifacts when `Must Fix Before Complete` findings exist
158
+ - preserve unresolved but non-blocking findings inside `result.md` when closure remains partial
159
+ - run a full core-panel self-check before requesting the next review, not only a point fix for the previous `Must Fix`
160
+ - prefer downgrade over another revise round when the next change would require speculative product invention, materially larger scope, or a noisier prototype that reduces reviewability
161
+ - write a concise round handoff into `review-log.md` containing:
162
+ - what was changed
163
+ - what was intentionally left unchanged
164
+ - why the next review should or should not still expect a gap
165
+
166
+ ## Reviewer rubric
167
+ The reviewer must evaluate the prototype against these principles in order:
168
+
169
+ 1. `Requirement completeness and correctness`
170
+ - the interactive prototype must reflect the requirement document fully enough for the accepted scope
171
+ - important requirement content must not be missing, misunderstood, or inconsistent
172
+
173
+ 2. `Logic demonstrability`
174
+ - deeper logic chains, dependencies, and cause-effect behavior must be demonstrated clearly
175
+ - the prototype must not stop at first-layer description when the requirement meaning depends on richer interaction logic
176
+
177
+ 3. `Representation correctness`
178
+ - interaction, simulation, and omission must each be used deliberately and truthfully
179
+ - if a rule cannot be demonstrated faithfully in interaction, disclose the gap clearly in `result.md`
180
+ - avoid reviewer-driven overbuilding: do not add extra flows, fake data breadth, or decorative complexity unless they directly improve requirement understanding
181
+
182
+ 4. `Implementation readiness for AI coding`
183
+ - the artifact set must give downstream AI coding enough rule context and implementation guardrails to avoid major guessing
184
+ - `result.md` must supplement the prototype where direct interaction is insufficient
185
+
186
+ 5. `UI design quality and visual fidelity`
187
+ - the prototype should reach designer-grade quality for its intended fidelity level
188
+ - visual style, layout cues, screenshots, diagrams, and structural hints from the requirement document should be used as first-priority guidance when present
189
+ - avoid generic or template-looking UI when the source document provides stronger visual direction
190
+ - every core panel must remain visibly populated and reviewable after each revision; do not accept a panel that retains only a title, labels, or empty chrome while its intended information carrier disappears
191
+ - default prototype surface should read as product UI, not as a delivery brief or review console
192
+ - for `Represented Interactively` modules, visible content must remain materially present:
193
+ - charts must still show visible bars, lines, points, or equivalent graphical carriers rather than only captions or axes
194
+ - product-facing explanatory content that is actually part of the requirement UI must retain enough information density to communicate its meaning, not collapse into thin placeholder copy
195
+ - if a revision fixes one issue but causes another panel to become visually blank, materially thinner, or harder to interpret, treat it as a new blocking regression
196
+
197
+ 6. `Artifact consistency`
198
+ - `prototype.html` and `result.md` must agree on key rules, limitations, and truth status
199
+
200
+ 7. `Regression control after revision`
201
+ - every later review round must re-check the whole accepted prototype surface, not only the previous `Must Fix` list
202
+ - the reviewer must explicitly check for:
203
+ - newly blank or near-blank core panels
204
+ - graph containers whose DOM exists but whose intended visual content is no longer meaningfully visible
205
+ - product-facing explanatory regions required by the source UI whose copy became materially thinner or lost review-critical meaning
206
+ - regressions where a previously acceptable panel becomes weaker after a later fix
207
+ - if such regressions appear, record them under `New Regression Since Previous Round` and classify them as `Must Fix Before Complete` when they reduce reviewability materially
208
+ - if a proposed follow-up revision would mainly add complexity, speculative branches, or visual clutter without improving requirement truth, prefer `Prototype Partial` over further churn
209
+
210
+ ## Closure policy
211
+ - decide closure only after the final review round
212
+ - `Prototype Complete` requires:
213
+ - reviewer approval with no unresolved `Must Fix Before Complete` findings
214
+ - accepted scope, core path, major states, and key rules are reviewable
215
+ - source fact drift is absent or explicitly declared and immaterial
216
+ - deeper logic chains are demonstrated clearly enough for review
217
+ - the artifact set can guide downstream AI coding without major rule ambiguity
218
+ - UI quality is credible for design review and meaningfully uses source visual guidance when present
219
+ - `Prototype Partial` requires:
220
+ - a meaningful prototype exists
221
+ - reviewer found remaining material gaps, but the output is still useful for review
222
+ - remaining weakness is declared clearly in `result.md`
223
+ - prefer `Prototype Partial` over a larger but less truthful or less readable prototype assembled only to satisfy late review suggestions
224
+ - `Analysis Only` requires:
225
+ - no trustworthy interactive prototype was produced, or
226
+ - trustworthy completion would require heavy invention, or
227
+ - repeated review still shows the prototype is too weak to present as a meaningful interactive artifact
228
+ - do not use review-round exhaustion as a reason to mark `Prototype Complete`
229
+ - if closure is `Prototype Partial` or `Analysis Only`, state the strongest blocker or downgrade reason explicitly
230
+
56
231
  ## Prototype standard
57
- - the primary artifact is an interactive `prototype.html`
232
+ - `prototype.html` is the main review artifact
233
+ - `prototype.html` is not the place for delivery portal content or truth-status summaries
58
234
  - the prototype must make the main user flow inspectable
59
- - the prototype should support meaningful review actions such as navigation, state changes, or key transitions
60
- - prioritize depth on the core path over shallow breadth
61
- - when major requirement meaning cannot be expressed clearly by interaction alone, include review annotations
62
- - review annotations should be anchored to concrete UI targets, states, or transitions whenever possible
63
- - the prototype must remain understandable when annotations are hidden or minimized
235
+ - prefer depth on the core path over shallow breadth
236
+ - support meaningful review actions such as navigation, state changes, or key transitions
237
+ - keep core panels visibly reviewable across revisions
238
+ - do not count a panel as interactively represented when its main carrier is visually missing, nearly invisible, or replaced by bare labels only
239
+ - if the accepted scope includes charted data, preserve visible graphical expression rather than text-only scaffolding
64
240
 
65
- ## Result contract
241
+ ## Runtime result contract
66
242
  - return exactly one runtime JSON object
67
243
  - normal completion and analysis-only closure both return `completed`
68
244
  - return `failed` only for true runtime exceptions
@@ -77,110 +253,109 @@ If execution stops early, explain which step could not be completed and why.
77
253
  }
78
254
  ```
79
255
 
80
- ## Result artifacts
256
+ ## Artifact contract
81
257
  - always generate `result.md` on normal completion
82
258
  - generate `prototype.html` for `Prototype Complete` and `Prototype Partial`
259
+ - generate `review-log.md` when the PM review loop ran
83
260
  - use repository-independent artifact paths
84
261
  - `result.md` is the only framework-required result artifact
85
- - any task-private files must be declared inside `result.md`
86
-
87
- ## Result content
88
- At minimum, `result.md` must include:
89
-
90
- ### Delivery Summary
91
- - `Closure`
92
- - `Document Basis`
93
- - `Prototype Scope`
94
- - `Core Flow`
95
- - `Platform`
96
- - `Coverage`
97
- - `Uncovered Areas`
98
- - `Assumptions`
99
- - `Open Questions`
100
- - `Next Action`
101
-
102
- ### Outputs
103
- - `Main Review Artifact`
104
- - `Additional Files`
105
- - `Output Notes`
106
-
107
- ### Requirement Mapping
108
- - `Requirement-Critical Rules`
109
- - `Represented Interactively`
110
- - `Represented via Annotation`
111
- - `Downgraded / Simulated`
112
- - `Not Represented`
113
- - `Representation Notes`
114
-
115
- ### Detail
116
- - `Product Goal`
117
- - `Target User`
118
- - `Requirement Summary`
119
- - `Covered Screens / Sections`
120
- - `Key Interactions`
121
- - `States Included`
122
- - `Confirmed Requirements Used`
123
- - `Inferred Structure`
124
- - `Interaction Fidelity Notes`
125
- - `Review Annotation Notes`
126
- - `Assumptions`
127
- - `Open Questions`
128
- - `Recommended Next Step`
129
-
130
- ## Result rules
131
- - separate confirmed requirement content from inferred structure
132
- - prefer explicit gaps over fake completeness
133
- - if annotation-assisted explanation is used, state what was annotated and why interaction was insufficient
134
- - do not claim a requirement was fully represented when it was only approximated or annotated
135
- - ensure representation fields reflect the actual prototype, not the intended prototype
136
- - if a key rule was merged or flattened for simplicity, record that downgrade explicitly
137
- - `Represented Interactively` requires clear behavioral evidence in the prototype itself, not only surrounding explanation
138
- - if a rule depends mainly on annotation, scenario controls, review notes, or narrative explanation, do not classify it as fully interactive
139
-
140
- ## Closure standard
141
- - `Prototype Complete`: accepted scope, core path, major states, and key rules are reviewable through faithful interaction or clear anchored annotation
142
- - `Prototype Partial`: a meaningful prototype exists, but important parts remain uncovered, over-merged, or materially downgraded
143
- - `Analysis Only`: no trustworthy interactive prototype was produced; explain blockers and minimum missing input
144
-
145
- ## Result template
262
+ - put scope boundaries, exclusions, simulations, assumptions, truth-status notes, and open questions in `result.md`, not in the default prototype page
263
+ - task-private files are optional and must support review directly
264
+
265
+ ## Feishu delivery document
266
+ - default language is Chinese unless the task explicitly requires another language
267
+ - treat the Feishu delivery document as a delivery portal, not as a second PRD
268
+ - detailed interaction belongs in `prototype.html`
269
+ - rule supplements belong in `result.md`
270
+
271
+ ### Required structure
272
+ 1. `需求文档`
273
+ - provide the direct jump link to the source requirement
274
+
275
+ 2. `产物`
276
+ - provide the downloadable artifact set
277
+ - keep artifact purpose attached to the artifact itself
278
+ - do not duplicate artifact content in the delivery document
279
+
280
+ ## `result.md` contract
281
+ Keep `result.md` dense, implementation-oriented, and in Chinese unless the task explicitly requires another language.
282
+
283
+ ### Must include
284
+ 1. `规则补充`
285
+ - implementation-critical product rules
286
+ - key business logic or calculation rules
287
+ - important state, permission, ordering, threshold, or edge-case notes
288
+
289
+ 2. `原型未完全表达的点`
290
+ - rules or branches not fully captured by direct interaction
291
+ - simulations, merges, or approximations that must not be mistaken as final behavior
292
+ - open points that materially affect implementation understanding
293
+
294
+ 3. `闭环判定`
295
+ - final closure level: `Prototype Complete` / `Prototype Partial` / `Analysis Only`
296
+ - the strongest reviewer-backed reason for that closure
297
+ - if closure is not `Prototype Complete`, the top remaining blocker or downgrade reason
298
+
299
+ ### Must not do
300
+ - do not use `result.md` as a delivery index
301
+ - do not carry `需求文档` or artifact listing here
302
+ - do not add sections such as `产物文件`, `Artifacts`, `Artifact Files`, `需求文档`, or `产物`
303
+ - do not rewrite the PRD
304
+ - do not let prototype sample data appear indistinguishable from source fact
305
+ - do not dump full per-round review logs into `result.md`; keep detailed round logs in `review-log.md`
306
+
307
+ ### Template
308
+ ```md
309
+ # 规则补充
310
+ - Load Rate All 口径必须使用 total power / total capacity,不能使用平均值。
311
+ - 历史范围下 KPI `Power` 的精确定义仍待确认,当前原型仅保留交互与展示位置。
312
+ - 权限不足时仅展示空状态说明,不在原型中模拟真实鉴权流程。
313
+
314
+ # 原型未完全表达的点
315
+ - Live 数据刷新为轻量模拟,不能视为真实刷新策略。
316
+ - Last 90 Days 的聚合粒度仍需产品确认后才能进入研发实现。
317
+
318
+ # 闭环判定
319
+ - Closure Level:Prototype Partial
320
+ - 判定依据:核心路径可评审,但历史场景下 Power 统计口径仍未明确,且部分规则仍未能通过交互完全表达。
321
+ - 主要剩余问题:历史 Power KPI 的精确定义仍是 Open Question。
322
+ ```
323
+
324
+ ## `review-log.md` contract
325
+ - purpose: preserve the reviewer subagent loop as an audit trail
326
+ - language may be concise Chinese with stable English verdict tokens
327
+ - one round entry per review pass
328
+ - minimum fields per round:
329
+ - `Round`
330
+ - `Reviewer Verdict`
331
+ - `Must Fix`
332
+ - `Can Ship As Partial`
333
+ - `Open Questions`
334
+ - `Builder Action`
335
+ - if the first review approves the prototype directly, still record that approval round
336
+
337
+ ### Template
146
338
  ```md
147
- # Delivery Summary
148
- - Closure: Prototype Complete
149
- - Document Basis: source requirement document provided with the task
150
- - Prototype Scope: First-run onboarding only
151
- - Core Flow: Open invite -> fill profile -> complete setup
152
- - Platform: responsive
153
- - Coverage: invite landing, profile form, completion state
154
- - Uncovered Areas: admin approval flow, edge-case recovery paths
155
- - Assumptions: invite is valid for one user session
156
- - Open Questions: SSO is optional or required?
157
- - Next Action: review flow coverage and copy gaps
158
-
159
- # Outputs
160
- - Main Review Artifact: `prototype.html`
161
- - Additional Files: none
162
- - Output Notes: private outputs live under `artifactDir`
163
-
164
- # Requirement Mapping
165
- - Requirement-Critical Rules: invite entry, profile setup, completion confirmation
166
- - Represented Interactively: invite landing, profile form, submit, validation, success transition
167
- - Represented via Annotation: backend invite validation timing and account-provisioning dependency
168
- - Downgraded / Simulated: loading and approval check are simulated only
169
- - Not Represented: admin exception handling path
170
- - Representation Notes: approval timing is review-critical but backend-owned, so it is explained through anchored annotation instead of fake workflow logic
171
-
172
- # Detail
173
- - Product Goal: Reduce first-day confusion
174
- - Target User: New employee
175
- - Requirement Summary: Requirement input asks for a reviewable onboarding prototype
176
- - Covered Screens / Sections: invite landing, profile setup, confirmation
177
- - Key Interactions: start onboarding, form validation, submit, success transition
178
- - States Included: empty, validation error, loading, success
179
- - Confirmed Requirements Used: invite entry, profile setup, completion confirmation
180
- - Inferred Structure: lightweight validation and loading states to preserve flow continuity
181
- - Interaction Fidelity Notes: validation and submit flow are interactive; backend approval timing is annotation-assisted
182
- - Review Annotation Notes: approval dependency is attached to submit and success states in review mode
183
- - Assumptions: backend behavior is simulated only
184
- - Open Questions: whether manager approval is required before activation
185
- - Recommended Next Step: confirm approval rule and add branch state if needed
339
+ # Review Log
340
+
341
+ ## Round 1
342
+ - Reviewer Verdict: Must Fix Before Complete
343
+ - Must Fix:
344
+ - `All Load Rate` 计算口径未在原型或 `result.md` 中明确。
345
+ - Can Ship As Partial:
346
+ - 历史 Power KPI 口径仍可暂时保留为开放问题。
347
+ - Open Questions:
348
+ - `Last 90 Days` 聚合粒度是否按月展示仍待确认。
349
+ - Builder Action:
350
+ - 补强原型交互表达,并在 `result.md` 中补充规则说明。
186
351
  ```
352
+
353
+ ## Final self-check
354
+ - review loop ran and did not exceed 3 rounds
355
+ - reviewer was explicitly requested as a subagent, not implied
356
+ - final closure matches the last reviewer verdict
357
+ - every material key rule has a declared representation mode
358
+ - any remaining downgraded or missing behavior is disclosed in `result.md`
359
+ - `result.md` contains no delivery-index or artifact-list sections
360
+ - source facts are preserved or deviations are explicitly declared
361
+ - sample data is not presented as source truth
@@ -1,58 +0,0 @@
1
- # PM Review Annotation Pattern
2
-
3
- Reusable implementation convention for review-mode annotations in PM prototypes.
4
-
5
- ## Goal
6
- - keep the prototype itself reviewable
7
- - attach rule meaning to the exact UI it explains
8
- - avoid replacing interaction with detached explanation blocks
9
-
10
- ## Structure
11
- 1. `Review mode`
12
- - provide a dedicated toggle
13
- - keep annotation chrome hidden or minimized outside review mode
14
-
15
- 2. `Target anchors`
16
- - assign stable target ids
17
- - recommended attribute: `data-pm-target="<id>"`
18
-
19
- 3. `Annotation records`
20
- - bind each annotation to one primary target
21
- - recommended attribute: `data-pm-annotation="<id>"`
22
- - recommended fields:
23
- - `targetId`
24
- - `type`: `confirmed` | `simulated` | `open-question`
25
- - `title`
26
- - `body`
27
- - optional `secondaryTargets`
28
-
29
- 4. `Focused guidance`
30
- - selecting an annotation should highlight the bound target
31
- - optional connector lines may be used when they improve readability
32
- - prefer one focused annotation at a time
33
-
34
- ## Recommended behavior
35
- - click annotation item -> scroll target into view -> highlight target -> optionally show connector
36
- - click target badge -> open linked annotation detail
37
- - switching annotation should clear the previous focus state
38
-
39
- ## Visual semantics
40
- - `Confirmed`: neutral or positive emphasis
41
- - `Simulated`: caution emphasis
42
- - `Open Question`: unresolved emphasis
43
- - use color as reinforcement, not as the only signal
44
-
45
- ## Good annotation content
46
- - server-side rules that materially affect UX
47
- - thresholds, limits, gating, ordering, and role boundaries
48
- - prototype approximations that could otherwise be mistaken as final behavior
49
- - unresolved details reviewers must notice
50
-
51
- ## Bad annotation content
52
- - long PRD excerpts with no interpretation
53
- - generic summary already obvious from the screen
54
- - visual design commentary that does not affect product understanding
55
- - missing core flows that should have been prototyped directly
56
-
57
- ## Rule of thumb
58
- If UI alone would cause requirement misunderstanding, add an anchored annotation. If direct interaction explains the requirement better, build the interaction instead.