kiskaadee c7780b3117
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 7s
infra(validator): phase 3 — shared linear Markdown fence scanner
Replace the two independent fence implementations with a single
scan_code_blocks() function that both check_code_fences() and
check_mermaid() consume.

Previous state:
  check_code_fences() counted lines starting with ``` globally,
    including lines inside other fences, and produced a single
    "found N delimiters" message with no way to distinguish
    multiple unclosed fences.

  check_mermaid() used re.finditer with DOTALL, which could match
    a ```mermaid line inside a documentation fence as a real
    diagram, producing false positives.

scan_code_blocks(content) walks the document line-by-line:
  - Tracks the opening fence backtick width (3, 4, ...)
  - Closing fence requires >= opener width and no info string
    (4-backtick outer not closed by 3-backtick inner — CommonMark)
  - Up to 3 leading spaces permitted on fence lines

Returns:
  blocks   — CodeBlock per matched pair (language, content,
             start_line, end_line)
  unclosed — start_line for every opener with no matching close

check_code_fences() now reports each unclosed fence separately
with the precise start_line.

check_mermaid() filters blocks by language == mermaid so
documentation examples inside outer fences are never validated.
Line numbering uses block.start_line + 1 + i from the scanner.

Integration tested: balanced fences, unclosed fence, 4-backtick
outer/3-backtick inner, real mermaid labels and structure, both
checks agree on the same document.
2026-09-26 05:56:01 -05:00

🧠 Brain

A personal knowledge graph organized by document type, not by subject.


Structure

Directory What it contains
inbox/ Zero-friction capture. Write here when you don't know where something belongs yet.
knowledge/ Durable understanding — things you know and want to keep.
projects/ Contextual documents that belong to a specific project.
records/ Historical artifacts — things that happened.
practice/ Algorithm exercises and implementation drills.
agents/ Canonical agent specifications, behavioral guardrails, and role profiles.

Knowledge

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:


Projects

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:


Records

records/
└── journal/        ← Dated engineering retrospectives

Practice

practice/
└── LeetCode/
    ├── 00-practiced-patterns.md   ← Pattern index
    ├── 0001-two-sum.md
    └── Solutions/                 ← Python solution files

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

Conventions

Every document has a type field in its YAML frontmatter. See AGENTS.md for the full metadata convention, directory semantics, link standards, and git commit format.


Inbox

Documents that haven't been classified yet live in inbox/. See inbox/README.md for the capture rule.

S
Description
Personal knowledge graph and lifelong learning vault structured by document type, progressive summarization, and ADRs.
Readme Unlicense
1.8 MiB
0 Stars 1 Watchers 0 Forks
Languages
Python 93.6%
Shell 3.3%
Nix 3.1%