Skip to content

Commit 263d24d

Browse files
Garret Sutherlandclaude
andcommitted
release: v1.1.2 - Development Preview with v1.2 Phase 1
This is a development preview release showcasing active v1.2 development. ## Stable Features (v1.1.2) Merged from PR #7: - Project-local keyword configuration via .claude/keywords.json - Config hierarchy: project → global → defaults - Removed ~220 lines of hardcoded keywords ## Experimental Features (v1.2 Phase 1) ⚠️ Usage Tracking System (Preview/Observation Mode): Core Components: - scripts/usage_tracker.py: Tracks file usefulness objectively - scripts/usage-track-stop.py: Post-turn analysis via stop hook - Router integration: Applies learned keyword weights - Ralph Loop pattern: Automatic learning after 50 turns What It Does: - Tracks which .claude/*.md files are injected vs accessed - Maps documentation → source code relationships - Calculates usefulness scores (0.0 to 1.0) - Learns optimal keyword weights from real usage - Generates: usage_stats.json, usage_history.jsonl, keyword_weights.json Current Status: - Infrastructure: Complete and functional - Data collection: In progress (~14 turns) - Learning: Waiting for 50-turn trigger - Validation: Pending ## v1.2 Architecture (4000+ lines of documentation) Complete designs for upcoming features: - V1.2_INTELLIGENCE_ROADMAP.md: 4-phase roadmap - RALPH_LOOP_INSIGHTS.md: Design philosophy - Self-maintaining documentation system: * Foraging agent (discovers undocumented files) * Doc refiner agent (maintains existing docs) * Usage-driven intelligence (both query usage tracker) ## Files Added Scripts: - scripts/usage_tracker.py (540 lines) - scripts/usage-track-stop.py - scripts/add-usage-tracking-hook.py Documentation: - .claude/modules/usage-tracker.md (850 lines) - .claude/modules/foraging-agent.md (900 lines) - .claude/modules/doc-refiner-agent.md (700 lines) - .claude/modules/unified-agent-architecture.md (500 lines) - RALPH_LOOP_INSIGHTS.md (700 lines) - V1.2_INTELLIGENCE_ROADMAP.md - V1.2_PHASE1_PROGRESS.md - INTEGRATION_PROGRESS.md - SESSION_SUMMARY.md - RELEASE_NOTES_v1.1.2.md Configuration: - .claude/CLAUDE.md (project context) - .claude/keywords.json (dogfooding v1.2 work) - .claude/modules/*.md (agent designs) ## Files Modified - scripts/context-router-v2.py: Usage tracker integration - CHANGELOG.md: Added v1.1.2 entry - .gitignore: Exclude generated usage data ## Design Philosophy: Ralph Loop Iterate → Measure → Learn → Refine → Repeat Not "design perfect system then implement" but: - Build foundation → observe real usage → learn from data → iterate ## Next Steps Users: - Optional: Install stop hook to experiment - Use normally for 50+ turns - System learns automatically - Monitor .claude/usage_stats.json Development: - Continue v1.2 work (generates data organically) - Validate learning at turn 50 - Build Phase 2-4 features Timeline: v1.2.0 stable release expected in 8-10 weeks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e9f6020 commit 263d24d

20 files changed

Lines changed: 7039 additions & 331 deletions

.claude/CLAUDE.md

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
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

Comments
 (0)