Skip to content

Schema Types

Brainfile uses JSON Schema to define the structure of task boards.

Available Schemas

SchemaURLPurpose
Base/v1/base.jsonShared fields (title, agent, rules)
Board/v1/board.jsonKanban task management
Contract/v1/contract.jsonTask contract object (task.contract)

Board (Default)

Kanban-style task boards with columns and draggable tasks.

yaml
---
type: board
schema: https://brainfile.md/v1/board.json
title: My Project
columns:
  - id: todo
    title: To Do
    tasks:
      - id: task-1
        title: Implement feature
        priority: high
---

Structure: columns[] containing tasks[]

Renderer: Kanban board with columns

View Board Schema · Example


Contract (Task Extension)

Task contracts define structured deliverables, validation commands, and constraints for PM-to-agent workflows.

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

View Contract Schema · Docs


Base Schema

All brainfiles 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: []
---

View Base Schema


Type Inference

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

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

Schema Directory

Browse all schemas at brainfile.md/v1/

json
{
  "schemas": {
    "base": { "url": "https://brainfile.md/v1/base.json" },
    "board": { "url": "https://brainfile.md/v1/board.json" }
  }
}

Next Steps

Released under the MIT License.