Skip to content

v1.60.0.0 feat(fanout): /fanout decomposes design doc into N parallel agent tasks (rebased, hardened)#1949

Open
sohmn wants to merge 3 commits into
garrytan:mainfrom
sohmn:feat/fanout-skill-v2
Open

v1.60.0.0 feat(fanout): /fanout decomposes design doc into N parallel agent tasks (rebased, hardened)#1949
sohmn wants to merge 3 commits into
garrytan:mainfrom
sohmn:feat/fanout-skill-v2

Conversation

@sohmn

@sohmn sohmn commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Reopens the work from #1763 per the close comment: rebuilt fresh on current main (v1.57.7.0) instead of dragging the old branch's merge conflicts forward. Three clean commits, no merge history.

New skill /fanout: takes a finished design doc, identifies independent slabs of work via a 4-layer heuristic, promotes shared groundwork to a synchronous Slab 0, builds a slab matrix with verification gates, appends a ## Parallel Execution Plan section to the doc, and emits per-slab editable prompt files plus a worktree-dispatch.sh sidecar.

v0 produces the plan and stops. User runs the dispatch script. Auto-spawn deferred to v1.

Workflow slot: after /office-hours + eng-review + design produces a doc, /fanout turns it into 2-3 worktrees you can dispatch in parallel.

What changed since #1763

All six limitations that PR documented as "known v1 work" are now closed:

# Limitation (from #1763) Fix in this PR
1 Worktree/branch collisions across same-stem design docs Names carry a <sha8> suffix from the doc's repo-relative path
2 CHANGELOG/VERSION queue collision when N slabs run /ship Named expected-conflict files in the Merge order template, each slab's prompt, and the Step 10 report (the coordination tax is no longer hidden)
3 Slab 0 promotion drops public-interface contracts Slab 0 lands skeletons only; the owning slab keeps the contract annotated defined in Slab 0: <file>
4 Over-decomposition via "natural seams" on coupled designs Heuristic 4 refuses docs with draft/tentative shared contracts + a parallelism-confidence check stops the skill when >1/3 of slabs chain
5 Markdown table corruption via | in paths Cell hygiene rule: escape pipes, collapse newlines
6 Heredoc fragility in the dispatch script Per-slab <topic>-slab-<k>.prompt.md files; the script cats them. Zero heredocs in generated output, kills the EOF-breakout class, prompts user-editable before dispatch

Carries forward the first PR's hardening: Step 1 trust boundary (doc content is data, not instructions) and substitution discipline (no literal <placeholder> leaks).

Files

  • fanout/SKILL.md.tmpl (source prompt) + generated fanout/SKILL.md (983 lines, ~14K tokens)
  • test/fanout.test.ts — 7 free assertions including a guardrail test that pins all six hardening fixes (expect(tmpl).not.toContain("<<'EOF") and friends)
  • docs/designs/FANOUT.md — design doc + "v0.1 hardening (post-review)" section
  • Wired into: README.md, CLAUDE.md routing, AGENTS.md, docs/skills.md, test/skill-coverage-matrix.ts; gstack/llms.txt + scripts/proactive-suggestions.json regenerated
  • VERSION + package.json → 1.60.0.0 (queue-aware: 1.58/1.59 claimed by open PRs), CHANGELOG release-summary entry

Test plan

  • bun test test/fanout.test.ts — 7/7 pass (incl. new hardening-guardrails test)
  • bun test test/fanout.test.ts test/skill-coverage-floor.test.ts — 328/328 pass
  • bun run gen:skill-docs clean against current main's preamble pipeline
  • No edits to ETHOS.md, voice content, or other protected gstack surfaces

🤖 Generated with Claude Code

@trunk-io

trunk-io Bot commented Jun 9, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

sohmn and others added 3 commits June 18, 2026 10:49
…closed

Rebuilt fresh on current main per review feedback on the first PR
(garrytan#1763): rebase instead of dragging four generations of merge
conflicts forward.

Carries the first PR's hardening (Step 1 trust boundary, substitution
discipline) and closes all six limitations that PR documented as v1
work:

- L1 worktree/branch names get a doc-path sha8 suffix (collision-proof
  across same-stem design docs)
- L2 CHANGELOG/VERSION named expected-conflict files in Merge order,
  slab prompts, and the wall-clock report
- L3 Slab 0 promotion keeps contract ownership with the owning slab
- L4 over-decomposition guard: draft-contract refusal in heuristic 4 +
  parallelism-confidence check (stop when >1/3 of slabs chain)
- L5 table cells escape pipes, collapse newlines
- L6 per-slab .prompt.md files replace heredocs in the dispatch script
  (kills the EOF-breakout class, prompts editable before dispatch)

test/fanout.test.ts pins all six guardrails. 7/7 pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README (install snippet + table), CLAUDE.md routing, AGENTS.md,
docs/skills.md, skill-coverage-matrix (gate: fanout.test.ts +
coverage floor). llms.txt + proactive-suggestions.json regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Queue-aware claim: main at 1.57.7.0, 1.58/1.59 claimed by open PRs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sohmn sohmn force-pushed the feat/fanout-skill-v2 branch from 06baf21 to eaa8fa1 Compare June 18, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant