Claude Code Insights

How Claude Code operates inside the Stonewall corpus — infrastructure decisions, automation posture, and session-level patterns.

Operating model

Claude Code reads CLAUDE.md and AGENTS.md at session start to understand repo structure, constraints, and workflow conventions. The Stonewall Brain skill provides instant recall of cast, events, patterns, terms, and cases. The Jedi Archive skill handles corpus maintenance.

Every session operates under the Covenant: analyze, chronicle, never advise. The Tactical Nuance Clause carves out an exception for direct work product — drafting emails, billing, legal prep — when QB1 explicitly asks.

Infrastructure stack

Scripts (Python)

PDF sidecar generation with pypdf + tesseract OCR. OneDrive intake, manifest backfill, corpus KPI generation, repo sweep, and verification suite. All stdlib-first, no heavy frameworks.

Scripts (Node)

Email consolidation, Notion bulk upload, case tagging (email_deep_tag.mjs), date repair, and repo markdown consolidation. All ESM, stdlib https for Notion API — no npm dependencies.

Portal (FastAPI)

Case dashboard with search, deadlines, DG workflow readiness, and dossier views. Reads catalog/manifest.md on first API call and caches in memory. Static export via portal/build.py for public deploy.

CI / Verification

verify_all.py runs node tests, Python test discovery, pre-PR check (strict), ontology validation, KPI freshness, and docs drift detection. Same suite in CI and local.

Session patterns

  • Session-start hook runs repo health checks and surfaces uncatalogued files
  • Capture pipeline stages artifacts into sources/ with PDF sidecar generation
  • Process-inbox drains pending captures into the manifest with full provenance metadata
  • Daily briefing skill synthesizes session-start signals with optional git/Notion delta
  • Strategize and Plan skills scaffold tactical work product outside the Covenant voice

Learn more

The extended Claude Code operating audit lives at docs/claude-code-insights.md in the repository. The shorter variant is at sources/analysis/claude-code-insights.md.