myorchFlow manual User manual → GitHub 中文

myorch Flow manual

This manual covers each flow: what it does, when to use it, what each step does, and when it needs you. The platform itself (services, architecture, commands, project packs, flow syntax) is in the User manual.

Each flow has one chapter. The input table, the step graph and the step details in a chapter are generated from flows/*.yaml. They match what myorch expand and the console Flows (流程) page show, so they cannot drift from the flow definition. The rest of the text is written by hand: the Chinese original next to the flow in flows/<flow>.md, this English version in docs/en/flows/<flow>.md. After you change a flow or its .md, regenerate (it writes the English and the Chinese manual):

uv run --with markdown python docs/workflows/build.py

One set of flows for every project

Each role has one flow (flows/development.yaml, review.yaml and so on), shared by all projects. The differences between projects live in the project pack myorch-knowledge/<project>/. They take effect when the flow is expanded; you do not pick them when you start a run:

Project flows.development prompts/ Jira
mdm (Cookbook, master-data-management) Defaults, plus takeaway: true develop.md and review.md from the core-ng template (Gradle dependencies, *-interface contracts) Yes (MD)
blog (personal blog) reviewers: 1, max_rounds: 1, security: false, on_exhausted: accept develop.md, review.md (Jekyll, writing rules, accidental publishing) No
myorch (the platform itself) Defaults, plus incident: true develop.md (incident cause analysis, the platform's design checks, what to do after merging), risk.md No

Roles

Role Task in the console Purpose What it writes outside Flow
development Development (开发) From requirement to pushed branch: requirement, implementation, review, approval, push the branch Pushes the branch after approval. Opens no PR, does not push the base branch development
review Review PR (评审 PR) Reviews an existing PR; the verdict shows in the console Nothing. Only reads the PR review
postmortem Postmortem (复盘) A problem already got into the code: find the change that introduced it and the layer that should have caught it, improve knowledge, create eval cases Only the local myorch-knowledge postmortem
sweep Find bugs (找 bug) Finds bugs in existing code, one batch of files at a time; produces only a daily report Nothing sweep
learn Learn (学习) Builds knowledge from past runs: improves guide/, records decisions people made, adds deterministic checks Only the local myorch-knowledge learn
eval Eval (评测) Replays an eval case and scores the reviewers Nothing eval
onboard Onboard project (接入项目) Analyzes the repository, trial-runs the checks, proposes changes to the project pack Only the local myorch-knowledge onboard

Which flow to use when

Situation Use
There is a requirement to implement development
The change is pushed and your own testing found a problem, or you want to change more on top of it development, continue on the same branch
A PR needs a look review
After a few runs, review keeps reporting the same kind of problem or keeps missing the same kind learn
A new repository is added, or a repository's structure changed onboard
You want to look for bugs in old code regularly sweep, run nightly with myorch schedule
You changed a reviewer's prompt or model and want to know if it got better or worse eval
A problem is already fixed and you want to know why it was not caught postmortem (fix the bug itself with development)
The platform itself had a problem (in a run of any project) development on the myorch project, with incident

Starting a run

Where How
Console http://127.0.0.1:8800/ + New run (+ 新运行) in the top bar: pick the project, then the task (one button per flow of this project), fill in the fields, and write the request in the first message
Slack /myorch opens the start dialog: pick the project, then it lists the project's flows; the fields are the same as in the console. Once the run starts, the bot opens a thread for it in your DMs
Local Claude Code session Start with the channel tool start, for example to start development on the myorch project after finding a platform problem. Runs it starts push their events to that session
Command line uv run myorch run flows/<flow>.yaml --project <project> -i name=value. For the commands see User manual · 5. CLI reference
Schedule uv run myorch schedule add <name> --flow <flow name, for example sweep> --project <project> --cron '…', for example a nightly sweep or a weekly learn

Where you step in

A flow stops and waits for you in the places below. The Waiting on you list (等你处理) in the console top bar and uv run myorch list both list them. The Slack thread has the same buttons. In the step graph, amber cards and the May ask you (可能问你) marker show these places.

When Console / Slack Command line
An agent asks a question Reply in the conversation. In Slack, click an option button or reply in the thread myorch reply <run> <step> "answer"
A loop runs out of rounds and the problem is not solved Read the reflect step's proposal first, then reply 1 to run one more round, 2 to accept, 3 to stop myorch reply <run> <loop> 1
Choosing proposals (learn, onboard, postmortem and others) Reply with numbers, for example 1,3, all, none myorch reply <run> choose "1,3"
Approval First read the Changes (改动) tab in the right pane (diff, review verdict, risk verdict), then click Approve (批准), Request changes (提修改意见; write your comments in the input box first) or Reject (驳回). Slack has three buttons: Approve, Request changes (要求修改), Reject myorch review <run> to see the material, then myorch approve, myorch changes or myorch reject
You do not want it to continue Cancel (取消) myorch cancel <run>
It failed and the cause is fixed Re-run failed steps (重新执行失败的步骤), or Re-run from this step (从这一步重新执行) on a step. The same run continues; succeeded steps keep their results myorch resume <run>

Continue on the same branch

Use this after a development run has finished: your own testing found a problem, or you want to change more on top of this change. Open that run in the console, click Continue on this branch (在这个分支上接着改), and write what to change this time in the first message. On the command line use -i from_run=<run ID>.

Reading the step graph

Changing a flow

  1. Change flows/<flow>.yaml or a fragment. The syntax is in User manual · 8. Writing flows.
  2. Run uv run myorch expand flows/<flow>.yaml --project <project> to see the expanded result.
  3. Update flows/<flow>.md and docs/en/flows/<flow>.md to match, and regenerate this manual.
  4. Run uv run pytest once. When the worker and console run in compose, docker compose -f deploy/compose.yaml up -d --build makes them load the new flow.

Source of this page: docs/en/workflows/README.md

development Development

Fileflows/development.yaml, prose docs/en/flows/development.md
Roledevelopment (the console task “Development”)
Projectsshared by every project
In shortFrom requirement to PR: requirement analysis, technical design, implementation, review by several reviewers, risk approval. The branch is pushed and the PR opened only after approval.
Fragmentslib/sync-base.yaml, lib/review-loop.yaml, lib/deliver.yaml

The development flow: from one requirement to a pushed branch. All projects share this one flow. In one session it writes the requirements, the technical design and the code changes. The change then goes through review, a risk verdict and human approval. Finally the approved commit is pushed to this run's branch. myorch opens no PR and does not merge: a person opens the PR on GitHub and decides on merging. Before approval the change does not leave the sandbox and nothing is pushed.

The differences between projects are all in the project pack; you do not pick them when you start a run (see Differences by project):

uv run myorch run flows/development.yaml --project mdm -i ticket=18700
uv run myorch run flows/development.yaml --project mdm -i ticket=18700 -i task="Backend API only; the frontend gets its own ticket"
uv run myorch run flows/development.yaml --project blog -i task="Add a word count to article pages"
uv run myorch run flows/development.yaml --project myorch -i task="..." -i incident=development-1a2b3c4d
uv run myorch run flows/development.yaml --project mdm -i from_run=<previous run ID> -i task="Found in testing: bulk import does not validate"
uv run myorch run flows/development.yaml --project mdm -i ticket=18700 -i at=<the PR's merge-base> -i ticket_as_of=2026-10-01T08:00:00Z

Console: pick the project first, then the task Development (开发). The form shows only the fields this project uses.

The first line of the message becomes task. The full text is written to docs/external/request.md.

Inputs

InputLabelTypeRequiredDefaultDescription
ticketJira ticketticketFor example 18700. The first step reads the ticket
shown only for projects where project.jira.url holds
from_runStarting pointrun
taskRequirementmessagedepends on the project: not project.jira.urlWhat to change, as specific as possible; several lines are fine. With a ticket, the ticket is the requirement; write here only what it does not say: focus, limits, things to watch
incidentRun with the problemtextThe run where the problem happened, for example development-1a2b3c4d. Leave empty if there is none
shown only for projects where project.flows.development.incident holds
atReplay: base commit (for evals)textNormally empty. When an eval replays a past ticket, the PR's merge-base: start from this commit, drop the later history, no approval, no delivery
shown only for projects where project.jira.url holds
ticket_as_ofReplay: ticket cut-off time (for evals)textNormally empty. An ISO time, for example 2026-10-01T08:00:00Z: the ticket is read as it was at that moment (description rolled back, only earlier comments kept)
shown only for projects where project.jira.url holds
ticket_commentsTicket commentsoptions: all / noneall
shown only for projects where project.jira.url holds

Step graph

Generated from flows/development.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

sync-masterscript · dev-git
fetch-ticketscript · ticket-read
conditional
checkout-branchscript · dev-gitwaits for sync-master
developagent · Opus · dev-write
may ask you
waits for checkout-branch, fetch-ticket
review-fix · loop · up to 3 rounds · until steps.verify.outputs.blocking == 0 · asks you when out of rounds · lib/review-loop.yaml · conditional
ciscript · dev-write
reviewagent · Sonnet · dev-read
×3 parallel
securityagent · Sonnet · dev-read
verifyagent · Opus · dev-read
fixagent · Opus · dev-write
conditional
pack-choosescript · dev-read
may ask youconditional
pack-applyhost action · project-apply
conditional
Out of rounds and still not done: reflect first, then ask you: one more round / accept / stop
reflectagent · Opus · dev-read
takeaway-trailhost action · run-trail
conditionalfailure counts as skipped
takeawayagent · Sonnet · dev-read
conditionalfailure counts as skipped
takeaway-redacthost action · takeaway-redact
conditionalfailure counts as skipped
takeaway-commitscript · dev-write
conditionalfailure counts as skipped
risk-rulesscript · dev-read
conditional
classify-riskagent · Sonnet · dev-read
conditional
human-reviewapproval · count set by risk
conditional
deliverscript · dev-git
conditional
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
sync-masterscript · dev-giton failure asktimeout 15m · retries 1
checkout-branchscript · dev-gitsinceon failure asktimeout 30m
fetch-ticketscript · ticket-readinputs.ticketkey, summary_lineon failure asktimeout 5m · retries 1
developagent · Opus · dev-writetitle, proceed, impact, requires_design_decision, design_question, design_options, checks_passedcan ask you questions; on failure asktimeout 75m · retries 1
Loop review-fix: up to 3 rounds, until steps.verify.outputs.blocking == 0, asks you when out of rounds. Condition steps.develop.outputs.proceed != false. Fragment lib/review-loop.yaml
 ciscript · dev-writeon failure asktimeout 15m
 reviewagent · Sonnet · dev-readfindings3 instances in parallel; on failure asktimeout 20m
 securityagent · Sonnet · dev-readfindingson failure asktimeout 20m
 verifyagent · Opus · dev-readblocking, nits, pre_existingon failure asktimeout 20m
 fixagent · Opus · dev-writesteps.verify.outputs.blocking > 0pack_proposalson failure asktimeout 30m
 pack-choosescript · dev-readsteps.fix.outputs.pack_proposals > 0acceptedcan ask you questions; on failure asktimeout 30m
 pack-applyhost action · project-applysteps.pack-choose.outputs.accepted > 0on failure asktimeout 30m
 reflectagent · Opus · dev-readrecommendation, reasonon failure asktimeout 15m
takeaway-trailhost action · run-trailsteps.develop.outputs.proceed != false and not inputs.aton failure skiptimeout 2m
takeawayagent · Sonnet · dev-readsteps.develop.outputs.proceed != false and not inputs.at and steps.takeaway-trail.outputs.pathitemson failure skiptimeout 10m · retries 1
takeaway-redacthost action · takeaway-redactsteps.develop.outputs.proceed != false and not inputs.at and steps.takeaway.outputs.items != nullon failure skiptimeout 2m
takeaway-commitscript · dev-writesteps.develop.outputs.proceed != false and not inputs.at and steps.takeaway-redact.outputs.files > 0diron failure skiptimeout 2m
risk-rulesscript · dev-readsteps.develop.outputs.proceed != falseon failure asktimeout 30m
classify-riskagent · Sonnet · dev-readsteps.develop.outputs.proceed != falseapprovers, riskon failure asktimeout 15m
human-reviewapproval · count set by risksteps.develop.outputs.proceed != false and not inputs.atapprovers min(steps.risk-rules.outputs.available, max(steps.risk-rules.outputs.approvers, min(steps.classify-risk.outputs.approvers, 2))); changes can be requested: runs review-fix again; on failure asktimeout 30m
deliverscript · dev-gitsteps.develop.outputs.proceed != false and not inputs.atdeliveryon failure asktimeout 10m · retries 1

The graph above is expanded for mdm, which has the most steps. blog and myorch have no fetch-ticket and none of the four takeaway steps. blog's review loop has only 1 reviewer and no security.

What each step does

Step What it does Artifacts
sync-master Clones or updates the repository, force-aligns with origin/<base>, initializes submodules. The first clone goes through the mirror repository in the project's shared directory; after that only increments are fetched (lib/sync-base.yaml) outputs.base_sha
checkout-branch Creates this run's branch. The branch name comes from the project pack's branch (mdm: MD-<ticket number>-myorch-<run ID>; blog and myorch: myorch/<run ID>). Runs the project's setup.sh. When continuing, it switches to the previous run's branch; when replaying, to at. See the two sections below outputs.branch, outputs.since
fetch-ticket Only when the project has Jira. Reads the ticket with the Jira REST API (read-only), writes it as docs/external/ticket.md, downloads screenshots. See "Reading the ticket" docs/external/ticket.md, docs/external/attachments/
develop Does it all in one session: writes the requirements document, writes the technical design, asks all questions that need a human decision at once, changes the code, runs the checks, writes the implementation record, commits once. See "develop" docs/requirements.md, docs/design.md, docs/implementation.md, one commit
review-fix loop ci (the project's checks.sh) → review (count per project) and security in parallel → verify checks the findings and computes blocking → fix (only when blocking > 0) → pack-choose, pack-apply (only when fix proposed project pack changes). The number of rounds and what happens when they run out depend on the project. See "The review loop" docs/ci/round-N.md, docs/review/round-N/
takeaway-trail Only with flows.development.takeaway (mdm). Host action: writes the run's history so far to docs/takeaway/trail.json trail.json
takeaway Same condition. Read-only agent: writes the task info task.md and the lessons takeaway.md docs/takeaway/task.md, takeaway.md
takeaway-redact Same condition. Host action: deletes lines that look like secrets from the two files
takeaway-commit Same condition. Commits the two files to the repository at myorch/<date>-<run ID>/ one commit
risk-rules Computes the number of approvers by rules: changed paths and content, unresolved review findings, failed checks, commits that were not reviewed outputs.approvers, head_sha and others
classify-risk Reads the actual diff, judges independently how many approvers are needed, writes a risk note for the approvers docs/risk.md
human-review Human approval. For the number of approvers see "Risk and approval". Passes automatically when the number is 0
deliver Checks that HEAD is the approved commit, pushes the branch, writes the delivery note docs/delivery.md, outputs.delivery

Where you step in

When Console Command line
develop asks before changing code Reply in the conversation, or click an option myorch reply <run> develop "answer"
Adopting project pack changes Reply with numbers, for example 1,3, all, none myorch reply <run> pack-choose.r<N> "1,3" (N is the round)
Review runs out of rounds with blocking findings left (projects with on_exhausted: ask) Read the reflect proposal, reply 1, 2 or 3 myorch reply <run> review-fix 1 (1 runs one more round, 2 accepts the current result, 3 stops)
A step still fails after retries Reply 1, 2, 3, or write a hint myorch reply <run> <step> 1 (1 starts over in a new session, 2 skips, 3 stops. Any other text is a hint, and the step continues in the same session)
Approval is needed Read the diff, review verdict and risk verdict on the Changes (改动) tab in the right pane, click Approve (批准), Request changes (要求修改) or Reject (驳回) myorch review <run> opens the summary page; myorch approve <run> human-review, myorch changes <run> human-review "comments", myorch reject <run> human-review
After the push — Open a PR on GitHub from the pushed branch (the delivery note can serve as the PR description) and decide whether to merge. For the myorch project, a release follows the merge; see "myorch: after merging"

When any of the four takeaway steps fails, you are not asked (on_failed: skip), and later steps are not blocked. Failed host actions do not ask either.

Artifacts

All steps of a run share one workspace. The Docs (文档) tab in the console's right pane shows all documents and screenshots. On the command line, myorch ws <run> lists the files and myorch ws <run> docs/risk.md reads one.

observed/<run ID>/            the previous run when continuing; the failing run with incident (read-only)
docs/
├── external/
│   ├── request.md            original text of the first message (when started from the console or Slack)
│   ├── ticket.md             the ticket (fetch-ticket, or read by develop via MCP)
│   └── attachments/          images from the ticket
├── previous/                 when continuing: the previous run's documents and conversation
├── requirements.md           requirements, acceptance criteria, ticket mapping; with incident it starts with the cause category
├── design.md                 impact analysis, approach, compatibility and rollback, test plan
├── implementation.md         changes, evidence, check results, assumptions, deviations from the design; fix appends "Round N fix"
├── ci/round-N.md             check report per round (round-N/ holds result.json, head.txt)
├── review/round-N/           reviewer-K.json, security.json, verified.json, summary.md, rebuttal.md, approver.json, pack/
├── takeaway/                 trail.json, task.md, takeaway.md (only for takeaway projects)
├── risk.md                   risk verdict and the places the approvers should check
└── delivery.md               delivery note
repo/myorch/<date>-<run ID>/  task.md, takeaway.md (committed on the branch, only for takeaway projects)

develop

One agent goes from reading the requirement to committing code, in three phases in order: requirements, technical design, implementation. It cannot skip the first two phases and go straight to code. The project's prompts/develop.md is appended verbatim after the "Inputs" part of the prompt; see Differences by project.

Why one step: when these were separate, every handoff lost information. The steps with credentials (sync-master, fetch-ticket, deliver) still run separately; develop gets no GitHub or Jira credentials.

Reading the ticket

The review loop

Defined in the fragment lib/review-loop.yaml. review and eval use it too (one round only, no fixing). The parameters here come from the project's flows.development: by default 3 reviewers plus a separate security review, at most 3 rounds, and it asks you when it runs out of rounds. The project's prompts/review.md, verify.md and fix.md are appended to the matching steps.

Project pack changes (pack-choose, pack-apply)

Sometimes a blocking problem lies in the project pack, for example a mistake in checks.sh. The project pack is read-only in the sandbox (project/), so fix cannot change it. In that case:

  1. fix does not change project/ and does not write a rebuttal for it. It copies project/ to /tmp, changes the copy, runs the relevant checks once with the copy, and writes the proposals to docs/review/round-N/pack/proposals.json (for machines) and proposals.md (for people, including the verification result).
  2. pack-choose lists the proposals and asks which ones you adopt.
  3. pack-apply writes the adopted changes back to myorch-knowledge on the host, commits only those files, and syncs the project snapshot again. The original text of each change must appear exactly once in the file; otherwise nothing is written and the step fails.
  4. The next round of this run mounts the new snapshot and checks with the new project pack. Other runs are not affected. When the write-back happened in the last round, the reflect step proposes one more round.

Only files under guide/, checks.sh, checks.env and setup.sh can be changed (EDITABLE["fix"] in project.py). risk-rules.yaml and security.md cannot: a run must not change how its own changes are approved. To change other files, fix writes "Needs a human decision:" (需要人决定:).

Task info and takeaway

Only when the project sets flows.development.takeaway: true (currently only mdm): putting a myorch/ directory in the repository needs the project's consent. After the review loop and before the risk verdict, four steps commit this run's task info and lessons to the repository.

Risk and approval

Risk is decided by the change, not by the author. Two classifiers back each other up: rules may miss semantic risk, the model may miss path-based risk, and the stricter of the two wins.

risk-rules (deterministic script):

classify-risk (agent, read-only): reads the actual diff, the requirements document, the assumptions in the implementation record, the last review round and checks, and the commits that were not reviewed, and decides 0, 1 or 2 approvers. Any one of these means 2: changes to interfaces or data, changes to build or deployment, anything security-related, hard to undo, affects downstream. It writes docs/risk.md: the verdict, the impact, unresolved problems, and 3 to 5 places the approvers should check. The project's prompts/risk.md is appended to the end of the prompt (myorch uses it to require that the impact be written in terms of the platform's boundaries, unfinished runs, and deployment).

Number of approvers for human-review:

min(approvers registered for the project, max(risk-rules count, min(classify-risk count, 2)))

Delivery

Defined in lib/deliver.yaml.

Continue (from_run)

The general procedure is in Continue on the same branch. In this flow:

Replay (for evals)

Used to redo an already merged ticket on the code as it was then, and compare with the merged PR. The form shows at, ticket_as_of and ticket_comments only for projects with Jira (on the command line, -i at= can be passed for any project). Leave them empty normally.

Differences by project

There is only this one flow. Before 2026-11-10 each project had its own copy (ck-development, blog-development, mo-development). The same improvement had to be made three times, and the three copies soon diverged, so they were merged back into one (docs/notes/2026-11-10-one-set-of-flows.md). The differences between projects live in the project pack myorch-knowledge/<project>/ and take effect when the flow is expanded:

mdm blog myorch
Jira Yes: ticket required, fetch-ticket, replay inputs No: the first message is the requirement No: the first message is the requirement
review Default: 3 reviewers, security, 3 rounds, asks you when out of rounds 1 reviewer, no security, 1 round, accepts when out of rounds Default
takeaway Yes No No
incident No No Yes
prompts From the core-ng template: develop.md (Gradle dependencies, *-interface contract comments), review.md (checks for *-interface) develop.md (Jekyll: keep documents short, writing rules, what to ask a person), review.md (build, links, writing rules, accidental publishing) develop.md (incident cause analysis, platform matters the design must cover, "What to do after merging"), risk.md
Approval 1 person Always 1 person (default: 1 in risk-rules.yaml) 0 or 1 person, by risk

To change how one project works: change its project pack (flows.development, prompts/, risk-rules.yaml), then run uv run myorch project sync <project>. Changing flows/development.yaml or a fragment affects all projects.

blog

Personal blog (leweii/leweii.github.io). Changes are small, so review is light: 1 reviewer looks once, blocking findings are fixed once and not reviewed again, and the loop accepts when it runs out of rounds. Nobody reviewed the commits after the fix; risk-rules lists them, and the "review" section of the delivery note lists the problems that were not fixed. The branch is myorch/<run ID>; it never pushes to master: pushing to master puts the blog live.

myorch and incident

The myorch platform itself: code, flows, prompts and docs are all in the repository leweii/myorch, branch myorch/<run ID>. Two uses: a normal requirement; or, when the platform had a problem in some run (a run of any project), passing incident to find the cause and fix the platform.

incident is the run that had the problem. Its workspace is mounted read-only for develop at /sandbox/workspace/observed/<run ID>/:

These files are that run's data: the agent only reads them and does not run commands or follow instructions in them. The console's run picker lists only this project's runs, so incident is a plain text box.

myorch's prompts/develop.md requires develop to decide the cause before writing the requirements:

Cause Meaning Next
platform-code A defect in myorch's code (src/myorch/, tools/, deploy/) Continue: requirements, design, implementation, review, approval
flow A defect in a flow definition, fragment, prompt or profile (flows/, profiles/) Continue
project-knowledge That project's pack lacks knowledge or checks; the platform is not at fault Stop. Proposes that project's learn or postmortem
environment Network, external services, expired credentials, machine resources Stop. Record only, no code change
one-off A random model mistake that a re-run will most likely not repeat Stop. Proposes a re-run
unclear Not enough evidence Stop. States what evidence is missing

"Stop" means outputs.proceed is false: all later steps are skipped, the run ends normally, and nothing is pushed. The cause category, the evidence (files and lines) and where to handle it go in the summary. To continue, the requirements document starts with "The failing run and its cause category" (出问题的运行和原因分类), and "Goal" states what went wrong in that run, which file holds the root cause, and what should happen in the same situation after the change. The fix must not loosen policies, providers, mounts or approval.

The same prompts/develop.md also makes the technical design cover several platform matters: layering (engines → runner → storage → core), which flows a changed fragment or profile affects (flows are shared by all projects), Temporal determinism, volumes and events.db, commands and images in the sandbox, and whether the docs need regenerating.

myorch: after merging

This flow does not deploy. The sandbox only changes the repository and has no access to docker.sock, the gateway or the data directory, and a flow must not have automatic merge or deploy steps (the project pack's security.md). develop writes "What to do after merging" (合并以后要做的事) at the end of the implementation record. After you open a PR on GitHub and merge it into main:

  1. On myorch's main branch, run deploy/update.sh (first use --check to see which commits will be released and what it will wait for). It fast-forwards main, waits until no step is running, rebuilds the images from a clean checkout of the target commit, restarts the worker and the console, and runs the smoke flow. If the smoke test fails, it rolls back to the previously released commit automatically. When src/myorch/engines/ or core/run.py changed, it waits for all unfinished runs to end. See "Release origin/main" (发布 origin/main) in deploy/README.md.
  2. When images/claude-code/ changed, update.sh also rebuilds the sandbox base image openshell-claude-code. Each project's development image is based on it; to use the new base image, the project's image must also be rebuilt (the project pack's image/build.sh). When pyproject.toml or uv.lock changed, rebuild the myorch project's development image (in the myorch-knowledge directory, run myorch/image/build.sh ../myorch); only then do later development runs of the myorch project use the new dependencies.
  3. When tools/ changed (the helper commands in the sandbox, such as myorch-checks and myorch-ask), they are installed into the volume by myorch init (the init service in compose). Make sure myorch init has been run again; otherwise the sandbox still has the old versions.

Source of this page: docs/en/flows/development.md

review Review PR

Fileflows/review.yaml, prose docs/en/flows/review.md
Rolereview (the console task “Review PR”)
Projectsshared by every project
In shortReview an existing PR. The verdict is shown only in the console.
Fragmentslib/review-loop.yaml, lib/e2e.yaml

PR review: one round of AI review on an existing PR (including PRs written by people). All projects share this one flow. It first runs the project's checks, then has reviewers read the code; when the project has end-to-end tests, it finally tests the running application with a browser. The conclusions appear only in the local console (the Changes (改动) tab in the right panel) and in the workspace's docs/review/round-1/. Nothing is posted to GitHub. It only looks for problems: it does not change code, does not approve the PR and does not request changes, because an agent's approval does not count. Its access to GitHub is read-only.

The review loop it uses is the same fragment as in development, lib/review-loop.yaml, but it runs only 1 round, does not fix, and ends normally even when there are blocking problems. The project's prompts/review.md and verify.md are spliced in the same way (for example the *-interface checks of core-ng projects, and the blog's writing rules and accidental-publication checks).

uv run myorch run flows/review.yaml --project mdm -i pr=13                # default standard
uv run myorch run flows/review.yaml --project blog -i pr=13 -i depth=deep

Console: choose the project first, then the task Review PR (评审 PR), fill in the PR number and choose the review depth. The first message can stay empty.

The review depth (depth) decides the number of reviewers, their model, and whether there is a separate security review; see the preset table below. Use standard for everyday PRs. Use quick for a fast look. Use deep for changes to the build, dependencies or security-related code. verify always uses Opus.

Inputs

InputLabelTypeRequiredDefaultDescription
prPR numbertextrequiredFor example 25
depthReview depthoptions: quick / standard / deepstandard

The input depth picks a set of parameters (presets):

depthreviewerssecurityreview_model
quick1FalseHaiku
standard2TrueSonnet
deep3TrueOpus

Step graph

Generated from flows/review.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

fetch-prscript · dev-git
review-round · loop · up to 1 rounds · until steps.verify.outputs.blocking == 0 · accepts when out of rounds and goes on · lib/review-loop.yaml · conditional
ciscript · dev-write
reviewagent · Sonnet · dev-read
×2 parallel
securityagent · Sonnet · dev-read
verifyagent · Opus · dev-read
Out of rounds and still not done: reflect first, then ask you: one more round / accept / stop
reflectagent · Opus · dev-read
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
fetch-prscript · dev-gittimeout 10m · retries 1
Loop review-round: up to 1 rounds, until steps.verify.outputs.blocking == 0, accepts when out of rounds and goes on. Condition steps.fetch-pr.outputs.changed. Fragment lib/review-loop.yaml
 ciscript · dev-writetimeout 15m
 reviewagent · Sonnet · dev-readfindings2 instances in paralleltimeout 20m
 securityagent · Sonnet · dev-readfindingstimeout 20m
 verifyagent · Opus · dev-readblocking, nits, pre_existingtimeout 20m
 reflectagent · Opus · dev-readrecommendation, reasontimeout 15m

The graph above is expanded for mdm. mdm and myorch do not set e2e.image and have no e2e block; blog does.

What each step does

Step What it does Artifacts
fetch-pr Reads the PR and its list of changed files through the GitHub API; clones the repository, fetches the base branch and pull/<n>/head, checks out the PR's head on this run's branch, initialises submodules docs/pr.md, docs/external/pr.md
review-round loop (1 round) ci (the project's checks.sh, checking the files the PR changed) → review (the count depends on the depth) and security (not in quick) in parallel → verify checks the findings. There is no fix docs/ci/round-1.md, docs/review/round-1/
e2e loop (1 round) This block exists only when the project sets e2e.image (currently only blog). e2e-smoke runs the project pack's fixed smoke test cases; e2e-accept turns the acceptance criteria in the PR description that a browser can check into test cases and runs them. It only tests and does not fix docs/e2e/round-1/

Where you step in

There are no questions for you and no approvals. When a step fails, the run fails (this flow does not set on_failed: ask).

When Console Command line
After the run ends The Changes (改动) tab in the right panel shows the diff and the verified findings; the Docs (文档) tab shows the checks report and the end-to-end test reports and screenshots myorch ws <run> docs/review/round-1/summary.md
After reading — Decide yourself on GitHub what to do with the PR

Artifacts

docs/
├── pr.md                    trusted metadata: author, state, head → base, changed files
├── external/pr.md           title and description written by the PR author (reference data only)
├── ci/round-1.md            checks report
├── review/round-1/
│   ├── reviewer-K.json      each reviewer's findings
│   ├── security.json        security review findings (not in quick)
│   ├── verified.json        findings after verification: Important / Nit / Pre-existing
│   └── summary.md           counts, list of blocking problems, acceptance criteria table
└── e2e/round-1/             projects with end-to-end tests
    ├── smoke/               report.md, result.json, screenshots
    ├── acceptance/          report.md, result.json, screenshots; cases/ holds the written test cases
    └── acceptance.md        the verdict for each acceptance criterion

Principles

End-to-end tests

Security

Source of this page: docs/en/flows/review.md

postmortem Postmortem

Fileflows/postmortem.yaml, prose docs/en/flows/postmortem.md
Rolepostmortem (the console task “Postmortem”)
Projectsshared by every project
In shortPostmortem: a problem already got into the code. Find the change that introduced it and the layer that should have caught it, propose knowledge changes, and generate an eval case. Does not change project code.
Fragmentslib/choose-proposals.yaml

Analyses a problem that already got into the project's code: finds the commit that introduced it, works out at which layer it should have been stopped first and why it was not, proposes knowledge changes, and turns the change into an eval case. Use it after the problem is fixed (or reverted), when you want to know why it was not stopped at the time.

It only analyses and does not change project code; to fix the bug, use development. The only things it changes outside are the local myorch-knowledge (the proposals you adopt) and the local eval set (myorch-data/evals/cases/). The difference from learn: learn looks for patterns across a batch of runs; postmortem works backwards from one concrete problem. learn later reads postmortem's conclusions too.

uv run myorch run flows/postmortem.yaml --project mdm -i commit=<fix or revert commit>
uv run myorch run flows/postmortem.yaml --project mdm -i bad=<commit that introduced the problem>

Console: choose the project first, then the task Postmortem (复盘), and fill in one of Fix or revert commit (修复或 revert 提交) or Commit that introduced the problem (引入问题的提交). The first message can describe the problem's symptoms and impact, or stay empty. If you write one, it is stored as docs/external/request.md, and analyze reads it.

Inputs

InputLabelTypeRequiredDefaultDescription
commitFix or revert committextone of twoA commit SHA. Give this or the next one
badCommit that introduced the problemtextone of twoIts SHA, if you know it
runshidden

Step graph

Generated from flows/postmortem.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

locatescript · dev-git
replay-beforehost action · postmortem-replay
tracescript · dev-read
analyzeagent · Opus · dev-readwaits for trace
choosescript · dev-read
may ask youconditional
applyhost action · project-apply
conditional
replay-afterhost action · postmortem-replaywaits for apply, replay-before
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
locatescript · dev-gitbad, fix, kind, matched, matched_runstimeout 15m · retries 1
replay-beforehost action · postmortem-replaytimeout 5m
tracescript · dev-readtimeout 10m
analyzeagent · Opus · dev-readlayer, category, proposals, expectedtimeout 30m
choosescript · dev-readsteps.analyze.outputs.proposals > 0acceptedcan ask you questionstimeout 30m
applyhost action · project-applysteps.choose.outputs.accepted > 0timeout 5m
replay-afterhost action · postmortem-replaytimeout 5m

Inputs

What each step does

Step What it does Artifacts
locate Finds the commit that introduced the problem (see below), its PR, and which myorch runs touched it docs/postmortem/target.json, bad.diff, fix.diff (when there is a fix commit)
replay-before Host action: creates the eval case (draft) and starts a separate eval run that replays the change with the current knowledge. Runs at the same time as trace and analyze Eval case, eval run eval-<id>-before
trace From the runs that touched the change, lists what each layer saw at the time: which related files the requirements document mentioned, the findings of each review round near the change (10 lines before and after), CI results, the risk verdict docs/postmortem/trace.json, trace.md
analyze Works out what the problem is, at which layer it should have been stopped first and why it was not; proposes knowledge changes; writes the findings a reviewer is expected to report. Read-only; writes only docs/postmortem/ postmortem.md, proposals.json, proposals.md, follow-ups.md, case.json
choose Lists the proposals and waits for you to reply with numbers. Skipped when there are no proposals docs/postmortem/accepted.json
apply Host action project-apply: writes back to the project pack, commits, re-syncs the snapshot. Skipped when nothing was adopted A commit in myorch-knowledge
replay-after Host action: writes the expected findings into the eval case. When proposals were adopted, replays once more with the new knowledge Updated eval case, eval run eval-<id>-after

<id> is the last part of this postmortem run's ID. For example, the replay of postmortem-1a2b3c4d is eval-1a2b3c4d-before.

locate: how it finds the commit that introduced the problem

What was given How it finds it
bad Used directly
commit, and its message contains This reverts commit <sha> The reverted commit
commit, an ordinary fix git blame on the lines the fix changed (for pure additions, the 2 lines before and after the insertion point); takes the commit that appears most often

analyze: the layer that should have stopped it, and why

Output Values
layer: the first layer that should have stopped it requirement requirements analysis should have asked; implementation the implementation guide should have avoided it; review; security; risk should have been judged high risk for a person to look at; ci deterministic checks; approval the approver should have seen it; none
category: why it was not stopped no-rule neither the knowledge nor the checks covered it; rule-not-applied a rule existed but was not used; flagged-not-handled a reviewer or CI pointed it out, but it was rebutted, downgraded or ignored; human-let-through a person saw the risk and let it through anyway; not-detectable it really could not be found in advance

Replays and the eval case

A replay is a separate eval run (the eval flow, evals.py). The reviewer there sees only the change itself and the requirement, not this run's workspace: not the incident description, the fix, the analysis or the expected findings. The eval run clones the repository from GitHub, checks out the commit that introduced the problem, and deletes later commits (including the fix), branches and the reflog.

The case ID is this postmortem's run ID, stored on the local machine in myorch-data/evals/cases/<run ID>.json. This is how it reaches the eval set:

When Case state What happens
replay-before draft Only the change, no expected findings yet; not visible in the eval set. Replays once with the current knowledge
replay-after, case.json has content pending The expected findings are written; it waits for you to confirm under Flows → Eval set (流程 → 评测集) in the console. When proposals were adopted, replays once more with the new knowledge
replay-after, case.json is empty rejected No problem that could have been found in advance; the case is not scored and not replayed again
You mark the valid findings under Flows → Eval set confirmed The case joins the eval set, and later myorch eval run uses it too. If you mark none, it is rejected

Where you step in

When Console / Slack Command line
choose: pick which to adopt Reply with numbers in the conversation, or click all or none uv run myorch reply <run> choose "1,3"
After the run ends: confirm the eval case Open this case under Flows → Eval set and mark the valid findings No command

Writing back to the project pack

Uses the same host action project-apply as learn, also with scope: learn. For the rules see learn's "Writing back to the project pack": write only when everything validates, commit only the files it wrote, the commit message is learn(<project>): … with myorch-run: <run_id>, re-sync the snapshot after writing, git revert is possible.

The only difference is which files are read: the proposals are in docs/postmortem/proposals.json, the adopted numbers in docs/postmortem/accepted.json. The prompt lets analyze change only guide/; the action itself validates against learn's scope and also accepts checks.sh and checks.env.

Artifacts

All under docs/postmortem/ in the workspace. The Docs (文档) tab in the console's right panel shows them, or use uv run myorch ws <run> docs/postmortem.

docs/postmortem/
  target.json            the commit that introduced the problem, base, fix, PR, runs that touched it, requirement
  bad.diff, fix.diff     the change that introduced the problem; the fix (sometimes)
  trace.json, trace.md   what each layer saw at the time
  postmortem.md          conclusion: the problem, the layer that should have stopped it and why, evidence, proposals
  proposals.json, proposals.md, accepted.json   knowledge proposals, the numbers you adopted
  follow-ups.md          proposals for deterministic checks that need a separate development run
  case.json              the expected findings for the eval case

Source of this page: docs/en/flows/postmortem.md

sweep Find bugs

Fileflows/sweep.yaml, prose docs/en/flows/sweep.md
Rolesweep (the console task “Find bugs”)
Projectsshared by every project
In shortFind bugs in existing code, a batch of files at a time; produces only a daily report.
Fragmentslib/sync-base.yaml

Finds bugs in a project's existing code. All projects share this one flow. Each run looks at a batch of files in a fixed order, with several auditors in parallel, verifies the findings and writes a daily report. It suits nightly schedules that work through the whole repository batch by batch.

It is observe-only: it writes only the daily report docs/sweep/report.md. It does not change code, does not push, does not start development and does not change the knowledge. To fix a problem it found, a person starts a separate development run. The difference from review: review looks at a PR's change; sweep looks at code already on the main branch.

uv run myorch run flows/sweep.yaml --project mdm                     # run once, audit depth defaults to standard
uv run myorch run flows/sweep.yaml --project mdm -i depth=deep
uv run myorch schedule add nightly-sweep-mdm --flow sweep --project mdm --cron '0 2 * * *'   # every night at 2:00

Console: choose the project first, then the task Find bugs (找 bug), and choose the audit depth. The first message is not needed.

Inputs

InputLabelTypeRequiredDefaultDescription
depthAudit depthoptions: quick / standard / deepstandard

The input depth picks a set of parameters (presets):

depthauditorsaudit_model
quick1Haiku
standard2Sonnet
deep3Opus

Step graph

Generated from flows/sweep.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

syncscript · dev-git
pickscript · dev-read
auditagent · Sonnet · dev-read
×2 parallel
verifyagent · Sonnet · dev-read
recordscript · dev-read
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
syncscript · dev-gittimeout 15m · retries 1
pickscript · dev-readtimeout 5m
auditagent · Sonnet · dev-readfindings2 instances in paralleltimeout 30m
verifyagent · Sonnet · dev-readnew_important, new_nittimeout 20m
recordscript · dev-readtimeout 5m

Which files it looks at

Decided by sweep: in the project pack's project.yaml (see 7. Project packs):

Field Meaning When not set
paths Look only at these directories or files The whole repository
include Look only at files matching these globs (** allowed) No filter
exclude Skip files matching these globs Nothing excluded
chunk How many files per run (1 to 200) 20

What each step does

Step What it does Artifacts
sync Clones or updates the repository and checks out the latest base branch (lib/sync-base.yaml, sped up by the project's shared bare mirror) repo/
pick Takes the next batch of files at the cursor and copies the known issues into the workspace. The cursor does not move here docs/sweep/chunk.txt, docs/sweep/known.json
audit Each auditor reads the batch on its own and looks for defects that exist now. Read-only; does not change code docs/sweep/audit-<n>.json
verify Checks each finding by opening the code, removes false positives and known issues, merges duplicates, writes the daily report docs/sweep/verified.json, docs/sweep/report.md
record Records the new issues in known.json and moves the cursor forward cursor.json, known.json in the shared directory

audit: what it looks for

verify: verification

State across runs

State across runs lives in the project's shared directory shared/<project>/sweep/ (on the myorch storage volume). Only pick and record mount it.

File Content Written by
cursor.json {"next": index of the file the next batch starts at, "total": total number of files, "run": the run that wrote it} record
known.json List of reported issues: fingerprint, file, line, title, severity, run, at (date) record appends

Where you step in

You are not needed while it runs. To read the daily report: open the run in the console and find docs/sweep/report.md under the Docs (文档) tab in the right panel; or uv run myorch ws <run> docs/sweep/report.md. For issues worth fixing, start a separate development run.

Scheduled runs

Artifacts

docs/sweep/
  chunk.txt          the files looked at this time, one per line
  known.json         copy of the known issues at start
  audit-<n>.json     each auditor's findings
  verified.json      new issues after verification
  report.md          daily report

Source of this page: docs/en/flows/sweep.md

learn Learn

Fileflows/learn.yaml, prose docs/en/flows/learn.md
Rolelearn (the console task “Learn”)
Projectsshared by every project
In shortDistil knowledge from past runs: improve guide/, record decisions people made, add deterministic checks.
Fragmentslib/choose-proposals.yaml

Turns a project's past runs into knowledge, so that the next run knows it from the start. All projects share this one flow. It turns various signals into proposals for changing the project pack. You pick which ones to adopt, and it writes them back to myorch-knowledge/<project>/. When the knowledge gets more accurate, every later development and review run benefits.

It only changes the local myorch-knowledge: guide/, checks.sh, checks.env. It does not push, does not touch the project repository and does not change flows (proposals about flows are only written to a file). The difference from postmortem: postmortem works backwards from one problem that slipped through; learn looks for recurring patterns across a batch of runs.

uv run myorch run flows/learn.yaml --project mdm                                                 # pick runs automatically
uv run myorch run flows/learn.yaml --project mdm -i runs=development-b947d694,review-5d5a21ec     # pick runs by hand
uv run myorch schedule add weekly-learn-mdm --flow learn --project mdm --cron '0 9 * * 1'         # every Monday at 9:00

Console: choose the project first, then the task Learn (学习). Runs to learn from (要学习的运行) can stay empty. The first message is not needed.

Inputs

InputLabelTypeRequiredDefaultDescription
runsRuns to learn fromtextOptional. Comma-separated run IDs; when empty, the runs since the last learn are picked

Step graph

Generated from flows/learn.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

collectscript · dev-git
analyzeagent · Opus · dev-read
choosescript · dev-read
may ask youconditional
applyhost action · project-apply
conditional
takeaways-learnedhost action · takeaways-learned
conditional
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
collectscript · dev-gitfindingstimeout 10m · retries 1
analyzeagent · Opus · dev-readproposals, follow_upstimeout 20m
choosescript · dev-readsteps.analyze.outputs.proposals > 0acceptedcan ask you questionstimeout 30m
applyhost action · project-applysteps.choose.outputs.accepted > 0timeout 5m
takeaways-learnedhost action · takeaways-learnedsteps.collect.outputs.takeaways > 0timeout 2m

Which runs it learns from

When runs is not given, the client that starts the run picks them (the same for the command line, the console, Slack and schedules):

The command line lists the chosen runs before it starts. When there is no new run at all, the run does not start and reports "no new ended development / review run" (没有新的已结束的 development / review run). uv run myorch list --project <project> shows which runs exist. To pick by hand, use -i runs=<id>,<id>.

A failed or timed-out learn does not count as completed. The next learn picks the same runs again.

Which signals it reads

Signal Source How it gets into the run
review findings and what happened to them later Each run's docs/review/round-*/, the PR's state collect reads the read-only mounted observed/<run_id>/ and queries GitHub for the PR
Questions people answered, requested changes, rejections, failed steps, re-runs, which run was continued from The event log on the host Written to docs/learn/trail.json by the client at start (trail.py). The sandbox cannot read the event log
CI failures docs/ci/round-*/result.json collect
Assumptions made during implementation, deviations from the requirements and the design The matching sections of docs/implementation.md collect
Why a branch was continued The request of the continuing run (docs/external/request.md) collect
Postmortem conclusions and follow-up proposals docs/postmortem/ of postmortem runs collect
Task info and takeaways written by development runs myorch/<date>-<run_id>/ on the project repository's base branch collect reads them from the repository. Which ones were already learned is written to docs/learn/takeaways-learned.json at start

