epoch-subagent-loop
Skill8 starsChanged 46 days agoMITView on GitHub
Implements a docs epoch series by launching a subagent, reviewing the diff, sending must-fix findings back to that same implementer subagent until the review accepts, then committing and continuing to the next epoch when the series says so. Accepts a finished epoch when the user says it is ready: review it, and if there are remarks stop without marking, archiving, or committing; if there are none, mark it done, move that epoch to the topic archive, then commit. Use when the user asks to implement docs epochs with subagents, a review-fix loop, and a commit between epochs, or to accept an epoch (приёмка, эпоха готова, пометь готовым, в архив).
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/roslyn-mcp-build-sdk.mdcCursor rule
- .cursor/rules/roslyn-mcp-ci.mdcCursor rule
- .cursor/rules/roslyn-mcp-decompile.mdcCursor rule
- .cursor/rules/roslyn-mcp-dev-conventions.mdcCursor rule
- .cursor/rules/roslyn-mcp-docs-agents.mdcCursor rule
- .cursor/rules/roslyn-mcp-docs-lifecycle.mdcCursor rule
- .cursor/rules/roslyn-mcp-github-release.mdcCursor rule
- .cursor/rules/roslyn-mcp-overview.mdcCursor rule
- .cursor/rules/roslyn-mcp-paths.mdcCursor rule
- .cursor/rules/roslyn-mcp-pitfalls.mdcCursor rule
- .cursor/rules/roslyn-mcp-structural-tests.mdcCursor rule
- .cursor/rules/roslyn-mcp-tools.mdcCursor rule
- .cursor/rules/roslyn-mcp-version-bump.mdcCursor rule
- epoch-subagent-loopSkill
- prepare-github-releaseSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Read the series README. Take the first epoch whose status is not done.
- Distinctive: line 28
If the build or tests fail, resume the same implementer (never a new one) with the failure text.
- Very specific: line 31
If must-fix: resume the implementer (the same subagent, never a new one) with that list only, re-run the tests, then a fresh reviewer.
- Distinctive: line 32
Commit only this epoch's files.
- Distinctive: line 33
If the series README lists a later epoch, go back to step 2.
- Distinctive: line 48
Do not commit. Do not start the next epoch.
- Distinctive: line 49
Do not rewrite the epoch spec.
- Distinctive: line 67
No praise, no restating the spec.
- Distinctive: line 71
When the user says an epoch is ready and asks to look:
- Distinctive: line 74
If there is a remark: report it and stop.
- Distinctive: line 75
If there are no remarks:
- Distinctive: line 79
Commit only this epoch's files, as below.
≈ “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
Epoch subagent loop
запуск задачи сабагентом, ревью изменений, если нужны доработки - исправление тем же сабагентом-исполнителем, опять проверка, если нужны доработки - повторить фикс/ревью и так до завершения, потом коммит и следующая эпоха, если указано
Приёмка готовой эпохи: посмотри, если нет замечаний, то пометь готовым и перемести в архив, потом коммить. Если замечания есть — сообщи их и остановись.
The parent orchestrates. It does not implement the epoch itself. One implementer identity per epoch: every fix round resumes that same subagent. Only the reviewer is new each round. User acceptance is a separate path from the loop below: do not launch a subagent to fix remarks unless the user asks.
Order
- Read the series README. Take the first epoch whose status is not done. Do not start the next epoch until the previous one is committed. The series README wins if it says the epochs share files.
- Launch one
generalPurposesubagent (run_in_background: false). The prompt must include the epoch file path, the repo root, and every constraint below. The subagent has no chat history. Record its agent id: steps 4 and 7 resume this same subagent. - Parent runs the build and the tests the epoch names, via Roslyn MCP (
run_dotnet_build,run_specific_test). No shelldotnet build/dotnet test. - If the build or tests fail, resume the same implementer (never a new one) with the failure text. Repeat until green, at most 3 build-fix rounds. Then stop and report.
- Launch a new
generalPurposereviewer (do not resume the implementer). It reads the epoch spec and the diff of files this epoch touched. Pre-existing dirty files are out of scope. - The reviewer returns
ACCEPTor a must-fix list. Nits are not must-fix. Spec violations, missing tests, and behavior bugs are must-fix. - If must-fix: resume the implementer (the same subagent, never a new one) with that list only, re-run the tests, then a fresh reviewer. Repeat until
ACCEPT, at most 4 review rounds. Then stop and report. - Commit only this epoch's files. Do not commit unrelated dirty files. Do not push.
- If the series README lists a later epoch, go back to step 2.
Fix ownership
One implementer per epoch. The subagent launched in step 2 owns every fix round of that epoch: build failures (step 4) and review must-fix (step 7) both resume that subagent, by its id. Never launch a new implementer to apply fixes.
- The reviewer states findings as deltas against the author's model. A fresh agent has to re-derive that intent from the diff, so it treats symptoms, edits adjacent code, or drops what the reviewer asked for.
- A new implementer does not carry the epoch's history: it starts improving around the change, and the next review round flags that drift. The round caps exist to stop exactly this ping-pong.
- Fresh context is for judgment, not for rework: reuse the implementer, replace the reviewer.
Replacing the implementer inside an epoch is an incident, not a round. It is allowed only when that subagent is technically unusable (session lost, hard failure). Then the parent stops the loop and reports; if it continues, the new implementer gets the epoch spec, the full accumulated must-fix history, and the current diff — not just the latest list.
Implementer constraints
- Edit with the IDE. Do not use MCP
apply_patch/update_file_content. - Do not commit. Do not start the next epoch.
- Do not rewrite the epoch spec. A one-line status flip to done is allowed only after the parent says the review accepted.
- Touch only files the epoch lists, plus tests that fail because those files changed.
- Version bump (
Version,AssemblyVersion,FileVersiontogether; notPackageVersion) only after the parent reports a green build, and only when the epoch asks for one. - Return: files changed, what was left unbumped, and anything the parent must measure (catalog byte counts).
Reviewer output
ACCEPTor:
MUST-FIX
- file:line — what is wrong relative to the epoch specNo praise, no restating the spec.
Acceptance
When the user says an epoch is ready and asks to look:
- Review the epoch against its spec and its results file. Run the tests the epoch names, via Roslyn MCP. A remark is a spec miss or a behavior bug. A nit is not a remark.
- If there is a remark: report it and stop. Do not mark the epoch done, do not move files, do not commit.
- If there are no remarks:
- Mark the epoch done in its own file and in the series README.
- Move that epoch's plan and results into
<topic>/_archive/. Later epochs stay on the live shelf. Do not move the whole series todocs/archive/until every epoch is done. - Point the series README,
docs/README.md, and the next epoch's dependency at the archive. Fix relative links inside the moved files. Do not rewrite the spec to match the implementation. - Commit only this epoch's files, as below. Do not push.
Commit
Imperative subject, why rather than what. One epoch per commit. On PowerShell pass the message as a here-string, not a bash heredoc.
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.

