Wiki synthesis
How Stractal analyzes your codebase and generates the Functional-Domain Wiki
Wiki synthesis transforms source code into a structured Functional-Domain Wiki by analyzing your repository's dependency graph, file structure, and code semantics.
Synthesis modes
Domain-partitioned pipeline — the primary mode for production repositories. A 6-stage pipeline that partitions the codebase using community detection, discovers and reconciles domains across partitions, then generates the full hierarchy with 4-5 levels of decomposition.
Hierarchical mode — a single-pass mode for smaller repositories (under ~50 files). Faster but produces a shallower hierarchy.
Stractal selects the appropriate mode automatically based on repository size.
Configuring synthesis
Before starting synthesis, you can adjust settings from Project settings > Inclusion:
- Branch — choose which branch to analyze. Defaults to the repository's default branch.
- Inclusion patterns — use glob patterns to control which files are analyzed. Useful for excluding test fixtures, generated files, or vendor directories.
- Per-repository overrides — for multi-repo projects, set branch and inclusion patterns independently for each repository.
Re-synthesizing
Click Synthesize again after significant code changes. Previous versions are preserved in version history.
Quality gates
| Gate | What it checks |
|---|---|
| Merge rate | Fewer than 15% of domains merged during reconciliation |
| Flow atomicity | Each leaf business domain is a single atomic operation |
| Domain count | Proportional to codebase size |
| Average depth | Hierarchy achieves 4-5 levels |
Exploring the Wiki
The Wiki viewer offers two browse modes:
- Tree view — full nested hierarchy. Expand business domains to see sub-domains and technical domains.
- Category view — domains grouped by strategic category (Core, Infrastructure, Support, External).
Use the search bar to find domains by name or keyword across the entire hierarchy.
Domain details
Select any domain to see:
| Artifact | Description |
|---|---|
| Description | What the domain does and its responsibilities |
| Business logic | Business rules and invariants (business domains) |
| Implementation notes | How the domain is built (technical domains) |
| Owned tables | Database tables this domain is the primary writer for |
| API endpoints | REST endpoints with method, path, and auth info |
| Page routes | Next.js routes with URL patterns |
| Key types | TypeScript interfaces, types, enums, and Zod schemas |
| State management | React contexts, hooks, and stores |
| Architecture diagrams | Dependency graphs showing relationships between domains |
| Dependencies | Other domains this domain depends on or is depended upon by |
Text size
Adjust text size in the Wiki viewer using the size controls. Your preference (Standard, Large, or XL) is saved across sessions.
Exporting the Wiki
You can export the full Wiki from the viewer:
- Download as markdown — a
.mdfile containing the complete domain hierarchy with all artifacts - Copy to clipboard — paste the Wiki content into other tools or documents
DDD insights
Wikis synthesized with the domain-partitioned pipeline include Domain-Driven Design artifacts:
- Ubiquitous Language — a glossary of terms extracted from your codebase with definitions, source evidence, and DDD classification (entity, value object, aggregate root, domain service, domain event, specification, repository, factory, or module)
- Bounded Contexts — explicit model boundaries grouping related domains, with descriptions of model dialect, core abstractions, and relevant vocabulary
- Context Map — relationships between contexts showing integration patterns: Shared Kernel, Customer/Supplier, Anticorruption Layer, Conformist, Separate Ways, Open Host Service, Published Language, or Partnership
Access these from the dedicated tabs in the Wiki viewer.
Version history
Each synthesis creates a versioned snapshot. From the version history panel you can:
- Browse previous versions — see when each Wiki was synthesized and summary metadata
- Compare versions — view a diff showing added, removed, and modified domains between any two snapshots
- Restore context — understand how your architecture has evolved over time