What each step does

Step What it does Artifacts
collect Gathers the signals in the table above, works out what happened to each review finding later, and reads the takeaways in the repository that have not been learned yet. The script only reads from GitHub and does not run repository code docs/learn/findings.json, outcomes.md, signals.json, signals.md, takeaways.json, takeaways/
analyze Looks for patterns and makes proposals, each with evidence. Only writes proposal files and changes nothing docs/learn/proposals.json, proposals.md, follow-ups.md, flow-proposals.md
choose Lists the proposals for you and waits for you to reply with numbers. Skipped when there are no proposals docs/learn/accepted.json
apply Host action project-apply: validates, writes back to the project pack, commits in myorch-knowledge, re-syncs the snapshot. Skipped when nothing was adopted A commit in myorch-knowledge
takeaways-learned Host action: marks the takeaways read in this run as learned. Runs no matter how many proposals were adopted; skipped when no takeaways were read this time myorch-data/learn/<project>/takeaways.json

collect: what happened to the findings

Findings already marked fixed do not count. Each of the others is checked in the order below, and the first that holds wins:

Outcome Meaning
fixed In a later round, a finding in the same file is marked fixed
rebutted The first 12 characters of the title appear in some round's rebuttal.md
merged_unchanged / closed / open Review runs only: the reviewed PR was merged, was closed, is still open
not_required Nit or Pre-existing; it never blocked
unknown None of the above

