Clara Docs
All docs

The .clara folder format

Reference62 min readEdit on GitHub

On this page

A Clara board is a folder named .clara, usually at the root of a git repository. Everything Clara knows about the board is a plain file in that folder: the settings are JSON, tickets, sprints, releases and agent profiles are Markdown with front matter, and the history is one line of JSON per event. This page describes every file and every field, how Clara writes each file, and how the format is versioned. Paths on this page are relative to .clara/.

Operations are named the way the library names them, such as ticket.claim, doctor.fix or project.migrate. CLI commands for these operations arrive with the CLI.

The examples on this page are the golden files in test/fixtures/format/. Tests read each one and write it back, and the bytes must not change.

The folder

Text
.clara/
  config.json              settings
  tickets/GEN-12.md        one file per ticket on the board
  archive/GEN-3.md         one file per archived ticket
  sprints/S2.md            one file per sprint
  releases/v0.2.0.md       one file per release
  agents/claude.md         one file per agent profile
  views/my-bugs.json       one file per saved view
  templates/bug.md         one file per ticket template
  playbooks/run-migrations.md          one file per playbook
  docs/decisions/tokens-are-hashed.md  one file per decision
  docs/conventions.md      how the project works, free Markdown
  docs/sign-in-spec.md     one file per spec, retro or other page, free Markdown
  idea.md                  what the project is for, free Markdown
  Home.md, index.md, log.md            the brain's home, its index and its log
  conversations/2026-11-28-GEN-12-sign-in.md  what a ticket's chats did, one note per ticket
  meetings/2026-11-28-sprint-2-planning.md    one note per meeting
  daily/2026-11-28.md      one note per day
  phases/S2-checkout.md    one note per stage of the plan
  people/ana.md            one note per person
  notes/anything.md        any other note
  attachments/GEN-12/screen-shot.png   images pasted into a ticket
  activity/2026-11.jsonl   the activity log, one file per month
  .gitignore
  .gitattributes
  .local/                  this machine only
  .cache/                  this machine only
Path In git Written by
config.json yes project.init, config.set, project.migrate
tickets/<ID>.md yes the ticket operations, sprint.close, ticket.restore, doctor.fix
archive/<ID>.md yes ticket.archive moves a ticket here; ticket.restore moves it back
sprints/<ID>.md yes sprint.create, sprint.update, sprint.start, sprint.close
releases/<ID>.md yes release.create, release.ship
agents/<name>.md yes people, by hand. No operation writes agent profiles.
views/<name>.json yes view.save; view.delete removes the file; project.init with a template
templates/<name>.md yes project.init with a template; people, by hand. template.list reads them and ticket.create starts from one.
playbooks/<name>.md yes knowledge.propose writes a draft, knowledge.accept accepts it, knowledge.reject removes a draft; people, by hand
docs/decisions/<name>.md yes the same operations as playbooks; people, by hand
docs/conventions.md yes people, by hand. No operation writes it.
docs/<name>.md yes people, by hand: specs, retros and the like. knowledge.pages lists them and knowledge.page reads one, by its first # heading; no operation writes them.
idea.md yes idea.update; people, by hand
attachments/<ID>/<name> yes attachment.add. See Attachments.
activity/<YYYY-MM>.jsonl yes every operation that changes the board
.gitignore yes project.init; doctor.fix adds a missing line
.gitattributes yes project.init; doctor.fix adds a missing line
.local/ no the disk storage, undo records, agent runs and plans in review
.cache/ no nothing in this version

project.init writes this .gitignore:

Text
.cache/
.local/

and this .gitattributes, so that git merges the activity log by keeping the lines of both sides:

