orchflows README

The project's README from github.com/DanMcInerney/orchflows. As one markdown file: README.md.

orchflows

Build an agent workflow once. Reuse it inside bigger jobs.

Install

Requires Python 3.11+ and an agent with native subagents, such as Codex or Claude Code. Supported hosts.

git clone https://github.com/DanMcInerney/orchflows.git
cd orchflows
python scripts/orchflows.py setup

Follow any host steps printed by setup, then start a new agent session.

Build your first workflow

Make a clear-writing workflow. All you need is text to paste:

Use orch-build-workflow to create clear-writing: have a worker rewrite my text concisely, then have an independent reviewer check that the meaning and tone survived. Revise at most once to address the review, check the changes, and return the final text with any unresolved concerns separately.

The builder saves a Markdown skill in your personal library, rehearses it with sample text, and independently reviews it. It also checks host registration; follow any reported steps and start a new session to use it by name:

Use clear-writing. Keep this friendly and under 25 words: "Just wanted to check if you could possibly send me the draft by Friday so I can take a look before our meeting on Monday."

Example result:

Could you send me the draft by Friday so I can review it before Monday's meeting?

Next time, change the text, audience, or tone in your prompt. Reuse the same workflow.

Try a dynamic workflow

For a task you only need once:

Use orch-dynamic-workflow to develop three approaches to this message in parallel, combine the strongest ideas, then independently review and revise once if needed: "Our team should record meeting decisions."

Dynamic assembles and runs a process for the current task. It adapts the work and review to the task; simple tasks can use a direct check unless you request independent review. If you also ask to save the process, it uses Build to author and test the reusable workflow.

Why save the process?

You find a process that works: split up the work, combine the results, get a second opinion, fix the issues. Then the next session starts, and you explain it all again.

Orchflows saves those choices in editable Markdown: what happens, what gets checked, and when to stop. Your host runs the agents; orchflows supplies the reusable process.

Put specificity where it belongs

Most task-specific detail belongs in the prompt. Skills keep reusable steps. Root guidance docs hold shared standards; optional extension docs add increasingly specific preferences you want to reuse.

flowchart TB
    P["PROMPT · this task<br/>Rewrite this customer email.<br/>Warm. Under 80 words.<br/>[paste email]"]
    subgraph G["GUIDANCE · standards across tasks"]
        direction TB
        B["Root guidance<br/>guidance/writing.md<br/>Lead with the point."]
        E["Optional extension<br/>writing.email.md<br/>One clear next action."]
        S["Narrower extension<br/>writing.email.support.md<br/>Acknowledge the issue."]
        B -->|specialize if useful| E -->|specialize further| S
    end
    subgraph W["SKILL · the same reusable process"]
        direction LR
        A[Rewrite] --> R[Independent review] --> F[Revise at most once] --> C[Check]
    end
    P -->|task and constraints| W
    G -.->|selected standards guide work and review| W
    classDef prompt fill:#dbeafe,stroke:#2563eb,color:#1e3a8a,stroke-width:2px;
    classDef guidance fill:#fef3c7,stroke:#b45309,color:#78350f,stroke-width:2px;
    classDef extension fill:#ffedd5,stroke:#c2410c,color:#7c2d12,stroke-width:2px;
    classDef work fill:#d1fae5,stroke:#059669,color:#064e3b,stroke-width:2px;
    classDef review fill:#ede9fe,stroke:#7c3aed,color:#4c1d95,stroke-width:2px;
    class P prompt;
    class B guidance;
    class E,S extension;
    class A,F work;
    class R,C review;
    style G fill:#fffbeb,stroke:#b45309,color:#78350f;
    style W fill:#eff6ff,stroke:#2563eb,color:#1e3a8a;

The extension names above are examples you could add in your own library. A saved workflow selects only what applies: general writing → email → support email. Extensions refine shared standards; the current request still controls the task. How guidance composes.

Start small. Compose upward.

1. Make something, then get an independent review.

