[rig-decomposition-bench] Daily rig decomposition benchmark — 2026-10-28 — no result (task picker failed)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 48/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
研究方向
Start with the benchmark workflow shown in the issue and inspect the task-picker agent configuration, its schema, and the call(picker, ...) result handling. The issue says the picker returned null but does not identify why, and explicitly says the root cause was not investigated. Determine whether the failure can be diagnosed from the captured output; done means identifying a concrete cause and a way to prevent or report this failed run usefully.
由索引模型根據 Issue 內容生成。
描述
Result: benchmark did not complete
The benchmark program typechecked and ran exactly once. It exited with code 0 in under a few minutes, but the task-picker agent returned null, so no later phase ran.
Captured stdout (bench_output.json):
{
"error": "task picker returned null",
"status": "fail"
}
Captured stderr: empty (0 bytes).
Task
Not chosen. The picker (small, maxTurns: 2, repair()) returned null. There is no title, domain, description or success criteria.
Timing comparison
| Single-call (ms) | Decomposed (ms) | Decomposed status |
|---|---|---|
| not run | not run | not run |
Decomposition attempts
None. No task was available, so the writer was never called. Source generation, typecheck and execute were all skipped for attempts 1 and 2. There was no error text and nothing to fix.
Grading
Not run. There are no scores, no winner and no rationale.
Single-call solution
Not produced.
Decomposed program and solution
No decomposed program source or decomposed solution was produced.
Setup notes
npm installhad to be run in.github/skills/rigbefore--typecheckwould pass. Without it,@types/nodewas missing andprocessandnode:child_processfailed to resolve. The skill install did not providenode_modules.- The node version was v22.23.4. The skill's
package.jsonrequires node >=24, which produced an EBADENGINE warning. - The root cause of the picker's
nullwas not investigated. The prompt said not to debug or re-run after the single run.
Benchmark program (Step 1)
import { agent, workflow, s, repair, configureAgent, copilotEngine } from "rig";
configureAgent(copilotEngine());
const DEADLINE = Date.now() + 25 * 60_000;
const left = () => DEADLINE - Date.now();
const SKELETON = `import { agent, workflow, s } from "rig";
// Agent role: <role>
const analyze = agent({ model: "small", instructions: "...", output: s.string });
// Workflow role: combines the agents' outputs into the final solution
export default workflow({
meta: { name: "decomposed-solution", description: "..." },
body: async ({ call }) => {
const analysis = await call(analyze, "...");
return { solution: analysis ?? "" };
},
});`;
const RULES = `Rules for the program (rig API, imports ONLY from "rig"):
- Import only from "rig". No required input on the root. Export the root via \`export default\` without invoking it. No console.log.
- Use at least two agents, each preceded by a \`// Agent role: ...\` comment; choose model "small" for simple sub-steps and "medium" or "large" for harder ones.
- The final answer must combine the agents' outputs, not come from one agent solving everything.
- A workflow() spec accepts ONLY meta, an optional input, and body. It has no output or execute field; the final { solution } object is simply what body returns. An agent() root instead declares output: s.object({ solution: s.string }).
- Agents are called inside body with \`await call(agent, "prompt string")\`, which returns the output or null on failure.
- Use s.string for every agent whose result is source text or free-form solution. Do not wrap large solutions in object schemas.
- Required shape (abridged to one agent; you need at least two):
\`\`\`ts
${SKELETON}
\`\`\`
Return ONLY the complete TypeScript source (no commentary).`;
const taskSchema = s.object({
title: s.string,
domain: s.string,
description: s.string,
criteria: s.array(s.string),
});
// Agent role: pick a complicated, gradeable task suited to multi-agent decomposition.
const picker = agent({
model: "small",
maxTurns: 2,
addons: [repair()],
instructions:
"Pick ONE concrete, complicated task a person or team might face in a single day that would naturally benefit from being split across sub-agents running different models: multi-source research and synthesis, a multi-file coding task with design/implementation/review phases, a structured report combining independent analyses, or a multi-step data transformation pipeline. It must be self-contained (no external files or live web access) and concrete enough to grade. Vary the domain from run to run (pick randomly). Return title, domain, description, and 3-6 concrete checkable success criteria.",
output: taskSchema,
});
// Agent role: solve the whole task alone in one turn.
const single = agent({
model: "medium",
maxTurns: 1,
instructions:
"Solve the whole task yourself, in a single response, addressing every success criterion. No delegation, no tools. Return the complete solution verbatim (Markdown code fences allowed).",
output: s.string,
});
// Agent role: write or fix a rig program that decomposes the task.
const writer = agent({
model: "medium",
maxTurns: 1,
instructions: "You write self-contained rig TypeScript programs. Follow the stated rules exactly.",
output: s.string,
});
const gradeSchema = s.object({
singleScore: s.number,
decomposedScore: s.number,
winner: s.enum("single-call", "decomposed", "tie"),
rationale: s.string,
});
// Agent role: grade both solutions on content correctness and completeness only.
const grader = agent({
model: "large",
maxTurns: 1,
instructions:
"Score each solution 0-10 on how completely and correctly it satisfies the success criteria. Judge only correctness and completeness of content: not length, and not which approach produced it. Pick winner single-call, decomposed, or tie, and explain the comparison.",
output: gradeSchema,
});
type Run = { code: number | null; stdout: string; stderr: string; timedOut: boolean };
async function runCli(args: string[], src: string, timeoutMs: number): Promise<Run> {
const { spawn } = await import("node:child_process");
return new Promise((resolve) => {
const child = spawn("node", ["rig.ts", ...args], { cwd: process.cwd(), stdio: ["pipe", "pipe", "pipe"] });
let stdout = "";
let stderr = "";
let timedOut = false;
const timer = setTimeout(() => {
timedOut = true;
child.kill("SIGKILL");
}, timeoutMs);
child.stdout.on("data", (d: unknown) => { stdout += String(d); });
child.stderr.on("data", (d: unknown) => { stderr += String(d); });
child.on("error", (e: Error) => {
clearTimeout(timer);
resolve({ code: -1, stdout, stderr: stderr + String(e), timedOut });
});
child.on("close", (code: number | null) => {
clearTimeout(timer);
resolve({ code, stdout, stderr, timedOut });
});
child.stdin.on("error", () => {});
child.stdin.end(src);
});
}
type Attempt = {
attempt: number;
generation: string;
typecheck: string;
execute: string;
error: string;
};
function stripFence(t: string): string {
const m = t.match(/```(?:ts|typescript|rig)?\s*\n([\s\S]*?)```/);
return (m ? m[1] : t).trim();
}
export default workflow({
meta: { name: "rig-decomposition-bench", description: "Compare single-call vs decomposed solving", phases: ["Pick", "Single", "Decompose", "Grade"] },
body: async ({ call, phase }) => {
phase("Pick");
const task = await call(picker, "Pick a task now.");
if (!task) return { error: "task picker returned null", status: "fail" };
const taskText = `Title: ${task.title}\nDomain: ${task.domain}\nDescription: ${task.description}\nSuccess criteria:\n${task.criteria.map((c: string) => `- ${c}`).join("\n")}`;
phase("Single");
const t0 = Date.now();
const singleSolution = (await call(single, taskText)) ?? "";
const singleMs = Date.now() - t0;
phase("Decompose");
const t1 = Date.now();
const attempts: Attempt[] = [];
let source = "";
let decomposedSolution = "";
let status = "fail";
let lastError = "";
let prevSource = "";
for (let i = 1; i <= 2; i++) {
if (left() < 4 * 60_000) break;
const rec: Attempt = { attempt: i, generation: "", typecheck: "skipped", execute: "skipped", error: "" };
attempts.push(rec);
let prompt: string;
if (i === 1) {
prompt = `Write a rig program that solves this task by decomposing it across at least two agents.\n\nTASK:\n${taskText}\n\n${RULES}`;
} else if (prevSource.trim()) {
prompt = `Fix this rig program. Fix precisely what the error names and preserve what already worked; do not make unrelated API edits.\n\nTASK:\n${taskText}\n\nERROR:\n${lastError}\n\nSOURCE:\n${prevSource}\n\n${RULES}`;
} else {
prompt = `There is no source to fix (the previous attempt produced nothing). Generate the complete program from scratch.\n\nTASK:\n${taskText}\n\n${RULES}`;
}
const raw = await call(writer, prompt);
const src = raw && raw.trim() ? stripFence(raw) : "";
if (!src) {
rec.generation = "empty";
rec.error = "writer returned null/empty";
lastError = rec.error;
prevSource = "";
continue;
}
rec.generation = "ok";
source = src;
prevSource = src;
const tcMs = Math.min(2 * 60_000, left());
if (tcMs < 10_000) { rec.error = "time budget exhausted"; break; }
const tc = await runCli(["--typecheck"], src, tcMs);
if (tc.code !== 0) {
rec.typecheck = tc.timedOut ? "timeout" : "fail";
rec.error = (tc.stdout + tc.stderr).trim();
lastError = rec.error;
continue;
}
rec.typecheck = "pass";
const exMs = Math.min(5 * 60_000, left());
if (exMs < 10_000) { rec.execute = "skipped"; rec.error = "time budget exhausted"; break; }
const ex = await runCli(["--server"], src, exMs);
if (ex.code !== 0) {
rec.execute = ex.timedOut ? "timeout" : "fail";
rec.error = (ex.stdout + ex.stderr).trim();
lastError = rec.error;
continue;
}
try {
const parsed = JSON.parse(ex.stdout.trim()) as { solution?: unknown };
if (typeof parsed.solution === "string" && parsed.solution.trim()) {
decomposedSolution = parsed.solution;
rec.execute = "pass";
status = "pass";
break;
}
rec.execute = "fail";
rec.error = "no solution string in stdout: " + ex.stdout.slice(0, 2000);
} catch (e) {
rec.execute = "fail";
rec.error = "stdout not valid JSON: " + ex.stdout.slice(0, 2000);
}
lastError = rec.error;
}
const decomposedMs = Date.now() - t1;
phase("Grade");
const placeholder = "(decomposition produced no solution)";
const grade = await call(
grader,
`${taskText}\n\n=== SOLUTION A (single-call) ===\n${singleSolution || "(empty)"}\n\n=== SOLUTION B (decomposed) ===\n${decomposedSolution || placeholder}`,
);
return { task, singleMs, decomposedMs, singleSolution, decomposedSolution, attempts, status, grade, decomposedSource: source };
},
});
Verdict: No winner. The task picker returned null, so the benchmark produced no data this run.
Generated by Daily Rig Decomposition Benchmark · copilot · auto · ~34 AIC · ⌖ ~1 AIC · ⊞ 4K · ◷
- expires on Nov 4, 2026, 1:02 PM UTC
- 主要語言
- TypeScript
- 星號
- 14
- 分支
- 0
- 平均合併
- 9 小時 27 分鐘
- 30 天內合併 PR
- 34
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
githubnext/rig 的其他 Issue
-
agentic-workflows
難度 5/5 一週以上 新手友好度 25/100
githubnext/rig#745 ·
維護者通常 1 天內回覆
-
ai-agent automation
難度 4/5 3-5 天 新手友好度 20/100
githubnext/rig#743 ·
維護者通常 1 天內回覆
-
agentic-workflows
難度 4/5 1-2 天 新手友好度 43/100
githubnext/rig#742 ·
維護者通常 1 天內回覆
-
agentic-workflows
難度 2/5 1-3 小時 新手友好度 25/100
githubnext/rig#741 ·
維護者通常 1 天內回覆
-
agentic-workflows
難度 4/5 3-5 天 新手友好度 35/100
githubnext/rig#739 ·
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
Graphify-Labs/graphify#4860 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
sveltejs/eslint-plugin-svelte#1615 ·
維護者通常 7 天內回覆
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors可能已有人在做 @as992949791 今天認領。 未關閉good first issue help wanted
難度 2/5 1-3 小時 新手友好度 85/100
reticlehq/reticle#2033 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