Text
activity/*.jsonl merge=union

How the folder is read

  • Clara reads only files directly inside each folder, with the right extension: .md in tickets/, archive/, sprints/, releases/ and agents/, .json in views/, and YYYY-MM.jsonl in activity/. Files in sub-folders and files with another name are not part of the board. attachments/ is not read with the board: an attachment is read only when someone asks for it.
  • A file's name must match the id or name inside it: tickets/GEN-12.md holds id: GEN-12, and agents/claude.md holds name: claude. A file whose name does not match is reported as a problem and left out.
  • A file that cannot be read is reported with the reason and a hint. The rest of the board still loads.
  • When a ticket has a file in both tickets/ and archive/, the file in tickets/ wins and the other is reported.
  • A ticket whose key is not the board's key is left off the board and reported.
  • A missing config.json means there is no board, and every operation except project.init fails with NO_BOARD.

Paths

Every path goes through the same check before Clara reads or writes it. A path is relative, uses forward slashes, is at most 512 characters long, and each name in it is at most 200 characters. Clara refuses a path that:

  • contains a control character or one of < > : " | ? * \;
  • has an empty name, or a name . or ..;
  • has a name that starts or ends with a space, or ends with a dot;
  • has a name Windows reserves, such as con, nul, com1 or lpt1, with or without an extension;
  • starts with .local, .cache or .git. Those folders are never read or written as part of the board.

Attachments

attachments/<ID>/<name> is an image pasted or dropped into a ticket's description or a comment, or attached with clara attach. Ticket text shows it with a Markdown image whose address is the path inside .clara:

Markdown
![screen-shot](attachments/GEN-12/screen-shot.png)
  • Types. PNG, JPEG, GIF and WebP only, told by the bytes the file starts with: a PNG signature, FF D8 FF, GIF87a or GIF89a, or RIFF with WEBP at byte 8. The name a file came with and the type a client claims count for nothing. SVG, HTML and every other type are refused with INVALID_INPUT, because a browser can run script in them.
  • Size. At most 3 MiB (3,145,728 bytes) a file. This is a fixed limit, not a setting: the web app sends a file as base64 inside JSON, and 3 MiB of it is just over 4 MiB, which every host the hosted board runs on accepts in one request.
  • Names. The name is the slug of the file's own name, without its extension, at most 60 characters, or image when nothing is left, followed by the extension of the type the bytes are: .png, .jpg, .gif or .webp. A name a ticket already has, in any case, gets -2, -3 and so on, so an attachment never replaces another. The write is also conditional on the file not being there.
  • Records. attachment.add writes the file and an attached event in one commit. The ticket's own file is rewritten too, so that its updated moves, as with every event about a ticket (D-009).
  • Undo. activity.undo does not take an attachment away: undo puts back text, and the file may already be shown in a comment.
  • Archive. ticket.archive leaves a ticket's attachments where they are, as it leaves its history in the log, so its text still shows them and ticket.restore needs nothing put back. Clara never deletes an attachment; a person can remove the folder by hand.
  • Reading. The local and hosted servers serve an attachment at GET /api/attachments/<ID>/<name> to whoever may read the board. Each read checks the id and the name, and checks the bytes again, so a file that is not one of the four types is never served, whoever put it there. A static export does not carry attachments, so its pages show the image's alt text.

.local/

.local/ holds state that belongs to one machine. git ignores it, and it never travels with the board.

Path What it is
.local/storage/ The disk storage's own files: lock, lock.steal, journal.json, version and tmp/.
.local/undo/<event id>.json One undo record per operation a person ran on this machine.
.local/runs/<run id>.json An agent run's record: its ticket, agent, branch, worktree, state, outcome, attempts, spend and limits (D-113). Beside it, <run id>.events.jsonl (its normalised events), <run id>.log (the agent's output, secrets hidden) and, while someone asks it to stop, <run id>.stop. A plan run's events and output sit here too.
.local/plan-runs/<run id>.json A plan run's record: the agent that clara plan asked for a plan, how it ended, what it spent, and the plan it proposed (D-120). purpose says what the run was for: plan, split (clara split), estimate (clara estimate) or ask (clara ask); tickets lists the ticket a split run splits or the tickets an estimate run sizes. A run that answered a question ends answered, and keeps no answer: the answer is printed, and is in the run's log.
.local/live/<ticket id> The run working that ticket on this machine, so two never start at once; live/plan is the plan run going.
.local/asks/<run id>/<ask id>.json A question a guarded run asked before using a tool, and the answer a person gave (D-107).
.local/plans/<plan id>.json A plan an agent proposed, kept for a person to review, edit and apply (D-120).
.local/sessions/<id>.json A Claude Code chat that works on the board from this machine (D-158): role (ticket or board), its ticket, actor, model, effort, Claude Code's own claude_session, the folder and branch it works in, the process that keeps it open, its state (working, waiting or ended), when it started, was last seen and last said it runs, the last of Clara's tools it called and how many. Local state with a version v, not a published format.
.local/prs.json What GitHub's gh last said about the pull request of each ticket in progress or in review: prs, a list with ticket, ref (the ticket's pr it answers for), read (when gh was asked), number, url, state (open, merged or closed), head, checks (passing, failing, pending or none), and merged_by and merged_at once merged (D-162).

A commit on disk takes the lock, writes a journal of every change, applies it, moves the version on and removes the journal. If a process stops half way, the next process that takes the lock finishes that commit first. So a commit is applied whole or not at all.

An undo record is named after the first event the operation wrote. It is one line of JSON and a newline, with the fields op, actor, ts, events (the ids the operation wrote) and files. Each entry of files has path, before and after: the file's text before and after the operation, or null when the file did not exist. Clara keeps the last 50 records. Operations run by agents get no undo record.

A plan file is pretty-printed JSON with v: 1, its id (a ULID), status (review, applied or discarded), created, by, the summary, then epics, stories, sprints, changes, obsolete, risks and questions. Epics and stories have refs of the plan's own (E1, S1) so that they can name each other before any is a ticket; a story's epic and depends_on take a ref or the id of a ticket on the board, and sprint is the number of one of the plan's sprints. A story's parent, set by clara split, is the id of the ticket on the board it is part of: applied, it is the new ticket's parent. A split proposes stories with parent (or epic, when the ticket split is an epic); an estimate proposes only changes, each a ticket's id, its points and the reason. Any item can carry skip: true, which leaves it out. Once applied, applied records ts, by, tickets (each ref and the id it became) and sprints. The file is written after the board's commit, so the log decides: a plan with a plan_applied event that stands is applied, and one whose every plan_applied event was undone is in review again, whatever its file says. Plans never travel with the board; the tickets they make do.

Workspaces

A workspace keeps the boards of many repositories in one folder (D13, 2), for a team whose work spans several. The folder holds workspace.json and one folder per project key, each in exactly the format of a .clara folder:

boards/
├─ workspace.json      { "v": 1, "name": "boards" }
├─ API/                the board of the repository linked to API
│  ├─ config.json
│  └─ ...
└─ WEB/
   └─ ...

A repository points at its project with .clara.json at its root, which is committed so every clone finds the same board:

JSON
{ "workspace": "../boards", "project": "WEB" }

workspace is a folder relative to the repository, or absolute; Clara writes it relative, with /, so clones that sit side by side share one file. clara init --workspace <folder> --key WEB makes the workspace when the folder is new or empty (a .git alone is allowed), makes the project, and writes the link; a second clone given the same --key only writes the link. A project is joined only under a key someone named: when the key Clara would propose from the folder's name is taken, init asks for another, or without a terminal refuses.

Clara follows a link only to a folder that has workspace.json, and only into the folder of a valid key, so a repository cannot point it anywhere else. A link that is broken, or leads to a folder that is no workspace, is refused by every command that needs the board, rather than passed over: Clara never quietly makes a second board while the team's is elsewhere. In one folder, .clara.json is taken over .clara, and a linked worktree uses its main checkout's link. .clara.json must be a file, not a symbolic link, and its workspace a folder on this machine: a path such as \\host\share or //host/share is refused before Clara looks there.

The workspace can be a git repository of its own, which is how a board of many projects is shared. clara sync and clara export then work in that repository: sync commits only the project's folder there and pushes that repository's branch, while the commits it links to tickets are read from the code's repository, and sync does this from a linked worktree too. A repository at the home folder (a dotfiles repository) is not taken for the workspace's unless the workspace is the home folder itself. A workspace in no repository is plain files. clara workspace and the web app's Home view show every project: what is in progress, what is blocked and what needs you. The hosted board serves one board of one repository, so it can serve one project of a workspace's repository with CLARA_PATH naming its folder (boards/WEB). The GitHub Action works on the board of the repository it runs in, and does not follow a link to a workspace its checkout does not have.

config.json

JSON
{
  "version": 1,
  "key": "GEN",
  "name": "Genesis",
  "people": [
    "sherwin",
    "bharat"
  ],
  "review": {
    "mode": "human",
    "reviewer": null,
    "merged_pr_approves": true
  },
  "checks": [
    {
      "name": "test",
      "run": "npm test",
      "timeout_s": 600
    },
    {
      "name": "lint",
      "run": "npm run lint",
      "timeout_s": 120
    }
  ],
  "conductor": {
    "max_parallel": 3,
    "max_minutes": 45,
    "max_attempts": 2,
    "max_turns": 100,
    "max_budget_usd": 5,
    "daily_budget_usd": 20,
    "base_branch": "main",
    "setup": [
      "npm ci"
    ],
    "on_approve": "pr"
  },
  "routing": [
    {
      "when": "label:docs or type:chore",
      "agent": "claude",
      "model": "haiku"
    },
    {
      "when": "points>=8",
      "agent": "claude",
      "model": "opus"
    },
    {
      "agent": "claude"
    }
  ],
  "router": {
    "command": null
  },
  "wip_limits": {
    "in_progress": 5
  },
  "stale_after_minutes": 120,
  "git": {
    "auto_commit": false
  },
  "notify": [
    {
      "on": [
        "blocked",
        "in_review",
        "run_failed"
      ],
      "webhook": "env:CLARA_WEBHOOK_URL",
      "format": "slack"
    }
  ],
  "automations": {
    "epic_auto_done": true,
    "flag_stale": true,
    "sprint_digest": true
  },
  "routines": []
}

Only version, key and name are required. Clara fills in every other setting with its default when it reads the file, and writes every section when it writes the file.

Top level

Key Type Default Meaning
version whole number, 1 or more required The format version of the board. See Versions and migration.
key 2 to 8 capital letters or digits, starting with a letter required The prefix of every ticket id, such as GEN.
name title (see Field types) required The board's name.
people list of person names [] The people on the board. A comment that mentions a name not on this list gets a warning.
review object see below How work in review is approved.
checks list [] The commands that check a piece of work.
conductor object see below Settings for running agents.
routing list [] Which agent and model take which tickets.
router object see below A command that chooses the agent instead of the rules.
wip_limits map of status to whole number, 1 or more {} The most tickets allowed in a status.
stale_after_minutes number, more than 0, at most 525600 120 How long an agent can hold a ticket in progress without the ticket changing before the claim counts as stale. doctor.fix releases a stale claim.
git object see below
notify list [] Webhooks to call on events.
automations object see below Switches for what Clara does by itself.
routines list [] Tickets to create on a schedule.
brain object see below What the brain reads besides .clara. Written only when set.

version and key cannot be changed with config.set. Every ticket id carries the key, and only project.migrate changes the version.

review

Key Type Default Meaning
mode human, agent or gates human Who approves work in review. A person may approve in every mode. With agent, an agent may approve too, never its own work. With gates, passing checks approve.
reviewer agent name, or null null With mode set to agent, the only agent that may approve. null lets any agent approve.
merged_pr_approves boolean true A ticket in review whose pull request clara serve or clara sync finds merged on GitHub is approved, as system with via: "pr" (D-162). false leaves approving to a person.

With mode set to gates and at least one check, Clara approves a ticket in review by itself once the newest verified event for it ran on the commit its newest completed event named, has a result for every check the board has now, and every result passed. The event's own passed field is not enough: a run with no results, or one recorded before a check was added, approves nothing, and complete refuses it the same way.

checks

Each item:

Key Type Default Meaning
name slug required The check's name.
run text, 1 to 2000 characters required The command to run.
timeout_s whole number, 1 to 86400 600 Seconds the command may take. Past it, the command and everything it started are stopped.

When the board has checks, ticket.complete needs a commit, and the newest verified event for the ticket must have passed on that commit. Otherwise it fails with COMPLETE_UNVERIFIED.

conductor

Key Type Default
max_parallel whole number, 1 to 32 3
max_minutes number, more than 0, at most 1440 45
max_attempts whole number, 1 to 10 2
max_turns whole number, 1 to 10000 100
max_budget_usd number, 0.01 to 1000 5
daily_budget_usd number, 0 or more 20
base_branch branch name main
setup list of text, 1 to 2000 characters each []
on_approve pr, merge or none pr

routing

Each item:

Key Type Default
when text, at most 2000 characters optional
agent agent name required
model text, 1 to 100 characters optional

A dispatched ticket goes to the agent it is assigned to. An unassigned one goes to the agent the router chooses, when there is a router, and otherwise to the agent of the first rule whose when matches it; a rule without when matches every ticket. The rule's model, when set, is the model the agent runs with (D-103).

router

Key Type Default
command text, 1 to 2000 characters, or null null

A shell command that chooses the agent for an unassigned ticket. It runs in the main checkout for at most 30 seconds, reads {"ticket": {...}, "agents": [...], "routing": [...]} as JSON on standard input, and prints {"agent": "<name>", "model": "<model>"} (with model null or left out for the agent's own) or {"agent": null} to leave the choice to routing. It is a command from the repository, so it runs only after a person on the machine has trusted it with clara trust, like the checks and the setup commands.

wip_limits

A key is a status and a value is the most tickets that status may hold, such as "in_progress": 5. Clara writes the keys in status order. An agent that would go over a limit is refused with WIP_LIMIT, or CLAIM_WIP_LIMIT when it claims. A person gets a warning and the change goes ahead. Epics do not count.

git

Key Type Default
auto_commit true or false false

notify

Each item:

Key Type Default
on list of event names, at least one required
webhook env:NAME, or an http:// or https:// address up to 2000 characters required
format json, slack, discord or telegram json

After each change is committed, by a command, clara serve or clara mcp, every target whose on covers one of the change's events is sent one message about the change, in its format. Nothing is sent until a person on this machine has trusted the board's webhooks with clara trust, and the hosted board sends nothing. NOTIFICATIONS.md has the bodies, the Telegram address, and clara notify test.

A name in on is one of these:

  • an event's kind: board_created, created, updated, moved, assigned, claimed, released, blocked, answered, commented, checkpointed, completed, verified, reviewed, approved, changes_requested, rejected, linked, unlinked, ranked, archived, restored, sprint_created, sprint_updated, sprint_started, sprint_closed, release_created, release_shipped, config_changed, agent_saved, view_saved, view_deleted, doc_saved, doc_deleted, knowledge_proposed, knowledge_accepted, knowledge_rejected, plan_applied, imported, renumbered, repaired, migrated, synced, run_started, run_finished, attached, undone, refined, chat_started or chat_ended;
  • a status, for a ticket that moves into it however it got there: backlog, todo, in_progress, blocked, in_review or done;
  • run_failed, for a run that failed, crashed or stopped at a limit;
  • mentioned, for a comment that mentions someone with @.

A name that is none of these is kept, and clara doctor warns that it is never sent.

automations

Key Type Default Meaning
epic_auto_done true or false true An epic moves to done when all its tickets are done, and back to in_progress when one of them reopens.
flag_stale true or false true clara doctor warns about an agent's claim with nothing logged for stale_after_minutes, and doctor --fix releases it. Off, neither happens; the is:stale filter still finds such tickets.
sprint_digest true or false true sprint.close writes the sprint's ## Report section. Off, it leaves the sprint's body as it was and records only result.

routines

Each item:

Key Type Default
name slug required
every daily, weekly:<day> with a day from mon to sun, or monthly:<1 to 28> required
title title required
type ticket type optional
priority priority optional
labels list of labels optional
body text, at most 20000 characters optional
assignee assignee optional

A routine has one occurrence at a time: today for daily, the latest of that weekday for weekly:<day>, and the latest of that day of the month for monthly:<n>, on or before today, as a UTC date. routine.run makes the occurrence's ticket in todo, with title, the other keys given and body as its description, and sets the ticket's origin to routine:<name>/<date>. It makes nothing for an occurrence that already has a ticket, live or archived, so it is safe to run as often as anyone likes. clara work runs it as it starts and on each new day; the Action's routines mode runs it each morning; clara routine run runs it by hand. A run missed for weeks makes the current occurrence's ticket, not one for each occurrence missed.

brain

Key Type Default Meaning
sources list of at most 50 patterns ["README.md", "CHANGELOG.md", "docs/**/*.md"] The repository's documents the brain reads as its sources (D-170). [] reads none.
remember boolean true Handing work in writes the chat's note in conversations/, one note per ticket with a round per hand-in, and a line in log.md (D-171). false turns it off.
private boolean false Keeps the board on this machine. clara init --private and clara config brain.private true add the board's folder to the repository's .gitignore, and false takes that line out again; git then leaves the board alone, and Sync only pulls.

