@sireai/optimus 0.1.43 → 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 (26) hide show
  1. package/dist/cli/optimus.js +2 -0
  2. package/dist/cli/optimus.js.map +1 -1
  3. package/dist/problem-solving-core/codex/codex-runner.d.ts +8 -0
  4. package/dist/problem-solving-core/codex/codex-runner.js +210 -5
  5. package/dist/problem-solving-core/codex/codex-runner.js.map +1 -1
  6. package/dist/task-environment/delivery/delivery-warning-copy.js +1 -8
  7. package/dist/task-environment/delivery/delivery-warning-copy.js.map +1 -1
  8. package/dist/task-environment/delivery/feishu-analysis-doc-service.js +1 -1
  9. package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -1
  10. package/dist/task-environment/delivery/pm-feishu-card-renderer.d.ts +2 -0
  11. package/dist/task-environment/delivery/pm-feishu-card-renderer.js +39 -13
  12. package/dist/task-environment/delivery/pm-feishu-card-renderer.js.map +1 -1
  13. package/dist/task-environment/delivery/task-delivery-service.d.ts +0 -3
  14. package/dist/task-environment/delivery/task-delivery-service.js +6 -113
  15. package/dist/task-environment/delivery/task-delivery-service.js.map +1 -1
  16. package/dist/task-environment/observability/logger.js +2 -0
  17. package/dist/task-environment/observability/logger.js.map +1 -1
  18. package/dist/task-environment/orchestration/task-orchestrator.js +2 -1
  19. package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
  20. package/package.json +2 -2
  21. package/task-harnesses/bugfix/STANDARD.md +1 -0
  22. package/task-harnesses/pm/CONSTRAINTS.md +4 -12
  23. package/task-harnesses/pm/CONTEXT.md +2 -7
  24. package/task-harnesses/pm/EVOLUTION.md +4 -4
  25. package/task-harnesses/pm/ROLE.md +4 -4
  26. package/task-harnesses/pm/STANDARD.md +16 -138
@@ -26,11 +26,9 @@ Complete work in this order:
26
26
  3. `Plan Representation`
27
27
  - for each critical rule, choose exactly one:
28
28
  - `Represented Interactively`
29
- - `Represented via Annotation`
30
29
  - `Downgraded / Simulated`
31
30
  - `Not Represented`
32
31
  - use `Represented Interactively` only when the prototype will contain direct behavioral evidence
33
- - use `Represented via Annotation` when the rule is review-critical but not faithfully expressible through lightweight interaction
34
32
 
35
33
  4. `Frame`
36
34
  - define the minimum screen and state set that makes the accepted scope reviewable
@@ -40,7 +38,7 @@ Complete work in this order:
40
38
  5. `Build`
41
39
  - produce one reviewable `prototype.html`
42
40
  - make the main path, major states, and key transitions inspectable
43
- - add anchored review annotations where interaction is insufficient
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
44
42
 
45
43
  6. `Review`
46
44
  - explicitly spawn one reviewer subagent after the first build
@@ -52,7 +50,6 @@ Complete work in this order:
52
50
  - representation plan
53
51
  - `prototype.html` when present
54
52
  - `result.md`
55
- - `annotations.json` when present
56
53
  - previous review findings and builder revisions when this is round 2 or 3
57
54
  - current round number and maximum round count
58
55
  - reviewer must judge against the reviewer rubric defined below
@@ -61,6 +58,7 @@ Complete work in this order:
61
58
  - reviewer verdict
62
59
  - key gaps
63
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
64
62
 
65
63
  7. `Revise`
66
64
  - if the reviewer finds material gaps, revise the prototype and rerun the reviewer subagent
@@ -77,7 +75,6 @@ Complete work in this order:
77
75
 
78
76
  8. `Deliver`
79
77
  - generate `result.md`
80
- - generate `annotations.json` whenever a prototype exists
81
78
  - generate `review-log.md` whenever the reviewer loop ran
82
79
  - declare deviations, simulations, and unresolved implementation-critical points precisely
83
80
 
@@ -101,12 +98,11 @@ If execution stops early, explain which step could not be completed and why.
101
98
  - deeper business or interaction logic is only described textually and not demonstrated clearly enough through the prototype
