meta(governance): update AGENTS.md and README.md for 00-06 numbered lifecycle taxonomy
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 7s

This commit is contained in:
kiskaadee committed 2026-09-28 15:58:36 -05:00
1 parent 4e0dfe0c8c
commit 798c953ac3
2 files changed
+179 -315

No files matched your search

+122 -235
View File
@@ -1,110 +1,122 @@
# Brain — AI Agent Guide # Brain — AI Agent Guide
This repository is a personal knowledge graph. It is not a residency dashboard, a project tracker, or an Obsidian vault. It is a durable store of structured information across multiple types. This repository is a personal knowledge graph organized strictly around the **epistemic role** of information in the engineering lifecycle. It is a durable store of structured information across discrete cognitive categories.
--- ---
## Repository Purpose ## Repository Purpose
The Brain stores five fundamentally different kinds of information: The Brain organizes information into seven numbered lifecycle directories:
| Directory | Contains | | Directory | Semantic Role | Contains |
| :--- | :--- | | :--- | :--- | :--- |
| `inbox/` | Unprocessed captures — no classification required. Write first, classify later. | | `00-inbox/` | **Capture** | Unprocessed, ephemeral captures — no classification or metadata required. |
| `knowledge/` | Durable understanding: concepts, technologies, and methods. | | `01-plans/` | **Intent** | Actionable implementation roadmaps, specifications, and execution blueprints (`type: plan`). |
| `projects/` | Contextual, project-specific documents. Each project owns its own sub-folder. | | `02-discussions/` | **Exploration** | Prospective inquiries, architectural options evaluations, and trade-offs (`type: discussion`). |
| `records/` | Historical artifacts: journals, debug post-mortems, discussions, decisions, experiments. | | `03-records/` | **History** | Historical memory: journals, incident RCAs, and ADRs (`type: journal \| debug \| decision`). |
| `practice/` | Algorithm exercises, LeetCode writeups, and implementation drills. | | `04-learning/` | **Understanding** | Durable knowledge (`knowledge/`), operational SOPs (`guides/`), and deliberate practice (`practice/`). |
| `agents/` | Canonical agent specifications, behavioral guardrails, and role profiles. | | `05-agents/` | **Machine Context** | Canonical store of AI agent profiles (`profiles/`) and operational skills (`skills/`). |
| `06-projects/` | **System Hubs** | Project topology hubs, forge repository mappings, and cross-cutting index entrypoints (`type: project`). |
--- ---
## Semantic Contracts ## Semantic Contracts
### `inbox/` ### `00-inbox/`
Local, uncommitted zero-friction capture zone. If the type or destination of a document is not immediately obvious, or while drafting/capturing raw thoughts, it belongs here. No metadata or classification is required at capture time. Documents in `inbox/` sit outside the committed knowledge graph until curated and moved into `knowledge/`, `projects/`, `records/`, or `practice/`. Local, uncommitted zero-friction capture zone. If the type or destination of a document is not immediately obvious, or while drafting/capturing raw thoughts, it belongs here. Documents in `00-inbox/` sit outside the committed knowledge graph and are completely exempt from frontmatter, type, and link validation until curated and moved.
### `knowledge/` ### `01-plans/`
Documents that answer: *"If I read this six months from now, will this help me understand something?"* Actionable engineering roadmaps, milestone breakdowns, and phased technical executions answering: *"What do we intend to build or execute?"*
- *Project Locality*: Placed in `01-plans/<project>/[subsystem/]<filename>.md` (e.g. `01-plans/homelab/appctl/smart-deployment-pipeline.md`).
Sub-directories:
- `concepts/` — Disciplinary concepts and algorithms (e.g., binary search, data structures).
- `technologies/` — Tool- and language-specific knowledge (e.g., Python, Docker, tmux).
- `methods/` — Backend engineering practices and methodologies (e.g., testing, auth, SQL).
Knowledge documents do not become the canonical location for project-specific information. A knowledge document describes *what something is*; a project document describes *how this project uses it*.
### `projects/`
Each project lives in its own sub-folder (e.g., `projects/homelab/`, `projects/nixos/`, `projects/magnetflix/`). The canonical entrypoint and landing page for any project must always be named `README.md` (e.g., `projects/homelab/README.md`) so that documentation renderers (such as `doc2site`) automatically compile it as the directory's index/landing page. Do not use `overview.md`.
#### Project Landing Page (`README.md`) Invariant
A project `README.md` is the user-facing entrypoint for that specific engineering project.
- **Never describe Brain conventions in a project README**: Do not explain vault taxonomies, frontmatter rules, or note-taking philosophies.
- **Required Sections**:
1. **Overview & System Topology**: Broad architectural explanation of the system, its layers, and core capabilities.
2. **Source Code & Locations**: Direct URLs to Git forge repositories (Gitea/GitHub), clone URLs, local workspace paths, and deployment targets.
3. **💬 Open Discussions**: Links *strictly* to unresolved discussions that have not yet produced an active implementation plan.
4. **🚧 Work in Progress (Active Plans)**: Links *strictly* to active plans (`status: active`) currently in progress or scheduled for execution.
5. **🛠️ Canonical Guides & Runbooks**: Operational procedures and step-by-step SOPs.
6. **🏛️ Completed Milestones & Resolved Discussions**: Historical reference section keeping completed roadmaps and foundational discussions organized without cluttering active WIP.
#### Standard Project Directory Structure
Every project follows a three-part lifecycle structure under its folder:
1. **`discussions/` — "Why & What If?"**
- Architectural inquiries, problem statements, exploratory trade-off analyses, and evaluation of alternative paths (Model A vs. Model B).
- *Format*: Problem Statement → Context & Analysis → Options Evaluation (Pros & Cons) → Consensus / Resolution / Open Questions.
- *Lifecycle*: Open discussions remain active until consensus is reached, at which point they produce an actionable implementation plan.
- *Frontmatter*: `type: discussion`, `project: <name>`, `date: YYYY-MM-DD`.
2. **`plans/` — "How & When?"**
- Actionable implementation roadmaps, milestone breakdowns, and phased technical executions.
- *Prerequisite*: A plan should ideally be the concrete output of a resolved discussion.
- *Frontmatter*: `type: plan`, `status: draft | active | completed | abandoned`, `project: <name>`. - *Frontmatter*: `type: plan`, `status: draft | active | completed | abandoned`, `project: <name>`.
- *Invariant*: **Lifecycle state is metadata, not folder placement.** Completed or abandoned plans remain in `01-plans/` with `status: completed` or `status: abandoned`. There is no `archive/` directory.
3. **`guides/` — "How to Use & Operate?"** ### `02-discussions/`
- Practical, operational runbooks and user-facing standard operating procedures (SOPs). Architectural inquiries, problem statements, exploratory trade-off analyses, and evaluation of alternative paths (Model A vs. Model B) answering: *"Why and what if?"*
- *Content*: Answers concrete operational questions: *How to deploy a new service*, *How to rotate secrets*, *How to troubleshoot WAN rotation*. A guide explains how to **use and maintain** existing capabilities, not how to architect or implement new ones. - *Format*: Problem Statement → Context & Analysis → Options Evaluation (Pros & Cons) → Consensus / Resolution.
- *Frontmatter*: `type: guide`, `project: <name>`. - *Lifecycle*: Discussions are **permanent historical explorations**. When consensus is reached, the document is updated to `status: resolved` and explicitly links forward to the resulting plan (`01-plans/...`) or decision (`03-records/decisions/...`). It is never deleted or moved into an archive.
- *Frontmatter*: `type: discussion`, `status: open | resolved`, `project: <name>`, `date: YYYY-MM-DD`.
The folder establishes context (ownership/locality). The document's `type` field establishes its semantic role. Projects may reference documents in other projects via relative links. ### `03-records/`
Historical memory and durable empirical records answering: *"What happened, when, and what was decided?"*
- **`journal/`** — Chronological personal/engineering daily logs (strictly named `YYYY-MM-DD.md`, `type: journal`).
- **`debug/`** — Empirical incident post-mortems, regressions, and root-cause analyses of broken systems (strictly dated `YYYY-MM-DD-<slug>.md`, `type: debug`).
- **`decisions/`** — Architectural Decision Records (ADRs) capturing point-in-time commitments and consequences (`type: decision`, `status: proposed | accepted | superseded`).
### `records/` ### `04-learning/`
Historical artifacts. The original messy thinking is worth preserving — often what you want to recover later is not just the conclusion, but *why* you reached it. Durable understanding, operational procedures, and deliberate drills answering: *"What do we understand and how do we operate it?"*
- **`knowledge/`** — Durable theoretical, technological, and methodological understanding:
- `concepts/` — Disciplinary ideas (algorithms, data structures).
- `technologies/` — Tool and language references (Python, Docker, Nix).
- `methods/` — Backend engineering practices (testing, auth, SQL).
- **`guides/`** — Practical standard operating procedures (SOPs) and runbooks explaining how to **use and maintain** existing capabilities (`04-learning/guides/<project>/<slug>.md`, `type: guide`).
- **`practice/`** — Deliberate algorithm implementation drills (LeetCode writeups and Python test fixtures with isolated Nix devShell).
Sub-directories: ### `05-agents/`
- `journal/` — Dated daily engineering journals and retrospectives (strictly one entry per day named `YYYY-MM-DD.md`). Canonical store of AI agent profiles, instructions, operational boundaries, and guardrails across projects and workstations.
- `debug/` — Epistemic incident reports, root-cause analyses, and diagnostic post-mortems (`type: debug`). - **`README.md`** — Structural catalog of all configured agents and target workspaces.
- `discussions/` — Conversations that informed decisions or produced knowledge. - **`profiles/`** — Machine-readable agent persona specifications and safety guardrails (`05-agents/profiles/<name>.md`, `type: agent`, `kind: profile`).
- `decisions/` — Architectural decision records. - **`skills/`** — Reusable agent operational capabilities, instructions, and prompt modules (`05-agents/skills/<name>.md`, `type: agent`, `kind: skill`).
- `experiments/` — Prototypes, runbooks, and technical investigations.
### `practice/` ### `06-projects/`
Unchanged in structure. Contains LeetCode writeups and Python solution files with their own Nix devShell environment. Do not reorganize this directory without reading its `flake.nix`. Canonical project entrypoints and navigation hubs.
- **Structural Contract**: Every project hub is strictly located at `06-projects/<project>/README.md` (`max_depth=2`, `require_filename="README.md"`). No arbitrary documents or subfolders live in `06-projects/`.
### `agents/` - **Role**: A project hub is a **graph navigation and index node**, not a document container. It describes system topology, source forge repositories, and indexes active plans, open discussions, and canonical guides across the vault.
Canonical store of AI agent profiles, instructions, operational boundaries, and guardrails across projects and workstations. Each document in `agents/` preserves an agent's configuration as a first-class documentation article rather than an active workspace rulebook, ensuring long-term auditability without interfering with Brain repository workflows.
- *Format*: Metadata Frontmatter → Overview & Operational Scope → Canonical Specification (Fenced Code Block) → Related Context & Documentation.
- *Frontmatter*: `type: agent`, `status: active | draft | archived`, `name: <slug>`, `target_workspace: <path-or-repo>`, `project: <optional-project-name>`, `tags: [list, of, tags]`.
--- ---
## Metadata Convention ## Metadata Convention
Every committed markdown document in the knowledge graph must have a YAML frontmatter block. `type` is the only universally required field. All other fields are type-specific or optional metadata extensions. (Documents in `inbox/` are uncommitted staging drafts and are exempt from metadata enforcement until curated). Every committed Markdown document in the knowledge graph must have a YAML frontmatter block adhering to `DirectoryContract`:
### Core & Optional Fields ### Valid Types:
`knowledge`, `project`, `plan`, `guide`, `decision`, `journal`, `discussion`, `experiment`, `practice`, `reference`, `agent`, `debug`.
- **`type`** *(Required)*: `knowledge`, `project`, `plan`, `guide`, `decision`, `journal`, `debug`, `discussion`, `experiment`, `practice`, `inbox`, `reference`, `agent`.
- **`tags`** *(Optional)*: List of keyword tags (e.g., `tags: [homelab, ddns, networking]` or YAML list format) applicable to any document type for cross-cutting discovery.
- **`project`** *(Optional)*: Project identifier (e.g., `project: homelab`, `project: dynu-monitor`, `project: bitetrack`) indicating context ownership.
- **`status`** *(Conditional)*: Lifecycle status for plans (`draft`, `active`, `completed`, `abandoned`), decisions (`proposed`, `accepted`, `superseded`), projects (`planned`, `active`, `paused`, `completed`), knowledge (`draft`, `stable`), practice (`active`, `completed`), and agents (`active`, `draft`, `archived`).
### Frontmatter Templates ### Frontmatter Templates
```yaml ```yaml
# knowledge # 01-plans
---
type: plan
status: draft | active | completed | abandoned
project: project-name
tags: [list, of, tags]
---
# 02-discussions
---
type: discussion
status: open | resolved
project: project-name
tags: [list, of, tags]
date: YYYY-MM-DD
---
# 03-records/journal
---
type: journal
date: YYYY-MM-DD
tags: [list, of, tags]
project: optional-project-name
---
# 03-records/debug
---
type: debug
date: YYYY-MM-DD
tags: [list, of, tags]
project: optional-project-name
---
# 03-records/decisions
---
type: decision
status: proposed | accepted | superseded
project: project-name
tags: [list, of, tags]
---
# 04-learning/knowledge
--- ---
type: knowledge type: knowledge
status: draft | stable status: draft | stable
@@ -114,70 +126,14 @@ related: [optional, relative, paths]
project: optional-project-name project: optional-project-name
--- ---
# project (README.md landing pages) # 04-learning/guides
---
type: project
status: planned | active | paused | completed
tags: [list, of, tags]
---
# plan
---
type: plan
status: draft | active | completed | abandoned
project: project-name
tags: [list, of, tags]
---
# guide
--- ---
type: guide type: guide
project: project-name project: project-name
tags: [list, of, tags] tags: [list, of, tags]
--- ---
# decision # 04-learning/practice
---
type: decision
status: proposed | accepted | superseded
project: project-name
tags: [list, of, tags]
---
# journal (daily historical log)
---
type: journal
date: YYYY-MM-DD
tags: [list, of, tags]
project: optional-project-name
---
# debug (incident reports, postmortems, root cause analyses)
---
type: debug
date: YYYY-MM-DD
tags: [list, of, tags]
project: optional-project-name
---
# experiment (prototypes, investigations, runbooks)
---
type: experiment
status: draft | active | completed
project: project-name
tags: [list, of, tags]
date: YYYY-MM-DD
---
# discussion (conversations, architectural evaluations)
---
type: discussion
project: project-name
tags: [list, of, tags]
date: YYYY-MM-DD
---
# practice
--- ---
type: practice type: practice
status: completed | active status: completed | active
@@ -185,27 +141,25 @@ topics: [list, of, topics]
tags: [optional, tags] tags: [optional, tags]
--- ---
# agent (agent profiles & specifications) # 05-agents/profiles & skills
--- ---
type: agent type: agent
status: active | draft | archived status: active | draft | archived
name: agent-slug name: agent-slug
kind: profile | skill
target_workspace: /path/to/workspace target_workspace: /path/to/workspace
project: optional-project-name project: optional-project-name
tags: [optional, tags] tags: [optional, tags]
--- ---
# inbox (unprocessed captures) # 06-projects (README.md only)
--- ---
type: inbox type: project
created: YYYY-MM-DD status: planned | active | paused | completed
tags: [optional, tags] tags: [list, of, tags]
project: optional-project-name
--- ---
``` ```
**Important:** Folder location does not automatically determine every metadata field. A document inside `projects/homelab/plans/` is a `plan`, not a `project`. The folder establishes context. The `type` field establishes semantic role.
--- ---
## Link Conventions ## Link Conventions
@@ -213,14 +167,13 @@ project: optional-project-name
- Use standard relative Markdown links for intra-vault files: `[text](../relative/path.md)`. - Use standard relative Markdown links for intra-vault files: `[text](../relative/path.md)`.
- Do not use Obsidian `[[double-bracket]]` syntax. The repository must be valid Markdown without Obsidian. - Do not use Obsidian `[[double-bracket]]` syntax. The repository must be valid Markdown without Obsidian.
- **Cross-Repository Portability**: For links to files in separate repositories (e.g., `homelab-core`, `bitetrack-api`), use their public/forge Git URLs (e.g., `https://gitea.roadtotech.me/...` or `https://github.com/...`) or semantic code blocks. **Never use machine-specific absolute file URIs (`file:///...`)**. - **Cross-Repository Portability**: For links to files in separate repositories (e.g., `homelab-core`, `bitetrack-api`), use their public/forge Git URLs (e.g., `https://gitea.roadtotech.me/...` or `https://github.com/...`) or semantic code blocks. **Never use machine-specific absolute file URIs (`file:///...`)**.
- When reorganizing files, run `python scripts/validate-brain.py` to catch broken links before committing. - Always verify links before committing: `python scripts/validate-brain.py`.
--- ---
## Git Commit Standards ## Git Commit Standards
In this repository, commit types directly reflect the Brain's semantic taxonomy rather than generic code forge types (`docs:`). Every commit must follow this format: In this repository, commit types directly reflect the Brain's semantic taxonomy rather than generic code forge types (`docs:`):
``` ```
<type>(<scope>): <short description> <type>(<scope>): <short description>
@@ -232,111 +185,45 @@ In this repository, commit types directly reflect the Brain's semantic taxonomy
| Type | Used For | Example | | Type | Used For | Example |
| :--- | :--- | :--- | | :--- | :--- | :--- |
| `knowledge` | Concepts, technologies, and backend methods | `knowledge(pytest): add fixture DI guide` | | `plan` | Roadmaps, execution blueprints, milestones | `plan(homelab): define Stalwart mail server rollout` |
| `plan` | Project roadmaps and implementation specs | `plan(homelab): define Stalwart mail server rollout` |
| `guide` | Practical SOPs, runbooks, and operation procedures | `guide(nixos): add terminal workspace walkthrough` |
| `discussion` | Architectural inquiries, evaluations, trade-offs | `discussion(homelab): evaluate LLDAP vs Stalwart auth` | | `discussion` | Architectural inquiries, evaluations, trade-offs | `discussion(homelab): evaluate LLDAP vs Stalwart auth` |
| `decision` | Architectural Decision Records (ADRs) | `decision(nixos): adopt standalone workstation model` | | `journal` | Dated daily engineering journals | `journal: record daily log for 2026-09-28` |
| `journal` | Dated daily engineering journals | `journal: record daily log for 2026-09-21` |
| `debug` | Epistemic incident reports, postmortems, RCA logs | `debug(homelab): record gitops webhook signature mismatch rca` | | `debug` | Epistemic incident reports, postmortems, RCA logs | `debug(homelab): record gitops webhook signature mismatch rca` |
| `decision` | Architectural Decision Records (ADRs) | `decision(nixos): adopt standalone workstation model` |
| `knowledge` | Concepts, technologies, and backend methods | `knowledge(pytest): add fixture DI guide` |
| `guide` | Practical SOPs, runbooks, and operation procedures | `guide(nixos): add terminal workspace walkthrough` |
| `practice` | Algorithm writeups and LeetCode drills | `practice(leetcode): add 0075 sort colors solution` | | `practice` | Algorithm writeups and LeetCode drills | `practice(leetcode): add 0075 sort colors solution` |
| `agent` | Agent specifications, behavioral guardrails, and role profiles | `agent(homelab): document homelab operations agent spec` | | `agent` | Agent specifications, behavioral guardrails, and role profiles | `agent(homelab): document homelab operations agent spec` |
| `meta` | Brain governance, `AGENTS.md`, taxonomies, root docs | `meta(agents): establish inbox curation protocol` | | `project` | Project landing pages (`06-projects/*/README.md`) | `project(homelab): update active plans index` |
| `infra` | Repository tooling, validator scripts, Nix flakes | `infra(validator): add broken link check` | | `meta` | Brain governance, `AGENTS.md`, root docs | `meta(agents): establish numbered lifecycle taxonomy` |
| `refactor` | Structural reorganization, directory restructurings | `refactor(homelab): move archive docs to project root` | | `infra` | Repository tooling, validator scripts, Nix flakes | `infra(validator): add DirectoryContract validation` |
Keep commits atomic: one logical document addition or document + linked cross-reference update per commit.
--- ---
## Structural Validator ## Structural Validator & Tests
Run before committing structural changes: Run before committing changes:
```bash ```bash
python scripts/validate-brain.py python scripts/validate-brain.py
python scripts/test_validator.py
``` ```
Checks: frontmatter presence, valid `type` fields, relative link resolution, no deprecated directories, required root files. Checks: directory-type contracts, max depth, filename requirements, frontmatter presence, link resolution, code fences, Mermaid syntax, Ruff linting, and Pyright typing.
---
## AI Agent Artifact & Inbox Capture Protocol
To avoid draft fragmentation, shadow duplication, and excessive inbox maintenance:
1. **Skip Inbox Capture for Canonical Brain Documents**:
If an agent is creating or modifying a document that already has a designated home in `knowledge/`, `projects/`, `records/`, or `practice/`, **DO NOT** write a shadow copy or duplicate draft to `inbox/`. The document in the repository tree is the canonical source of truth.
2. **One Topic, One Draft (In-Place Evolution)**:
When generating artifacts for research, plans, or session summaries that belong in `inbox/`:
- Search `inbox/` for an existing file covering the current topic or session (e.g., `inbox/<topic>-notes.md`).
- If one exists, **update/overwrite that single file in-place** rather than creating new fragmented files (e.g., evolve the plan into the finalized walkthrough/summary).
- Never create parallel variations (such as `topic-plan.md`, `topic_plan.md`, `topic-walkthrough.md`, `walkthrough.md`).
3. **Session Consolidation**:
At the conclusion of any agentic workflow or task, ensure there is at most **one** comprehensive capture document in `inbox/` representing the session.
--- ---
## Inbox Curation Protocol ## Inbox Curation Protocol
When the user requests an inbox curation or maintenance pass (e.g., *"Curate the inbox"*, *"Process inbox"*, *"It's time to curate"*), agents must execute the following deterministic workflow: When curating the `00-inbox/` staging area:
### Step 1: Baseline Integrity Verification
Run the structural validator to verify a clean working state before making any modifications:
```bash
python scripts/validate-brain.py
```
If existing errors are found, address them or establish baseline awareness before proceeding.
### Step 2: Inbox Inventory & Draft Clustering
1. Inspect all pending files in `inbox/` (excluding `inbox/README.md` and `.gitignore`).
2. **Cluster by Topic & Session**: Identify multiple drafts or evolutionary iterations created for the same subject.
3. **Consolidation & Deduplication**:
- Consolidate iterative drafts into **one single comprehensive document** representing the final canonical knowledge.
- Keep multiple documents only when there is a distinct semantic separation across Brain types (e.g., an active `plan` vs. an architectural `discussion` vs. a retrospective `journal`).
- If ambiguous whether to merge or separate, **prompt the user** before proceeding.
### Step 3: Semantic Classification & Target Resolution
Map each consolidated document to its canonical destination following the [Semantic Contracts](#semantic-contracts):
- **`knowledge/`** — Durable concepts, tools, languages, and backend engineering methods.
- `concepts/` (algorithms, data structures, abstract theory)
- `technologies/` (tools, libraries, languages, CLI utilities)
- `methods/` (architecture patterns, testing, auth, SQL)
- **`projects/<project>/`** — Project-specific context. Place under `discussions/`, `plans/`, `guides/`, or update `README.md`.
- **`records/`** — Historical artifacts (`journal/`, `debug/`, `discussions/`, `decisions/`, `experiments/`).
- **`practice/`** — Algorithm drills and LeetCode writeups.
> [!NOTE]
> **Ambiguous Documents**: If a capture is incomplete or its target destination is ambiguous, propose the most logical target path to the user. Leave unconfirmed items in `inbox/` until clarified.
### Step 4: Frontmatter & Content Normalization
Transform the staging frontmatter into a valid schema-compliant metadata block:
1. Replace `type: inbox` with the canonical type (`knowledge`, `guide`, `plan`, `decision`, `debug`, etc.).
2. Add appropriate `status` (`draft` or `stable`), `topics`, `tags`, `project`, or `date` identifiers.
3. Fix markdown parsing errors, heading levels, invalid code fences, or malformed links.
4. Ensure all internal links use standard relative Markdown paths (never `file:///` URIs).
### Step 5: Directory Placement & Cross-Reference Linking
1. Write the document to its designated canonical directory (create new directories when needed).
2. **Incident & Debug Processing**: When curating an incident capture (`*-debug.md`):
- Normalize to `type: debug` and move to `records/debug/YYYY-MM-DD-<slug>.md`.
- Update or create the daily journal at `records/journal/YYYY-MM-DD.md`.
- Under `## Incidents & Debugging`, record a concise bullet summary and relative link:
`- [Title](../debug/YYYY-MM-DD-<slug>.md): Root cause summary and declarative remediation.`
3. Remove the staging file(s) and any superseded drafts from `inbox/`.
4. Update relevant parent indices (e.g., project `README.md` sections) and link related existing knowledge notes (e.g., adding `related: [...]` and cross-reference links in sibling documents).
### Step 6: Atomic Git Commit
Create an isolated atomic commit for each curated document and any adjacent modified files using the [Semantic Commit Taxonomy](#git-commit-standards):
```bash
git add <target-file> [adjacent-modified-files...]
git commit -m "<type>(<scope>): <short description>"
```
*(Note: The Git pre-commit hook automatically executes `scripts/validate-brain.py` during `git commit`, ensuring schema and link integrity before each commit).*
### Step 7: Curation Summary
Present a clear summary of all curated documents, their target paths, and associated commit references to the user.
1. **Verify Baseline**: Ensure `python scripts/validate-brain.py` passes cleanly.
2. **Classify**: Map the captured draft into its target directory based on epistemic role:
- Implementation roadmap $\to$ `01-plans/<project>/` (`type: plan`)
- Architectural trade-off $\to$ `02-discussions/<project>/` (`type: discussion`)
- Incident post-mortem $\to$ `03-records/debug/` (`type: debug`)
- Knowledge note $\to$ `04-learning/knowledge/` (`type: knowledge`)
- Operational SOP $\to$ `04-learning/guides/<project>/` (`type: guide`)
3. **Format & Frontmatter**: Add valid YAML frontmatter matching the target directory contract.
4. **Remove Staging File**: Delete from `00-inbox/`.
5. **Atomic Commit**: Commit with semantic commit type matching the document role.
+57 -80
View File
@@ -1,115 +1,92 @@
# 🧠 Brain # 🧠 Brain
A personal knowledge graph organized by document type, not by subject. A personal knowledge graph organized by document lifecycle and epistemic role, not by subject.
--- ---
## Structure ## Structure
| Directory | What it contains | | Directory | Semantic Role | What it contains |
| :--- | :--- | | :--- | :--- | :--- |
| [`inbox/`](inbox/) | Zero-friction capture. Write here when you don't know where something belongs yet. | | [`00-inbox/`](00-inbox/) | **Capture** | Zero-friction, uncommitted staging zone. Write first, curate later. |
| [`knowledge/`](knowledge/) | Durable understanding — things you know and want to keep. | | [`01-plans/`](01-plans/) | **Intent** | Actionable implementation roadmaps, milestones, and design specs (`type: plan`). |
| [`projects/`](projects/) | Contextual documents that belong to a specific project. | | [`02-discussions/`](02-discussions/) | **Exploration** | Prospective inquiries, architectural options evaluations, and trade-offs (`type: discussion`). |
| [`records/`](records/) | Historical artifacts — things that happened. | | [`03-records/`](03-records/) | **History** | Historical memory: journals, incident post-mortems/RCAs, and ADRs (`type: journal \| debug \| decision`). |
| [`practice/`](practice/) | Algorithm exercises and implementation drills. | | [`04-learning/`](04-learning/) | **Understanding** | Durable knowledge (`knowledge/`), operational SOPs/runbooks (`guides/`), and deliberate practice (`practice/`). |
| [`agents/`](agents/) | Canonical agent specifications, behavioral guardrails, and role profiles. | | [`05-agents/`](05-agents/) | **Machine Context** | Canonical store of AI agent profiles (`profiles/`) and operational skills (`skills/`). |
| [`06-projects/`](06-projects/) | **System Hubs** | Project topology hubs, forge repository mappings, and cross-cutting index entrypoints (`type: project`). |
--- ---
## Knowledge ## 01. Plans
``` Actionable engineering roadmaps and execution blueprints:
knowledge/ - **Homelab**: Architecture consolidation, Appctl v2 engine, Stalwart email, Diun alerting, security hardening.
├── concepts/ ← Disciplinary ideas: algorithms, data structures - **NixOS**: Workstation decoupling, secret restructuring, channel migrations.
├── technologies/ ← Tool and language knowledge: Python, Docker, Nix, tmux - **Praxis**: Workout tracking software requirements and domain design baseline.
│ └── python/ - **MagNetFlix**: Media indexing and browser extension pipeline.
└── methods/ ← Backend practices: testing, auth, SQL, CI/CD, ADRs - **Supervisor**: Engineering supervisory system and progress tracker.
```
**Key documents:**
- [Binary Search](knowledge/concepts/binary-search.md)
- [HashMap](knowledge/concepts/hashmap.md)
- [Pydantic](knowledge/technologies/python/pydantic.md)
- [Docker](knowledge/technologies/docker.md)
- [Authentication & JWT](knowledge/methods/auth.md)
- [SQL](knowledge/methods/sql.md)
- [Testing](knowledge/methods/testing.md)
- [CI/CD & GitOps](knowledge/methods/cicd-fundamentals-and-gitops.md)
- [Deterministic Tag Extraction](knowledge/methods/deterministic-tag-extraction.md)
--- ---
## Projects ## 02. Discussions
``` Permanent records of architectural inquiries and prospective options evaluations:
projects/ - [GitOps Dispatcher Architecture](02-discussions/homelab/gitops-dispatcher-architecture.md)
├── nixos/ ← Declarative multi-machine OS fleet & flake architecture - [NixOS Monorepo vs. Multi-Repo](02-discussions/homelab/nixos-monorepo-vs-multirepo.md)
│ └── plans/ ← Migration and optimization roadmaps - [Stalwart vs. Hostinger Email Evaluation](02-discussions/homelab/hostinger-vs-stalwart-email-evaluation.md)
├── homelab/ ← Infrastructure, Docker services, appctl, GitOps, networking - [Assistant Chatbot Architecture](02-discussions/homelab/chatbot-assistant-design.md)
│ ├── plans/ ← Migration and strategy documents - [Brain Structural Validator Refactoring](02-discussions/brain/validate-brain-refactor-architecture.md)
│ └── guides/ ← Architecture and runbook documents
├── dynu-monitor/ ← Smart DDNS change detection daemon (Python/Rust)
├── new-repo/ ← Automated repository provisioning CLI
├── magnetflix/ ← Media indexing and streaming application
├── nekoweb/ ← Web showcase and static site generation
├── supervisor/ ← Personal engineering progress tracking & supervisory system
└── brain/ ← Second Brain platform, validation, and metadata extraction tooling
```
**Key documents:**
- [NixOS Fleet Overview](projects/nixos/README.md)
- [Homelab Overview](projects/homelab/README.md)
- [Dynu Monitor Overview](projects/homelab/plans/dynu-monitor/README.md)
- [New-Repo CLI Overview](projects/nixos/new-repo/README.md)
- [MagNetFlix Overview](projects/magnetflix/README.md)
- [Nekoweb Overview](projects/nekoweb/README.md)
- [Supervisor Overview](projects/supervisor/README.md)
- [Second Brain Platform Overview](projects/brain/README.md)
--- ---
## Records ## 03. Records
``` Historical memory and durable empirical records:
records/ - **Journals (`03-records/journal/`)**: Dated daily engineering retrospectives (`YYYY-MM-DD.md`).
└── journal/ ← Dated engineering retrospectives - **Incidents & Post-mortems (`03-records/debug/`)**: Empirical RCAs of system failures, regressions, and remediations.
``` - **Decisions (`03-records/decisions/`)**: Immutable Architectural Decision Records (ADRs).
--- ---
## Practice ## 04. Learning
``` Durable concepts, operational procedures, and deliberate practice:
practice/ - **Knowledge (`04-learning/knowledge/`)**:
└── LeetCode/ - `concepts/` — Algorithms, data structures (Binary Search, HashMaps).
├── 00-practiced-patterns.md ← Pattern index - `technologies/` — Tool and language understanding (Python, Docker, Nix, tmux).
├── 0001-two-sum.md - `methods/` — Engineering methodologies (Testing, Auth, SQL, CI/CD, Tag extraction).
└── Solutions/ ← Python solution files - **Guides (`04-learning/guides/`)**: Operational SOPs and standard runbooks (`appctl`, GitOps pipelines, rDNS relay, server maintenance).
``` - **Practice (`04-learning/practice/`)**: LeetCode writeups and Python solution suite with its own Nix flake environment.
--- ---
## Agents Store ## 05. Agents Store
``` Declarative specifications and behavioral guardrails for AI agents across workstations:
agents/ - [Homelab Operations](05-agents/profiles/homelab-operations.md)
├── homelab-operations.md ← Homelab operational workstation & diagnostics agent - [Homelab Core Platform](05-agents/profiles/homelab-core.md)
├── homelab-core.md ← Homelab Core platform & deployment invariants agent - [NixOS Mobile Workstation](05-agents/profiles/nixos-workstation.md)
├── nixos-workstation.md ← Laptop declarative NixOS/Home Manager configuration agent - [MagNetFlix Media Pipeline](05-agents/profiles/magnetflix.md)
├── magnetflix.md ← MagNetFlix automated media acquisition pipeline agent - [NekoWeb Manga Platform](05-agents/profiles/nekoweb.md)
├── nekoweb.md ← NekoWeb manga platform & full-stack agent - [Second Brain Knowledge Graph](05-agents/profiles/second-brain.md)
└── second-brain.md ← Personal knowledge graph curation & validation agent
```
--- ---
## Conventions ## 06. Projects
Every document has a `type` field in its YAML frontmatter. See [AGENTS.md](AGENTS.md) for the full metadata convention, directory semantics, link standards, and git commit format. Canonical entrypoints describing system topology, source code repositories, and cross-cutting index links:
- [Homelab Ecosystem Hub](06-projects/homelab/README.md)
- [NixOS Fleet Hub](06-projects/nixos/README.md)
- [Praxis Platform Hub](06-projects/praxis/README.md)
- [MagNetFlix Hub](06-projects/magnetflix/README.md)
- [NekoWeb Hub](06-projects/nekoweb/README.md)
- [New-Repo CLI Hub](06-projects/new-repo/README.md)
- [Supervisor Hub](06-projects/supervisor/README.md)
- [Second Brain Tooling Hub](06-projects/brain/README.md)
--- ---
## Inbox ## Governance & Rules
Documents that haven't been classified yet live in [`inbox/`](inbox/). See [`inbox/README.md`](inbox/README.md) for the capture rule. See [AGENTS.md](AGENTS.md) for metadata conventions, directory structural contracts, link standards, and Git commit guidelines.