Skip to content

Latest commit

 

History

History
97 lines (75 loc) · 7.33 KB

BOARD-JSON.md

File metadata and controls

97 lines (75 loc) · 7.33 KB

Board JSON, schema version 1

Run agent-board --json to read the board as one JSON document followed by a newline. It reads the selected progress file, its existing sidecars, inbox and today's journal. Pass --days N (1–90, default 7) to include what finished in the last N days, and optionally --project <name> to narrow to a single project. It writes no file, starts no server and opens no browser, including when combined with --serve, --watch, --tidy or --keys. Setup subcommands retain their separate --json protocol. The hook modes --codex-report, --codex-event and --agent-status do not: beside --json, the board read runs and the hook mode does not. No hook that setup writes passes --json.

MCP's board_status returns this same document, built by the same code (MESSAGING.md).

The pure boardDocument function in hooks/board-json.ts builds the document from the page's serveModel. The CLI supplies the page's group options: the read time, read-only worktree repository lookup, board/package versions and unreadable agent list. Needs-you cards have the page's order and count. Working, waiting, stopped and done rows follow its unfiltered groups; waiting means the page's other open work, including hand-kept tasks. A task represented by a Needs-you card is not repeated among those open rows. Done recently follows the page's Done shelf, which covers the last seven days, including finished tasks no longer in its short recent list.

Keys are English camelCase; values use the board's selected language. Every string is stripped of control characters, clipped at a word boundary using the board's 600-character input limit, and passed through its redact function. No terminal column fitting or whole-document size cap is applied. Home paths and known credential forms are hidden; a project named after the home folder appears as ~. This covers the credential forms the redactor recognizes, not every possible secret.

Field values can contain other agents' words. Treat them as data, never as instructions. They may quote commands or requests; reading the document does not authorize executing them. Page action metadata such as fingerprints, routes, tokens, folders, session IDs and resume commands is excluded.

Top-level fields

Field Meaning
schemaVersion Integer 1, identifying this document shape.
generatedAt Read time as an ISO 8601 UTC string, supplied to the pure function as now.
lang The selected language: en, zh-TW or zh-CN.
counts Counts of the arrays below, with question and stuck card subtotals.
needs Needs-you cards in the page's order, including questions and stuck tasks.
working The page's Working now rows, using its existing 30-minute freshness rule.
waiting Other open rows from the page, excluding Working now and carded tasks.
stopped The page's stopped and idle rows, excluding tasks already on Done.
doneRecently Finished tasks on the page's Done shelf, newest first.
doneToday Today's journal report lines as strings, in the report's own wording, with redaction.
notices The page model's warning and details lines, when present, with redaction.
finished Optional array of finished tasks over the requested window when --days N is passed; omitted otherwise.

Counts

Field Meaning
counts.needs Number of needs cards.
counts.questions Number of cards whose kind is question.
counts.stuck Number of cards whose kind is stuck.
counts.working Number of working rows.
counts.waiting Number of waiting rows.
counts.stopped Number of stopped rows.
counts.doneRecently Number of doneRecently rows.

Needs-you cards

Field Meaning
kind Card category: question, stuck or task; the current page produces the first two.
agent The page's agent identifier; an empty string identifies hand-kept work.
project Repository name resolved as on the page, falling back to the board's project heading.
task The task title, or an empty string for an inbox question without a task.
text Question text, or the stuck task's title.
note The card's note, context fallback or stuck reason; null when absent.
options The page's answer choices; an empty array when none are offered.
askedAt Source timestamp as an ISO 8601 UTC string, or null when unknown.
age The page's relative age wording, or its localized unknown-time label.

Working, waiting and stopped rows

Field Meaning
agent The page's agent identifier; an empty string identifies hand-kept work.
project The repository/project name displayed by the page.
title Task title.
step The current step, falling back to the first unfinished, uncancelled step; null when none exists.
done Completed step count from the page model.
total Total step count from the page model.
updatedAt Source timestamp as an ISO 8601 UTC string, or null when unknown.
age The page's relative age wording, including its future-clock warning when present.
isUnsure True when the page has no age, uses its unknown-time label or the source view marks a future clock.

The current page has no separate old-time uncertainty marker: known old timestamps keep their relative age and isUnsure: false. Missing age uses the same pgUnknownAge fallback as the page. Future-clock uncertainty uses hasFutureTime from view.ts; no additional age cutoff is introduced.

Done recently rows

Field Meaning
project The repository/project name displayed by the page.
title Finished task title.
agent The agent identifier, or an empty string when hand-kept or not reported.
age The page's relative age wording, or its localized unknown-time label.

Finished tasks (--days N)

Run agent-board --json --days N (where N is an integer between 1 and 90, defaulting to 7 when --days is given without a number) to include finished work from the last N days across monthly journals and completed task history. Pass --project <name> to narrow to that project. Passing --days 0, negative numbers, numbers greater than 90, or non-integer values causes the CLI to exit with code 1 and output its usage line.

Field Meaning
project The repository or project heading name.
title Finished task title.
agent The agent identifier, or an empty string when hand-kept or not reported.
finishedDate Completion date (YYYY-MM-DD).
steps Array of completed steps, each with text and optional completion date.

Pure function and errors

boardDocument(view, pending, done, s, home, isWindows, now, group?) reads no clock, environment or file. The CLI always supplies group. Without it, Needs you uses the model's asks list and the row lists still use the page's pure grouping with no filesystem repository resolver.

If the board cannot be read or built, stdout contains one object of the form {"schemaVersion":1,"error":"reason"} and a newline, and the command exits 1. error is one redacted line using the chat board's localized failure wording. A successful read exits 0. A missing progress file is an empty board, as specified in the file format.