Use when shaping a new specification, or continuing an existing one, through researched question rounds until it is prepared.
Build a specification through rounds of questions in which the user steers the next topic, then synthesize it, link it to its blockers and prepare it; with --continue, resume on an existing specification instead; with --from-todo, start from a ToDo card.
--continue <spec_id> (optional): run the continuation flow on that existing specification, reusing its recorded questions and answers, instead of creating a new one.--from-todo <card_id> (optional): start the mind map from that ToDo card. Its title and description are the subject, the new specification is linked to the card, the card's unanswered open questions are asked before the first round, and the card is closed once the specification is prepared. Free text given with it only adds context that narrows or steers the mind map; it never replaces the subject.--auto-apply (optional): skip the next-action question and apply the specification.--auto-decompose (optional): skip the next-action question and decompose the specification; together with --auto-apply, the decomposed stages are applied too.--continue and --from-todo cannot be combined: if both are given, say so and stop. The auto flags combine freely with either, in any order. The auto flags only change "Next action"; every other question is still asked.
Load methodology.md ### Spec authoring and follow it whenever you write specification content. If both --continue and --from-todo were given, say that they cannot be combined and stop, creating and changing nothing. If --from-todo was given, run "From a ToDo card (--from-todo)"; if --continue was given, run "Continuation (--continue)"; otherwise run "New specification".
atn:spec-placement-researcher, atn:spec-feasibility-analyst and atn:spec-dependency-researcher in parallel (one message, three Agent calls), each given the subject plus any draft title, summary or content the conversation holds.specs_list with topLevel true and ask which one (title and id per option; the user may type an id instead).specs_create: a short working title from the subject, a placeholder summary and content saying the mind map is in progress, status draft, and parentId only if a parent was chosen. Its id is the mind map's id; every round's questions and answers are stored against it as they happen. If the run started from a ToDo card, also pass todoCardId = the card's id, which links the new specification to the card (a failed call is handled as "From a ToDo card (--from-todo)" says).specs_qa_list and synthesize the final title, summary and Markdown content, organized by topic rather than as raw question and answer pairs. When a URL or local path the user mentioned, or WebSearch / WebFetch research, informed a decision, end the content with a ## References section: one bullet per source, verbatim, keeping the user's labels and labelling web sources with what they informed. Never paraphrase, drop or invent a reference.specs_update (id, title, summary, content); the placement was already set at creation.specs_set_status with id = the mind map's id and status prepared.specs_get.hasChildren), warn and ask whether to continue anyway; if not confirmed, stop. This is asked under the auto flags too.atn:spec-feasibility-analyst and atn:spec-dependency-researcher in parallel with the target's title, summary and content. Also give atn:spec-dependency-researcher the target's id and its current blockers (specs_blockers_list), and tell it the target may have descendants, so the target and its whole subtree are excluded.specs_qa_list:specs_qa_list and synthesize title, summary and content:specs_update (id, title, summary, content).specs_set_status with id = the target's id and status prepared, whatever its previous status and however step 8 went.Only a run started with --from-todo reads or changes a ToDo card, and the only changes it ever makes are recording answers to that one card's open questions and closing it: never create, reopen or otherwise move a card, and never add, edit or delete a card question.
todos_get (id = the card id) before anything else.todos_get is not available in the session, say that the installed Athenode tools are too old for --from-todo, ask the user to run npx @athenode/cli init in the project and restart the session, and stop; nothing has been created.todoCardId, no close).title and description are the subject. Free text given with the flag only adds context that narrows or steers the mind map; it never replaces the subject.status and resultingSpecificationId. The card is closed when its status is done or dismissed, and open otherwise; read a resulting specification's status with specs_get.specs_create says there. If that specs_create call fails:resultingSpecificationId is the specification named in the error, carry on with it as the anchor draft; otherwise report that specification's id as an unlinked draft and stop.draft: run "Continuation (--continue)" on that specification; never create a second specification for the card.draft: ask whether to continue, naming the card's status, the specification's title and its status, and saying that continuing prepares the specification again whatever its current status: "Continue the existing specification" / "Stop". This is asked under the auto flags too. To continue, run "Continuation (--continue)" on that specification; to stop, change nothing.questions:answer is null, with the options written in its text. Never ask a question that already has an answer.todos_qa_answer (id = the card id, questionId, answer) as soon as it is given. If the call is refused or fails, keep the answer for the transcript and note the reason for the report.specs_qa_add (specificationId, and the question text as question), then specs_qa_answer with the returned questionId and the answer. Skip a question the transcript already holds with the same text.
A card without questions skips this step.prepared and before the report: call todos_set_status with id = the card id and status done. If the call is refused or fails (a card that is already dismissed cannot be set to done by an agent), note the reason for the report and carry on: a refused or failed close never stops the flow, and the specification stays prepared.Track the topics already covered, starting with the subject. Each round:
specs_qa_add (specificationId, and the question with its options as question), then specs_qa_answer with the returned questionId and the answer.atn:spec-feasibility-analyst again; keep this rare."X is blocked by Y" means Y must be completed before X is implemented. Never ask the user here, and never let this step stop the flow.
atn:spec-dependency-researcher result from the start of the flow. Re-run it on the final title, summary and content (with the id and current blockers) only if the specification's scope, goal or major areas changed radically since.specs_blockers_list.specs_blockers_remove (id, blockerId) for each current blocker the research lists under ### Existing blockers to remove.specs_blockers_add (id, blockerIds with a single id) for each missing blocker under ### Proposed blockers, one link per call.completed, the specification itself, its ancestors and descendants, and links that already exist.--auto-apply and --auto-decompose were given: spawn atn:spec-decomposer with the specification's id and accept its ## Proposed child specifications without confirmation (even if thin or empty). Then invoke atn:decompose with the id and --auto-apply, and pass its report through as is.--auto-decompose was given: do the same, but invoke atn:decompose with the id only; its own questions stay interactive.--auto-apply was given: invoke atn:apply with the id and report its outcome.atn:apply runs unattended, except that it asks about external blockers and, at the end of the run, which out-of-scope items to turn into ToDo cards): invoke atn:apply with the id and report its outcome.atn:spec-decomposer with the id, show its ## Proposed child specifications (titles and one-line scopes) and ask "Yes, create these as drafts" / "No, skip decomposition for now". If confirmed, invoke atn:decompose with the id and report the parent and every finalized child (id and title) from its report; otherwise stop.