cd /news/ai-tools/stop-rewriting-your-whole-plan-shard… · home › topics › ai-tools › article
[ARTICLE · art-143784] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Stop rewriting your whole plan: shard it instead

A developer released plan-shard, a zero-dependency Python CLI that splits monolithic Claude Code Plan Mode documents into numbered shard files with dependency frontmatter, so targeted string-replacement feedback edits only one shard instead of forcing the model to rewrite the whole plan. The tool shards on '##' headings, defaults dependencies to sequential order plus literal PLAN_XXX references, and runs offline with no LLM or API calls; it is MIT-licensed with 24 tests and installs via pip.

by read1 min views2 publishedOct 2, 2026

Claude Code's Plan Mode is great at producing thorough plans. It's also great at producing monolithic ones — thirty pages of markdown where changing one bullet means the model rewrites the entire document. If you've ever caught yourself manually splitting a plan into PLAN_1.md, PLAN_2.md files just to keep edits contained, you're not alone. That's the exact workflow I automated with plan-shard.

A monolith plan has two failure modes:

It's a zero-dependency Python CLI with two core moves:

Shard. Feed it the monolith:

plan-shard shard plan.md -o shards/

You get PLAN_001.md … PLAN_00N.md plus a PLAN_INDEX.md. Every shard carries frontmatter with its dependency order and resume index:

---
shard: 3
total: 6
title: "Step 1: Add the Redis client"
source: plan.md
depends_on: [2, 4]
resume_index: 3
status: pending
revisions: []
---

Targeted feedback. Fix one shard without touching the rest:

plan-shard feedback shards/PLAN_003.md \
  --old "app/cache.py" --new "app/caching.py" \
  --note "rename module"

Only that file changes — every other shard stays byte-identical, and the edit is logged in the shard's revisions list. Then track execution with plan-shard done / plan-shard resume.

The heuristic is deliberately simple: every ## heading starts a new shard (configurable with --level 3). Text before the first heading becomes shard 1; dependencies default to sequential order plus any literal PLAN_XXX references found in a shard's body. No LLM, no API calls, runs offline in milliseconds.

--feedback is exact string replacement, not semantic editing. It won't reword surrounding prose or chase cross-shard references for you.PLAN_XXX mentions, not a real graph.

pip install plan-shard

Source: https://github.com/hahahahahahahahah6/plan-shard (MIT). 24 tests, stdlib only. If your plans keep getting rewritten wholesale, give your feedback a smaller blast radius.

── more in #ai-tools 4 stories · sorted by recency
── more on @plan-shard 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/stop-rewriting-your-…] indexed:0 read:1min 2026-10-02 · —