From 798c953ac31ac8f91dd638966c5b660e65a9bb08 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Mon, 28 Sep 2026 15:58:36 -0500 Subject: [PATCH] meta(governance): update AGENTS.md and README.md for 00-06 numbered lifecycle taxonomy --- AGENTS.md | 359 +++++++++++++++++++----------------------------------- README.md | 137 +++++++++------------ 2 files changed, 180 insertions(+), 316 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index ec1fe42..021576a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,110 +1,122 @@ # 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 -The Brain stores five fundamentally different kinds of information: +The Brain organizes information into seven numbered lifecycle directories: -| Directory | Contains | -| :--- | :--- | -| `inbox/` | Unprocessed captures — no classification required. Write first, classify later. | -| `knowledge/` | Durable understanding: concepts, technologies, and methods. | -| `projects/` | Contextual, project-specific documents. Each project owns its own sub-folder. | -| `records/` | Historical artifacts: journals, debug post-mortems, discussions, decisions, experiments. | -| `practice/` | Algorithm exercises, LeetCode writeups, and implementation drills. | -| `agents/` | Canonical agent specifications, behavioral guardrails, and role profiles. | +| Directory | Semantic Role | Contains | +| :--- | :--- | :--- | +| `00-inbox/` | **Capture** | Unprocessed, ephemeral captures — no classification or metadata required. | +| `01-plans/` | **Intent** | Actionable implementation roadmaps, specifications, and execution blueprints (`type: plan`). | +| `02-discussions/` | **Exploration** | Prospective inquiries, architectural options evaluations, and trade-offs (`type: discussion`). | +| `03-records/` | **History** | Historical memory: journals, incident RCAs, and ADRs (`type: journal \| debug \| decision`). | +| `04-learning/` | **Understanding** | Durable knowledge (`knowledge/`), operational SOPs (`guides/`), and deliberate practice (`practice/`). | +| `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 -### `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/`. +### `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. 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/` -Documents that answer: *"If I read this six months from now, will this help me understand something?"* +### `01-plans/` +Actionable engineering roadmaps, milestone breakdowns, and phased technical executions answering: *"What do we intend to build or execute?"* +- *Project Locality*: Placed in `01-plans//[subsystem/].md` (e.g. `01-plans/homelab/appctl/smart-deployment-pipeline.md`). +- *Frontmatter*: `type: plan`, `status: draft | active | completed | abandoned`, `project: `. +- *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. -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). +### `02-discussions/` +Architectural inquiries, problem statements, exploratory trade-off analyses, and evaluation of alternative paths (Model A vs. Model B) answering: *"Why and what if?"* +- *Format*: Problem Statement → Context & Analysis → Options Evaluation (Pros & Cons) → Consensus / Resolution. +- *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: `, `date: YYYY-MM-DD`. -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*. +### `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-.md`, `type: debug`). +- **`decisions/`** — Architectural Decision Records (ADRs) capturing point-in-time commitments and consequences (`type: decision`, `status: proposed | accepted | superseded`). -### `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`. +### `04-learning/` +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//.md`, `type: guide`). +- **`practice/`** — Deliberate algorithm implementation drills (LeetCode writeups and Python test fixtures with isolated Nix devShell). -#### 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. +### `05-agents/` +Canonical store of AI agent profiles, instructions, operational boundaries, and guardrails across projects and workstations. +- **`README.md`** — Structural catalog of all configured agents and target workspaces. +- **`profiles/`** — Machine-readable agent persona specifications and safety guardrails (`05-agents/profiles/.md`, `type: agent`, `kind: profile`). +- **`skills/`** — Reusable agent operational capabilities, instructions, and prompt modules (`05-agents/skills/.md`, `type: agent`, `kind: skill`). -#### 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: `, `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: `. - -3. **`guides/` — "How to Use & Operate?"** - - Practical, operational runbooks and user-facing standard operating procedures (SOPs). - - *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. - - *Frontmatter*: `type: guide`, `project: `. - -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. - -### `records/` -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. - -Sub-directories: -- `journal/` — Dated daily engineering journals and retrospectives (strictly one entry per day named `YYYY-MM-DD.md`). -- `debug/` — Epistemic incident reports, root-cause analyses, and diagnostic post-mortems (`type: debug`). -- `discussions/` — Conversations that informed decisions or produced knowledge. -- `decisions/` — Architectural decision records. -- `experiments/` — Prototypes, runbooks, and technical investigations. - -### `practice/` -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`. - -### `agents/` -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: `, `target_workspace: `, `project: `, `tags: [list, of, tags]`. +### `06-projects/` +Canonical project entrypoints and navigation hubs. +- **Structural Contract**: Every project hub is strictly located at `06-projects//README.md` (`max_depth=2`, `require_filename="README.md"`). No arbitrary documents or subfolders live in `06-projects/`. +- **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. --- ## 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 - -- **`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`). +### Valid Types: +`knowledge`, `project`, `plan`, `guide`, `decision`, `journal`, `discussion`, `experiment`, `practice`, `reference`, `agent`, `debug`. ### Frontmatter Templates ```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 status: draft | stable @@ -114,70 +126,14 @@ related: [optional, relative, paths] project: optional-project-name --- -# project (README.md landing pages) ---- -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 +# 04-learning/guides --- type: guide project: project-name tags: [list, of, tags] --- -# decision ---- -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 +# 04-learning/practice --- type: practice status: completed | active @@ -185,27 +141,25 @@ topics: [list, of, topics] tags: [optional, tags] --- -# agent (agent profiles & specifications) +# 05-agents/profiles & skills --- type: agent status: active | draft | archived name: agent-slug +kind: profile | skill target_workspace: /path/to/workspace project: optional-project-name tags: [optional, tags] --- -# inbox (unprocessed captures) +# 06-projects (README.md only) --- -type: inbox -created: YYYY-MM-DD -tags: [optional, tags] -project: optional-project-name +type: project +status: planned | active | paused | completed +tags: [list, of, tags] --- ``` -**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 @@ -213,14 +167,13 @@ project: optional-project-name - 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. - **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 -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:`): ``` (): @@ -232,111 +185,45 @@ In this repository, commit types directly reflect the Brain's semantic taxonomy | Type | Used For | Example | | :--- | :--- | :--- | -| `knowledge` | Concepts, technologies, and backend methods | `knowledge(pytest): add fixture DI guide` | -| `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` | +| `plan` | Roadmaps, execution blueprints, milestones | `plan(homelab): define Stalwart mail server rollout` | | `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-21` | +| `journal` | Dated daily engineering journals | `journal: record daily log for 2026-09-28` | | `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` | | `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` | -| `infra` | Repository tooling, validator scripts, Nix flakes | `infra(validator): add broken link check` | -| `refactor` | Structural reorganization, directory restructurings | `refactor(homelab): move archive docs to project root` | - -Keep commits atomic: one logical document addition or document + linked cross-reference update per commit. +| `project` | Project landing pages (`06-projects/*/README.md`) | `project(homelab): update active plans index` | +| `meta` | Brain governance, `AGENTS.md`, root docs | `meta(agents): establish numbered lifecycle taxonomy` | +| `infra` | Repository tooling, validator scripts, Nix flakes | `infra(validator): add DirectoryContract validation` | --- -## Structural Validator +## Structural Validator & Tests -Run before committing structural changes: +Run before committing changes: ```bash 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. - ---- - -## 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/-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. +Checks: directory-type contracts, max depth, filename requirements, frontmatter presence, link resolution, code fences, Mermaid syntax, Ruff linting, and Pyright typing. --- ## 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: - -### 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-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-.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-.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 [adjacent-modified-files...] -git commit -m "(): " -``` -*(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. - +When curating the `00-inbox/` staging area: +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//` (`type: plan`) + - Architectural trade-off $\to$ `02-discussions//` (`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//` (`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. diff --git a/README.md b/README.md index afa66d3..5552ba9 100644 --- a/README.md +++ b/README.md @@ -1,115 +1,92 @@ # 🧠 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 -| Directory | What it contains | -| :--- | :--- | -| [`inbox/`](inbox/) | Zero-friction capture. Write here when you don't know where something belongs yet. | -| [`knowledge/`](knowledge/) | Durable understanding — things you know and want to keep. | -| [`projects/`](projects/) | Contextual documents that belong to a specific project. | -| [`records/`](records/) | Historical artifacts — things that happened. | -| [`practice/`](practice/) | Algorithm exercises and implementation drills. | -| [`agents/`](agents/) | Canonical agent specifications, behavioral guardrails, and role profiles. | +| Directory | Semantic Role | What it contains | +| :--- | :--- | :--- | +| [`00-inbox/`](00-inbox/) | **Capture** | Zero-friction, uncommitted staging zone. Write first, curate later. | +| [`01-plans/`](01-plans/) | **Intent** | Actionable implementation roadmaps, milestones, and design specs (`type: plan`). | +| [`02-discussions/`](02-discussions/) | **Exploration** | Prospective inquiries, architectural options evaluations, and trade-offs (`type: discussion`). | +| [`03-records/`](03-records/) | **History** | Historical memory: journals, incident post-mortems/RCAs, and ADRs (`type: journal \| debug \| decision`). | +| [`04-learning/`](04-learning/) | **Understanding** | Durable knowledge (`knowledge/`), operational SOPs/runbooks (`guides/`), and deliberate practice (`practice/`). | +| [`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 -``` -knowledge/ -├── concepts/ ← Disciplinary ideas: algorithms, data structures -├── technologies/ ← Tool and language knowledge: Python, Docker, Nix, tmux -│ └── python/ -└── methods/ ← Backend practices: testing, auth, SQL, CI/CD, ADRs -``` - -**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) +Actionable engineering roadmaps and execution blueprints: +- **Homelab**: Architecture consolidation, Appctl v2 engine, Stalwart email, Diun alerting, security hardening. +- **NixOS**: Workstation decoupling, secret restructuring, channel migrations. +- **Praxis**: Workout tracking software requirements and domain design baseline. +- **MagNetFlix**: Media indexing and browser extension pipeline. +- **Supervisor**: Engineering supervisory system and progress tracker. --- -## Projects +## 02. Discussions -``` -projects/ -├── nixos/ ← Declarative multi-machine OS fleet & flake architecture -│ └── plans/ ← Migration and optimization roadmaps -├── homelab/ ← Infrastructure, Docker services, appctl, GitOps, networking -│ ├── plans/ ← Migration and strategy documents -│ └── 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) +Permanent records of architectural inquiries and prospective options evaluations: +- [GitOps Dispatcher Architecture](02-discussions/homelab/gitops-dispatcher-architecture.md) +- [NixOS Monorepo vs. Multi-Repo](02-discussions/homelab/nixos-monorepo-vs-multirepo.md) +- [Stalwart vs. Hostinger Email Evaluation](02-discussions/homelab/hostinger-vs-stalwart-email-evaluation.md) +- [Assistant Chatbot Architecture](02-discussions/homelab/chatbot-assistant-design.md) +- [Brain Structural Validator Refactoring](02-discussions/brain/validate-brain-refactor-architecture.md) --- -## Records +## 03. Records -``` -records/ -└── journal/ ← Dated engineering retrospectives -``` +Historical memory and durable empirical records: +- **Journals (`03-records/journal/`)**: Dated daily engineering retrospectives (`YYYY-MM-DD.md`). +- **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 -``` -practice/ -└── LeetCode/ - ├── 00-practiced-patterns.md ← Pattern index - ├── 0001-two-sum.md - └── Solutions/ ← Python solution files -``` +Durable concepts, operational procedures, and deliberate practice: +- **Knowledge (`04-learning/knowledge/`)**: + - `concepts/` — Algorithms, data structures (Binary Search, HashMaps). + - `technologies/` — Tool and language understanding (Python, Docker, Nix, tmux). + - `methods/` — Engineering methodologies (Testing, Auth, SQL, CI/CD, Tag extraction). +- **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 -``` -agents/ -├── homelab-operations.md ← Homelab operational workstation & diagnostics agent -├── homelab-core.md ← Homelab Core platform & deployment invariants agent -├── nixos-workstation.md ← Laptop declarative NixOS/Home Manager configuration agent -├── magnetflix.md ← MagNetFlix automated media acquisition pipeline agent -├── nekoweb.md ← NekoWeb manga platform & full-stack agent -└── second-brain.md ← Personal knowledge graph curation & validation agent -``` +Declarative specifications and behavioral guardrails for AI agents across workstations: +- [Homelab Operations](05-agents/profiles/homelab-operations.md) +- [Homelab Core Platform](05-agents/profiles/homelab-core.md) +- [NixOS Mobile Workstation](05-agents/profiles/nixos-workstation.md) +- [MagNetFlix Media Pipeline](05-agents/profiles/magnetflix.md) +- [NekoWeb Manga Platform](05-agents/profiles/nekoweb.md) +- [Second Brain Knowledge Graph](05-agents/profiles/second-brain.md) --- -## 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.