claude-cognitive
CLAUDE.md449 starsChanged 11 months agoMITView on GitHub
Project: claude-cognitive v1.2 Intelligence Enhancement Purpose: Dogfooding - use claude-cognitive to build claude-cognitive Status: v1.1 Production (global ~/.claude/), v1.2 Development (this project) Phase: v1.2 Planning + Initial Prototyping Focus: Ralph Loop integration + Phase 1 (Usage Tracking) Recent Activity: - ✅ Created V1.2_INTELLIGENCE_ROADMAP.md (comprehensive plan) - ✅ Created RALPH_LOOP_INSIGHTS.md (philosophical foundation) - ✅ Integrated Ralph Loop pattern into roadmap - 🔄 Setting up project-local .claude-dev/ for dogfooding (development only) - ⏭️ Next: Prototype usage-tracker.py v1.2 Development: - usage, tracking, learning,…
In this repositoryOne other file it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 153
Every v1.2 feature tested on claude-cognitive itself first
- Distinctive: line 155
Use pool coordination for multi-session work
- Distinctive: line 165
No breaking changes to core router
- Distinctive: line 169
Every feature needs metrics
- Distinctive: line 171
Document results in roadmap
- Very specific: line 199
Create .claude-dev/modules/*.md files for v1.2 components
- Distinctive: line 201
Test on this project (dogfood)
- Very specific: line 215
Working on v1.2?: Check current phase in V1.2_INTELLIGENCE_ROADMAP.md
- Distinctive: line 217
Testing?: Always dogfood on this project first
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
claude-cognitive Development (Project-Local Context)
Project: claude-cognitive v1.2 Intelligence Enhancement Purpose: Dogfooding - use claude-cognitive to build claude-cognitive Status: v1.1 Production (global ~/.claude/), v1.2 Development (this project)
Current Work
Phase: v1.2 Planning + Initial Prototyping Focus: Ralph Loop integration + Phase 1 (Usage Tracking)
Recent Activity:
- ✅ Created V1.2_INTELLIGENCE_ROADMAP.md (comprehensive plan)
- ✅ Created RALPH_LOOP_INSIGHTS.md (philosophical foundation)
- ✅ Integrated Ralph Loop pattern into roadmap
- 🔄 Setting up project-local .claude-dev/ for dogfooding (development only)
- ⏭️ Next: Prototype usage-tracker.py
Project Structure
claude-cognitive-package/
├── scripts/ # v1.1 production scripts (copy to ~/.claude/scripts/)
│ ├── context-router-v2.py # [v1.1] Core router (INSTALLED GLOBALLY)
│ ├── history.py # [v1.1] History viewer (INSTALLED GLOBALLY)
│ ├── pool-*.py # [v1.1] Pool coordination (INSTALLED GLOBALLY)
│ │
│ ├── usage-tracker.py # [v1.2] PROTOTYPE - Usage learning
│ ├── semantic-matcher.py # [v1.2] PROTOTYPE - Fuzzy matching
│ ├── predictor.py # [v1.2] PROTOTYPE - Sequence learning
│ └── forage.py # [v1.2] PROTOTYPE - Ralph Loop foraging
│
├── .claude-dev/ # DEV-ONLY context (dogfooding, NOT for users)
│ ├── CLAUDE.md # This file
│ ├── modules/ # claude-cognitive components
│ │ ├── context-router.md # Router internals
│ │ ├── pool-coordinator.md # Pool system
│ │ ├── usage-tracker.md # v1.2 usage learning
│ │ └── foraging-agent.md # v1.2 Ralph Loop agent
│ └── integrations/
│ └── claude-code-hooks.md # Hook integration points
│
├── V1.2_INTELLIGENCE_ROADMAP.md # Master plan
├── RALPH_LOOP_INSIGHTS.md # Philosophy
├── README.md # Public-facing docs
└── templates/ # User templatesKeywords (Project-Specific)
v1.2 Development:
- usage, tracking, learning, feedback, ralph, loop, iteration
- foraging, discovery, autonomous, agent, convergence
- semantic, embedding, similarity, matching
- prediction, sequence, pre-loading, anticipatory
- budget, adaptive, threshold, dynamic
- circuit-breaker, safeguard, protection
Core Components (v1.1):
- router, context, attention, activation, decay
- keyword, injection, hot, warm, cold
- history, pool, coordinator, instance
Files/Modules:
- context-router-v2, usage-tracker, foraging-agent
- semantic-matcher, predictor, history
When Working On...
Usage Tracking (Phase 1)
Auto-activates:
.claude-dev/modules/usage-tracker.md.claude-dev/modules/context-router.md(integration points)
Foraging Agent (Phase 4)
Auto-activates:
.claude-dev/modules/foraging-agent.mdRALPH_LOOP_INSIGHTS.md.claude-dev/modules/usage-tracker.md(feedback loop)
Semantic Matching (Phase 2)
Auto-activates:
.claude-dev/modules/semantic-matcher.md.claude-dev/modules/context-router.md
Pool System
Auto-activates:
.claude-dev/modules/pool-coordinator.md.claude-dev/integrations/claude-code-hooks.md
Development Workflow
Prototyping (Current Phase)
1. Create Prototype:
# Phase 1: Usage tracking
touch scripts/usage-tracker.py
# Write prototype with _prototype suffix during development2. Test on This Project:
# Dogfood immediately
cd /home/garret-sutherland/claude-cognitive-package/
python scripts/usage-tracker.py --test
# Check if it tracks attention state correctly
cat .claude-dev/attn_state.json3. Measure Impact:
# Before: Baseline context quality
# After: Context quality with usage tracking
# Document results in V1.2_INTELLIGENCE_ROADMAP.md4. Integrate:
# Once validated, integrate into context-router-v2.py
# Or keep standalone if appropriateTesting Strategy
Test Environments:
- This project (claude-cognitive itself) - Primary dogfooding
- Small example project - Validate zero-config experience
- Large project (if available) - Validate scalability
Metrics to Track:
- Token savings (% reduction)
- First-turn context quality (% of needed files available)
- Wasted context (% of injected files unused)
- Time to productivity (seconds until first useful action)
Critical Principles
1. Dogfooding is Mandatory
- Every v1.2 feature tested on claude-cognitive itself first
- Attention state visible while developing
- Use pool coordination for multi-session work
2. Ralph Loop Philosophy
- Iteration > perfection
- Objective feedback required
- Convergence detection prevents waste
- Circuit breakers prevent disasters
3. Backwards Compatibility
- v1.1 users upgrade seamlessly
- No breaking changes to core router
- New features opt-in or auto-enabled safely
4. Quantitative Validation
- Every feature needs metrics
- Measure on 3+ projects before merging
- Document results in roadmap
Quick Reference
Main Docs:
V1.2_INTELLIGENCE_ROADMAP.md- Master planRALPH_LOOP_INSIGHTS.md- PhilosophyREADME.md- Public docsCHANGELOG.md- Version history
Context Docs (Development):
.claude-dev/modules/context-router.md- Router internals.claude-dev/modules/usage-tracker.md- Usage learning (v1.2).claude-dev/modules/foraging-agent.md- Ralph Loop agent (v1.2).claude-dev/modules/pool-coordinator.md- Pool system
Global Installation:
~/.claude/scripts/- v1.1 production scripts (LIVE)~/.claude/attention_history.jsonl- Active history log~/.claude/attn_state.json- Current attention scores
Next Steps
Immediate (Today):
- Create
.claude-dev/modules/*.mdfiles for v1.2 components - Start prototyping
usage-tracker.py - Test on this project (dogfood)
Short-term (This Week):
- Complete Phase 1 prototypes (usage tracking + explanations)
- Measure impact quantitatively
- Document results in roadmap
Medium-term (Next 2 Weeks):
- Phase 2: Semantic matching + dynamic budgeting
- Integration testing on multiple projects
- Community feedback (GitHub discussions)
Working on v1.2? Check current phase in V1.2_INTELLIGENCE_ROADMAP.md
Need context? Mention keywords above to activate relevant modules
Testing? Always dogfood on this project first
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

