Skip to content

Schema Types

Brainfile uses JSON Schema to define the structure of board configuration and task files.

Available Schemas

Schemav2 URLPurpose
Base/v2/base.jsonShared fields (title, agent, rules)
Board/v2/board.jsonBoard configuration (columns, types)
Task/v2/task.jsonStandalone task documents
Contract/v2/contract.jsonTask contract object (task.contract)
Epic/v2/epic.jsonEpic documents (groups related tasks)
ADR/v2/adr.jsonArchitecture Decision Records

Extensible by design

These are the built-in types, but Brainfile is not limited to them. You can define your own schema types for any use case — bug, rfc, spike, incident, whatever fits your workflow. Just set type: your-type in the frontmatter and optionally point schema: to your own JSON Schema URL.

Board (Default)

Board configuration defines columns, document types, and project rules. Tasks are standalone files in .brainfile/board/.

yaml
---
type: board
schema: https://brainfile.md/v2/board.json
title: My Project
columns:
  - id: todo
    title: To Do
  - id: in-progress
    title: In Progress
types:
  epic:
    idPrefix: epic
    completable: false
---

Minimal Board

yaml
---
type: board
title: My Project
columns:
  - id: todo
    title: To Do
---

Only title and one column are required.

View Board Schema · Example

Task

Standalone task documents with YAML frontmatter and optional markdown body. Each task is an individual .md file in .brainfile/board/ (active) or .brainfile/logs/ (completed).

yaml
---
id: task-1
title: Implement feature
column: todo
priority: high
tags: [backend]
assignee: codex
parentId: epic-1
---

Minimal Task

yaml
---
id: task-1
title: Fix login bug
column: todo
---

Only id, title, and column are required.

View Task Schema · Docs

Contract (Task Extension)

Task contracts define structured deliverables, validation commands, and constraints for PM-to-agent workflows. Embedded in the contract field of a task file.

yaml
contract:
  status: ready
  deliverables:
    - type: file
      path: src/feature.ts
      description: Implementation
  validation:
    commands:
      - npm test

Minimal Contract

yaml
contract:
  status: ready

Only status is required — deliverables and validation are optional.

View Contract Schema · Docs

Parent-Child Relationships

Any document can be a parent or child of any other document using parentId. The parent tracks its children with a children array, and each child points back with parentId. This is not limited to epics — you can nest tasks under tasks, ADRs under epics, or any combination that fits your workflow.

yaml
# Parent: a regular task
---
id: task-10
title: Refactor auth module
column: in-progress
children: [task-11, task-12, task-13]
---

# Child: points back to parent
---
id: task-11
title: Extract token validation
column: todo
parentId: task-10
---

Epic

A common pattern for grouping related work. Epics extend the task schema with children and status fields, but any type can serve as a parent.

yaml
---
id: epic-1
type: epic
title: Authentication System
column: in-progress
children: [task-1, task-3, task-4]
status: active
---

Minimal Epic

yaml
---
id: epic-1
type: epic
title: Authentication System
column: todo
---

children and status are optional — add them as tasks are created.

View Epic Schema

ADR

Architecture Decision Records with lifecycle status and supersession tracking. Extends the task schema.

yaml
---
id: adr-1
type: adr
title: Use Postgres for user data
column: todo
status: proposed
---

Minimal ADR

yaml
---
id: adr-1
type: adr
title: Use Postgres for user data
column: todo
---

status defaults to proposed if omitted.

View ADR Schema

Base Schema

All brainfile config files inherit from the base schema which defines shared fields:

yaml
---
title: string           # Required
type: string            # Optional (defaults to board)
schema: string          # Optional JSON schema URL
protocolVersion: string # Optional version string
agent:
  instructions: []
  llmNotes: string
  tools: {}
rules:
  always: []
  never: []
  prefer: []
  context: []
---

Minimal Base

yaml
---
title: My Project
---

Only title is required — everything else has sensible defaults.

View Base Schema

Type Inference

When type is not specified, tools determine the type by:

  1. Schema URL/v2/board.json → board
  2. Filename suffixproject.board.md → board
  3. Structural analysiscolumns[] present → board
  4. Default → board

Schema Directories

VersionURLStatus
v2brainfile.md/v2/Current

Next Steps

Released under the MIT License.