Schema Types
Brainfile uses JSON Schema to define the structure of task boards.
Available Schemas
| Schema | URL | Purpose |
|---|---|---|
| Base | /v1/base.json | Shared fields (title, agent, rules) |
| Board | /v1/board.json | Kanban task management |
| Contract | /v1/contract.json | Task 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
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 testBase 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: []
---Type Inference
When type is not specified, tools determine the type by:
- Schema URL —
/v1/board.json→ board - Filename suffix —
project.board.md→ board - Structural analysis —
columns[]present → board - 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
- Protocol Specification — File format details
- API Reference — Library documentation
- Core Library — Build custom tools