1.9 KiB
1.9 KiB
Conventions
GSDFC docstrings
All documented source uses the Google-Styled Doc-Forge Convention (GSDFC):
Args:, Returns:, Raises:, and Attributes: sections with properly typed
signatures.
The authoritative GSDFC specification lives in the docforge/__init__.py
package docstring, which is exported verbatim into
docs/mcp/modules/docforge.json, so the MCP bundle is self-documenting.
Key rules:
- Use parenthesized types in prose entries (
name (Type):) that match the signature types. - Use
# Summary,# Examples, and# Notessections at module level. - Use
Args:,Returns:,Raises:,Yields:,Notes:, andExample:sections at function and method level. - Always update the matching
.pyistub alongside the.pyimplementation. - Every distributable package ships a
py.typedmarker so type checkers consume the authored signatures instead ofAny.
.pyi stubs and py.typed
Every module ships a matching .pyi stub kept in sync with the .py
implementation. When signatures change, update both files. Packages expose a
py.typed marker so consumers and type checkers use the authored signatures.
Wiki pages
- Hand-written markdown lives in
docs/wiki/**and is never generated. - File names use a numeric prefix:
01_overview.md,02_components.md. - Nested directories become nested navigation groups:
05_development/01_environment.md→ group Development. index.mdis the siteHomeat the root, and a section root inside a directory.- Navigation labels are derived by stripping the numeric prefix and applying title case on the remaining words.
Templates
MkDocs config fragments live in docforge/templates. The mkdocs.wiki.yml
fragment carries only the search plugin, since wiki pages contain no
mkdocstrings directives.