dream

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

dream — Overnight Batch Execution

dream — 夜间批量执行

Runtime syntax: invoke the plugin copy through the active runtime's owner-qualified skill selector; use a bare selector only when intentionally selecting a user-tier copy (a separately installed personal copy; Genie no longer seeds this tier). Cross-skill prose below uses bare names as portable semantic routes; the orchestrator resolves the selector for the active runtime.
Pick SHIP-ready wishes, build a dependency-ordered plan, dispatch one worker subagent per wish, review PRs, merge to dev, run the QA loop, and write a wake-up report. The dream orchestrator dispatches — it never executes wish work directly.
This is a high-impact, explicit-only workflow. The user must approve the selected wishes, the generated plan, PR creation, and merge-to-
dev
authority. Never merge to
main
or
master
, deploy, send external messages, or expand scope without separate authority.
运行时语法: 通过活跃运行时的所有者限定skill选择器调用插件副本;仅当有意选择用户层级副本(单独安装的个人副本;Genie不再默认生成该层级)时,才使用裸选择器。以下跨skill说明使用裸名称作为可移植语义路径;编排器会为活跃运行时解析选择器。
筛选已就绪(SHIP-ready)的wish,构建按依赖排序的计划,为每个wish调度一个工作子Agent(worker subagent),审核PR,合并至dev分支,运行QA循环,并生成一份醒后报告。dream编排器仅负责调度——从不直接执行wish相关工作。
这是一个高影响力、需明确授权的工作流。用户必须批准所选wish、生成的计划、PR创建以及合并至
dev
分支的权限。未经单独授权,绝不能合并至
main
或
master
分支、部署、发送外部消息或扩大范围。

When to Use

适用场景

  • Human wants to queue multiple wishes for autonomous overnight execution
  • Multiple WISH.md files have persisted status
    APPROVED
  • 人类希望将多个wish排入队列,由系统自主在夜间执行
  • 多个WISH.md文件的状态持续为
    APPROVED

Flow

流程

  1. Pick wishes (Picker below); human confirms the selection.
  2. Generate
    .genie/DREAM.md
    — dependency-ordered plan; human may edit before the run.
  3. Phase 1 — Execute: dispatch workers layer by layer, collect outcomes.
  4. Phase 2 — Review + PR: review every PR, fix valid gaps, CI green.
  5. Phase 3 — Merge + QA: merge to dev in order, QA loop until criteria proven.
  6. Phase 4 — Report: write
    .genie/DREAM-REPORT.md
    , the wake-up artifact.
  1. 筛选wish(下方为筛选器逻辑);人工确认所选内容。
  2. 生成
    .genie/DREAM.md
    —— 按依赖排序的计划;执行前人工可编辑。
  3. 阶段1 — 执行: 逐层调度工作Agent,收集执行结果。
  4. 阶段2 — 审核 + PR: 审核每一个PR,修复有效问题,确保CI通过。
  5. 阶段3 — 合并 + QA: 按顺序合并至dev分支,运行QA循环直至满足验证标准。
  6. 阶段4 — 生成报告: 写入
    .genie/DREAM-REPORT.md
    ,作为醒后查看的成果文件。

Picker

筛选器

  1. Read
    .genie/wishes/*/WISH.md
    and select only wishes whose Status field is exactly
    APPROVED
    . The brainstorm jar is historical/discovery context, never readiness authority. A Poured entry without an existing approved WISH.md is skipped and reported as drift. No matches → print
    No APPROVED wishes found under .genie/wishes/
    and stop.
  2. List matches numbered by slug:
    1. <slug> — <one-line description>
    .
  3. Human picks by number (
    1 3 5
    ) or
    all
    .
  1. 读取
    .genie/wishes/*/WISH.md
    ,仅选择Status字段恰好为
    APPROVED
    的wish。头脑风暴记录仅作为历史/探索上下文,不能作为就绪依据。若存在已记录但未生成已批准WISH.md的条目,将跳过并报告为偏差。若无匹配项 → 输出
    No APPROVED wishes found under .genie/wishes/
    并终止流程。
  2. 按slug编号列出匹配项:
    1. <slug> — <单行描述>
    。
  3. 人工通过编号(
    1 3 5
    )或
    all
    选择wish。

DREAM.md

