Brain Structural Validation / Validate Markdown Structure & Links (push) Failing after 8s
9.1 KiB
9.1 KiB
type, status, project, tags
| type | status | project | tags | |||||
|---|---|---|---|---|---|---|---|---|
| plan | completed | brain |
|
Implementation Plan: Incident Debug Records & Daily Journal Workflow Reorganization
Goal Description
Establish a clean separation of concerns across the Second Brain (~/Brain) and operational homelab repository (~/Homelab):
- Daily Journals (
records/journal/YYYY-MM-DD.md): Strictly one entry per day serving as a cohesive daily log across all projects, tracking wins, progress, reflections, mistakes/lessons learned, and linking to specialized debug reports. - Epistemic Incident Reports (
records/debug/YYYY-MM-DD-<slug>.md): First-class technical artifacts (type: debug) capturing scientific root cause analyses (RCAs), protocol investigations, and operational post-mortems following the modular epistemic progression. - Inbox Staging Lifecycle: Operational agents stage incident reports into
~/Brain/inbox/YYYY-MM-DD-<slug>-debug.md(type: inbox). During curation, the report is normalized intorecords/debug/, and the daily journal for that date (records/journal/YYYY-MM-DD.md) is updated with a summary and relative link in a dedicated## Incidents & Debuggingsection.
flowchart TD
subgraph Operational ["Homelab Operational Session"]
Triage["Investigate & Diagnose via SSH"]
Fix["Local Declarative Remediation"]
Deploy["User Deployment & Recovery"]
StageInbox["Stage Incident Report<br/><code>~/Brain/inbox/YYYY-MM-DD-<slug>-debug.md</code><br/>(type: inbox)"]
Triage --> Fix --> Deploy --> StageInbox
end
subgraph Curation ["Second Brain Inbox Curation"]
Curate["Curate Inbox Draft"]
DebugFile["<code>records/debug/YYYY-MM-DD-<slug>.md</code><br/>(type: debug)"]
DailyLog["<code>records/journal/YYYY-MM-DD.md</code><br/>(type: journal)<br/><i>## Incidents & Debugging link</i>"]
Curate -->|"Normalize frontmatter & move"| DebugFile
Curate -->|"Append / Create daily entry"| DailyLog
DailyLog -.->|"Relative link"| DebugFile
end
StageInbox --> Curate
Canonical Decisions & Invariants
type: debug: First-class citizen in the Brain taxonomy, validated byscripts/validate-brain.py.- Daily Journal Invariant:
records/journal/strictly contains one file per date formatted asYYYY-MM-DD.md. - Journal Integration: A dedicated
## Incidents & Debuggingsection inrecords/journal/YYYY-MM-DD.mdsummarizes root causes and remediation actions with relative links to../debug/YYYY-MM-DD-<slug>.md. - Semantic Commit Type:
debugadded to repository semantic commit standards (debug(<scope>): <short description>).
Implemented Changes
1. Second Brain Governance & Validator (~/Brain)
- First-Class
type: debug:- Added
"debug"toVALID_TYPESinscripts/validate-brain.py. - Documented
records/debug/in the semantic contract table and directory definitions ofAGENTS.md. - Added
# debugfrontmatter template and documented thedebugcommit type. - Formalized inbox curation processing rules for
*-debug.mdfiles.
- Added
- Methodology & Agent Profiles:
- Updated
knowledge/methods/incident-investigation-and-journaling.mdto referencerecords/debug/YYYY-MM-DD-<slug>.mdwithtype: debug. - Updated
agents/homelab-operations.mdto reflect the operational staging workflow intoinbox/YYYY-MM-DD-<slug>-debug.md.
- Updated
2. Homelab Operations Contract (~/Homelab)
- Operational Staging:
- Updated workflow diagram and operational steps in
Homelab/AGENTS.mdto stage post-incident RCA artifacts to~/Brain/inbox/YYYY-MM-DD-<slug>-debug.md. - Updated Section 4 to "Post-Incident Debugging & Epistemic Reporting" defining staging schema and handoff to Brain curation.
- Updated workflow diagram and operational steps in
3. Records Migration & Partitioning (~/Brain/records/)
-
Migrated Incident Reports to
records/debug/(type: debug):records/debug/2026-09-14-server-unexpected-shutdown-rca.mdrecords/debug/2026-09-18-gitea-actions-nix-runner-fix.mdrecords/debug/2026-09-18-gitea-github-mirror-dns-resolution-failure.mdrecords/debug/2026-09-21-gitea-actions-fhs-nix-container-fix.mdrecords/debug/2026-09-21-gitops-webhook-payload-signature-mismatch.mdrecords/debug/2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md
-
Unified Daily Journals Created in
records/journal/(type: journal, strictlyYYYY-MM-DD.md):records/journal/2026-09-11.md— NixOS appliance cutover and documentation overhaul.records/journal/2026-09-13.md— Milestone P0: GitOps Trust Boundary Implementation deliverables and invariant proofs.records/journal/2026-09-14.md— Milestone P0 closure & P1 transition (Wins) + Server Unexpected Shutdown RCA link.records/journal/2026-09-15.md— Stalwart email infrastructure, deliverability architecture, Brevo relay, and webmail deployment.records/journal/2026-09-18.md— Daily wins + links to Nix runner hang and Docker mirror DNS failure debug records.records/journal/2026-09-21.md— appctl Engine V2 rework & TDD scaffold (Wins) + links to Gitea Actions FHS container fix and Webhook signature mismatch RCAs.records/journal/2026-09-22.md— Diun socket proxy integration and Stalwart alerting (Wins) + link to Diun provider RCA.
-
Cross-References Updated:
Directory Layout Comparison
Before
records/
├── debug/ (empty)
├── decisions/
├── discussions/
└── journal/
├── 2026-06-25.md
├── 2026-06-26.md
├── ...
├── 2026-09-11-homelab-core-nixos-appliance-cutover.md
├── 2026-09-13-homelab-core-p0-gitops-trust-boundary.md
├── 2026-09-14-homelab-core-p0-closure-and-p1-transition.md
├── 2026-09-14-server-unexpected-shutdown-rca.md
├── 2026-09-15-stalwart-email-server-and-webmail-deployment.md
├── 2026-09-18-gitea-actions-nix-runner-fix.md
├── 2026-09-18-gitea-github-mirror-dns-resolution-failure.md
├── 2026-09-21-appctl-engine-v2-rework-and-tdd-scaffold.md
├── 2026-09-21-gitea-actions-fhs-nix-container-fix.md
├── 2026-09-21-gitops-webhook-payload-signature-mismatch.md
└── 2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md
After
records/
├── debug/ # Epistemic RCAs & postmortems (type: debug)
│ ├── 2026-09-14-server-unexpected-shutdown-rca.md
│ ├── 2026-09-18-gitea-actions-nix-runner-fix.md
│ ├── 2026-09-18-gitea-github-mirror-dns-resolution-failure.md
│ ├── 2026-09-21-gitea-actions-fhs-nix-container-fix.md
│ ├── 2026-09-21-gitops-webhook-payload-signature-mismatch.md
│ └── 2026-09-22-diun-socket-proxy-integration-and-stalwart-alerting.md
├── decisions/
├── discussions/
└── journal/ # Strictly 1 file per day (type: journal)
├── 2026-06-25.md
├── 2026-06-26.md
├── 2026-06-29.md
├── 2026-06-30.md
├── 2026-07-01.md
├── 2026-08-10.md
├── 2026-08-16.md
├── 2026-09-11.md
├── 2026-09-13.md
├── 2026-09-14.md
├── 2026-09-15.md
├── 2026-09-18.md
├── 2026-09-21.md
└── 2026-09-22.md
Verification & Validation
Execution of python scripts/validate-brain.py:
Checking deprecated directories...
✓ Done.
Checking required root files...
✓ Done.
Checking frontmatter...
✓ Done (0 issues).
Checking relative links...
✓ Done (0 broken links).
Checking markdown code fences...
✓ Done (0 issues).
Checking Mermaid diagrams...
✓ Done (0 issues).
Checking Python code quality (Ruff)...
✓ Done (0 lint issues).
Checking Python type consistency (Pyright)...
✓ Done (0 type errors).
✅ All checks passed. Brain structure is valid.