orchestrata-ultimate — Claude configuration

Project-specific customization of the Claude Code environment for ~/workspace/orchestrata-ultimate-architecture. Everything below is checked into the repo unless marked otherwise.

Instruction layers (always in context)

Instruction layer stack

Diagram projects-orchestrata-ultimate-claude-configuration-1

Hooks — .claude/settings.json

Event Hook Effect
SessionStart .claude/hooks/inject-codebase-map.sh regenerates both codebase-map tiers so structure is fresh every session
SessionStart .claude/hooks/start-ast-daemon.sh starts the warm per-repo AST daemon
SessionStart .claude/hooks/start-architecture-sync.sh starts the architecture-semantic-twin sync
PreToolUse (Bash) .claude/hooks/no-xdist.sh blocks pytest -n/--dist — xdist deadlocks this suite at ~78%
PreToolUse (Bash) .claude/hooks/ast-toolkit-hint.sh nudges grep/sed toward scripts/serialize_codebase_ast.py (never blocks)
PreToolUse (Bash) .claude/hooks/force-test-observation.sh forces pytest runs through the live observer, no escape hatch
PreToolUse (Write/Edit/MultiEdit) .claude/hooks/no-doubles-py.sh blocks mocks/stubs/fakes/monkeypatch being written into .py
PreToolUse (Write/Edit/MultiEdit) .claude/hooks/no-banned-deps.sh blocks banned dependencies being written into pyproject.toml
Stop .claude/hooks/forbidden-doubles-stop.sh end-of-turn double-check for forbidden test doubles

.claude/settings.local.json (not committed) holds a small permission allow-list (git diff, /tmp reads, swipl).

Subagent definitions — .claude/agents/ (8)

analyst (Fable, design/contract diagrams), auditor (read-only spec-vs-code), builder (Sonnet implementation to a settled brief), lint-fixer (Haiku-tier mechanical), refactorer (behavior-preserving), reviewer (adversarial diff review), test-writer (coverage waves), wirer (surgical integration). Conventions baked into the definitions: Opus orchestrates / Sonnet builds; verification must be SYNCHRONOUS parallel per-file pytest inside one Bash call (the harness auto-backgrounds long commands and subagents never get completion notifications — the "orphaned-wait trap"); builders never touch the git index.

Skills — .claude/skills/

Workflows — .claude/workflows/ (versioned; gitignore whitelisted 2026-07-09)

Session tracking

Per-project context.json/context.md managed exclusively by the session CLI (python3 ~/.claude/tools/session_cli.py, alias session) — never hand-edited (atomic + fcntl-locked I/O after a corruption incident). Five session hooks (sns/cts/remember + SessionStart/End) + the SPEC-023 goal-gate are deployed; deep doc: claude/SESSION_SYSTEM.md in-repo.

Memory (two-tier, outside the repo)

Git-side gates (adjacent, not Claude-specific)

.git/hooks/pre-commit (custom): ruff --fix + blocking code-review.py on staged src/* + test-review.py on tests/*. .pre-commit-config.yaml (CI layer): check-deps, standards, untyped-ratchet, pyright-ratchet (--max 283), check-traces-ratchet, auto-fix dry-run. scripts/git-hooks/ pre-push runs the threadpool suite (known false timeouts on slow live-e2e modules under load — re-run solo before trusting).