DREAM.md

  1. Read the wish-level
    **depends-on:**
    value from each selected WISH.md's
    ## Dependencies
    section (
    none
    means no edge).
  2. Topologically sort into
    merge_order
    layers
    1..N
    — layer 1 has no selected dependencies; same-layer wishes are parallel.
  3. Per-wish entry:
    slug
    ,
    branch: feat/<slug>
    ,
    wish-path: .genie/wishes/<slug>/WISH.md
    ,
    depends-on
    ,
    merge-order
    . Keep the canonical hyphenated keys so the plan can be checked directly against each wish.
  4. Write
    .genie/DREAM.md
    in the shared worktree; present for human confirmation before executing.
  1. 从每个选中的WISH.md的
    ## Dependencies
    部分读取wish级别的
    **depends-on:**
    值(
    none
    表示无依赖)。
  2. 进行拓扑排序,生成
    merge_order
    层级
    1..N
    —— 层级1的wish无选中的依赖项;同层级wish可并行执行。
  3. 每个wish的条目包含:
    slug
    、
    branch: feat/<slug>
    、
    wish-path: .genie/wishes/<slug>/WISH.md
    、
    depends-on
    、
    merge-order
    。保留标准连字符键,以便直接对照每个wish验证计划。
  4. 在共享工作区写入
    .genie/DREAM.md
    ;执行前需提交人工确认。

Phase 1: Execute

阶段1:执行

For each
merge_order
layer, in order:
  • Spawn one worker subagent per wish via the native delegation surface — all of the layer's spawns in ONE message so they run in parallel (background; each notifies you with its final message).
  • Every brief carries the Worker Contract below plus curated wish context (goal, groups, acceptance criteria, validation commands — see
    work
    § Context Curation).
  • Follow-ups to a running worker go through native follow-up messaging; completion is push (the final-message notification), never a sleep-poll.
  • Inspect state on demand:
    genie board --wish <slug>
    /
    genie task list --wish <slug>
    . If a wish has no task rows, drive it off WISH.md directly — task tracking is an enhancement, never a blocker.
  • The layer is done when every worker has reported; then dispatch the next layer.
按
merge_order
层级依次处理:
  • 通过原生委托接口为每个wish生成一个工作子Agent —— 同一层级的所有Agent通过一条消息生成,以实现并行运行(后台执行;每个Agent完成后会发送最终消息通知)。
  • 每个任务包含下方的工作Agent协议以及整理后的wish上下文(目标、分组、验收标准、验证命令 —— 详见
    work
    § Context Curation)。
  • 对运行中Agent的跟进需通过原生跟进消息机制;完成状态通过推送(最终消息通知)确认,绝不采用睡眠轮询方式。
  • 按需检查状态:
    genie board --wish <slug>
    /
    genie task list --wish <slug>
    。若某个wish无任务记录,则直接依据WISH.md推进 —— 任务追踪是增强功能,绝不能成为阻塞点。
  • 当该层级所有Agent均已报告完成后,调度下一层级。

Worker Contract

工作Agent协议

Each worker, independently:
  1. Work in a dedicated branch and worktree for
    feat/<slug>
    , using runtime-managed or ordinary Git worktrees according to the active environment. The contract governing parallel writers and repo-level git state is stated once in AGENTS.md and the
    work
    skill's Dispatch section — follow it there.
  2. Execute the wish per
    work
    (its dispatch, review-gate, and task-state rules govern): dispatched engineers claim via
    genie task checkout
    ; the worker leaves task state
    in_progress
    and reports evidence. Only the dream PM/orchestrator runs
    genie task done
    after clean review and passing validation.
  3. Run
    review
    per group against acceptance criteria.
  4. Run CI; on failure fix and retry (max 3 attempts; poll CI status, never sleep-loop). After 3 failures → blocked.
  5. Only after CI green and authorized PR creation: create a PR targeting
    dev
    , preferring the GitHub connector.
  6. Final message is the completion signal, every claim audited against tool output:
    • done — PR <url>, CI green, groups N/N
    • blocked — <reason>, groups N/N
每个工作Agent独立执行以下操作:
  1. 在专用分支和工作区
    feat/<slug>
    中工作,根据活跃环境使用运行时管理或普通Git工作区。并行写入和仓库级Git状态的管理协议已在AGENTS.md和
    work
    skill的Dispatch部分统一说明 —— 需遵循该协议。
  2. 按照
    work
    的规则执行wish(其调度、审核门限和任务状态规则适用):被指派的工程师通过
    genie task checkout
    认领任务;工作Agent将任务状态标记为
    in_progress
    并提交执行证据。只有dream PM/编排器在完成审核且验证通过后,才能执行
    genie task done
    。
  3. 按分组对照验收标准运行
    review
    。
  4. 运行CI;若失败则修复并重试(最多3次尝试;轮询CI状态,绝不采用睡眠循环)。3次失败后 → 标记为阻塞。
  5. 仅在CI通过且获得PR创建授权后:创建目标为
    dev
    分支的PR,优先使用GitHub连接器。
  6. 最终消息为完成信号,所有声明均需对照工具输出审核:
    • done — PR <url>, CI green, groups N/N
    • blocked — <reason>, groups N/N

Phase 2: Review + PR

阶段2:审核 + PR

