Skip to content

Commit e9f6020

Browse files
togabrennanclaude
andcommitted
feat: Load keywords from project-local .claude/keywords.json
Replace hardcoded MirrorBot-specific keywords with project-local configuration, making the context router usable across any codebase without script modification. Changes: - Add load_project_config() to load keywords, co_activation, and pinned files - Config lookup: .claude/keywords.json > ~/.claude/keywords.json > empty defaults - Update docs_root to prefer project-local .claude/ directory - Remove ~220 lines of hardcoded keywords from context-router-v2.py - Add templates/keywords.json.example template - Add working example to examples/small-project/ - Update all documentation to reference JSON config This change was motivated by the experience documented at: https://hitchcock.dev/i-spent-3-hours-fixing-a-15-minute-setup/ Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 59ed63d commit e9f6020

11 files changed

Lines changed: 347 additions & 365 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [Unreleased]
1111

12-
*Nothing yet - stay tuned for v1.2!*
12+
### Added
13+
- **Project-local keyword configuration**: Keywords, co-activation, and pinned files now load from `.claude/keywords.json` instead of being hardcoded in the script
14+
- Config lookup order: project `.claude/keywords.json` > global `~/.claude/keywords.json` > empty defaults
15+
- Added `load_project_config()` function in `context-router-v2.py`
16+
- Added `templates/keywords.json.example` template file
17+
- Added example `keywords.json` to small-project example
18+
19+
### Changed
20+
- **docs_root resolution**: Now prefers project-local `.claude/` directory over global `~/.claude/`
21+
- Priority: `CONTEXT_DOCS_ROOT` env > project `.claude/` > global `~/.claude/`
22+
- Updated all documentation to reference `.claude/keywords.json` instead of editing the Python script
23+
- `CUSTOMIZATION.md`: Complete rewrite for JSON config
24+
- `README.md`: Updated Quick Start step 5 and added Project Configuration section
25+
- `SETUP.md`: Added "Create Keywords Config" step
26+
- `docs/guides/getting-started.md`: Updated customization instructions
27+
- `docs/concepts/attention-decay.md`: Updated pinned files and troubleshooting sections
28+
29+
### Removed
30+
- Hardcoded MirrorBot-specific keywords, co-activation rules, and pinned files from `context-router-v2.py` (~220 lines)
1331

1432
---
1533

0 commit comments

Comments
 (0)