docs/FORMAT.md
Queue format - version 3
The contract between the volante-kit skills (spec-prep, spec-run, spec-batch), the queue tool
core/skills/spec-prep/queue.mjs, the gate runner core/skills/spec-prep/gates.mjs and any tool that reads queues
(an importer, a dashboard). Changing anything below is a new format version: bump format in config.schema.json,
add a migration to lib/migrate.mjs and an entry to docs/CHANGELOG.md. A skill never changes the format silently.
Keys, kinds and statuses are always English. The text an agent writes into them - titles, notes, scopes, spec
prose, commit messages - is in language.content of the project config.
Layout
<queue.root>/<queue>/
NN-name.md spec: the plan (goal, map, rules, decisions, planned tasks), no state
state.yaml the state: every task, what waits for the user, and whether the work passed the gates
A queue is either committed (queue.committed: true) or local, outside git (false). There is no third file:
anything open - work, a decision, something to check by hand - is a task in state.yaml.
state.yaml
# Task state - auth (a comment block at the top is kept when a tool rewrites the file)
format: 3
verification: # written only by gates.mjs
status: red # green | red
commit: 3f2a1b9c0 # HEAD the gates ran on
date: 2026-11-28
failed: [test]
since: 9e8d7c6b5 # red only: where the unverified work starts (the next run starts here again)
tasks:
- id: T01-01
title: Login form
spec: 01-login.md
depends_on: []
status: done
date: 2026-11-28
commit: abc123456
note: Form in `src/login.tsx`.
- id: T01-01a
title: Make the test gate green after T01-01
kind: fix
spec: 01-login.md
depends_on: []
status: todo
gates: [test]
read: [src/login.tsx]
scope: |-
The test gate (`pnpm test`) failed on 3f2a1b9c0. ...
done_when:
- "the test gate passes: `pnpm test`"
- id: T01-02
kind: decision
title: Remember-me duration
status: waiting
note: "Options: 7 / 30 days. Recommendation: 30."
Top-level keys: format (3), verification (optional), tasks (a list, [] when empty). Nothing else.
A task entry:
| Key | Meaning |
|---|---|
id |
T<NN>-<kk>; NN = spec number, kk = running number. A derived task = the parent id plus a letter (T05-01a, T05-01aa). Ids are stable and never renumbered. |
title |
short title |
kind |
task (default, omitted), fix, decision, action, session, check |
spec |
the spec file in the queue; its sections 1-4 are the context of the task |
depends_on |
a list of ids; <queue>/<id> only with queue.cross_deps |
status |
todo, done, blocked, uncommitted (agent kinds); waiting, done (user kinds) |
date |
YYYY-MM-DD of the last status change |
commit |
the hash of the task commit (7-40 hex characters); recorded after that commit - by spec-batch or the loop, or by a standalone run - so it reaches git with the next commit of the file |
gates |
fix only: the gates it must turn green |
read, scope, done_when |
an inline definition (see below) |
note |
what the next task must know; for a user task, the question or the action |
Entry order is work order. The loop takes the first todo entry of kind task or fix whose depends_on are all
done (queue.mjs next).
Kinds. task and fix are done by the agent; decision (the user decides: options and a recommendation in
note), action (the user does something outside the repo), session (the user works live with an agent) and
check (the user checks something by eye, on a device or in production: one item per line in done_when) wait for
the user, who closes them by writing the outcome into note and setting done. A task that needs one of them lists
its id in depends_on.
Definitions. A planned task is defined by its ### <id> section in spec. A task born during a run - derived
work, a fix from a red gate - is defined inline with scope and done_when (and optionally read). Never both.
A todo without a definition is an error; a blocked or uncommitted one a warning.
Verification. A done agent task is verified when its commit is an ancestor of verification.commit and the
status there is green. Everything else committed since is pending (queue.mjs pending). Never verified = every
done task with a commit is pending.
The YAML subset
state.yaml is plain YAML, restricted so that every YAML parser reads it the same way and agents cannot write
something that only some parsers accept:
- indentation with spaces; a list may be written at its key’s indentation or deeper,
- values: plain text on one line,
"double quoted"(JSON escapes),'single quoted', short lists[a, b], and|,|-,|+blocks for several lines, - comments start with
#on their own line or after a space, - an error, with the line number: tabs in indentation, anchors, aliases, tags, flow mappings
{...}, folded>blocks, a plain value that continues on the next line, a plain value starting with`,@,%,,or containing:or ` #, document markers—`, repeated keys.
Every scalar is text, except null/~/empty (no value) and true/false. The canonical layout (what the tools
write) quotes any text another parser would read as something else (yes, 12, 1e5, 1:30), so a reader with a
standard YAML library gets strings - except date, which is written plain and may be read as a date.
Spec NN-name.md
Sections: 1. Goal, 2. Map, 3. Shared rules, 4. Recorded decisions, 5. Tasks, 6. Completion
criteria. A run reads 1-4 and its own task section. A task:
### T01-02 Short title
Depends on: T01-01
Read: <files with the functions or types the task needs and why - changes, caller, test pattern - and skills>
Scope: <what gets built, what is out of scope>
Done when:
- <a condition the agent can check>
Every ### T.. heading has exactly one entry in state.yaml.
Read may be one line or a list, one entry per line (- \path`: `symbol` - why). No tool parses it - it is
for the run - so a spec written with a one-line Read` stays valid.
Verification and gates
The gates are the repo’s checks (verify.gates in the config: { name, run, fix? }), generated into
<skills>/spec-prep/gates.json and run by gates.mjs from the repo root. verify.mode decides when:
| Mode | Gates run | A task run |
|---|---|---|
run (default) |
once, when spec-batch (or the headless loop) runs out of tasks or hits a stop |
writes tests, runs no gate (Verification: deferred to the gate run in the commit) |
spec |
as run, and also before the first task of another spec |
as run |
task |
in every task run, before its commit | runs the gates |
A standalone spec-run (by hand) always runs the gates before its commit; a fix task always runs its own gates
(--only). <base> in a gate command is replaced with the commit the unverified work starts at, so nx affected
and similar commands check all of it: per queue the last green verification.commit, after a red run its
verification.since, for a never verified queue the commit before its oldest task commit, else the run start
(--base); over several queues the oldest of these; without any, the merge base with review.base.
gates.mjs <queue dirs> --record writes verification; for a red gate it adds one fix task per suspect task,
right after it. A suspect is the task of the most recent commit since the base that changed a file the gate output
names (matched by the hash in the task’s commit); without such a file, the last task commit of the range. With no task
commit in the range the gate was red before the work: no fix task. A fix task holds no gate output - the gate, the
suspect files and the command that shows the error (gates.mjs <queue> --only <gates>) - so nothing a test printed
is ever committed with state.yaml. With verify.retry (default) a red gate runs once more first: green the second
time is reported as flaky and gets no fix task. In a committed queue it then commits the
state.yaml files (<commit.docs_scope>: gates <status> at <hash>), together with commit hashes recorded since the
last commit of the file; any other uncommitted change of a state.yaml stops the recording. Exit codes: 0 green,
1 red, 2 usage, 3 not recorded.
Run report
The last four lines of a spec-run answer, read by the spec-batch acceptance:
Queue: <queue name>
Commit: <full hash of the task commit | none>
Status: <id> <status written to state.yaml>
Derived: none | <ids, comma-separated>
Tools for a run
node <skills>/spec-prep/queue.mjs show <queue directory> <id> prints everything one run needs from the queue: the
entry, its definition (the ### <id> section of the spec or the inline scope, read, done_when), the status and
note of each dependency, and sections 1-4 of the spec (everything before the ## 5. heading, whatever language the
headings are in). node <skills>/spec-prep/queue.mjs changes <queue directory> prints what the uncommitted change of
state.yaml is: none, hashes (only commit fields were recorded), other, or untracked.
Validation
node <skills>/spec-prep/queue.mjs lint <queue directory> [--cross-deps]: exit code 0 = no errors (warnings
allowed), 1 = errors. An error is something that would stop the loop or hand out the wrong task (a YAML error, an
unknown key, a bad status or kind, a dependency on a missing id or a cycle, a todo without a definition, a missing
spec for an open task). A warning is drift that does not break the next run (a bad date, a missing spec for closed
tasks, a leftover checks.md).
Migration
volante-kit migrate <repo> shows the changes; --write applies them after copying every original to
.volante-kit/migrate-backup-<time>/. It migrates formats 1 and 2 to 3 in one step and rewrites only structure and
keywords - titles, notes and prose stay as written. Then run volante-kit sync to regenerate the skills.
Format 2 -> 3:
| Format 2 | Format 3 |
|---|---|
state.md table |
state.yaml entries; Task -> title, Depends on -> depends_on (a list), - -> no key |
Decision:, User:, Session: prefixes of waiting rows |
kind: decision, action, session (prefix removed) |
checks.md sections with open - [ ] Check: items |
a check task per section, after the task that wrote it; checked items are dropped |
config verify.mode: batch (or none) / task |
verify.mode: spec / task - set run to verify once per run |
config verify.task, verify.batch, verify.final (commands) |
verify.gates, verify.final (named: typecheck, lint, test, …; final commands already in the gates are dropped) |
state.md in specs, notes and the addendum |
state.yaml |
A table with a row of the wrong cell count stops that queue (fix the row, migrate again); other queues migrate. An
addendum that mentions checks.md is reported - rewrite it as “a check task”.
Format 1 -> 2 (applied first for a format 1 repo):
| Format 1 | Format 2 |
|---|---|
stan.md, otwarte.md |
state.md, checks.md |
.volante-kit/zasady.md |
.volante-kit/addendum.md |
columns Zadanie, Zalezy od, Data, Notatka |
Task, Depends on, Date, Note |
zrobione, zablokowane, czeka, do commita |
done, blocked, waiting, uncommitted |
brak (no dependencies) |
none |
Decyzja:, User:, Sesja: |
Decision:, User:, Session: |
Cel, Mapa, Zasady wspolne, Decyzje zapisane, Zadania, Kryteria ukonczenia speca |
Goal, Map, Shared rules, Recorded decisions, Tasks, Completion criteria |
Zalezy od:, Czytaj:, Zakres:, Gotowe, gdy:, Data:, Zrodlo: |
Depends on:, Read:, Scope:, Done when:, Date:, Source: |
- [ ] Do sprawdzenia: |
- [ ] Check: |
addendum Twarde zakazy, Weryfikacja, Odbior, Przeglad |
Hard rules, Verification, Acceptance, Review |
config language.diacritics, queue.unit: "katalog" |
language.content, queue.unit: "queue" |
Both spellings (with and without Polish diacritics) are recognized.