A pattern is relative to the top of the repository, with / between folders, * within a name and ** across folders. A pattern that starts with /, holds a backslash or has an empty, . or .. part is refused, as any setting that is wrong is. The brain reads each matching file as a note under @repo/, never writes one, and skips hidden folders, node_modules, dist, build, coverage, vendor, target and out, symbolic links, a file whose real path is outside the repository, the board's own folder, and a file over 256 KB. It reads at most 2000 files. A path a note names that is a file of the repository, such as cli/run.ts, becomes a note under @code/, which the brain shows and never reads.

What reads each setting

Clara checks every setting when it reads the file. Operations read people, review, checks, wip_limits, stale_after_minutes, routines and automations; clara work and the Action read conductor, routing and router; the CLI, clara serve and clara mcp read notify after each change they commit. git.auto_commit is checked and kept, and nothing reads it yet: clara sync and the git hooks commit the board.

Keys Clara does not know

A key Clara does not know survives every rewrite. An unknown key at the top level is written after the known ones. An unknown key inside a section, or inside an item of a list, is written after that section's known keys. Nothing reads such a key, so clara doctor names each one as a warning, with the setting it most likely meant, and leaves it to a person: a newer Clara may have written it.

config.set changes one setting by its dotted name, such as review.mode or wip_limits.in_progress, or removes it. It checks the whole file before writing it. It refuses a name that is not a setting of this version, such as revew.mode, and a JSON value that brings one in, and says the setting most likely meant. Removing works for any key, which is how a mistyped one already in the file goes.

Tickets

A ticket on the board is tickets/<ID>.md. An archived ticket is archive/<ID>.md, in the same format. This is a ticket in progress:

Markdown
---
id: GEN-12
title: Add email sign-in
type: story
status: in_progress
priority: p1
points: 3
assignee: agent:claude
labels: [auth, backend]
epic: GEN-4
sprint: S2
depends_on: [GEN-9]
branch: clara/gen-12-add-email-sign-in
created: 2026-11-16T18:02:11Z
updated: 2026-11-17T09:40:03Z
started: 2026-11-17T09:31:55Z
---

People sign in with an email and a one-time code. No passwords.

## Acceptance criteria

- [x] Requesting a code sends one email, limited to 5 per hour
- [ ] A correct code creates a session that lasts 30 days
- [ ] A wrong or expired code shows a clear error

## Handoff

The code-request endpoint is done and tested. Next: session creation in
src/auth/session.ts. The mailer is stubbed in tests with MAIL_TRANSPORT=memory.

The smallest ticket Clara writes:

Markdown
---
id: GEN-1
title: Write the README
type: task
status: backlog
priority: p2
created: 2026-11-16T18:02:11Z
updated: 2026-11-16T18:02:11Z
---

A ticket with every field, and three keys Clara does not know at the end:

Markdown
---
id: GEN-40
title: "Fix: sign-in fails when the code starts with 0"
type: bug
status: blocked
priority: p0
points: 0.5
assignee: sherwin
labels: [auth, good first issue, "c#", "area:auth"]
epic: GEN-4
parent: GEN-12
sprint: S2
release: v0.2.0
depends_on: [GEN-9, GEN-12]
links:
  relates: [GEN-7]
  duplicates: [GEN-3]
due: 2026-12-01
rank: hzzz
branch: clara/gen-40-fix-leading-zero
pr: "128"
blocked_reason: Waiting on the mail provider's sandbox key
blocked_question: "Which provider: Postmark or SES?"
created: 2026-11-16T18:02:11Z
updated: 2026-11-18T10:00:00Z
started: 2026-11-17T09:31:55Z
estimate_source: planning poker
customer:
  name: Acme
  seats: 40
reports: [{"from": "support", "count": 3}]
---

Codes are stored as numbers, so `042917` becomes `42917` and never matches.

## Acceptance criteria

- [ ] A code with a leading zero signs the person in
- [ ] Codes are compared as text everywhere

Fields

In the order Clara writes them:

Field Type Default Meaning
id ticket id required KEY-n. Must match the file name.
title title required One line.
type epic, story, task, bug, chore or spike task
status backlog, todo, in_progress, blocked, in_review or done backlog
priority p0, p1, p2 or p3 p2 p0 is the most urgent.
points number, 0 to 1000 none The estimate. Fractions are allowed.
assignee assignee none Who holds the ticket.
labels list of labels [] Repeats are dropped when read.
epic ticket id none The epic this ticket belongs to.
parent ticket id none The ticket this one is part of.
sprint sprint id none
release slug none The release this ticket ships in.
depends_on list of ticket ids [] Tickets that must be done first. Repeats are dropped when read.
links map with relates and duplicates, each a list of ticket ids both empty Other tickets this one relates to or duplicates.
due date none
rank rank "" The ticket's place in the board's order. See Rank.
branch branch name none The git branch for the work.
pr pull request none A pull request number or its address.
repos list of up to 20 repositories, each a name such as api or acme/api, or an https address none The repositories the ticket's work is in (D-165). Shown to people and agents; Clara never clones or opens them.
model haiku, sonnet, opus, fable, or a model id that starts with claude- none The Claude model suggested for the work. clara start and the board's Start button use it for a Claude Code chat when no other is given; another agent takes its own model (D-169).
effort low, medium, high, xhigh or max none How hard Claude Code should think on the work, as its --effort flag takes it. Used like model.
blocked_reason note none Why the ticket is blocked.
blocked_question note none What someone has to answer to unblock it.
created timestamp required When the ticket was created.
updated timestamp created When the file last changed. Clara always writes it.
started timestamp none When the ticket first moved to in_progress.
completed timestamp none When the ticket moved to done.
refined timestamp none When the ticket's text was last refined: ticket.update with refine: true, or an agent rewording a raw ticket. A ticket without it, which is not an epic, not done and has no acceptance criteria, is raw (is:raw): its text is as a person first wrote it.
origin a source and an id, such as jira:ABC-12 or routine:deps-audit/2026-11-23, at most 300 characters none Where the ticket came from when Clara made it from something else: a routine's occurrence, an imported item, or a TODO or FIXME comment clara scan found (scan:<path>#<hash>, the path with / and any character outside printable ASCII as %XX, and a hash of the comment's words, with .2, .3 for the same words again in one file). Clara reads it so it never makes the same one twice.

Clara keeps some fields in step with the status. started is set the first time a ticket enters in_progress and is never cleared. completed is set when the ticket enters done and removed when it leaves. blocked_reason and blocked_question are written by ticket.block and removed when the ticket moves to any other status. Every operation that writes a ticket sets updated to the operation's time. A ticket that an event names is always written, so a comment or a rank change also moves its updated.

ticket.create puts a ticket a person creates in todo and a ticket an agent creates in backlog, unless the caller gives a status.

When the file leaves a field out, it reads as the default. A field written with no value, such as due: on its own, reads as left out.

Field types

Type Rule Example
ticket id The board key, a dash and a number from 1 to 999999999 with no leading zero. GEN-12
sprint id S and a number from 1 to 999999 with no leading zero. S2
title 1 to 200 characters on one line, with no control characters and no space at either end. Add email sign-in
slug 1 to 64 letters, digits, dots, dashes and underscores. It starts and ends with a letter or digit, has no .., and the part before the first dot is not a name Windows reserves. v0.2.0
person name 1 to 40 letters of any script, digits, dots, dashes and underscores, starting and ending with a letter or digit. Not system or agent. sherwin
agent name 1 to 40 of a-z, digits, dots, dashes and underscores, starting and ending with a letter or digit. No .., and not a name Windows reserves. claude
assignee A person name, or agent: and an agent name. agent:claude
label 1 to 49 characters: letters, digits, spaces and . _ / + # : -. It starts with a letter or digit and does not end with a space. good first issue
rank 0 to 64 characters from 0-9a-z. hzzz
branch name Up to 200 letters, digits and . _ / -, starting with a letter or digit. No .. or //, and it does not end in /, . or .lock. clara/gen-12-add-email-sign-in
pull request A number from 1 to 999999999, or https:// and up to 300 more characters. Always stored as text. "128"
note Text up to 4000 characters.
date A real calendar day, YYYY-MM-DD. 2026-12-01
timestamp YYYY-MM-DDTHH:MM:SS, optional fractions of a second, then Z or an offset such as +05:30. Clara reads any of these and writes UTC to the second. 2026-11-16T18:02:11Z

Ids and keys

A ticket id is the board key, a dash and a number: GEN-12. The key comes from config.json. Clara gives a new ticket the next number after the highest one it can find: in the files on the board and in the archive, in files it could not read, and in every created and renumbered event in the log for this key, cancelled ones included. So a number is never used twice, even after an undo or a deleted file. Sprint ids work the same way, from the sprint files and the sprint_created events.

Two copies of Clara can pick the same number at the same moment. On one disk only one of them commits. The other is refused because the board changed since it read it, so it reads the board again and takes the next number. An operation tries up to 5 times and then fails with CONFLICT.

Two git branches can also use the same number. After the merge, doctor.check reports it and doctor.fix settles it. The ticket created first keeps the number; when both were created in the same second, the one on the branch merged into keeps it. The other one gets the next free number, and Clara writes a renumbered event for it. Two created events for the number in the log mean two tickets, even when both sides of a conflicted file say they were made in the same second; with one, the two sides are one ticket that both branches changed, and doctor.fix merges them. When both tickets were in the same file, as a git conflict, doctor.fix also rewrites epic, parent, depends_on and links in the tickets from the two sides of that conflict. It warns about other tickets that still point at the old number. When git merged the two files without a conflict and one ticket's file was lost, doctor.fix rebuilds that ticket from its created event under a new number. Its description is lost. When both were created in the same second, the title each created event recorded says which one the file left is; when the file was renamed since, nothing does, and doctor leaves it to a person.

When people type an id, Clara accepts 12, #12, gen-12 and GEN-12 for a ticket, and 3, s3 and S3 for a sprint. Files always hold the full form.

Rank

rank puts every ticket on a board in one order. A column of the board, a sprint in the backlog and a list sorted by rank each show their part of it, so a ticket put just before another stays just before it wherever both appear. It is a string of the digits 0-9a-z that sorts as plain text. Moving a card between two others writes only that card's file, so two people reordering different cards never conflict.

  • An empty rank sorts first. Tickets with the same rank sort by ticket number.
  • The first rank on a board is i001. A new ticket goes after the highest rank on the board, and ticket.rank with position: "top" goes before the lowest in its column. Both step a four-character counter by 8, so ranks stay four characters long.
  • ticket.rank with before or after puts a ticket just before or after another, whatever the status of either. It gets a rank halfway between its new neighbours in the board's order. That rank can grow longer.
  • A usable rank never ends in 0 and is at most 64 characters long. When there is no room between two ranks, Clara gives every live ticket evenly spaced ranks again, in the same order, writing only the files whose rank changed.
  • doctor.check reports unusable ranks, and doctor.fix respaces every live ticket in its current order.

