Choosing Your Methodology
LumenFlow is opinionated by default but flexible by design. The methodology configuration lets you choose how strict your testing and architecture practices should be.
Why Methodology Configuration?
Section titled “Why Methodology Configuration?”Different teams have different needs:
- Greenfield projects benefit from strict TDD and hexagonal architecture
- Legacy migrations may need a gentler test-after approach during transition
- Prototype/spike work may temporarily disable enforcement
Rather than fight the framework, configure it to match your current situation.
Testing Methodologies
Section titled “Testing Methodologies”TDD (Default)
Section titled “TDD (Default)”Test-Driven Development: write tests before implementation.
Characteristics:
- Tests written BEFORE implementation code
- RED-GREEN-REFACTOR cycle enforced in agent prompts
- 90% coverage threshold (blocks on failure)
- Gates fail if coverage drops below threshold
Best for:
- New features with clear requirements
- Teams committed to test-first development
- Production-critical code paths
Test-After
Section titled “Test-After”Write implementation first, tests before completion.
Characteristics:
- Implementation can proceed without tests
- Tests required before
wu:prep - 70% coverage threshold (warns but does not block)
- More flexible for exploratory work
Best for:
- Legacy code migration
- Teams transitioning to TDD
- Rapid prototyping with deferred test coverage
Minimal testing enforcement.
Characteristics:
- No testing methodology in agent prompts
- 0% coverage threshold (no enforcement)
- Tests optional but still recommended
Best for:
- Spike/research work
- Documentation-only projects
- Non-production experiments
Architecture Methodologies
Section titled “Architecture Methodologies”Hexagonal (Default)
Section titled “Hexagonal (Default)”Ports and Adapters architecture with strict dependency rules.
Characteristics:
- Agent prompts include hexagonal architecture guidance
- Ports-first development encouraged
- Application layer never imports infrastructure
Best for:
- Complex domain logic
- Projects requiring extensive testing
- Teams familiar with DDD patterns
Layered
Section titled “Layered”Traditional layered architecture.
Characteristics:
- Simpler three-tier structure guidance
- Less strict about dependency direction
- Easier to understand for newcomers
Best for:
- Simpler CRUD applications
- Teams new to architecture patterns
- Rapid development without complex domain logic
No architecture guidance.
Characteristics:
- No architecture-specific prompting
- Full flexibility in code organization
Best for:
- Small scripts and utilities
- Projects with existing architecture
- Teams with strong internal conventions
Overriding Template Defaults
Section titled “Overriding Template Defaults”Each methodology sets sensible defaults, but you can fine-tune them:
Override Fields
Section titled “Override Fields”| Field | Description |
|---|---|
coverage_threshold | Minimum coverage percentage (0-100) |
coverage_mode | block (fail gates), warn, or off |
Methodology vs Gates
Section titled “Methodology vs Gates”The methodology section is a high-level abstraction. For fine-grained control, use the gates section directly:
Precedence (highest to lowest):
- CLI flags (e.g.,
--coverage-mode=warn) - Explicit
gates.*configuration methodology.overrides- Methodology template defaults
Migration Examples
Section titled “Migration Examples”From Strict TDD to Test-After
Section titled “From Strict TDD to Test-After”Gradually relaxing enforcement for a legacy migration:
Enterprise Strictness
Section titled “Enterprise Strictness”Maximum enforcement for regulated environments:
Minimal Setup for Prototypes
Section titled “Minimal Setup for Prototypes”Quick exploration without ceremony:
Summary
Section titled “Summary”| Methodology | Coverage | Mode | Tests Required | Use Case |
|---|---|---|---|---|
tdd | 90% | block | Yes | Production code |
test-after | 70% | warn | Yes | Legacy migration |
none | 0% | off | No | Spikes and prototypes |
Next Steps
Section titled “Next Steps”- Migrating Methodology - Step-by-step migration paths
- Configuration Reference - All configuration options
- Gates Reference - Gate commands and flags
- Team Workflow - Multi-developer patterns