102
99
  - explicit source fact drift that changes review interpretation
103
100
  - simulated behavior presented as if it were faithful interaction
104
- - annotation layer and `annotations.json` disagree on important meaning
105
101
  - the artifact set is too weak to guide downstream AI coding without major guessing about rules, state behavior, or implementation intent
106
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
107
103
  - examples of `Can Ship As Partial`:
108
104
  - useful prototype exists, but some non-core states remain merged or downgraded
109
- - some important but secondary rules remain annotation-only or simulated
105
+ - some important but secondary rules remain simulated or unresolved in direct interaction
110
106
  - the core design direction is usable, but parts of the visual system or interaction polish still fall below designer-grade expectations
111
107
  - examples of `Open Question`:
112
108
  - requirement ambiguity prevents stronger representation without invention
@@ -122,7 +118,6 @@ Each reviewer round should receive these inputs in this priority order:
122
118
  2. `Produced artifacts`
123
119
  - `prototype.html` when present
124
120
  - `result.md`
125
- - `annotations.json` when present
126
121
 
127
122
  3. `Builder framing`
128
123
  - requirement map
@@ -180,33 +175,34 @@ The reviewer must evaluate the prototype against these principles in order:
180
175
  - the prototype must not stop at first-layer description when the requirement meaning depends on richer interaction logic
181
176
 
182
177
  3. `Representation correctness`
