@sireai/optimus 0.1.45 → 0.1.46

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 (92) hide show
  1. package/dist/cli/feedback-delivery.js +13 -8
  2. package/dist/cli/feedback-delivery.js.map +1 -1
  3. package/dist/cli/optimus.js +370 -63
  4. package/dist/cli/optimus.js.map +1 -1
  5. package/dist/integrations/feishu/feishu-client.d.ts +13 -0
  6. package/dist/integrations/feishu/feishu-client.js +111 -6
  7. package/dist/integrations/feishu/feishu-client.js.map +1 -1
  8. package/dist/integrations/feishu/feishu-reference-material-downloader.d.ts +34 -0
  9. package/dist/integrations/feishu/feishu-reference-material-downloader.js +572 -0
  10. package/dist/integrations/feishu/feishu-reference-material-downloader.js.map +1 -0
  11. package/dist/integrations/feishu/feishu-token-store.d.ts +25 -1
  12. package/dist/integrations/feishu/feishu-token-store.js +148 -4
  13. package/dist/integrations/feishu/feishu-token-store.js.map +1 -1
  14. package/dist/integrations/feishu/feishu-user-auth-service.d.ts +39 -0
  15. package/dist/integrations/feishu/feishu-user-auth-service.js +228 -0
  16. package/dist/integrations/feishu/feishu-user-auth-service.js.map +1 -0
  17. package/dist/integrations/jira/jira-cli.js +127 -19
  18. package/dist/integrations/jira/jira-cli.js.map +1 -1
  19. package/dist/task-environment/delivery/commit-message/coder-commit-message-template.d.ts +12 -0
  20. package/dist/task-environment/delivery/commit-message/coder-commit-message-template.js +105 -0
  21. package/dist/task-environment/delivery/commit-message/coder-commit-message-template.js.map +1 -0
  22. package/dist/task-environment/delivery/commit-message/commit-message-builder.js +2 -1
  23. package/dist/task-environment/delivery/commit-message/commit-message-builder.js.map +1 -1
  24. package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +6 -0
  25. package/dist/task-environment/delivery/feishu-analysis-doc-service.js +106 -34
  26. package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -1
  27. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js +16 -1
  28. package/dist/task-environment/delivery/feishu-content/feishu-content-renderer.js.map +1 -1
  29. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.d.ts +6 -0
  30. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js +19 -0
  31. package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js.map +1 -1
  32. package/dist/task-environment/delivery/feishu-notifier.js +8 -8
  33. package/dist/task-environment/delivery/feishu-notifier.js.map +1 -1
  34. package/dist/task-environment/delivery/feishu-templates/coder-message-template.d.ts +6 -0
  35. package/dist/task-environment/delivery/feishu-templates/coder-message-template.js +58 -0
  36. package/dist/task-environment/delivery/feishu-templates/coder-message-template.js.map +1 -0
  37. package/dist/task-environment/delivery/feishu-templates/template-registry.js +2 -0
  38. package/dist/task-environment/delivery/feishu-templates/template-registry.js.map +1 -1
  39. package/dist/task-environment/delivery/task-delivery-dispatcher.js +6 -0
  40. package/dist/task-environment/delivery/task-delivery-dispatcher.js.map +1 -1
  41. package/dist/task-environment/delivery/task-delivery-service.d.ts +1 -0
  42. package/dist/task-environment/delivery/task-delivery-service.js +124 -8
  43. package/dist/task-environment/delivery/task-delivery-service.js.map +1 -1
  44. package/dist/task-environment/delivery/task-publication-service.js +9 -6
  45. package/dist/task-environment/delivery/task-publication-service.js.map +1 -1
  46. package/dist/task-environment/document-input/document-structure.d.ts +13 -0
  47. package/dist/task-environment/document-input/document-structure.js +438 -0
  48. package/dist/task-environment/document-input/document-structure.js.map +1 -0
  49. package/dist/task-environment/intake/manual-problem-intake.js +36 -0
  50. package/dist/task-environment/intake/manual-problem-intake.js.map +1 -1
  51. package/dist/task-environment/observability/logger.d.ts +1 -0
  52. package/dist/task-environment/observability/logger.js +26 -0
  53. package/dist/task-environment/observability/logger.js.map +1 -1
  54. package/dist/task-environment/observability/runtime-panel.js +10 -1
  55. package/dist/task-environment/observability/runtime-panel.js.map +1 -1
  56. package/dist/task-environment/orchestration/reference-material-relocator.d.ts +2 -0
  57. package/dist/task-environment/orchestration/reference-material-relocator.js +69 -0
  58. package/dist/task-environment/orchestration/reference-material-relocator.js.map +1 -0
  59. package/dist/task-environment/orchestration/task-orchestrator.d.ts +3 -0
  60. package/dist/task-environment/orchestration/task-orchestrator.js +182 -8
  61. package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
  62. package/dist/task-environment/orchestration/task-package-inputs.js +7 -1
  63. package/dist/task-environment/orchestration/task-package-inputs.js.map +1 -1
  64. package/dist/task-environment/orchestration/task-runtime-policy.js +11 -0
  65. package/dist/task-environment/orchestration/task-runtime-policy.js.map +1 -1
  66. package/dist/task-environment/orchestration/triage-runner.js +3 -0
  67. package/dist/task-environment/orchestration/triage-runner.js.map +1 -1
  68. package/dist/task-environment/runtime/optimus-runtime.js +3 -0
  69. package/dist/task-environment/runtime/optimus-runtime.js.map +1 -1
  70. package/dist/task-environment/storage/sqlite-task-store.d.ts +4 -0
  71. package/dist/task-environment/storage/sqlite-task-store.js +70 -1
  72. package/dist/task-environment/storage/sqlite-task-store.js.map +1 -1
  73. package/dist/task-environment/task-handler-descriptor.d.ts +5 -0
  74. package/dist/task-environment/task-handler-descriptor.js +15 -0
  75. package/dist/task-environment/task-handler-descriptor.js.map +1 -0
  76. package/dist/types.d.ts +47 -1
  77. package/embedded-skills/shared/feishu-task-inputs/SKILL.md +56 -0
  78. package/embedded-skills/shared/feishu-task-inputs/scripts/fetch-feishu-doc.mjs +756 -0
  79. package/embedded-skills/shared/feishu-task-inputs/skill.json +5 -0
  80. package/package.json +4 -1
  81. package/task-harnesses/coder/ACCEPT.md +73 -0
  82. package/task-harnesses/coder/CONSTRAINTS.md +72 -0
  83. package/task-harnesses/coder/CONTEXT.md +36 -0
  84. package/task-harnesses/coder/EVOLUTION.md +83 -0
  85. package/task-harnesses/coder/ROLE.md +39 -0
  86. package/task-harnesses/coder/STANDARD.md +258 -0
  87. package/task-harnesses/coder/manifest.json +13 -0
  88. package/task-harnesses/pm/ACCEPT.md +7 -0
  89. package/task-harnesses/pm/CONSTRAINTS.md +5 -0
  90. package/task-harnesses/pm/ROLE.md +5 -4
  91. package/task-harnesses/pm/STANDARD.md +31 -1
  92. package/task-harnesses/registry.json +4 -0
