Files
doc-weaver/docs/wiki/01_overview.md
Vishesh 'ironeagle' Bangotra f7a997b4ce Add doc-weaver: TypeScript documentation compiler
TypeDoc + JSDoc (RDFC) compiler mirroring doc-forge. Emits a
doc-forge-shaped MCP JSON bundle and a TypeDoc human site, with an MCP
server (official SDK, stdio), a build/serve CLI, and React-aware kind
classification. Includes the RDFC wiki (docs/wiki) and MkDocs config.
2026-10-18 12:17:18 +05:30

61 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Library Overview
`doc-weaver` turns RDFC-compliant TypeScript JSDoc into maintainable reference
documentation. It never edits source comments; it reads them, renders them, and
assembles documentation from all available material — exactly as `doc-forge`
does for Python docstrings.
Analysis is static: source is parsed by the TypeScript compiler API via TypeDoc
and is never executed.
---
## 🧭 Which Build Should You Use?
| Flag | Source | Output |
|-----------------------|-----------------------|---------------------------------------------------|
| `--docs` (`--mkdocs`, `--lib`) | JSDoc comments | `site/lib/**` TypeDoc HTML (the MkDocs parallel) |
| `--mcp` | JSDoc comments + model | `docs/mcp/**` doc-forge-shaped JSON |
| `--api` | OpenAPI spec | reserved |
| `--wiki` | Hand-written markdown | `docs/wiki/**` (unchanged) |
---
## 🏗️ Architecture
```
TypeScript + JSDoc
|
TypeDoc (loader) -> serialized reflection JSON
|
TypeDocJsonToMCP (renderer) -> MCP bundle (docs/mcp/)
generateHumanDocs (renderer) -> TypeDoc HTML site (site/lib/)
```
The MCP renderer and the human renderer never depend on each other: both read
the same serialized reflections, so the machine bundle and the human site can
never disagree about a symbol.
---
## 🔄 MCP bundle shape
`docs/mcp/**` is a self-contained, machine-readable reference whose shape is
byte-compatible with `doc-forge`:
```
docs/mcp/
index.json { project, type: "docforge-model", modules_count, source }
nav.json [ { module, resource: "docs://modules/<module>" } ]
modules/<module>.json { module, content: { path, docstring, objects } }
```
`doc-weaver serve --mcp --module doc-weaver` serves it over stdio. See the
[RDFC Guide](02_rdfc.md) for how to write the JSDoc that fills it.
---
## ➡️ Read Next
- [02 – RDFC Guide](02_rdfc.md)