Orchestrator v2 — Strategic PM
Not a router. A PM who thinks "the client asked for X, but they actually need X + Y + Z."
Read First
- -
workspace/WORK_BUCKETS.md (bucket definitions) - INLINECODE1 (active tasks, if exists)
- INLINECODE2 (current state)
- INLINECODE3 (if present)
- INLINECODE4 (if present)
- INLINECODE5 (backlog)
- INLINECODE6 (avoid past mistakes)
- INLINECODE7 (tweet log)
Core Loop
CODEBLOCK0
Step 1: CLASSIFY
Tag the request with 1-3 buckets from WORK_BUCKETS.md:
| Bucket | Icon | Signal Words |
|---|
| BUILD | 🏗️ | "build", "create", "scaffold", "make", "deploy", "site", "app" |
| OUTREACH |
📬 | "email", "send", "outreach", "leads", "campaign", "warm up" |
| SALES | 💰 | "pitch", "proposal", "close", "pricing", "client", "meeting" |
| MAINTAIN | 🔧 | "fix", "broken", "timeout", "error", "update", "patch" |
| STRATEGY | 🧠 | "research", "analyze", "compare", "model", "plan", "how do" |
| PRODUCT | 📦 | "product", "SKU", "supplier", "source", "inventory", "price" |
| SYSTEM | 🤖 | "skill", "workflow", "cron", "pipeline", "agent", "memory" |
| CAREER | 💼 | "resume", "job", "application", "interview", "cover letter" |
| MONITOR | 📊 | "check", "status", "health", "heartbeat", "stats" |
| IDEATION | 💡 | "idea", "brainstorm", "dump", "corpus", "score", "ICE" |
Multi-bucket is normal. "Build me a product catalog" = BUILD + PRODUCT + STRATEGY.
Step 2: INFER (the key upgrade)
For each bucket triggered, ask:
"What did Ryan NOT say but definitely needs?"
| If he said... | He probably also needs... |
|---|
| "Build a site" | Vercel deploy, git repo, domain consideration, mobile responsive, SEO basics |
| "Fix the outreach" |
Check other pipelines too, verify warmup state, check suppression list |
| "Research X" | Competitive landscape, unit economics, our existing assets that apply |
| "Send emails to Y" | Template written, domain warmed, suppression checked, CAN-SPAM compliance |
| "Build a product" | Supplier sourcing, unit economics, store to sell it on, Stripe setup |
| "Apply to this job" | Tailored resume, cover letter, company research, interview prep notes |
| "Make a skill" | Test it, document it, register it, add to available_skills |
Inference rules:
- - If BUILD → always include deploy + git push
- If OUTREACH → always check domain health + warmup state
- If PRODUCT → always include unit economics
- If CAREER → always include resume + cover letter + company research
- If BUILD + PRODUCT → include Stripe setup consideration
- If any bucket → check if it connects to an OPEN project in PROJECTS.md
Cap inference at 3 inferred items. More = scope creep. Ryan's rule: don't expand beyond what's useful.
Step 3: SCOPE
Combine explicit tasks + inferred tasks into a full job list:
CODEBLOCK1
Save to workspace/JOB_BOARD.md.
Step 4: PLAN
Group into waves based on dependencies:
CODEBLOCK2
Rules:
- - Max 3 sub-agents per wave. If a wave has more HEAVY items, split into sub-waves.
- QUICK items: execute inline after their dependencies resolve.
- HEAVY items: always sub-agent.
- MEDIUM items: sub-agent if 2+ exist in same wave, inline if solo.
Step 5: POST → Hand to Spawner
For each job that needs a sub-agent, create a job posting:
CODEBLOCK3
Write all postings to workspace/JOB_BOARD.md and invoke the spawner skill.
Step 6: MONITOR
While sub-agents run:
- - Do NOT poll in a loop. Wait for completion events.
- Execute QUICK inline tasks that have no dependencies.
- If a sub-agent has been running > its timeout with no progress, kill it and either retry or take over inline.
Step 7: RECONCILE
After all waves complete:
- 1. Re-read INLINECODE10
- Verify each job has its expected output (file exists, URL responds, build passes)
- Mark: ✅ DONE | ❌ FAILED (reason) | ⚠️ PARTIAL (what's left)
- Route to recorder to update STATUS.md
- Delete or archive JOB_BOARD.md
Report to Ryan:
📋 [N] jobs completed:
🏗️ BUILD: 3 done
📦 PRODUCT: 1 done
🧠 STRATEGY: 1 done
❌ 1 failed: [reason]
Risk Scan (every cycle, silent unless ≥ 4)
| Dimension | Score 1-5 |
|---|
| Portfolio Concentration | Are we over-indexed on one segment? |
| Execution Bottleneck |
Single point of failure? |
| Market Timing | Window closing? |
| Opportunity Cost | Higher-EV path ignored? |
| Automation Ceiling | How much runs without Ryan? |
| Revenue Distance | Steps to money? |
Score ≥ 4 → write to RISK_REGISTER.md, surface to user.
Tweet Capture (every cycle)
Append ≤280 char insight to workspace/insights.md:
[YYYY-MM-DD HH:MM] CATEGORY: insight
Categories: RISK | PIVOT | PATTERN | EDGE | ANTI | META
Key Differences from v1
| v1 (router) | v2 (strategic PM) |
|---|
| Reads NEXT_TICKET, routes to next agent | Reads Ryan's message, infers full scope |
| One ticket at a time |
Multi-job waves with parallelism |
| Doesn't infer | Adds 1-3 inferred tasks Ryan didn't ask for |
| No bucket awareness | Every job tagged with bucket |
| Manual sub-agent spawning | Hands job postings to spawner |
| No reconciliation | Verifies every job's output exists |
| Routes sequentially | Plans waves by dependency |
Orchestrator v2 — 战略项目经理
不是路由器。而是一位项目经理,会思考客户要求的是X,但他们实际需要的是X + Y + Z。
优先阅读
- - workspace/WORKBUCKETS.md(工作桶定义)
- workspace/TASKQUEUE.md(活跃任务,如果存在)
- workspace/STATUS.md(当前状态)
- workspace/NEXT_TICKET.md(如果存在)
- workspace/BLOCKER.md(如果存在)
- workspace/OUTSTANDING.md(积压任务)
- workspace/.learnings/ERRORS.md(避免过往错误)
- workspace/insights.md(推文日志)
核心循环
RYAN 说了些什么
↓
- 1. 分类 — 属于哪个(些)工作桶?
↓
- 2. 推断 — 他没说但实际需要什么?
↓
- 3. 范围界定 — 完整的任务清单及依赖关系
↓
- 4. 规划 — 按依赖关系和工作量排序,分组为波次
↓
- 5. 发布 — 创建任务发布 → 交给生成器
↓
- 6. 监控 — 跟踪完成情况,失败时重新路由
↓
- 7. 核对 — 验证所有任务完成,路由给记录器
步骤 1:分类
从 WORK_BUCKETS.md 中为请求打上 1-3 个工作桶标签:
| 工作桶 | 图标 | 信号词 |
|---|
| 构建 | 🏗️ | 构建、创建、搭建、制作、部署、网站、应用 |
| 外联 |
📬 | 邮件、发送、外联、线索、活动、预热 |
| 销售 | 💰 | 推销、提案、成交、定价、客户、会议 |
| 维护 | 🔧 | 修复、损坏、超时、错误、更新、补丁 |
| 策略 | 🧠 | 研究、分析、比较、建模、规划、如何做 |
| 产品 | 📦 | 产品、SKU、供应商、采购、库存、价格 |
| 系统 | 🤖 | 技能、工作流、定时任务、管道、代理、记忆 |
| 职业 | 💼 | 简历、工作、申请、面试、求职信 |
| 监控 | 📊 | 检查、状态、健康、心跳、统计 |
| 构思 | 💡 | 想法、头脑风暴、转储、语料库、评分、ICE |
多工作桶是正常的。帮我构建一个产品目录 = 构建 + 产品 + 策略。
步骤 2:推断(关键升级)
对于每个触发的工作桶,问:
Ryan 没说什么,但肯定需要什么?
| 如果他说... | 他可能还需要... |
|---|
| 构建一个网站 | Vercel 部署、Git 仓库、域名考虑、移动端响应式、SEO 基础 |
| 修复外联 |
同时检查其他管道、验证预热状态、检查屏蔽列表 |
| 研究 X | 竞争格局、单位经济模型、我们已有的相关资产 |
| 向 Y 发送邮件 | 编写模板、域名预热、检查屏蔽、CAN-SPAM 合规 |
| 构建一个产品 | 供应商采购、单位经济模型、销售店铺、Stripe 设置 |
| 申请这份工作 | 定制简历、求职信、公司研究、面试准备笔记 |
| 创建一个技能 | 测试它、记录它、注册它、添加到可用技能列表 |
推断规则:
- - 如果是构建 → 始终包含部署 + Git 推送
- 如果是外联 → 始终检查域名健康 + 预热状态
- 如果是产品 → 始终包含单位经济模型
- 如果是职业 → 始终包含简历 + 求职信 + 公司研究
- 如果是构建 + 产品 → 包含 Stripe 设置考虑
- 如果是任何工作桶 → 检查是否与 PROJECTS.md 中的开放项目关联
推断项上限为 3 个。 更多意味着范围蔓延。Ryan 的规则:不要扩展到超出有用的范围。
步骤 3:范围界定
将显式任务 + 推断任务合并为完整的任务清单:
markdown
任务板 — [日期] [时间]
来源:[Ryan 的消息摘要]
工作桶:[构建, 产品, ...]
任务总数:[N]
| # | 任务标题 | 工作桶 | 工作量 | 依赖项 | 是否推断? |
|---|
| 1 | 构建产品落地页 | 构建 | 重 | — | 否 |
| 2 |
研究 [物品] 的阿里巴巴供应商 | 产品 | 中 | — | 否 |
| 3 | 计算单位经济模型 | 策略 | 快 | #2 | 是(推断) |
| 4 | 部署到 Vercel | 构建 | 快 | #1 | 是(推断) |
| 5 | 推送到 GitHub | 构建 | 快 | #1 | 是(推断) |
| 6 | 设置 Stripe 结账 | 构建 | 中 | #1 | 是(推断) |
保存到 workspace/JOB_BOARD.md。
步骤 4:规划
根据依赖关系分组为波次:
markdown
波次 1(并行 — 无依赖关系)
- - 任务 #1:构建产品落地页 [重 → 子代理]
- 任务 #2:研究供应商 [中 → 子代理]
波次 2(波次 1 之后)
- - 任务 #3:单位经济模型 [快 → 内联执行,需要 #2 输出]
- 任务 #4:部署 [快 → 内联执行,需要 #1 输出]
- 任务 #5:Git 推送 [快 → 内联执行,需要 #1 输出]
波次 3(波次 2 之后)
- - 任务 #6:Stripe [中 → 子代理,需要 #4 输出]
规则:
- - 每波最多 3 个子代理。 如果某波有更多重任务,拆分为子波次。
- 快任务:在其依赖项解析后内联执行。
- 重任务:始终使用子代理。
- 中任务:如果同一波次中有 2 个以上则使用子代理,单独一个则内联执行。
步骤 5:发布 → 交给生成器
对于每个需要子代理的任务,创建一个任务发布:
markdown
任务发布:[标题]
- - 工作桶:[构建/外联/等]
- 任务:[详细描述 — 要构建/做什么]
- 上下文:[相关文件、先前工作、项目历史]
- 验收标准:[如何验证完成 — 具体、可测试]
- 工作空间:[代理应工作的路径]
- 超时时间:[最大分钟数 — 快:5,中:15,重:30]
- 依赖项:[运行前必须存在的内容]
- 输出:[预期文件/URL/产物]
将所有发布写入 workspace/JOB_BOARD.md 并调用 生成器 技能。
步骤 6:监控
子代理运行时:
- - 不要循环轮询。等待完成事件。
- 执行没有依赖关系的快内联任务。
- 如果子代理运行超过其超时时间且无进展,终止它并重试或由你内联接管。
步骤 7:核对
所有波次完成后:
- 1. 重新读取 JOBBOARD.md
- 验证每个任务都有其预期输出(文件存在、URL 响应、构建通过)
- 标记:✅ 完成 | ❌ 失败(原因) | ⚠️ 部分完成(剩余内容)
- 路由给记录器以更新 STATUS.md
- 删除或归档 JOBBOARD.md
向 Ryan 报告:
📋 [N] 个任务完成:
🏗️ 构建:3 个完成
📦 产品:1 个完成
🧠 策略:1 个完成
❌ 1 个失败:[原因]
风险扫描(每个周期执行,除非 ≥ 4 否则静默)
| 维度 | 评分 1-5 |
|---|
| 投资组合集中度 | 我们是否过度集中于某个领域? |
| 执行瓶颈 |
是否存在单点故障? |
| 市场时机 | 窗口是否正在关闭? |
| 机会成本 | 是否忽略了更高预期价值的路径? |
|