myorch no longer posts comments on PRs, so there is no "someone replied to the comment" outcome. Outcomes come only from the runs' own records and the PR state.

collect: takeaways in the repository

analyze: which kinds of knowledge it looks for

At most 8 proposals. With too little evidence it proposes fewer or none. It does not repeat what the knowledge and the repository's own docs already say. The wording is short and follows the style of the existing files.

Type What it looks for Where it writes
record-decision Decisions a person made while answering during requirements analysis or design that apply to all similar questions later guide/decisions.md (created when missing): the situation, what to do, why, the source. Later similar questions follow it without asking a person
fill-gap Causes of rework: continuations, postmortem conclusions, implementations that deviated from the requirements or design, assumptions that had to be made Guides for development and design. The question is "what could the knowledge have said in advance so that the first attempt was right"
add-rule The same kind of problem recurring (in at least 2 runs, or in 1 with high impact) Rules to avoid during implementation, or review-guide.md
relax-rule Comments that were rebutted repeatedly, or merged without changes Relax review-guide.md
add-check Recurring problems a script can detect, or CI checks that fail repeatedly checks.sh or checks.env. Only deterministic checks; checks that may give false positives only warn. When it is not sure it can write the check correctly, it goes into follow-ups.md

Two more files are never applied: follow-ups.md holds proposals for changing the project repository itself (lint, CI, tests), which need a separate development run; flow-proposals.md holds proposals for myorch flows (step order, when to ask questions, steps that always fail or are not needed).

