schedule

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Schedule

调度

Read
.noodle/mise.json
, write
.noodle/orders-next.json
. The loop atomically promotes
orders-next.json
into
orders.json
— never write
orders.json
directly. Use
noodle schema mise
and
noodle schema orders
as the schema source of truth.
Operate fully autonomously. Never ask the user to choose or pause for confirmation.
读取
.noodle/mise.json
,写入
.noodle/orders-next.json
。 系统循环会自动将
orders-next.json
原子性地升级为
orders.json
——永远不要直接写入
orders.json
。 请使用
noodle schema mise
noodle schema orders
作为标准schema来源。
完全自主运行,永远不要要求用户选择或者暂停等待确认。

One Plan at a Time

一次执行一个计划

This is the cardinal scheduling rule. Pick the highest-priority plan with remaining phases and schedule all of them. Do not spread work across multiple plans — finishing one plan end-to-end produces shippable results; advancing many plans one phase each produces nothing usable. If the current plan is blocked, idle (empty orders) rather than context-switching to a different plan. Exception: shared infra orders can run alongside a plan's phases.
这是核心调度规则。选择优先级最高且仍有未完成阶段的计划,调度其所有阶段。不要把工作分散到多个计划中——端到端完成一个计划才能产出可交付的成果,同时推进多个计划各一个阶段不会产出任何可用成果。如果当前计划被阻塞,宁可空闲(工单为空)也不要切换上下文到其他计划。例外情况:共享基础设施工单可以和某个计划的阶段并行运行。

Orders Model

工单模型

Output is
{orders: [...]}
where each order is a pipeline of stages executed sequentially. Group related work into stages within one order rather than separate orders.
输出格式为
{orders: [...]}
,其中每个工单是按顺序执行的阶段流水线。请将相关工作分组到同一个工单的不同阶段中,而不是拆分为多个独立工单。

Stages

阶段

Each stage has a
do
field (task key, must match a registered task type) and runs one at a time within the order. The loop advances to the next stage when the current one completes.
A typical order pipeline: execute, then quality, then reflect — all as stages of one order.
每个阶段都有一个
do
字段(任务键,必须匹配已注册的任务类型),同一工单内一次仅运行一个阶段。当前阶段完成后,系统循环会推进到下一个阶段。
典型的工单流水线:执行 → 质量检查 → 复盘——所有步骤都作为同一个工单的阶段。

Task Types

任务类型

Read
task_types
from mise to discover every schedulable task type and its
schedule
hint. Any registered task type can be a stage within an order. Use
do
on each stage to bind it to a task type.
从mise中读取
task_types
来获取所有可调度的任务类型及其
schedule
提示。任何已注册的任务类型都可以作为工单内的一个阶段。使用每个阶段的
do
字段将其绑定到对应的任务类型。

Execute Tasks

执行任务

