Use when the project's open ToDo cards should be worked through one by one, each turned into a specification or carried out directly, reviewed, committed and delivered.
Work through the project's open ToDo cards one by one: for each card the user chooses between a specification (the mind map), direct execution without a specification, skipping, dismissing and stopping; a card carried out directly is implemented, reviewed, committed, closed and delivered. With --auto the questions are asked once at the start of the run, and every card that needs no answer from the user is then carried out directly.
--type <type> (optional; several values separated by commas): only cards of these types (bug, tech-debt, follow-up, idea).--priority <priority> (optional; several values separated by commas): only cards of these priorities (high, medium, low).--auto (optional, in any position): a flag without a value. The run asks its two git questions once at the start and then handles every card without a further question (see "Auto mode").Card ids and filters combine: a card is taken only when it matches all of them. --auto combines freely with card ids, --type and --priority: those still define the queue, and --auto only changes how the queue is processed. If a type or priority value is not one of those listed, say so with the valid values and stop before reading any card.
## Sub-projects table of settings/SETTINGS.md, kept only where git -C <path> rev-parse --show-toplevel succeeds and deduplicated by that toplevel.gitflow.md of the sub-project whose repository path is the longest path/ prefix of (or equal to) its path, else the root settings/gitflow.md. This skill reads only its ## Parameters (base_branch, branch_name_template, commit_message_template) and its ## Custom section; the subsections written for apply runs (### Apply start, ### Leaf done, ### Review approved, ### Apply end) do not drive this skill. A missing file or parameter falls back to main, feature/<slug> and <type>(<scope>): <summary> [spec <spec_id>].base_branch of its own gitflow.md.git -C <repo> status --porcelain in every repository, taken right before the card is executed. The card's files are the paths that git -C <repo> status --porcelain reports as changed or new compared with that baseline, made relative to the project root, plus the files outside every repository that atn:todo-implementer reports. Recompute the set after every atn:todo-implementer return, keeping the paths found earlier; a path already dirty at the baseline is not the card's. Files outside every repository are never staged.This skill is the only actor that runs state-changing git commands; the subagents never do. It reads only settings that exist: review_mode and auto_fix_attempts from the ## Parameters of the root settings/code-review.md, the gitflow.md parameters named above, and, through the subagents, the ### Implementation, ### Review and ### Findings subsections. Ask every question in the project's question format, recommended option first. Questions are asked in the interactive mode (a run without --auto) and, with --auto, only at the start of the run (see "Auto mode"). Each of those questions needs the user: without a user to ask, change nothing and stop with a report saying so. Tell every subagent that no user is available, that it never runs git and that it never creates a ToDo card, and pass the user's answers as ground truth.
settings/code-review.md and each repository's gitflow.md.--auto, run "Auto mode" instead: its start once, then its handling of each card.todos_list with status open: only open cards are ever taken. If todos_list is not available in the session, say that the installed Athenode tools are too old for this skill, ask the user to run npx @athenode/cli init in the project and restart the session, and stop.todos_get and record it for the report as closed (with its status) or as not found.high through medium to low; within a priority by type, in the order bug, tech-debt, follow-up, idea; within a type by createdAt, the oldest card first.atn:apply run inside the specification path.This subsection is the interactive mode. With --auto no card is shown or asked about: each one is handled as "Auto mode" says.
todos_get (id = the card id), since it may have changed since it was listed. If it is no longer open, record that and go on with the next card.resultingSpecificationId, read that specification with specs_get and add a note naming it (title, id and status).todos_set_status with id = the card id and status dismissed. If the call is refused or fails, record the reason and go on.atn:mindmap with --from-todo <card_id> and nothing else. The mind map asks the card's unanswered questions first, creates the specification linked to the card or continues the linked one, closes the card itself once the specification is prepared, then asks its usual next-action question (apply, decompose or nothing) and carries the answer out.todos_set_status call for it.todos_qa_answer (id = the card id, questionId, answer) as soon as it is given. Never ask a question that already has an answer. If a todos_qa_answer call is refused or fails, keep the answer for the executor and note the reason for the report.--auto, ask neither question here: the answer given at the start of the run applies to every card. Then, in every one of the run's repositories:git -C <repo> switch -c <name> <main branch>. <name> is the root gitflow.md's branch_name_template with <slug> taken from the card's title (lowercase, every run of characters outside [a-z0-9] replaced by -, trimmed, at most 50 characters), and it is the same name in every repository; if the name is taken, add the first free suffix (-2, -3, …) and use that name everywhere.git -C <repo> switch <main branch> where the repository is on another branch.
If git refuses to create or switch a branch (uncommitted changes in the way, a missing main branch), run no further git command there, say why and ask: Work on the current branch in that repository, Skip this card or Stop. With --auto, do not ask: the card is skipped (see "Auto mode").atn:todo-implementer in the foreground with the card: its id, title, description, type and priority, and every question with its answer. There is no planning step and no recorded plan. If its report holds a BLOCKED or a TEST FAILURE block, run "Failures".review_mode is none, or the root settings/code-review.md is missing, skip the review. Otherwise spawn atn:todo-reviewer in the foreground with the card, its questions and answers, and the card's files. It reviews as settings/code-review.md says (its enabled check groups in ### Review and its ## Custom rules), checking conformance against the card and its answers instead of a specification.APPROVED: the review has passed.needs-decision: show the reviewer's proposed change and ask Apply the proposed change or Drop this finding (the user may type another resolution); the answer goes to the executor as ground truth, and a dropped finding is closed. With --auto, do not ask: the card has failed (see "Auto mode").atn:todo-implementer via SendMessage with the findings (or spawn a new one with the card and the findings), recompute the card's files, then resume the same atn:todo-reviewer (or spawn a new one) to review again from scratch. A TEST FAILURE block stays an open finding. Run at most auto_fix_attempts rounds (3 when the parameter is missing) and stop as soon as the review has passed.git -C <repo> add -- <path>... (a deleted path stages its deletion). Never git add -A or git add ..git -C <repo> diff --cached --quiet succeeds), make no commit there. Otherwise run git -C <repo> commit -m "<subject>".commit_message_template, with [todo <card_id>] in place of [spec <spec_id>] (append [todo <card_id>] when the template has no such marker): <type> is fix for a bug card, refactor, docs, test or chore when clearly applicable, and feat otherwise; <scope> is the sub-project's settings folder name or the repository's directory name, and may be empty (then drop the parentheses); <summary> is the card's title, starting lowercase, without a trailing period; <card_id> is the card id.git -C <repo> branch -D <name>), and set the card to done: todos_set_status with id = the card id and status done. A refused or failed close is recorded for the report and never undoes a commit.--auto, do not ask: the delivery chosen at the start of the run applies to every card. Carry the answer out in every repository the card touched:git -C <repo> push -u origin <current branch>.glab when git -C <repo> remote get-url origin contains gitlab, otherwise with gh, unless the ## Custom section of the repository's gitflow.md names another way. If no tool is available or authenticated, keep the pushed branch and record why.done.In every repository the card touched, with <branch> the branch the card was committed on:
git -C <repo> switch <main branch>, record its commit, and run git -C <repo> fetch origin <main branch>. If the local main branch is behind origin/<main branch>, fast-forward it with git -C <repo> merge --ff-only origin/<main branch>.git -C <repo> merge --no-edit <branch>.git -C <repo> push origin <main branch>.git -C <repo> branch -d <branch>. A branch that was not created for the card (the user chose the current branch) is merged the same way but never deleted.origin/<main branch> (the fast-forward fails), the merge conflicts, or the push is rejected (for example by a protected branch): abort a merge in progress with git -C <repo> merge --abort, set the local main branch back to the recorded commit with git -C <repo> reset --keep <recorded commit>, and switch back to <branch>, which is kept. Report the reason and ask, for that repository: Push the branch, Push and open a merge request or Leave the commits local. With --auto, do not ask: fall back as "Auto mode" says.One answer covers every repository the card touched, for the branch and for the delivery alike. A new branch gets the same name in each of them, each repository uses its own main branch from its own gitflow.md, and the commit and the delivery are carried out in each of them. A failure in one repository is recorded for it and never stops the others.
Direct execution has failed when the executor returned a BLOCKED block (it could not do the work), tests still fail (a TEST FAILURE block), the review has not passed after the last fix round, or a commit failed. This subsection is the interactive mode; with --auto a failed card is handled as "Auto mode" says, with no question. The card stays open and the changes are left untouched in the working tree. Show the reason and ask, with four options:
atn:todo-implementer via SendMessage with the guidance as ground truth (or spawn a new one with the card, the guidance and a summary of what failed), then continue from the review step and handle its result the same way.git -C <repo> restore --staged --worktree -- <path>... and delete the files the card created; never touch a path that was already dirty at the baseline. Then remove a card branch created for this card (switch back to the original branch and delete it with git -C <repo> branch -D <name>). Files outside every repository cannot be rolled back with git: list them.Record the card as failed, with the reason and the answer chosen. It is not offered again in this run.
With --auto the run asks its questions once, at the start, and then handles every card of the queue without a question. Whatever this subsection does not change works as the subsections above say.
Start of the run. Once, after the queue is built and before any card is handled:
git -C <repo> status --porcelain reports paths), so that the user can abort before answering. If the queue is empty, ask nothing and give the report.Each card. Read the card again with todos_get, as step 1 of "Per card" says, then handle it without a question, at most once per run:
| Card | Outcome |
|---|---|
| Has at least one unanswered open question | Skipped; the card stays open. The question is not asked and no answer is stored. |
Has a linked specification (resultingSpecificationId) |
Skipped; the card stays open. No mind map is run. |
| Any other card | Carried out with steps 2 to 6 of "Direct path", however large it is, with the two answers given at the start. |
A card is never dismissed, and no card stops the run: the executor returning BLOCKED and the review are the only brake.
Outcomes where the interactive mode would ask.
| Situation | Outcome |
|---|---|
| Git refuses to create or switch the branch for a card | Skip the card: put every repository back on the branch it was on, delete a card branch already created for this card, record the reason and go on with the next card. |
The review returns a finding marked needs-decision |
The card has failed; the finding is part of the reason. |
The card has failed: the executor returned a BLOCKED block, tests still fail, the review has not passed after the last fix round, or a commit failed |
Roll back this card's changes only (see "Rollback" below), leave the card open, record the reason and go on with the next card. |
| Merge straight into the main branch was chosen and the merge or its push fails | Undo the merge as step 5 of "Merging straight into the main branch" says, then push the card's branch and open a merge request into the main branch. If that fails too, the commits stay local. The card stays done either way, and the report says how the delivery ended. |
Rollback. Undo exactly the card's files in every repository it touched, the way the roll-back option of "Failures" does, and nothing else: never touch a path that was already dirty at the baseline, so the uncommitted changes that were in the working tree before the card started stay as they were. Then put every repository back on the branch the card started from and delete a card branch created for this card, unless it holds a commit of the card, which is kept and reported. The next card starts from the state this card started from. Files outside every repository cannot be rolled back with git: list them.
Queue. The queue is read again as "Queue" says, so cards that appear during the run are picked up. Cards carried out, skipped and failed all count as handled and are never taken again, so the run always ends: it ends when a re-read brings no new card.
--auto: the two answers given at the start, and every handled card as carried out (its commits and how they were delivered, including a merge that fell back to a merge request or to local commits), skipped (the reason: unanswered open questions, a linked specification, or git refused the branch) or failed and rolled back (the reason, including any needs-decision finding).