The body

Everything after the front matter is the body, in Markdown. Clara reads three sections of it and passes the rest through untouched.

  • The text before the first heading is the ticket's description.
  • Acceptance criteria. The first heading titled Acceptance criteria, Acceptance or Criteria, at any level. The title matches without regard to case, extra spaces or a trailing colon. Each checklist item in the section is one criterion: a line starting with -, * or +, then [ ] for open or [x] or [X] for done, then the text. Criteria are numbered from 1 in the order they appear. ticket.create writes new criteria as - [ ] text after the last item, or in a new ## Acceptance criteria section above ## Handoff. ticket.checkpoint ticks and unticks criteria by number.
  • Handoff. The section titled Handoff. It says what is done, what is next and what to watch out for, so someone else can carry on. ticket.checkpoint replaces its text, and adds ## Handoff at the end of the body when there is none.
  • Original. The section titled Original: what a person first wrote, kept when the ticket is refined (D-160). The first refinement that changes the title or the description writes it above ## Handoff, as one line naming who refined it and when, then the old title in bold and the old body as a quote, so its headings and checklist items are text, not structure. Once written, no edit through Clara changes or removes it, by a person or an agent; an edit that tries is refused with INVALID_INPUT. A person can still change the file by hand.

A section runs to the next heading of the same or a higher level. Headings and checklist items inside fenced code blocks (three or more backticks or tildes) are text, not structure. When Clara writes a section that would leave a code block open, it closes the block first.

Keys Clara does not know

Any other key in the front matter is kept. Clara writes it back after the known fields, in the order it was read, with the same value. The last example above shows three: a text value, a map and a list of maps. The same is true for sprints, releases, agent profiles and views.

Sprints

sprints/<ID>.md. This is a closed sprint:

Markdown
---
id: S2
name: Sign-in works end to end
goal: A new person can sign in with an email code
status: closed
start: 2026-11-16
end: 2026-11-27
started: 2026-11-16T09:00:00Z
closed: 2026-11-27T17:30:00Z
commitment:
  tickets: [GEN-9, GEN-12, GEN-40]
  points: 8.5
result:
  done: [GEN-9, GEN-12]
  points: 8
  returned: [GEN-40]
created: 2026-11-13T15:20:00Z
---

## Report

Two of three tickets shipped. GEN-40 went back to the backlog: blocked on the mail provider.
Field Type Default Meaning
id sprint id required Must match the file name.
name title required sprint.create uses Sprint N when no name is given.
goal note none
status planned, active or closed planned
start date none The first day. sprint.start sets it to the current date if it is missing.
end date none The last day. sprint.close sets it to the current date if it is missing.
started timestamp none When sprint.start ran.
closed timestamp none When sprint.close ran.
commitment map: tickets, a list of ticket ids, and points, a number 0 or more none The tickets in the sprint that were not done when it started, and their points.
result map: done and returned, lists of ticket ids, and points, a number 0 or more none What was done when the sprint closed, its points, and what was not done.
created timestamp required

Epics and archived tickets do not count as part of a sprint. The dates Clara sets are UTC dates.

sprint.close writes a ## Report section in the body, unless automations.sprint_digest is off. The tickets that are not done leave the sprint, or move to the planned sprint given as into.

Releases

releases/<ID>.md:

Markdown
---
id: v0.2.0
name: Sign-in
status: released
date: 2026-12-01
released: 2026-12-01T16:00:00Z
created: 2026-11-16T18:02:11Z
---

## Changes

- GEN-12 Add email sign-in
Field Type Default Meaning
id slug required Must match the file name.
name title none
status planned or released planned
date date none The planned release date.
released timestamp none When release.ship ran.
created timestamp required

release.ship writes a ## Changelog section in the body: Released on YYYY-MM-DD., then a line - ID title (type) for each done ticket in the release, live or archived, in rank order. The ## Changes section in the example above was written by hand.

Agent profiles

agents/<name>.md. The body is the agent's standing instructions.

Markdown
---
name: claude
adapter: claude
model: null
runtime: local
max_parallel: 2
permissions: guarded
---

You are a careful senior engineer on this project. Prefer small, tested changes.
Field Type Default Meaning
name agent name required Must match the file name. Tickets name the agent as agent:<name>.
adapter slug required Which agent program runs it.
model text, 1 to 100 characters, or null null The model to use. null leaves it to the adapter.
runtime local or actions local
max_parallel whole number, 1 to 32 1
permissions guarded, auto or open guarded
command text, 1 to 2000 characters none For the custom adapter only: the command that starts the agent.

model is the one field that is written as null rather than left out. People write agent profiles by hand; no operation writes them. ticket.assign warns when it assigns an agent that has no profile.

Custom agents

Any agent with a command line can work tickets through the custom adapter. Its profile gives the command as a template:

Markdown
---
name: aider
adapter: custom
command: aider --yes-always --message {prompt}
---
Placeholder Filled with
{prompt} The run's rules and the ticket, as one argument.
{prompt_file} The path of a file holding the same text, for an agent that reads its prompt from a file.
{ticket} The ticket's id.
{model} The run's model. With none, a word that is only {model} is left out, with the option before it, so --model {model} goes as a whole.

With neither {prompt} nor {prompt_file}, the text is given on stdin. The template is split into words as a shell would split it ('…' and "…" quote, \ escapes), but no shell runs it: nothing is expanded, and whatever fills a placeholder stays one word. A placeholder Clara does not know is refused before anything starts.

What Clara can do for a custom agent, and what it cannot:

  • Trust. The command comes from the repository, so it is one of the commands clara trust shows, and nothing runs until a person on this machine trusts it. Changing it asks again.
  • Permissions. Clara cannot hold a command to guarded or auto: it does what its own flags allow. It still runs in a worktree of its own, within the run's time limit, and its work reaches review only through the checks.
  • Tools. It gets no Clara tools in its run. Its rules tell it to commit, then exit 0 when done, or print one question or reason and exit with a nonzero code when not. A nonzero exit blocks the ticket with its last lines.
  • No resume, no spend. Each attempt starts it again with the whole ticket. It reports no tokens or spend, so the run's spend limit cannot stop it; the time limit can.
  • No reviews. A review is read-only, and a command cannot be held to that, so a custom agent is never started as a reviewer.

Playbooks and decisions

Short Markdown notes agents learn from (D10). A playbook, playbooks/<name>.md, says how to do something in this project. A decision, docs/decisions/<name>.md, says what was chosen and why. Agents propose them with clara_brain, action propose, which writes a draft; a person accepts or rejects it (clara docs accept, clara docs reject). Only an accepted note reaches an agent's context pack, and only when it bears on the ticket.

Markdown
---
title: Sign-in tokens are stored hashed
status: accepted
labels: [auth]
tickets: [GEN-4]
files: [src/auth/]
proposed_by: agent:claude
created: 2026-11-18T10:02:11Z
accepted: 2026-11-18T16:40:03Z
accepted_by: sherwin
---

Only the SHA-256 of a sign-in token is kept, so a copy of the table signs nobody in.
Field Type Default Meaning
title text, 1 to 200 characters required
status draft or accepted accepted A note written by hand is accepted; one an agent proposes is a draft.
labels list of labels, at most 20 [] Tickets with one of these labels get the note.
tickets list of ticket ids, at most 50 [] The tickets and epics it is about. The ticket, its epic or parent, and tickets that depend on one of these get the note.
files list of paths, at most 50 [] Paths in the repository it is about: a file, a folder ending in /, or a pattern where * is any part of one name and ** any number of folders. A ticket gets the note when its last hand-in, or a finished dependency's, changed a matching file.
proposed_by actor none Who proposed it.
created timestamp none When it was proposed.
accepted timestamp none When a person accepted it.
accepted_by actor none Who accepted it.