183
- - interaction, annotation, simulation, and omission must each be used deliberately and truthfully
184
- - if a rule needs to be understood for review, the prototype must either demonstrate it or annotate it clearly
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`
185
180
  - avoid reviewer-driven overbuilding: do not add extra flows, fake data breadth, or decorative complexity unless they directly improve requirement understanding
186
181
 
187
182
  4. `Implementation readiness for AI coding`
188
- - the artifact set must give downstream AI coding enough rule context, implementation guardrails, and annotation coverage to avoid major guessing
189
- - `result.md` and `annotations.json` must supplement the prototype where direct interaction is insufficient
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
190
185
 
191
186
  5. `UI design quality and visual fidelity`
192
187
  - the prototype should reach designer-grade quality for its intended fidelity level
193
188
  - visual style, layout cues, screenshots, diagrams, and structural hints from the requirement document should be used as first-priority guidance when present
194
189
  - avoid generic or template-looking UI when the source document provides stronger visual direction
195
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
196
192
  - for `Represented Interactively` modules, visible content must remain materially present:
197
193
  - charts must still show visible bars, lines, points, or equivalent graphical carriers rather than only captions or axes
198
- - explanatory panels such as scope / exclusion / guardrail areas must retain enough information density to communicate their product meaning, not collapse into thin placeholder copy
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
199
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
200
196
 
201
197
  6. `Artifact consistency`
202
- - `prototype.html`, `result.md`, and `annotations.json` must agree on key rules, limitations, and truth status
198
+ - `prototype.html` and `result.md` must agree on key rules, limitations, and truth status
203
199
 
204
200
  7. `Regression control after revision`
205
201
  - every later review round must re-check the whole accepted prototype surface, not only the previous `Must Fix` list
206
202
  - the reviewer must explicitly check for:
207
203
  - newly blank or near-blank core panels
208
204
  - graph containers whose DOM exists but whose intended visual content is no longer meaningfully visible
209
- - explanatory regions whose copy became materially thinner or lost review-critical meaning
205
+ - product-facing explanatory regions required by the source UI whose copy became materially thinner or lost review-critical meaning
210
206
  - regressions where a previously acceptable panel becomes weaker after a later fix
211
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
212
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
@@ -234,41 +230,14 @@ The reviewer must evaluate the prototype against these principles in order:
234
230
 
235
231
  ## Prototype standard
236
232
  - `prototype.html` is the main review artifact
233
+ - `prototype.html` is not the place for delivery portal content or truth-status summaries
237
234
  - the prototype must make the main user flow inspectable
238
235
  - prefer depth on the core path over shallow breadth
239
236
  - support meaningful review actions such as navigation, state changes, or key transitions
240
- - keep the prototype understandable when annotations are hidden or minimized
241
237
  - keep core panels visibly reviewable across revisions
242
238
  - do not count a panel as interactively represented when its main carrier is visually missing, nearly invisible, or replaced by bare labels only
243
239
  - if the accepted scope includes charted data, preserve visible graphical expression rather than text-only scaffolding
244
240
 
245
- ## Annotation standard
246
- - use a dedicated review mode when annotation density would otherwise disrupt normal reading
247
- - keep review-only controls secondary, collapsible, or minimized
248
- - assign stable target ids
249
- - recommended target attribute: `data-pm-target="<id>"`
250
- - recommended annotation attribute: `data-pm-annotation="<id>"`
251
- - each annotation should have one primary target whenever possible
252
- - clicking an annotation should focus its target; clicking a target affordance should reveal the linked annotation
253
- - use stronger linkage such as numbered mapping or connector lines only when it improves readability
254
-
255
- ### Truth semantics
256
- - `Confirmed`: faithful to the source requirement
257
- - `Simulated`: represented approximately for review
258
- - `Open Question`: unresolved and review-relevant
259
-
260
- ### Good annotation targets
261
- - server-side rules that materially affect UX
262
- - formulas, thresholds, ordering, permissions, and gating
263
- - approximations that could be mistaken as final behavior
264
- - unresolved behavior reviewers must notice
265
-
266
- ### Bad annotation targets
267
- - long PRD excerpts without interpretation
268
- - screen facts already obvious from the UI
269
- - visual design commentary with no product impact
270
- - missing core flows that should have been prototyped directly
271
-
272
241
  ## Runtime result contract
273
242
  - return exactly one runtime JSON object
274
243
  - normal completion and analysis-only closure both return `completed`
@@ -287,10 +256,10 @@ The reviewer must evaluate the prototype against these principles in order:
287
256
  ## Artifact contract
288
257
  - always generate `result.md` on normal completion
289
258
  - generate `prototype.html` for `Prototype Complete` and `Prototype Partial`
290
- - generate `annotations.json` whenever `prototype.html` is generated
291
259
  - generate `review-log.md` when the PM review loop ran
292
260
  - use repository-independent artifact paths
293
261
  - `result.md` is the only framework-required result artifact
262
+ - put scope boundaries, exclusions, simulations, assumptions, truth-status notes, and open questions in `result.md`, not in the default prototype page
294
263
  - task-private files are optional and must support review directly
295
264
 
296
265
  ## Feishu delivery document
@@ -298,7 +267,6 @@ The reviewer must evaluate the prototype against these principles in order:
298
267
  - treat the Feishu delivery document as a delivery portal, not as a second PRD
299
268
  - detailed interaction belongs in `prototype.html`
300
269
  - rule supplements belong in `result.md`
301
- - structured annotation handoff belongs in `annotations.json`
302
270
 
303
271
  ### Required structure
304
272
  1. `需求文档`
@@ -309,95 +277,6 @@ The reviewer must evaluate the prototype against these principles in order:
309
277
  - keep artifact purpose attached to the artifact itself
310
278
  - do not duplicate artifact content in the delivery document
311
279
 
312
- ## `annotations.json` contract
313
- - purpose: machine-readable export of anchored review annotations
314
- - paired artifact: normally `prototype.html`
315
- - top-level fields:
316
- - `version`
317
- - `artifact`
318
- - `annotations`
319
- - `annotations` may be empty, but must exist when the file is generated
320
-
321
- ### Each annotation record must include
322
- - `id`
323
- - `target`
324
- - `type`
325
- - `status`
326
- - `priority`
327
- - `title`
328
- - `content`
329
-
330
- ### `target` must include
331
- - `elementId`
332
- - optional `page`
333
- - optional `anchor`: `top` | `right` | `bottom` | `left` | `inline` | `state`
334
-
335
- ### Recommended enums
336
- - `type`:
337
- - `interaction`
338
- - `state`
339
- - `calculation`
340
- - `data_rule`
341
- - `edge_case`
342
- - `empty_state`
343
- - `error_state`
344
- - `permission`
345
- - `out_of_scope`
346
- - `open_question`
347
- - `status`:
348
- - `confirmed`
349
- - `assumption`
350
- - `simulated`
351
- - `open_question`
352
- - `priority`:
353
- - `high`
354
- - `medium`
355
- - `low`
356
-
357
- ### Optional fields
358
- - `secondaryTargets`
359
- - `structured`
360
- - `sourceRefs`
361
- - `implementationImpact`
362
- - `reviewerNote`
363
-
364
- ### Generation rules
365
- - create one record per review-meaningful annotation, not per DOM node
366
- - if a rule is represented via annotation in the requirement map, it must appear here
367
- - keep truth status aligned with the prototype
368
- - use `structured` when formulas, state keys, limits, or forbidden interpretations matter
369
-
370
- ### Example
371
- ```json
372
- {
373
- "version": "1.0",
374
- "artifact": "prototype.html",
375
- "annotations": [
376
- {
377
- "id": "ann-load-rate-all-rule",
378
- "target": {
379
- "page": "power-dashboard",
380
- "elementId": "load-rate-trend-chart",
381
- "anchor": "right"
382
- },
383
- "type": "calculation",
384
- "status": "confirmed",
385
- "priority": "high",
386
- "title": "All Load Rate calculation rule",
387
- "content": "All Load Rate must be calculated as total power divided by total capacity. Average-based calculation is not allowed.",
388
- "structured": {
389
- "formula": "sum(room.power) / sum(room.capacity) * 100%",
390
- "forbiddenFormula": "avg(room.loadRate)"
391
- },
392
- "implementationImpact": "Affects trend aggregation logic, KPI cards, and chart tooltip consistency.",
393
- "sourceRefs": [
394
- "Load Rate Trend > All view"
395
- ]
396
- }
397
- ]
398
- }
399
- ```
400
-
401
280
  ## `result.md` contract
402
281
  Keep `result.md` dense, implementation-oriented, and in Chinese unless the task explicitly requires another language.
403
282
 
@@ -438,7 +317,7 @@ Keep `result.md` dense, implementation-oriented, and in Chinese unless the task
438
317
 
439
318
  # 闭环判定
440
319
  - Closure Level:Prototype Partial
441
- - 判定依据:核心路径可评审,但历史场景下 Power 统计口径仍未明确,且部分规则仍以 annotation 承载。
320
+ - 判定依据:核心路径可评审,但历史场景下 Power 统计口径仍未明确,且部分规则仍未能通过交互完全表达。
442
321
  - 主要剩余问题:历史 Power KPI 的精确定义仍是 Open Question。
443
322
  ```
