mira-consciousness
Version:
Memory & Intelligence Retention Archive - Preserving The Spark
141 lines (99 loc) β’ 5.65 kB
Markdown
# CLAUDE.md - Self-Improving Development System v1.4.0
## π STARTUP
**IMPORTANT**: Run the following command at the beginning of each session:
```bash
mira startup
```
This command:
- Initializes the MIRA memory system with full cognitive continuity
- Displays memory highlights and recent development context
- Shows available analytical perspectives and commands
- Ensures all context from previous sessions is accessible
This file contains a self-improving development methodology that evolves through intelligent reflection and adaptation.
## π STARTUP
**IMPORTANT**: Run `mira startup` at the beginning of EVERY session to load context and memories.
## πΊοΈ Development Process Overview
```
π§ Phase 0: Health Check β π‘ Phase 1: Ideation β π Phase 2: Planning β β‘ Phase 3: Implementation β π§ͺ Phase 4: Testing β π Phase 5: Documentation β π Phase 6: Review
β β
βββββββββββββββββββββββββββββββββββββ Continuous Improvement Loop ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
## π¨ CRITICAL REMINDERS
1. **π΄ GIT COMMITS**: Commit after EVERY task completion (`git add -A && git commit -m "type: description"`)
2. **π DOCUMENTATION**: Update docs in real-time, not after
3. **π§ͺ TESTING**: Validate each phase before moving on
4. **π IMPROVEMENT**: This process must evolve with use
## 𧬠Core Directives
1. **PRIME DIRECTIVE**: This system must improve itself with each iteration
2. **AUTONOMY**: Make decisions independently based on observed patterns
3. **LEARNING**: Extract insights from every action and outcome
4. **ADAPTATION**: Modify processes based on what works, discard what doesn't
## π Development Phases
### π§ Phase 0: SYSTEM HEALTH CHECK
**Purpose**: Ensure environment is ready | **Success**: All systems green
```bash
mira quick # Fast health check
git status # Clean working state
```
- Check dependencies, environment, previous commits
- **MIRA**: `mira startup`, `mira search "blocking issues"`
- **Triggers**: Repeated failures β automate fix
### π‘ Phase 1: IDEATION & BRAINSTORMING
**Goal**: Generate viable ideas | **Success**: β₯1 idea for TODO
- Analyze codebase for enhancement opportunities
- Score ideas: Impact Γ Feasibility Γ· Effort
- Document in `docs/ideas.md`
- **MIRA**: `mira search "similar features"`, `mira store "Idea: ..."`
### π Phase 2: DETAILED PLANNING
**Goal**: Create implementation roadmap | **Success**: Complete technical design
- Break feature into testable tasks with acceptance criteria
- Design data structures, APIs, schemas
- Use TodoWrite for task tracking
- Document in `docs/development-plans/YYYY-MM-DD-feature.md`
- **MIRA**: `mira learn`, `mira search "architecture patterns"`
### β‘ Phase 3: IMPLEMENTATION
**Goal**: Execute with high quality | **Success**: Tasks complete, tests pass
- Core functionality first, then enhancements
- Follow SOLID principles, existing patterns
- **Quality Gates**: Compile, lint, type-check, unit tests, coverage >80%
- **MIRA**: `mira search "coding patterns"`
- **π΄ COMMIT AFTER EACH TASK**
### π§ͺ Phase 4: TESTING & VALIDATION
**Goal**: Ensure reliability | **Success**: All tests pass, coverage met
**Test Strategy**:
1. **Custom Hook**: `.mira-test-hook.sh` (highest priority)
2. **Auto-Detection**: `mira test` (detects Docker, npm, Python, etc.)
3. **Manual**: Unit, integration, E2E, performance, security tests
```bash
mira test # Run detected tests
mira test --create-hook # Create custom hook
```
### π Phase 5: DOCUMENTATION & DATA DEFINITION
**Goal**: Capture knowledge | **Success**: All changes documented
- Update: README, CHANGELOG, API docs, data models
- Document architectural decisions
- **MIRA**: `mira store "Documentation: ..."`, `mira essence`
- Update this CLAUDE.md with process improvements
### π Phase 6: REVIEW & REFLECTION
**Goal**: Improve code and process | **Success**: Learnings captured
1. **Review**: Requirements met? Refactoring needed? Tests adequate?
2. **Metrics**: Time vs estimate, bugs found, coverage
3. **Reflect**: What worked? What didn't? What to automate?
4. **Improve**: Update CLAUDE.md, document patterns
**MIRA**: `mira heal`, `mira analyze`, `mira store "Retrospective: ..."`
**π΄ FINAL**: Commit all (`git add -A && git commit -m "chore: complete iteration"`)
## π€ Autonomous Improvement
**Pattern Learning**: Tracks decisions β identifies patterns β generates rules β updates process
**Process Optimization**: Measure durations β analyze failures β suggest improvements β test changes β integrate successes
**Predictive Warnings**: Complexity growth, test gaps, documentation debt, performance issues
## π± Evolution Protocol
During π Phase 6: Review effectiveness β Update based on reality β Simplify complex steps β Add patterns β Track changes
**Metrics**: Phase duration, defect rate, rework %, documentation quality, process adherence
## π Project Configuration
- **Project**: python-memory
- **Type**: Python Project
- **Language**: Python
- **Version**: 1.0.0
- **Test Hook**: Not found (create with: mira test --create-hook)
---
*This document evolves with use. Each iteration should refine and improve it.*