docs/design/plans/2025-02-11-claude-toolkit-design.md
Every Claude Code session starts from zero on operational knowledge that never changes. This causes:
A layered system of rules, skills, and agents that encode operational knowledge, automate workflows, and provide autonomous specialists for common tasks.
Rules are path-triggered and load automatically when touching relevant files.
| Rule | Trigger paths | Purpose |
|---|---|---|
extractors.md | lib/woods/extractors/**/*.rb | Extractor interface conventions |
docs.md | docs/**/*.md | Documentation conventions (dual-DB, tables, cross-refs) |
storage-retrieval.md | lib/woods/storage/**/*.rb, retrieval/**/*.rb, embedding/**/*.rb | Storage/retrieval layer conventions |
integration-testing.md | lib/woods/extractors/**/*.rb, spec/**/*_spec.rb | Host app validation workflow (local + Docker) |
Skills shape behavior when invoked. They don't execute autonomously — they provide the playbook.
| Skill | Purpose |
|---|---|
backlog-workflow | How to pick items from OPTIMIZATION_BACKLOG.md, implement with TDD, mark resolved, add new items |
doc-sync | What docs to check after implementation changes, rules for updating them |
mcp-patterns | MCP server design rules, reference implementation patterns, how to add tools and build new servers |
Agents are dispatched with a plan and operate independently. They report results but don't make decisions.
| Agent | Tools | Purpose |
|---|---|---|
host-app-validator | Bash, Read, Glob, Grep | Validates extraction in a host Rails app (local or Docker). Takes environment as parameter. |
code-optimizer | Read, Glob, Grep, Bash | Analyzes code for simplification opportunities. Proposes changes with rationale, doesn't implement. |
doc-reviewer | Read, Glob, Grep | Cross-references recent changes against docs. Reports gaps, doesn't fix them. |
use-case-explorer | Read, Glob, Grep, WebSearch | Identifies extraction coverage gaps and untapped uses for extracted data. Two modes: coverage gaps + untapped uses. |
retrieval-designer | Read, Glob, Grep | Designs retrieval query patterns grounded in RETRIEVAL_ARCHITECTURE.md. Outputs task type, query classification, retrieval steps, token budget allocation. |
Added to CLAUDE.md (139 lines total):
.claude/context/session-state.mdFiles with direct references to local projects are gitignored:
.claude/rules/integration-testing.md.claude/agents/host-app-validator.md.claude/context/session-state.md.claude/settings.local.json