Takeaways are treated as signals and checked like other evidence: only project knowledge that generalises to later work is adopted, not what holds only for one ticket. Evidence is written as <run_id>: takeaway. Proposals about flows, the platform or the environment go into flow-proposals.md.

Each proposal's change is written as an exact replacement (edits: old copied verbatim from the current file and occurring exactly once in it) or an append (append). No diffs, because diffs written by agents often have wrong line numbers.

Where you step in

When Console / Slack Command line
choose: pick which to adopt Reply with numbers in the conversation, or click all or none uv run myorch reply <run> choose "1,3"

Writing back to the project pack

apply is the host action project-apply with scope: learn (actions.py, project.py). The sandbox cannot reach myorch-knowledge, so this happens on the host.

Can change Cannot change
Files under guide/, including new ones risk-rules.yaml, security.md, setup.sh
checks.sh, checks.env project.yaml, image/, policy.yaml, providers/, sources/ and other files

Artifacts

All under docs/learn/ in the workspace. The Docs tab in the console's right panel shows them, or use uv run myorch ws <run> docs/learn.

docs/learn/
  trail.json                 written at start: questions and answers, comments, rejections, failures, re-runs from the event log
  takeaways-learned.json     written at start: run_ids of takeaways already learned
  findings.json, outcomes.md findings and their outcomes, statistics table
  signals.json, signals.md   signals other than review
  takeaways.json, takeaways/<date>-<run_id>/   takeaways read this time
  proposals.json, proposals.md                 proposals
  follow-ups.md, flow-proposals.md             proposals that are not applied automatically
  accepted.json              the numbers you adopted

