Architecture
The Architecture module is an AI-powered codebase auditor that evaluates the structural quality of your test project. It identifies anti-patterns, measures coverage gaps, and maintains a persistent knowledge store called the Vault.
What Architecture Analyzes
| Area | What It Checks |
|---|---|
| Page Object Coverage | Which pages/components have dedicated PO classes vs. inline selectors |
| Selector Quality | Detection of fragile selectors: nth-child, dynamic IDs, long CSS chains |
| Code Duplication | Repeated patterns across test files that should be extracted into helpers |
| Structural Metrics | File count, average test length, fixture usage ratio, import graph complexity |
AI-Powered Fixes
When the audit surfaces an issue, it appears as an Issue Card:
- Severity badge — Critical, Warning, or Info
- Affected files — list of files where the issue occurs
- Description — what the problem is and why it matters
Click Generate Fix to have the AI produce a code diff. Review the changes side-by-side, then click Apply to modify the file directly or Copy to paste into your editor.
Batch Fixes
Select multiple Issue Cards and click Generate All to produce fixes for several issues at once. Each fix is independent and can be applied or rejected individually.
The Vault
The Vault is Architecture's persistent knowledge store. It records:
- Audit findings — every issue found across all scans
- Architecture decisions — structural patterns the AI has learned about your project
- Resolution history — which fixes were applied and when
How the Vault Feeds Other Modules
Architecture Vault
├── Brain: provides project context for AI conversations
├── Device Lab: supplies selector strategies for code generation
└── Intelligence: informs dependency graph for Smart RunAuto-Updates
The Vault updates automatically after each Architecture scan. You can also trigger a manual refresh from Architecture > Vault > Resync.
When to Run an Audit
- New project onboarding — baseline structural assessment
- Before a refactoring — understand current state and risk areas
- Monthly cadence — catch gradual quality erosion
- After a major merge — verify that new code follows established patterns
Sub-Pages
| Page | Content |
|---|---|
| Dependency Audit | Page Object coverage, selector quality, code duplication, metrics |
| Component Analysis | Import graph, fixture usage, AI fix generation |
