Specifications and the specification tree
A specification is one described piece of work, with a title, a summary, Markdown content, a status and its own questions and answers. Each project keeps its specifications in one tree, and your AI coding agent implements the work from that tree.
Writing the work down before any code exists is the core of spec-driven development (SDD). In Athenode your AI agent asks you questions, writes the specification from your answers and later reads it when it implements the work. You can also write and edit a specification by hand in the web UI.
What a specification holds
| Part | What it is | Who writes it |
|---|---|---|
| Title | The name shown in the tree. Required | You or your agent |
| Summary | A short statement of what the specification is for | You or your agent |
| Content | The full description, in Markdown | You or your agent |
| Status | Draft, Prepared, Processing or Completed | You or your agent |
| Parent | The specification it sits under. A top-level specification has none | You or your agent |
| Blockers | The specifications that are finished before this one is implemented | Your agent, or you |
| Questions and answers | The clarifying questions about the specification and the answers to them | Your agent asks and you answer. You can ask too |
| Implementation plan | How the agent intends to build a leaf specification in your codebase | Your agent, or you |
| Id | The identifier you pass to a skill, such as /atn:apply <spec-id> |
Athenode |
The title, the summary, the content and the implementation plan can be of any length, and a project can hold any number of specifications.
Athenode keeps a specification with its questions, answers, implementation plan, blockers and status. It does not keep your code, the changes an agent made or the name of the AI tool that did the work.
How the specification tree is built
The specification tree is the hierarchy of a project's specifications. Any specification can have sub-specifications, to any depth. A project has one tree, and a specification with no parent is a top-level specification.
The tree describes a product at several levels at once. The top says what the product is, the levels below say what each part does, and the bottom holds work small enough to implement. A web shop might look like this:
- Web shop
- Product catalogue
- Checkout flow
- Cart
- Payment
- Shipping
- Customer accounts
"Checkout flow" records the decisions that hold for the whole checkout, such as which countries the shop delivers to. "Cart", "Payment" and "Shipping" each describe one part of it. Your agent reads a sub-specification together with the specifications above it, so a decision written once in "Checkout flow" applies to all three.
Branches do not have to be equally deep. "Product catalogue" can stay a single specification while "Payment" gets sub-specifications of its own for card payments and refunds. Any specification can get sub-specifications at any time, whatever its status. Moving a specification to another parent takes its whole subtree with it.
Sub-specifications are listed in the order they were created. The tree has no manual ordering, because the order of the work comes from the blockers.
Leaf specifications
A leaf specification is a specification with no sub-specifications. Leaves are what an AI agent implements. In the web shop, "Product catalogue", "Cart", "Payment", "Shipping" and "Customer accounts" are leaves, and "Web shop" and "Checkout flow" are not. The Orbit view of the web UI calls a leaf a deliverable and counts progress in deliverables.
When "Payment" gets a sub-specification, it stops being a leaf, and the work moves to the specifications below it.
A good leaf is a task an agent can finish in one go and that you can review as one change. When a leaf covers more than that, decompose it. To decompose a specification is to break it down into one level of stages, each a sub-specification of its own. The /atn:decompose skill does this with you.
Only a leaf has an implementation plan. The work of a specification with sub-specifications is the work of the leaves below it.
The four statuses of a specification
The status says where a specification is on its way from an idea to code.
| Status | Meaning | Value for agents |
|---|---|---|
| Draft | The specification is being shaped. Its content may be incomplete | draft |
| Prepared | The specification is finished and ready to be decomposed or implemented | prepared |
| Processing | An agent is planning or implementing it | processing |
| Completed | It is implemented, and reviewed when your workflow settings include a review | completed |
A specification you create in the web UI starts as a Draft unless you choose another status. The skills move a specification on from there:
- A mind map creates a Draft before the first question, so that every answer is stored as you give it, and sets the specification to Prepared when it is written. A mind map is a session in which your AI agent asks rounds of questions and turns your answers into a specification. Continuing a mind map on an existing specification sets it to Prepared at the end, whatever its status was before.
- A decomposition creates each stage as a Draft and sets it to Prepared once its questions are answered and the stage is rewritten from them.
- An apply run sets the specification you gave it to Processing, each leaf to Processing when it plans it and each leaf to Completed when it is done. To apply a specification is to have your AI agent plan and implement each leaf under it, in the order the blockers allow, with tests, review and git handled as your workflow settings say.
During an apply run, a parent turns Completed when everything below it is Completed, and the specification the run started from turns Completed when every leaf of the run did. A leaf that the run planned and did not finish stays Processing, and so does the specification the run started from, so the tree shows where a run stopped short. A leaf the run skipped before planning keeps its status. Running /atn:apply again takes up the leaves that are Prepared or Processing. A Draft leaf is left out of a run and keeps its parent from turning Completed.
You can set any status yourself, from any other, in the web UI or through your agent. Setting a Completed specification back to Prepared, for example, makes it available to an apply run again. A blocker does not stop you from changing a status. Setting the last open leaf to Completed by hand leaves its parent's status as it is, so set the parent as well.
Blockers and the order of work
A blocker is a dependency between two specifications: a specification that is blocked by another is implemented after it. If "Payment" is blocked by "Cart", an apply run implements "Cart" first.
Each specification shows both directions of its own links. "Blocked by" lists what it waits for, and "Blocks" lists what waits for it.
Sub-specifications inherit the blockers of the specifications above them. If "Checkout flow" is blocked by "Customer accounts", then "Cart", "Payment" and "Shipping" all wait for "Customer accounts", and you set the blocker once, on "Checkout flow". An inherited blocker is changed on the specification that holds it.
Your agent sets most blockers for you. During a mind map it researches which existing specifications the new one depends on, overlaps or conflicts with, and adds the blockers it found when it writes the specification. A decomposition does the same for each stage, including the order between the stages. Both skills list the blockers they added, removed and skipped in their report. You can change any of them afterwards.
A blocker has to satisfy these rules:
- It is another specification of the same project.
- It is not above or below the blocked specification in the tree.
- It is not Completed at the moment you add it.
- It does not repeat an existing blocker.
- It does not create a cycle, in which specifications would wait for each other directly or through others.
The same rules apply when you move a specification. A move is refused when the new place would put a specification under its own descendant, would put two linked specifications above and below each other, or would close a cycle. Remove the links that the refusal names, then move the specification.
Blockers decide the order of an apply run and do not limit which status you can set. When a leaf waits for a specification outside the part of the tree you are applying, the run offers "Stop" and "Run only the leaves not blocked by external blockers". When the blockers under the specification form a cycle, the run stops before it changes anything. A blocker that becomes Completed stays in the list and stops holding the specification back.
Questions and answers of a specification
The questions and answers of a specification are the record of what was asked about it and what you decided. Each entry holds one question, with the options that were offered, and its answer.
They are recorded while you work, and the specification is written afterwards from all of them. During a mind map, every round of questions is stored on the specification as soon as you answer it. During a decomposition, each stage gets its own questions, and your answers are stored on that stage. You can answer in your AI tool or on the Questions tab of the specification in the web UI, and the agent continues once a question is answered.
A question offers its options in a fixed format. A line - A) … is an option of a single choice, - [ ] A) … an option of a multiple choice, and (Recommended) after an option marks the one the agent recommends. A question without such lines is answered in free text. Every answer can add free text in Markdown.
The record keeps every decision traceable. Six weeks after "Payment" was implemented, you can open it and read that you chose to keep the cart when a card is declined, and which alternatives you turned down. The agents use the record too. When you continue a mind map on an existing specification, the agent reads the earlier questions and answers and goes on from the topics they cover.
An answered question is locked in the web UI. Your agent can record a new answer to it, which replaces the old one. A question is not edited or deleted.
The implementation plan
The implementation plan is what an agent records for a leaf specification before it implements it. It says how the agent intends to build the leaf in your codebase.
An apply run writes one plan per leaf. For each leaf, the agent first checks the specification against your code and records the plan, then implements it, then reviews it as your workflow settings say. Planning a leaf again replaces its plan. You can read the plan on the Plan tab of the leaf while the run works on it and at any time afterwards, and you can write, edit or clear it there yourself.
If the agent finds that a leaf cannot be implemented as it is written, it records no plan. The run offers "Provide a resolution", "Skip this leaf" and "Stop the run".
Search in the specification tree
Search finds specifications by the words of their title, summary and content, including parts of words. A search for "refund" finds "Refunds for card payments".
In the web UI, the search box of the Specifications page shows up to 20 matches, best matches first, together with the specifications above them in the tree. Your agent's search returns up to 50 matches. On an Athenode Pro server whose administrator turned on search by meaning, search also finds specifications that describe the same thing in other words. Configure Athenode Pro says how an administrator turns it on.
A specification from first question to finished code
Take the checkout of the web shop. You run /atn:mindmap and describe it. The agent proposes to place the new specification under "Web shop", and "Checkout flow" appears in the tree as a Draft. You answer three rounds of questions about the cart, payment methods and delivery. Each answer is stored on the specification. The agent then writes the content, adds "Customer accounts" as a blocker because the checkout needs a signed-in customer, and sets "Checkout flow" to Prepared.
"Checkout flow" is too large for one task, so you decompose it. The stages "Cart", "Payment" and "Shipping" appear below it as Drafts. You answer the questions of each stage. The agent rewrites the three stages, marks "Payment" as blocked by "Cart" and "Shipping" as blocked by "Payment", and sets them to Prepared.
You run /atn:apply on "Checkout flow". The run reports that "Customer accounts", which is outside "Checkout flow", blocks all three leaves, and you choose "Stop". After "Customer accounts" is Completed, you run it again. "Checkout flow" turns Processing, then "Cart" turns Processing, a plan appears on its Plan tab, and "Cart" turns Completed. "Payment" and "Shipping" follow in that order, and "Checkout flow" turns Completed after the last of them.
A month later you want refunds. You continue the mind map on "Payment" or add a sub-specification below it, and the same sequence starts on that part of the tree.
Where you work with specifications
- In the web UI of the athenode daemon or of your Pro server, on the Specifications page of a project, you browse the tree in the Tree and Orbit views, search it, create, edit, move and delete specifications, change statuses, manage blockers, edit plans and ask and answer questions. Specifications in the web UI describes each task. The page shows every change as it happens, including the changes your agent makes.
- In your AI tool, the skills create and change specifications for you. The Athenode workflow describes them in the order you meet them.
- Through the Athenode MCP server, your agent reads and changes specifications with the
specs_*tools.
Who can change a specification
On the local daemon, you and your AI agents can do everything with the specifications of your projects. On Athenode Pro, a project's viewers read its specifications, its editors also change them, and its owners also delete them. An AI agent acts with the role of the account it signed in with. Project roles lists every permission.
Deleting a specification deletes every specification below it, with their questions, answers and plans. A ToDo card linked to a deleted specification is kept and loses the link.