Architecture
docforge is split into four horizontal layers. Everything flows top to
bottom through the CLI.
Loaders → Models
The docforge/loaders package wraps griffe to extract modules, functions,
classes, and Google-style docstring sections. Loaded data is normalized into
the object model under docforge/models (Module, Object, Project,
Field).
Navigation
docforge/nav parses docforge.nav.yml specs (NavSpec, Resolver, and the
MkDocs nav emitter) and, since the wiki kind, derives wiki navigation from the
file structure via build_wiki_nav.
Renderers
docforge/renderers turn model data into artifacts:
MkDocsRenderer→docs/lib/**reference markdownMCPRenderer→docs/mcp/**structured documentation
CLI
docforge/cli wires it all together:
commands.py— thebuildcommand and its--mkdocs/--api/--wiki/--mcpmodesmkdocs_utils.py— config generation (mkdocs.yml) including merged wiki + lib + api navigationapi_utils.py— OpenAPI loading and API docs generation