types.ts All TypeScript interfaces and DocType enum
validation.ts Extract schemas (derived from Tag class schemas) + ValidationTracker singleton
registry.ts TagProcessor interface + ProcessorRegistry
core/ Domain Model (SOLID)
AggregateProcessor.ts AggregateProcessor interface (collect/prepare/render/write/sidebarEntry)
AstWalker.ts Tree walker with NodeVisitor interface (matches/visit β VisitResult)
CompileContext.ts Context container for per-pass state
DiagnosticsCollector.ts Per-walk diagnostic accumulator (used by AstWalker)
DocRef.ts Document cross-reference utilities
Document.ts Registry of doc types and directory mapping
Entity.ts API prefixes, metadata, and labels
FoldableTag.ts Base for collapsible tag UI rendering
IndexRegistry.ts General-purpose index container for cross-document lookups
Markup.ts Centralized escaping for MDX and JSON
ObjectPath.ts Safe recursive property manipulation (bundlePath push)
Tag.ts Base Tag class β constructor takes (node: Node), scope helpers
TagIndex.ts Tag data index (parents, children, properties) for tag-type docs
mdx.ts MDX generation utilities
patterns.ts Shared regex patterns
scope.ts isScoped(), isPublicScoped(), isAgentScoped(), propagateScope()
rendering/ Rendering logic extracted from passes/public
api.ts renderApiSection(), renderApiEntry()
blocks.ts Block-level rendering (requirements, criteria, etc.)
components.ts Component and blueprint rendering
document.ts frontmatter(), renderDocument() β document-level MDX
flow.ts D2 flow rendering + renderD2ToFile()
interactions.ts Clickable / interaction rendering
policies.ts renderPoliciesSection()
surface.ts Surface / wireframe rendering
utils.ts TYPE_LABELS, typeToDir, idToHref, qnameToHref
tags/ Tag-specific domain models (one class per tag)
Api.ts Action, Event, Operation, ErrorTag models
Blueprint.ts Blueprint model (concepts, components, rules)
Carousel.ts Carousel container model
Changeset.ts Changeset model (touched files)
Citation.ts Citation / bibliography reference model
DataModel.ts DBML data model
Diagram.ts Mermaid diagram model
Domain.ts Domain model (models, glossary, policies)
Example.ts Example model (summary, tags, code)
Explanation.ts Explanation model (hint/details)
Feature.ts Feature model (roles, domains, requirements)
Flow.ts Flow model (steps, branches, paths)
Glossary.ts Glossary term model
Manifest.ts Manifest model (values, principles, goals)
Milestone.ts Milestone model (includes)
Policy.ts Policy model (source, condition, reaction)
Requirement.ts Requirement model (priority, status)
Rule.ts Rule model (force, ref, realm)
Setting.ts Setting model (type, default)
Step.ts Step model (lookahead, branches)
Surface.ts Surface / wireframe model
TagDoc.ts Tag documentation model (parents, children, properties)
Tldr.ts TLDR summary model
Tour.ts Tour model (stops, spotlights, overlays)
names.ts TagNames enum β canonical tag name constants
processors/ Adapters between Markdoc AST and Core Models
role.ts domain.ts feature.ts flow.ts
story.ts milestone.ts manifest.ts blueprint.ts
surface.ts changeset.ts tour.ts tag.ts
article.ts requirement.ts criterion.ts policy.ts
api-action.ts api-event.ts api-error.ts api-operation.ts
glossary.ts model.ts diagram.ts example.ts
explanation.ts setting.ts touched.ts context.ts
logic.ts linking.ts rule.ts
aggregates/ AggregateProcessor implementations (22 files)
index.ts Registry β imports and exports all aggregate processors
actions.aggregate.ts All domain actions across documents
api-reference.aggregate.ts Unified API reference page
article-tags.aggregate.ts Article tag cloud
atoms.aggregate.ts Reusable content atoms
bibliography.aggregate.ts Collected citations / bibliography
changelog.aggregate.ts All changesets sorted by date
components.aggregate.ts Architectural component dependency graph
diagrams.aggregate.ts All Mermaid diagrams
errors.aggregate.ts Consolidated domain error registry
events.aggregate.ts All domain events
examples.aggregate.ts Global examples gallery
glossary.aggregate.ts All terms from all domain glossaries
operations.aggregate.ts All request/response operations
policies.aggregate.ts All business rules and policies
quotes.aggregate.ts Collected article quotes
roadmap.aggregate.ts Milestone-based roadmap view
settings.aggregate.ts All application settings
showroom.aggregate.ts Surface / wireframe gallery
surfaces.aggregate.ts All surfaces with wireframes
tags.aggregate.ts Tag documentation index
tours.aggregate.ts All guided tours
traceability.aggregate.ts Requirement β feature traceability
index.ts Agent pass β AstWalker + NodeVisitor, writes .toon bundles
index.ts Public pass entry β orchestrates 6-phase pipeline
base.ts Re-export shim β core/rendering/document.ts
utils.ts Re-export shim β core/rendering/utils.ts
api.ts Re-export shim β core/rendering/api.ts
flow.ts D2 flow rendering helpers
components.ts Component rendering helpers
interactions.ts Interaction link rendering
policies.ts Re-export shim β core/rendering/policies.ts
surface.ts Surface page rendering
link-map.ts docLinkMap β qualified id β URL mapping
public-pass-options.ts Options type (changedFile, skipInstructions)
wireframe/ Wireframe CSS/component rendering
index.ts Wireframe pass entry
base.ts Base wireframe utilities
registry.ts Wireframe component registry
components/ Individual wireframe component renderers
phases/ The 6-phase public pass pipeline
types.ts Shared phase types (ParsedDoc, ExtractedDoc, etc.)
parse.ts Phase 1 β parse all .mdoc files, resolve frontmatter
extract.ts Phase 2 β run processor extract() on each document
build-index.ts Phase 3 β build cross-document indexes (featuresβdomains, etc.)
render.ts Phase 4 β run processor render(), write MDX pages
aggregate.ts Phase 5 β run AggregateProcessors, write aggregate pages
sidebar.ts Phase 6 β generate Starlight sidebar configuration
indexes.ts Shared index building (bundleCache, tagDataIndex, policyIndex, etc.)
instructions.ts Instructions pass β resolves includes, renders MDX with set:html bridge
api.ts API-specific utilities
bibtex.ts BibTeX parsing for citations
dbml.ts DBML parsing for data models
markdoc.ts collectText(), findTags(), extractTagText(), isScoped() re-exports