batch-sdp
Skill0 starsChanged 3 months agoMITView on GitHub
Split a large scope into independent segments and run each through the full SDP Stage 1-8 workflow in Codex, with Claude review gates and agy fallback only on infrastructure failure.
In this repository5 other files it gives its agents.
- precompactSkill
- precompactSkill
- review-gateSkill
- sdpSkill
- worktree-dispatchSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use when the user asks for batch-sdp, batch SDP, segmented SDP, large-scope SDP, or unattended segmented execution.
- Very specific: line 12
Run scripts/sdp-anchor.sh from the repository root.
- Very specific: line 13
Read core/SDP.md, commands/batch-sdp.md, and required stage form files.
- Very specific: line 14
Treat commands/batch-sdp.md as dispatch guidance only.
- Very specific: line 15
When printing progress or gate requests, label the review gate as review-gate, not codex-gate.
- Distinctive: line 19
Do Stage 1 interview once for the whole scope.
- Distinctive: line 27
Prefer available Codex subagents for independent segments.
- Distinctive: line 28
If no subagent tool is available, run segments serially and say so.
- Very specific: line 29
Use scripts/run_segment_tmux.sh only when the project explicitly opts into dispatch.batch_engine: tmux_long_lived and tmux + codex are …
- Very specific: line 35
Prefer MCP tool claude_review_gate.
- Very specific: line 44
Never ask agy after Claude returns a clean content BLOCK:.
≈ “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 SDP for Codex
Use when the user asks for batch-sdp, batch SDP, segmented SDP, large-scope SDP, or unattended segmented execution.
Startup
- Run
scripts/sdp-anchor.shfrom the repository root. - Read
core/SDP.md,commands/batch-sdp.md, and required stage form files. - Treat
commands/batch-sdp.mdas dispatch guidance only; Codex-side gates arereview-gateviaclaude_review_gateMCP orpython3 scripts/review_gate.py --reviewer claude. - When printing progress or gate requests, label the review gate as
review-gate, notcodex-gate.
Workflow
- Do Stage 1 interview once for the whole scope.
- Split the request into ordered, independent segments with dependencies recorded.
- For each segment, run the full SDP core from Stage 2 through Stage 8.
- Preserve per-segment artifacts under the anchored
base_dir. - Stop unattended execution on
INFRA_ERRORonly; report the blocked segment and artifact. A contentBLOCK:is not a stop — it follows the core fix loop to its documented cap (max_block), and the batch continues. (run_segment_tmux.shexit 12 = user input needed → stop+report; 10/11 = content outcome, not a stop.)
Execution
- Prefer available Codex subagents for independent segments.
- If no subagent tool is available, run segments serially and say so.
- Use
scripts/run_segment_tmux.shonly when the project explicitly opts intodispatch.batch_engine: tmux_long_livedandtmux+codexare available. It launches Codex implementation workers; Claude Code remains review-gate only.
Gate Adapter
For every Stage 4 plan, promoted design, fix-plan, and Stage 7 result gate:
- Prefer MCP tool
claude_review_gate. - Fallback:
python3 scripts/review_gate.py --cwd "$PWD" --reviewer claude "<review prompt>" "<artifact-path>"--reviewer claude is not optional here. The stage documents do carry the rule in prose, but their shell blocks stay bare. core/ is shared by both hosts, so its gate examples are written in the Claude Code form — no --reviewer, because there the CLI default (codex) is already the opposite model. Copy one of those blocks unchanged on this host and the default makes Codex review Codex's own work, which is issue #3 in the other direction. On the Codex side the reviewer is always Claude: the MCP tool, or the CLI with --reviewer claude pinned.
Never ask agy after Claude returns a clean content BLOCK:. agy fallback is only for Claude missing, nonzero, timeout, empty, or invalid output.
Halted gate
A halt (.halt, max_block, identical-reason-twice, escalation stall, or a team decision=halt) is terminal for that artifact. The gate prints the full procedure in the halt body; follow it.
- Your only move is to stop and report: artifact path, halt reason, cumulative BLOCK count, the gist of the last finding, what you resolved and what you did not.
RESET/OVERRIDE/PIVOT_RESETandSDP_GATE_OVERRIDEare human-only. Do not use them, and do not offer them to the user as options. There is no gate command that deletes.halt.- Team markers are not consulted after a halt, so preparing or recording one changes nothing.
- When the halt is a scope problem — each round raised a different defect rather than the same one — the sanctioned recovery is a split. Prepare it with the MCP tool
sdp_prepare_split(orpython3 scripts/review_gate.py prepare-split <parent> --split-child <a> --split-child <b> --split-rationale "<why>"), which writes a request file and no gate state. A human records it at a terminal; you never runrecord-split. The parent then answersartifact was split; gate the children, and each child starts its own counter.
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.