Scheduled runs

The --flow of myorch schedule add takes the flow name learn. Schedules start runs through the same path as the console, so automatic run selection and writing trail.json and takeaways-learned.json work the same.

Source of this page: docs/en/flows/learn.md

eval Eval

Fileflows/eval.yaml, prose docs/en/flows/eval.md
Roleeval (the console task “Eval”)
Projectsshared by every project
In shortReplay an eval case and score the reviewers.
Fragmentslib/review-loop.yaml

Scores the reviewer. It replays the change that a past review looked at, unchanged, and lets the reviewer look at it again. It compares the result with the real issues a person confirmed and counts how many were caught, how many were missed and how many extra findings were reported. Use it after you change the reviewer's prompt, its model or the project pack's guide/, to tell whether things got better or worse. It writes nothing outside: it does not push, does not change code and does not change the project pack.

One eval run replays one case at one review depth. Collecting, confirming, batch-starting and scoring cases all happen on the local machine through myorch eval (src/myorch/evals.py). The flow itself only prepares the code and runs one review round.

uv run myorch eval collect                              # collect candidate cases from past runs
uv run myorch eval list                                 # cases and their state
# in the console under "Flows → Eval set", mark for each case which findings are real issues
uv run myorch eval run --depth quick --depth standard   # one eval per confirmed case and per depth
uv run myorch eval run --case <case ID>                 # run only one case (default depth standard)
uv run myorch eval report [--batch <batch>]             # comparison table

