atn-mindmap
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.
Arguments
- A subject (optional, free text): what the new specification is about.
--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.
Flow
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".
New specification
- Take the subject from the invocation or the conversation; otherwise ask for it as an open question.
- Spawn
spec-placement-researcher,spec-feasibility-analystandspec-dependency-researcherin parallel (one message, threeAgentcalls), each given the subject plus any draft title, summary or content the conversation holds.- Ask about the placement recommendation: "Yes, place it there" / "No, top-level instead" / "Let me specify a different parent". For a different parent, call
specs_listwithtopLeveltrueand ask which one (title and id per option; the user may type an id instead). - Keep the feasibility findings for round 1 and the dependency research for the link reconciliation.
- Ask about the placement recommendation: "Yes, place it there" / "No, top-level instead" / "Let me specify a different parent". For a different parent, call
- Create an anchor draft with
specs_create: a short workingtitlefrom the subject, a placeholdersummaryandcontentsaying the mind map is in progress,statusdraft, andparentIdonly 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 passtodoCardId= 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). - Run the rounds (see "Rounds").
- Read the full transcript with
specs_qa_listand synthesize the finaltitle,summaryand Markdowncontent, organized by topic rather than as raw question and answer pairs. When a URL or local path the user mentioned, orWebSearch/WebFetchresearch, informed a decision, end the content with a## Referencessection: 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. - Save it with
specs_update(id,title,summary,content); the placement was already set at creation. - Reconcile blocked-by links for the mind map's id (see "Reconciling blocked-by links"), also skipping the chosen parent and its whole ancestor chain, since the early research ran before the placement was known.
- Call
specs_set_statuswithid= the mind map's id andstatusprepared. - If the run started from a ToDo card, close the card (see "From a ToDo card (--from-todo)").
- Give the report (see "## Report"), then continue with "Next action".
Continuation (--continue)
- Read the target with
specs_get.- If the call fails, say the id is invalid and ask whether to give a corrected id or start a new specification instead (then run "New specification").
- If it has children (
hasChildren), warn and ask whether to continue anyway; if not confirmed, stop. This is asked under the auto flags too.
- Keep the target's placement: no placement research, no anchor draft, no re-parenting.
- Spawn
spec-feasibility-analystandspec-dependency-researcherin parallel with the target's title, summary and content. Also givespec-dependency-researcherthe 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. - Read the recorded questions with
specs_qa_list:- If there are none, derive the subject from the target's title, summary and content, as for a first round.
- Otherwise ask, as an open question, to confirm or clarify the subject, and infer the topics already covered from the transcript.
- Run the rounds against the target's id (see "Rounds"), leaving its status unchanged until the end.
- Read the full transcript again with
specs_qa_listand synthesizetitle,summaryandcontent:- If this session materially changed the specification's logic or direction, rewrite it from scratch.
- Otherwise keep the existing content as the base and merge the new material into it.
- Save it with
specs_update(id,title,summary,content). - Reconcile blocked-by links for the target (see "Reconciling blocked-by links"), also skipping its descendants.
- Call
specs_set_statuswithid= the target's id andstatusprepared, whatever its previous status and however step 8 went. - If the run started from a ToDo card, close the card (see "From a ToDo card (--from-todo)").
- Give the report (see "## Report"), then continue with "Next action".
From a ToDo card (--from-todo)
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.
- Read the card with
todos_get(id= the card id) before anything else.- If
todos_getis not available in the session, say that the installed Athenode tools are too old for--from-todo, ask the user to runnpx @athenode/cli initin the project and restart the session, and stop; nothing has been created. - If the call fails, say the card id is invalid and ask whether to give a corrected card id or start a new specification instead (then run "New specification" without a card: no
todoCardId, no close).
- If
- The card's
titleanddescriptionare the subject. Free text given with the flag only adds context that narrows or steers the mind map; it never replaces the subject. - Choose the path from the card's
statusandresultingSpecificationId. The card is closed when itsstatusisdoneordismissed, and open otherwise; read a resulting specification'sstatuswithspecs_get.- Closed card, no resulting specification: create nothing, tell the user to reopen the card in the ToDo tab first, and stop.
- Open card, no resulting specification: run "New specification" with the card's subject, creating the anchor draft with the card's id as
specs_createsays there. If thatspecs_createcall fails:- If it is rejected because the card already has a resulting specification (a conflict), read the card again and take the path that now applies.
- If the error says the specification was created but its link to the card was not recorded or could not be confirmed, read the card again: if its
resultingSpecificationIdis 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. - For any other failure, report it and stop.
- Open card, resulting specification in
draft: run "Continuation (--continue)" on that specification; never create a second specification for the card. - Closed card with a resulting specification, or a resulting specification past
draft: ask whether to continue, naming the card'sstatus, the specification's title and itsstatus, 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.
- Before the first round of "Rounds", once the specification the run works on exists (the anchor draft, or the continued specification), deal with the card's open questions, which the card read in step 1 carries in
questions:- Ask every question whose
answeris null, with the options written in its text. Never ask a question that already has an answer. - Record each answer on the card with
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. - Copy every question of the card, those answered earlier included, with its answer into the specification's transcript, so the synthesis sees them:
specs_qa_add(specificationId, and the question text asquestion), thenspecs_qa_answerwith the returnedquestionIdand theanswer. Skip a question the transcript already holds with the same text. A card without questions skips this step.
- Ask every question whose
- Close the card right after the specification is set
preparedand before the report: calltodos_set_statuswithid= the card id andstatusdone. If the call is refused or fails (a card that is alreadydismissedcannot be set todoneby an agent), note the reason for the report and carry on: a refused or failed close never stops the flow, and the specification staysprepared.
Rounds
Track the topics already covered, starting with the subject. Each round:
- Draft 3 to 8 questions on the current topic (scope, constraints, edge cases, users, integration points, non-goals and similar), as many as the topic warrants, informed by the subject, the feasibility findings so far and every earlier answer. Give each 2–5 distinct options.
- Ask them.
- Store each answered pair right away:
specs_qa_add(specificationId, and the question with its options asquestion), thenspecs_qa_answerwith the returnedquestionIdand theanswer. - Only if an answer ties the specification to an existing system, or a topic hinges on a technical constraint you can't judge, spawn
spec-feasibility-analystagain; keep this rare. - Ask for the next topic with exactly four options: three new candidate topics that aren't covered yet, and "Finish the mind map".
- If the user finishes, leave the rounds.
- Otherwise add the chosen topic to the covered topics and run the next round on it.
Reconciling blocked-by links
"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.
- Use the
spec-dependency-researcherresult 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. - Only set this specification's own blockers; never make another specification blocked by it.
- Read the current links with
specs_blockers_list. - Remove first: call
specs_blockers_remove(id,blockerId) for each current blocker the research lists under### Existing blockers to remove. - Then call
specs_blockers_add(id,blockerIdswith a single id) for each missing blocker under### Proposed blockers, one link per call. - Skip, without a call, blockers that are
completed, the specification itself, its ancestors and descendants, and links that already exist. - If a call is rejected (a 400 or 409, a cycle included) or the researcher run failed, record the link as skipped with the reason and carry on.
Next action
- If both
--auto-applyand--auto-decomposewere given: spawnspec-decomposerwith the specification's id and accept its## Proposed child specificationswithout confirmation (even if thin or empty). Then invokeatn-decomposewith the id and--auto-apply, and pass its report through as is. - Else, if only
--auto-decomposewas given: do the same, but invokeatn-decomposewith the id only; its own questions stay interactive. - Else, if only
--auto-applywas given: invokeatn-applywith the id and report its outcome. - Otherwise ask what to do next:
- Apply now (
atn-applyruns 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): invokeatn-applywith the id and report its outcome. - Decompose into stages: spawn
spec-decomposerwith 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, invokeatn-decomposewith the id and report the parent and every finalized child (id and title) from its report; otherwise stop. - Nothing else: stop.
- Apply now (
Report
- The specification's id, always stated explicitly.
- The blocked-by links added, removed and skipped, each skipped link with its reason.
- In a run started from a ToDo card: the card's id and whether it was closed, or why the close was refused or failed, plus the card questions asked and every answer that could not be stored on the card.
- The outcome of any skill invoked in "Next action".
SKILL.md
SKILL.md holds the skill's instructions; it is edited on the Instructions tab.
Frontmatter written into each target's SKILL.md.
Common
No fields set for this target.