A note with no front matter at all is accepted, and its title is its first # heading, or its name. The file name is the note's name, a slug. Clara keeps keys it does not know.

Which notes a context pack carries is arithmetic, not a model call. Each match scores: the note names the ticket (8), its epic or parent (5), one of its dependencies (3), a label they share (2 each, at most three), a path the ticket's work touched (2). The five with the highest scores go in, decisions before playbooks on a tie, then the most recently accepted; each is cut at 2,000 characters and the pack says what it left out. docs/conventions.md, when there is one, goes in every pack, cut at 1,500 characters.

Saved views

views/<name>.json:

JSON
{
  "name": "my-bugs",
  "query": "type:bug assignee:me sort:priority",
  "layout": "list",
  "group_by": "priority"
}
Key Type Default Meaning
name slug required Must match the file name.
query text, at most 2000 characters required A query in the query language. view.save refuses one that does not parse.
layout board or list board
group_by epic, assignee or priority none

view.save keeps any keys Clara does not know that the file already had.

Ticket templates

templates/<name>.md is what a new ticket can start from (D14): clara add "Title" --template bug, ticket.create with template, or the template field of the web app's new-ticket dialog, which shows only when the board has templates. clara templates lists them. clara init --template web|library|cli|hackathon writes a bug, a feature and a chore template; people write the rest by hand.

Markdown
---
type: bug
priority: p1
labels: [triage]
---

What goes wrong, in a sentence or two.

## Steps to reproduce

The page to start on, then each click or key press, in order.

## Acceptance criteria

- [ ] The steps above no longer show the problem
- [ ] A test covers the case

The front matter takes the keys of a ticket's that are not about one ticket only, with the same rules as on a ticket:

Field Type Default Meaning
type ticket type none
priority p0 to p3 none
points number, 0 to 1000 none
labels list of labels, at most 50 []
epic ticket id none The epic must be on the board when a ticket is made from the template.
release slug none The release must be on the board when a ticket is made from the template.

A template that sets a key only one ticket can have (id, title, status, assignee, parent, sprint, depends_on, links, due, rank, branch, pr, blocked_reason, blocked_question, created, updated, started, completed) is refused with PARSE_ERROR rather than read as an unknown key. Other keys Clara does not know are kept. A file with no front matter is a body and nothing else. The file name is the template's name, a slug, so a name never reaches outside the folder; a file in a subfolder, or one not named as a slug, is not a template. template.list leaves out a file it cannot read, with a warning, and ticket.create refuses to use it, saying why.

A ticket made from a template:

  • takes the template's type, priority, points, epic and release unless it is given its own; without either, type is task and priority is p2;
  • has the template's labels and the ones it is given;
  • has the template's body. A description given replaces the text before the body's first heading and keeps its sections; criteria given are added to the template's own under "Acceptance criteria".

Its created event names the template in data.template.

The activity log

Every change to the board is one event, written as one line of JSON in activity/<YYYY-MM>.jsonl. The month comes from the event's ts. Events are appended and never edited.

JSON
{"v":1,"id":"01JD3KQ8000000000000000001","ts":"2026-11-17T09:31:55Z","actor":"agent:claude","kind":"moved","ticket":"GEN-12","data":{"from":"todo","to":"in_progress"}}
Key Type Meaning
v the number 1 The version of the line.
id ULID Unique, and sorts by time.
ts timestamp When it happened, in UTC to the second.
actor a person name, agent:<name> or system Who did it. system is Clara itself.
kind lower-case word What happened. See Event kinds.
ticket ticket id The ticket it is about. Left out when there is none.
data object The details. Left out when empty.

Clara writes the keys in this order, as compact JSON, with a newline after each line. All the events of one operation share one ts and go in the same commit as the files they describe.

Ids

An event id is a ULID: 26 characters of Crockford base 32 (0123456789ABCDEFGHJKMNPQRSTVWXYZ). The first 10 characters are the time in milliseconds and the last 16 are random, so the first character is 0 to 7. Clara writes ids in upper case and reads lower case as the same id.

Ids from one process never go backwards, even within one millisecond or when the clock steps back. Before it writes, an operation also makes its ids sort after the newest event already in the log, even when that event came from a machine whose clock runs ahead. The event keeps this machine's time in ts, so ts order and id order can differ when clocks disagree.

Order and repeats

Reading the log reads every month file, sorts all events by id and keeps each id once. The id order is the order of history. Replay and every number that comes from the log use it.

A line that cannot be read is reported with its line number, and the other lines still count. The reasons are: it is not valid JSON, it is not a JSON object, v is not 1, the id is missing or is not a ULID, ts is not a valid time, or the actor or kind is missing. A ticket that is not text or a data that is not an object is ignored, and the rest of the event is kept.

After a git merge

.gitattributes tells git to merge the log by keeping the lines of both sides. After such a merge, lines can be out of order or repeated. Reading sorts them by id and drops the repeats, so a merged log reads the same as one written in order.

When a log file was merged without that rule and has conflict markers, the marker lines are reported as lines that are not valid JSON and the events on both sides still count. doctor.fix rewrites the file as the lines of both sides and records a repaired event with fix: "log".

Undo

activity.undo puts back the files of a person's last operation on this machine, and appends an undone event that lists the ids of the events it cancels in data.events. It fails with UNDO_CHANGED when one of those files changed since. The cancelled events stay in the log. Replay and every count leave them out, and the undone event itself changes no state.

Event kinds

The events Clara writes, with the operation that writes each one and its data. A key marked "when set" is left out when it has no value.

