Route Families
Knowledge model
A route family ties a user-facing capability to the routes, source paths,
specs, and flows that own it. Build the manifest with
train or bootstrap, then refine it until impact
analysis stays trustworthy.
What it captures
One family groups the code and tests behind a product capability
- URL routes
- frontend paths
- backend paths
- spec directories
- user flows
- priority
Manifest shape
The manifest lives under
The manifest lives under <testsRoot>/.e2e-ai-agents and uses a top-level families array
{
"families": [
{
"id": "feature_a",
"routes": ["/{workspace}/feature-a/{item}"],
"webappPaths": ["src/features/feature-a/**"],
"serverPaths": ["server/feature-a/**"],
"specDirs": ["feature-a"]
}
]
}
For Playwright repos, specDirs are relative to
--tests-root. For Cypress repos, use
cypressSpecDirs instead.
Create It
Train
Scan your codebase and let the scanner propose families
npx impact-gate train --no-enrich --path .
npx impact-gate train --path .
npx impact-gate train --validate --since HEAD~50 --path .
Use --no-enrich for the deterministic offline path,
train for enrichment, and --validate to measure
coverage against real git history. The default
--budget-usd is $0.50 and the hard cap is
$10.
Bootstrap
Import route families from an Understand-Anything knowledge graph
npx impact-gate bootstrap --path .
npx impact-gate bootstrap --kg-path ./knowledge-graph.json
npx impact-gate bootstrap --dry-run --max-families 30 --path .
Use --kg-path when the graph lives elsewhere,
--dry-run to preview the manifest, and
--max-families to keep the first pass focused.
Refine It
Review loop
Check the manifest against the real product areas
- Open
<testsRoot>/.e2e-ai-agents/route-families.json - Add or tighten
webappPaths,serverPaths, andspecDirsfor unmapped files - Re-run
train --validateuntil the coverage and confidence look healthy - Commit the manifest so
impact,plan, and the optional AI flows stay grounded
Helpful fields
Use the optional fields to make routing more precise
prioritydistinguishes critical flows from lower-risk onesuserFlowsturns raw file mappings into readable scenarioscomponentsandpageObjectsmake generation and review easierfeatureslet one family break into finer-grained bindings
Why It Matters
Better decisions
A strong manifest improves the whole diff-to-test workflow
- impact analysis accuracy
- release-diff planning
- run-set precision
- gap detection quality
AI grounding
The same manifest keeps generation and QA scoped to the right areas
- AI generation grounding
- QA-agent scoping
- readable user flows
- more useful coverage guidance
When To Update
Update signals
Refine route families whenever the manifest stops matching reality
- changed files show up as unmapped
- confidence is repeatedly low
- generated plans miss obvious flows
- release diffs feel too broad
- new product areas or test directories appear
Takeaway
A strong manifest is one of the biggest predictors of whether `impact-gate` feels useful on real diffs.
Fallback truth