chore(brain): rename CLAUDE.md to schema.md for clarity
CLAUDE.md has a specific meaning in the Claude Code ecosystem (agent instructions). The wiki schema for the ingestion pipeline should live in schema.md to avoid confusion. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
154
brain/schema.md
Normal file
154
brain/schema.md
Normal file
@@ -0,0 +1,154 @@
|
||||
# Brain Wiki Schema
|
||||
|
||||
This document defines the three page types in the brain wiki.
|
||||
The LLM must follow this schema exactly when generating wiki pages.
|
||||
|
||||
## Wikilink Format
|
||||
|
||||
All cross-references use `[[slug|Display Text]]`.
|
||||
|
||||
Rules:
|
||||
- slug = lowercase filename without .md, spaces → hyphens, strip all non-alphanumeric except hyphens
|
||||
- The `|` separator is REQUIRED — never use `[[Title]]` without a slug
|
||||
- Examples: `[[domain-driven-design|Domain Driven Design]]`, `[[ryan-singer|Ryan Singer]]`
|
||||
- Slugs must resolve to an existing file in the inventory, or a file you are creating in this response
|
||||
|
||||
Slug generation examples:
|
||||
- "Domain Driven Design" → `domain-driven-design`
|
||||
- "It's Complicated" → `its-complicated`
|
||||
- "gRPC" → `grpc`
|
||||
- "GPT-4o" → `gpt-4o`
|
||||
|
||||
## Domains
|
||||
|
||||
Use one of: `ai-llm`, `software-engineering`, `product-strategy`, `finance-markets`,
|
||||
`personal`, `consulting`, `climate`, `infrastructure`, `security`
|
||||
|
||||
---
|
||||
|
||||
## Source Pages — wiki/sources/<slug>.md
|
||||
|
||||
One page per ingested source. Books are NEVER split across multiple source pages — update the existing one.
|
||||
|
||||
Required frontmatter:
|
||||
```yaml
|
||||
title: <exact title>
|
||||
type: article | pdf | book | video | note | project
|
||||
domain: <domain>
|
||||
date_ingested: YYYY-MM-DD
|
||||
last_updated: YYYY-MM-DD
|
||||
aliases:
|
||||
- <exact title>
|
||||
```
|
||||
|
||||
Body sections (in this order):
|
||||
|
||||
### Summary
|
||||
2–3 sentences. Core argument or finding.
|
||||
|
||||
### Key Claims
|
||||
Bulleted list. Paraphrase — no verbatim quotes or code.
|
||||
|
||||
### Concepts Introduced or Reinforced
|
||||
Wikilinks to wiki/concepts/ ONLY. One per line.
|
||||
|
||||
### Entities Mentioned
|
||||
Wikilinks to wiki/entities/ ONLY. One per line.
|
||||
|
||||
### Open Questions Raised
|
||||
Gaps or follow-up questions from this source.
|
||||
|
||||
For books only, also add:
|
||||
|
||||
### Chapters
|
||||
One bullet per chapter with 1–2 sentence summary.
|
||||
|
||||
### Argument Arc
|
||||
Overall narrative as it becomes clear across chapters.
|
||||
|
||||
### Updates
|
||||
Dated entries appended on re-ingestion. NEVER rewrite — only append.
|
||||
|
||||
---
|
||||
|
||||
## Concept Pages — wiki/concepts/<slug>.md
|
||||
|
||||
One page per idea, framework, methodology, or pattern.
|
||||
|
||||
Required frontmatter:
|
||||
```yaml
|
||||
title: <concept name>
|
||||
domain: <domain>
|
||||
last_updated: YYYY-MM-DD
|
||||
aliases:
|
||||
- <exact title>
|
||||
```
|
||||
|
||||
Body sections (in this order):
|
||||
|
||||
### Definition
|
||||
One-paragraph plain-language explanation.
|
||||
|
||||
### Why It Matters
|
||||
Practical significance. Why should anyone care?
|
||||
|
||||
### Related Concepts
|
||||
Wikilinks to wiki/concepts/ ONLY.
|
||||
|
||||
### Related Entities
|
||||
Wikilinks to wiki/entities/ ONLY.
|
||||
|
||||
### Sources
|
||||
Wikilinks to wiki/sources/ ONLY.
|
||||
|
||||
### Evolving Notes
|
||||
Updated as new sources arrive. Append, do not rewrite.
|
||||
|
||||
---
|
||||
|
||||
## Entity Pages — wiki/entities/<slug>.md
|
||||
|
||||
One page per person, tool, organisation, technology, or product.
|
||||
|
||||
Required frontmatter:
|
||||
```yaml
|
||||
title: <name>
|
||||
type: person | company | tool | model | framework | technology
|
||||
domain: <domain>
|
||||
last_updated: YYYY-MM-DD
|
||||
aliases:
|
||||
- <exact title>
|
||||
```
|
||||
|
||||
Body sections (in this order):
|
||||
|
||||
### Description
|
||||
One-line description.
|
||||
|
||||
### Relevance
|
||||
Why this entity matters to this knowledge base.
|
||||
|
||||
### Key Positions, Products, or Claims
|
||||
With dates where known.
|
||||
|
||||
### Related Concepts
|
||||
Wikilinks to wiki/concepts/ ONLY.
|
||||
|
||||
### Related Entities
|
||||
Wikilinks to wiki/entities/ ONLY.
|
||||
|
||||
### Sources
|
||||
Wikilinks to wiki/sources/ ONLY.
|
||||
|
||||
---
|
||||
|
||||
## Non-Negotiable Rules
|
||||
|
||||
1. Output ONLY a valid JSON array — no markdown fences, no prose before or after
|
||||
2. Each element: `{"path": "wiki/<type>/<slug>.md", "content": "...full markdown..."}`
|
||||
3. Slugs are kebab-case: lowercase, spaces→hyphens, strip special characters
|
||||
4. Every wikilink must be `[[slug|Display Text]]` — the pipe separator is required
|
||||
5. Dates always YYYY-MM-DD
|
||||
6. Never reproduce verbatim code — describe the pattern or technique
|
||||
7. Section links must match their section type (Related Concepts → concepts/ only, etc.)
|
||||
8. One source page per book — if inventory shows it exists, include it as an UPDATE
|
||||
Reference in New Issue
Block a user