@@ -1,11 +1,9 @@
1
1
  # ROLE
2
2
 
3
- Defines PM harness identity, scope, and closure bar.
4
-
5
3
  ## Identity
6
4
  You are a `PM Prototype Builder` for accepted `pm` tasks.
7
5
 
8
- Turn one source requirement document into a reviewable interactive HTML prototype. Preserve requirement meaning before polish.
6
+ Turn one source requirement document into a reviewable interactive HTML product demo. Preserve requirement meaning before polish.
9
7
 
10
8
  ## Core responsibility
11
9
  - read the source directly and keep it as primary truth
@@ -13,11 +11,12 @@ Turn one source requirement document into a reviewable interactive HTML prototyp
13
11
  - separate `confirmed`, `simulated`, `assumption`, and `open_question`
14
12
  - expose implementation-relevant meaning through `result.md`
15
13
  - keep explanatory meta content out of the default product UI
14
+ - keep the default prototype view demo-pure: no reviewer tooling, no source reference wall, no explanation-heavy side panels unless they are part of the product itself
16
15
  - close through reviewer-informed judgment, not builder self-certification
17
16
 
18
17
  ## In scope
19
18
  - requirement document to interactive HTML prototype
20
- - structure, navigation, flow, states, and critical rules
19
+ - structure, navigation, flow, states, critical rules, and product-facing demo presentation
21
20
  - structured handoff for downstream implementation
22
21
 
23
22
  ## Out of scope
@@ -27,12 +26,14 @@ Turn one source requirement document into a reviewable interactive HTML prototyp
27
26
  - visual polish that weakens product meaning
28
27
  - text-only PRD rewriting without interactive output
29
28
  - persistent scope / exclusion / truth-status panels inside the default prototype view
29
+ - reviewer-oriented consoles, debug utilities, citation strips, or requirement explanation blocks inside the default prototype view
30
30
 
31
31
  ## Quality bar
32
32
  - source-faithful
33
33
  - fast to review on the core path
34
34
  - honest about simulation, assumption, and omissions
35
35
  - strong enough to guide downstream implementation without forcing major guesswork
36
+ - visually grounded in source screenshots / embedded UI images when they exist
36
37
 
37
38
  ## Closure intent
38
39
  - `Prototype Complete`: accepted scope, core path, major states, and key rules are reviewable
@@ -13,10 +13,33 @@ Complete work in this order:
13
13
  - read the full source requirement document
14
14
  - extract goals, users, flows, states, constraints, open questions, and explicit source facts
15
15
  - identify review-critical rules such as thresholds, counts, ordering, gating, permissions, formulas, and content-type distinctions
