## Context

BooCode has 0% TypeScript type recovery. When agents read files, they get raw text without type signatures. The type-inject project provides a published MCP server and hooks that extract TypeScript types and inject them contextually.

## Goals / Non-Goals

**Goals:**
- Add `@nick-vi/type-inject-mcp` as MCP server in BooCode config
- Add auto-type-injection on file reads (Read tool hook)
- Add type-check feedback on file writes (Write tool hook)
- Add `lookup_type` and `list_types` tools for agents

**Non-Goals:**
- Type extraction for non-TypeScript languages (future scope)
- Full ts-morph project analysis (type-inject handles this)

## Decisions

- **MCP server registration**: One-line addition to mcpServers config: `npx -y @nick-vi/type-inject-mcp`
- **Read hook**: Register a PostToolUse hook for `Read` tool that pipes content through type-inject
- **Write hook**: Register a PostToolUse hook for `Write`/`Edit` tool that runs type checker
- **Token budget**: Configure `maxTokens: 2000`, `skipBarrelFiles: true`, `onlyUsed: true` defaults
- **Published package**: No local fork needed. Use published npm package.

## Risks / Trade-offs

- **Latency**: Type extraction adds ~200-500ms per file read. Token budget limits prevent runaway costs.
- **Accuracy**: ts-morph-based extraction is accurate but may miss dynamic types. Acceptable trade-off.
