code-execute-staged-plan
Skill309 starsChanged 4 months agoApache-2.0View on GitHub
EXECUTE a staged codebase plan (from code-create-staged-plan or an existing notes/<codebase>/ plan) one stage at a time, gate-by-gate, while keeping the local clone ground truth and a dated agent_logs/ progress log. For each stage: re-read the scope + reconfirm the (drifting) code anchors, make the edit in the LOCAL clone on the feature branch, run the validation gate (flag-off byte-identical FIRST, then behavior-on / parity / GPU smoke on the right SIF/env), commit+push and sync to the cluster (vLLM = build from source, never rsync), update the plan status, and only THEN advance. Log every stage/debug session in agent_logs/YYYY-MM-DD_<topic>.md so long runs don't lose context. Use when the user says "execute/run the plan", "do stage N", or "continue the <X> port/fix".
In this repository50 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-datagen-campaign-summarySkill
- analyze-dataset-token-lengthSkill
- analyze-id-eval-rankingSkill
- analyze-job-history-irisSkill
- analyze-rl-behaviorSkill
- analyze-training-run-irisSkill
- build-tpu-image-irisSkill
- code-create-staged-planSkill
- commitSkill
- crud-archive-runSkill
- crud-otagent-supabaseSkill
- crud-purge-below-gate-evalsSkill
- crud-purge-stale-eval-placeholdersSkill
- datagen-create-task-datasetSkill
- datagen-job-cleanupSkill
- datagen-launch-irisSkill
- datagen-launchSkill
- datagen-reduce-dataset-snapshotsSkill
- datagen-standard-launchSkill
- debugSkill
- docs-deslopSkill
- eval-agentic-cleanupSkill
- eval-agentic-launch-irisSkill
- eval-agentic-launchSkill
- eval-standard-cleanupSkill
- eval-standard-launchSkill
- file-issueSkill
- monitor-cron-sweep-irisSkill
- monitor-cron-sweepSkill
- monitor-job-tablesSkill
- monitor-restore-irisSkill
- monitor-restoreSkill
- monitor-restore-unifiedSkill
- rl-agentic-job-cleanupSkill
- rl-agentic-launch-irisSkill
- rl-agentic-launch-jupiterSkill
- rl-job-health-deep-diveSkill
- rl-standard-job-cleanupSkill
- rl-standard-launch-leonardoSkill
- serve-model-vibe-testSkill
- sft-cleanup-hf-onlySkill
- sft-job-cleanupSkill
- sft-launchSkill
- supervisor-initSkill
- utils-cleanup-stale-sandboxesSkill
- utils-fix-permissionsSkill
- utils-reclaim-stale-snapshotsSkill
- write-testsSkill
- writing-styleSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Run a staged plan one stage, gate, and commit at a time.
- Very specific: line 32
Record results: update the stage scope and parent status (Stage N ✅ DONE — commit <sha>, gate <result>).
- Very specific: line 44
When the final stage is green, mark the parent plan DONE with the commit range and headline gate, ensure the canonical branch and clusters …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
code-execute-staged-plan
Run a staged plan one stage, gate, and commit at a time. Keep the plan in notes/<codebase>/ and a dated
progress log in agent_logs/.
Inputs
- The plan:
notes/<codebase>/{README.md | <change>_plan.md}+ the per-stagestage<N>_<slug>_scope.md. Read the parent (goal + invariants + stage map) and the current stage's scope doc. - The progress log: a dated
agent_logs/YYYY-MM-DD_<topic>.md— the running record for this change. If one exists for the change, append; else create it.
Per-stage loop
- Re-read the stage scope + RECONFIRM anchors. The borrow-map line/file anchors drift — grep/open the real files now; don't trust line numbers from the plan's authoring date.
- Edit the local feature branch. The clones are under
~/Documents/; never hand-edit or patch-by-rsync a cluster. Keep the diff minimal. - Run the validation gate, in order:
- Flag-off byte-identical first — prove the change is a no-op when its flag is off (
torch.equal/ golden test / the EP-CP no-op test pattern). - Behavior-on / parity — the stage's GO condition (e.g.
dcp=N==dcp=1greedy bit-identical + logprobs allclose at the bf16 floor tol — don't loosen tol to pass). - GPU smoke where needed via
sbatchon the correct SIF/env (.agents/ops/<cluster>/ENVIRONMENT_MAP.md; torch selects the runtime). - Lint/syntax via
mcp__ide__getDiagnostics, notpy_compile.
- Flag-off byte-identical first — prove the change is a no-op when its flag is off (
- Commit, push, and sync. One descriptive commit per stage/logical unit.
git pullthe editable Python repos on the cluster; build vLLM from the committed source. Verify the cluster clone is at the pushed commit and clean. - Record results: update the stage scope and parent status (
Stage N ✅ DONE — commit <sha>, gate <result>); append what changed, commit, gate numbers, blocker, and next step toagent_logs/. - Advance only on GREEN. A red/ambiguous gate stops the loop — diagnose (dispatch an investigative subagent if it's deep), log it, fix, re-gate. Don't paper over a failing parity gate.
Progress-log discipline (agent_logs/)
- One dated file per change/debug thread (
YYYY-MM-DD_<topic>.md); append across stages and sessions. - Capture: the hypothesis, what was tried, commit SHAs, gate results (with numbers), what was ruled out, and the current blocker + next action. Future-you (or a fresh subagent) should be able to resume from the log alone.
- This log is ALSO the per-change failure/remediation record the cron sweep references for genuine FAILED jobs.
Subagents (for parallel stages / deep investigations)
Dispatch with: edit local → commit/push → sync; secrets via env vars only (source "$DC_AGENT_SECRET_ENV"); reconfirm anchors; run and report the gate. Verify the gate claim before marking a stage DONE.
On completion
When the final stage is green, mark the parent plan DONE with the commit range and headline gate, ensure the canonical branch and clusters are current, and write the closing agent_logs/ entry. Note concrete follow-ups.
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.

