superpowers icon indicating copy to clipboard operation
superpowers copied to clipboard

Skill idea: autonomous-chunk-execution - pattern for large cross-cutting tasks

Open sramji opened this issue 8 months ago • 2 comments

I've been using superpowers on a personal project and developed a pattern for breaking large multi-file work (code review remediation, migrations, refactors) into autonomous sequential chunks with shared tracking. The existing skills (executing-plans, dispatching-parallel-agents) don't quite cover this case — they're for single-session work, while this handles multi-session/multi-PR projects.

The core insight is separating coordination from execution through three shared artifacts:

  1. YAML tracker on main (writable shared state) — per-item status that worker sessions read to discover their next task and update when done
  2. Execution plan on main (readable shared state) — detailed per-chunk instructions committed to the repo, not .claude/plans/ which is session-local and invisible to other sessions
  3. Prompt template — bootstraps each worker session by pointing it at the tracker and plan

This pattern has been tested to work inside git worktrees, where each chunk gets its own isolated worktree and PR. The shared state on main (readable plan + writable tracker) is what makes worktree isolation viable — worker sessions can coordinate without touching each other's branches.

Battle-tested on a 31-item code review remediation across a ~12k line Python codebase (5.2k source, 5.6k tests):

Chunk Files +/- Description
1 — Security hardening 10 +63 / -18 Injection guards, exception types, audit trail, XML escaping
2 — Dead code cleanup 12 +7 / -497 9 dead code items, 3 obsolete scripts deleted
3 — Bug fixes + quality 8 +108 / -55 Logging, error types, timezone, cache invalidation
4 — Test hygiene 13 +257 / -301 File renames, shared fixtures, import path fixes
5 — CLI refactor 17 +396 / -402 Extract helpers, shared loader, reduce cli.py by 309 lines
Total — 5 PRs 60 file touches +831 / -1,273 30/31 items fixed, zero test regressions (395 tests)

One worker session ran each of the 5 chunks autonomously from a single prompt template. Net reduction of 442 lines.

Would this be a good fit for core, or better as a standalone plugin? Happy to do the full eval work if there's interest.

sramji avatar Mar 23 '26 21:03 sramji

Thanks for the detailed writeup and the real-world results. A workflow pattern like this is best published as a standalone plugin rather than added to core — core stays a small general-purpose set, and the multi-session coordination ground is tracked in #931 and #429. Closing as not planned for core; a link to a standalone plugin here would be welcome so others can find it.

arittr avatar Aug 19 '26 01:08 arittr

Thank you! #931 is a great discussion.

sramji avatar Aug 19 '26 02:08 sramji