16
+ - if the source requirement depends on another Feishu doc/wiki URL that is not already localized, fetch it before continuing
17
+ - verify the source requirement document contains a usable minimum input contract:
18
+ - goal
19
+ - target user
20
+ - entry and trigger
21
+ - at least one core flow
22
+ - critical rules
23
+ - scope boundary
24
+ - if the minimum input contract is materially incomplete, stop early with a truthful downgrade instead of inventing the missing product basis
25
+
26
+ Use:
27
+
28
+ ```bash
29
+ node .agents/skills/feishu-task-inputs/scripts/fetch-feishu-doc.mjs \
30
+ --url <feishu-doc-or-wiki-url> \
31
+ --output-dir <artifactDir>/feishu-reference
32
+ ```
33
+
34
+ After fetching:
35
+ - read `content.md`, `manifest.json`, and `attachments/` from that output directory
36
+ - treat those local files as the fact source
37
+ - do not keep reasoning directly from an unread remote link
38
+ - if the linked content is required and fetch fails, downgrade truthfully instead of guessing
16
39
 
17
40
  2. `Map`
18
41
  - build a requirement map before designing screens or writing HTML
19
- - include: product goal, target user, bounded scope, entry point, core flow, key states, critical rules, explicit non-goals, open questions
42
+ - include: product goal, target user, bounded scope, entry point, trigger, core flow, key states, critical rules, explicit non-goals, reference materials, open questions
20
43
 
21
44
  3. `Plan Representation`
22
45
  - for each critical rule, choose exactly one:
@@ -34,6 +57,8 @@ Complete work in this order:
34
57
  - produce one reviewable `prototype.html`
35
58
  - make the main path, major states, and key transitions inspectable
36
59
  - 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
60
+ - treat `prototype.html` as a product demo artifact, not a mixed demo-plus-review workspace
61
+ - do not place reviewer consoles, source reference galleries, telemetry panels, sorting/rule explainer tables, or source-gap narration inside the default prototype view
37
62
 
38
63
  6. `Review`
39
64
  - explicitly spawn one reviewer subagent after the first build
@@ -113,7 +138,9 @@ The reviewer must judge in this order:
113
138
 
114
139
  5. `UI fidelity and panel visibility`
115
140
  - use screenshots, diagrams, layout cues, and structural hints from the source as first-priority guidance when present
141
+ - when source screenshots or embedded UI images are present, a `Prototype Complete` judgment requires that the builder actually accessed them as local evidence or another equally direct visual source; alt text alone is not enough for complete-grade fidelity
116
142
  - the prototype should read as product UI, not a delivery brief or review console
143
+ - the prototype should read as a user-facing demo, not as a reviewer cockpit, debug bench, or requirement explainer
117
144
  - every core panel must stay visibly populated and reviewable after each revision
118
145
  - for `Represented Interactively` modules, intended visual carriers must remain materially visible
119
146
  - charts still need visible bars, lines, points, or equivalent graphical carriers
@@ -145,6 +172,7 @@ After each review round, the builder must:
145
172
  - deeper logic chains are demonstrated clearly enough for review
146
173
  - the artifact set can guide downstream AI coding without major rule ambiguity
147
174
  - UI quality is credible for design review and meaningfully uses source visual guidance when present
175
+ - if source screenshots or embedded UI images exist, they were actually consumed as evidence during the build, or an equally direct visual source was available
148
176
  - `Prototype Partial` requires:
149
177
  - a meaningful prototype exists
150
178
  - reviewer found remaining material gaps, but the output is still useful for review
@@ -160,6 +188,7 @@ After each review round, the builder must:
160
188
  ## Prototype standard
161
189
  - `prototype.html` is the main review artifact
162
190
  - `prototype.html` is not the place for delivery portal content or truth-status summaries
191
+ - `prototype.html` is not the place for reviewer tooling, source citation strips, telemetry logs, ranking tables, or "the source did not specify ..." commentary
163
192
  - the prototype must make the main user flow inspectable
164
193
  - prefer depth on the core path over shallow breadth
165
194
  - support meaningful review actions such as navigation, state changes, or key transitions
@@ -219,6 +248,7 @@ Keep `result.md` dense, implementation-oriented, and in Chinese unless the task
219
248
  - rules or branches not fully captured by direct interaction
220
249
  - simulations, merges, or approximations that must not be mistaken as final behavior
221
250
  - open points that materially affect implementation understanding
251
+ - inaccessible or failed-to-download source screenshots / embedded UI images that reduced fidelity confidence
222
252
 
223
253
  3. `闭环判定`
224
254
  - final closure level: `Prototype Complete` / `Prototype Partial` / `Analysis Only`
@@ -4,6 +4,10 @@
4
4
  "taskType": "bugfix",
5
5
  "dir": "bugfix"
6
6
  },
7
+ {
8
+ "taskType": "coder",
9
+ "dir": "coder"
10
+ },
7
11
  {
8
12
  "taskType": "pm",
9
13
  "dir": "pm"