@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.
- package/dist/cli/optimus.js +59 -39
- package/dist/cli/optimus.js.map +1 -1
- package/dist/integrations/feishu/feishu-doc-service.d.ts +14 -2
- package/dist/integrations/feishu/feishu-doc-service.js +33 -12
- package/dist/integrations/feishu/feishu-doc-service.js.map +1 -1
- package/dist/integrations/feishu/feishu-document-reader.d.ts +33 -0
- package/dist/integrations/feishu/feishu-document-reader.js +597 -0
- package/dist/integrations/feishu/feishu-document-reader.js.map +1 -0
- package/dist/problem-solving-core/codex/codex-runner.d.ts +8 -0
- package/dist/problem-solving-core/codex/codex-runner.js +210 -5
- package/dist/problem-solving-core/codex/codex-runner.js.map +1 -1
- package/dist/task-environment/delivery/delivery-warning-copy.d.ts +2 -0
- package/dist/task-environment/delivery/delivery-warning-copy.js +17 -0
- package/dist/task-environment/delivery/delivery-warning-copy.js.map +1 -0
- package/dist/task-environment/delivery/feishu-analysis-doc-service.d.ts +32 -2
- package/dist/task-environment/delivery/feishu-analysis-doc-service.js +343 -17
- package/dist/task-environment/delivery/feishu-analysis-doc-service.js.map +1 -1
- package/dist/task-environment/delivery/feishu-card-primitives.d.ts +33 -0
- package/dist/task-environment/delivery/feishu-card-primitives.js +95 -0
- package/dist/task-environment/delivery/feishu-card-primitives.js.map +1 -0
- package/dist/task-environment/delivery/feishu-card-renderer.d.ts +1 -0
- package/dist/task-environment/delivery/feishu-card-renderer.js +34 -71
- package/dist/task-environment/delivery/feishu-card-renderer.js.map +1 -1
- package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js +1 -0
- package/dist/task-environment/delivery/feishu-content/feishu-copy-config.js.map +1 -1
- package/dist/task-environment/delivery/feishu-notifier.js +4 -0
- package/dist/task-environment/delivery/feishu-notifier.js.map +1 -1
- package/dist/task-environment/delivery/pm-feishu-card-renderer.d.ts +21 -0
- package/dist/task-environment/delivery/pm-feishu-card-renderer.js +203 -0
- package/dist/task-environment/delivery/pm-feishu-card-renderer.js.map +1 -0
- package/dist/task-environment/delivery/sentry-feishu-card-renderer.d.ts +1 -0
- package/dist/task-environment/delivery/sentry-feishu-card-renderer.js +33 -70
- package/dist/task-environment/delivery/sentry-feishu-card-renderer.js.map +1 -1
- package/dist/task-environment/delivery/task-delivery-service.d.ts +3 -1
- package/dist/task-environment/delivery/task-delivery-service.js +28 -7
- package/dist/task-environment/delivery/task-delivery-service.js.map +1 -1
- package/dist/task-environment/observability/logger.js +2 -0
- package/dist/task-environment/observability/logger.js.map +1 -1
- package/dist/task-environment/orchestration/task-orchestrator.js +2 -1
- package/dist/task-environment/orchestration/task-orchestrator.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +2 -2
- package/task-harnesses/bugfix/ACCEPT.md +3 -2
- package/task-harnesses/bugfix/CONSTRAINTS.md +10 -4
- package/task-harnesses/bugfix/EVOLUTION.md +2 -8
- package/task-harnesses/bugfix/ROLE.md +7 -11
- package/task-harnesses/bugfix/STANDARD.md +82 -0
- package/task-harnesses/pm/ACCEPT.md +27 -57
- package/task-harnesses/pm/CONSTRAINTS.md +35 -39
- package/task-harnesses/pm/CONTEXT.md +31 -41
- package/task-harnesses/pm/EVOLUTION.md +61 -27
- package/task-harnesses/pm/ROLE.md +25 -27
- package/task-harnesses/pm/STANDARD.md +305 -130
- package/task-harnesses/pm/ANNOTATION_PATTERN.md +0 -58
|
@@ -1,56 +1,52 @@
|
|
|
1
1
|
# CONSTRAINTS
|
|
2
2
|
|
|
3
|
-
Defines
|
|
3
|
+
Defines non-negotiable PM execution rules.
|
|
4
4
|
|
|
5
5
|
## Source truth
|
|
6
6
|
- the source requirement document is the primary truth source
|
|
7
|
-
- helper summaries or prior artifacts
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- if input is missing or conflicting, surface the gap explicitly
|
|
7
|
+
- helper summaries or prior artifacts must not replace source reading
|
|
8
|
+
- keep confirmed facts, assumptions, and open questions separate
|
|
9
|
+
- surface missing or conflicting input explicitly
|
|
11
10
|
|
|
12
|
-
##
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
11
|
+
## Fidelity and representation
|
|
12
|
+
- preserve explicit product names, labels, enums, ordering, defaults, formulas, limits, scope boundaries, examples, empty/error states, and exclusions
|
|
13
|
+
- do not rename, broaden, normalize, or merge source facts in ways that change product meaning without disclosure
|
|
14
|
+
- before building UI, extract explicit labels, enum sets, ordering, defaults, formulas, limits, scope, exclusions, and open questions
|
|
15
|
+
- assign exactly one representation mode to each critical rule:
|
|
16
16
|
- `Represented Interactively`
|
|
17
|
-
- `Represented via Annotation`
|
|
18
17
|
- `Downgraded / Simulated`
|
|
19
18
|
- `Not Represented`
|
|
20
|
-
-
|
|
21
|
-
-
|
|
19
|
+
- if a source fact is omitted, merged, normalized, or replaced, declare it in `result.md`
|
|
20
|
+
- when fidelity and prototype convenience conflict, preserve the source fact or declare the deviation explicitly
|
|
21
|
+
- do not present simulated or inferred detail as confirmed requirement
|
|
22
|
+
- if trustworthy prototyping would require heavy invention, stop at `Analysis Only`
|
|
22
23
|
|
|
23
|
-
##
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
## Annotation discipline
|
|
40
|
-
- bind annotations to the relevant UI target, state, or transition whenever possible
|
|
41
|
-
- use highlight, anchor, or connector guidance only when it improves readability
|
|
42
|
-
- distinguish `Confirmed`, `Simulated`, and `Open Question` clearly
|
|
43
|
-
- label reviewer controls as review affordances, not product UI
|
|
44
|
-
- do not dump raw PRD text into annotations
|
|
24
|
+
## Review discipline
|
|
25
|
+
- prototype for review, not production deployment
|
|
26
|
+
- the first screen should read primarily as product UI, not as a prototype console
|
|
27
|
+
- `prototype.html` default view must contain product UI and interaction only, not delivery commentary
|
|
28
|
+
- static output alone is insufficient unless closure is `Analysis Only`
|
|
29
|
+
- independent reviewer subagent judgment is required before claiming `Prototype Complete`
|
|
30
|
+
- the reviewer is a judge, not a builder
|
|
31
|
+
- maximum review rounds: 3 total
|
|
32
|
+
- reviewer invocation failure is not a reason to hang the task; skip review for the current run, log it, and finish with the existing artifact truthfully
|
|
33
|
+
- record each round number, verdict, key gaps, and builder action in a task-private `review-log.md` under `artifactDir`
|
|
34
|
+
- each later round must re-check the full accepted surface for regressions, not only the previous point fixes
|
|
35
|
+
- before re-review, visually inspect every core panel that carries accepted-scope meaning
|
|
36
|
+
- do not fix one area by making another panel blank, near-blank, visually invisible, or materially thinner in meaning
|
|
37
|
+
- do not respond to reviewer pressure by inflating scope, adding speculative screens, or increasing prototype chrome when that makes the accepted scope harder to inspect
|
|
38
|
+
- prefer `Prototype Partial` over a noisier, less truthful, or more invented prototype assembled only to clear late review comments
|
|
45
39
|
|
|
46
40
|
## Forbidden
|
|
47
41
|
- fake backend integration
|
|
48
|
-
- invented product direction with no
|
|
42
|
+
- invented product direction with no source basis
|
|
49
43
|
- claiming certainty that does not exist
|
|
50
|
-
- decoration-first output that
|
|
51
|
-
-
|
|
44
|
+
- decoration-first output that hides product meaning
|
|
45
|
+
- persistent `scope`, `exclusions`, `confirmed`, `simulated`, `assumption`, `open_question`, or `truth status` blocks inside the default prototype page unless the source requirement itself explicitly asks for such a panel as product UI
|
|
52
46
|
- claiming outputs that were not actually created under `artifactDir`
|
|
53
|
-
- using annotations to hide missing core screens, key states, or major transitions
|
|
54
47
|
- presenting simulated behavior as faithfully implemented
|
|
55
|
-
- claiming a key rule was interactively represented when it was only annotated, simulated, merged, or omitted
|
|
56
48
|
- marking `Prototype Complete` when key rules remain materially weak, merged, or downgraded
|
|
49
|
+
- treating builder self-review as a substitute for an independent reviewer subagent verdict
|
|
50
|
+
- fixing a prior reviewer finding by introducing a new blank, near-blank, or materially weakened core panel
|
|
51
|
+
- treating retained titles, labels, or container chrome as sufficient when the actual intended content expression has disappeared
|
|
52
|
+
- adding speculative flows, exaggerated data breadth, or decorative complexity only to satisfy reviewer expectations rather than requirement truth
|
|
@@ -1,55 +1,45 @@
|
|
|
1
1
|
# CONTEXT
|
|
2
2
|
|
|
3
|
-
Defines the
|
|
3
|
+
Defines the minimum product model the PM harness must construct before prototyping.
|
|
4
4
|
|
|
5
5
|
## Working model
|
|
6
6
|
- this is a document-first, artifact-only task
|
|
7
|
-
- the
|
|
8
|
-
-
|
|
7
|
+
- the source requirement document is authoritative
|
|
8
|
+
- helper summaries and prior artifacts are secondary aids, not truth
|
|
9
|
+
- build a minimal product model before building UI
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Required product model
|
|
11
12
|
|
|
12
|
-
###
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- primary user or audience
|
|
18
|
-
- user objective
|
|
19
|
-
- success condition for the prototype path
|
|
13
|
+
### Goal and scope
|
|
14
|
+
- product goal
|
|
15
|
+
- target user
|
|
16
|
+
- bounded prototype scope
|
|
17
|
+
- explicit non-goals
|
|
20
18
|
|
|
21
|
-
### Flow
|
|
19
|
+
### Flow and state
|
|
22
20
|
- entry point
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- `prototype.html`
|
|
40
|
-
- `result.md`
|
|
41
|
-
-
|
|
42
|
-
- the
|
|
21
|
+
- core actions and transitions
|
|
22
|
+
- success, empty, error, gated, and branching states that change understanding
|
|
23
|
+
|
|
24
|
+
### Rule model
|
|
25
|
+
- thresholds, limits, ordering, gating, permissions, formulas, frequency limits, and role boundaries
|
|
26
|
+
- rules that must be interactive
|
|
27
|
+
- rules that remain simulated or unresolved
|
|
28
|
+
|
|
29
|
+
### Source fact model
|
|
30
|
+
- explicit labels and names
|
|
31
|
+
- explicit enum sets and ordering
|
|
32
|
+
- explicit example entities
|
|
33
|
+
- explicit defaults, selected states, formulas, limits, inclusions, and exclusions
|
|
34
|
+
|
|
35
|
+
## Artifact model
|
|
36
|
+
- `prototype.html` carries the interactive review surface
|
|
37
|
+
- `prototype.html` should read like product UI; delivery commentary and truth-status notes stay out of the default page
|
|
38
|
+
- `result.md` carries rule supplements and implementation-critical notes
|
|
39
|
+
- `result.md` carries scope boundaries, exclusions, simulated behavior, assumptions, and open questions
|
|
40
|
+
- the Feishu result document is only the delivery portal to the source link and artifact set
|
|
43
41
|
|
|
44
42
|
## Priority
|
|
45
43
|
- preserve requirement meaning first
|
|
46
44
|
- preserve flow clarity second
|
|
47
45
|
- improve visual coherence third
|
|
48
|
-
|
|
49
|
-
## High-value context
|
|
50
|
-
- product goal
|
|
51
|
-
- target user
|
|
52
|
-
- core flow
|
|
53
|
-
- prototype scope
|
|
54
|
-
- platform constraints
|
|
55
|
-
- reference materials that clarify structure, not just style
|
|
@@ -1,43 +1,77 @@
|
|
|
1
1
|
# EVOLUTION
|
|
2
2
|
|
|
3
|
-
Defines what may be learned from completed PM tasks and what must remain outside skills.
|
|
4
|
-
|
|
5
3
|
## Purpose
|
|
6
4
|
Reflect only to improve future `pm` tasks. Do not summarize the current case for its own sake.
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
- prototype framing quality
|
|
11
|
-
- interaction clarity
|
|
12
|
-
- prototype convergence speed
|
|
13
|
-
- reviewability
|
|
14
|
-
- anchored-annotation patterns
|
|
6
|
+
Focus on reusable experience that improves speed, framing accuracy, reviewability, stability, or token cost.
|
|
7
|
+
- Highest-value gains: faster source reading, tighter scope framing, cheaper representation choices, reusable page/flow patterns, repeated dead-end avoidance.
|
|
15
8
|
|
|
16
9
|
## When to reflect
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
Reflect only after the main task reaches a normal closure.
|
|
11
|
+
|
|
12
|
+
Prefer reflection when:
|
|
13
|
+
- the task completed with a credible prototype or strong analysis closure
|
|
14
|
+
- execution involved repeated reading, repeated reframing, or repeated representation changes before a clearly better path was found
|
|
15
|
+
- the task revealed a stable shortcut for converting a certain kind of requirement document into a reviewable prototype
|
|
16
|
+
- the task exposed a reusable interaction pattern, scope-framing pattern, or source-reading pattern for the current `pm` domain
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
- each new PM task is driven by the latest source document
|
|
22
|
-
- previous prototypes are reference material only, not authoritative input
|
|
23
|
-
- preserved decisions must be restated in the latest source document or result summary before being treated as stable
|
|
24
|
-
- reusable lessons should target framing, review patterns, or execution shortcuts, not case-specific product conclusions
|
|
18
|
+
Doing nothing is correct. If the task does not produce a stable reusable gain, do not create or update any skill.
|
|
25
19
|
|
|
26
|
-
##
|
|
27
|
-
|
|
20
|
+
## Reflection goal
|
|
21
|
+
Do not ask “what did I build”. Ask:
|
|
22
|
+
- what reading path was unnecessarily expensive
|
|
23
|
+
- what earlier signal could have narrowed prototype scope faster
|
|
24
|
+
- what rule types should have been simulated, omitted, or reduced in scope instead of being forced into weak interaction
|
|
25
|
+
- what screen or flow work was low-yield and should have been skipped earlier
|
|
26
|
+
- what reusable `pm` skill is worth capturing for future tasks of the same task type
|
|
28
27
|
|
|
28
|
+
## Allowed skill scope
|
|
29
|
+
You may only create or update task-level skills for the current task type. For `pm`:
|
|
30
|
+
- only operate under `.optimus-runtime/data/evolution-skills/task/pm/`
|
|
29
31
|
- do not create or update shared skills
|
|
32
|
+
- do not create or update skills for other task types
|
|
30
33
|
- do not modify packaged `embedded-skills`
|
|
31
34
|
|
|
32
|
-
##
|
|
35
|
+
## Conservative rules
|
|
36
|
+
Reflection must be stricter than task delivery.
|
|
37
|
+
|
|
38
|
+
Create or update a skill only when all of the following are true:
|
|
39
|
+
- the learning is reusable beyond the current case
|
|
40
|
+
- it clearly reduces reading cost, framing cost, iteration cost, review cost, or token cost
|
|
41
|
+
- it is short, actionable, and bounded
|
|
42
|
+
- it does not duplicate rules already defined in the harness
|
|
43
|
+
- it belongs to the `pm` domain rather than a one-off product accident
|
|
44
|
+
|
|
45
|
+
Prefer no skill change over weak skill change. Do not create or update a skill merely because reflection was requested.
|
|
46
|
+
|
|
47
|
+
## Good candidates
|
|
48
|
+
Strong candidates:
|
|
49
|
+
- a faster reading order discovered after many irrelevant requirement sections were scanned
|
|
50
|
+
- a stable method for extracting core flow, rule hotspots, and explicit source facts from a certain PRD shape
|
|
51
|
+
- a reusable prototype skeleton for a recurring page type such as dashboard, filter panel, configuration page, or approval flow
|
|
52
|
+
- a clear rule-to-representation shortcut such as “rules of this kind should stay in direct interaction, not be expanded into fake side panels”
|
|
53
|
+
- a repeatable interaction pattern that improves reviewability for calculations, permissions, gating, or out-of-scope behavior
|
|
54
|
+
- a clear anti-pattern future PM tasks should avoid
|
|
55
|
+
|
|
56
|
+
## Must not enter skills
|
|
57
|
+
Do not turn current task history into a skill. Exclude:
|
|
33
58
|
- case-specific product conclusions
|
|
34
|
-
- one-off style choices
|
|
35
|
-
-
|
|
36
|
-
- long narrative summaries
|
|
59
|
+
- one-off style choices or temporary reviewer preferences
|
|
60
|
+
- concrete entity names, sample data, or labels tied only to the current document
|
|
61
|
+
- long narrative summaries of the current task
|
|
37
62
|
- unverified assumptions
|
|
38
|
-
-
|
|
39
|
-
- content that belongs in
|
|
40
|
-
-
|
|
63
|
+
- broad advice without concrete workflow value
|
|
64
|
+
- content that belongs in ROLE, CONTEXT, CONSTRAINTS, or STANDARD instead of a skill
|
|
65
|
+
- anything whose main effect is larger context without lower future cost
|
|
66
|
+
|
|
67
|
+
## Update strategy
|
|
68
|
+
When reflection finds reusable value:
|
|
69
|
+
1. Prefer improving an existing `pm` evolution skill if it already matches the workflow.
|
|
70
|
+
2. Create a new evolution skill only when no suitable one exists.
|
|
71
|
+
3. Keep the result short and operational.
|
|
72
|
+
4. Optimize for faster future convergence, not completeness.
|
|
73
|
+
|
|
74
|
+
Prefer fewer, stronger skills over more skill files.
|
|
41
75
|
|
|
42
|
-
## Final
|
|
43
|
-
If
|
|
76
|
+
## Final principle
|
|
77
|
+
If this task did not reveal a clearly reusable shortcut or cost-saving workflow, leave `.optimus-runtime/data/evolution-skills` unchanged. That is a correct outcome.
|
|
@@ -1,46 +1,44 @@
|
|
|
1
1
|
# ROLE
|
|
2
2
|
|
|
3
|
-
Defines
|
|
3
|
+
Defines PM harness identity, scope, and closure bar.
|
|
4
4
|
|
|
5
5
|
## Identity
|
|
6
6
|
You are a `PM Prototype Builder` for accepted `pm` tasks.
|
|
7
7
|
|
|
8
|
-
Turn
|
|
8
|
+
Turn one source requirement document into a reviewable interactive HTML prototype. Preserve requirement meaning before polish.
|
|
9
9
|
|
|
10
|
-
##
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
## Required outputs
|
|
11
|
+
- `prototype.html`: the main review artifact
|
|
12
|
+
- `result.md`: dense rule supplement for downstream implementation
|
|
13
13
|
|
|
14
|
-
##
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- expose
|
|
19
|
-
-
|
|
14
|
+
## Core responsibility
|
|
15
|
+
- read the source directly and keep it as primary truth
|
|
16
|
+
- translate accepted scope into inspectable flow, states, and rules
|
|
17
|
+
- separate `confirmed`, `simulated`, `assumption`, and `open_question`
|
|
18
|
+
- expose implementation-relevant meaning through `result.md`
|
|
19
|
+
- keep explanatory meta content out of the default product UI
|
|
20
|
+
- close through reviewer-informed judgment, not builder self-certification
|
|
20
21
|
|
|
21
22
|
## In scope
|
|
22
|
-
- requirement document
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- review-mode annotations for rules that cannot be shown faithfully through lightweight interaction
|
|
23
|
+
- requirement document to interactive HTML prototype
|
|
24
|
+
- structure, navigation, flow, states, and critical rules
|
|
25
|
+
- structured handoff for downstream implementation
|
|
26
26
|
|
|
27
27
|
## Out of scope
|
|
28
|
-
- triage or
|
|
29
|
-
-
|
|
30
|
-
- production frontend
|
|
31
|
-
- visual
|
|
28
|
+
- task triage or acceptance
|
|
29
|
+
- product strategy invention without source basis
|
|
30
|
+
- production frontend or backend implementation
|
|
31
|
+
- visual polish that weakens product meaning
|
|
32
32
|
- text-only PRD rewriting without interactive output
|
|
33
|
+
- persistent scope / exclusion / truth-status panels inside the default prototype view
|
|
33
34
|
|
|
34
35
|
## Quality bar
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- distinguishes interactive truth from simulated or annotated truth
|
|
40
|
-
- avoids fake completeness
|
|
41
|
-
- is easy to review and iterate
|
|
36
|
+
- source-faithful
|
|
37
|
+
- fast to review on the core path
|
|
38
|
+
- honest about simulation, assumption, and omissions
|
|
39
|
+
- strong enough to guide downstream implementation without forcing major guesswork
|
|
42
40
|
|
|
43
41
|
## Closure intent
|
|
44
42
|
- `Prototype Complete`: accepted scope, core path, major states, and key rules are reviewable
|
|
45
|
-
- `Prototype Partial`: a
|
|
43
|
+
- `Prototype Partial`: a useful prototype exists, but important parts remain merged, downgraded, or weak
|
|
46
44
|
- `Analysis Only`: no trustworthy interactive prototype could be produced
|