Trigger: all workers in the layer reported done or blocked.
  1. Dispatch one reviewer subagent per PR via the native delegation surface (reviewer ≠ worker) to run
    review
    against the wish's acceptance criteria.
  2. Read bot comments critically — never blindly accept automated findings.
  3. On FIX-FIRST: diagnose first; return an overdesigned plan to wish/design review, otherwise dispatch
    fix
    for valid gaps (max 2 loops per PR). On another architectural issue: escalate in the report, no fix attempt.
  4. CI must be green before proceeding — poll status, do not sleep.
  5. On SHIP: mark the PR review-complete.
触发条件: 该层级所有工作Agent均已报告完成或阻塞。
  1. 通过原生委托接口为每个PR调度一个审核子Agent(审核Agent ≠ 工作Agent),对照wish的验收标准运行
    review
    。
  2. 审慎读取机器人评论 —— 绝不盲目接受自动化结果。
  3. 若需优先修复:先诊断问题;若涉及架构问题,将完善后的计划提交至wish/设计审核,否则针对有效问题调度
    fix
    (每个PR最多循环2次)。若存在其他架构问题:在报告中升级处理,不尝试修复。
  4. 继续推进前必须确保CI通过 —— 轮询状态,不采用睡眠等待。
  5. 若符合SHIP标准:标记该PR审核完成。

Phase 3: Merge + QA

阶段3:合并 + QA

Trigger: all PRs marked SHIP.
  1. After explicit merge authorization, merge PRs to
    dev
    in
    merge_order
    ; never merge to
    main
    or
    master
    .
  2. Dispatch a qa subagent on dev to test against each wish's QA criteria.
  3. Each failure:
    report
    →
    trace
    →
    fix
    → retest. Every fix is a new PR through review and merge.
  4. Continue until all criteria are proven or blocked.
触发条件: 所有PR均标记为SHIP。
  1. 获得明确的合并授权后,按
    merge_order
    顺序将PR合并至
    dev
    分支;绝不能合并至
    main
    或
    master
    分支。
  2. 在dev分支调度一个QA子Agent,对照每个wish的QA标准进行测试。
  3. 每出现一次失败:
    report
    →
    trace
    →
    fix
    → 重新测试。每一次修复都需创建新PR,经过审核和合并流程。
  4. 持续执行直至所有标准均通过验证或任务被阻塞。

Phase 4: Report

阶段4:生成报告

Write
.genie/DREAM-REPORT.md
— always, even if every wish blocked:
markdown
undefined
写入
.genie/DREAM-REPORT.md
—— 无论所有wish是否被阻塞,均需生成:
markdown
undefined

Dream Report — <date>

Dream Report — <date>

Per-Wish Status

各Wish状态

merge_orderslugPRCIReviewMergedQA
merge_orderslugPRCIReviewMergedQA

Blocked Wishes

阻塞的Wish

  • <slug>
    : <blocking reason>
  • <slug>
    : <阻塞原因>

QA Findings

QA发现

  • <slug>
    : <criterion failed — root cause, fix PR>
  • <slug>
    : <未通过的标准 — 根本原因,修复PR>

Follow-ups

后续事项

  • <items requiring human intervention>
undefined
  • <需人工干预的事项>
undefined

Grounded Progress

可追溯进度

The report is an audit, not a recollection. Every cell traces to tool output from the run: PR URLs, CI results, review verdicts,
genie task list --wish <slug>
state, worker final messages. State per wish exactly what is verified, what failed, and what was skipped. Never report a wish shipped until its merge and QA evidence is in hand — dispatched is not done.
报告是一份审计记录,而非回忆总结。每个单元格均需追溯至本次运行的工具输出:PR链接、CI结果、审核结论、
genie task list --wish <slug>
状态、工作Agent最终消息。每个wish的状态需准确记录已验证内容、失败内容和跳过内容。在拿到合并和QA证据前,绝不能报告wish已完成 —— 调度完成不等于执行完成。

Rules

规则

  • Never early-stop: a blocked wish is recorded and the remaining wishes continue.
  • Never skip Phase 2 or Phase 3 — every PR is reviewed, every merge is QA-tested against wish criteria.
  • The orchestrator never executes wish work — always dispatch worker subagents.
  • No scope beyond what each WISH.md defines.
  • Poll CI status — never
    sleep
    in retry loops.
  • 绝不提前终止:若某个wish被阻塞,需记录该状态并继续执行剩余wish。
  • 绝不跳过阶段2或阶段3 —— 每个PR都需审核,每次合并都需对照wish标准进行QA测试。
  • 编排器绝不直接执行wish工作 —— 始终调度工作子Agent。
  • 范围不得超出每个WISH.md的定义。
  • 轮询CI状态 —— 重试循环中绝不使用
    sleep
    。