# 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 markdown - `MCPRenderer` → `docs/mcp/**` structured documentation ## CLI `docforge/cli` wires it all together: - `commands.py` — the `build` command and its `--mkdocs` / `--api` / `--wiki` / `--mcp` modes - `mkdocs_utils.py` — config generation (`mkdocs.yml`) including merged wiki + lib + api navigation - `api_utils.py` — OpenAPI loading and API docs generation