Schedule execute tasks from the
backlog
array in mise. Use the backlog item ID (as a string) as the order
id
.
Backlog items always have
id
and
title
. Other fields are adapter-defined and may vary. The default adapter (todos.md) provides:
status
,
section
,
tags
,
estimate
, and
plan
. Custom adapters may include any fields — treat unknown fields as useful context.
Shared infrastructure: When multiple plans depend on common infrastructure (shared types, utilities, base packages), propose a standalone infra order before the plan's phases. Use a descriptive slug ID (e.g.,
"infra-shared-types"
). If the infra work is substantial, create a backlog item via the adapter (
noodle adapter run backlog add
), then use that item's ID as the order ID.
Items with plans: When a backlog item has a
plan
field (a relative path like
brain/plans/29-foo/overview.md
), read the plan overview and phase files to understand the work. Schedule one order with a stage per remaining unfinished phase (each unchecked
- [ ]
item). Populate
order.plan
with the plan path(s). Use
extra_prompt
on each stage to inject plan context: the phase brief and any cross-phase dependencies.
Parallelizing phases: Read the plan to identify dependencies between phases. Phases that depend on earlier phases' output (shared types, APIs, schemas) must be sequential stages. Phases that touch independent areas of the codebase (separate packages, unrelated features, docs vs code) can be parallel stages within the same order. When in doubt, sequential is safer — but don't serialize work that has no real dependency.
Items without plans: Assess complexity before scheduling. If the item is straightforward (single concern, clear scope, small change), schedule as a simple execute task using the backlog item's title and description as the prompt. If the item is complex (multi-file, cross-cutting, ambiguous scope, or you'd want to see an architecture sketch before coding), schedule a plan-first order: a
prompt
-only stage (no
do
) that invokes
/plan
, followed by an
adversarial-review
stage to challenge the plan. No quality or reflect stages — planning output is a design document, not code. Do NOT use
"do": "execute"
for plan-first stages
— the execute skill tells the agent to implement, which conflicts with the plan skill's "stop after planning" instruction. The plan skill will write phased plans to
brain/plans/
; on the next scheduling cycle, the item will have a
plan
field and can be scheduled normally with the standard execute → quality → reflect pipeline.
Standalone orders: Orders can have arbitrary IDs — they don't need to correspond to a backlog item. When a standalone order completes, the
backlog done
adapter call is a no-op (no matching item to mark done). Use standalone orders for shared infrastructure, maintenance tasks, or cross-cutting work that serves multiple backlog items.
Nothing to schedule: When no backlog items are actionable (all blocked, all in-progress, all done, etc.), still write
orders-next.json
with an empty orders array (
{"orders":[]}
). This signals to the loop that scheduling ran but found nothing — preventing hot-loop re-spawns.
从mise的
backlog
数组中调度执行任务。使用待办事项ID(字符串格式)作为工单
id
待办事项始终包含
id
title
字段,其他字段由适配器定义,可能存在差异。默认适配器(todos.md)提供:
status
section
tags
estimate
plan
。自定义适配器可能包含任意字段——请将未知字段作为有用的上下文参考。
共享基础设施: 当多个计划依赖公共基础设施(共享类型、工具函数、基础包)时,请在计划阶段之前提议一个独立的基础设施工单。使用描述性的slug ID(例如
"infra-shared-types"
)。如果基础设施工作量较大,请通过适配器创建一个待办事项(
noodle adapter run backlog add
),然后使用该事项的ID作为工单ID。
带计划的事项: 当待办事项存在
plan
字段(相对路径,例如
brain/plans/29-foo/overview.md
)时,请读取计划概览和阶段文件来理解工作内容。调度一个工单,为每个剩余未完成阶段(每个未勾选的
- [ ]
项)对应一个阶段。在
order.plan
中填入计划路径。在每个阶段的
extra_prompt
中注入计划上下文:阶段简介和所有跨阶段依赖。
阶段并行化: 阅读计划来识别阶段之间的依赖关系。依赖前期阶段输出(共享类型、API、schema)的阶段必须作为顺序阶段。修改代码库中独立区域的阶段(独立包、不相关功能、文档vs代码)可以作为同一工单内的并行阶段。存疑时,顺序执行更安全——但不要将没有实际依赖的工作串行化。
无计划的事项: 调度前先评估复杂度。如果事项简单(单一关注点、范围清晰、改动小),可以直接调度为简单的执行任务,使用待办事项的标题和描述作为提示词。如果事项复杂(多文件、跨模块、范围不明确,或者你希望在编码前看到架构草图),请调度先做计划的工单:只有
prompt
的阶段(无
do
字段)调用
/plan
,后续跟着
adversarial-review
阶段来评审计划。不需要质量检查或复盘阶段——计划输出是设计文档,不是代码。计划优先阶段不要使用
"do": "execute"
——执行技能会要求Agent实现功能,这和计划技能的“完成计划后停止”的指令冲突。计划技能会将分阶段的计划写入
brain/plans/
;在下一个调度周期,该事项会有
plan
字段,可以通过标准的执行→质量检查→复盘流水线正常调度。
独立工单: 工单可以使用任意ID——不需要对应待办事项。当独立工单完成时,
backlog done
适配器调用会无操作(没有匹配的待办事项可以标记为完成)。可以为共享基础设施、维护任务或者服务于多个待办事项的跨模块工作使用独立工单。
无内容可调度: 当没有可执行的待办事项时(全部阻塞、全部进行中、全部完成等),仍然要写入
orders-next.json
,包含空的工单数组(
{"orders":[]}
)。这会向系统循环表明调度已运行但没有找到可执行内容——避免热循环重复启动。

Follow-Up and Standalone Stages

后续阶段和独立阶段

Each task type's
schedule
field describes when and how to schedule it — as a follow-up stage within an order, as a standalone order, or both. Read these hints from
task_types
in mise and compose orders accordingly.
每个任务类型的
schedule
字段描述了调度它的时间和方式——作为工单内的后续阶段,或者作为独立工单,或者两者皆可。从mise的
task_types
中读取这些提示,对应组建工单。

Recent Events

近期事件

The mise brief includes a
recent_events
array — lifecycle events emitted by the loop since the last schedule run. These are context for your scheduling decisions, not commands. See references/events.md for the full event type catalog (internal and external).
mise概要包含
recent_events
数组——自上次调度运行以来系统循环发出的生命周期事件。这些是你做调度决策的上下文,不是命令。完整的事件类型目录(内部和外部)请查看references/events.md

