Specs¶
A spec describes one change to your application, and the plan to make it. It says why the change is needed (an overview, goals, actors and user stories), what it must do (requirements and acceptance criteria), and how the work is done (tasks, in order).
Unlike the other models, a spec does not generate any code. It is there to plan and track the work, for people and for AI agents. An agent can read an approved spec, pick its next task, implement it in the other models, and record what it did, task by task.
Specs and policies
A spec is finished when its work is done. The rules your application must always keep belong in policies and unit tests, which a spec can point to as the things that verify its requirements.
Create a spec¶
Choose Spec in the Add new item window and give the model a name.
The editor has four views, which you switch between with the buttons at the bottom:
| View | What it shows |
|---|---|
| Spec | The definition of the spec, its description, actors and open questions |
| Stories | The user stories, with their count |
| Requirements | The requirements, each with its acceptance criteria, what verifies it and the tasks that implement it |
| Tasks | The plan, with how many tasks are done out of the total |
The toolbar has Info, Save, Undo, Redo and Validate.
Spec¶
Definition¶
| Property | Description |
|---|---|
| Title | The name of the change for people, e.g. Second approval of large orders |
| Reference | An optional reference, e.g. SPEC-001 |
| Owner | Who is accountable for the spec: a person, a role or a team |
| Status | Where the spec is in its life. See Statuses |
| Tags | Comma-separated tags |
| Progress | How many tasks are done, read only |
Description¶
| Property | Description |
|---|---|
| Overview | What the change is and why, in Markdown |
| Goals | What the change must achieve, one per line |
| Out of scope | What the change does not cover, one per line |
Actors¶
The people, or systems, the spec is for or involves. Each actor has a Name, a Description and, optionally, the Security role it has in the application.
Open questions¶
Questions that still need an answer, each with its Answer and whether it is Resolved. A spec that is approved while it still has open questions gets a warning.
Stories¶
User stories in the usual form: As a (one of the spec's actors), I want ..., So that .... Each story has a Priority: Must, Should or Could.
Requirements¶
The list on the left shows the requirements. Select one to edit it on the right. Each requirement is one testable need of the change, e.g. Orders over 10,000 need a second approval.
| Property | Description |
|---|---|
| Requirement | The text of the requirement |
| Category | Functional, Data, UI, Integration, Security, Non-functional, Constraint or Architecture |
| Priority | Must, Should or Could |
| Status | Proposed, Active or Removed |
| User stories it serves | The stories the requirement comes from |
| Concepts | The concepts of the application it is about, comma separated |
| Verified by | The policies and unit tests that verify the application meets it. Pick a Kind (Policy or Unit test), the Model, and optionally one check or test of it |
| Acceptance criteria | The criteria that show the requirement is met, e.g. Given ..., when ..., then .... Each criterion can have its own Verified by |
| Implemented by | The tasks that implement the requirement, and their status. Click Add a task for it to plan one |
Right-click a requirement for New Requirement, Add Task for It, Move Up, Move Down, Mark Removed (or Mark Active), Clone and Delete.
Tasks¶
The plan: small steps, in order. Select a task to edit it on the right.
| Property | Description |
|---|---|
| Title, Description | What to do |
| Status | To do, In progress, Done or Blocked |
| Order | The task's place in the plan. Use the arrows to move it earlier or later |
| Done on | The date the task was done, set when you mark it done |
| Blocked because | Why the task is blocked, only for a blocked task |
| Implements | The requirements the task implements |
| Depends on | The tasks that must be done first |
| Assignee | The person the task is assigned to |
| Done by | Whether the agent does the task |
| Models it worked on | The models, or elements of them such as Order.Status, that the task created, modified or deleted. Click a model to open it |
| Notes | What was done or decided |
Right-click a task for New Task, Start, Mark Done, Mark Blocked, Back to To Do, Move Up, Move Down, Clone and Delete.
Starting a task, or marking it done, while the tasks it depends on are not done shows a warning.
Ids¶
Each item gets an id when you add it: US-1 for a user story, FR-001 for a requirement, AC-1 for an acceptance criterion, Q-1 for a question and T-01 for a task. You can change an id. The items that refer to it are updated.
Ids are never reused. An item that is no longer wanted should be marked Removed, not deleted, so that its id keeps its meaning.
Statuses¶
A spec moves through these statuses:
| Status | Meaning | Can go to |
|---|---|---|
| Draft | Being written | In review, Approved, Dropped |
| In review | Ready to be checked | Draft, Approved, Dropped |
| Approved | Work can start | Draft, In review, Implementing, Dropped |
| Implementing | Work has started. Set when the first task starts | Completed, Dropped |
| Completed | Every task is done | None |
| Dropped | Not going ahead, kept for history | None |
A spec cannot go back to Draft or In review once a task has started, and cannot be Completed while any task is not done. An agent works only on specs that are Approved or Implementing.
Validation¶
When you validate the application, the spec is checked as well. Validation reports, for example:
- Errors: an item without an id or text, two items with the same id, a reference to a story, requirement or task the spec does not have, a task that depends on itself, tasks that depend on each other in a circle, or a Done on that is not a date (yyyy-MM-dd).
- Warnings: a security role, concept, policy or unit test that the application does not have, a task that implements a removed requirement, a blocked task with no reason, a must-have requirement with no task, an open question in an approved spec, or a status that does not match the tasks (e.g. a completed spec with tasks not done).
Work with an agent¶
An agent connected through the MCP server reads and writes specs like any other model, and has tools to work through them:
| Tool | What it does |
|---|---|
list_specs |
Lists the specs, with their status, progress and next task |
next_spec_task |
Gives the task to work on next, with what is needed to implement it: the spec's overview, the requirements the task implements, their acceptance criteria and the open questions. A task in progress comes first, then the first task to do whose dependencies are done |
update_spec_task |
Records a task's progress: its status, why it is blocked, who it is assigned to, and a dated note |
link_task_model |
Records a model, or an element of it, that the task created, modified or deleted |
complete_spec_task |
Marks a task done, with a note and the models it worked on |
set_spec_status |
Moves the spec to another status, with the same rules as the editor |
trace_spec |
Shows, for each requirement, the tasks that implement it, the models they worked on, its acceptance criteria and what verifies it |
A typical way of working:
- Write the spec, alone or with the agent, and review it.
- Approve it.
- Ask the agent to implement it. The agent asks for the next task, implements it in the business objects, forms and other models, links the models it changed, and marks the task done. Then it moves to the next task.
- Follow the progress in the Tasks view. Each task shows the models it worked on and the agent's notes.
- When every task is done, mark the spec Completed.
Every change the agent makes to a spec is validated and saved in the same way as a change you make in the editor, so a spec opened in Studio shows the agent's progress.