Facet is a coverage framework that tracks whether your tests actually cover what stakeholders need—not just what code executes.
One feature. Many facets.
| Perspective | Description |
|---|---|
| Business requirements | Product owner specifications |
| Compliance mandates | Regulatory requirements (PCI-DSS, GDPR, etc.) |
| UX standards | Design system and accessibility rules |
| Technical specs | Architecture and API contracts |
All connected to the same tests. All tracked for coverage.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Stakeholders │ │ Developers │ │ Facet Coverage │
│ write facets │────▶│ link tests to │────▶│ tracks what's │
│ (Markdown) │ │ facets │ │ covered │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Stakeholders write requirements in natural language Markdown files
- Facet generates structure files and TypeScript types
- Developers link tests to facets using
facet()calls - Facet analyzes which requirements are covered by tests
- Reports show coverage gaps across all perspectives
| Principle | Description |
|---|---|
| Multi-Perspective | Every feature has multiple facets from different stakeholders |
| Natural Language | Write requirements like humans, not machines |
| Evolutionary | Documentation grows with understanding |
| Traceable | Exact test-to-facet mapping |
| Feature-Modular | Self-contained, team-owned features |
| Lightweight | Markdown + JSON, nothing heavy |
| Flexible | Adopt incrementally, customize freely |
- Write in natural language
- Focus on business value
- See what's tested immediately
- Documentation evolves with product
- Direct regulation mapping
- Audit-ready traceability
- 100% coverage enforcement
- Automated compliance reports
- Document user flows naturally
- Link designs to tests
- Track accessibility coverage
- Mobile/desktop requirements clear
- One test covers multiple facets
- Clear requirements from all stakeholders
- Know exactly what's covered
- Easy maintenance
- Complete visibility
- Automated gap detection
- Multi-perspective coverage
- Progress tracking
Traditional coverage asks: "What percentage of code did tests execute?"
Facet coverage asks: "What percentage of business requirements do tests verify?"
When every stakeholder's requirements are documented, linked to tests, and tracked for coverage—that's when you know your product actually does what it's supposed to do, for everyone it's supposed to serve.