flowchart LR
    W["orch-work<br/>Make a result"] --> R["orch-review<br/>Review the result"]
    classDef work fill:#d1fae5,stroke:#059669,color:#064e3b,stroke-width:2px;
    classDef review fill:#ede9fe,stroke:#7c3aed,color:#4c1d95,stroke-width:2px;
    class W work;
    class R review;

These are the two primitives: work launches a fresh maker; review launches a fresh reviewer who did not make the result. The reviewer reports findings without changing it.

2. Work in parallel, then review the combined result.

flowchart LR
    A[Worker A] & B[Worker B] --> J[Combine]
    J --> R[Review once] --> F["Revise if needed<br/>at most once"] --> C[Check]
    classDef work fill:#d1fae5,stroke:#059669,color:#064e3b,stroke-width:2px;
    classDef review fill:#ede9fe,stroke:#7c3aed,color:#4c1d95,stroke-width:2px;
    class A,B,J,F work;
    class R,C review;

The optional shared library packages the last three steps as shared:review-revise-once. It stops after the checks, reporting anything unresolved.

3. Use whole workflows as steps in a bigger workflow.

flowchart LR
    subgraph U[Team update workflow]
        direction LR
        N["Extract decisions<br/>workflow"] --> D["Draft an update<br/>workflow"] --> C["clear-writing<br/>workflow"]
    end
    classDef workflow fill:#dbeafe,stroke:#2563eb,color:#1e3a8a,stroke-width:2px;
    class N,D,C workflow;
    style U fill:#eff6ff,stroke:#2563eb,color:#1e3a8a;

Each box can contain the patterns above—or other workflows. Your clear-writing workflow keeps its review and revision steps when reused here. One coordinator connects the procedures and delegates the actual work.

Go further

orchflows (DanMcInerney/orchflows)

Searching Database…

这是什么?Orchflows 为 AI 编码智能体提供两个可组合的技能,让你把可复用的多步骤工作流构建一次,然后在更大的任务中反复使用,而不必每个会话都重新解释一遍流程。
这是独立应用,还是接入我的编码智能体的东西?它不是独立应用:它是两个基于 Markdown 的技能(Build 和 Dynamic),注册到 Codex 或 Claude Code 这类智能体宿主中,并通过该智能体的原生子智能体来运行。
怎么构建我的第一个可复用工作流?告诉你的智能体使用 orch-build-workflow,并用纯文本描述各个步骤(例如:一个 worker 重写文本,一个 reviewer 检查,再修订一次);它会把结果作为 Markdown 技能保存到你的个人库里,并用示例文本进行演练。
除了智能体本身还需要什么?你需要 Python 3.11+ 和一个支持原生子智能体的编码智能体,例如 Codex 或 Claude Code。
新技能构建完能马上用吗?不能马上:构建器会检查宿主注册情况,所以你需要完成它提示的安装步骤并开启新的智能体会话,之后才能按名称调用该技能。
orch-build-workflow 和 orch-dynamic-workflow 有什么区别?Build 为你会复用的流程保存可复用、带名称的 Markdown 技能;Dynamic 则为只需执行一次的任务组装并运行一次性流程,效果好的话可以事后让 Build 把它保存下来。
为什么要费劲保存流程,而不是下次直接重新解释?Orchflows 会把你关于拆分工作、合并结果、征求第二意见、修复问题的选择记录成可编辑的 Markdown,这样你就不必在每个新的智能体会话里重新描述同一套工作流。
已保存的工作流可以作为步骤嵌入更大的工作流吗?可以,整个工作流可以作为步骤嵌套进更大的工作流,而且以这种方式复用时,工作流仍保留自己的审阅和修订步骤。
具体任务细节应该放在哪里,而不是放进技能本身?任务专属细节应放在你的提示词里;技能保存可复用的步骤,而根目录和扩展的指导文档则保存共享的标准,已保存的工作流会有选择地应用这些标准。
Size
44 MB
Stars
121
Updated
CommitOct 04
Age
3mo
Commits · 90 Days