Six Grok Bots split coding work and cut the reported cost from $1.58 to $0.82
Overview
To avoid wasting tokens with one bot coding and judging completion, the author uses a shared folder and six Grok Bots: advisor, scout, verifier and three builders. Classification-only jev makes dispatch and completion decisions.
Workflow
Trigger: A common approach uses one very long chat and one model to plan, code, test and declare completion. The author says self-grading either wastes tokens in endless improvement loops or stops while bugs remain. You pay in both cases. Give a disk folder the project manager role. Grouped bots keep separate memories and share a cloud computer. /workspace/grok-harness survives chat clears and bot replacements and is the team's persistent memory. Bots take and deliver work only there. Store GROK.md, four role specs, jev_seat.py, jev_done.py, GOAL.md and receipts/ there. This fills the 6-bot group limit: 1 advisor, 1 scout, 1 verifier and 3 parallel builders. The same feature cost $1.58 before and $0.82 after in the author's test (author's claim, not reproduced). Items 1–11 follow the 11 copyable template prompts. The source does not say they are the exact prompts the author sent.
- Bot: Build the skeleton (step one, make a folder the manager, prompt 1 to the main bot). Meaning: Create /workspace/grok-harness on the cloud computer with empty placeholders and directories. Return the tree and stop before filling content.
在 /workspace/grok-harness 里搭好我的 harness 目录。
创建以下空占位文件(每个文件只写一行占位注释)和目录:
- GROK.md
- advisor.md
- scout.md
- builder.md
- verifier.md
- jev_seat.py
- jev_done.py
- GOAL.md
- receipts/(空文件夹)
创建完成后把目录结构发给我,立刻停下,先不要填任何正式内容。
- Bot: Write the GROK.md rules for everyone (step one, prompt 2). Meaning: Write at most 40 lines with six rules for every bot to read before acting. Use real files in the harness and repo without relying on chat memory. Stay in one role. Start each card with jev_seat.py and end each round with jev_done.py. Builders cannot mark done and only verifiers sign receipts. Put sends, deletion, payment and public releases in /workspace/approvals for the author. On uncertainty log to questions.md and move on.
编写 /workspace/grok-harness/GROK.md。每个 Bot 执行任何动作前必须先通读一遍。
核心铁律: 1) 唯文件论:只依据 /workspace/grok-harness 和代码库里的真实文件干活,严禁依赖聊天记录里的口头记忆。 2) 严守边界:一个 Bot 只认一个席位,严格按自己的席位文件行事,绝不越界代劳。 3) 闭环流转:每张任务卡必须以运行 jev_seat.py 派单开始,每轮迭代必须以运行 jev_done.py 验收结束。 4) 权责分离:构建者永远无权把任务标为完成;只有验证者有资格签发凭证。 5) 高危拦截:任何涉及对外发送、删除文件、付款或公开上线的操作,一律写入 /workspace/approvals 等我人工拍板。 6) 存疑挂起:拿不准的需求或冲突,记进 /workspace/grok-harness/questions.md,然后切去做下一张卡,不准原地瞎猜。
排版要求:全文不超过 40 行。塞不进的细则,一律下放到各自的席位文件里。
- Bot: Set the advisor role in advisor.md (step two, four roles with the lowest adequate cost, prompt 3). Use the least expensive capable model per role. Reading code costs input, so use long-context, cheap-input grok 4.3. Writing costs output and grok build 0.1 output is one third of grok 4.7. Acceptance needs the strongest model in a fresh context because knowing the code's construction is like grading its own work. The advisor uses grok 4.7, owns GOAL.md and breaks down tasks without coding. Meaning: Read GOAL.md, map.md and the latest validation report each round, split gaps into cards with four elements, run jev_seat.py before work and give a wrap-up within 5 lines after jev_done stops it.
你是顾问,绑定模型:grok 4.7。 你的职责是维护 GOAL.md 与拆解执行计划,严禁亲自写代码。
每轮迭代执行动作: 1) 通读 GOAL.md、map.md 以及最新一份验证报告。 2) 将尚未达标的工作拆解为颗粒度适中的任务卡,存入 /workspace/grok-harness/cards/[n].md。 3) 每张任务卡必须写明四要素:具体目标、允许修改的文件白名单、证明完工的测试命令、最大改动规模限制。 4) 在任何人动手前,先将每张新卡送入 jev_seat.py 进行分流路由。
当 jev_done.py 判定停止运行后,给我输出一份 5 行以内的结项总结,随后结束本次运行。
- Bot: Set the scout role in scout.md (step two, prompt 4). Meaning: Use grok 4.3 and long context, with read-only access and no business code creation or edits. First scan code, docs and the last 7 days of run logs. Write map.md in at most 300 lines with entry points, core files per check and past pitfalls. Limit each read to 200,000 tokens. Afterward answer only new questions.md questions with file and line precision.
你是侦察员,绑定模型:grok 4.3(启用长上下文)。 你的权限是“只读”,严禁创建或修改任何业务代码文件。
首轮启动前的侦察动作:
- 扫描目标代码库、相关文档以及最近 7 天的运行日志。
- 输出 /workspace/grok-harness/map.md,清晰标注:程序入口、GOAL.md 中每项检查所依赖的核心文件、已知的历史坑点。
- 严格约束:map.md 总行数控制在 300 行以内,单次读取上下文控制在 200,000 Token 以内。
首轮之后,你只需响应 questions.md 里的新增提问,回答必须精确到具体文件路径和行号。
- Bot: Set the builder role in builder.md (step two, prompt 5). Meaning: Use grok build 0.1 and one assigned card at a time. Change allowlisted files only, test first, paste actual terminal output at the bottom and hand over to verification. Never mark complete or change GOAL.md. Stop and ask in questions.md before changing unlisted files. The author says each cloud bot can perform only one computer operation at a time, so use three independent builders for parallel work. Three browser tabs on one bot do not substitute.
你是构建者,绑定模型:grok build 0.1。 每次只从 /workspace/grok-harness/cards 认领一张分配给你的任务卡。
单卡施工标准流程: 1) 严格锁定作用域,只允许改动卡片白名单里列出的文件。 2) 测试先行:先写自动化测试,再编写业务实现代码。 3) 运行测试,将真实的终端输出结果直接粘贴回当前任务卡底部。 4) 完成后将任务卡移交给验证者。
红线约束:严禁擅自将卡片标记为完成,严禁修改 GOAL.md。如果施工中发现必须改动白名单之外的文件,立刻停工并在 questions.md 向顾问申请变更。
- Bot: Set the verifier role in verifier.md (step two, prompt 6). Meaning: Use grok 4.7 and a blank context for each review. Keep builder chat out and see only GOAL.md, the git diff and task card. Rerun test commands, check the diff stays allowlisted and on pass issue a receipt with command, full output summary, Git commit hash and timestamp. On fail return it with the reason. Summarize each round and name the weakest check.
你是验证者,绑定模型:grok 4.7,且每次审查必须开启全新空白上下文。 严禁翻看构建者的历史施工对话。你的视野里只允许出现三样东西:GOAL.md、本次 git diff、对应任务卡。
单卡盲审流程: 1) 在终端亲自重新运行该卡对应的测试命令。 2) 核查 git diff,确认改动没有越出任务卡允许的文件白名单。 3) 审查通过:在 /workspace/grok-harness/receipts/[check].md 签发凭证,必须包含执行命令、完整输出摘要、Git Commit 哈希值以及时间戳。 4) 审查不通过:直接打回任务卡,并在卡片顶部用一行大白话写明具体哪里挂了。
每轮所有卡片审完后,输出一份本轮验证简报:写明「通过检查数 / 总检查数」,并点名目前表现最弱的那一项检查。
- Bot: Configure jev_seat routing (step three, dispatch for 0.1 cents, prompt 7). jev classifies only and returns selected label, confidence and option probabilities without chatting. It responds in 70–500 ms, with $0.042 per million input tokens and free output. Classify every card before work. At confidence ≥ 0.80 dispatch to the matching role. Lower confidence means scope is unclear, so ask the advisor and log why. Append each result to receipts/seats.log.
配置新技能:jev_seat。
任何任务卡进入执行前,先构造一次 jev 分类请求:
- state(输入上下文)= 任务卡完整文本 + 卡片白名单文件列表 + 验证者留下的最后一行反馈。
- question(单选分类):seat
- scout:需要查阅代码或定位问题,不涉及文件修改
- builder:边界清晰、附带测试验收标准的代码改动
- advisor:需要调整执行计划或修改 GOAL.md 目标
- verifier:需要对已提交的工作成果进行独立核验
自动分流规则:
- 置信度 ≥ 0.80 -> 直接派发给对应席位执行
- 置信度 < 0.80 -> 移交顾问裁决,并要求在卡片中写明分流理由
将每一次 jev 的返回结果追加记录到 /workspace/grok-harness/receipts/seats.log。
- Bot: Set jev_done completion (step four, require the goal before stopping, prompt 8). Meaning: Write GOAL.md so a stranger can check it. At each round's end send the full goal, filenames in receipts/ and latest verification brief. Ask one question: does every check pass with a receipt? At P(done) ≥ 0.92 stop and have the advisor summarize. Otherwise return the weakest check to the advisor for another round. If still going at round 6, suspend every bot for manual takeover. The article says jev accepts at most 32,000 tokens while prompt 8 specifies under 30,000. Give only the goal file, receipt filenames and brief, without code or receipt text.
配置新技能:jev_done。
每轮迭代结束时,构造一次 jev 判定请求:
- state = GOAL.md 全文 + receipts/ 目录下的文件名列表 + 最新验证简报。
- question(是/否概率判定):done —— "GOAL.md 里的每一项检查是否都已满足,并且都有对应的验收凭证支撑?"
判定后动作:
- P(done) ≥ 0.92 -> 立即停止整次运行,通知顾问输出结项总结
- P(done) < 0.92 -> 将验证报告中“最弱的一项检查”发送给顾问,触发下一轮任务拆解
- 累计达到第 6 轮仍未停止 -> 触发安全熔断,暂停所有 Bot 运行并通知我人工接管
约束:传入的 state 必须严格控制在 30,000 Token 以内;receipts/ 只传文件名列表,严禁读取并传入文件内部正文。
- Bot: Write GOAL.md with AI (step four, prompt 9). Meaning: Have AI help draft in four sections: final outcome clear enough for a stranger, acceptance checks with concrete terminal commands or automated tests and expected outputs, hard out-of-scope areas and anomalies requiring immediate stop and report. Ask up to 5 essential questions. Rewrite subjective visual checks as tests until no visual acceptance is needed.
帮我为下面这个目标起草一份严谨的 GOAL.md:[在这里填入你想做的具体功能或项目]。
严格按以下四段式结构输出:
- 最终结果:用一句陌生人也能看懂并核对的大白话描述交付物。
- 验收检查项:按编号列出,每一条都必须是一条具体的终端命令或自动化测试,并写明预期输出结果。
- 范围之外:明确划定红线,写明哪些模块和文件谁都不准碰。
- 停止规则:明确列出遇到什么异常状况必须立刻暂停并向我汇报。
起草前先向我提问(最多不超过 5 个关键问题)。切记:每一项检查都必须能生成客观的命令行凭证;如果某条检查需要靠我肉眼主观判断,请帮我重写成自动化测试,直到完全不需要人工肉眼验收为止。
- Bot: Start a six-bot group in one step (step five, six bots work while you read updates, prompt 10). Groups support 2 to 6 bots and handoffs are file state in /workspace/grok-harness instead of manual copy-paste. Meaning: Start a group named harness with all six. Run seven handoff steps: read GROK.md and role specs; scout writes map.md; advisor breaks work into cards; jev_seat.py routes; three builders claim one each in parallel; verifier blindly reviews in fresh context and signs; jev_done.py stops or starts a round. Give one status line per round.
创建一个名为 harness 的群聊,拉入以下 6 个 Bot:advisor、scout、verifier、builder-1、builder-2、builder-3。
启动后的标准接力流程: 1) 全员第一步先读取 /workspace/grok-harness/GROK.md 以及各自对应的席位说明书。 2) 侦察员先行扫描代码库并生成 map.md。 3) 顾问根据 GOAL.md 和 map.md 拆解出第一批任务卡。 4) 调用 jev_seat.py 对每张任务卡进行自动派单分流。 5) 三个构建者并行认领任务卡,每人专注一张卡施工。 6) 验证者开启全新上下文逐卡盲审并签发验收凭证。 7) 调用 jev_done.py 裁决:达标停工,还是进入下一轮循环。
汇报规范:每跑完一轮,在群里只发一行战报,格式为:「第 X 轮 | 通过检查数/总检查数 | P(done) 概率值」。
- Bot: Run a Friday health check (step six, require receipts, prompt 11, natively scheduled at 17:00 Fridays). Each passing check requires a Markdown receipt in receipts/ with command, return, Git commit and exact time. Only the verifier issues receipts and jev_done reads the file list. With no file, builder claims do not count. Meaning: Every Friday at 17:00 audit the week's receipts and seats.log. Report five metrics: launches and normal stops, average P(done) and rounds, low-confidence referrals to advisor, checks that failed at least twice and scope violations. Suggest one improvement per item and wait for explicit approval before editing files.
每周五 17:00 自动执行一次本周审计,读取本周生成的 /workspace/grok-harness/receipts/ 所有凭证以及 seats.log 派单日志。
输出一份精简的周度体检报告,包含以下 5 项指标:
- 本周总启动运行次数 vs 被 jev_done 正常判定完工停止的次数
- 每次正常停止时的平均 P(done) 得分,以及平均消耗轮次
- 因为置信度低于 0.80 而被迫转交顾问裁决的任务卡清单
- 累计失败达到两次及以上的顽固检查项
- 任何越界执行了非本席位职责的 Bot 违规记录
最后,基于本周数据向我提出两项优化建议:1 条值得改写的 GOAL.md 检查项,以及 1 个需要微调规则的席位文件。在没有得到我的明确同意前,严禁擅自修改任何文件。
Check: In the author's cost comparison the same medium feature took 5 rounds, costing $0.82 with role routing and $1.58 with grok 4.7 everywhere, almost half (author's claim, not reproduced). The $0.76 difference comes mainly from three places estimated using the prices above. A picture table gives the breakdown without textual detail. The source gives no other round-by-round checks of feature correctness.
Key points and results
- Separate building and judging. The author says a self-grading model either continues an endless optimization loop at the user's expense or stops with bugs remaining.
- Use the shared disk as team memory. Bots have individual memories but one cloud computer. /workspace/grok-harness persists through clears and bot swaps. They take and deliver work only there. In the author's design the folder cannot forget, silently change rules or spend tokens.
- Pick the least expensive capable model for each role. Long-context grok 4.3 is cheap for input-heavy code reading, grok build 0.1 output costs one third of grok 4.7 and verification uses the strongest grok 4.7 in fresh context. Seeing the work being written would bias it toward a pass, the author says. No per-role billing figures are given.
- Classification-only jev is estimated at 80× cheaper. About 14 dispatches per round cost roughly 0.1 cents with jev and 8 cents with grok 4.7 generating text to decide. jev takes 70–500ms, costs $0.042 per million input tokens and has free output.
- The reported bill fell by almost half. Five rounds on one medium feature cost $0.82 with routing and $1.58 with grok 4.7 everywhere, saving $0.76 (author's claim, not reproduced). There is no third-party check or itemized per-round bill.
- Parallelism requires multiple bots. Each cloud bot can do one computer operation at once. Use three independent builders. Three tabs on one bot are insufficient.
- Work needs receipts. Only verifiers issue them and jev_done checks receipts/ filenames. No file means incomplete regardless of chat claims. Each records command, return, commit and run time.
- Limit context. The author says many models move the whole request to a higher fee tier above 200K, without naming models or rates. The article says jev accepts up to 32,000 tokens while prompt 8 says under 30,000, with only goal, receipt names and brief.
- Closing advice. Make the empty folder, write GROK.md and GOAL.md, set four role files, add jev_seat and jev_done and start a six-bot group. Send prompt 1 to the main bot tonight and spend ten minutes tomorrow writing the first GOAL.md to start.
- Results are the author's account. The 11 prompts are templates. The $1.58/$0.82 comparison and jev rates are reported by the author without third-party reproduction. A picture gives the three sources of the $0.76 savings, with no text breakdown.
Source
- Platform
- X
- Author
- SeanOreilly
- Published
- Categories
- Code and repos, Limits
What this evidence label means
Author's claim, unverified
The method and results come from the author's own account. This site has not reproduced them.