Using Events for Scheduling

调度中事件的使用

Events are context, not commands. Consider them alongside backlog state and session history when deciding what to schedule:
  • After
    stage.failed
    or
    order.failed
    — consider whether the failure needs a debugging order, or if the item should be retried with a different approach.
  • After
    order.completed
    — consider follow-up work (reflect, related items that were blocked).
  • After
    merge.conflict
    — the affected order may need manual attention; avoid re-scheduling it immediately.
  • After external events like
    ci.failed
    — consider scheduling an investigation or fix order if it seems actionable.
  • After
    registry.rebuilt
    — new task types may be available; check
    task_types
    for scheduling opportunities.
Don't react mechanically to every event. Use judgment: a single stage failure in a long pipeline is normal; three consecutive failures of the same order suggests a deeper problem.
事件是上下文,不是命令。在决定调度内容时,请结合待办状态和会话历史一起考虑:
  • 出现
    stage.failed
    order.failed
    后——考虑是否需要调试工单,或者是否需要用不同的方法重试该事项。
  • 出现
    order.completed
    后——考虑后续工作(复盘、被阻塞的相关事项)。
  • 出现
    merge.conflict
    后——受影响的工单可能需要人工处理,不要立即重新调度。
  • 出现外部事件比如
    ci.failed
    后——如果看起来可处理,考虑调度调查或修复工单。
  • 出现
    registry.rebuilt
    后——可能有新的任务类型可用,请检查
    task_types
    寻找调度机会。
不要机械地对每个事件做出反应。请使用判断力:长流水线中单个阶段失败是正常现象;同一个工单连续失败三次则说明存在更深层的问题。

Scheduling Heuristics

调度启发规则

  • Cheapest mode: Prefer the lowest-cost provider/model that can handle the task.
  • Explicit rationale: Every order must cite which principle or rule drove its placement.
  • Timebox failures: If an item has failed 2+ times in
    recent_history
    , deschedule or split it.
  • 最低成本模式: 优先选择可以处理任务的最低成本提供商/模型。
  • 明确理由: 每个工单都必须说明是基于哪条原则或规则进行调度的。
  • 失败时间限制: 如果某个事项在
    recent_history
    中失败2次及以上,请取消调度或者拆分它。

Model Routing

模型路由

Task typeProviderModel
Tiny/small tasks (no deep thinking needed)codexgpt-5.3-codex-spark
Tiny/small tasks (no deep thinking needed)claudeclaude-sonnet-4-6
Implementation, execution, codingcodexgpt-5.3-codex
Judgment, strategy, planning, reviewclaudeclaude-opus-4-6
Use spark or sonnet for small, mechanical tasks (simple renames, one-liner fixes, straightforward additions). Use full codex for anything requiring multi-step reasoning or cross-file coordination. When uncertain, codex for implementation, opus for judgment.
任务类型提供商模型
微小/小型任务(不需要深度思考)codexgpt-5.3-codex-spark
微小/小型任务(不需要深度思考)claudeclaude-sonnet-4-6
实现、执行、编码codexgpt-5.3-codex
判断、策略、规划、评审claudeclaude-opus-4-6
小型机械性任务(简单重命名、单行修复、简单添加功能)请使用spark或sonnet。任何需要多步推理或跨文件协调的工作请使用完整版codex。不确定时,实现类工作用codex,判断类工作用opus。

Runtime Routing

运行时路由

Always set
"runtime": "process"
on all stages. The
sprites
runtime is still WIP and should not be used yet. Always include
"runtime"
on scheduled stages so dispatch routing is explicit.
所有阶段始终设置
"runtime": "process"
sprites
运行时仍在开发中,暂时不要使用。调度的阶段必须始终包含
"runtime"
字段,以便调度路由逻辑明确。

Output

输出

Write valid JSON to
.noodle/orders-next.json
matching
noodle schema orders
.
See references/examples.md for order JSON examples and
extra_prompt
field usage.
.noodle/orders-next.json
写入符合
noodle schema orders
的有效JSON。
工单JSON示例和
extra_prompt
字段用法请查看references/examples.md

Principles

原则

  • [[cost-aware-delegation]]
  • [[foundational-thinking]]
  • [[subtract-before-you-add]]
  • [[never-block-on-the-human]]
  • [[guard-the-context-window]]
  • [[cost-aware-delegation]]
  • [[foundational-thinking]]
  • [[subtract-before-you-add]]
  • [[never-block-on-the-human]]
  • [[guard-the-context-window]]