batch-plan-execute
Skill12 starsChanged 7 months agoMITView on GitHub
Use when the user wants AI to turn a requirement text, requirement document, and existing reviewed plan files into dependency-ordered implementation plans, a consolidated `checklist.md`, and, only after an explicit execution command, implement those plans with subagents in parallel where safe and in sequence where required.
In this repository3 other files it gives its agents.
- deslopSkill
- product-namingSkill
- publish-piano-sheetSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
49 rules. About 0 are common, 27 are distinctive, and 22 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
22
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 8
Use this skill when the task is to create, revise, retire, execute, or inspect module plans and the derived checklist.md based on a …
- Very specific: line 37
If a plan file path is provided, treat that plan lineage as the primary starting point and inspect the sibling plans/ directory.
- Very specific: line 38
If a plans/ directory path is provided, inspect only plan files and the state file inside that directory.
- Distinctive: line 39
If a requirement file path is provided, read it directly and treat it as the latest requirement source.
- Distinctive: line 40
If the input is raw chat text, treat the full user text as the latest requirement source.
- Very specific: line 41
If both a requirement source and a plans/ directory are available, always use both.
- Distinctive: line 49
If no requirement source exists, match the dominant language of the user's current-turn input.
- Distinctive: line 50
If the user explicitly asks for translation or a specific output language, follow that instead.
- Very specific: line 54
Default to plan mode.
- Very specific: line 79
If the user is ambiguous, stay in plan mode and either refine the execution plan or ask for a clearer execution command.
- Distinctive: line 80
Never infer execution intent from momentum, optimism, or lack of objections.
- Distinctive: line 86
Before extracting requirements, computing requirement-derived hashes, deriving checklist items, or interpreting review notes, preprocess …
- Distinctive: line 88
remove HTML comments outside fenced code blocks
- Distinctive: line 95
Treat commented requirement content as nonexistent.
- Very specific: line 104
Treat each standalone ----delimited body segment as a distinct requirement item candidate before module mapping.
- Very specific: line 105
Treat each standalone ----delimited body segment as a new planning batch boundary, not merely as an extraction aid.
- Very specific: line 107
Do not merge a requirement item extracted from a later --- segment back into an earlier plan lineage.
- Distinctive: line 119
Do not create overlapping modules that both own the same shared change.
- Distinctive: line 120
If a shared change is needed by multiple modules, assign one clear owner module lineage.
- Distinctive: line 122
Prefer slug matches first.
- Distinctive: line 124
If rename matching is ambiguous, do not guess.
- Distinctive: line 128
After extracting candidate modules, derive an explicit dependency graph before classification or subagent spawning.
- Distinctive: line 134
Prefer parallel modules only when they do not require the same shared code ownership in the same phase.
- Distinctive: line 135
Prefer serial sequencing when one module changes contracts, schemas, migrations, shared utilities, or infrastructure that another module …
- Very specific: line 136
If the implementation is A then B, model that directly instead of forcing both into one peer list.
- Distinctive: line 137
Do not infer fake parallelism.
- Very specific: line 143
Write plan files into a plans/ directory:
- Very specific: line 145
If the source is a requirement file, use a plans/ folder next to that file.
- Very specific: line 146
If the source is a plan file or plans/ directory, keep writing into that same plans/ directory.
- Very specific: line 147
If the source is raw chat text, use <cwd>/plans/.
- Very specific: line 149
Create the plans/ directory if it does not exist.
- Distinctive: line 159
Use these naming rules:
- Distinctive: line 164
Do not overwrite an existing file silently.
- Very specific: line 166
Do not route a later ----delimited requirement segment into an earlier lineage, even if it touches the same implementation area or extends …
- Very specific: line 178
If the latest requirement source is a readable file, write checklist.md next to that requirement file instead of inside plans/.
- Very specific: line 179
If no readable requirement file exists, fall back to writing checklist.md inside the active plans/ directory.
- Very specific: line 180
Always overwrite the resolved checklist.md path in place when it can be refreshed safely.
- Very specific: line 185
If an earlier checklist.md exists, treat it only as an optional source of prior checkbox state for safely matched unchanged items, never as …
- Distinctive: line 223
Do not treat the state file as permission to execute.
- Distinctive: line 224
If the state file is missing, bootstrap from the latest requirement source and the existing plan files instead of failing.
- Distinctive: line 226
If the state file exists but is malformed and cannot be safely reconstructed from visible artifacts, fail.
- Distinctive: line 230
Use docs/plan.md as the detailed plan-writing and plan-refresh contract.
- Distinctive: line 242
Treat authoritative review notes from the latest plan lineage as input constraints for plan revisions.
- Very specific: line 245
Keep detailed module extraction, checklist refresh, subagent planning, and plan assembly behavior in docs/plan.md rather than duplicating …
- Distinctive: line 249
Use docs/execute.md as the detailed execution contract.
- Distinctive: line 263
Treat approved plans as the execution boundary source of truth.
- Very specific: line 264
Keep target resolution, preflight, worker dispatch, integration, verification, and completion details in docs/execute.md rather than …
- Distinctive: line 268
Stop and report the problem instead of generating weak output when:
- Distinctive: line 279
Do not emit empty plan files, summary-only files, or a single aggregate plan when the task requires per-module outputs.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Batch Plan Execute
Use this skill when the task is to create, revise, retire, execute, or inspect module plans and the derived checklist.md based on a requirement source and the current plans/ directory state.
This skill has two explicit modes:
plan: generate or revise implementation-ready plans and refreshchecklist.mdexecute: implement already-reviewed plans
This skill can:
- accept requirement text from chat, a requirement file such as
requirements.md, or an existing plan file orplans/directory - reconstruct the current planning state from the latest requirement source, existing plan files, and a hidden state file
- detect mixed changes per module: new requirements, changed requirements, removed requirements, and review notes
- build dependency-aware module or workstream plans that reflect serial and parallel work safely
- generate a consolidated
checklist.mdfrom the latest requirement source plus authoritative review notes - execute approved plans with subagents only after an explicit execution command from the user
Inputs And Resolution
Primary Input Resolution
Choose the primary input in this order:
- an explicit plan file path or
plans/directory path mentioned by the user - an explicit requirement file path mentioned by the user
- a file or document already attached in the task context
- the requirement text written directly in the chat
Use these rules:
- If a plan file path is provided, treat that plan lineage as the primary starting point and inspect the sibling
plans/directory. - If a
plans/directory path is provided, inspect only plan files and the state file inside that directory. - If a requirement file path is provided, read it directly and treat it as the latest requirement source.
- If the input is raw chat text, treat the full user text as the latest requirement source.
- If both a requirement source and a
plans/directory are available, always use both. - Fail immediately if any referenced file or directory does not exist or is not readable.
Output Language Resolution
Use these rules:
- Match all user-visible output language to the dominant language of the latest requirement source.
- If no requirement source exists, match the dominant language of the user's current-turn input.
- If the user explicitly asks for translation or a specific output language, follow that instead.
Mode Routing
Default to plan mode.
Switch to execute mode only when the user explicitly issues an execution command in the current turn.
Examples that DO resolve to execute mode:
开始执行按这个方案实现去改代码直接落地implement nowapply the plan
Examples that DO NOT change mode from the default plan behavior:
LGTMOK继续按这个方向review 过了- any approval that confirms the plan but does not explicitly ask to start implementation
Use these rules:
- Review approval is not execution approval.
- If the user is ambiguous, stay in
planmode and either refine the execution plan or ask for a clearer execution command. - Never infer execution intent from momentum, optimism, or lack of objections.
Shared Semantic Model
Requirement Preprocessing
Before extracting requirements, computing requirement-derived hashes, deriving checklist items, or interpreting review notes, preprocess the latest requirement source in this order:
- remove HTML comments outside fenced code blocks
- ignore Markdown structure inside fenced code blocks
- exclude document-frontmatter
---delimiters from requirement segmentation - detect standalone
---lines in the remaining requirement body as requirement-item dividers only when they are outside fenced code blocks, outside removed comments, and surrounded by non-empty requirement content
Use these rules:
- Treat commented requirement content as nonexistent.
- HTML comments inside fenced code blocks are not review notes.
- Review comments are only meaningful inside
plans/*.md; requirement sources use the same comment-boundary semantics for preprocessing only. - Empty divider segments, comment-only divider segments, and formatting-only divider changes must not create semantic requirement changes.
Requirement Item Identity And Segmentation
Use these rules:
- Treat each standalone
----delimited body segment as a distinct requirement item candidate before module mapping. - Treat each standalone
----delimited body segment as a new planning batch boundary, not merely as an extraction aid. - A new standalone
----delimited requirement segment must produce a new requirement item identity and a new plan lineage, even when its implementation area overlaps with an earlier module. - Do not merge a requirement item extracted from a later
---segment back into an earlier plan lineage. - Requirement item state must preserve extraction-time identity, including
item_id,source_kind,source_order,source_excerpt_hash,body_hash_without_comments,mapped_module_slug, andplanning_batch_id. - Meta sections such as background, goals, scope, non-goals, assumptions, rollout, acceptance criteria, and non-functional requirements are global constraints unless they clearly describe implementation-bearing work.
Module Lineage And Ownership
Use these rules:
- Module boundaries should follow implementation ownership, shared code surface, migration boundaries, deployment boundaries, and owner-level deliverables rather than raw heading order.
- Plan slugs should follow implementation ownership, not requirement heading text, when the two differ.
- Merge requirement slices that land on the same implementation path, shared code surface, or owner-level deliverable.
- Split only when the source clearly describes independent deliverables or strict prerequisite sequencing.
- Do not create overlapping modules that both own the same shared change.
- If a shared change is needed by multiple modules, assign one clear owner module lineage.
- Resolve latest lineage artifacts by highest
rev, otherwise latest base file. - Prefer slug matches first.
- Allow rename matching only for safe one-to-one matches on
body_hash_without_heading. - If rename matching is ambiguous, do not guess.
Dependency Layering And Parallelism
After extracting candidate modules, derive an explicit dependency graph before classification or subagent spawning.
Use these rules:
- Classify each module as
foundation,feature, orfollow-on. - Record
depends_on,blocks,parallelizable_with, andshared_change_owner. - Prefer parallel modules only when they do not require the same shared code ownership in the same phase.
- Prefer serial sequencing when one module changes contracts, schemas, migrations, shared utilities, or infrastructure that another module consumes.
- If the implementation is
A then B, model that directly instead of forcing both into one peer list. - Do not infer fake parallelism. Sequence conservatively if safe ordering is unclear.
Artifact Model And File Contracts
Plan File Lineage
Write plan files into a plans/ directory:
- If the source is a requirement file, use a
plans/folder next to that file. - If the source is a plan file or
plans/directory, keep writing into that sameplans/directory. - If the source is raw chat text, use
<cwd>/plans/.
Create the plans/ directory if it does not exist.
Base plan files use this format:
<module-slug>.md
Revision plan files use this format:
<module-slug>.rev-<n>.md
Use these naming rules:
new-planmay create a base file if the module has no prior lineage.revise-planandobsolete-planmust always write a newrevfile.no-opmust not write a new plan file.- Do not overwrite an existing file silently.
- A new standalone
----delimited requirement segment must create a new base file and a new plan lineage. - Do not route a later
----delimited requirement segment into an earlier lineage, even if it touches the same implementation area or extends the same feature family. - Revisions apply only within the lineage created from that specific requirement segment after its base file exists.
- Slugs derived from
----delimited requirement segments must still describe the implementation owner-level deliverable, not the raw segment order or divider label.
Checklist Contract
The derived checklist file must be:
checklist.md
Use these rules:
- If the latest requirement source is a readable file, write
checklist.mdnext to that requirement file instead of insideplans/. - If no readable requirement file exists, fall back to writing
checklist.mdinside the activeplans/directory. - Always overwrite the resolved
checklist.mdpath in place when it can be refreshed safely. checklist.mdis a derived acceptance snapshot based on the latest requirement source and authoritative review notes.- It exists to help humans verify whether the requested outcomes and acceptance expectations have been satisfied.
- It is not a plan lineage artifact, not an execution target, and not an implementation task list.
- Review notes may refine or correct checklist content only when they change the authoritative requirement or acceptance intent.
- If an earlier
checklist.mdexists, treat it only as an optional source of prior checkbox state for safely matched unchanged items, never as the source of truth for checklist content.
State File Contract
The hidden state file must be:
.state.json
Maintain plans/.state.json as the planning baseline.
The state file must contain at least:
requirement_sourcerequirement_hashrun_atrequirement_itemsmodules
Each module state object must contain at least:
slugtitlestatussource_excerpt_hashbody_hash_without_headingrequirement_item_idslatest_plan_filelatest_revlast_action
Status values must be explicit:
activeobsolete
Use these rules:
- The state file describes planning lineage only.
- Do not treat the state file as permission to execute.
- If the state file is missing, bootstrap from the latest requirement source and the existing plan files instead of failing.
- Bootstrap must reconstruct both requirement items and module mappings using the same shared semantic model as normal plan mode.
- If the state file exists but is malformed and cannot be safely reconstructed from visible artifacts, fail.
Plan Mode
Use docs/plan.md as the detailed plan-writing and plan-refresh contract.
Plan mode is responsible for:
- extracting implementation-bearing modules from the latest requirement source under the shared semantic model
- classifying each module into exactly one action:
new-plan,revise-plan,obsolete-plan, orno-op - producing implementation-ready module plans
- refreshing
checklist.md - refreshing
plans/.state.jsonafter all affected modules are processed
Use these rules:
- Treat authoritative review notes from the latest plan lineage as input constraints for plan revisions.
- Merge requirement changes and review notes into one revised module plan when both affect the same lineage.
- Generate or refresh
checklist.mdduring every successfulplanrun. - Keep detailed module extraction, checklist refresh, subagent planning, and plan assembly behavior in
docs/plan.mdrather than duplicating it here.
Execute Mode
Use docs/execute.md as the detailed execution contract.
Execute mode is responsible for:
- resolving the target plan file or
plans/directory - selecting the latest reviewed artifact for each chosen module lineage
- dispatching execution directly from approved plan boundaries and dependency metadata
- validating the implemented change before reporting completion
Use these rules:
- Execute only after an explicit execution command in the current turn.
- Execute the latest reviewed artifact for each selected module lineage.
- Fail immediately if the latest target artifact still contains unresolved review comments.
- Treat approved plans as the execution boundary source of truth. Do not re-scope modules, re-derive write ownership, or re-plan dependency layering during execute mode.
- Keep target resolution, preflight, worker dispatch, integration, verification, and completion details in
docs/execute.mdrather than duplicating them here.
Failure Conditions
Stop and report the problem instead of generating weak output when:
- the requirement file, plan file, or
plans/directory is missing or unreadable - module extraction fails for a required requirement source
- a plan would be mostly speculation with no meaningful codebase tie-in
- multiple latest lineage candidates exist for one module and the ordering cannot be resolved safely
- rename matching is ambiguous and cannot be reduced to a safe one-to-one mapping
- shared changes or dependency ownership cannot be assigned to one clear module or workstream
- the dependency graph contains cycles that cannot be justified as a single merged module
- the state file exists but is malformed and cannot be safely reconstructed from visible artifacts
Do not emit empty plan files, summary-only files, or a single aggregate plan when the task requires per-module outputs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

