Skip to content

Ledger Schema Reference

The ledger record schema defines a single completion entry in .brainfile/logs/ledger.jsonl.

Source of Truth: ledger-record.json

Record Shape

FieldTypeRequiredSourceDescription
idstringYesTask frontmatter (id)The unique identifier of the completed item (e.g., task-1, epic-2, adr-3).
typestringYesTask frontmatter (type)The item type. Supported values: task, epic, adr.
titlestringYesTask frontmatter (title)The title of the item at the time of completion.
columnHistoryArray<string>NoTask lifecycle trackingAn ordered list of workflow columns visited before completion.
assigneestringNoTask frontmatter (assignee)The final assignee assigned to the task upon completion.
prioritystringNoTask frontmatter (priority)The priority level at completion. Supported values: low, medium, high, critical.
tagsArray<string>NoTask frontmatter (tags)A list of tags used for categorization and filtering.
parentIdstringNoTask frontmatter (parentId)The ID of the parent item, if applicable.
relatedFilesArray<string>NoTask frontmatter (relatedFiles)The list of files declared as context in the task metadata.
filesChangedArray<string>YesCompletion runtimeThe list of file paths created or modified during the task.
deliverablesArray<string>NoContract (contract.deliverables[].path)The paths of deliverables defined in the contract.
contractStatusstringNoContract (contract.status)The final status of the contract upon completion.
validationAttemptsintegerNoContract validation runtimeThe total number of validation attempts made before the task was completed.
constraintsArray<string>NoContract (contract.constraints)The implementation constraints copied from the contract.
createdAtstring (date-time)YesTask metadata (createdAt)The ISO 8601 timestamp indicating when the task was created.
completedAtstring (date-time)YesCompletion runtimeThe ISO 8601 timestamp indicating when the task was completed.
cycleTimeHoursnumberYesComputed at completionThe total time elapsed between createdAt and completedAt, measured in hours.
summarystringYesAgent completion summaryA brief retrospective summary of the work performed.
subtasksCompletedintegerNoTask subtask snapshotThe number of subtasks completed at the time of finalization.
subtasksTotalintegerNoTask subtask snapshotThe total number of subtasks defined at the time of completion.

Notes

  • The schema validates one JSON object per line, not the entire JSONL file as an array.
  • Records are append-only: new completions add lines, and existing lines are not rewritten.
  • createdAt and completedAt use ISO 8601 date-time format (YYYY-MM-DDTHH:mm:ssZ).

Released under the MIT License.