Kind Written by ticket data
board_created project.init no key, name; template, the project template, when one was used
created ticket.create yes title, type, status, priority; assignee, sprint, points and epic when set; template when the ticket was made from one
updated ticket.update yes fields: the names of the changed fields; sprint and points (the new value or null) when they changed; title when it changed; from and to, the old and new values (null for none) of the changed fields among title, type, priority, points, sprint, epic, release, due, model and effort, when any changed; why when given (D-161)
refined ticket.update with refine: true, or by an agent rewording a raw ticket yes the same as updated; first: true when this refinement wrote the Original section
moved ticket.move; Clara (system) and doctor.fix when an epic follows its tickets; sync.apply, as the person who merged, when a closing commit lands on the base branch yes from, to; why when given; assignee when a person moved an unassigned ticket into in_progress, blocked or in_review and took it; via: "epic" for an epic; via: "merge" and commit, the closing commit, for a merge, with merge, the commit that brought it onto the base branch, when that is another one
assigned ticket.assign yes assignee (or null); was when it had one
claimed ticket.claim; ticket.move by an agent from todo to in_progress yes from, to: "in_progress", assignee
released ticket.release; ticket.move by an agent back to todo; doctor.fix for a stale claim yes from and to: "todo" when the ticket was in_progress or blocked; assignee: null; was when it had one; note when given
blocked ticket.block yes from: "in_progress", to: "blocked", reason, question
answered ticket.answer yes from: "blocked", to: "in_progress", answer; question when the ticket had one
commented ticket.comment yes text; mentions when the text mentions anyone
attached attachment.add yes name, path (inside .clara), type (image/png, image/jpeg, image/gif or image/webp), size in bytes
checkpointed ticket.checkpoint yes handoff: true when the Handoff changed; ticked and unticked, the criteria numbers, when given
completed ticket.complete yes from: "in_progress", to: "in_review", summary; commit and pr when given; files, the paths the ticket's branch changed against conductor.base_branch (at most 300), when Clara could read them
verified verify.record yes commit, passed, results: one {name, passed, exit_code, duration_ms, tail} per check, where tail is the last 4000 characters of a failing check's output, with secrets hidden as [hidden], and empty for a passing check (D-059)
approved ticket.approve; ticket.move by a person from in_review to done; Clara (system) when checks pass in gates mode, or when the ticket's pull request was merged on GitHub (ticket.merged) yes from: "in_review", to: "done"; self: true when a person approved their own work; note when given; via: "gates" when the checks approved it; via: "pr", pr (its address) and merged_by (a GitHub login) when a merged pull request did
changes_requested ticket.request_changes yes from: "in_review", to: "in_progress", note
rejected ticket.reject yes from: "in_review", to: "todo", assignee: null, note; was when it had an assignee
linked ticket.link yes kind (depends_on, relates or duplicates), target
unlinked ticket.unlink yes kind, target
ranked ticket.rank yes one of before or after (the other ticket's id), or position (top or bottom)
archived ticket.archive yes status
restored ticket.restore yes none
sprint_created sprint.create no sprint, name
sprint_updated sprint.update no sprint, fields; from and to, the old and new values of the changed fields among name, goal, start and end, when any changed; why when given
sprint_started sprint.start no sprint, tickets, total_points: the commitment
sprint_closed sprint.close no sprint, done, returned, total_points (of the done tickets); into when given
release_created release.create no release
release_shipped release.ship no release, tickets: the done tickets
config_changed config.set no setting, old_value, new_value; old_value is null when the setting was not in the file, and new_value is null when it was removed
view_saved view.save no view, query
view_deleted view.delete no view
doc_saved idea.update, brain.rename no path: idea.md, or where a renamed note went, with from
doc_deleted brain.delete no path
knowledge_proposed knowledge.propose no kind (playbook or decision), name, title
knowledge_accepted knowledge.accept no kind, name, title
knowledge_rejected knowledge.reject no kind, name, title; reason when given
imported board.import with apply, last of the events it writes no source: where the export came from, such as jira, name: that source's name for people, created: the ids of the tickets it made, in the export's order, existing: how many items were on the board from an earlier import, skipped: how many it could not read
plan_applied plan.apply, last of the events it writes no plan: the plan's id, created, changed and archived: ticket ids, sprints: the sprint ids it created, tickets: each new epic's and story's ref and the ticket it became, said: when an agent applied it, the words in which the person said to (D-173)
renumbered doctor.fix the new id see below
repaired doctor.fix for replay and conflict see below
migrated project.migrate no from_version, to_version, steps: one sentence per step, files: the files written
run_started the conductor (run.start), as the person or agent who started the run yes run: the run's id, agent (agent:<name>), adapter, branch; model when one was chosen; resumes: true when the run carries on the session of the ticket's last run; purpose: "review" when the run is a reviewer agent's second opinion on work handed in
run_finished the conductor (run.finish) yes run, agent, outcome (a work run: review or blocked; a review run: approved, changes or commented; either: failed, limit, stopped or crashed), duration_s, cost_usd (what the agent reported spending, 0 when it reports nothing), attempts; reason, with secrets hidden, when the run ended another way than its purpose meant: a work run not handed in, a review run without a verdict
chat_started clara start, through session.begin, as the chat's actor yes chat: the chat's id; model, effort and branch when known; resumes: true when the chat carries on the ticket's last one
chat_ended clara start, through session.end, when Claude Code exits yes chat, duration_s (how long it was open), calls (how many of Clara's tools it called); model and effort when known
undone activity.undo no events: the cancelled ids, op: the operation undone; tickets, sorted, when the cancelled events named any
synced sync.apply, as Clara (system) yes what git said about the ticket that no earlier synced event recorded, each key when it has any: commits, the commits whose message names the ticket, newest first, at most 200, each {sha, subject, at, author} (the first line of its message, cut at 200 characters, and its author's name as git has it); branches, the names of the branches whose name holds its id, without a remote's name; landed, the commits on the base branch whose message closes it (D-129)

These kinds are in the list of known kinds, EVENT_KINDS, and no operation in this version writes them: reviewed and agent_saved.

synced

A synced event is a record of git, not a change to the ticket: replay reads nothing from it. sync.apply reads every synced event of a ticket to know what it recorded before, so a commit, a branch or a closing commit is recorded once however often sync runs. A closing commit in landed never closes the ticket again, even after a person reopens it. When sync.apply closes a ticket, it writes the synced event that names the closing commit in landed, then the moved event, in one append.

A reader must accept a kind it does not know. Clara reads such an event like any other and replays it by the conventions below.

renumbered

doctor.fix writes renumbered on the new id when it moves a ticket off a number that two tickets used.

Key Meaning
old_id The old id.
title The ticket's title.
status Its status.
assignee, sprint, points When the ticket has them.
archived true when the ticket is archived. Left out otherwise.
event The id of the created event this ticket came from. Replay then skips that event.

repaired

doctor.fix writes repaired when it changes the board to repair it. data.fix says what it did.

fix ticket Other keys When
log no path; event_count: how many events the repaired file holds A log file had git conflict markers.
git no files: the paths it added lines to .gitignore or .gitattributes was missing a line.
ranks no tickets: the tickets that got a new rank A ticket on the board had an unusable rank.
conflict yes kept: ours or theirs; dropped, when both sides were the same ticket; then the state keys below A ticket file had git conflict markers.
replay yes the state keys below The ticket's file and the log disagreed.

When both sides of a conflicted ticket file are the same ticket, doctor.fix keeps the side that changed last and takes the status, assignee, sprint and points from the log. kept names that side, and dropped lists the fields whose value on the other side was not kept; git history still has them. When the two sides are two tickets that share a number, kept names the side of the ticket created first, and the other is renumbered.

The state keys record what the file says: to (the status), assignee, sprint and points, each null when unset, and archived (true or false). When the ticket's file is gone, they are replaced by removed: true.

What each key means

A key in data means the same thing in every kind that has it, so a reader can use it without knowing the kind.

Key Meaning
from, to A ticket's status before and after. Nothing else.
status A ticket's status at that moment.
assignee Who holds the ticket from now on. null when nobody does.
was Who held it before.
sprint A sprint id: on a ticket's event, the ticket's sprint from now on (null when none); on a sprint's event, that sprint.
points A ticket's estimate from now on. null when it has none.
total_points The sum of the estimates of the tickets the event lists.
tickets, done, returned Ticket ids, as a list.
ticked, unticked Acceptance criteria, by number from 1.
files Paths inside .clara, as a list.
events Event ids, as a list. event is one event id, and event_count a number of events.
old_id A ticket's id before doctor.fix renumbered it.
via What made Clara change a ticket instead of a person: gates when its checks passed, epic when an epic followed its tickets, merge when a commit that closes it landed on the base branch.
commit, merge A git commit's full id: the commit work was handed in or checked at, or the one whose message closes a ticket; and the merge that brought that commit onto the base branch.
commits, branches, landed Git commits linked to a ticket, as {sha, subject, at, author}; branch names; the full ids of the commits that closed it.
setting, old_value, new_value A board setting by its dotted name, and its value before and after.
from_version, to_version Format versions.
fields The names of the fields that changed.
title, name, key, kind, target, view, query, release The ticket title, the board or sprint name, the board's key, the link kind, the linked ticket, a view's name and query, a release id.
reason, question, answer, note, summary, text, mentions What a person or an agent wrote, and the names a comment mentions.

Lines Clara wrote before 0.1.0 can still use older keys: reason: "epic" for via, done and undone for the criteria of checkpointed, points for total_points on sprint events, key, from and to on config_changed, from and to as versions and files as a count on migrated, from as the old id on renumbered, events as a count on a repaired log and tickets as a count on repaired ranks. Clara still reads them, because replay and the timeline of a ticket only use keys whose meaning never changed: to, status, assignee, sprint, points, archived, removed, event, tickets, done, returned and into, and a count or a config value is never taken for a list or a status.

What replay reproduces

Replaying the log from the first event gives, for every ticket, its status, assignee, sprint, points and whether it is archived. The board at a past moment comes from replaying the events up to that ts. doctor.check compares all five with the files, and reports a ticket that is only in the files or only in the log.

Replay reads these keys in data, whatever the kind:

Key Effect
to The ticket's status, when it is a status.
assignee The assignee. null or empty clears it.
sprint The sprint. null or empty clears it.
points The estimate. null clears it.

Some kinds do more:

  • created and renumbered start the ticket from status (default todo), assignee, sprint, points and archived. A created event named by a renumbered event's event is skipped.
  • archived marks the ticket archived, and restored marks it live.
  • repaired with removed: true drops the ticket. Otherwise it starts the ticket if the log never did, and sets the archive flag when archived is true or false.
  • sprint_closed takes each ticket in returned that is still in sprint out of it, or moves it to into.
  • Events cancelled by an undone event are left out.

Replay does not reproduce titles, bodies, labels or any other field. The files hold those.

How Clara writes files

The same record always gives the same bytes, so a file changes only when its content changes and git diffs stay small.

Markdown files

Tickets, sprints, releases and agent profiles are written as:

  • a line ---;
  • the front matter, one key per line;
  • a line ---;
  • when the body is not empty, a blank line, the body, and a newline.

Leading blank lines and trailing whitespace of the body are removed. A file with no body ends right after the second ---.

Front matter

  • Key order. The known fields in the order of the field tables on this page, then unknown keys in the order they were read.

  • Left out. A field with no value. For tickets, also an empty labels, depends_on or rank, empty links, and an empty list inside links. Fields that have a default, such as type, status and priority, are always written. Agent model is written as null.

  • Text is written without quotes when every YAML reader reads it back as the same text. It is put in double quotes, JSON style, when it:

    • is empty or longer than 240 characters;
    • starts with anything but a letter, digit or underscore, or contains a character outside letters, digits, spaces and _ . / @ + : ( ) ' ! ? = ~ * % $ ^ & ; < > , -;
    • ends with a space or :, or contains : ;
    • is null, true, false, yes, no, on, off, y, n, nan or inf, in any case;
    • looks like a number, a time or a version, such as 128 or 0.5. A calendar date such as 2026-12-01 is written without quotes.

    Inside a list, , and : also need quotes. In the full ticket above, the title is quoted because it contains : , pr because 128 looks like a number, and the labels c# and area:auth because of # and :.

  • Numbers are written as JavaScript writes them: 3, 0.5, 8.5. -0 is written 0.

  • true, false and null are written as such.

  • A list of plain values is written on one line: [auth, backend].

  • A map whose values are plain values or lists of them is written as an indented block of two spaces, as links and commitment are.

  • Anything else, such as a list of maps, is written on one line as JSON, with every key quoted: reports: [{"from": "support", "count": 3}].

  • Keys are written without quotes when they are a letter or underscore followed by letters, digits, underscores and dashes, and are not one of the reserved words above. Other keys are quoted. Front matter that uses __proto__, constructor or prototype as a key is refused. In config.json and views those keys are ignored.

Clara reads front matter in two ways. A fast reader understands exactly what the writer produces. Anything else, such as YAML a person wrote by hand, goes to a full YAML reader.

JSON files

config.json, views and undo records are written by JSON.stringify. config.json and views are indented by two spaces, so each list item is on its own line, as in the examples above. Undo records are one line. Log lines are compact JSON, one event per line.

Line endings and the final newline

Clara writes \n line endings only, and every file ends with exactly one newline. When it reads, it removes a byte order mark and turns \r\n and \r into \n, so a file that an editor saved with other line endings still reads.

Versions and migration

The format version

The format version is FORMAT_VERSION in the library. It is 1. config.json records the version of each board in version, and every log line carries v: 1.

  • A board with a higher version than this Clara reads is refused with UNSUPPORTED_VERSION before anything else in config.json is checked. The hint says to upgrade Clara.
  • A board with a lower version is refused with MIGRATION_NEEDED by every operation except project.migrate, which upgrades it.
  • A log line whose v is not 1 is reported and skipped.

Migration steps

MIGRATIONS is the list of steps, oldest first. It is empty, because version 1 is the first format. A step has:

Field Meaning
from The version it reads. It writes version from + 1.
description One sentence that says what it changes.
migrate(files) Takes every file of the board by path, as text, and returns the files it changes: new text, or null to remove a file.

A step must not change version in config.json. The runner sets it once every step has run.

project.migrate

project.migrate takes the board from its version to FORMAT_VERSION, one step at a time.

  • It plans the steps from the board's version. A version that is not a whole number of 1 or more fails with PARSE_ERROR. A version newer than this Clara fails with UNSUPPORTED_VERSION. A missing step is a bug in Clara and fails with INTERNAL.
  • When the board is already current, it returns from and to with no steps and no files, and writes nothing.
  • Otherwise it reads every file of the board except activity/, .cache/ and .local/, and runs the steps in order. Each step sees what the steps before it wrote.
  • It sets version in config.json, checks the new config.json, and writes the files that changed in one commit with a migrated event.
  • It returns from, to, steps (the descriptions) and files (the paths that changed, sorted).
  • With dry_run: true it returns the same and writes nothing.

Only a person can run it, and it cannot be undone. Commit the board before running it, so the change is easy to review. The log is never migrated.

JSON Schemas

Clara publishes a JSON Schema for each kind of file, for editors and other tools. The package exports them as clara-ipm/schemas/<name>.schema.json, and jsonSchemas() returns the same objects in code.

File Title Describes
clara-ipm/schemas/config.schema.json Clara board config config.json
clara-ipm/schemas/ticket.schema.json Clara ticket the front matter of tickets/<ID>.md and archive/<ID>.md
clara-ipm/schemas/sprint.schema.json Clara sprint the front matter of sprints/<ID>.md
clara-ipm/schemas/release.schema.json Clara release the front matter of releases/<ID>.md
clara-ipm/schemas/agent.schema.json Clara agent profile the front matter of agents/<name>.md
clara-ipm/schemas/note.schema.json Clara note the front matter of playbooks/<name>.md and docs/decisions/<name>.md
clara-ipm/schemas/view.schema.json Clara saved view views/<name>.json
clara-ipm/schemas/template.schema.json Clara ticket template the front matter of templates/<name>.md
clara-ipm/schemas/event.schema.json Clara activity event one line of activity/<YYYY-MM>.jsonl

Each schema uses JSON Schema draft 2020-12 and has a title and a description. The guarantee, as jsonSchemas() states it:

JSON Schemas for the files in .clara, for editors and other tools. Every file Clara writes passes, and every file a schema accepts, Clara reads: names, dates, labels and the rest are the same patterns Clara checks, and lengths count characters as both do. Clara reads a little more than they allow, to forgive hand edits: an optional field left empty, which it reads as unset, and a pull request written as a bare number. A title of 404 is not forgiven; it needs quotes, and Clara says so. They also refuse an offset that might take a time on the first day of year 0 or the last of year 9999 out of range, which takes a sum to tell. What a single file cannot show, such as whether an epic exists, is checked by clara doctor. The build publishes them as clara-ipm/schemas/<name>.schema.json.

  • The schemas come from the same definitions Clara uses to read files, so the field names, types, defaults, allowed values, number ranges and lengths are the ones on this page.
  • Every rule Clara checks in a single field is a pattern or a bound in the schema: a ticket id, a date, a time with its zone, a name (and the Windows device names it may not be), a label, a branch, a pull request, an assignee, an actor and a single-line title. Patterns use the u flag, as JSON Schema requires, so a length counts characters and an emoji is one.
  • Every schema allows keys it does not list. Clara keeps such keys in every file except a log line, where it ignores them. The front matter schemas refuse __proto__, constructor and prototype as a key at any depth, as Clara does.
  • Clara forgives three things the schemas refuse, all in front matter: an optional field left empty, which reads as unset; a pull request written as a bare number, such as pr: 42; and a time on the first day of year 0 written ahead of UTC, such as 0000-01-01T00:30:00+00:30, which it reads in UTC. Nothing else passes Clara that fails a schema. A test holds Clara and the schemas to this, field by field and file by file.
  • What one file cannot show is not in the schemas: whether a ticket an epic or a dependency names exists, or whether two tickets share an id. clara doctor reports those.