Skip to content

Base Schema

The base schema defines fields that are shared across all brainfile types.

Inherited by All Types

The base schema is the foundation — every brainfile type (Board, Task, Epic, ADR) inherits these fields. You don't need to declare type: board in most cases, as it's the default.

Schema URL

https://brainfile.md/v2/base.json

Overview

The base schema establishes the foundational structure for the Brainfile protocol:

  • Common metadata fields (title, schema, version)
  • AI agent instructions
  • Project rules
  • Reusable definitions (timestamps, rules)

Required Fields

title

Type: stringMin Length: 1 Description: Human-readable title for the brainfile

yaml
title: My Project Board              # Required — must be non-empty

Optional Fields

type

Type: stringDefault: boardDescription: Type identifier

yaml
type: board                           # Optional — defaults to "board"

schema

Type: string (URI) Description: Reference to the specific schema for validation

yaml
schema: https://brainfile.md/v2/board.json  # Optional — enables schema validation

protocolVersion

Type: string (semver pattern) Pattern: ^[0-9]+\.[0-9]+\.[0-9]+$Default: 2.0.0Description: Version of the Brainfile protocol

yaml
protocolVersion: 2.0.0               # Optional — defaults to 2.0.0

agent

Type: objectDescription: Instructions for AI agents interacting with the brainfile

yaml
agent:                              # Optional — AI agent configuration
  instructions:                     # Optional — behavioral rules
    - Modify only the YAML frontmatter
    - Preserve all IDs
  llmNotes: This project uses TypeScript and React  # Optional — free-form context
  tools:                            # Optional — available CLI tools
    brainfile:
      prefer: true
      commands:
        - move --task <id> --column <id>
        - add --title "..." --column <id>

agent.instructions

Type: array of stringDescription: List of specific instructions for AI behavior

agent.llmNotes

Type: stringDescription: Free-form notes about project context and preferences

agent.tools

Type: objectDescription: CLI tools available for agents to use

rules

Type: objectDescription: Project rules organized by category

yaml
rules:                              # Optional — project rules
  always:                           # Optional — must always follow
    - id: 1
      rule: test all features before moving to done
  never:                            # Optional — must never violate
    - id: 1
      rule: skip code review
  prefer:                           # Optional — preferred approaches
    - id: 1
      rule: small focused tasks over large epics
  context:                          # Optional — contextual info
    - id: 1
      rule: this is a TypeScript project

Rule Categories

CategoryPurposeExample
alwaysMust always followAlways write tests
neverMust never violateNever skip code review
preferPreferred approachesPrefer functional style
contextContextual infoThis is a React project

Reusable Definitions

timestamp

Type: string (ISO 8601) Format: date-timeExamples:

  • 2025-11-24T10:30:00Z
  • 2025-11-24T14:22:00-08:00

Used by type-specific schemas for createdAt and updatedAt fields.

rule

Type: objectRequired: id, ruleStructure:

json
{
  "id": 1,
  "rule": "Rule text here"
}

Example

yaml
---
type: board
schema: https://brainfile.md/v2/board.json
title: Production Project
protocolVersion: 2.0.0
agent:
  instructions:
    - Modify only YAML frontmatter
    - Preserve all IDs
  llmNotes: React + TypeScript + Tailwind CSS
  tools:
    brainfile:
      prefer: true
rules:
  always:
    - id: 1
      rule: write tests
  never:
    - id: 1
      rule: skip reviews
columns: [...]
---

See Also

Released under the MIT License.