Engineering digest

How the Stonewall engine is built and run — infrastructure decisions, automation posture, and the rolling 24-hour archive of canonical verification runs.

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. A companion archive skill handles corpus maintenance.

Every session operates under the core operating rule: analyze, chronicle, never advise. The Tactical Nuance Clause carves out an exception for direct work product — drafting emails, billing, legal prep — when the operator 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 narrative voice

Learn more

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