|
| 1 | +# claude-cognitive Development (Project-Local Context) |
| 2 | + |
| 3 | +> **Project**: claude-cognitive v1.2 Intelligence Enhancement |
| 4 | +> **Purpose**: Dogfooding - use claude-cognitive to build claude-cognitive |
| 5 | +> **Status**: v1.1 Production (global ~/.claude/), v1.2 Development (this project) |
| 6 | +
|
| 7 | +--- |
| 8 | + |
| 9 | +## Current Work |
| 10 | + |
| 11 | +**Phase**: v1.2 Planning + Initial Prototyping |
| 12 | +**Focus**: Ralph Loop integration + Phase 1 (Usage Tracking) |
| 13 | + |
| 14 | +**Recent Activity**: |
| 15 | +- ✅ Created V1.2_INTELLIGENCE_ROADMAP.md (comprehensive plan) |
| 16 | +- ✅ Created RALPH_LOOP_INSIGHTS.md (philosophical foundation) |
| 17 | +- ✅ Integrated Ralph Loop pattern into roadmap |
| 18 | +- 🔄 Setting up project-local .claude/ for dogfooding |
| 19 | +- ⏭️ Next: Prototype usage-tracker.py |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Project Structure |
| 24 | + |
| 25 | +``` |
| 26 | +claude-cognitive-package/ |
| 27 | +├── scripts/ # v1.1 production scripts (copy to ~/.claude/scripts/) |
| 28 | +│ ├── context-router-v2.py # [v1.1] Core router (INSTALLED GLOBALLY) |
| 29 | +│ ├── history.py # [v1.1] History viewer (INSTALLED GLOBALLY) |
| 30 | +│ ├── pool-*.py # [v1.1] Pool coordination (INSTALLED GLOBALLY) |
| 31 | +│ │ |
| 32 | +│ ├── usage-tracker.py # [v1.2] PROTOTYPE - Usage learning |
| 33 | +│ ├── semantic-matcher.py # [v1.2] PROTOTYPE - Fuzzy matching |
| 34 | +│ ├── predictor.py # [v1.2] PROTOTYPE - Sequence learning |
| 35 | +│ └── forage.py # [v1.2] PROTOTYPE - Ralph Loop foraging |
| 36 | +│ |
| 37 | +├── .claude/ # PROJECT-LOCAL context (this directory) |
| 38 | +│ ├── CLAUDE.md # This file |
| 39 | +│ ├── modules/ # claude-cognitive components |
| 40 | +│ │ ├── context-router.md # Router internals |
| 41 | +│ │ ├── pool-coordinator.md # Pool system |
| 42 | +│ │ ├── usage-tracker.md # v1.2 usage learning |
| 43 | +│ │ └── foraging-agent.md # v1.2 Ralph Loop agent |
| 44 | +│ └── integrations/ |
| 45 | +│ └── claude-code-hooks.md # Hook integration points |
| 46 | +│ |
| 47 | +├── V1.2_INTELLIGENCE_ROADMAP.md # Master plan |
| 48 | +├── RALPH_LOOP_INSIGHTS.md # Philosophy |
| 49 | +├── README.md # Public-facing docs |
| 50 | +└── templates/ # User templates |
| 51 | +``` |
| 52 | + |
| 53 | +--- |
| 54 | + |
| 55 | +## Keywords (Project-Specific) |
| 56 | + |
| 57 | +**v1.2 Development**: |
| 58 | +- usage, tracking, learning, feedback, ralph, loop, iteration |
| 59 | +- foraging, discovery, autonomous, agent, convergence |
| 60 | +- semantic, embedding, similarity, matching |
| 61 | +- prediction, sequence, pre-loading, anticipatory |
| 62 | +- budget, adaptive, threshold, dynamic |
| 63 | +- circuit-breaker, safeguard, protection |
| 64 | + |
| 65 | +**Core Components** (v1.1): |
| 66 | +- router, context, attention, activation, decay |
| 67 | +- keyword, injection, hot, warm, cold |
| 68 | +- history, pool, coordinator, instance |
| 69 | + |
| 70 | +**Files/Modules**: |
| 71 | +- context-router-v2, usage-tracker, foraging-agent |
| 72 | +- semantic-matcher, predictor, history |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## When Working On... |
| 77 | + |
| 78 | +### **Usage Tracking (Phase 1)** |
| 79 | +Auto-activates: |
| 80 | +- `.claude/modules/usage-tracker.md` |
| 81 | +- `.claude/modules/context-router.md` (integration points) |
| 82 | + |
| 83 | +### **Foraging Agent (Phase 4)** |
| 84 | +Auto-activates: |
| 85 | +- `.claude/modules/foraging-agent.md` |
| 86 | +- `RALPH_LOOP_INSIGHTS.md` |
| 87 | +- `.claude/modules/usage-tracker.md` (feedback loop) |
| 88 | + |
| 89 | +### **Semantic Matching (Phase 2)** |
| 90 | +Auto-activates: |
| 91 | +- `.claude/modules/semantic-matcher.md` |
| 92 | +- `.claude/modules/context-router.md` |
| 93 | + |
| 94 | +### **Pool System** |
| 95 | +Auto-activates: |
| 96 | +- `.claude/modules/pool-coordinator.md` |
| 97 | +- `.claude/integrations/claude-code-hooks.md` |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## Development Workflow |
| 102 | + |
| 103 | +### Prototyping (Current Phase) |
| 104 | + |
| 105 | +**1. Create Prototype:** |
| 106 | +```bash |
| 107 | +# Phase 1: Usage tracking |
| 108 | +touch scripts/usage-tracker.py |
| 109 | +# Write prototype with _prototype suffix during development |
| 110 | +``` |
| 111 | + |
| 112 | +**2. Test on This Project:** |
| 113 | +```bash |
| 114 | +# Dogfood immediately |
| 115 | +cd /home/garret-sutherland/claude-cognitive-package/ |
| 116 | +python scripts/usage-tracker.py --test |
| 117 | + |
| 118 | +# Check if it tracks attention state correctly |
| 119 | +cat .claude/attn_state.json |
| 120 | +``` |
| 121 | + |
| 122 | +**3. Measure Impact:** |
| 123 | +```bash |
| 124 | +# Before: Baseline context quality |
| 125 | +# After: Context quality with usage tracking |
| 126 | +# Document results in V1.2_INTELLIGENCE_ROADMAP.md |
| 127 | +``` |
| 128 | + |
| 129 | +**4. Integrate:** |
| 130 | +```bash |
| 131 | +# Once validated, integrate into context-router-v2.py |
| 132 | +# Or keep standalone if appropriate |
| 133 | +``` |
| 134 | + |
| 135 | +### Testing Strategy |
| 136 | + |
| 137 | +**Test Environments:** |
| 138 | +1. **This project** (claude-cognitive itself) - Primary dogfooding |
| 139 | +2. **Small example project** - Validate zero-config experience |
| 140 | +3. **Large project** (if available) - Validate scalability |
| 141 | + |
| 142 | +**Metrics to Track:** |
| 143 | +- Token savings (% reduction) |
| 144 | +- First-turn context quality (% of needed files available) |
| 145 | +- Wasted context (% of injected files unused) |
| 146 | +- Time to productivity (seconds until first useful action) |
| 147 | + |
| 148 | +--- |
| 149 | + |
| 150 | +## Critical Principles |
| 151 | + |
| 152 | +### 1. **Dogfooding is Mandatory** |
| 153 | +- Every v1.2 feature tested on claude-cognitive itself first |
| 154 | +- Attention state visible while developing |
| 155 | +- Use pool coordination for multi-session work |
| 156 | + |
| 157 | +### 2. **Ralph Loop Philosophy** |
| 158 | +- Iteration > perfection |
| 159 | +- Objective feedback required |
| 160 | +- Convergence detection prevents waste |
| 161 | +- Circuit breakers prevent disasters |
| 162 | + |
| 163 | +### 3. **Backwards Compatibility** |
| 164 | +- v1.1 users upgrade seamlessly |
| 165 | +- No breaking changes to core router |
| 166 | +- New features opt-in or auto-enabled safely |
| 167 | + |
| 168 | +### 4. **Quantitative Validation** |
| 169 | +- Every feature needs metrics |
| 170 | +- Measure on 3+ projects before merging |
| 171 | +- Document results in roadmap |
| 172 | + |
| 173 | +--- |
| 174 | + |
| 175 | +## Quick Reference |
| 176 | + |
| 177 | +**Main Docs**: |
| 178 | +- `V1.2_INTELLIGENCE_ROADMAP.md` - Master plan |
| 179 | +- `RALPH_LOOP_INSIGHTS.md` - Philosophy |
| 180 | +- `README.md` - Public docs |
| 181 | +- `CHANGELOG.md` - Version history |
| 182 | + |
| 183 | +**Context Docs**: |
| 184 | +- `.claude/modules/context-router.md` - Router internals |
| 185 | +- `.claude/modules/usage-tracker.md` - Usage learning (v1.2) |
| 186 | +- `.claude/modules/foraging-agent.md` - Ralph Loop agent (v1.2) |
| 187 | +- `.claude/modules/pool-coordinator.md` - Pool system |
| 188 | + |
| 189 | +**Global Installation**: |
| 190 | +- `~/.claude/scripts/` - v1.1 production scripts (LIVE) |
| 191 | +- `~/.claude/attention_history.jsonl` - Active history log |
| 192 | +- `~/.claude/attn_state.json` - Current attention scores |
| 193 | + |
| 194 | +--- |
| 195 | + |
| 196 | +## Next Steps |
| 197 | + |
| 198 | +**Immediate (Today)**: |
| 199 | +1. Create `.claude/modules/*.md` files for v1.2 components |
| 200 | +2. Start prototyping `usage-tracker.py` |
| 201 | +3. Test on this project (dogfood) |
| 202 | + |
| 203 | +**Short-term (This Week)**: |
| 204 | +1. Complete Phase 1 prototypes (usage tracking + explanations) |
| 205 | +2. Measure impact quantitatively |
| 206 | +3. Document results in roadmap |
| 207 | + |
| 208 | +**Medium-term (Next 2 Weeks)**: |
| 209 | +1. Phase 2: Semantic matching + dynamic budgeting |
| 210 | +2. Integration testing on multiple projects |
| 211 | +3. Community feedback (GitHub discussions) |
| 212 | + |
| 213 | +--- |
| 214 | + |
| 215 | +**Working on v1.2?** Check current phase in `V1.2_INTELLIGENCE_ROADMAP.md` |
| 216 | +**Need context?** Mention keywords above to activate relevant modules |
| 217 | +**Testing?** Always dogfood on this project first |
0 commit comments