/chain runs every step of the Brain OS knowledge pipeline in sequence, from raw epub to a committed, synced vault. Use it when you want to process a new book end-to-end without manually triggering each skill.
Usage
Pipeline Steps
/self-learn — Extract, validate, extend
Runs all three phases autonomously:
- Phase 1 (Extract): Parses the epub and writes atomic concept notes to
knowledge/raw/ - Phase 2 (Validate): Runs the 4-role autoresearch loop against NotebookLM, repeating until 100% of questions pass at ≥95
- Phase 3 (Extend): Writes synthesis, applied domain, and research extension notes
/ingest — Raw notes to structured book note
Converts the raw extracted notes into a single structured book note at
{vault}/knowledge/books/[book-slug].md using the Book Note Template, then updates the books index./audit — 50 fresh questions vs NotebookLM
Runs an independent verification pass with 50 new questions (25 topic, 15 cross-cutting, 10 adversarial). If 100% pass at ≥95, the audit flag is set to
true. If any fail, the pipeline stops and a task is written to your inbox./absorb — Connect insights to your vault
Because the audit flag is already
true, /absorb bypasses the approval prompt and applies vault connections automatically — updating your strategy, goals, and thinking notes based on the book’s insights.Pipeline State
Each book’s pipeline state is tracked in_validation/audit-flag.json:
/chain --resume reads this file to determine which step to continue from after an interruption.
Error Handling
Phase 2 fails (< 100% pass rate)
Phase 2 fails (< 100% pass rate)
The validation loop continues indefinitely — there is no timeout. It generates new questions targeting weak topics and keeps iterating until every question passes at ≥95. The pipeline only proceeds to
/ingest once 100% pass rate is achieved.Audit fails
Audit fails
The pipeline stops immediately. The audit flag stays
false. A task is written to business/tasks/inbox.md with details about which questions failed. Run /audit manually after reviewing and correcting your notes, then use /chain --resume to continue.Git push fails
Git push fails
Pull the latest changes first to reconcile any remote updates, resolve any conflicts, then retry the push.
/chain --resume will restart from the sync step.NotebookLM timeout
NotebookLM timeout
The skill retries 3 times with exponential backoff. If all 3 retries fail, the pipeline pauses and notifies you to check your NotebookLM connection before resuming.