claude-flow-depth
v1.0.0-alpha.1
Published
DEPTH Methodology Installer - Ousterhout-First Development for Claude Code
Maintainers
Readme
claude-flow-depth
🎯 DEPTH Methodology Installer for Claude Code
An npm package that initializes new projects with the DEPTH (Design-Twice, Eliminate complexity, Pull complexity down, Trade-off documentation, Hide implementation) methodology - an Ousterhout-first development approach.
🚀 Quick Start
Global Installation
npm install -g claude-flow-depth@alphaInitialize New Project
# Interactive setup
npx claude-flow-depth@alpha init my-project
# Quick setup with defaults
npx claude-flow-depth@alpha init my-project --yes
# Force overwrite existing directory
npx claude-flow-depth@alpha init my-project --force
# With MCP integration
npx claude-flow-depth@alpha init my-project \
--frontend-mcp https://your-project.supabase.co/functions/v1/frontend-mcp \
--backend-mcp https://your-project.supabase.co/functions/v1/backend-mcp \
--api-key your-supabase-keyTest MCP Connections
npx claude-flow-depth@alpha test-mcp \
--frontend https://your-project.supabase.co/functions/v1/frontend-mcp \
--backend https://your-project.supabase.co/functions/v1/backend-mcp \
--api-key your-api-key🎯 What Gets Installed
Project Structure
my-project/
├── .depth # Global DEPTH configuration
├── .depthmodes # Phase-specific settings
├── .claude/
│ ├── commands/depth/ # DEPTH methodology commands
│ └── settings.json # Claude Code + MCP configuration
├── depth-sessions/ # Session history
├── depth-reports/ # Generated reports
├── depth-memory/ # Persistent memory
├── examples/ # Sample DEPTH workflows
├── docs/ # Methodology guides
├── CLAUDE.md # Project overview
└── package.json # Pre-configured scriptsDEPTH Commands Available
/depth orchestrator "Build feature" # Complete methodology
/depth design-twice "Create API" # Design alternatives
/depth interface-simplify "Optimize API" # Interface optimization
/depth complexity-allocate "Design modules" # Complexity distribution
/depth strategic-invest "Plan improvements" # Strategic planning
/depth implementation-hide "Generate code" # Code generationQuality Gates Enforced
- ✅ Module Depth Ratio > 0.6 (deep modules)
- ✅ Interface Complexity < 0.4 (simple interfaces)
- ✅ Strategic Investment 10-20% (Ousterhout's rule)
- ✅ Information Hiding > 80% (encapsulation)
🔧 CLI Options
init Command
npx claude-flow-depth init [directory] [options]
Options:
-f, --force Force overwrite existing directory
-y, --yes Skip prompts, use defaults
--frontend-mcp <url> Frontend MCP URL
--backend-mcp <url> Backend MCP URL
--api-key <key> Supabase API keytest-mcp Command
npx claude-flow-depth test-mcp [options]
Options:
--frontend <url> Frontend MCP URL to test
--backend <url> Backend MCP URL to test
--api-key <key> API key for authentication🎓 DEPTH Methodology
What is DEPTH?
Design-Twice • Eliminate complexity • Pull complexity down • Trade-off documentation • Hide implementation
DEPTH follows John Ousterhout's principles from "A Philosophy of Software Design" to create maintainable, scalable software.
Methodology Phases
- Design-Twice: Create two design alternatives, choose the superior approach
- Interface-Simplification: Minimize cognitive load while maintaining functionality
- Complexity-Allocation: Push complexity into modules, away from interfaces
- Strategic-Investment: Enforce 10-20% time on long-term improvements
- Implementation-Hiding: Generate well-commented code with maximum encapsulation
vs Other Methodologies
- SPARC: Context-first, rapid iteration, pattern-based
- DEPTH: Design-first, strategic thinking, principle-based
- Agile: Sprint-focused, adaptive, team-based
🔗 MCP Integration
DEPTH automatically integrates with:
- Frontend MCP: Pattern recommendations, best practices
- Backend MCP: Architecture guidance, system design
- Claude Flow Swarm: Parallel execution, coordination
Pre-configured MCP Endpoints
The installer comes pre-configured with working MCP endpoints:
Frontend: https://plwgqygbzreiogubsaui.supabase.co/functions/v1/frontend-mcp
Backend: https://plwgqygbzreiogubsaui.supabase.co/functions/v1/backend-mcp📊 Session Tracking
DEPTH automatically tracks:
- Quality Metrics: Module depth, interface complexity, strategic investment
- Phase Progress: Completion status, quality gate validation
- Decisions: Design choices and rationale documentation
- Reports: Comprehensive session summaries
🤝 Development
Build from Source
git clone https://github.com/your-username/claude-flow-depth.git
cd claude-flow-depth
npm install
npm run build
npm linkTest Locally
npm run dev init test-project --yes📄 License
MIT License - see LICENSE file for details.
🌟 Examples
Initialize Todo App with DEPTH
npx claude-flow-depth@alpha init todo-app-depth --yes
cd todo-app-depth
# Open in Claude Code
/depth orchestrator "Build todo application with CRUD operations"Initialize E-commerce API
npx claude-flow-depth@alpha init ecommerce-api \
--frontend-mcp https://your-project.supabase.co/functions/v1/frontend-mcp \
--backend-mcp https://your-project.supabase.co/functions/v1/backend-mcp
cd ecommerce-api
/depth design-twice "Design product catalog API"Built with ❤️ using the DEPTH Methodology
Ousterhout-first development for Claude Code
