Split monolithic AI plans into executable shards; apply targeted feedback to one shard at a time
Split monolithic AI-generated plans into executable shards.
Claude Code's Plan Mode (and similar agent planners) produce one giant markdown plan. Change a single bullet and the whole document gets rewritten. plan-shard cuts the monolith into numbered PLAN_001.md / PLAN_002.md / … shards, each carrying its dependency order and resume index in frontmatter — so feedback can be applied to one shard at a time without regenerating everything.
plan-shard shard plan.md -o shards/ Produces:
shards/ PLAN_001.md # preamble / overview PLAN_002.md PLAN_003.md ... PLAN_INDEX.md # table of all shards Each shard starts with frontmatter:
--- shard: 3 total: 6 title: "Step 1: Add the Redis client" source: plan.md depends_on: [2, 4] resume_index: 3 status: pending revisions: [] --- 2. Apply feedback to one shard
plan-shard feedback shards/PLAN_003.md \ --old "app/cache.py" \ --new "app/caching.py" \ --note "rename module" Only that file is modified; every other shard stays byte-identical. The change is logged in the shard's revisions list. If the pattern isn't found, nothing is written and the command fails loudly.
plan-shard list shards/ # table of shards, deps, status plan-shard done shards/PLAN_003.md # mark done ( --undo to revert ) plan-shard resume shards/ # print the next pending shard Options
python -m pytest tests/ -q # 24 tests License MIT
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




