ALD and Test-Driven Development
In Architect-Led Development (ALD), tests do more than verify correctness. They define architectural intent, encode business decisions, and act as the primary control surface for safe change and AI-assisted delivery.
In short: classic TDD drives code. ALD-driven TDD drives decisions and boundaries.
In ALD, tests are architectural contracts—written before implementation, owned by architects, and used to constrain behavior so implementations can evolve safely.
The core shift: from code correctness to intent enforcement
Classic TDD loop
- Red → Green → Refactor
- Tests verify implementation behavior
- Primarily developer-focused
- Often algorithm- or method-centric
ALD-driven TDD loop
- Intent → Contract tests → Implement → Refine
- Tests define what decisions must be true
- Architect- and business-aligned
- Role- and policy-centric
Tests as architectural contracts
ALD treats certain tests as non-negotiable guarantees that define the behavior of a role.
What contract tests describe
- Decision outcomes and invariants
- Edge cases and failure modes
- Required metadata (reason codes, audit data)
- What must never change silently
What contract tests replace
- Ambiguous acceptance criteria
- Tribal knowledge
- Interpretive story handoffs
- Late-stage clarification and rework
Example: contract-style test names
rejects_application_when_ltv_exceeds_policy_limit()
accepts_application_when_income_coverage_meets_threshold()
returns_reason_codes_for_compliance_reporting()
Tests define role boundaries
ALD uses tests to validate where responsibilities belong, not just how code behaves.
Role-scoped test suites
- Each role has its own contract test suite
- Tests stay small, cohesive, and intention-revealing
- Uncomfortable tests signal misplaced responsibility
Architectural enforcement
- Single Responsibility Principle enforced naturally
- Interface Segregation emerges from test clarity
- “Service blobs” are exposed early
Executable ubiquitous language
ALD tests are written in business language, making domain intent executable and durable.
Language-first testing
- Test names read like business rules
- DTOs and domain types appear in assertions
- Error and reason codes are explicit
Why it matters
- Tests double as documentation
- Language drift becomes visible
- Auditors and product owners can review behavior
Intentional test layers in ALD
ALD is opinionated about which tests matter most and why.
Define role behavior and policy. Written first. Stable over time. Architect-owned.
Support internal logic. Often AI-generated. Disposable during refactors.
Validate adapters and external systems. Kept thin and purposeful.
TDD as a safety harness for AI
ALD uses TDD to make AI-assisted development predictable, verifiable, and replaceable.
Without ALD
- AI interprets intent implicitly
- Behavior varies across implementations
- Regressions are subtle and risky
With ALD-driven TDD
- AI implements to explicit contracts
- Tests prove behavior objectively
- Implementations are swappable
Summary: how ALD uses TDD
| Classic TDD | ALD-driven TDD |
|---|---|
| Tests verify code | Tests define decisions |
| Method-centric | Role-centric |
| Developer-owned | Architect-owned contracts |
| Focus on correctness | Focus on intent and governance |
| Refactors are risky | Refactors are safe under contracts |