Pdf brain

From joelhooks/joelclaw · View interactive version

Pdf brain is an AI agent skill from the GitHub repository joelhooks/joelclaw. Research and library synthesis from the docs/PDF corpus, mapped to joelclaw system philosophy and concrete operational actions (especially k8s reliability). Trigger on: 'research this', 'from the library', 'from the books', 'pdf brain', 'correlate this', 'synthesize', or any request to derive practi

How to use this skill

Skill file

PDF Brain — Research → Practical System Moves

Use this skill when the user wants evidence-backed synthesis from the docs library (600+ books, PDFs, long-form references), not generic web summarization.

Pipeline v2 (ADR-0234)

The docs pipeline uses a staged artifact chain:

When to Use

Trigger cues (explicit or implied):

Retrieval Workflow

CLI path (preferred for interactive sessions)

There is no separate pdf-brain binary. Use joelclaw docs …. A PATH alias pdf-brain → joelclaw docs may exist for old muscle memory.

# Search across all books — semantic by default (nomic 768-dim)
joelclaw docs search "distributed consensus" --limit 8

# Search within a specific book
joelclaw docs search "consensus" --doc designing-dataintensive-applications-39cc0d1842a5

# Expand a chunk into surrounding context
joelclaw docs context <chunk-id> --mode snippet-window --before 2 --after 2

# Get the full parent section
joelclaw docs context <chunk-id> --mode parent-section

# Get neighboring sections for broad context
joelclaw docs context <chunk-id> --mode section-neighborhood --neighbors 2

# Read the full structured markdown of a book
joelclaw docs markdown <doc-id>

# Get document summary + taxonomy metadata
joelclaw docs summary <doc-id>

API path (for programmatic access or docs-api consumers)

GET /search?q=distributed+consensus&semantic=true&expand=true&assemble=true
GET /docs/:docId/toc
GET /docs/:docId/markdown
GET /docs/:docId/summary
GET /chunks/:chunkId

The docs-api runs on k8s at docs-api:3838 (Bearer auth required).

Context expansion strategy

The library supports progressive context expansion:

  1. Search → chunk-level hits with heading_path and snippet
  2. snippet-window → 2 chunks before/after for local context
  3. parent-section → the full section containing the snippet
  4. section-neighborhood → adjacent sections for broader flow
  5. markdown → the complete structured book text

Start narrow, expand only when needed. Don't dump full books into context.

Evidence Synthesis

Build an evidence ledger

While reading, keep a compact ledger:

Never output synthesis without traceable evidence.

Convert evidence into principles

Turn each claim into an operational principle in imperative form:

Avoid vague advice. Each principle must imply a technical behavior.

Correlate to joelclaw philosophy

Map principles to existing joelclaw operating rules:

Translate into action

For each principle, produce:

  1. Concrete change (file/service/config path)
  2. Validation gate (exact command)
  3. Failure signal (what proves it did not work)
  4. Rollback or containment move

Taxonomy

The library is classified via SKOS taxonomy:

Use --concept jc:docs:programming:systems to narrow by domain.

Use joelclaw docs status to see facet counts per concept.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.