444
323
 
@@ -462,13 +341,13 @@ Keep `result.md` dense, implementation-oriented, and in Chinese unless the task
462
341
  ## Round 1
463
342
  - Reviewer Verdict: Must Fix Before Complete
464
343
  - Must Fix:
465
- - `All Load Rate` 计算口径未在原型或 annotation 中明确。
344
+ - `All Load Rate` 计算口径未在原型或 `result.md` 中明确。
466
345
  - Can Ship As Partial:
467
346
  - 历史 Power KPI 口径仍可暂时保留为开放问题。
468
347
  - Open Questions:
469
348
  - `Last 90 Days` 聚合粒度是否按月展示仍待确认。
470
349
  - Builder Action:
471
- - 新增 `All Load Rate` 计算口径 annotation,并调整结果说明。
350
+ - 补强原型交互表达,并在 `result.md` 中补充规则说明。
472
351
  ```
473
352
 
474
353
  ## Final self-check
@@ -477,7 +356,6 @@ Keep `result.md` dense, implementation-oriented, and in Chinese unless the task
477
356
  - final closure matches the last reviewer verdict
478
357
  - every material key rule has a declared representation mode
479
358
  - any remaining downgraded or missing behavior is disclosed in `result.md`
480
- - `annotations.json` matches the actual annotation layer in `prototype.html`
481
359
  - `result.md` contains no delivery-index or artifact-list sections
482
360
  - source facts are preserved or deviations are explicitly declared
483
361
  - sample data is not presented as source truth