ADR-006: Layered Context Architecture
Beslissing
Section titled “Beslissing”Een 4-lagen context systeem voor AI-assisted development: hooks → rules → agents → context files (CLAUDE.md, per-app docs).
Context
Section titled “Context”Beam wordt primair ontwikkeld met Claude Code. Zonder gestructureerde context maakt de AI inconsistente keuzes. Een layered systeem zorgt dat elke laag specifieke verantwoordelijkheden heeft.
Architectuur
Section titled “Architectuur”| Laag | Locatie | Doel | Laden |
|---|---|---|---|
| Hooks | .claude/hooks/ | Pre/post-commit checks, auto-formatting | Automatisch bij events |
| Rules | .claude/rules/ | Code quality, security, documentatie standaarden | Automatisch bij start |
| Agents | .claude/agents/ | Gespecialiseerde taken (review, migration, preflight) | On-demand |
| Context | CLAUDE.md, apps/*/CLAUDE.md | Project-brede en app-specifieke instructies | Automatisch bij start |
Gevolgen
Section titled “Gevolgen”- 5 project agents: beam-reviewer, beam-block-builder, beam-migration, beam-api-builder, beam-preflight
- 4 rules: code-quality, security, documentation, agents
- Per-app CLAUDE.md voor app-specifieke context
- Herbruikbaar scaffold script (
init-claude) voor andere projecten