# {{PROJECT_NAME}}

A project built using the **DEPTH Methodology** - an Ousterhout-first development approach that prioritizes deep modules, simple interfaces, and strategic programming.

## 🎯 What is DEPTH?

**D**esign-Twice • **E**liminate complexity • **P**ull complexity down • **T**rade-off documentation • **H**ide implementation

DEPTH follows John Ousterhout's principles from "A Philosophy of Software Design" to create maintainable, scalable software through strategic thinking and careful complexity management.

## 🚀 Quick Start

### Run DEPTH Methodology
```bash
# Execute complete DEPTH methodology
/depth orchestrator "Build your feature"

# Run specific phase
/depth design-twice "Create API design"
/depth interface-simplify "Optimize endpoints"
/depth complexity-allocate "Design module boundaries"
/depth strategic-invest "Plan long-term improvements"
/depth implementation-hide "Generate clean code"
```

### Quality Gates Enforced
- ✅ **Module Depth Ratio** > 0.6 (simple interfaces, complex implementations)
- ✅ **Interface Complexity** < 0.4 (cognitive load minimized)
- ✅ **Strategic Investment** 10-20% (Ousterhout's rule)
- ✅ **Information Hiding** > 80% (implementation details hidden)

## 📋 Methodology Phases

### 1. Design-Twice (D)
Create two distinct design alternatives and choose the superior approach based on Ousterhout's criteria.

### 2. Interface-Simplification (E) 
Minimize interface complexity and cognitive load while maintaining full functionality.

### 3. Complexity-Allocation (P)
Push complexity downward into modules, away from interfaces and user-facing APIs.

### 4. Strategic-Investment (T)
Enforce 10-20% time investment in strategic improvements and long-term thinking.

### 5. Implementation-Hiding (H)
Generate well-commented code with maximum information hiding and encapsulation.

## 🔧 Configuration

### Files
- `.depth` - Global DEPTH methodology settings and quality gates
- `.depthmodes` - Phase-specific configurations and metrics
- `.claude/commands/depth/` - DEPTH command implementations

### MCP Integration
{{#if FRONTEND_MCP_URL}}
- **Frontend MCP**: {{FRONTEND_MCP_URL}}
{{/if}}
{{#if BACKEND_MCP_URL}}
- **Backend MCP**: {{BACKEND_MCP_URL}}
{{/if}}

DEPTH automatically queries MCP servers for expert knowledge during:
- Design-twice phase (pattern recommendations)
- Interface simplification (best practices)
- Complexity allocation (architecture guidance)

## 📊 Session Tracking

DEPTH automatically tracks:
- **Quality Metrics**: Module depth, interface complexity, strategic investment
- **Phase Progress**: Completion status and quality gate validation  
- **Decisions**: Design choices and rationale documentation
- **Reports**: Comprehensive session summaries in `depth-reports/`

## 📚 Examples

Check the `examples/` directory for:
- Sample DEPTH workflows
- Real project implementations
- Best practice demonstrations

## 🎓 Learning Resources

### Ousterhout's Principles
1. **Design Twice**: Always create multiple design alternatives
2. **Deep Modules**: Simple interfaces with rich functionality
3. **Information Hiding**: Hide implementation complexity
4. **Strategic Programming**: 10-20% time on long-term improvements
5. **Interface Simplicity**: Minimize cognitive load

### DEPTH vs Other Methodologies
- **SPARC**: Context-first, rapid iteration, pattern-based
- **DEPTH**: Design-first, strategic thinking, principle-based
- **Agile**: Sprint-focused, adaptive, team-based
- **Waterfall**: Phase-based, documentation-heavy, linear

Choose DEPTH when building complex systems that require deep design thinking and long-term maintainability.

## 🤝 Contributing

1. Follow DEPTH methodology for all changes
2. Run quality gates before submitting
3. Document strategic decisions and trade-offs
4. Maintain test coverage and code comments

## 📄 License

MIT License - see LICENSE file for details.

---

Built with ❤️ using the DEPTH Methodology  
*Ousterhout-first development for Claude Code*