Domain Bundle File Formats
This guide is the format contract for Domain Bundles.
A Domain Bundle is the folder-scoped configuration unit for one domain:
config/domains/<domain_id>/cerebrum.mdconfig/domains/<domain_id>/cortices/*.md
The intent is to align humans and LLMs on one authoring model before any additional implementation work.
Status
Section titled “Status”Current status: Draft for review.
Use this document to propose changes, agree on names and required fields, then implement.
Pre-v1 schema policy:
- This format can change quickly while we iterate.
- Once a standard is chosen (for example key case), switch immediately.
- Do not keep compatibility aliases for superseded markdown key shapes.
Design Principles
Section titled “Design Principles”- One file, two parts: YAML frontmatter plus Markdown body.
- Frontmatter is machine-readable contract data.
- Markdown body is human and LLM guidance.
- Bundle structure should support progressive disclosure.
- Source references should support local first, remote later.
Naming Convention
Section titled “Naming Convention”All markdown config keys and identifiers in this format must use kebab-case.
Rule:
- Use kebab-case for frontmatter keys, reference keys, and profile/role identifiers.
- Do not introduce new snake_case keys in markdown config files.
- Do not preserve or add snake_case compatibility paths for markdown keys.
Examples:
domain-idnotdomain_idrequired-corticesnotrequired_corticesmodule-pathnotmodule_path
Exceptions:
- Python import values and symbol values are not reformatted. For example,
cdp.comms_cortexandcreate_cli_comms_cortexremain unchanged as values. - Free-form payloads inside metadata values can contain snake_case when needed by downstream systems.
Domain Bundle Layout
Section titled “Domain Bundle Layout”config/domains/ <domain_id>/ cerebrum.md cortices/ <cortex-id>.mdFile Anatomy
Section titled “File Anatomy”Every config file uses:
- Opening
--- - YAML frontmatter
- Closing
--- - Markdown body
Domain Root File (cerebrum.md)
Section titled “Domain Root File (cerebrum.md)”Path:
config/domains/<domain_id>/cerebrum.md
Required frontmatter fields:
| Field | Type | Required | Notes |
|---|---|---|---|
kind |
string | yes | Must be cerebrum. |
name |
string | yes | Human-readable name. |
description |
string | yes | What this Domain Bundle is for and when to use it. |
version |
string | yes | Bundle schema/version tag. |
domain-id |
string | yes | Must match folder name. |
tenant-id |
string | yes | Tenant scope identifier. |
lifecycle |
string | yes | Example: proposed, active. |
required-cortices |
list | yes | Items must contain id and source. |
degradable-cortices |
list | yes | Items may fail without blocking boot; explicit list, can be empty. |
Optional frontmatter fields:
| Field | Type | Notes |
|---|---|---|
metadata |
mapping | Extension-safe metadata for non-runtime concerns. |
Reference item shape (for both required and degradable lists):
| Field | Type | Required | Notes |
|---|---|---|---|
id |
string | yes | Logical cortex identifier. |
source |
string | yes | Local relative path now; remote later. |
Cortex File
Section titled “Cortex File”Path:
config/domains/<domain_id>/cortices/<cortex-id>.md
Required frontmatter fields:
| Field | Type | Required | Notes |
|---|---|---|---|
kind |
string | yes | Must be cortex. |
id |
string | yes | Must match the cerebrum reference id. |
role |
string | yes | Example: communication. |
profile |
string | yes | Profile key used by boot/chat selection. |
description |
string | yes | Human-readable summary. |
launch |
mapping | yes | Runtime launcher configuration. |
Required launch fields:
| Field | Type | Required | Notes |
|---|---|---|---|
launch.launcher |
string | yes | MVP uses inprocess. |
launch.target.module-path |
string | yes | Python module import path. |
launch.target.symbol-name |
string | yes | Callable symbol name. |
Optional frontmatter fields:
| Field | Type | Notes |
|---|---|---|
agent |
mapping | Prompt/model extras and agent hints. |
metadata |
mapping | Operational metadata. |
Source Reference Model
Section titled “Source Reference Model”Current support:
- Local relative markdown paths such as
./cortices/cli-comms-cortex.md.
Planned support:
- URL references.
- Repository references.
- Mixed local and remote references in one Domain Bundle.
Progressive Disclosure Model
Section titled “Progressive Disclosure Model”The loader flow should be:
- Read cerebrum frontmatter only.
- Select candidate cortex refs by role/profile and required/degradable rules.
- Load only selected cortex files.
- Validate and compile runtime launch inputs.
This keeps context and parse work small while scaling to larger bundles.
Validation Rules
Section titled “Validation Rules”Baseline validation should enforce:
domain-idmatches folder.kindvalues are exact (cerebrum,cortex).- Every cortex ref has
id+source. - Cortex file
idmatches referenceid. - Required launch target fields exist for selected cortices.
- Clear errors for unsupported remote sources.
Example: Cerebrum
Section titled “Example: Cerebrum”---kind: cerebrumname: demo-cerebrumdescription: Single-cortex MVP Domain Bundle for local CLI chat validation.version: v0domain-id: demotenant-id: tenant-demolifecycle: proposedrequired-cortices: - id: comm.cli source: ./cortices/cli-comms-cortex.mddegradable-cortices: []---
# Demo Domain Bundle
Authoring notes for humans and LLMs.Example: Cortex
Section titled “Example: Cortex”---kind: cortexid: comm.clirole: communicationprofile: clidescription: Communication cortex for terminal chat.launch: launcher: inprocess target: module-path: cdp.comms_cortex symbol-name: create_cli_comms_cortex---
# CLI Communication Cortex
Behavior and operating notes.Review Checklist
Section titled “Review Checklist”Use this checklist before implementation updates:
- Field names are stable and clear.
- Required vs degradable fields are agreed.
- Source reference roadmap is accepted.
- Validation rules are complete enough for MVP.
- Examples are copy-paste runnable.
Implementation Plan
Section titled “Implementation Plan”Phase 1:
- Enforce this bundle layout in local config.
- Validate required frontmatter fields.
- Keep remote sources explicitly unsupported.
Phase 2:
- Add remote source resolver abstraction.
- Add trust and provenance checks.
- Add merge policy for mixed local and remote cortex configs.