Automatically loads domain README.md context when you start working in a registered library or module. Reads architecture, public API, and patterns before touching domain-specific code. Activate when the task involves a specific library, domain path, or module the user references.
You have access to a Domain Registry that maps library paths to their documentation. When working on domain-specific code, you MUST silently load that domain's context before proceeding.
At the start of any task, look for this section in CLAUDE.md:
## Domain Registry
<!-- domain-registry-start -->
| Path | Import Path | Description |
|------|-------------|-------------|
| libs/widget-chat | @scope/widget-chat | Chat widget |
<!-- domain-registry-end -->
If ## Domain Registry is not present, skip all steps below.
Determine which domain is relevant based on:
libs/widget-chat/domain/store.ts@scope/widget-chat)If no domain matches, proceed normally without loading any README.
For each matched domain path, read the file at <path>/README.md.
Do this silently. Do NOT announce "I'm loading the README for...". Just read it and use the knowledge to:
Use what you read to answer or implement with domain-accurate precision:
If you're asked to generate or update a domain README, it should include:
# <Domain Name>
One-line description.
## Architecture
Diagram or description of layers, key files, data flow.
## Public API
Exported services, components, stores with brief description of each.
## Key Patterns
Conventions specific to this domain (store shape, facade, etc.).
## Usage Example
Minimal code snippet showing how to import and use.
## Dependencies
What this domain depends on and what depends on it.
| Situation | Action |
|---|---|
README.md is missing | Skip silently, proceed with code exploration |
| README is outdated (contradicts code) | Trust the code, flag the discrepancy to the user |
| Multiple domains match | Load all matching READMEs |
| Domain registry not in CLAUDE.md | Skip all domain context loading |