RDFC Guide
RDFC — the React Doc-forge Convention — is the TypeScript counterpart to doc-forge's GSDFC. This page is the practical companion to the convention: how to write JSDoc so it renders correctly in the TypeDoc site and stays machine-parsable in the MCP bundle and by AI tooling.
🧭 Overview
- Documentation is the single source of truth and lives in JSDoc comments.
doc-weavercompiles comments; it never rewrites or invents them.- Structure follows the TypeScript export hierarchy.
- Every public export should have a complete and accurate JSDoc comment.
- Types live in signatures; do not duplicate them in prose unless a tag requires it.
📦 Module (file) level
Document the file with a leading block comment. It becomes the module
docstring in the MCP bundle.
📦 Components
Document the component function and its props. Components are classified
automatically as kind: "component" (PascalCase name).
📦 Hooks
Hooks are classified automatically as kind: "hook" (name starts with use).
📦 Types, interfaces, and members
Document the type and each member. Members become nested members entries in
the MCP bundle.
📦 Notes subsection grouping
Group related information using labeled subsections (Markdown bold):
📦 Heading map
doc-weaver renders JSDoc block tags into stable markdown headings so both
TypeDoc and the MCP bundle agree:
| JSDoc tag | Rendered heading |
|---|---|
@param |
**Parameters:** |
@returns / @return |
**Returns:** |
@throws |
**Throws:** |
@example |
**Example:** |
@deprecated |
**Deprecated:** |
@see |
**See also:** |
@remarks |
**Remarks:** |
| other | **@tag:** |
📦 Mapping to output kinds
| TS construct | kind |
|---|---|
| interface / type alias | interface / type-alias |
| function component (PascalCase) | component |
custom hook (use*) |
hook |
| plain function | function |
| object / class member | property / method |
| const / let / var | variable |
An explicit @kind tag overrides the inferred kind.
🛡️ Enforcement
Unlike doc-forge (which runs pydoclint in CI), doc-weaver performs no
signature linting: TypeDoc extracts whatever JSDoc is present. Keep comments
complete and accurate — they are the single source of truth for both the human
site and the machine bundle.