Do not start it from + New run (+ 新运行) in the console or with myorch run. Only myorch eval run (and postmortem's replays) write the case into the workspace. When you start it directly, prepare finds no case and fails. The Slack start dialog does not list this flow.

Inputs

InputLabelTypeRequiredDefaultDescription
caseCasetextrequiredCase ID (Flows → Eval set, 流程 → 评测集)
depthDepth to testoptions: quick / standard / deepstandard

The input depth picks a set of parameters (presets):

depthreviewerssecurityreview_model
quick1FalseHaiku
standard2TrueSonnet
deep3TrueOpus

Step graph

Generated from flows/eval.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

preparescript · dev-git
review-round · loop · up to 1 rounds · until steps.verify.outputs.blocking == 0 · accepts when out of rounds and goes on · lib/review-loop.yaml
ciscript · dev-write
reviewagent · Sonnet · dev-read
×2 parallel
securityagent · Sonnet · dev-read
verifyagent · Sonnet · dev-read
Out of rounds and still not done: reflect first, then ask you: one more round / accept / stop
reflectagent · Sonnet · dev-read
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
preparescript · dev-gittimeout 10m
Loop review-round: up to 1 rounds, until steps.verify.outputs.blocking == 0, accepts when out of rounds and goes on. Fragment lib/review-loop.yaml
 ciscript · dev-writetimeout 15m
 reviewagent · Sonnet · dev-readfindings2 instances in paralleltimeout 20m
 securityagent · Sonnet · dev-readfindingstimeout 20m
 verifyagent · Sonnet · dev-readblocking, nits, pre_existingtimeout 20m
 reflectagent · Sonnet · dev-readrecommendation, reasontimeout 15m

Where cases come from

A case is the change that round 1 of a past review looked at, plus the real issues a person confirmed. Cases are stored on the local machine in myorch-data/evals/cases/<case ID>.json.

Stage Who What
Collect myorch eval collect Scans all runs. A development or review run becomes a candidate when its round-1 verified.json has an Important or Nit with a file location. The case ID is that run's ID. Pre-existing findings do not count as issues of this change. It records the comparison range (base and head commits), the commits on the branch, the requirements document of the time (docs/requirements.md, or docs/pr.md when there is none) and the findings. Cases that already exist are not collected again
Confirm You, in the console under Flows → Eval set (流程 → 评测集) Mark each finding that really is an issue and click Add to eval set (收入评测集). The state becomes confirmed. When none of them is, click None are real issues (都不是真问题) and the case is dropped. For old runs that did not record a head, the head is inferred (the first commit on the branch), and the page asks you to check it
Replay myorch eval run Starts one eval per confirmed case and per depth. All runs of one batch share a batch ID. Uses the latest version of the project pack and attaches no knowledge sources
Score myorch eval report Reads each replay's docs/review/round-1/verified.json and compares it with the marked findings. See "How scoring works"

postmortem also creates cases (origin: git). The change is the commit in the project repository that introduced the problem. It does not come from a myorch run, and the case ID is the postmortem run's ID. The postmortem starts these replays itself: once with the knowledge of the time, and, when you adopt the knowledge changes it proposes, once more with the new knowledge. myorch eval report --batch <postmortem run ID> shows them.

What each step does

Step What it does Artifacts
prepare Reads docs/eval/case.json. Clones the repository from the source run's own workspace (mounted read-only, so commits that were never pushed to GitHub can be replayed too). Postmortem cases are cloned from GitHub. Checks out the case's head, then deletes the origin remote, all other refs and the reflog, runs a gc, and points origin/eval-base at the case's base. Writes the requirements document of the time to docs/eval/requirement.md repo/, docs/eval/requirement.md
review-round loop (1 round) The same review round as in review: ci → review (the count depends on the depth) and security → verify. The comparison base is eval-base, and the requirements document is docs/eval/requirement.md. There is no fix. When the loop runs out of rounds, the result is accepted automatically docs/ci/round-1.md, docs/review/round-1/

The depths are the same three as in review. See the preset table above.

Not leaking the answers

How scoring works

Scoring happens on the local machine, not in the flow:

Where you step in

When Console Command line
After collecting Under Flows → Eval set, mark the real issues case by case Confirming is console-only; myorch eval list shows the state
After the runs finish Open each run and look at docs/review/round-1/ myorch eval report --batch <batch>

The run itself has no questions and no approvals.

Source of this page: docs/en/flows/eval.md

onboard Onboard project

Fileflows/onboard.yaml, prose docs/en/flows/onboard.md
Roleonboard (the console task “Onboard project”)
Projectsshared by every project
In shortOnboard a new project: analyse the repository and propose changes to the project pack.
Fragmentslib/sync-base.yaml, lib/choose-proposals.yaml

Teaches myorch about a project. It reads the repository, tries the project pack's checks on the last few commits, and then proposes additions and fixes to the project pack. You pick which ones to adopt, and it writes them back to myorch-knowledge/<project>/. Later development, review and risk verdicts all depend on this knowledge.

Run it once when you take on a new project, and again when the repository structure changes a lot. It pushes nothing to the project repository and only changes the local myorch-knowledge. Like the other flows, it is shared by all projects. The difference from learn: learn learns from runs that already happened; onboard looks only at the repository itself and can change more files (checks script, setup script, approval rules, security focus).

uv run myorch run flows/onboard.yaml --project <project>
uv run myorch run flows/onboard.yaml --project <project> -i focus="database migrations"

Console: choose the project first, then the task Onboard project (接入项目). The first message is Focus areas (要重点看的地方) and can stay empty.

Inputs

InputLabelTypeRequiredDefaultDescription
focusFocus areasmessageOptional, for example “frontend checks”, “database migrations”

Step graph

Generated from flows/onboard.yaml, expanded for project mdm with default inputs (another project's pack may leave steps out or change parameters); the same as myorch expand and the console's Flows page (流程).

syncscript · dev-git
try-checksscript · dev-write
analyzeagent · Opus · dev-read
choosescript · dev-read
may ask youconditional
applyhost action · project-apply
conditional
agentscripthost actionneeds you: approvals, questionsconditional (hover over “conditional” to see the expression)steps in the same row run in parallel
Each step's executor, condition and outputs (generated from the YAML)
StepRuns asConditionoutputsPeople and parallelismLimits
syncscript · dev-gittimeout 15m · retries 1
try-checksscript · dev-writepassedtimeout 60m
analyzeagent · Opus · dev-readproposalstimeout 40m
choosescript · dev-readsteps.analyze.outputs.proposals > 0acceptedcan ask you questionstimeout 30m
applyhost action · project-applysteps.choose.outputs.accepted > 0timeout 5m

Before you start

The project pack needs at least a project.yaml, and uv run myorch project sync <project> must have been run. The project's GitHub provider must be set up and the development image built. See 7. Project packs · Onboarding a new project for the steps.

focus is appended as is to analyze's task description, for example "frontend checks" or "database migrations", so that it spends more effort there.

What each step does

Step What it does Artifacts
sync Clones the repository, checks out the latest base branch, initialises submodules (lib/sync-base.yaml) repo/
try-checks Runs setup.sh first when there is one, then runs checks.sh on the last 5 commits as a sample change, and records the results and timings docs/onboard/checks/
analyze Reads the repository, the repository's own docs, the current project pack and the trial results, and writes a project overview and change proposals. Changes neither the repository nor the project pack docs/onboard/report.md, proposals.json, proposals.md, open-questions.md
choose Lists the proposals and waits for you to reply with numbers. Skipped when there are no proposals (lib/choose-proposals.yaml) docs/onboard/accepted.json
apply Host action project-apply with scope: onboard: validates, writes back to the project pack, commits in myorch-knowledge, re-syncs the snapshot. Skipped when nothing was adopted A commit in myorch-knowledge

try-checks: trying the checks

analyze: what it needs to find out

Area Content
Structure How the modules are divided, their dependencies, which parts are external contracts (interfaces, protocols, database migrations), where the frontend is
Build and checks How to build, how to test only the affected parts, which private dependencies or environment are needed; whether checks.sh finds the right modules, misses checks, or fails for unrelated reasons
Conventions Code style, how tests are written, commit and PR conventions, and whether they match what guide/ says
Risk Changes to which paths need more approvers (whether risk-rules.yaml misses anything or catches things it should not), what needs special attention for security

Where you step in

When Console / Slack Command line
choose: pick which to adopt Reply with numbers in the conversation, or click all or none uv run myorch reply <run> choose "1,3"

Writing back to the project pack

Can change Cannot change
Files under guide/, including new ones project.yaml, image/, policy.yaml, providers/, sources/
checks.sh, setup.sh checks.env (learn can change it)
risk-rules.yaml, security.md Other files, including prompts/

onboard cannot change the development flow's per-project settings (flows.development in project.yaml, prompts/; see development's "Per-project differences"). A person changes them by hand when needed.

A change can be written in three ways: exact replacement (edits; old must occur exactly once in the file), append (append), whole file (content).

Artifacts

All under docs/onboard/ in the workspace.

docs/onboard/
  checks/
    changed.txt        files of the sample change
    report.md          checks.sh's report
    result.json        passed, failed, skipped
  report.md            project overview and conclusions, each with its basis
  proposals.json, proposals.md   proposals
  open-questions.md    questions for a person to answer
  accepted.json        the numbers you adopted

Source of this page: docs/en/flows/onboard.md

Fragments

Fragments are reusable steps or loops in flows/lib/. A flow refers to one with use:; it is expanded when a run starts. Syntax: User manual · 8. Writing flows. This table is generated from the fragment files.

FileKindWhat it doesParamsUsed by
flows/lib/choose-proposals.yamlstepLists proposals and lets a person pick which ones to adoptdir, whatlearn, onboard, postmortem
flows/lib/deliver.yamlstepAfter approval, pushes the branch and writes the delivery notes (calls no platform API)approveddevelopment
flows/lib/e2e.yamlloopEnd-to-end tests: the project's fixed smoke cases + (optional) cases written from the acceptance criteria → (optional) fix, round after round until all passimage, profile, acceptance, base, max_rounds, fix, on_exhausted, requirement_doc, check_model, fix_modelreview
flows/lib/review-loop.yamlloopCI → parallel reviewers + security → verify vote → (optional) fix, round after round until no blocking issue is leftbase, reviewers, max_rounds, security, fix, on_exhausted, since, requirement_doc, review_model, verify_model, fix_modeldevelopment, eval, review
flows/lib/sync-base.yamlstepClones or updates the project's repository, checks out the latest base branch, initialises submodulesnonedevelopment, onboard, sweep