Run the ticket skills through T3 Code, with a review council before pre-mr-review

Agents now start pre-mr-review on the work account themselves, through a Klaude
delegate, and continue from its verdict. A council of models on my own accounts
replaces the single reviewer before it, and adding a seat is one table row.

Proof comes from T3's browser, with mp4 recordings, and capture-proof stays as
the fallback. Ticket pages carry their own data, so index.html renders alone in
T3's file viewer, and worktree threads share the main checkout's docs.

A PreToolUse hook sends subagents in T3 threads to delegate_task. Blocker, proof,
review and MR summary rules come from ideas in t3dotgg/tstack.
This commit is contained in:
Gabriel Brown committed 2026-11-04 18:04:18 -05:00
1 parent 968e0a1045
commit 86f6e391b7
14 files changed
+410 -187

No files matched your search

@@ -70,10 +70,32 @@ describe("the CLI, end to end", () => {
// Self-contained: T3 Code's file viewer serves nothing from above the page's own folder.
const page = readFileSync(join(dir, "index.html"), "utf8");
expect(page).toContain(readFileSync(join(import.meta.dir, "../templates/site/site.js"), "utf8"));
expect(page).toContain(`"key":"KACP-1"`);
expect(page).not.toMatch(/(src|href)="\.\./);
expect(epic().stories.map(s => [s.key, s.status])).toEqual([["KACP-1", "todo"]]);
});
test("inline data cannot close the page's script block, and follows every write", () => {
cli("event", "KACP-1", "pasted </script><img src=x>");
const page = readFileSync(join(dir, "index.html"), "utf8");
const inline = page.match(/window\.TICKET = (.*);\n/)![1];
expect(inline).not.toContain("</script>");
expect(JSON.parse(inline).events.at(-1).text).toBe("pasted </script><img src=x>");
});
test("a linked worktree shares the main checkout's docs", () => {
const repo = mkdtempSync(join(tmpdir(), "tp-repo-"));
const git = (...a: string[]) => spawnSync("git", a, { cwd: repo, encoding: "utf8" });
git("init", "-q");
git("-c", "user.name=t", "-c", "user.email=t@t", "commit", "-q", "--allow-empty", "-m", "x");
const tree = join(mkdtempSync(join(tmpdir(), "tp-tree-")), "wt");
git("worktree", "add", "-q", tree);
const { TICKET_DOCS: _, ...env } = process.env;
expect(spawnSync("bun", [join(import.meta.dir, "ticket-page.ts"), "init", "KACP-1", "--issue", issuePath], { cwd: tree, encoding: "utf8", env }).status).toBe(0);
expect(existsSync(join(repo, ".claude/docs/epics/KACP-9/KACP-1/ticket.data.js"))).toBe(true);
expect(existsSync(join(tree, ".claude"))).toBe(false);
});
test("a step is done only once its commit exists, and the epic row follows", () => {
const plan = join(scratch, "plan.json");
writeFileSync(plan, JSON.stringify({ approach: "<p>a</p>", criteria: [{ id: "AC1", text: "c", steps: [1] }], steps: [{ n: 1, text: "s" }, { n: 2, text: "t" }] }));
@@ -103,6 +125,10 @@ describe("the CLI, end to end", () => {
expect(cli("proof", "KACP-1", "--file", "proof/counts.txt", "--proves", "AC1", "--caption", "Counts").status).toBe(0);
expect(ticket().proof[0]).toMatchObject({ kind: "text", text: "70 of 70 codes stored" });
expect(cli("proof", "KACP-1", "--file", "proof/counts.txt", "--proves", "AC7", "--caption", "x").status).toBe(1);
writeFileSync(join(dir, "proof", "flow.mp4"), "");
expect(cli("proof", "KACP-1", "--file", "proof/flow.mp4", "--proves", "AC1", "--caption", "Flow").status).toBe(0);
expect(ticket().proof[1]).toMatchObject({ kind: "video", file: "proof/flow.mp4" });
expect(cli("unproof", "KACP-1", "proof/flow.mp4").status).toBe(0);
});
test("--amend keeps progress for the steps that remain, a rewrite starts over", () => {