From 167d44fcfeef318cd4e554b3486790185dec52ef Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Sat, 12 Sep 2026 13:12:55 +0530 Subject: [PATCH] docs: refresh doc-forge library and MCP bundle - collect regenerated doc-forge combined site (wiki + lib) - drop stale lib/docforge duplicate subtree - mcp bundle now uses docs:// module resources --- doc-forge/404.html | 50 + doc-forge/lib/cli/api_utils/index.html | 56 +- doc-forge/lib/cli/commands/index.html | 91 +- doc-forge/lib/cli/index.html | 50 + doc-forge/lib/cli/main/index.html | 50 + doc-forge/lib/cli/mcp_utils/index.html | 64 +- doc-forge/lib/cli/mkdocs_utils/index.html | 77 +- .../lib/docforge/cli/api_utils/index.html | 1707 --------- .../lib/docforge/cli/commands/index.html | 1879 ---------- doc-forge/lib/docforge/cli/main/index.html | 1357 ------- .../lib/docforge/cli/mcp_utils/index.html | 1526 -------- .../lib/docforge/cli/mkdocs_utils/index.html | 1857 ---------- doc-forge/lib/docforge/index.html | 3213 ----------------- .../docforge/loaders/griffe_loader/index.html | 1783 --------- doc-forge/lib/docforge/loaders/index.html | 1807 --------- doc-forge/lib/docforge/models/index.html | 2597 ------------- .../lib/docforge/models/module/index.html | 1703 --------- .../lib/docforge/models/object/index.html | 1792 --------- .../lib/docforge/models/project/index.html | 1728 --------- doc-forge/lib/docforge/nav/index.html | 2499 ------------- doc-forge/lib/docforge/nav/mkdocs/index.html | 1487 -------- .../lib/docforge/nav/resolver/index.html | 1700 --------- doc-forge/lib/docforge/nav/spec/index.html | 1815 ---------- .../lib/docforge/renderers/base/index.html | 1614 --------- doc-forge/lib/docforge/renderers/index.html | 1790 --------- .../renderers/mcp_renderer/index.html | 1469 -------- .../renderers/mkdocs_renderer/index.html | 1616 --------- .../docforge/servers/mcp_server/index.html | 1508 -------- doc-forge/lib/index.html | 192 +- .../lib/loaders/griffe_loader/index.html | 143 +- doc-forge/lib/loaders/index.html | 135 +- doc-forge/lib/models/index.html | 81 +- doc-forge/lib/models/module/index.html | 65 +- doc-forge/lib/models/object/index.html | 70 +- doc-forge/lib/models/project/index.html | 75 +- doc-forge/lib/nav/index.html | 112 +- doc-forge/lib/nav/mkdocs/index.html | 85 +- doc-forge/lib/nav/resolver/index.html | 73 +- doc-forge/lib/nav/spec/index.html | 83 +- .../lib/{docforge => }/nav/wiki/index.html | 124 +- doc-forge/lib/renderers/base/index.html | 50 + doc-forge/lib/renderers/index.html | 69 +- .../lib/renderers/mcp_renderer/index.html | 50 + .../lib/renderers/mkdocs_renderer/index.html | 69 +- doc-forge/lib/servers/index.html | 87 + doc-forge/lib/servers/mcp_server/index.html | 99 + doc-forge/mcp/index.json | 2 +- .../mcp/modules/docforge.cli.api_utils.json | 12 +- .../mcp/modules/docforge.cli.commands.json | 150 +- doc-forge/mcp/modules/docforge.cli.json | 219 +- .../mcp/modules/docforge.cli.mcp_utils.json | 18 +- .../modules/docforge.cli.mkdocs_utils.json | 39 +- doc-forge/mcp/modules/docforge.json | 469 ++- .../docforge.loaders.griffe_loader.json | 26 +- doc-forge/mcp/modules/docforge.loaders.json | 34 +- doc-forge/mcp/modules/docforge.models.json | 54 +- .../mcp/modules/docforge.models.module.json | 16 +- .../mcp/modules/docforge.models.object.json | 14 +- .../mcp/modules/docforge.models.project.json | 16 +- doc-forge/mcp/modules/docforge.nav.json | 112 +- .../mcp/modules/docforge.nav.mkdocs.json | 10 +- .../mcp/modules/docforge.nav.resolver.json | 16 +- doc-forge/mcp/modules/docforge.nav.spec.json | 23 +- doc-forge/mcp/modules/docforge.nav.wiki.json | 44 + .../mcp/modules/docforge.renderers.base.json | 2 +- doc-forge/mcp/modules/docforge.renderers.json | 26 +- .../docforge.renderers.mcp_renderer.json | 8 +- .../docforge.renderers.mkdocs_renderer.json | 12 +- doc-forge/mcp/modules/docforge.servers.json | 10 +- .../modules/docforge.servers.mcp_server.json | 8 +- doc-forge/mcp/nav.json | 50 +- doc-forge/objects.inv | Bin 1283 -> 1237 bytes doc-forge/search/search_index.json | 2 +- doc-forge/wiki/01_overview/index.html | 76 +- doc-forge/wiki/02_architecture/index.html | 77 +- doc-forge/wiki/03_conventions/index.html | 64 +- .../wiki/04_iterative_workflow/index.html | 99 +- .../05_development/01_environment/index.html | 53 +- .../02_quality_gates/index.html | 56 +- .../05_development/03_gsdfc_guide}/index.html | 651 ++-- .../05_development/04_mcp_guide}/index.html | 344 +- doc-forge/wiki/index.html | 63 +- mcp/doc-forge/index.json | 2 +- .../modules/docforge.cli.api_utils.json | 12 +- .../modules/docforge.cli.commands.json | 150 +- mcp/doc-forge/modules/docforge.cli.json | 219 +- .../modules/docforge.cli.mcp_utils.json | 18 +- .../modules/docforge.cli.mkdocs_utils.json | 39 +- mcp/doc-forge/modules/docforge.json | 469 ++- .../docforge.loaders.griffe_loader.json | 26 +- mcp/doc-forge/modules/docforge.loaders.json | 34 +- mcp/doc-forge/modules/docforge.models.json | 54 +- .../modules/docforge.models.module.json | 16 +- .../modules/docforge.models.object.json | 14 +- .../modules/docforge.models.project.json | 16 +- mcp/doc-forge/modules/docforge.nav.json | 112 +- .../modules/docforge.nav.mkdocs.json | 10 +- .../modules/docforge.nav.resolver.json | 16 +- mcp/doc-forge/modules/docforge.nav.spec.json | 23 +- mcp/doc-forge/modules/docforge.nav.wiki.json | 44 + .../modules/docforge.renderers.base.json | 2 +- mcp/doc-forge/modules/docforge.renderers.json | 26 +- .../docforge.renderers.mcp_renderer.json | 8 +- .../docforge.renderers.mkdocs_renderer.json | 12 +- mcp/doc-forge/modules/docforge.servers.json | 10 +- .../modules/docforge.servers.mcp_server.json | 8 +- mcp/doc-forge/nav.json | 50 +- 107 files changed, 4754 insertions(+), 40058 deletions(-) delete mode 100644 doc-forge/lib/docforge/cli/api_utils/index.html delete mode 100644 doc-forge/lib/docforge/cli/commands/index.html delete mode 100644 doc-forge/lib/docforge/cli/main/index.html delete mode 100644 doc-forge/lib/docforge/cli/mcp_utils/index.html delete mode 100644 doc-forge/lib/docforge/cli/mkdocs_utils/index.html delete mode 100644 doc-forge/lib/docforge/index.html delete mode 100644 doc-forge/lib/docforge/loaders/griffe_loader/index.html delete mode 100644 doc-forge/lib/docforge/loaders/index.html delete mode 100644 doc-forge/lib/docforge/models/index.html delete mode 100644 doc-forge/lib/docforge/models/module/index.html delete mode 100644 doc-forge/lib/docforge/models/object/index.html delete mode 100644 doc-forge/lib/docforge/models/project/index.html delete mode 100644 doc-forge/lib/docforge/nav/index.html delete mode 100644 doc-forge/lib/docforge/nav/mkdocs/index.html delete mode 100644 doc-forge/lib/docforge/nav/resolver/index.html delete mode 100644 doc-forge/lib/docforge/nav/spec/index.html delete mode 100644 doc-forge/lib/docforge/renderers/base/index.html delete mode 100644 doc-forge/lib/docforge/renderers/index.html delete mode 100644 doc-forge/lib/docforge/renderers/mcp_renderer/index.html delete mode 100644 doc-forge/lib/docforge/renderers/mkdocs_renderer/index.html delete mode 100644 doc-forge/lib/docforge/servers/mcp_server/index.html rename doc-forge/lib/{docforge => }/nav/wiki/index.html (87%) create mode 100644 doc-forge/mcp/modules/docforge.nav.wiki.json rename doc-forge/{lib/docforge/servers => wiki/05_development/03_gsdfc_guide}/index.html (61%) rename doc-forge/{lib/docforge/cli => wiki/05_development/04_mcp_guide}/index.html (76%) create mode 100644 mcp/doc-forge/modules/docforge.nav.wiki.json diff --git a/doc-forge/404.html b/doc-forge/404.html index 5e8f617..4ad0e41 100644 --- a/doc-forge/404.html +++ b/doc-forge/404.html @@ -334,6 +334,10 @@ + + + + @@ -418,6 +422,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + diff --git a/doc-forge/lib/cli/api_utils/index.html b/doc-forge/lib/cli/api_utils/index.html index 3b95278..1b55ecb 100644 --- a/doc-forge/lib/cli/api_utils/index.html +++ b/doc-forge/lib/cli/api_utils/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1566,7 +1616,7 @@ site author.

    spec - dict[Any, Any] + dict
    @@ -1592,7 +1642,7 @@ site author.

    OpenAPIMetadata - OpenAPIMetadata + OpenAPIMetadata
    @@ -1643,7 +1693,7 @@ an index.md embedding the swagger UI is generated alongside it.

    spec - dict[Any, Any] + dict
    diff --git a/doc-forge/lib/cli/commands/index.html b/doc-forge/lib/cli/commands/index.html index c600a5f..7ab5312 100644 --- a/doc-forge/lib/cli/commands/index.html +++ b/doc-forge/lib/cli/commands/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1396,6 +1446,17 @@

    Summary

    Command definitions for the doc-forge CLI.

    Provides the CLI structure using Click, including build, serve, and tree commands.

    +
    + + +
    + Notes +
      +
    • The build command validates requested modes before generating anything.
    • +
    • --mkdocs, --api, and --wiki share a single MkDocs build; --mcp + generates a machine-readable bundle independently.
    • +
    +

    @@ -1455,9 +1516,9 @@

    Build documentation artifacts.

    -

    This command performs the full documentation build pipeline: -style of the selected platform, generates renderer-specific -documentation sources, and optionally builds the final output.

    +

    This command runs the full documentation pipeline: it loads Python +modules, generates renderer-specific documentation sources, and +optionally builds or serves the final output.

    Depending on the selected options, the build can target:

    • MkDocs static documentation sites for library reference docs
    • @@ -1467,6 +1528,16 @@ documentation sources, and optionally builds the final output.

    +
    + Notes +
      +
    • At least one of --mcp, --mkdocs, --wiki, or --api must be + provided.
    • +
    • --mkdocs, --api, and --wiki are combined into a single MkDocs + build, while --mcp emits a machine-readable bundle.
    • +
    +
    +

    Parameters:

    @@ -1551,7 +1622,7 @@ documentation sources, and optionally builds the final output.

    module - Optional[str] + str | None
    @@ -1565,7 +1636,7 @@ documentation sources, and optionally builds the final output.

    openapi_spec - Optional[Path] + Path | None
    @@ -1579,7 +1650,7 @@ documentation sources, and optionally builds the final output.

    project_name - Optional[str] + str | None
    @@ -1593,7 +1664,7 @@ documentation sources, and optionally builds the final output.

    site_name - Optional[str] + str | None
    @@ -1649,7 +1720,7 @@ documentation sources, and optionally builds the final output.

    template - Optional[Path] + Path | None
    @@ -1793,7 +1864,7 @@ documentation sources, and optionally builds the final output.

    module - Optional[str] + str | None
    @@ -1909,7 +1980,7 @@ objects, including modules, classes, functions, and members.

    project_name - Optional[str] + str | None
    diff --git a/doc-forge/lib/cli/index.html b/doc-forge/lib/cli/index.html index 51e5d02..a919ac2 100644 --- a/doc-forge/lib/cli/index.html +++ b/doc-forge/lib/cli/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + diff --git a/doc-forge/lib/cli/main/index.html b/doc-forge/lib/cli/main/index.html index 515abe4..c5c626a 100644 --- a/doc-forge/lib/cli/main/index.html +++ b/doc-forge/lib/cli/main/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + diff --git a/doc-forge/lib/cli/mcp_utils/index.html b/doc-forge/lib/cli/mcp_utils/index.html index 8959a14..ecb7f2a 100644 --- a/doc-forge/lib/cli/mcp_utils/index.html +++ b/doc-forge/lib/cli/mcp_utils/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1377,6 +1427,18 @@

    Summary

    Utilities for working with MCP in the doc-forge CLI.

    +
    + + +
    + Notes +
      +
    • generate_resources produces the bundle consumed by MCPServer: + index.json, nav.json, and per-module resources under modules/.
    • +
    • Resource URIs use the docs:// scheme: docs://index, docs://nav, + and docs://modules/{module}.
    • +
    +

    @@ -1442,7 +1504,7 @@ documentation generation.

    project_name - Optional[str] + str | None
    diff --git a/doc-forge/lib/cli/mkdocs_utils/index.html b/doc-forge/lib/cli/mkdocs_utils/index.html index 6fca381..e2e20aa 100644 --- a/doc-forge/lib/cli/mkdocs_utils/index.html +++ b/doc-forge/lib/cli/mkdocs_utils/index.html @@ -341,6 +341,10 @@ + + + + @@ -425,6 +429,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1411,6 +1461,17 @@

    Summary

    Utilities for working with MkDocs in the doc-forge CLI.

    +
    + + +
    + Notes +
      +
    • A single generated mkdocs.yml serves lib, api, and wiki content with + merged navigation. Wiki navigation, when enabled, precedes every other + group and its index.md becomes the site Home.
    • +
    +

    @@ -1583,7 +1644,7 @@ and hand-written wiki content under a wiki/ subdirectory.

    template - Optional[Path] + Path | None
    @@ -1627,7 +1688,7 @@ template replaces the built-in templates entirely.

    modes - Optional[Iterable[str]] + Iterable[str] | None
    @@ -1644,7 +1705,7 @@ template.

    site_description - Optional[str] + str | None
    @@ -1658,7 +1719,7 @@ template.

    site_author - Optional[str] + str | None
    @@ -1672,7 +1733,7 @@ template.

    wiki_dir - Optional[Path] + Path | None
    @@ -1791,7 +1852,7 @@ documentation generation.

    project_name - Optional[str] + str | None
    @@ -1805,7 +1866,7 @@ documentation generation.

    module_is_source - Optional[bool] + bool | None
    @@ -1820,7 +1881,7 @@ rather than a nested module.

    readme_dir - Optional[Path] + Path | None
    diff --git a/doc-forge/lib/docforge/cli/api_utils/index.html b/doc-forge/lib/docforge/cli/api_utils/index.html deleted file mode 100644 index 353d0ca..0000000 --- a/doc-forge/lib/docforge/cli/api_utils/index.html +++ /dev/null @@ -1,1707 +0,0 @@ - - - - - - - - - - - - - - - - - - - Api Utils - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Api Utils

    - - -
    - - - -

    - docforge.cli.api_utils - - -

    - -
    - -

    Summary

    -

    Utilities for building API documentation from an OpenAPI specification.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - OpenAPIMetadata - - - - dataclass - - -

    -
    1
    -2
    -3
    -4
    -5
    OpenAPIMetadata(
    -    site_name: str,
    -    site_description: str | None,
    -    site_author: str | None,
    -)
    -
    - -
    - - -

    Metadata derived from the info block of an OpenAPI specification.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    site_name - str - -
    -

    Spec title, used as the MkDocs site name.

    -
    -
    site_description - str | None - -
    -

    Spec description, used as the site description.

    -
    -
    site_author - str | None - -
    -

    Contact name (fallback: contact email), used as the -site author.

    -
    -
    - - - - -
    - - - - - - - - - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - derive_metadata - - -

    -
    derive_metadata(spec: dict[Any, Any]) -> OpenAPIMetadata
    -
    - -
    - -

    Derive MkDocs site metadata from an OpenAPI spec info block.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    spec - dict[Any, Any] - -
    -

    Parsed OpenAPI specification.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    OpenAPIMetadata - OpenAPIMetadata - -
    -

    Site name, description, and author derived from the spec.

    -
    -
    - -
    - -
    - -
    - - -

    - generate_api_sources - - -

    -
    1
    -2
    -3
    generate_api_sources(
    -    spec: dict[Any, Any], docs_dir: Path
    -) -> None
    -
    - -
    - -

    Generate swagger-enabled Markdown sources and the spec copy.

    -

    The specification is written as openapi.json inside docs_dir and -an index.md embedding the swagger UI is generated alongside it.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    spec - dict[Any, Any] - -
    -

    Parsed OpenAPI specification.

    -
    -
    - required -
    docs_dir - Path - -
    -

    Directory (for example docs/api) where the swagger -sources are written.

    -
    -
    - required -
    - -
    - -
    - -
    - - -

    - load_openapi_spec - - -

    -
    load_openapi_spec(spec_path: Path) -> dict[Any, Any]
    -
    - -
    - -

    Load and validate an OpenAPI specification from a JSON file.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    spec_path - Path - -
    -

    Path to the OpenAPI JSON specification file.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    dict - dict[Any, Any] - -
    -

    The parsed OpenAPI specification.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - ClickException - -
    -

    If the file cannot be read or the info block is invalid.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/cli/commands/index.html b/doc-forge/lib/docforge/cli/commands/index.html deleted file mode 100644 index aa9ad55..0000000 --- a/doc-forge/lib/docforge/cli/commands/index.html +++ /dev/null @@ -1,1879 +0,0 @@ - - - - - - - - - - - - - - - - - - - Commands - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Commands

    - - -
    - - - -

    - docforge.cli.commands - - -

    - -
    - -

    Summary

    -

    Command definitions for the doc-forge CLI.

    -

    Provides the CLI structure using Click, including build, serve, and tree commands.

    - - - -
    - - - - - - -

    Classes

    -

    Functions

    - -
    - - -

    - build - - -

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    build(
    -    mcp: bool,
    -    mkdocs: bool,
    -    api: bool,
    -    wiki: bool,
    -    module_is_source: bool,
    -    module: str | None,
    -    openapi_spec: Path | None,
    -    project_name: str | None,
    -    site_name: str | None,
    -    docs_dir: Path,
    -    wiki_dir: Path,
    -    nav_file: Path,
    -    template: Path | None,
    -    mkdocs_yml: Path,
    -    out_dir: Path,
    -) -> None
    -
    - -
    - -

    Build documentation artifacts.

    -

    This command performs the full documentation build pipeline: -style of the selected platform, generates renderer-specific -documentation sources, and optionally builds the final output.

    -

    Depending on the selected options, the build can target:

    -
      -
    • MkDocs static documentation sites for library reference docs
    • -
    • Swagger-enabled API docs generated from an OpenAPI spec
    • -
    • Hand-written wiki pages included in the MkDocs site
    • -
    • MCP structured documentation resources
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    mcp - bool - -
    -

    Enable MCP documentation generation.

    -
    -
    - required -
    mkdocs - bool - -
    -

    Enable MkDocs library documentation generation.

    -
    -
    - required -
    api - bool - -
    -

    Enable API documentation generation from an OpenAPI spec.

    -
    -
    - required -
    wiki - bool - -
    -

    Include a hand-written wiki directory in the MkDocs site.

    -
    -
    - required -
    module_is_source - bool - -
    -

    Treat the specified module directory as the project root.

    -
    -
    - required -
    module - Optional[str] - -
    -

    Python module import path to document.

    -
    -
    - required -
    openapi_spec - Optional[Path] - -
    -

    Path to the OpenAPI JSON specification used for API docs.

    -
    -
    - required -
    project_name - Optional[str] - -
    -

    Optional override for the project name.

    -
    -
    - required -
    site_name - Optional[str] - -
    -

    Display name for the MkDocs site.

    -
    -
    - required -
    docs_dir - Path - -
    -

    Shared documentation root used as the MkDocs docs_dir.

    -
    -
    - required -
    wiki_dir - Path - -
    -

    Directory containing hand-written wiki markdown files.

    -
    -
    - required -
    nav_file - Path - -
    -

    Path to the navigation specification file.

    -
    -
    - required -
    template - Optional[Path] - -
    -

    Optional custom MkDocs configuration template.

    -
    -
    - required -
    mkdocs_yml - Path - -
    -

    Output path for the generated MkDocs configuration.

    -
    -
    - required -
    out_dir - Path - -
    -

    Output directory for generated MCP resources.

    -
    -
    - required -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - UsageError - -
    -

    If required options are missing or conflicting.

    -
    -
    - -
    - -
    - -
    - - -

    - serve - - -

    -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    serve(
    -    mcp: bool,
    -    mkdocs: bool,
    -    module: str | None,
    -    mkdocs_yml: Path,
    -    out_dir: Path,
    -) -> None
    -
    - -
    - -

    Serve generated documentation locally.

    -

    Depending on the selected mode, this command starts either:

    -
      -
    • A MkDocs development server for browsing documentation
    • -
    • An MCP server exposing structured documentation resources
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    mcp - bool - -
    -

    Serve documentation using the MCP server.

    -
    -
    - required -
    mkdocs - bool - -
    -

    Serve the MkDocs development site.

    -
    -
    - required -
    module - Optional[str] - -
    -

    Python module import path to serve via MCP.

    -
    -
    - required -
    mkdocs_yml - Path - -
    -

    Path to the MkDocs configuration file.

    -
    -
    - required -
    out_dir - Path - -
    -

    Root directory containing MCP documentation resources.

    -
    -
    - required -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - UsageError - -
    -

    If invalid or conflicting options are provided.

    -
    -
    - -
    - -
    - -
    - - -

    - tree - - -

    -
    tree(module: str, project_name: str | None) -> None
    -
    - -
    - -

    Display the documentation object tree for a module.

    -

    This command introspects the specified module and prints a -hierarchical representation of the discovered documentation -objects, including modules, classes, functions, and members.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module - str - -
    -

    Python module import path to introspect.

    -
    -
    - required -
    project_name - Optional[str] - -
    -

    Optional name to display as the project root.

    -
    -
    - required -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/cli/main/index.html b/doc-forge/lib/docforge/cli/main/index.html deleted file mode 100644 index 3877d1d..0000000 --- a/doc-forge/lib/docforge/cli/main/index.html +++ /dev/null @@ -1,1357 +0,0 @@ - - - - - - - - - - - - - - - - - - - Main - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Main

    - - -
    - - - -

    - docforge.cli.main - - -

    - -
    - -

    Summary

    -

    Command-line entry point for the doc-forge CLI.

    -

    This module exposes the executable entry point that initializes the -Click command group defined in docforge.cli.commands.

    - - - -
    - - - - - - - -

    Functions

    - -
    - - -

    - main - - -

    -
    main() -> None
    -
    - -
    - -

    Run the doc-forge command-line interface.

    -

    This function initializes and executes the Click CLI application. -It is used as the console entry point when invoking doc-forge -from the command line.

    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/cli/mcp_utils/index.html b/doc-forge/lib/docforge/cli/mcp_utils/index.html deleted file mode 100644 index 7c16802..0000000 --- a/doc-forge/lib/docforge/cli/mcp_utils/index.html +++ /dev/null @@ -1,1526 +0,0 @@ - - - - - - - - - - - - - - - - - - - Mcp Utils - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Mcp Utils

    - - -
    - - - -

    - docforge.cli.mcp_utils - - -

    - -
    - -

    Summary

    -

    Utilities for working with MCP in the doc-forge CLI.

    - - - -
    - - - - - - -

    Classes

    -

    Functions

    - -
    - - -

    - generate_resources - - -

    -
    1
    -2
    -3
    generate_resources(
    -    module: str, project_name: str | None, out_dir: Path
    -) -> None
    -
    - -
    - -

    Generate MCP documentation resources from a Python module.

    -

    The function performs project introspection, builds the internal -documentation model, and renders MCP-compatible JSON resources -to the specified output directory.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module - str - -
    -

    Python module import path used as the entry point for -documentation generation.

    -
    -
    - required -
    project_name - Optional[str] - -
    -

    Optional override for the project name used in generated -documentation metadata.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where MCP resources (index.json, nav.json, and module data) -will be written.

    -
    -
    - required -
    - -
    - -
    - -
    - - -

    - serve - - -

    -
    serve(module: str, mcp_root: Path) -> None
    -
    - -
    - -

    Start an MCP server for a pre-generated documentation bundle.

    -

    The server exposes documentation resources such as project metadata, -navigation structure, and module documentation through MCP endpoints.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module - str - -
    -

    Python module import path used to identify the served -documentation instance.

    -
    -
    - required -
    mcp_root - Path - -
    -

    Path to the directory containing the MCP documentation -bundle (index.json, nav.json, and modules/).

    -
    -
    - required -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - ClickException - -
    -

    If the MCP documentation bundle is missing required files or directories.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/cli/mkdocs_utils/index.html b/doc-forge/lib/docforge/cli/mkdocs_utils/index.html deleted file mode 100644 index 8413897..0000000 --- a/doc-forge/lib/docforge/cli/mkdocs_utils/index.html +++ /dev/null @@ -1,1857 +0,0 @@ - - - - - - - - - - - - - - - - - - - Mkdocs Utils - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Mkdocs Utils

    - - -
    - - - -

    - docforge.cli.mkdocs_utils - - -

    - -
    - -

    Summary

    -

    Utilities for working with MkDocs in the doc-forge CLI.

    - - - -
    - - - - - - -

    Classes

    -

    Functions

    - -
    - - -

    - build - - -

    -
    build(mkdocs_yml: Path) -> None
    -
    - -
    - -

    Build the MkDocs documentation site.

    -

    This function loads the MkDocs configuration and runs the MkDocs -build command to generate the final static documentation site.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    mkdocs_yml - Path - -
    -

    Path to the mkdocs.yml configuration file.

    -
    -
    - required -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - ClickException - -
    -

    If the configuration file does not exist.

    -
    -
    - -
    - -
    - -
    - - -

    - generate_config - - -

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    generate_config(
    -    docs_dir: Path,
    -    nav_file: Path,
    -    template: Path | None,
    -    out: Path,
    -    site_name: str,
    -    modes: Iterable[str] | None = None,
    -    site_description: str | None = None,
    -    site_author: str | None = None,
    -    wiki_dir: Path | None = None,
    -) -> None
    -
    - -
    - -

    Generate an mkdocs.yml configuration file.

    -

    The configuration is created by combining a template configuration -with a navigation structure derived from the docforge navigation -specification (and, when a wiki directory is provided, from the wiki -file structure).

    -

    The docs_dir is always written relative to the MkDocs root and is -expected to be the shared documentation parent (for example docs), -with generated sources nested under lib/ or api/ subdirectories -and hand-written wiki content under a wiki/ subdirectory.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    docs_dir - Path - -
    -

    Shared documentation root used as the MkDocs docs_dir.

    -
    -
    - required -
    nav_file - Path - -
    -

    Path to the docforge.nav.yml navigation specification.

    -
    -
    - required -
    template - Optional[Path] - -
    -

    Optional path to a fully custom MkDocs configuration template. -If not provided, built-in templates are merged; the provided -template replaces the built-in templates entirely.

    -
    -
    - required -
    out - Path - -
    -

    Destination path where the generated mkdocs.yml file will be written.

    -
    -
    - required -
    site_name - str - -
    -

    Display name for the generated documentation site.

    -
    -
    - required -
    modes - Optional[Iterable[str]] - -
    -

    Documentation modes to enable. Each mode contributes its own -built-in template fragment (for example lib, api, or -wiki), merged on top of the shared mkdocs.common.yml -template.

    -
    -
    - None -
    site_description - Optional[str] - -
    -

    Optional site description written into the configuration.

    -
    -
    - None -
    site_author - Optional[str] - -
    -

    Optional site author written into the configuration.

    -
    -
    - None -
    wiki_dir - Optional[Path] - -
    -

    Optional path to a hand-written wiki directory (for example -docs/wiki). When provided, the site navigation is derived -from the wiki file structure and placed before the navigation -groups defined in nav_file.

    -
    -
    - None -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileError - -
    -

    If the navigation specification, template, or wiki directory -cannot be found.

    -
    -
    - -
    - -
    - -
    - - -

    - generate_sources - - -

    -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    generate_sources(
    -    module: str,
    -    docs_dir: Path,
    -    project_name: str | None = None,
    -    module_is_source: bool | None = None,
    -    readme_dir: Path | None = None,
    -) -> None
    -
    - -
    - -

    Generate MkDocs Markdown sources for a Python module.

    -

    This function introspects the specified module, builds the internal -documentation model, and renders Markdown documentation files for -use with MkDocs.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module - str - -
    -

    Python module import path used as the entry point for -documentation generation.

    -
    -
    - required -
    docs_dir - Path - -
    -

    Directory where the generated Markdown files will be written.

    -
    -
    - required -
    project_name - Optional[str] - -
    -

    Optional override for the project name used in documentation metadata.

    -
    -
    - None -
    module_is_source - Optional[bool] - -
    -

    If True, treat the specified module directory as the project root -rather than a nested module.

    -
    -
    - None -
    readme_dir - Optional[Path] - -
    -

    Directory where the generated README.md should be written. If not -provided, defaults to the parent of docs_dir.

    -
    -
    - None -
    - -
    - -
    - -
    - - -

    - serve - - -

    -
    serve(mkdocs_yml: Path) -> None
    -
    - -
    - -

    Start an MkDocs development server with live reload.

    -

    The server watches documentation files and automatically reloads -the site when changes are detected.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    mkdocs_yml - Path - -
    -

    Path to the mkdocs.yml configuration file.

    -
    -
    - required -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - ClickException - -
    -

    If the configuration file does not exist.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/index.html b/doc-forge/lib/docforge/index.html deleted file mode 100644 index 6c71b09..0000000 --- a/doc-forge/lib/docforge/index.html +++ /dev/null @@ -1,3213 +0,0 @@ - - - - - - - - - - - - - - - - - - - Docforge - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Docforge

    - - -
    - - - -

    - docforge - - -

    - -
    - -

    Summary

    -

    Renderer-agnostic Python documentation compiler that converts Python docstrings -into structured documentation for both humans (MkDocs) and machines (MCP / AI agents).

    -

    doc-forge statically analyzes source code, builds a semantic model of modules, -classes, functions, and attributes, and renders that model into documentation -outputs without executing user code.

    -
    -

    Installation

    -

    Install using pip:

    -
    pip install doc-forge
    -
    -
    -

    CLI usage

    -

    Generate an MkDocs site from a Python package:

    -
    doc-forge build --mkdocs --module my_package
    -
    -

    Generate MCP JSON documentation:

    -
    doc-forge build --mcp --module my_package
    -
    -

    Generate MkDocs site and MCP JSON documentation:

    -
    doc-forge build --mcp --mkdocs --module my_package
    -
    -

    Serve MkDocs locally:

    -
    doc-forge serve --mkdocs --module my_package
    -
    -

    Serve MCP locally:

    -
    doc-forge serve --mcp --module my_package
    -
    -
    -

    Core concepts

    -

    Loader

    -

    Extracts symbols, signatures, and docstrings using static analysis.

    -

    Semantic model

    -

    Structured, renderer-agnostic representation of the API.

    -

    Renderer

    -

    Converts the semantic model into output formats such as MkDocs or MCP JSON.

    -

    Symbol

    -

    Any documentable object

    -
      -
    • module
    • -
    • class
    • -
    • function
    • -
    • method
    • -
    • property
    • -
    • attribute
    • -
    -
    -

    Architecture

    -

    doc-forge follows a compiler architecture:

    -

    Front-end:

    -

    Static analysis of modules, classes, functions, type hints, and docstrings.

    -

    Middle-end:

    -

    Builds a semantic model describing symbols and relationships.

    -

    Back-end:

    -

    Renders documentation using interchangeable renderers.

    -

    This architecture ensures deterministic documentation generation.

    -
    -

    Rendering pipeline

    -

    Typical flow:

    -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    -8
    -9
    Python package
    -    |
    -Loader (static analysis)
    -    |
    -Semantic model
    -    |
    -Renderer
    -    |
    -MkDocs site or MCP JSON
    -
    -
    -

    Google-Styled Doc-Forge Convention (GSDFC)

    -

    GSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.

    -
      -
    • Docstrings are the single source of truth.
    • -
    • doc-forge compiles docstrings but does not generate documentation content.
    • -
    • Documentation follows the Python import hierarchy.
    • -
    • Every public symbol should have a complete and accurate docstring.
    • -
    -
    -

    General rules

    -
      -
    • Use Markdown headings at package and module level.
    • -
    • Use Google-style structured sections at class, function, and method level.
    • -
    • Use type hints in signatures instead of duplicating types in prose.
    • -
    • Write summaries in imperative form.
    • -
    • Sections are separated by ---
    • -
    -
    -

    Notes subsection grouping

    -

    Group related information using labeled subsections.

    -

    Example:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    Notes:
    -    **Guarantees:**
    -
    -        - deterministic behavior
    -
    -    **Lifecycle:**
    -
    -        - created during initialization
    -        - reused across executions
    -
    -    **Thread safety:**
    -
    -        - safe for concurrent reads
    -
    -
    -

    Example formatting

    -
      -
    • Use indentation for examples.
    • -
    • Indent section contents using four spaces.
    • -
    • Use code blocks for example code.
    • -
    - - -
    - Example -

    Single example:

    -
    1
    -2
    -3
    -4
    -5
    -6
    Example:
    -
    -    ```python
    -    foo = Foo("example")
    -    process(foo, multiplier=2)
    -    ```
    -
    -

    Multiple examples:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    Example:
    -    Create foo:
    -
    -        ```python
    -        foo = Foo("example")
    -        ```
    -
    -    Run engine:
    -
    -        ```python
    -        engine = BarEngine([foo])
    -        engine.run()
    -        ```
    -
    -

    Avoid fenced code blocks inside structured sections.

    -
    -

    Separator rules

    -

    Use horizontal separators only at docstring root level to separate sections:

    -
    ---
    -
    -

    Allowed locations:

    -
      -
    • package docstrings
    • -
    • module docstrings
    • -
    • major documentation sections
    • -
    -

    Do not use separators inside code sections.

    -
    -

    Package docstrings

    -

    Package docstrings act as the documentation home page.

    -

    Recommended sections:

    -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    -8
    -9
    # Summary
    -# Installation
    -# Quick start
    -# CLI usage
    -# Core concepts
    -# Architecture
    -# Rendering pipeline
    -# Examples
    -# Notes
    -
    - - -
    - Example -

    Package Doc String:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    '''
    -# Summary
    -
    -Foo-bar processing framework.
    -
    -Provides tools for defining Foo objects and executing Bar pipelines.
    -
    ----
    -
    -# Installation
    -
    -```bash
    -pip install foo-bar
    -```
    -
    ----
    -
    -# Quick start
    -
    -```python
    -from foobar import Foo, BarEngine
    -
    -foo = Foo("example")
    -engine = BarEngine([foo])
    -
    -result = engine.run()
    -```
    -
    ----
    -'''
    -
    -

    -

    Module docstrings

    -

    Module docstrings describe a subsystem.

    -

    Recommended sections:

    -
    1
    -2
    -3
    # Summary
    -# Examples
    -# Notes
    -
    - - -
    - Example -

    Module Doc String:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    '''
    -# Summary
    -
    -Foo execution subsystem.
    -
    -Provides utilities for executing Foo objects through Bar stages.
    -
    ----
    -
    -Example:
    -
    -    ```python
    -    from foobar.engine import BarEngine
    -    from foobar.foo import Foo
    -
    -    foo = Foo("example")
    -
    -    engine = BarEngine([foo])
    -    engine.run()
    -    ```
    -
    ----
    -'''
    -
    -

    -

    Class docstrings

    -

    Class docstrings define object responsibility, lifecycle, and attributes.

    -

    Recommended sections:

    -
    1
    -2
    -3
    -4
    Attributes:
    -Notes:
    -Example:
    -Raises:
    -
    - - -
    - Example -

    Simple Foo:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    class Foo:
    -    '''
    -    Represents a unit of work.
    -
    -    Attributes:
    -        name (str):
    -            Identifier of the foo instance.
    -
    -        value (int):
    -            Numeric value associated with foo.
    -
    -    Notes:
    -        Guarantees:
    -
    -            - instances are immutable after creation
    -
    -        Lifecycle:
    -
    -            - create instance
    -            - pass to processing engine
    -
    -    Example:
    -        Create and inspect a Foo:
    -
    -            ```python
    -            foo = Foo("example", value=42)
    -            print(foo.name)
    -            ```
    -    '''
    -
    -

    Complex Bar:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    class BarEngine:
    -    '''
    -    Executes Foo objects through Bar stages.
    -
    -    Attributes:
    -        foos (tuple[Foo, ...]):
    -            Foo instances managed by the engine.
    -
    -    Notes:
    -        Guarantees:
    -
    -            - deterministic execution order
    -
    -    Example:
    -        Run engine:
    -
    -            ```python
    -            foo1 = Foo("a")
    -            foo2 = Foo("b")
    -
    -            engine = BarEngine([foo1, foo2])
    -            engine.run()
    -            ```
    -    '''
    -
    -

    -

    Function and method docstrings

    -

    Function docstrings define API contracts.

    -

    Recommended sections:

    -
    1
    -2
    -3
    -4
    -5
    -6
    Args:
    -Returns:
    -Raises:
    -Yields:
    -Notes:
    -Example:
    -
    - - -
    - Example -

    Simple process method:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    -33
    -34
    def process(foo: Foo, multiplier: int) -> int:
    -    '''
    -    Process a Foo instance.
    -
    -    Args:
    -        foo (Foo):
    -            Foo instance to process.
    -
    -        multiplier (int):
    -            Value used to scale foo.
    -
    -    Returns:
    -        int:
    -            Processed result.
    -
    -    Raises:
    -        ValueError:
    -            If multiplier is negative.
    -
    -    Notes:
    -        Guarantees:
    -
    -            - foo is not modified
    -
    -    Example:
    -        Process foo:
    -
    -            ```python
    -            foo = Foo("example", value=10)
    -
    -            result = process(foo, multiplier=2)
    -            print(result)
    -            ```
    -    '''
    -
    -

    Multiple Examples:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    -19
    -20
    -21
    -22
    -23
    -24
    -25
    -26
    -27
    -28
    -29
    -30
    -31
    -32
    def combine(foo_a: Foo, foo_b: Foo) -> Foo:
    -    '''
    -    Combine two Foo instances.
    -
    -    Args:
    -        foo_a (Foo):
    -            First foo.
    -
    -        foo_b (Foo):
    -            Second foo.
    -
    -    Returns:
    -        Foo:
    -            Combined foo.
    -
    -    Example:
    -        Basic usage:
    -
    -            ```python
    -            foo1 = Foo("a")
    -            foo2 = Foo("b")
    -
    -            combined = combine(foo1, foo2)
    -            ```
    -
    -        Pipeline usage:
    -
    -            ```python
    -            engine = BarEngine([foo1, foo2])
    -            engine.run()
    -            ```
    -    '''
    -
    -

    -

    Property docstrings

    -

    Properties must document return values.

    - - -
    - Example -

    Property Doc String:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
    ```python
    -@property
    -def foos(self) -> tuple[Foo, ...]:
    -    '''
    -    Return contained Foo instances.
    -
    -    Returns:
    -        tuple[Foo, ...]:
    -            Stored foo objects.
    -
    -    Example:
    -        ```python
    -        container = FooContainer()
    -
    -        foos = container.foos
    -        ```
    -    '''
    -```
    -
    -

    -

    Attribute documentation

    -

    Document attributes in class docstrings using Attributes:.

    - - -
    - Example -

    Attribute Doc String:

    -
     1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    -10
    -11
    -12
    ```python
    -'''
    -Represents a processing stage.
    -
    -Attributes:
    -    id (str):
    -        Unique identifier.
    -
    -    enabled (bool):
    -        Whether the stage is active.
    -'''
    -```
    -
    -

    -

    Parsing guarantees

    -

    GSDFC ensures doc-forge can deterministically extract:

    -
      -
    • symbol kind (module, class, function, property, attribute)
    • -
    • symbol name
    • -
    • parameters
    • -
    • return values
    • -
    • attributes
    • -
    • examples
    • -
    • structured Notes subsections
    • -
    -

    This enables:

    -
      -
    • reliable MkDocs rendering
    • -
    • deterministic MCP export
    • -
    • accurate AI semantic interpretation
    • -
    -
    - - -
    - Notes -
      -
    • doc-forge never executes analyzed modules.
    • -
    • Documentation is generated entirely through static analysis.
    • -
    -
    - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - GriffeLoader - - -

    -
    GriffeLoader()
    -
    - -
    - - -

    Load Python modules using Griffe and convert them into doc-forge models.

    -

    This loader uses the Griffe introspection engine to analyze Python source -code and transform the extracted information into Project, Module, -and DocObject instances used by doc-forge.

    - -

    Initialize the Griffe-backed loader.

    -

    Creates an internal Griffe loader instance with dedicated collections -for modules and source lines.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - load_module - - -
    -
    load_module(path: str) -> Module
    -
    - -
    - -

    Load and convert a single Python module.

    -

    The module is introspected using Griffe and then transformed into -a doc-forge Module model.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Dotted import path of the module.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Module - Module - -
    -

    A populated Module instance.

    -
    -
    - -
    - -
    - -
    - - -
    - load_project - - -
    -
    1
    -2
    -3
    -4
    -5
    load_project(
    -    module_paths: list[str],
    -    project_name: str | None = None,
    -    skip_import_errors: bool = None,
    -) -> Project
    -
    - -
    - -

    Load multiple modules and assemble them into a Project model.

    -

    Each module path is introspected and converted into a Module -instance. All modules are then aggregated into a single Project -object.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module_paths - List[str] - -
    -

    List of dotted module import paths to load.

    -
    -
    - required -
    project_name - str - -
    -

    Optional override for the project name. Defaults to the top-level -name of the first module.

    -
    -
    - None -
    skip_import_errors - bool - -
    -

    If True, modules that fail to load will be skipped instead of raising an error.

    -
    -
    - None -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Project - Project - -
    -

    A populated Project instance containing the loaded modules.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - ValueError - -
    -

    If no module paths are provided.

    -
    -
    - ImportError - -
    -

    If a module fails to load and skip_import_errors is False.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - MCPRenderer - - -

    - - -
    - - -

    Renderer that generates MCP-compatible documentation resources.

    -

    This renderer converts doc-forge project models into structured JSON -resources suitable for consumption by systems implementing the Model -Context Protocol (MCP).

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_sources - - -
    -
    generate_sources(project: Project, out_dir: Path) -> None
    -
    - -
    - -

    Generate MCP documentation resources for a project.

    -

    The renderer serializes each module into a JSON resource and produces -supporting metadata files such as nav.json and index.json.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Documentation project model to render.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where MCP resources will be written.

    -
    -
    - required -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - MkDocsRenderer - - -

    - - -
    - - -

    Renderer that produces Markdown documentation for MkDocs.

    -

    Generated pages use mkdocstrings directives to reference Python modules, -allowing MkDocs to render API documentation dynamically.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_readme - - -
    -
    1
    -2
    -3
    -4
    -5
    -6
    generate_readme(
    -    project: Project,
    -    docs_dir: Path,
    -    module_is_source: bool | None = None,
    -    readme_dir: Path | None = None,
    -) -> None
    -
    - -
    - -

    Generate a README.md file from the root module docstring.

    -

    Behavior:

    -
      -
    • If module_is_source is True, README.md is written to the project - root directory.
    • -
    • If False, README generation is currently not implemented.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing documentation metadata.

    -
    -
    - required -
    docs_dir - Path - -
    -

    Directory containing generated documentation sources.

    -
    -
    - required -
    module_is_source - Optional[bool] - -
    -

    Whether the module is treated as the project source root.

    -
    -
    - None -
    readme_dir - Optional[Path] - -
    -

    Directory where the generated README.md should be written. -Defaults to the parent of docs_dir.

    -
    -
    - None -
    - -
    - -
    - -
    - - -
    - generate_sources - - -
    -
    1
    -2
    -3
    -4
    -5
    generate_sources(
    -    project: Project,
    -    out_dir: Path,
    -    module_is_source: bool | None = None,
    -) -> None
    -
    - -
    - -

    Generate Markdown documentation files for a project.

    -

    This method renders a documentation structure from the provided -project model and writes the resulting Markdown files to the -specified output directory.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing modules to document.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where generated Markdown files will be written.

    -
    -
    - required -
    module_is_source - bool - -
    -

    If True, treat the specified module as the documentation root -rather than nesting it inside a folder.

    -
    -
    - None -
    - -
    - -
    - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - discover_module_paths - - -

    -
    1
    -2
    -3
    discover_module_paths(
    -    module_name: str, project_root: Path | None = None
    -) -> list[str]
    -
    - -
    - -

    Discover Python modules within a package directory.

    -

    The function scans the filesystem for .py files inside the specified -package and converts them into dotted module import paths.

    -

    Discovery rules:

    -
      -
    • Directories containing __init__.py are treated as packages.
    • -
    • Each .py file is treated as a module.
    • -
    • Results are returned as dotted import paths.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module_name - str - -
    -

    Top-level package name to discover modules from.

    -
    -
    - required -
    project_root - Path - -
    -

    Root directory used to resolve module paths. If not provided, the -current working directory is used.

    -
    -
    - None -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    List[str]: -A sorted list of unique dotted module import paths.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specified package directory does not exist.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/loaders/griffe_loader/index.html b/doc-forge/lib/docforge/loaders/griffe_loader/index.html deleted file mode 100644 index 2ad0059..0000000 --- a/doc-forge/lib/docforge/loaders/griffe_loader/index.html +++ /dev/null @@ -1,1783 +0,0 @@ - - - - - - - - - - - - - - - - - - - Griffe Loader - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Griffe Loader

    - - -
    - - - -

    - docforge.loaders.griffe_loader - - -

    - -
    - -

    Summary

    -

    Utilities for loading and introspecting Python modules using Griffe.

    -

    This module provides the GriffeLoader class and helper utilities used to -discover Python modules, introspect their structure, and convert the results -into doc-forge documentation models.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - GriffeLoader - - -

    -
    GriffeLoader()
    -
    - -
    - - -

    Load Python modules using Griffe and convert them into doc-forge models.

    -

    This loader uses the Griffe introspection engine to analyze Python source -code and transform the extracted information into Project, Module, -and DocObject instances used by doc-forge.

    - -

    Initialize the Griffe-backed loader.

    -

    Creates an internal Griffe loader instance with dedicated collections -for modules and source lines.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - load_module - - -
    -
    load_module(path: str) -> Module
    -
    - -
    - -

    Load and convert a single Python module.

    -

    The module is introspected using Griffe and then transformed into -a doc-forge Module model.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Dotted import path of the module.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Module - Module - -
    -

    A populated Module instance.

    -
    -
    - -
    - -
    - -
    - - -
    - load_project - - -
    -
    1
    -2
    -3
    -4
    -5
    load_project(
    -    module_paths: list[str],
    -    project_name: str | None = None,
    -    skip_import_errors: bool = None,
    -) -> Project
    -
    - -
    - -

    Load multiple modules and assemble them into a Project model.

    -

    Each module path is introspected and converted into a Module -instance. All modules are then aggregated into a single Project -object.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module_paths - List[str] - -
    -

    List of dotted module import paths to load.

    -
    -
    - required -
    project_name - str - -
    -

    Optional override for the project name. Defaults to the top-level -name of the first module.

    -
    -
    - None -
    skip_import_errors - bool - -
    -

    If True, modules that fail to load will be skipped instead of raising an error.

    -
    -
    - None -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Project - Project - -
    -

    A populated Project instance containing the loaded modules.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - ValueError - -
    -

    If no module paths are provided.

    -
    -
    - ImportError - -
    -

    If a module fails to load and skip_import_errors is False.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - discover_module_paths - - -

    -
    1
    -2
    -3
    discover_module_paths(
    -    module_name: str, project_root: Path | None = None
    -) -> list[str]
    -
    - -
    - -

    Discover Python modules within a package directory.

    -

    The function scans the filesystem for .py files inside the specified -package and converts them into dotted module import paths.

    -

    Discovery rules:

    -
      -
    • Directories containing __init__.py are treated as packages.
    • -
    • Each .py file is treated as a module.
    • -
    • Results are returned as dotted import paths.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module_name - str - -
    -

    Top-level package name to discover modules from.

    -
    -
    - required -
    project_root - Path - -
    -

    Root directory used to resolve module paths. If not provided, the -current working directory is used.

    -
    -
    - None -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    List[str]: -A sorted list of unique dotted module import paths.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specified package directory does not exist.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/loaders/index.html b/doc-forge/lib/docforge/loaders/index.html deleted file mode 100644 index d2c5d70..0000000 --- a/doc-forge/lib/docforge/loaders/index.html +++ /dev/null @@ -1,1807 +0,0 @@ - - - - - - - - - - - - - - - - - - - Loaders - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Loaders

    - - -
    - - - -

    - docforge.loaders - - -

    - -
    - -

    Summary

    -

    Loader layer for doc-forge.

    -

    The docforge.loaders package is responsible for discovering Python modules -and extracting documentation data using static analysis.

    -
    -

    Overview

    -

    This layer converts Python source code into an intermediate documentation -model used by doc-forge. It performs module discovery, introspection, and -initial filtering before the data is passed to the core documentation models.

    -

    Core capabilities include:

    -
      -
    • Module discovery – Locate Python modules and packages within a project.
    • -
    • Static introspection – Parse docstrings, signatures, and object - hierarchies using the griffe library without executing the code.
    • -
    • Public API filtering – Exclude private members (names prefixed with - _) to produce clean public documentation structures.
    • -
    -
    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - GriffeLoader - - -

    -
    GriffeLoader()
    -
    - -
    - - -

    Load Python modules using Griffe and convert them into doc-forge models.

    -

    This loader uses the Griffe introspection engine to analyze Python source -code and transform the extracted information into Project, Module, -and DocObject instances used by doc-forge.

    - -

    Initialize the Griffe-backed loader.

    -

    Creates an internal Griffe loader instance with dedicated collections -for modules and source lines.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - load_module - - -
    -
    load_module(path: str) -> Module
    -
    - -
    - -

    Load and convert a single Python module.

    -

    The module is introspected using Griffe and then transformed into -a doc-forge Module model.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Dotted import path of the module.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Module - Module - -
    -

    A populated Module instance.

    -
    -
    - -
    - -
    - -
    - - -
    - load_project - - -
    -
    1
    -2
    -3
    -4
    -5
    load_project(
    -    module_paths: list[str],
    -    project_name: str | None = None,
    -    skip_import_errors: bool = None,
    -) -> Project
    -
    - -
    - -

    Load multiple modules and assemble them into a Project model.

    -

    Each module path is introspected and converted into a Module -instance. All modules are then aggregated into a single Project -object.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module_paths - List[str] - -
    -

    List of dotted module import paths to load.

    -
    -
    - required -
    project_name - str - -
    -

    Optional override for the project name. Defaults to the top-level -name of the first module.

    -
    -
    - None -
    skip_import_errors - bool - -
    -

    If True, modules that fail to load will be skipped instead of raising an error.

    -
    -
    - None -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Project - Project - -
    -

    A populated Project instance containing the loaded modules.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - ValueError - -
    -

    If no module paths are provided.

    -
    -
    - ImportError - -
    -

    If a module fails to load and skip_import_errors is False.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - discover_module_paths - - -

    -
    1
    -2
    -3
    discover_module_paths(
    -    module_name: str, project_root: Path | None = None
    -) -> list[str]
    -
    - -
    - -

    Discover Python modules within a package directory.

    -

    The function scans the filesystem for .py files inside the specified -package and converts them into dotted module import paths.

    -

    Discovery rules:

    -
      -
    • Directories containing __init__.py are treated as packages.
    • -
    • Each .py file is treated as a module.
    • -
    • Results are returned as dotted import paths.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module_name - str - -
    -

    Top-level package name to discover modules from.

    -
    -
    - required -
    project_root - Path - -
    -

    Root directory used to resolve module paths. If not provided, the -current working directory is used.

    -
    -
    - None -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    List[str]: -A sorted list of unique dotted module import paths.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specified package directory does not exist.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/models/index.html b/doc-forge/lib/docforge/models/index.html deleted file mode 100644 index f18f1a9..0000000 --- a/doc-forge/lib/docforge/models/index.html +++ /dev/null @@ -1,2597 +0,0 @@ - - - - - - - - - - - - - - - - - - - Models - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Models

    - - -
    - - - -

    - docforge.models - - -

    - -
    - -

    Summary

    -

    Model layer for doc-forge.

    -

    The docforge.models package defines the core data structures used to -represent Python source code as a structured documentation model.

    -
    -

    Overview

    -

    The model layer forms the central intermediate representation used throughout -doc-forge. Python modules and objects discovered during introspection are -converted into a hierarchy of documentation models that can later be rendered -into different documentation formats.

    -

    Key components:

    -
      -
    • Project – Root container representing an entire documented codebase.
    • -
    • Module – Representation of a Python module or package containing - documented members.
    • -
    • DocObject – Recursive structure representing Python objects such as - classes, functions, methods, and attributes.
    • -
    -

    These models are intentionally renderer-agnostic, allowing the same -documentation structure to be transformed into multiple output formats -(e.g., MkDocs, MCP, or other renderers).

    -
    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - DocObject - - -

    -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    DocObject(
    -    name: str,
    -    kind: str,
    -    path: str,
    -    signature: str | None = None,
    -    docstring: str | None = None,
    -)
    -
    - -
    - - -

    Representation of a documented Python object.

    -

    A DocObject models a single Python entity discovered during -introspection. Objects may contain nested members, allowing the structure -of modules, classes, and other containers to be represented recursively.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - str - -
    -

    Local name of the object.

    -
    -
    kind - str - -
    -

    Type of object (for example class, function, method, or attribute).

    -
    -
    path - str - -
    -

    Fully qualified dotted path to the object.

    -
    -
    signature - Optional[str] - -
    -

    Callable signature if the object represents a callable.

    -
    -
    docstring - Optional[str] - -
    -

    Raw docstring text extracted from the source code.

    -
    -
    members - Dict[str, DocObject] - -
    -

    Mapping of member names to child DocObject instances.

    -
    -
    - -

    Initialize a DocObject instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Local name of the object.

    -
    -
    - required -
    kind - str - -
    -

    Object type identifier (for example class or function).

    -
    -
    - required -
    path - str - -
    -

    Fully qualified dotted path of the object.

    -
    -
    - required -
    signature - Optional[str] - -
    -

    Callable signature if applicable.

    -
    -
    - None -
    docstring - Optional[str] - -
    -

    Documentation string associated with the object.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - add_member - - -
    -
    add_member(obj: DocObject) -> None
    -
    - -
    - -

    Add a child documentation object.

    -

    This is typically used when attaching methods to classes or -nested objects to their parent containers.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    obj - DocObject - -
    -

    Documentation object to add as a member.

    -
    -
    - required -
    - -
    - -
    - -
    - - -
    - get_all_members - - -
    -
    get_all_members() -> Iterable[DocObject]
    -
    - -
    - -

    Return all child members of the object.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[DocObject] - -
    -

    Iterable[DocObject]: -An iterable of DocObject instances representing nested members.

    -
    -
    - -
    - -
    - -
    - - -
    - get_member - - -
    -
    get_member(name: str) -> DocObject
    -
    - -
    - -

    Retrieve a member object by name.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Name of the member to retrieve.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    DocObject - DocObject - -
    -

    The corresponding DocObject instance.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - KeyError - -
    -

    If the member does not exist.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - Module - - -

    -
    Module(path: str, docstring: str | None = None)
    -
    - -
    - - -

    Representation of a documented Python module or package.

    -

    A Module stores metadata about the module itself and maintains a -collection of top-level documentation objects discovered during -introspection.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    path - str - -
    -

    Dotted import path of the module.

    -
    -
    docstring - Optional[str] - -
    -

    Module-level documentation string, if present.

    -
    -
    members - Dict[str, DocObject] - -
    -

    Mapping of object names to their corresponding DocObject representations.

    -
    -
    - -

    Initialize a Module instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Dotted import path identifying the module.

    -
    -
    - required -
    docstring - Optional[str] - -
    -

    Module-level documentation text, if available.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - add_object - - -
    -
    add_object(obj: DocObject) -> None
    -
    - -
    - -

    Add a documented object to the module.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    obj - DocObject - -
    -

    Documentation object to register as a top-level member of the module.

    -
    -
    - required -
    - -
    - -
    - -
    - - -
    - get_all_objects - - -
    -
    get_all_objects() -> Iterable[DocObject]
    -
    - -
    - -

    Return all top-level documentation objects in the module.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[DocObject] - -
    -

    Iterable[DocObject]: -An iterable of DocObject instances representing the module's public members.

    -
    -
    - -
    - -
    - -
    - - -
    - get_object - - -
    -
    get_object(name: str) -> DocObject
    -
    - -
    - -

    Retrieve a documented object by name.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Name of the object to retrieve.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    DocObject - DocObject - -
    -

    The corresponding DocObject instance.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - KeyError - -
    -

    If no object with the given name exists.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - Project - - -

    -
    Project(name: str)
    -
    - -
    - - -

    Representation of a documentation project.

    -

    A Project serves as the root container for all modules discovered during -introspection. Each module is stored by its dotted import path.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - str - -
    -

    Name of the project.

    -
    -
    modules - Dict[str, Module] - -
    -

    Mapping of module paths to Module instances.

    -
    -
    - -

    Initialize a Project instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Name used to identify the documentation project.

    -
    -
    - required -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - add_module - - -
    -
    add_module(module: Module) -> None
    -
    - -
    - -

    Register a module in the project.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module - Module - -
    -

    Module instance to add to the project.

    -
    -
    - required -
    - -
    - -
    - -
    - - -
    - get_all_modules - - -
    -
    get_all_modules() -> Iterable[Module]
    -
    - -
    - -

    Return all modules contained in the project.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[Module] - -
    -

    Iterable[Module]: -An iterable of Module instances.

    -
    -
    - -
    - -
    - -
    - - -
    - get_module - - -
    -
    get_module(path: str) -> Module
    -
    - -
    - -

    Retrieve a module by its dotted path.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Fully qualified dotted module path (for example pkg.module).

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Module - Module - -
    -

    The corresponding Module instance.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - KeyError - -
    -

    If the module does not exist in the project.

    -
    -
    - -
    - -
    - -
    - - -
    - get_module_list - - -
    -
    get_module_list() -> list[str]
    -
    - -
    - -

    Return the list of module import paths.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    list[str]: -A list containing the dotted paths of all modules in the project.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/models/module/index.html b/doc-forge/lib/docforge/models/module/index.html deleted file mode 100644 index 334e7ad..0000000 --- a/doc-forge/lib/docforge/models/module/index.html +++ /dev/null @@ -1,1703 +0,0 @@ - - - - - - - - - - - - - - - - - - - Module - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Module

    - - -
    - - - -

    - docforge.models.module - - -

    - -
    - -

    Summary

    -

    Documentation model representing a Python module or package.

    -

    This module defines the Module class used in the doc-forge documentation -model. A Module acts as a container for top-level documented objects -(classes, functions, variables, and other members) discovered during -introspection.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - Module - - -

    -
    Module(path: str, docstring: str | None = None)
    -
    - -
    - - -

    Representation of a documented Python module or package.

    -

    A Module stores metadata about the module itself and maintains a -collection of top-level documentation objects discovered during -introspection.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    path - str - -
    -

    Dotted import path of the module.

    -
    -
    docstring - Optional[str] - -
    -

    Module-level documentation string, if present.

    -
    -
    members - Dict[str, DocObject] - -
    -

    Mapping of object names to their corresponding DocObject representations.

    -
    -
    - -

    Initialize a Module instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Dotted import path identifying the module.

    -
    -
    - required -
    docstring - Optional[str] - -
    -

    Module-level documentation text, if available.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - add_object - - -
    -
    add_object(obj: DocObject) -> None
    -
    - -
    - -

    Add a documented object to the module.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    obj - DocObject - -
    -

    Documentation object to register as a top-level member of the module.

    -
    -
    - required -
    - -
    - -
    - -
    - - -
    - get_all_objects - - -
    -
    get_all_objects() -> Iterable[DocObject]
    -
    - -
    - -

    Return all top-level documentation objects in the module.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[DocObject] - -
    -

    Iterable[DocObject]: -An iterable of DocObject instances representing the module's public members.

    -
    -
    - -
    - -
    - -
    - - -
    - get_object - - -
    -
    get_object(name: str) -> DocObject
    -
    - -
    - -

    Retrieve a documented object by name.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Name of the object to retrieve.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    DocObject - DocObject - -
    -

    The corresponding DocObject instance.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - KeyError - -
    -

    If no object with the given name exists.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/models/object/index.html b/doc-forge/lib/docforge/models/object/index.html deleted file mode 100644 index e1a51ae..0000000 --- a/doc-forge/lib/docforge/models/object/index.html +++ /dev/null @@ -1,1792 +0,0 @@ - - - - - - - - - - - - - - - - - - - Object - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Object

    - - -
    - - - -

    - docforge.models.object - - -

    - -
    - -

    Summary

    -

    Documentation model representing individual Python objects.

    -

    This module defines the DocObject class, the fundamental recursive unit of -the doc-forge documentation model. Each DocObject represents a Python -entity such as a class, function, method, or attribute, and may contain nested -members that form a hierarchical documentation structure.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - DocObject - - -

    -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    DocObject(
    -    name: str,
    -    kind: str,
    -    path: str,
    -    signature: str | None = None,
    -    docstring: str | None = None,
    -)
    -
    - -
    - - -

    Representation of a documented Python object.

    -

    A DocObject models a single Python entity discovered during -introspection. Objects may contain nested members, allowing the structure -of modules, classes, and other containers to be represented recursively.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - str - -
    -

    Local name of the object.

    -
    -
    kind - str - -
    -

    Type of object (for example class, function, method, or attribute).

    -
    -
    path - str - -
    -

    Fully qualified dotted path to the object.

    -
    -
    signature - Optional[str] - -
    -

    Callable signature if the object represents a callable.

    -
    -
    docstring - Optional[str] - -
    -

    Raw docstring text extracted from the source code.

    -
    -
    members - Dict[str, DocObject] - -
    -

    Mapping of member names to child DocObject instances.

    -
    -
    - -

    Initialize a DocObject instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Local name of the object.

    -
    -
    - required -
    kind - str - -
    -

    Object type identifier (for example class or function).

    -
    -
    - required -
    path - str - -
    -

    Fully qualified dotted path of the object.

    -
    -
    - required -
    signature - Optional[str] - -
    -

    Callable signature if applicable.

    -
    -
    - None -
    docstring - Optional[str] - -
    -

    Documentation string associated with the object.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - add_member - - -
    -
    add_member(obj: DocObject) -> None
    -
    - -
    - -

    Add a child documentation object.

    -

    This is typically used when attaching methods to classes or -nested objects to their parent containers.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    obj - DocObject - -
    -

    Documentation object to add as a member.

    -
    -
    - required -
    - -
    - -
    - -
    - - -
    - get_all_members - - -
    -
    get_all_members() -> Iterable[DocObject]
    -
    - -
    - -

    Return all child members of the object.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[DocObject] - -
    -

    Iterable[DocObject]: -An iterable of DocObject instances representing nested members.

    -
    -
    - -
    - -
    - -
    - - -
    - get_member - - -
    -
    get_member(name: str) -> DocObject
    -
    - -
    - -

    Retrieve a member object by name.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Name of the member to retrieve.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    DocObject - DocObject - -
    -

    The corresponding DocObject instance.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - KeyError - -
    -

    If the member does not exist.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/models/project/index.html b/doc-forge/lib/docforge/models/project/index.html deleted file mode 100644 index d4a56f0..0000000 --- a/doc-forge/lib/docforge/models/project/index.html +++ /dev/null @@ -1,1728 +0,0 @@ - - - - - - - - - - - - - - - - - - - Project - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Project

    - - -
    - - - -

    - docforge.models.project - - -

    - -
    - -

    Summary

    -

    Documentation model representing a project.

    -

    This module defines the Project class, the top-level container used by -doc-forge to represent a documented codebase. A Project aggregates multiple -modules and provides access to them through a unified interface.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - Project - - -

    -
    Project(name: str)
    -
    - -
    - - -

    Representation of a documentation project.

    -

    A Project serves as the root container for all modules discovered during -introspection. Each module is stored by its dotted import path.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    name - str - -
    -

    Name of the project.

    -
    -
    modules - Dict[str, Module] - -
    -

    Mapping of module paths to Module instances.

    -
    -
    - -

    Initialize a Project instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    name - str - -
    -

    Name used to identify the documentation project.

    -
    -
    - required -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - add_module - - -
    -
    add_module(module: Module) -> None
    -
    - -
    - -

    Register a module in the project.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    module - Module - -
    -

    Module instance to add to the project.

    -
    -
    - required -
    - -
    - -
    - -
    - - -
    - get_all_modules - - -
    -
    get_all_modules() -> Iterable[Module]
    -
    - -
    - -

    Return all modules contained in the project.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[Module] - -
    -

    Iterable[Module]: -An iterable of Module instances.

    -
    -
    - -
    - -
    - -
    - - -
    - get_module - - -
    -
    get_module(path: str) -> Module
    -
    - -
    - -

    Retrieve a module by its dotted path.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - str - -
    -

    Fully qualified dotted module path (for example pkg.module).

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    Name TypeDescription
    Module - Module - -
    -

    The corresponding Module instance.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - KeyError - -
    -

    If the module does not exist in the project.

    -
    -
    - -
    - -
    - -
    - - -
    - get_module_list - - -
    -
    get_module_list() -> list[str]
    -
    - -
    - -

    Return the list of module import paths.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    list[str]: -A list containing the dotted paths of all modules in the project.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/nav/index.html b/doc-forge/lib/docforge/nav/index.html deleted file mode 100644 index b139caf..0000000 --- a/doc-forge/lib/docforge/nav/index.html +++ /dev/null @@ -1,2499 +0,0 @@ - - - - - - - - - - - - - - - - - - - Nav - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Nav

    - - -
    - - - -

    - docforge.nav - - -

    - -
    - -

    Navigation layer for doc-forge.

    -

    The docforge.nav package manages the relationship between the logical -documentation structure defined by the user and the physical documentation -files generated on disk.

    -
    -

    Workflow

    -
      -
    1. Specification – Users define navigation intent in docforge.nav.yml.
    2. -
    3. Resolution – resolve_nav expands patterns and matches them against - generated Markdown files.
    4. -
    5. Emission – MkDocsNavEmitter converts the resolved structure into - the YAML navigation format required by mkdocs.yml.
    6. -
    -

    This layer separates documentation organization from the underlying source -code layout, enabling flexible grouping, ordering, and navigation structures -independent of module hierarchy.

    -
    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - MkDocsNavEmitter - - -

    - - -
    - - -

    Emit MkDocs navigation structures from resolved navigation data.

    -

    The emitter transforms a ResolvedNav object into the YAML-compatible -list structure expected by the MkDocs nav configuration field.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - emit - - -
    -
    emit(nav: ResolvedNav) -> list[dict[str, Any]]
    -
    - -
    - -

    Generate a navigation structure for mkdocs.yml.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    nav - ResolvedNav - -
    -

    Resolved navigation data describing documentation groups -and their associated Markdown files.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - - - - - - - - - -
    TypeDescription
    - list[dict[str, Any]] - -
    -

    A list of dictionaries representing the MkDocs navigation layout.

    -
    -
    - list[dict[str, Any]] - -
    -

    Each dictionary maps a navigation label to a page or a list of

    -
    -
    - list[dict[str, Any]] - -
    -

    pages.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - NavSpec - - -

    -
    1
    -2
    -3
    -4
    -5
    NavSpec(
    -    home: str | None,
    -    groups: dict[str, list[str]],
    -    icon: dict[str, str] | None = None,
    -)
    -
    - -
    - - -

    Parsed representation of a navigation specification.

    -

    A NavSpec describes the intended documentation navigation layout before -it is resolved against the filesystem.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    home - str | None - -
    -

    Relative path to the documentation home page (for example -index.md).

    -
    -
    groups - dict[str, list[str]] - -
    -

    Mapping of navigation group titles to lists of file patterns -or glob expressions.

    -
    -
    icon - -
    -

    Optional mapping of theme icon entries (for example -{"logo": "material/code-tags"}) injected into the MkDocs -theme as theme.icon.

    -
    -
    - -

    Initialize a NavSpec instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    home - str | None - -
    -

    Relative path to the home document.

    -
    -
    - required -
    groups - dict[str, list[str]] - -
    -

    Mapping of group names to lists of path patterns -(glob expressions).

    -
    -
    - required -
    icon - dict[str, str] | None - -
    -

    Optional mapping of theme icon entries applied to the -generated MkDocs configuration.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - all_patterns - - -
    -
    all_patterns() -> list[str]
    -
    - -
    - -

    Return all path patterns referenced by the specification.

    - - -

    Returns:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    A list containing the home document (if defined) and all

    -
    -
    - list[str] - -
    -

    group pattern entries.

    -
    -
    - -
    - -
    - -
    - - -
    - load - - - - classmethod - - -
    -
    load(path: Path) -> NavSpec
    -
    - -
    - -

    Load a navigation specification from a YAML file.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - Path - -
    -

    Filesystem path to the navigation specification file.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - NavSpec - -
    -

    A NavSpec instance representing the parsed configuration.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specified file does not exist.

    -
    -
    - ValueError - -
    -

    If the file contents are not a valid navigation -specification.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - ResolvedNav - - -

    -
    1
    -2
    -3
    -4
    -5
    ResolvedNav(
    -    home: str | None,
    -    groups: dict[str, list[Path]],
    -    docs_root: Path | None = None,
    -)
    -
    - -
    - - -

    Resolved navigation structure.

    -

    A ResolvedNav represents navigation data after glob patterns have been -expanded and paths validated against the filesystem.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    home - str | None - -
    -

    Relative path to the documentation home page.

    -
    -
    groups - dict[str, list[Path]] - -
    -

    Mapping of navigation group titles to lists of resolved -documentation file paths.

    -
    -
    - -

    Initialize a ResolvedNav instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    home - str | None - -
    -

    Relative path to the home page within the documentation root.

    -
    -
    - required -
    groups - dict[str, list[Path]] - -
    -

    Mapping of group titles to resolved documentation file paths.

    -
    -
    - required -
    docs_root - Path | None - -
    -

    Root directory of the documentation source files.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - all_files - - -
    -
    all_files() -> Iterable[Path]
    -
    - -
    - -

    Iterate over all files referenced by the navigation structure.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[Path] - -
    -

    An iterable of Path objects representing documentation files.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - RuntimeError - -
    -

    If the home page is defined but the documentation -root is not available for resolution.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - build_wiki_nav - - -

    -
    build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]
    -
    - -
    - -

    Derive an MkDocs navigation block from a wiki directory.

    -

    Returned paths are relative to the parent of wiki_dir and carry the -wiki directory name as their leading component (for example -wiki/01_overview.md when the wiki lives at docs/wiki). This makes -the result directly usable in an MkDocs nav block with

    -
      -
    • index.md at the wiki root becomes the Home entry.
    • -
    • Page labels are derived from filenames: numeric order prefixes such as - 01_ or 02- are stripped, separators are replaced with spaces, and - names are title-cased (01_overview.md becomes Overview).
    • -
    • Subdirectories become nested navigation groups. A nested index.md is - rendered as the section root placed first inside the group.
    • -
    • Only .md files are considered; hidden entries are ignored.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    wiki_dir - Path - -
    -

    Path to the hand-written wiki directory, for example docs/wiki.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - list[dict[str, Any]] - -
    -

    List[Dict[str, Any]]: -Navigation entries compatible with the MkDocs nav configuration. -The list is empty if the wiki contains no Markdown files.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the wiki directory does not exist.

    -
    -
    - -
    - -
    - -
    - - -

    - load_nav_spec - - -

    -
    load_nav_spec(path: Path) -> NavSpec
    -
    - -
    - -

    Load a navigation specification file.

    -

    This helper function reads a YAML navigation file and constructs a -corresponding NavSpec instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - Path - -
    -

    Path to the navigation specification file.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - NavSpec - -
    -

    A NavSpec instance representing the parsed specification.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specification file does not exist.

    -
    -
    - ValueError - -
    -

    If the YAML structure is invalid.

    -
    -
    - -
    - -
    - -
    - - -

    - resolve_nav - - -

    -
    resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav
    -
    - -
    - -

    Resolve a navigation specification against the filesystem.

    -

    The function expands glob patterns defined in a NavSpec and verifies -that referenced documentation files exist within the documentation root.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    spec - NavSpec - -
    -

    Navigation specification describing documentation layout.

    -
    -
    - required -
    docs_root - Path - -
    -

    Root directory containing documentation Markdown files.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - ResolvedNav - -
    -

    A ResolvedNav instance containing validated navigation paths.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the documentation root does not exist or a -navigation pattern does not match any files.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/nav/mkdocs/index.html b/doc-forge/lib/docforge/nav/mkdocs/index.html deleted file mode 100644 index 7a1e961..0000000 --- a/doc-forge/lib/docforge/nav/mkdocs/index.html +++ /dev/null @@ -1,1487 +0,0 @@ - - - - - - - - - - - - - - - - - - - Mkdocs - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Mkdocs

    - - -
    - - - -

    - docforge.nav.mkdocs - - -

    - -
    - -

    MkDocs navigation emitter.

    -

    This module provides the MkDocsNavEmitter class, which converts a -ResolvedNav instance into the navigation structure required by the -MkDocs nav configuration.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - MkDocsNavEmitter - - -

    - - -
    - - -

    Emit MkDocs navigation structures from resolved navigation data.

    -

    The emitter transforms a ResolvedNav object into the YAML-compatible -list structure expected by the MkDocs nav configuration field.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - emit - - -
    -
    emit(nav: ResolvedNav) -> list[dict[str, Any]]
    -
    - -
    - -

    Generate a navigation structure for mkdocs.yml.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    nav - ResolvedNav - -
    -

    Resolved navigation data describing documentation groups -and their associated Markdown files.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - - - - - - - - - -
    TypeDescription
    - list[dict[str, Any]] - -
    -

    A list of dictionaries representing the MkDocs navigation layout.

    -
    -
    - list[dict[str, Any]] - -
    -

    Each dictionary maps a navigation label to a page or a list of

    -
    -
    - list[dict[str, Any]] - -
    -

    pages.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/nav/resolver/index.html b/doc-forge/lib/docforge/nav/resolver/index.html deleted file mode 100644 index 160809f..0000000 --- a/doc-forge/lib/docforge/nav/resolver/index.html +++ /dev/null @@ -1,1700 +0,0 @@ - - - - - - - - - - - - - - - - - - - Resolver - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Resolver

    - - -
    - - - -

    - docforge.nav.resolver - - -

    - -
    - -

    Navigation resolution utilities.

    -

    This module resolves a NavSpec against the filesystem by expanding glob -patterns and validating that referenced documentation files exist.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - ResolvedNav - - -

    -
    1
    -2
    -3
    -4
    -5
    ResolvedNav(
    -    home: str | None,
    -    groups: dict[str, list[Path]],
    -    docs_root: Path | None = None,
    -)
    -
    - -
    - - -

    Resolved navigation structure.

    -

    A ResolvedNav represents navigation data after glob patterns have been -expanded and paths validated against the filesystem.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    home - str | None - -
    -

    Relative path to the documentation home page.

    -
    -
    groups - dict[str, list[Path]] - -
    -

    Mapping of navigation group titles to lists of resolved -documentation file paths.

    -
    -
    - -

    Initialize a ResolvedNav instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    home - str | None - -
    -

    Relative path to the home page within the documentation root.

    -
    -
    - required -
    groups - dict[str, list[Path]] - -
    -

    Mapping of group titles to resolved documentation file paths.

    -
    -
    - required -
    docs_root - Path | None - -
    -

    Root directory of the documentation source files.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - all_files - - -
    -
    all_files() -> Iterable[Path]
    -
    - -
    - -

    Iterate over all files referenced by the navigation structure.

    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - Iterable[Path] - -
    -

    An iterable of Path objects representing documentation files.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - RuntimeError - -
    -

    If the home page is defined but the documentation -root is not available for resolution.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - resolve_nav - - -

    -
    resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav
    -
    - -
    - -

    Resolve a navigation specification against the filesystem.

    -

    The function expands glob patterns defined in a NavSpec and verifies -that referenced documentation files exist within the documentation root.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    spec - NavSpec - -
    -

    Navigation specification describing documentation layout.

    -
    -
    - required -
    docs_root - Path - -
    -

    Root directory containing documentation Markdown files.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - ResolvedNav - -
    -

    A ResolvedNav instance containing validated navigation paths.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the documentation root does not exist or a -navigation pattern does not match any files.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/nav/spec/index.html b/doc-forge/lib/docforge/nav/spec/index.html deleted file mode 100644 index b32db3f..0000000 --- a/doc-forge/lib/docforge/nav/spec/index.html +++ /dev/null @@ -1,1815 +0,0 @@ - - - - - - - - - - - - - - - - - - - Spec - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Spec

    - - -
    - - - -

    - docforge.nav.spec - - -

    - -
    - -

    Navigation specification model.

    -

    This module defines the NavSpec class, which represents the navigation -structure defined by the user in the doc-forge navigation specification -(typically docforge.nav.yml).

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - NavSpec - - -

    -
    1
    -2
    -3
    -4
    -5
    NavSpec(
    -    home: str | None,
    -    groups: dict[str, list[str]],
    -    icon: dict[str, str] | None = None,
    -)
    -
    - -
    - - -

    Parsed representation of a navigation specification.

    -

    A NavSpec describes the intended documentation navigation layout before -it is resolved against the filesystem.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    home - str | None - -
    -

    Relative path to the documentation home page (for example -index.md).

    -
    -
    groups - dict[str, list[str]] - -
    -

    Mapping of navigation group titles to lists of file patterns -or glob expressions.

    -
    -
    icon - -
    -

    Optional mapping of theme icon entries (for example -{"logo": "material/code-tags"}) injected into the MkDocs -theme as theme.icon.

    -
    -
    - -

    Initialize a NavSpec instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    home - str | None - -
    -

    Relative path to the home document.

    -
    -
    - required -
    groups - dict[str, list[str]] - -
    -

    Mapping of group names to lists of path patterns -(glob expressions).

    -
    -
    - required -
    icon - dict[str, str] | None - -
    -

    Optional mapping of theme icon entries applied to the -generated MkDocs configuration.

    -
    -
    - None -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - all_patterns - - -
    -
    all_patterns() -> list[str]
    -
    - -
    - -

    Return all path patterns referenced by the specification.

    - - -

    Returns:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - list[str] - -
    -

    A list containing the home document (if defined) and all

    -
    -
    - list[str] - -
    -

    group pattern entries.

    -
    -
    - -
    - -
    - -
    - - -
    - load - - - - classmethod - - -
    -
    load(path: Path) -> NavSpec
    -
    - -
    - -

    Load a navigation specification from a YAML file.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - Path - -
    -

    Filesystem path to the navigation specification file.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - NavSpec - -
    -

    A NavSpec instance representing the parsed configuration.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specified file does not exist.

    -
    -
    - ValueError - -
    -

    If the file contents are not a valid navigation -specification.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    -

    Functions

    - -
    - - -

    - load_nav_spec - - -

    -
    load_nav_spec(path: Path) -> NavSpec
    -
    - -
    - -

    Load a navigation specification file.

    -

    This helper function reads a YAML navigation file and constructs a -corresponding NavSpec instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    path - Path - -
    -

    Path to the navigation specification file.

    -
    -
    - required -
    - - -

    Returns:

    - - - - - - - - - - - - - -
    TypeDescription
    - NavSpec - -
    -

    A NavSpec instance representing the parsed specification.

    -
    -
    - - -

    Raises:

    - - - - - - - - - - - - - - - - - -
    TypeDescription
    - FileNotFoundError - -
    -

    If the specification file does not exist.

    -
    -
    - ValueError - -
    -

    If the YAML structure is invalid.

    -
    -
    - -
    - -
    - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/renderers/base/index.html b/doc-forge/lib/docforge/renderers/base/index.html deleted file mode 100644 index 45aea6a..0000000 --- a/doc-forge/lib/docforge/renderers/base/index.html +++ /dev/null @@ -1,1614 +0,0 @@ - - - - - - - - - - - - - - - - - - - Base - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Base

    - - -
    - - - -

    - docforge.renderers.base - - -

    - -
    - -

    Summary

    -

    Renderer base interfaces and configuration models.

    -

    This module defines the base protocol and configuration container used by -doc-forge renderers. Concrete renderer implementations should implement the -DocRenderer protocol.

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - DocRenderer - - -

    - - -
    -

    - Bases: Protocol

    - - -

    Protocol defining the interface for documentation renderers.

    -

    Implementations of this protocol are responsible for transforming a -Project model into renderer-specific documentation sources.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_sources - - -
    -
    generate_sources(project: Project, out_dir: Path) -> None
    -
    - -
    - -

    Generate renderer-specific documentation sources.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing modules and documentation objects.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where generated documentation sources should be written.

    -
    -
    - required -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - RendererConfig - - -

    -
    RendererConfig(out_dir: Path, project: Project)
    -
    - -
    - - -

    Configuration container for documentation renderers.

    -

    A RendererConfig instance groups together the project model and the -output directory used during rendering.

    - - -

    Attributes:

    - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescription
    out_dir - Path - -
    -

    Directory where generated documentation files will be written.

    -
    -
    project - Project - -
    -

    Documentation project model to be rendered.

    -
    -
    - -

    Initialize a RendererConfig instance.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    out_dir - Path - -
    -

    Target directory where documentation files should be written.

    -
    -
    - required -
    project - Project - -
    -

    Introspected project model to render.

    -
    -
    - required -
    - - - - -
    - - - - - - - -
    Functions
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/renderers/index.html b/doc-forge/lib/docforge/renderers/index.html deleted file mode 100644 index b855575..0000000 --- a/doc-forge/lib/docforge/renderers/index.html +++ /dev/null @@ -1,1790 +0,0 @@ - - - - - - - - - - - - - - - - - - - Renderers - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Renderers

    - - -
    - - - -

    - docforge.renderers - - -

    - -
    - -

    Summary

    -

    Renderers layer for doc-forge.

    -

    The docforge.renderers package transforms the internal documentation -models into files formatted for specific documentation systems.

    -
    -

    Overview

    -

    Renderers consume the doc-forge project model and generate output suitable -for documentation tools or machine interfaces.

    -

    Current implementations:

    -
      -
    • MkDocsRenderer – Produces Markdown files compatible with MkDocs and - the mkdocstrings plugin. It automatically handles package hierarchy - and generates index.md files for packages.
    • -
    • MCPRenderer – Emits structured JSON resources designed for consumption - by Model Context Protocol (MCP) clients.
    • -
    -
    -

    Extending

    -

    New renderers can be added by implementing the DocRenderer protocol -defined in docforge.renderers.base.

    -
    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - MCPRenderer - - -

    - - -
    - - -

    Renderer that generates MCP-compatible documentation resources.

    -

    This renderer converts doc-forge project models into structured JSON -resources suitable for consumption by systems implementing the Model -Context Protocol (MCP).

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_sources - - -
    -
    generate_sources(project: Project, out_dir: Path) -> None
    -
    - -
    - -

    Generate MCP documentation resources for a project.

    -

    The renderer serializes each module into a JSON resource and produces -supporting metadata files such as nav.json and index.json.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Documentation project model to render.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where MCP resources will be written.

    -
    -
    - required -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - - - -

    - MkDocsRenderer - - -

    - - -
    - - -

    Renderer that produces Markdown documentation for MkDocs.

    -

    Generated pages use mkdocstrings directives to reference Python modules, -allowing MkDocs to render API documentation dynamically.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_readme - - -
    -
    1
    -2
    -3
    -4
    -5
    -6
    generate_readme(
    -    project: Project,
    -    docs_dir: Path,
    -    module_is_source: bool | None = None,
    -    readme_dir: Path | None = None,
    -) -> None
    -
    - -
    - -

    Generate a README.md file from the root module docstring.

    -

    Behavior:

    -
      -
    • If module_is_source is True, README.md is written to the project - root directory.
    • -
    • If False, README generation is currently not implemented.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing documentation metadata.

    -
    -
    - required -
    docs_dir - Path - -
    -

    Directory containing generated documentation sources.

    -
    -
    - required -
    module_is_source - Optional[bool] - -
    -

    Whether the module is treated as the project source root.

    -
    -
    - None -
    readme_dir - Optional[Path] - -
    -

    Directory where the generated README.md should be written. -Defaults to the parent of docs_dir.

    -
    -
    - None -
    - -
    - -
    - -
    - - -
    - generate_sources - - -
    -
    1
    -2
    -3
    -4
    -5
    generate_sources(
    -    project: Project,
    -    out_dir: Path,
    -    module_is_source: bool | None = None,
    -) -> None
    -
    - -
    - -

    Generate Markdown documentation files for a project.

    -

    This method renders a documentation structure from the provided -project model and writes the resulting Markdown files to the -specified output directory.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing modules to document.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where generated Markdown files will be written.

    -
    -
    - required -
    module_is_source - bool - -
    -

    If True, treat the specified module as the documentation root -rather than nesting it inside a folder.

    -
    -
    - None -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/renderers/mcp_renderer/index.html b/doc-forge/lib/docforge/renderers/mcp_renderer/index.html deleted file mode 100644 index 0365f55..0000000 --- a/doc-forge/lib/docforge/renderers/mcp_renderer/index.html +++ /dev/null @@ -1,1469 +0,0 @@ - - - - - - - - - - - - - - - - - - - Mcp Renderer - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Mcp Renderer

    - - -
    - - - -

    - docforge.renderers.mcp_renderer - - -

    - -
    - -

    Summary

    -

    MCP renderer implementation.

    -

    This module defines the MCPRenderer class, which generates documentation -resources compatible with the Model Context Protocol (MCP).

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - MCPRenderer - - -

    - - -
    - - -

    Renderer that generates MCP-compatible documentation resources.

    -

    This renderer converts doc-forge project models into structured JSON -resources suitable for consumption by systems implementing the Model -Context Protocol (MCP).

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_sources - - -
    -
    generate_sources(project: Project, out_dir: Path) -> None
    -
    - -
    - -

    Generate MCP documentation resources for a project.

    -

    The renderer serializes each module into a JSON resource and produces -supporting metadata files such as nav.json and index.json.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Documentation project model to render.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where MCP resources will be written.

    -
    -
    - required -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/renderers/mkdocs_renderer/index.html b/doc-forge/lib/docforge/renderers/mkdocs_renderer/index.html deleted file mode 100644 index 44546fd..0000000 --- a/doc-forge/lib/docforge/renderers/mkdocs_renderer/index.html +++ /dev/null @@ -1,1616 +0,0 @@ - - - - - - - - - - - - - - - - - - - Mkdocs Renderer - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Mkdocs Renderer

    - - -
    - - - -

    - docforge.renderers.mkdocs_renderer - - -

    - -
    - -

    Summary

    -

    MkDocs renderer implementation.

    -

    This module defines the MkDocsRenderer class, which generates Markdown -documentation sources compatible with MkDocs Material and the mkdocstrings -plugin.

    -

    The renderer ensures a consistent documentation structure by:

    -
      -
    • Creating a root index.md if one does not exist
    • -
    • Generating package index pages automatically
    • -
    • Linking child modules within parent package pages
    • -
    • Optionally generating README.md from the root package docstring
    • -
    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - MkDocsRenderer - - -

    - - -
    - - -

    Renderer that produces Markdown documentation for MkDocs.

    -

    Generated pages use mkdocstrings directives to reference Python modules, -allowing MkDocs to render API documentation dynamically.

    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - generate_readme - - -
    -
    1
    -2
    -3
    -4
    -5
    -6
    generate_readme(
    -    project: Project,
    -    docs_dir: Path,
    -    module_is_source: bool | None = None,
    -    readme_dir: Path | None = None,
    -) -> None
    -
    - -
    - -

    Generate a README.md file from the root module docstring.

    -

    Behavior:

    -
      -
    • If module_is_source is True, README.md is written to the project - root directory.
    • -
    • If False, README generation is currently not implemented.
    • -
    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing documentation metadata.

    -
    -
    - required -
    docs_dir - Path - -
    -

    Directory containing generated documentation sources.

    -
    -
    - required -
    module_is_source - Optional[bool] - -
    -

    Whether the module is treated as the project source root.

    -
    -
    - None -
    readme_dir - Optional[Path] - -
    -

    Directory where the generated README.md should be written. -Defaults to the parent of docs_dir.

    -
    -
    - None -
    - -
    - -
    - -
    - - -
    - generate_sources - - -
    -
    1
    -2
    -3
    -4
    -5
    generate_sources(
    -    project: Project,
    -    out_dir: Path,
    -    module_is_source: bool | None = None,
    -) -> None
    -
    - -
    - -

    Generate Markdown documentation files for a project.

    -

    This method renders a documentation structure from the provided -project model and writes the resulting Markdown files to the -specified output directory.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    project - Project - -
    -

    Project model containing modules to document.

    -
    -
    - required -
    out_dir - Path - -
    -

    Directory where generated Markdown files will be written.

    -
    -
    - required -
    module_is_source - bool - -
    -

    If True, treat the specified module as the documentation root -rather than nesting it inside a folder.

    -
    -
    - None -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/docforge/servers/mcp_server/index.html b/doc-forge/lib/docforge/servers/mcp_server/index.html deleted file mode 100644 index e50585c..0000000 --- a/doc-forge/lib/docforge/servers/mcp_server/index.html +++ /dev/null @@ -1,1508 +0,0 @@ - - - - - - - - - - - - - - - - - - - Mcp Server - docforge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - - - - -
    - - -
    - -
    - - - - - - -
    -
    - - - -
    -
    -
    - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    - - - - - -

    Mcp Server

    - - -
    - - - -

    - docforge.servers.mcp_server - - -

    - -
    - -

    Summary

    -

    MCP server implementation.

    -

    This module defines the MCPServer class, which serves pre-generated -documentation bundles through the Model Context Protocol (MCP).

    - - - -
    - - - - - - -

    Classes

    - -
    - - - -

    - MCPServer - - -

    -
    MCPServer(mcp_root: Path, name: str)
    -
    - -
    - - -

    MCP server for serving a pre-generated documentation bundle.

    -

    The server exposes documentation resources and diagnostic tools through -MCP endpoints backed by JSON files generated by the MCP renderer.

    - -

    Initialize the MCP server.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    mcp_root - Path - -
    -

    Directory containing the generated MCP documentation bundle -(for example index.json, nav.json, and modules/).

    -
    -
    - required -
    name - str - -
    -

    Identifier used for the MCP server instance.

    -
    -
    - required -
    - - - - -
    - - - - - - - -
    Functions
    - -
    - - -
    - run - - -
    -
    1
    -2
    -3
    -4
    -5
    run(
    -    transport: Literal[
    -        "stdio", "sse", "streamable-http"
    -    ] = "streamable-http",
    -) -> None
    -
    - -
    - -

    Start the MCP server.

    - - -

    Parameters:

    - - - - - - - - - - - - - - - - - -
    NameTypeDescriptionDefault
    transport - Literal['stdio', 'sse', 'streamable-http'] - -
    -

    Transport mechanism used by the MCP server. Supported options -include stdio, sse, and streamable-http.

    -
    -
    - 'streamable-http' -
    - -
    - -
    - - - -
    - -
    - -
    - - - - -
    - -
    - -
    - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - -
    - - - -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/doc-forge/lib/index.html b/doc-forge/lib/index.html index 1190ba7..d2ea2ce 100644 --- a/doc-forge/lib/index.html +++ b/doc-forge/lib/index.html @@ -339,6 +339,10 @@ + + + + @@ -423,6 +427,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1229,6 +1279,24 @@ + + +
  • + + + Include a hand-written wiki in the MkDocs site: + + + +
  • + +
  • + + + Build wiki pages only (no module required): + + +
  • @@ -1702,11 +1770,17 @@ outputs without executing user code.

    Generate MkDocs site and MCP JSON documentation:

    doc-forge build --mcp --mkdocs --module my_package
     
    +

    Include a hand-written wiki in the MkDocs site:

    +
    doc-forge build --wiki --mkdocs --module my_package
    +
    +

    Build wiki pages only (no module required):

    +
    doc-forge build --wiki --site-name my_package
    +

    Serve MkDocs locally:

    -
    doc-forge serve --mkdocs --module my_package
    +
    doc-forge serve --mkdocs --module my_package
     

    Serve MCP locally:

    -
    doc-forge serve --mcp --module my_package
    +
    doc-forge serve --mcp --module my_package
     

    Core concepts

    @@ -1771,7 +1845,9 @@ MkDocs site or MCP JSON
    • Use Markdown headings at package and module level.
    • Use Google-style structured sections at class, function, and method level.
    • -
    • Use type hints in signatures instead of duplicating types in prose.
    • +
    • Use type hints in signatures.
    • +
    • Use parenthesized types in prose entries (name (Type):) that match the + signature types. This keeps docstrings self-contained and machine-parseable.
    • Write summaries in imperative form.
    • Sections are separated by ---
    @@ -1856,7 +1932,9 @@ MkDocs site or MCP JSON engine.run() ```
    -

    Avoid fenced code blocks inside structured sections.

    +

    Avoid fenced code blocks inside argument descriptions and other prose lines.

    +

    Inside Example: sections, fenced python code blocks are allowed and must be +indented four spaces, matching the examples below.


    Separator rules

    Use horizontal separators only at docstring root level to separate sections:

    @@ -2430,6 +2508,31 @@ Attributes: code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

    + +

    Attributes:

    + + + + + + + + + + + + + + + +
    NameTypeDescription
    _loader + GriffeLoader + +
    +

    Internal Griffe loader with dedicated module and line collections.

    +
    +
    +

    Initialize the Griffe-backed loader.

    Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

    @@ -2516,6 +2619,52 @@ a doc-forge Module model.

    + +

    Raises:

    + + + + + + + + + + + + + + + + + +
    TypeDescription
    + ImportError + +
    +

    If the module cannot be loaded by Griffe.

    +
    +
    + KeyError + +
    +

    If the loaded module is missing from the module collection.

    +
    +
    + + +
    + Example +

    Load a single module:

    +
    1
    +2
    +3
    +4
    ```python
    +loader = GriffeLoader()
    +module = loader.load_module("mypackage.submodule")
    +```
    +
    +
  • @@ -2535,7 +2684,7 @@ a doc-forge Module model.

    5
    load_project(
         module_paths: list[str],
         project_name: str | None = None,
    -    skip_import_errors: bool = None,
    +    skip_import_errors: bool | None = None,
     ) -> Project
     
    @@ -2561,7 +2710,7 @@ object.

    module_paths - List[str] + list[str]
    @@ -2575,7 +2724,7 @@ object.

    project_name - str + str | None
    @@ -2590,7 +2739,7 @@ name of the first module.

    skip_import_errors - bool + bool | None
    @@ -2831,13 +2980,16 @@ allowing MkDocs to render API documentation dynamically.

    Generate a README.md file from the root module docstring.

    -

    Behavior:

    -
      -
    • If module_is_source is True, README.md is written to the project - root directory.
    • + + +
      + Notes +
        +
      • If module_is_source is True, README.md is written to the + project root directory.
      • If False, README generation is currently not implemented.
      - +

      Parameters:

      @@ -2881,7 +3033,7 @@ allowing MkDocs to render API documentation dynamically.

      @@ -3139,9 +3291,7 @@ A sorted list of unique dotted module import paths.

      - + diff --git a/doc-forge/lib/loaders/griffe_loader/index.html b/doc-forge/lib/loaders/griffe_loader/index.html index 7462c28..213790e 100644 --- a/doc-forge/lib/loaders/griffe_loader/index.html +++ b/doc-forge/lib/loaders/griffe_loader/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
    • + + + + + + Gsdfc Guide + + + + + +
    • + + + + + + + + + + +
    • + + + + + + Mcp Guide + + + + + +
    • + + + + @@ -1470,6 +1520,16 @@

      This module provides the GriffeLoader class and helper utilities used to discover Python modules, introspect their structure, and convert the results into doc-forge documentation models.

      +
      + + +
      + Notes +
        +
      • All analysis is static; analyzed modules are never executed.
      • +
      • Private members (names starting with _) are skipped during conversion.
      • +
      +

      @@ -1502,6 +1562,31 @@ into doc-forge documentation models.

      code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

      + +

      Attributes:

      +
      module_is_source - Optional[bool] + bool | None
      @@ -2895,7 +3047,7 @@ allowing MkDocs to render API documentation dynamically.

      readme_dir - Optional[Path] + Path | None
      @@ -2983,7 +3135,7 @@ specified output directory.

      module_is_source - bool + bool | None
      @@ -3067,7 +3219,7 @@ package and converts them into dotted module import paths.

      project_root - Path + Path | None
      @@ -3098,7 +3250,7 @@ current working directory is used.

      -

      List[str]: +

      list[str]: A sorted list of unique dotted module import paths.

      + + + + + + + + + + + + + + +
      NameTypeDescription
      _loader + GriffeLoader + +
      +

      Internal Griffe loader with dedicated module and line collections.

      +
      +
      +

      Initialize the Griffe-backed loader.

      Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

      @@ -1588,6 +1673,52 @@ a doc-forge Module model.

      + +

      Raises:

      + + + + + + + + + + + + + + + + + +
      TypeDescription
      + ImportError + +
      +

      If the module cannot be loaded by Griffe.

      +
      +
      + KeyError + +
      +

      If the loaded module is missing from the module collection.

      +
      +
      + + +
      + Example +

      Load a single module:

      +
      1
      +2
      +3
      +4
      ```python
      +loader = GriffeLoader()
      +module = loader.load_module("mypackage.submodule")
      +```
      +
      +
    @@ -1607,7 +1738,7 @@ a doc-forge Module model.

    5
    load_project(
         module_paths: list[str],
         project_name: str | None = None,
    -    skip_import_errors: bool = None,
    +    skip_import_errors: bool | None = None,
     ) -> Project
     
    @@ -1633,7 +1764,7 @@ object.

    module_paths - List[str] + list[str]
    @@ -1647,7 +1778,7 @@ object.

    project_name - str + str | None
    @@ -1662,7 +1793,7 @@ name of the first module.

    skip_import_errors - bool + bool | None
    @@ -1801,7 +1932,7 @@ package and converts them into dotted module import paths.

    project_root - Path + Path | None
    @@ -1832,7 +1963,7 @@ current working directory is used.

    -

    List[str]: +

    list[str]: A sorted list of unique dotted module import paths.

    diff --git a/doc-forge/lib/loaders/index.html b/doc-forge/lib/loaders/index.html index 88532fb..7980ab5 100644 --- a/doc-forge/lib/loaders/index.html +++ b/doc-forge/lib/loaders/index.html @@ -9,7 +9,7 @@ - + @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1371,6 +1421,31 @@ initial filtering before the data is passed to the core documentation models.

    Project, Module, and DocObject instances used by doc-forge.

    + +

    Attributes:

    + + + + + + + + + + + + + + + +
    NameTypeDescription
    _loader + GriffeLoader + +
    +

    Internal Griffe loader with dedicated module and line collections.

    +
    +
    +

    Initialize the Griffe-backed loader.

    Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

    @@ -1457,6 +1532,52 @@ a doc-forge Module model.

    + +

    Raises:

    + + + + + + + + + + + + + + + + + +
    TypeDescription
    + ImportError + +
    +

    If the module cannot be loaded by Griffe.

    +
    +
    + KeyError + +
    +

    If the loaded module is missing from the module collection.

    +
    +
    + + +
    + Example +

    Load a single module:

    +
    1
    +2
    +3
    +4
    ```python
    +loader = GriffeLoader()
    +module = loader.load_module("mypackage.submodule")
    +```
    +
    +
    @@ -1476,7 +1597,7 @@ a doc-forge Module model.

    5
    load_project(
         module_paths: list[str],
         project_name: str | None = None,
    -    skip_import_errors: bool = None,
    +    skip_import_errors: bool | None = None,
     ) -> Project
     
    @@ -1502,7 +1623,7 @@ object.

    module_paths - List[str] + list[str]
    @@ -1516,7 +1637,7 @@ object.

    project_name - str + str | None
    @@ -1531,7 +1652,7 @@ name of the first module.

    skip_import_errors - bool + bool | None
    @@ -1670,7 +1791,7 @@ package and converts them into dotted module import paths.

    project_root - Path + Path | None
    @@ -1701,7 +1822,7 @@ current working directory is used.

    -

    List[str]: +

    list[str]: A sorted list of unique dotted module import paths.

    diff --git a/doc-forge/lib/models/index.html b/doc-forge/lib/models/index.html index 1bc957e..aaaa234 100644 --- a/doc-forge/lib/models/index.html +++ b/doc-forge/lib/models/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1542,7 +1592,7 @@ of modules, classes, and other containers to be represented recursively.

    signature - Optional[str] + str | None
    @@ -1553,7 +1603,7 @@ of modules, classes, and other containers to be represented recursively.

    docstring - Optional[str] + str | None
    @@ -1564,7 +1614,7 @@ of modules, classes, and other containers to be represented recursively.

    members - Dict[str, DocObject] + dict[str, DocObject]
    @@ -1634,7 +1684,7 @@ of modules, classes, and other containers to be represented recursively.

    signature - Optional[str] + str | None
    @@ -1648,7 +1698,7 @@ of modules, classes, and other containers to be represented recursively.

    docstring - Optional[str] + str | None
    @@ -1915,7 +1965,7 @@ introspection.

    docstring - Optional[str] + str | None
    @@ -1926,7 +1976,7 @@ introspection.

    members - Dict[str, DocObject] + dict[str, DocObject]
    @@ -1968,7 +2018,7 @@ introspection.

    docstring - Optional[str] + str | None
    @@ -2232,7 +2282,7 @@ introspection. Each module is stored by its dotted import path.

    modules - Dict[str, Module] + dict[str, Module]
    @@ -2275,6 +2325,19 @@ introspection. Each module is stored by its dotted import path.

    +
    + Example +

    Create a project and register a module:

    +
    1
    +2
    +3
    +4
    ```python
    +project = Project("mypackage")
    +project.add_module(module)
    +```
    +
    +
    +
    diff --git a/doc-forge/lib/models/module/index.html b/doc-forge/lib/models/module/index.html index 389ee6d..85fb8b9 100644 --- a/doc-forge/lib/models/module/index.html +++ b/doc-forge/lib/models/module/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1441,6 +1491,15 @@ model. A Module acts as a container for top-level documented objects (classes, functions, variables, and other members) discovered during introspection.

    +
    + + +
    + Notes +
      +
    • Only public members are stored; private names are filtered by the loader.
    • +
    +

    @@ -1498,7 +1557,7 @@ introspection.

    docstring - Optional[str] + str | None
    @@ -1509,7 +1568,7 @@ introspection.

    members - Dict[str, DocObject] + dict[str, DocObject]
    @@ -1551,7 +1610,7 @@ introspection.

    docstring - Optional[str] + str | None
    diff --git a/doc-forge/lib/models/object/index.html b/doc-forge/lib/models/object/index.html index 157d0cd..baa4113 100644 --- a/doc-forge/lib/models/object/index.html +++ b/doc-forge/lib/models/object/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1441,6 +1491,16 @@ the doc-forge documentation model. Each DocObject represents a Python entity such as a class, function, method, or attribute, and may contain nested members that form a hierarchical documentation structure.

    +
    + + +
    + Notes +
      +
    • DocObject instances form a tree mirroring the Python import hierarchy.
    • +
    • Objects are renderer-agnostic and may be consumed by any renderer.
    • +
    +

    @@ -1532,7 +1592,7 @@ of modules, classes, and other containers to be represented recursively.

    signature - Optional[str] + str | None
    @@ -1543,7 +1603,7 @@ of modules, classes, and other containers to be represented recursively.

    docstring - Optional[str] + str | None
    @@ -1554,7 +1614,7 @@ of modules, classes, and other containers to be represented recursively.

    members - Dict[str, DocObject] + dict[str, DocObject]
    @@ -1624,7 +1684,7 @@ of modules, classes, and other containers to be represented recursively.

    signature - Optional[str] + str | None
    @@ -1638,7 +1698,7 @@ of modules, classes, and other containers to be represented recursively.

    docstring - Optional[str] + str | None
    diff --git a/doc-forge/lib/models/project/index.html b/doc-forge/lib/models/project/index.html index 0d67323..d327a82 100644 --- a/doc-forge/lib/models/project/index.html +++ b/doc-forge/lib/models/project/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1458,6 +1508,16 @@

    This module defines the Project class, the top-level container used by doc-forge to represent a documented codebase. A Project aggregates multiple modules and provides access to them through a unified interface.

    +
    + + +
    + Notes +
      +
    • Modules are keyed by their dotted import path.
    • +
    • Objects are renderer-agnostic; the same model feeds every renderer.
    • +
    +

    @@ -1514,7 +1574,7 @@ introspection. Each module is stored by its dotted import path.

    modules - Dict[str, Module] + dict[str, Module]
    @@ -1557,6 +1617,19 @@ introspection. Each module is stored by its dotted import path.

    +
    + Example +

    Create a project and register a module:

    +
    1
    +2
    +3
    +4
    ```python
    +project = Project("mypackage")
    +project.add_module(module)
    +```
    +
    +
    +
    diff --git a/doc-forge/lib/nav/index.html b/doc-forge/lib/nav/index.html index 44cba4e..2bd6923 100644 --- a/doc-forge/lib/nav/index.html +++ b/doc-forge/lib/nav/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1529,27 +1579,10 @@ and their associated Markdown files.

    -

    A list of dictionaries representing the MkDocs navigation layout.

    -
    - - - - - list[dict[str, Any]] - - -
    -

    Each dictionary maps a navigation label to a page or a list of

    -
    - - - - - list[dict[str, Any]] - - -
    -

    pages.

    +

    list[dict[str, Any]]: +A list of dictionaries representing the MkDocs navigation layout. +Each dictionary maps a navigation label to a page or a list of +pages.

    @@ -1750,17 +1783,9 @@ generated MkDocs configuration.

    -

    A list containing the home document (if defined) and all

    -
    - - - - - list[str] - - -
    -

    group pattern entries.

    +

    list[str]: +A list containing the home document (if defined) and all +group pattern entries.

    @@ -1824,13 +1849,13 @@ generated MkDocs configuration.

    - + -
    TypeName Type Description
    +NavSpec NavSpec @@ -2040,22 +2065,23 @@ documentation file paths.

    Iterate over all files referenced by the navigation structure.

    -

    Returns:

    +

    Yields:

    - + - @@ -2172,7 +2198,7 @@ the result directly usable in an MkDocs nav block with

    TypeName Type Description
    +Path Iterable[Path]
    -

    An iterable of Path objects representing documentation files.

    +

    A documentation file referenced by the navigation, including +the home page when defined.

    -

    List[Dict[str, Any]]: +

    list[dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

    @@ -2259,13 +2285,13 @@ corresponding NavSpec instance.

    - + -
    TypeName Type Description
    +NavSpec NavSpec @@ -2379,13 +2405,13 @@ that referenced documentation files exist within the documentation root.

    - + - - - - - - - - - diff --git a/doc-forge/lib/nav/resolver/index.html b/doc-forge/lib/nav/resolver/index.html index a4d6ffc..3ed84ec 100644 --- a/doc-forge/lib/nav/resolver/index.html +++ b/doc-forge/lib/nav/resolver/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1432,6 +1482,16 @@

    Navigation resolution utilities.

    This module resolves a NavSpec against the filesystem by expanding glob patterns and validating that referenced documentation files exist.

    +
    + + +
    + Notes +
      +
    • Glob resolution is recursive and returns paths in sorted order.
    • +
    • Unmatched patterns raise FileNotFoundError to fail fast on typos.
    • +
    +

    @@ -1596,22 +1656,23 @@ documentation file paths.

    Iterate over all files referenced by the navigation structure.

    -

    Returns:

    +

    Yields:

    TypeName Type Description
    +ResolvedNav ResolvedNav diff --git a/doc-forge/lib/nav/mkdocs/index.html b/doc-forge/lib/nav/mkdocs/index.html index 3e2cfa4..ca0d2b5 100644 --- a/doc-forge/lib/nav/mkdocs/index.html +++ b/doc-forge/lib/nav/mkdocs/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1385,6 +1435,16 @@

    This module provides the MkDocsNavEmitter class, which converts a ResolvedNav instance into the navigation structure required by the MkDocs nav configuration.

    +
    + + +
    + Notes +
      +
    • The emitted structure is a list of dictionaries, one per top-level nav + entry, matching the MkDocs nav YAML format.
    • +
    +

    @@ -1489,27 +1549,10 @@ and their associated Markdown files.

    -

    A list of dictionaries representing the MkDocs navigation layout.

    -
    -
    - list[dict[str, Any]] - -
    -

    Each dictionary maps a navigation label to a page or a list of

    -
    -
    - list[dict[str, Any]] - -
    -

    pages.

    +

    list[dict[str, Any]]: +A list of dictionaries representing the MkDocs navigation layout. +Each dictionary maps a navigation label to a page or a list of +pages.

    - + - @@ -1720,13 +1781,13 @@ that referenced documentation files exist within the documentation root.

    TypeName Type Description
    +Path Iterable[Path]
    -

    An iterable of Path objects representing documentation files.

    +

    A documentation file referenced by the navigation, including +the home page when defined.

    - + - - - - - @@ -1719,13 +1772,13 @@ generated MkDocs configuration.

    TypeName Type Description
    +ResolvedNav ResolvedNav diff --git a/doc-forge/lib/nav/spec/index.html b/doc-forge/lib/nav/spec/index.html index 057514d..b8c2a7c 100644 --- a/doc-forge/lib/nav/spec/index.html +++ b/doc-forge/lib/nav/spec/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1451,6 +1501,17 @@

    This module defines the NavSpec class, which represents the navigation structure defined by the user in the doc-forge navigation specification (typically docforge.nav.yml).

    +
    + + +
    + Notes +
      +
    • The spec file supports an optional icon mapping for MkDocs theme + customization.
    • +
    • All file references in groups are relative to the documentation root.
    • +
    +

    @@ -1645,17 +1706,9 @@ generated MkDocs configuration.

    -

    A list containing the home document (if defined) and all

    -
    -
    - list[str] - -
    -

    group pattern entries.

    +

    list[str]: +A list containing the home document (if defined) and all +group pattern entries.

    - + -
    TypeName Type Description
    +NavSpec NavSpec @@ -1835,13 +1888,13 @@ corresponding NavSpec instance.

    - + -
    TypeName Type Description
    +NavSpec NavSpec diff --git a/doc-forge/lib/docforge/nav/wiki/index.html b/doc-forge/lib/nav/wiki/index.html similarity index 87% rename from doc-forge/lib/docforge/nav/wiki/index.html rename to doc-forge/lib/nav/wiki/index.html index 924f0ea..633ac2e 100644 --- a/doc-forge/lib/docforge/nav/wiki/index.html +++ b/doc-forge/lib/nav/wiki/index.html @@ -11,7 +11,7 @@ - + @@ -20,10 +20,10 @@ - + - + @@ -42,11 +42,11 @@ - + - + @@ -88,7 +88,7 @@
    -

    List[Dict[str, Any]]: +

    list[dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

    @@ -1455,10 +1505,10 @@ The list is empty if the wiki contains no Markdown files.

    - + - + diff --git a/doc-forge/lib/renderers/base/index.html b/doc-forge/lib/renderers/base/index.html index c672001..c439c4e 100644 --- a/doc-forge/lib/renderers/base/index.html +++ b/doc-forge/lib/renderers/base/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + diff --git a/doc-forge/lib/renderers/index.html b/doc-forge/lib/renderers/index.html index 2b7f80b..afaf97b 100644 --- a/doc-forge/lib/renderers/index.html +++ b/doc-forge/lib/renderers/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
  • + + + + + + Gsdfc Guide + + + + + +
  • + + + + + + + + + + +
  • + + + + + + Mcp Guide + + + + + +
  • + + + + @@ -1537,13 +1587,16 @@ allowing MkDocs to render API documentation dynamically.

    Generate a README.md file from the root module docstring.

    -

    Behavior:

    -
      -
    • If module_is_source is True, README.md is written to the project - root directory.
    • + + +
      + Notes +
        +
      • If module_is_source is True, README.md is written to the + project root directory.
      • If False, README generation is currently not implemented.
      - +

      Parameters:

      @@ -1587,7 +1640,7 @@ allowing MkDocs to render API documentation dynamically.

      module_is_source - Optional[bool] + bool | None
      @@ -1601,7 +1654,7 @@ allowing MkDocs to render API documentation dynamically.

      readme_dir - Optional[Path] + Path | None
      @@ -1689,7 +1742,7 @@ specified output directory.

      module_is_source - bool + bool | None
      diff --git a/doc-forge/lib/renderers/mcp_renderer/index.html b/doc-forge/lib/renderers/mcp_renderer/index.html index 3efebf2..40cf045 100644 --- a/doc-forge/lib/renderers/mcp_renderer/index.html +++ b/doc-forge/lib/renderers/mcp_renderer/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
    • + + + + + + Gsdfc Guide + + + + + +
    • + + + + + + + + + + +
    • + + + + + + Mcp Guide + + + + + +
    • + + + + diff --git a/doc-forge/lib/renderers/mkdocs_renderer/index.html b/doc-forge/lib/renderers/mkdocs_renderer/index.html index d5fe1d8..8f523a6 100644 --- a/doc-forge/lib/renderers/mkdocs_renderer/index.html +++ b/doc-forge/lib/renderers/mkdocs_renderer/index.html @@ -343,6 +343,10 @@ + + + + @@ -427,6 +431,52 @@ + + + + + + +
    • + + + + + + Gsdfc Guide + + + + + +
    • + + + + + + + + + + +
    • + + + + + + Mcp Guide + + + + + +
    • + + + + @@ -1496,13 +1546,16 @@ allowing MkDocs to render API documentation dynamically.

      Generate a README.md file from the root module docstring.

      -

      Behavior:

      -
        -
      • If module_is_source is True, README.md is written to the project - root directory.
      • + + +
        + Notes +
          +
        • If module_is_source is True, README.md is written to the + project root directory.
        • If False, README generation is currently not implemented.
        - +

        Parameters:

        @@ -1546,7 +1599,7 @@ allowing MkDocs to render API documentation dynamically.

        - - + +
        module_is_source - Optional[bool] + bool | None
        @@ -1560,7 +1613,7 @@ allowing MkDocs to render API documentation dynamically.

        readme_dir - Optional[Path] + Path | None
        @@ -1648,7 +1701,7 @@ specified output directory.

        module_is_source - bool + bool | None
        diff --git a/doc-forge/lib/servers/index.html b/doc-forge/lib/servers/index.html index a300dea..46cdba0 100644 --- a/doc-forge/lib/servers/index.html +++ b/doc-forge/lib/servers/index.html @@ -339,6 +339,10 @@ + + + + @@ -423,6 +427,52 @@ + + + + + + +
      • + + + + + + Gsdfc Guide + + + + + +
      • + + + + + + + + + + +
      • + + + + + + Mcp Guide + + + + + +
      • + + + + @@ -1312,6 +1362,43 @@ documentation server.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        + +

        Attributes:

        + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        mcp_root + Path + +
        +

        Directory containing the generated MCP documentation bundle.

        +
        +
        app + FastMCP + +
        +

        Underlying FastMCP application instance that registers resources +and tools.

        +
        +
        +

        Initialize the MCP server.

        diff --git a/doc-forge/lib/servers/mcp_server/index.html b/doc-forge/lib/servers/mcp_server/index.html index 0652474..59a7f57 100644 --- a/doc-forge/lib/servers/mcp_server/index.html +++ b/doc-forge/lib/servers/mcp_server/index.html @@ -339,6 +339,10 @@ + + + + @@ -423,6 +427,52 @@ + + + + + + +
      • + + + + + + Gsdfc Guide + + + + + +
      • + + + + + + + + + + +
      • + + + + + + Mcp Guide + + + + + +
      • + + + + @@ -1279,6 +1329,18 @@

        MCP server implementation.

        This module defines the MCPServer class, which serves pre-generated documentation bundles through the Model Context Protocol (MCP).

        +
        + + +
        + Notes +
          +
        • The served bundle is generated offline by MCPRenderer.
        • +
        • Missing resources are reported as structured error dictionaries rather + than raising exceptions.
        • +
        • The server exposes read-only resources and a single health-check tool.
        • +
        +

        @@ -1310,6 +1372,43 @@ documentation bundles through the Model Context Protocol (MCP).

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        + +

        Attributes:

        + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        mcp_root + Path + +
        +

        Directory containing the generated MCP documentation bundle.

        +
        +
        app + FastMCP + +
        +

        Underlying FastMCP application instance that registers resources +and tools.

        +
        +
        +

        Initialize the MCP server.

        diff --git a/doc-forge/mcp/index.json b/doc-forge/mcp/index.json index 9055418..6ce9145 100644 --- a/doc-forge/mcp/index.json +++ b/doc-forge/mcp/index.json @@ -1,6 +1,6 @@ { "project": "docforge", "type": "docforge-model", - "modules_count": 23, + "modules_count": 24, "source": "docforge" } \ No newline at end of file diff --git a/doc-forge/mcp/modules/docforge.cli.api_utils.json b/doc-forge/mcp/modules/docforge.cli.api_utils.json index 547c81a..1fc4060 100644 --- a/doc-forge/mcp/modules/docforge.cli.api_utils.json +++ b/doc-forge/mcp/modules/docforge.cli.api_utils.json @@ -73,22 +73,22 @@ "name": "load_openapi_spec", "kind": "function", "path": "docforge.cli.api_utils.load_openapi_spec", - "signature": "", - "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path: Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." + "signature": "", + "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." }, "derive_metadata": { "name": "derive_metadata", "kind": "function", "path": "docforge.cli.api_utils.derive_metadata", - "signature": "", - "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec: Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." + "signature": "", + "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." }, "generate_api_sources": { "name": "generate_api_sources", "kind": "function", "path": "docforge.cli.api_utils.generate_api_sources", - "signature": "", - "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec: Parsed OpenAPI specification.\n docs_dir: Directory (for example ``docs/api``) where the swagger\n sources are written." + "signature": "", + "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written." }, "Any": { "name": "Any", diff --git a/doc-forge/mcp/modules/docforge.cli.commands.json b/doc-forge/mcp/modules/docforge.cli.commands.json index 5397439..9dfa53e 100644 --- a/doc-forge/mcp/modules/docforge.cli.commands.json +++ b/doc-forge/mcp/modules/docforge.cli.commands.json @@ -2,7 +2,7 @@ "module": "docforge.cli.commands", "content": { "path": "docforge.cli.commands", - "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.", + "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.\n\n---\n\nNotes:\n - The `build` command validates requested modes before generating anything.\n - `--mkdocs`, `--api`, and `--wiki` share a single MkDocs build; `--mcp`\n generates a machine-readable bundle independently.\n\n---", "objects": { "Path": { "name": "Path", @@ -95,21 +95,21 @@ "kind": "function", "path": "docforge.cli.commands.api_utils.load_openapi_spec", "signature": "", - "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path: Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." + "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." }, "derive_metadata": { "name": "derive_metadata", "kind": "function", "path": "docforge.cli.commands.api_utils.derive_metadata", "signature": "", - "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec: Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." + "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." }, "generate_api_sources": { "name": "generate_api_sources", "kind": "function", "path": "docforge.cli.commands.api_utils.generate_api_sources", "signature": "", - "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec: Parsed OpenAPI specification.\n docs_dir: Directory (for example ``docs/api``) where the swagger\n sources are written." + "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written." }, "Any": { "name": "Any", @@ -125,7 +125,7 @@ "kind": "module", "path": "docforge.cli.commands.mcp_utils", "signature": "", - "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---", "members": { "Path": { "name": "Path", @@ -146,21 +146,21 @@ "kind": "class", "path": "docforge.cli.commands.mcp_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -169,7 +169,7 @@ "kind": "function", "path": "docforge.cli.commands.mcp_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", @@ -199,7 +199,7 @@ "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -229,7 +229,7 @@ "kind": "function", "path": "docforge.cli.commands.mcp_utils.generate_resources", "signature": "", - "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." + "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", @@ -245,7 +245,7 @@ "kind": "module", "path": "docforge.cli.commands.mkdocs_utils", "signature": "", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A single generated `mkdocs.yml` serves lib, api, and wiki content with\n merged navigation. Wiki navigation, when enabled, precedes every other\n group and its `index.md` becomes the site `Home`.\n\n---", "members": { "os": { "name": "os", @@ -294,21 +294,21 @@ "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -317,7 +317,7 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -331,23 +331,30 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -368,14 +375,14 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -384,14 +391,14 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_sources", "signature": "", - "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_config", "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Optional[Iterable[str]]):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib`` or ``api``),\n merged on top of the shared ``mkdocs.common.yml`` template.\n\n site_description (Optional[str]):\n Optional site description written into the configuration.\n\n site_author (Optional[str]):\n Optional site author written into the configuration.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification (and, when a wiki directory is provided, from the wiki\nfile structure).\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories\nand hand-written wiki content under a ``wiki/`` subdirectory.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Iterable[str] | None):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib``, ``api``, or\n ``wiki``), merged on top of the shared ``mkdocs.common.yml``\n template.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n wiki_dir (Path | None):\n Optional path to a hand-written wiki directory (for example\n ``docs/wiki``). When provided, the site navigation is derived\n from the wiki file structure and placed before the navigation\n groups defined in ``nav_file``.\n\nRaises:\n click.FileError:\n If the navigation specification, template, or wiki directory\n cannot be found." }, "build": { "name": "build", @@ -414,21 +421,93 @@ "kind": "class", "path": "docforge.cli.commands.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" + } + } + }, + "DocObject": { + "name": "DocObject", + "kind": "class", + "path": "docforge.cli.commands.DocObject", + "signature": "", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.name", + "signature": "", + "docstring": null + }, + "kind": { + "name": "kind", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.kind", + "signature": "", + "docstring": null + }, + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.path", + "signature": "", + "docstring": null + }, + "signature": { + "name": "signature", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.signature", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.members", + "signature": "", + "docstring": null + }, + "add_member": { + "name": "add_member", + "kind": "function", + "path": "docforge.cli.commands.DocObject.add_member", + "signature": "", + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." + }, + "get_member": { + "name": "get_member", + "kind": "function", + "path": "docforge.cli.commands.DocObject.get_member", + "signature": "", + "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." + }, + "get_all_members": { + "name": "get_all_members", + "kind": "function", + "path": "docforge.cli.commands.DocObject.get_all_members", + "signature": "", + "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." } } }, @@ -443,29 +522,22 @@ "name": "build", "kind": "function", "path": "docforge.cli.commands.build", - "signature": "", - "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\nstyle of the selected platform, generates renderer-specific\ndocumentation sources, and optionally builds the final output.\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites for library reference docs\n- Swagger-enabled API docs generated from an OpenAPI spec\n- MCP structured documentation resources\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs library documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (Optional[str]):\n Python module import path to document.\n\n openapi_spec (Optional[Path]):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (Optional[str]):\n Optional override for the project name.\n\n site_name (Optional[str]):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Optional[Path]):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." + "signature": "", + "docstring": "Build documentation artifacts.\n\nThis command runs the full documentation pipeline: it loads Python\nmodules, generates renderer-specific documentation sources, and\noptionally builds or serves the final output.\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites for library reference docs\n- Swagger-enabled API docs generated from an OpenAPI spec\n- Hand-written wiki pages included in the MkDocs site\n- MCP structured documentation resources\n\nNotes:\n - At least one of `--mcp`, `--mkdocs`, `--wiki`, or `--api` must be\n provided.\n - `--mkdocs`, `--api`, and `--wiki` are combined into a single MkDocs\n build, while `--mcp` emits a machine-readable bundle.\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs library documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n wiki (bool):\n Include a hand-written wiki directory in the MkDocs site.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (str | None):\n Python module import path to document.\n\n openapi_spec (Path | None):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (str | None):\n Optional override for the project name.\n\n site_name (str | None):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n wiki_dir (Path):\n Directory containing hand-written wiki markdown files.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Path | None):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", - "signature": "", - "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (Optional[str]):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." + "signature": "", + "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (str | None):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", - "signature": "", - "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (Optional[str]):\n Optional name to display as the project root." - }, - "Any": { - "name": "Any", - "kind": "alias", - "path": "docforge.cli.commands.Any", - "signature": "", - "docstring": null + "signature": "", + "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (str | None):\n Optional name to display as the project root." }, "Group": { "name": "Group", diff --git a/doc-forge/mcp/modules/docforge.cli.json b/doc-forge/mcp/modules/docforge.cli.json index 536047d..92d61f5 100644 --- a/doc-forge/mcp/modules/docforge.cli.json +++ b/doc-forge/mcp/modules/docforge.cli.json @@ -103,22 +103,22 @@ "name": "load_openapi_spec", "kind": "function", "path": "docforge.cli.api_utils.load_openapi_spec", - "signature": "", - "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path: Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." + "signature": "", + "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." }, "derive_metadata": { "name": "derive_metadata", "kind": "function", "path": "docforge.cli.api_utils.derive_metadata", - "signature": "", - "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec: Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." + "signature": "", + "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." }, "generate_api_sources": { "name": "generate_api_sources", "kind": "function", "path": "docforge.cli.api_utils.generate_api_sources", - "signature": "", - "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec: Parsed OpenAPI specification.\n docs_dir: Directory (for example ``docs/api``) where the swagger\n sources are written." + "signature": "", + "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written." }, "Any": { "name": "Any", @@ -134,7 +134,7 @@ "kind": "module", "path": "docforge.cli.commands", "signature": null, - "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.", + "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.\n\n---\n\nNotes:\n - The `build` command validates requested modes before generating anything.\n - `--mkdocs`, `--api`, and `--wiki` share a single MkDocs build; `--mcp`\n generates a machine-readable bundle independently.\n\n---", "members": { "Path": { "name": "Path", @@ -227,21 +227,21 @@ "kind": "function", "path": "docforge.cli.commands.api_utils.load_openapi_spec", "signature": "", - "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path: Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." + "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." }, "derive_metadata": { "name": "derive_metadata", "kind": "function", "path": "docforge.cli.commands.api_utils.derive_metadata", "signature": "", - "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec: Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." + "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." }, "generate_api_sources": { "name": "generate_api_sources", "kind": "function", "path": "docforge.cli.commands.api_utils.generate_api_sources", "signature": "", - "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec: Parsed OpenAPI specification.\n docs_dir: Directory (for example ``docs/api``) where the swagger\n sources are written." + "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written." }, "Any": { "name": "Any", @@ -257,7 +257,7 @@ "kind": "module", "path": "docforge.cli.commands.mcp_utils", "signature": "", - "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---", "members": { "Path": { "name": "Path", @@ -278,21 +278,21 @@ "kind": "class", "path": "docforge.cli.commands.mcp_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -301,7 +301,7 @@ "kind": "function", "path": "docforge.cli.commands.mcp_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", @@ -331,7 +331,7 @@ "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -361,7 +361,7 @@ "kind": "function", "path": "docforge.cli.commands.mcp_utils.generate_resources", "signature": "", - "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." + "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", @@ -377,7 +377,7 @@ "kind": "module", "path": "docforge.cli.commands.mkdocs_utils", "signature": "", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A single generated `mkdocs.yml` serves lib, api, and wiki content with\n merged navigation. Wiki navigation, when enabled, precedes every other\n group and its `index.md` becomes the site `Home`.\n\n---", "members": { "os": { "name": "os", @@ -426,21 +426,21 @@ "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -449,7 +449,7 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -463,23 +463,30 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -500,14 +507,14 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -516,14 +523,14 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_sources", "signature": "", - "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_config", "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Optional[Iterable[str]]):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib`` or ``api``),\n merged on top of the shared ``mkdocs.common.yml`` template.\n\n site_description (Optional[str]):\n Optional site description written into the configuration.\n\n site_author (Optional[str]):\n Optional site author written into the configuration.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification (and, when a wiki directory is provided, from the wiki\nfile structure).\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories\nand hand-written wiki content under a ``wiki/`` subdirectory.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Iterable[str] | None):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib``, ``api``, or\n ``wiki``), merged on top of the shared ``mkdocs.common.yml``\n template.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n wiki_dir (Path | None):\n Optional path to a hand-written wiki directory (for example\n ``docs/wiki``). When provided, the site navigation is derived\n from the wiki file structure and placed before the navigation\n groups defined in ``nav_file``.\n\nRaises:\n click.FileError:\n If the navigation specification, template, or wiki directory\n cannot be found." }, "build": { "name": "build", @@ -546,21 +553,93 @@ "kind": "class", "path": "docforge.cli.commands.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" + } + } + }, + "DocObject": { + "name": "DocObject", + "kind": "class", + "path": "docforge.cli.commands.DocObject", + "signature": "", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.name", + "signature": "", + "docstring": null + }, + "kind": { + "name": "kind", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.kind", + "signature": "", + "docstring": null + }, + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.path", + "signature": "", + "docstring": null + }, + "signature": { + "name": "signature", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.signature", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.members", + "signature": "", + "docstring": null + }, + "add_member": { + "name": "add_member", + "kind": "function", + "path": "docforge.cli.commands.DocObject.add_member", + "signature": "", + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." + }, + "get_member": { + "name": "get_member", + "kind": "function", + "path": "docforge.cli.commands.DocObject.get_member", + "signature": "", + "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." + }, + "get_all_members": { + "name": "get_all_members", + "kind": "function", + "path": "docforge.cli.commands.DocObject.get_all_members", + "signature": "", + "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." } } }, @@ -575,29 +654,22 @@ "name": "build", "kind": "function", "path": "docforge.cli.commands.build", - "signature": "", - "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\nstyle of the selected platform, generates renderer-specific\ndocumentation sources, and optionally builds the final output.\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites for library reference docs\n- Swagger-enabled API docs generated from an OpenAPI spec\n- MCP structured documentation resources\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs library documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (Optional[str]):\n Python module import path to document.\n\n openapi_spec (Optional[Path]):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (Optional[str]):\n Optional override for the project name.\n\n site_name (Optional[str]):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Optional[Path]):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." + "signature": "", + "docstring": "Build documentation artifacts.\n\nThis command runs the full documentation pipeline: it loads Python\nmodules, generates renderer-specific documentation sources, and\noptionally builds or serves the final output.\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites for library reference docs\n- Swagger-enabled API docs generated from an OpenAPI spec\n- Hand-written wiki pages included in the MkDocs site\n- MCP structured documentation resources\n\nNotes:\n - At least one of `--mcp`, `--mkdocs`, `--wiki`, or `--api` must be\n provided.\n - `--mkdocs`, `--api`, and `--wiki` are combined into a single MkDocs\n build, while `--mcp` emits a machine-readable bundle.\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs library documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n wiki (bool):\n Include a hand-written wiki directory in the MkDocs site.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (str | None):\n Python module import path to document.\n\n openapi_spec (Path | None):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (str | None):\n Optional override for the project name.\n\n site_name (str | None):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n wiki_dir (Path):\n Directory containing hand-written wiki markdown files.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Path | None):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", - "signature": "", - "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (Optional[str]):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." + "signature": "", + "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (str | None):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", - "signature": "", - "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (Optional[str]):\n Optional name to display as the project root." - }, - "Any": { - "name": "Any", - "kind": "alias", - "path": "docforge.cli.commands.Any", - "signature": "", - "docstring": null + "signature": "", + "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (str | None):\n Optional name to display as the project root." }, "Group": { "name": "Group", @@ -613,7 +685,7 @@ "kind": "module", "path": "docforge.cli.mcp_utils", "signature": null, - "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---", "members": { "Path": { "name": "Path", @@ -634,21 +706,21 @@ "kind": "class", "path": "docforge.cli.mcp_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -657,7 +729,7 @@ "kind": "function", "path": "docforge.cli.mcp_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", @@ -687,7 +759,7 @@ "kind": "class", "path": "docforge.cli.mcp_utils.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -716,14 +788,14 @@ "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", - "signature": "", - "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." + "signature": "", + "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", - "signature": "", + "signature": "", "docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module (str):\n Python module import path used to identify the served\n documentation instance.\n\n mcp_root (Path):\n Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException:\n If the MCP documentation bundle is missing required files or directories." } } @@ -733,7 +805,7 @@ "kind": "module", "path": "docforge.cli.mkdocs_utils", "signature": null, - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A single generated `mkdocs.yml` serves lib, api, and wiki content with\n merged navigation. Wiki navigation, when enabled, precedes every other\n group and its `index.md` becomes the site `Home`.\n\n---", "members": { "os": { "name": "os", @@ -782,21 +854,21 @@ "kind": "class", "path": "docforge.cli.mkdocs_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -805,7 +877,7 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -819,23 +891,30 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.mkdocs_utils.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.mkdocs_utils.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -856,14 +935,14 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -871,28 +950,28 @@ "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", - "signature": "", - "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + "signature": "", + "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", - "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Optional[Iterable[str]]):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib`` or ``api``),\n merged on top of the shared ``mkdocs.common.yml`` template.\n\n site_description (Optional[str]):\n Optional site description written into the configuration.\n\n site_author (Optional[str]):\n Optional site author written into the configuration.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + "signature": "", + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification (and, when a wiki directory is provided, from the wiki\nfile structure).\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories\nand hand-written wiki content under a ``wiki/`` subdirectory.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Iterable[str] | None):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib``, ``api``, or\n ``wiki``), merged on top of the shared ``mkdocs.common.yml``\n template.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n wiki_dir (Path | None):\n Optional path to a hand-written wiki directory (for example\n ``docs/wiki``). When provided, the site navigation is derived\n from the wiki file structure and placed before the navigation\n groups defined in ``nav_file``.\n\nRaises:\n click.FileError:\n If the navigation specification, template, or wiki directory\n cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", - "signature": "", + "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", - "signature": "", + "signature": "", "docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist." } } diff --git a/doc-forge/mcp/modules/docforge.cli.mcp_utils.json b/doc-forge/mcp/modules/docforge.cli.mcp_utils.json index 107ed3f..cb43910 100644 --- a/doc-forge/mcp/modules/docforge.cli.mcp_utils.json +++ b/doc-forge/mcp/modules/docforge.cli.mcp_utils.json @@ -2,7 +2,7 @@ "module": "docforge.cli.mcp_utils", "content": { "path": "docforge.cli.mcp_utils", - "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---", "objects": { "Path": { "name": "Path", @@ -23,21 +23,21 @@ "kind": "class", "path": "docforge.cli.mcp_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -46,7 +46,7 @@ "kind": "function", "path": "docforge.cli.mcp_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", @@ -76,7 +76,7 @@ "kind": "class", "path": "docforge.cli.mcp_utils.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -105,14 +105,14 @@ "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", - "signature": "", - "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." + "signature": "", + "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", - "signature": "", + "signature": "", "docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module (str):\n Python module import path used to identify the served\n documentation instance.\n\n mcp_root (Path):\n Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException:\n If the MCP documentation bundle is missing required files or directories." } } diff --git a/doc-forge/mcp/modules/docforge.cli.mkdocs_utils.json b/doc-forge/mcp/modules/docforge.cli.mkdocs_utils.json index 6a260f5..2ab6539 100644 --- a/doc-forge/mcp/modules/docforge.cli.mkdocs_utils.json +++ b/doc-forge/mcp/modules/docforge.cli.mkdocs_utils.json @@ -2,7 +2,7 @@ "module": "docforge.cli.mkdocs_utils", "content": { "path": "docforge.cli.mkdocs_utils", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A single generated `mkdocs.yml` serves lib, api, and wiki content with\n merged navigation. Wiki navigation, when enabled, precedes every other\n group and its `index.md` becomes the site `Home`.\n\n---", "objects": { "os": { "name": "os", @@ -51,21 +51,21 @@ "kind": "class", "path": "docforge.cli.mkdocs_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -74,7 +74,7 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -88,23 +88,30 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.mkdocs_utils.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.mkdocs_utils.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -125,14 +132,14 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -140,28 +147,28 @@ "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", - "signature": "", - "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + "signature": "", + "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", - "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Optional[Iterable[str]]):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib`` or ``api``),\n merged on top of the shared ``mkdocs.common.yml`` template.\n\n site_description (Optional[str]):\n Optional site description written into the configuration.\n\n site_author (Optional[str]):\n Optional site author written into the configuration.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + "signature": "", + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification (and, when a wiki directory is provided, from the wiki\nfile structure).\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories\nand hand-written wiki content under a ``wiki/`` subdirectory.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Iterable[str] | None):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib``, ``api``, or\n ``wiki``), merged on top of the shared ``mkdocs.common.yml``\n template.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n wiki_dir (Path | None):\n Optional path to a hand-written wiki directory (for example\n ``docs/wiki``). When provided, the site navigation is derived\n from the wiki file structure and placed before the navigation\n groups defined in ``nav_file``.\n\nRaises:\n click.FileError:\n If the navigation specification, template, or wiki directory\n cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", - "signature": "", + "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", - "signature": "", + "signature": "", "docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist." } } diff --git a/doc-forge/mcp/modules/docforge.json b/doc-forge/mcp/modules/docforge.json index ae0cb51..6cabd48 100644 --- a/doc-forge/mcp/modules/docforge.json +++ b/doc-forge/mcp/modules/docforge.json @@ -2,28 +2,28 @@ "module": "docforge", "content": { "path": "docforge", - "docstring": "# Summary\n\nRenderer-agnostic Python documentation compiler that converts Python docstrings\ninto structured documentation for both humans (MkDocs) and machines (MCP / AI agents).\n\n`doc-forge` statically analyzes source code, builds a semantic model of modules,\nclasses, functions, and attributes, and renders that model into documentation\noutputs without executing user code.\n\n---\n\n# Installation\n\nInstall using pip:\n\n```bash\npip install doc-forge\n```\n\n---\n\n# CLI usage\n\n## Generate an MkDocs site from a Python package:\n\n```bash\ndoc-forge build --mkdocs --module my_package\n```\n\n## Generate MCP JSON documentation:\n\n```bash\ndoc-forge build --mcp --module my_package\n```\n\n\n## Generate MkDocs site and MCP JSON documentation:\n\n```bash\ndoc-forge build --mcp --mkdocs --module my_package\n```\n\n## Serve MkDocs locally:\n\n```bash\ndoc-forge serve --mkdocs --module my_package\n```\n\n## Serve MCP locally:\n\n```bash\ndoc-forge serve --mcp --module my_package\n```\n\n---\n\n# Core concepts\n\n## Loader\nExtracts symbols, signatures, and docstrings using static analysis.\n\n## Semantic model\nStructured, renderer-agnostic representation of the API.\n\n## Renderer\nConverts the semantic model into output formats such as MkDocs or MCP JSON.\n\n## Symbol\nAny documentable object\n\n- module\n- class\n- function\n- method\n- property\n- attribute\n\n---\n\n# Architecture\n\n`doc-forge` follows a compiler architecture:\n\n## Front-end:\n\nStatic analysis of modules, classes, functions, type hints, and docstrings.\n\n## Middle-end:\n\nBuilds a semantic model describing symbols and relationships.\n\n## Back-end:\n\nRenders documentation using interchangeable renderers.\n\nThis architecture ensures deterministic documentation generation.\n\n---\n\n# Rendering pipeline\n\nTypical flow:\n\n Python package\n |\n Loader (static analysis)\n |\n Semantic model\n |\n Renderer\n |\n MkDocs site or MCP JSON\n\n---\n\n# Google-Styled Doc-Forge Convention (GSDFC)\n\nGSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.\n\n- Docstrings are the single source of truth.\n- `doc-forge` compiles docstrings but does not generate documentation content.\n- Documentation follows the Python import hierarchy.\n- Every public symbol should have a complete and accurate docstring.\n\n---\n\n## General rules\n\n- Use **Markdown headings** at package and module level.\n- Use **Google-style structured sections** at class, function, and method level.\n- Use type hints in signatures instead of duplicating types in prose.\n- Write summaries in imperative form.\n- Sections are separated by `---`\n\n---\n\n# Notes subsection grouping\n\nGroup related information using labeled subsections.\n\nExample:\n\n Notes:\n **Guarantees:**\n\n - deterministic behavior\n\n **Lifecycle:**\n\n - created during initialization\n - reused across executions\n\n **Thread safety:**\n\n - safe for concurrent reads\n\n---\n\n# Example formatting\n\n- Use indentation for examples.\n- Indent section contents using four spaces.\n- Use code blocks for example code.\n\nExample:\n Single example:\n\n Example:\n\n ```python\n foo = Foo(\"example\")\n process(foo, multiplier=2)\n ```\n\n Multiple examples:\n\n Example:\n Create foo:\n\n ```python\n foo = Foo(\"example\")\n ```\n\n Run engine:\n\n ```python\n engine = BarEngine([foo])\n engine.run()\n ```\n\nAvoid fenced code blocks inside structured sections.\n\n---\n\n# Separator rules\n\nUse horizontal separators only at docstring root level to separate sections:\n\n```markdown\n---\n```\n\nAllowed locations:\n\n- package docstrings\n- module docstrings\n- major documentation sections\n\nDo not use separators inside code sections.\n\n---\n\n# Package docstrings\n\nPackage docstrings act as the documentation home page.\n\nRecommended sections:\n\n # Summary\n # Installation\n # Quick start\n # CLI usage\n # Core concepts\n # Architecture\n # Rendering pipeline\n # Examples\n # Notes\n\nExample:\n Package Doc String:\n\n '''\n # Summary\n\n Foo-bar processing framework.\n\n Provides tools for defining Foo objects and executing Bar pipelines.\n\n ---\n\n # Installation\n\n ```bash\n pip install foo-bar\n ```\n\n ---\n\n # Quick start\n\n ```python\n from foobar import Foo, BarEngine\n\n foo = Foo(\"example\")\n engine = BarEngine([foo])\n\n result = engine.run()\n ```\n\n ---\n '''\n\n---\n\n# Module docstrings\n\nModule docstrings describe a subsystem.\n\nRecommended sections:\n\n # Summary\n # Examples\n # Notes\n\nExample:\n Module Doc String:\n\n '''\n # Summary\n\n Foo execution subsystem.\n\n Provides utilities for executing Foo objects through Bar stages.\n\n ---\n\n Example:\n\n ```python\n from foobar.engine import BarEngine\n from foobar.foo import Foo\n\n foo = Foo(\"example\")\n\n engine = BarEngine([foo])\n engine.run()\n ```\n\n ---\n '''\n\n---\n\n# Class docstrings\n\nClass docstrings define object responsibility, lifecycle, and attributes.\n\nRecommended sections:\n\n Attributes:\n Notes:\n Example:\n Raises:\n\nExample:\n Simple Foo:\n\n ```python\n class Foo:\n '''\n Represents a unit of work.\n\n Attributes:\n name (str):\n Identifier of the foo instance.\n\n value (int):\n Numeric value associated with foo.\n\n Notes:\n Guarantees:\n\n - instances are immutable after creation\n\n Lifecycle:\n\n - create instance\n - pass to processing engine\n\n Example:\n Create and inspect a Foo:\n\n ```python\n foo = Foo(\"example\", value=42)\n print(foo.name)\n ```\n '''\n ```\n\n Complex Bar:\n\n ```python\n class BarEngine:\n '''\n Executes Foo objects through Bar stages.\n\n Attributes:\n foos (tuple[Foo, ...]):\n Foo instances managed by the engine.\n\n Notes:\n Guarantees:\n\n - deterministic execution order\n\n Example:\n Run engine:\n\n ```python\n foo1 = Foo(\"a\")\n foo2 = Foo(\"b\")\n\n engine = BarEngine([foo1, foo2])\n engine.run()\n ```\n '''\n ```\n\n---\n\n# Function and method docstrings\n\nFunction docstrings define API contracts.\n\nRecommended sections:\n\n Args:\n Returns:\n Raises:\n Yields:\n Notes:\n Example:\n\nExample:\n Simple process method:\n\n ```python\n def process(foo: Foo, multiplier: int) -> int:\n '''\n Process a Foo instance.\n\n Args:\n foo (Foo):\n Foo instance to process.\n\n multiplier (int):\n Value used to scale foo.\n\n Returns:\n int:\n Processed result.\n\n Raises:\n ValueError:\n If multiplier is negative.\n\n Notes:\n Guarantees:\n\n - foo is not modified\n\n Example:\n Process foo:\n\n ```python\n foo = Foo(\"example\", value=10)\n\n result = process(foo, multiplier=2)\n print(result)\n ```\n '''\n ```\n\n Multiple Examples:\n\n ```python\n def combine(foo_a: Foo, foo_b: Foo) -> Foo:\n '''\n Combine two Foo instances.\n\n Args:\n foo_a (Foo):\n First foo.\n\n foo_b (Foo):\n Second foo.\n\n Returns:\n Foo:\n Combined foo.\n\n Example:\n Basic usage:\n\n ```python\n foo1 = Foo(\"a\")\n foo2 = Foo(\"b\")\n\n combined = combine(foo1, foo2)\n ```\n\n Pipeline usage:\n\n ```python\n engine = BarEngine([foo1, foo2])\n engine.run()\n ```\n '''\n ```\n\n---\n\n# Property docstrings\n\nProperties must document return values.\n\nExample:\n Property Doc String:\n\n ```python\n @property\n def foos(self) -> tuple[Foo, ...]:\n '''\n Return contained Foo instances.\n\n Returns:\n tuple[Foo, ...]:\n Stored foo objects.\n\n Example:\n ```python\n container = FooContainer()\n\n foos = container.foos\n ```\n '''\n ```\n\n---\n\n# Attribute documentation\n\nDocument attributes in class docstrings using `Attributes:`.\n\nExample:\n Attribute Doc String:\n\n ```python\n '''\n Represents a processing stage.\n\n Attributes:\n id (str):\n Unique identifier.\n\n enabled (bool):\n Whether the stage is active.\n '''\n ```\n\n---\n\n# Parsing guarantees\n\nGSDFC ensures doc-forge can deterministically extract:\n\n- symbol kind (module, class, function, property, attribute)\n- symbol name\n- parameters\n- return values\n- attributes\n- examples\n- structured Notes subsections\n\nThis enables:\n\n- reliable MkDocs rendering\n- deterministic MCP export\n- accurate AI semantic interpretation\n\n---\n\nNotes:\n - doc-forge never executes analyzed modules.\n - Documentation is generated entirely through static analysis.", + "docstring": "# Summary\n\nRenderer-agnostic Python documentation compiler that converts Python docstrings\ninto structured documentation for both humans (MkDocs) and machines (MCP / AI agents).\n\n`doc-forge` statically analyzes source code, builds a semantic model of modules,\nclasses, functions, and attributes, and renders that model into documentation\noutputs without executing user code.\n\n---\n\n# Installation\n\nInstall using pip:\n\n```bash\npip install doc-forge\n```\n\n---\n\n# CLI usage\n\n## Generate an MkDocs site from a Python package:\n\n```bash\ndoc-forge build --mkdocs --module my_package\n```\n\n## Generate MCP JSON documentation:\n\n```bash\ndoc-forge build --mcp --module my_package\n```\n\n\n## Generate MkDocs site and MCP JSON documentation:\n\n```bash\ndoc-forge build --mcp --mkdocs --module my_package\n```\n\n## Include a hand-written wiki in the MkDocs site:\n\n```bash\ndoc-forge build --wiki --mkdocs --module my_package\n```\n\n## Build wiki pages only (no module required):\n\n```bash\ndoc-forge build --wiki --site-name my_package\n```\n\n## Serve MkDocs locally:\n\n```bash\ndoc-forge serve --mkdocs --module my_package\n```\n\n## Serve MCP locally:\n\n```bash\ndoc-forge serve --mcp --module my_package\n```\n\n---\n\n# Core concepts\n\n## Loader\nExtracts symbols, signatures, and docstrings using static analysis.\n\n## Semantic model\nStructured, renderer-agnostic representation of the API.\n\n## Renderer\nConverts the semantic model into output formats such as MkDocs or MCP JSON.\n\n## Symbol\nAny documentable object\n\n- module\n- class\n- function\n- method\n- property\n- attribute\n\n---\n\n# Architecture\n\n`doc-forge` follows a compiler architecture:\n\n## Front-end:\n\nStatic analysis of modules, classes, functions, type hints, and docstrings.\n\n## Middle-end:\n\nBuilds a semantic model describing symbols and relationships.\n\n## Back-end:\n\nRenders documentation using interchangeable renderers.\n\nThis architecture ensures deterministic documentation generation.\n\n---\n\n# Rendering pipeline\n\nTypical flow:\n\n Python package\n |\n Loader (static analysis)\n |\n Semantic model\n |\n Renderer\n |\n MkDocs site or MCP JSON\n\n---\n\n# Google-Styled Doc-Forge Convention (GSDFC)\n\nGSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.\n\n- Docstrings are the single source of truth.\n- `doc-forge` compiles docstrings but does not generate documentation content.\n- Documentation follows the Python import hierarchy.\n- Every public symbol should have a complete and accurate docstring.\n\n---\n\n## General rules\n\n- Use **Markdown headings** at package and module level.\n- Use **Google-style structured sections** at class, function, and method level.\n- Use type hints in signatures.\n- Use parenthesized types in prose entries (`name (Type):`) that match the\n signature types. This keeps docstrings self-contained and machine-parseable.\n- Write summaries in imperative form.\n- Sections are separated by `---`\n\n---\n\n# Notes subsection grouping\n\nGroup related information using labeled subsections.\n\nExample:\n\n Notes:\n **Guarantees:**\n\n - deterministic behavior\n\n **Lifecycle:**\n\n - created during initialization\n - reused across executions\n\n **Thread safety:**\n\n - safe for concurrent reads\n\n---\n\n# Example formatting\n\n- Use indentation for examples.\n- Indent section contents using four spaces.\n- Use code blocks for example code.\n\nExample:\n Single example:\n\n Example:\n\n ```python\n foo = Foo(\"example\")\n process(foo, multiplier=2)\n ```\n\n Multiple examples:\n\n Example:\n Create foo:\n\n ```python\n foo = Foo(\"example\")\n ```\n\n Run engine:\n\n ```python\n engine = BarEngine([foo])\n engine.run()\n ```\n\nAvoid fenced code blocks inside argument descriptions and other prose lines.\n\nInside `Example:` sections, fenced `python` code blocks are allowed and must be\nindented four spaces, matching the examples below.\n\n---\n\n# Separator rules\n\nUse horizontal separators only at docstring root level to separate sections:\n\n```markdown\n---\n```\n\nAllowed locations:\n\n- package docstrings\n- module docstrings\n- major documentation sections\n\nDo not use separators inside code sections.\n\n---\n\n# Package docstrings\n\nPackage docstrings act as the documentation home page.\n\nRecommended sections:\n\n # Summary\n # Installation\n # Quick start\n # CLI usage\n # Core concepts\n # Architecture\n # Rendering pipeline\n # Examples\n # Notes\n\nExample:\n Package Doc String:\n\n '''\n # Summary\n\n Foo-bar processing framework.\n\n Provides tools for defining Foo objects and executing Bar pipelines.\n\n ---\n\n # Installation\n\n ```bash\n pip install foo-bar\n ```\n\n ---\n\n # Quick start\n\n ```python\n from foobar import Foo, BarEngine\n\n foo = Foo(\"example\")\n engine = BarEngine([foo])\n\n result = engine.run()\n ```\n\n ---\n '''\n\n---\n\n# Module docstrings\n\nModule docstrings describe a subsystem.\n\nRecommended sections:\n\n # Summary\n # Examples\n # Notes\n\nExample:\n Module Doc String:\n\n '''\n # Summary\n\n Foo execution subsystem.\n\n Provides utilities for executing Foo objects through Bar stages.\n\n ---\n\n Example:\n\n ```python\n from foobar.engine import BarEngine\n from foobar.foo import Foo\n\n foo = Foo(\"example\")\n\n engine = BarEngine([foo])\n engine.run()\n ```\n\n ---\n '''\n\n---\n\n# Class docstrings\n\nClass docstrings define object responsibility, lifecycle, and attributes.\n\nRecommended sections:\n\n Attributes:\n Notes:\n Example:\n Raises:\n\nExample:\n Simple Foo:\n\n ```python\n class Foo:\n '''\n Represents a unit of work.\n\n Attributes:\n name (str):\n Identifier of the foo instance.\n\n value (int):\n Numeric value associated with foo.\n\n Notes:\n Guarantees:\n\n - instances are immutable after creation\n\n Lifecycle:\n\n - create instance\n - pass to processing engine\n\n Example:\n Create and inspect a Foo:\n\n ```python\n foo = Foo(\"example\", value=42)\n print(foo.name)\n ```\n '''\n ```\n\n Complex Bar:\n\n ```python\n class BarEngine:\n '''\n Executes Foo objects through Bar stages.\n\n Attributes:\n foos (tuple[Foo, ...]):\n Foo instances managed by the engine.\n\n Notes:\n Guarantees:\n\n - deterministic execution order\n\n Example:\n Run engine:\n\n ```python\n foo1 = Foo(\"a\")\n foo2 = Foo(\"b\")\n\n engine = BarEngine([foo1, foo2])\n engine.run()\n ```\n '''\n ```\n\n---\n\n# Function and method docstrings\n\nFunction docstrings define API contracts.\n\nRecommended sections:\n\n Args:\n Returns:\n Raises:\n Yields:\n Notes:\n Example:\n\nExample:\n Simple process method:\n\n ```python\n def process(foo: Foo, multiplier: int) -> int:\n '''\n Process a Foo instance.\n\n Args:\n foo (Foo):\n Foo instance to process.\n\n multiplier (int):\n Value used to scale foo.\n\n Returns:\n int:\n Processed result.\n\n Raises:\n ValueError:\n If multiplier is negative.\n\n Notes:\n Guarantees:\n\n - foo is not modified\n\n Example:\n Process foo:\n\n ```python\n foo = Foo(\"example\", value=10)\n\n result = process(foo, multiplier=2)\n print(result)\n ```\n '''\n ```\n\n Multiple Examples:\n\n ```python\n def combine(foo_a: Foo, foo_b: Foo) -> Foo:\n '''\n Combine two Foo instances.\n\n Args:\n foo_a (Foo):\n First foo.\n\n foo_b (Foo):\n Second foo.\n\n Returns:\n Foo:\n Combined foo.\n\n Example:\n Basic usage:\n\n ```python\n foo1 = Foo(\"a\")\n foo2 = Foo(\"b\")\n\n combined = combine(foo1, foo2)\n ```\n\n Pipeline usage:\n\n ```python\n engine = BarEngine([foo1, foo2])\n engine.run()\n ```\n '''\n ```\n\n---\n\n# Property docstrings\n\nProperties must document return values.\n\nExample:\n Property Doc String:\n\n ```python\n @property\n def foos(self) -> tuple[Foo, ...]:\n '''\n Return contained Foo instances.\n\n Returns:\n tuple[Foo, ...]:\n Stored foo objects.\n\n Example:\n ```python\n container = FooContainer()\n\n foos = container.foos\n ```\n '''\n ```\n\n---\n\n# Attribute documentation\n\nDocument attributes in class docstrings using `Attributes:`.\n\nExample:\n Attribute Doc String:\n\n ```python\n '''\n Represents a processing stage.\n\n Attributes:\n id (str):\n Unique identifier.\n\n enabled (bool):\n Whether the stage is active.\n '''\n ```\n\n---\n\n# Parsing guarantees\n\nGSDFC ensures doc-forge can deterministically extract:\n\n- symbol kind (module, class, function, property, attribute)\n- symbol name\n- parameters\n- return values\n- attributes\n- examples\n- structured Notes subsections\n\nThis enables:\n\n- reliable MkDocs rendering\n- deterministic MCP export\n- accurate AI semantic interpretation\n\n---\n\nNotes:\n - doc-forge never executes analyzed modules.\n - Documentation is generated entirely through static analysis.", "objects": { "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -32,7 +32,7 @@ "kind": "function", "path": "docforge.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -53,14 +53,14 @@ "kind": "function", "path": "docforge.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -216,22 +216,22 @@ "name": "load_openapi_spec", "kind": "function", "path": "docforge.cli.api_utils.load_openapi_spec", - "signature": "", - "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path: Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." + "signature": "", + "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." }, "derive_metadata": { "name": "derive_metadata", "kind": "function", "path": "docforge.cli.api_utils.derive_metadata", - "signature": "", - "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec: Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." + "signature": "", + "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." }, "generate_api_sources": { "name": "generate_api_sources", "kind": "function", "path": "docforge.cli.api_utils.generate_api_sources", - "signature": "", - "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec: Parsed OpenAPI specification.\n docs_dir: Directory (for example ``docs/api``) where the swagger\n sources are written." + "signature": "", + "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written." }, "Any": { "name": "Any", @@ -247,7 +247,7 @@ "kind": "module", "path": "docforge.cli.commands", "signature": null, - "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.", + "docstring": "# Summary\n\nCommand definitions for the doc-forge CLI.\n\nProvides the CLI structure using Click, including build, serve, and tree commands.\n\n---\n\nNotes:\n - The `build` command validates requested modes before generating anything.\n - `--mkdocs`, `--api`, and `--wiki` share a single MkDocs build; `--mcp`\n generates a machine-readable bundle independently.\n\n---", "members": { "Path": { "name": "Path", @@ -340,21 +340,21 @@ "kind": "function", "path": "docforge.cli.commands.api_utils.load_openapi_spec", "signature": "", - "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path: Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." + "docstring": "Load and validate an OpenAPI specification from a JSON file.\n\nArgs:\n spec_path (Path):\n Path to the OpenAPI JSON specification file.\n\nReturns:\n dict:\n The parsed OpenAPI specification.\n\nRaises:\n click.ClickException:\n If the file cannot be read or the ``info`` block is invalid." }, "derive_metadata": { "name": "derive_metadata", "kind": "function", "path": "docforge.cli.commands.api_utils.derive_metadata", "signature": "", - "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec: Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." + "docstring": "Derive MkDocs site metadata from an OpenAPI spec ``info`` block.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n\nReturns:\n OpenAPIMetadata:\n Site name, description, and author derived from the spec." }, "generate_api_sources": { "name": "generate_api_sources", "kind": "function", "path": "docforge.cli.commands.api_utils.generate_api_sources", "signature": "", - "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec: Parsed OpenAPI specification.\n docs_dir: Directory (for example ``docs/api``) where the swagger\n sources are written." + "docstring": "Generate swagger-enabled Markdown sources and the spec copy.\n\nThe specification is written as ``openapi.json`` inside ``docs_dir`` and\nan ``index.md`` embedding the swagger UI is generated alongside it.\n\nArgs:\n spec (dict):\n Parsed OpenAPI specification.\n docs_dir (Path):\n Directory (for example ``docs/api``) where the swagger\n sources are written." }, "Any": { "name": "Any", @@ -370,7 +370,7 @@ "kind": "module", "path": "docforge.cli.commands.mcp_utils", "signature": "", - "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---", "members": { "Path": { "name": "Path", @@ -391,21 +391,21 @@ "kind": "class", "path": "docforge.cli.commands.mcp_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mcp_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -414,7 +414,7 @@ "kind": "function", "path": "docforge.cli.commands.mcp_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", @@ -444,7 +444,7 @@ "kind": "class", "path": "docforge.cli.commands.mcp_utils.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -474,7 +474,7 @@ "kind": "function", "path": "docforge.cli.commands.mcp_utils.generate_resources", "signature": "", - "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." + "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", @@ -490,7 +490,7 @@ "kind": "module", "path": "docforge.cli.commands.mkdocs_utils", "signature": "", - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A single generated `mkdocs.yml` serves lib, api, and wiki content with\n merged navigation. Wiki navigation, when enabled, precedes every other\n group and its `index.md` becomes the site `Home`.\n\n---", "members": { "os": { "name": "os", @@ -539,21 +539,21 @@ "kind": "class", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -562,7 +562,7 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -576,23 +576,30 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.cli.commands.mkdocs_utils.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -613,14 +620,14 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -629,14 +636,14 @@ "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_sources", "signature": "", - "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.commands.mkdocs_utils.generate_config", "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Optional[Iterable[str]]):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib`` or ``api``),\n merged on top of the shared ``mkdocs.common.yml`` template.\n\n site_description (Optional[str]):\n Optional site description written into the configuration.\n\n site_author (Optional[str]):\n Optional site author written into the configuration.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification (and, when a wiki directory is provided, from the wiki\nfile structure).\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories\nand hand-written wiki content under a ``wiki/`` subdirectory.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Iterable[str] | None):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib``, ``api``, or\n ``wiki``), merged on top of the shared ``mkdocs.common.yml``\n template.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n wiki_dir (Path | None):\n Optional path to a hand-written wiki directory (for example\n ``docs/wiki``). When provided, the site navigation is derived\n from the wiki file structure and placed before the navigation\n groups defined in ``nav_file``.\n\nRaises:\n click.FileError:\n If the navigation specification, template, or wiki directory\n cannot be found." }, "build": { "name": "build", @@ -659,21 +666,93 @@ "kind": "class", "path": "docforge.cli.commands.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.commands.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" + } + } + }, + "DocObject": { + "name": "DocObject", + "kind": "class", + "path": "docforge.cli.commands.DocObject", + "signature": "", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "members": { + "name": { + "name": "name", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.name", + "signature": "", + "docstring": null + }, + "kind": { + "name": "kind", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.kind", + "signature": "", + "docstring": null + }, + "path": { + "name": "path", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.path", + "signature": "", + "docstring": null + }, + "signature": { + "name": "signature", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.signature", + "signature": "", + "docstring": null + }, + "docstring": { + "name": "docstring", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.docstring", + "signature": "", + "docstring": null + }, + "members": { + "name": "members", + "kind": "attribute", + "path": "docforge.cli.commands.DocObject.members", + "signature": "", + "docstring": null + }, + "add_member": { + "name": "add_member", + "kind": "function", + "path": "docforge.cli.commands.DocObject.add_member", + "signature": "", + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." + }, + "get_member": { + "name": "get_member", + "kind": "function", + "path": "docforge.cli.commands.DocObject.get_member", + "signature": "", + "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." + }, + "get_all_members": { + "name": "get_all_members", + "kind": "function", + "path": "docforge.cli.commands.DocObject.get_all_members", + "signature": "", + "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." } } }, @@ -688,29 +767,22 @@ "name": "build", "kind": "function", "path": "docforge.cli.commands.build", - "signature": "", - "docstring": "Build documentation artifacts.\n\nThis command performs the full documentation build pipeline:\nstyle of the selected platform, generates renderer-specific\ndocumentation sources, and optionally builds the final output.\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites for library reference docs\n- Swagger-enabled API docs generated from an OpenAPI spec\n- MCP structured documentation resources\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs library documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (Optional[str]):\n Python module import path to document.\n\n openapi_spec (Optional[Path]):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (Optional[str]):\n Optional override for the project name.\n\n site_name (Optional[str]):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Optional[Path]):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." + "signature": "", + "docstring": "Build documentation artifacts.\n\nThis command runs the full documentation pipeline: it loads Python\nmodules, generates renderer-specific documentation sources, and\noptionally builds or serves the final output.\n\nDepending on the selected options, the build can target:\n\n- MkDocs static documentation sites for library reference docs\n- Swagger-enabled API docs generated from an OpenAPI spec\n- Hand-written wiki pages included in the MkDocs site\n- MCP structured documentation resources\n\nNotes:\n - At least one of `--mcp`, `--mkdocs`, `--wiki`, or `--api` must be\n provided.\n - `--mkdocs`, `--api`, and `--wiki` are combined into a single MkDocs\n build, while `--mcp` emits a machine-readable bundle.\n\nArgs:\n mcp (bool):\n Enable MCP documentation generation.\n\n mkdocs (bool):\n Enable MkDocs library documentation generation.\n\n api (bool):\n Enable API documentation generation from an OpenAPI spec.\n\n wiki (bool):\n Include a hand-written wiki directory in the MkDocs site.\n\n module_is_source (bool):\n Treat the specified module directory as the project root.\n\n module (str | None):\n Python module import path to document.\n\n openapi_spec (Path | None):\n Path to the OpenAPI JSON specification used for API docs.\n\n project_name (str | None):\n Optional override for the project name.\n\n site_name (str | None):\n Display name for the MkDocs site.\n\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n wiki_dir (Path):\n Directory containing hand-written wiki markdown files.\n\n nav_file (Path):\n Path to the navigation specification file.\n\n template (Path | None):\n Optional custom MkDocs configuration template.\n\n mkdocs_yml (Path):\n Output path for the generated MkDocs configuration.\n\n out_dir (Path):\n Output directory for generated MCP resources.\n\nRaises:\n click.UsageError:\n If required options are missing or conflicting." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.commands.serve", - "signature": "", - "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (Optional[str]):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." + "signature": "", + "docstring": "Serve generated documentation locally.\n\nDepending on the selected mode, this command starts either:\n\n- A MkDocs development server for browsing documentation\n- An MCP server exposing structured documentation resources\n\nArgs:\n mcp (bool):\n Serve documentation using the MCP server.\n\n mkdocs (bool):\n Serve the MkDocs development site.\n\n module (str | None):\n Python module import path to serve via MCP.\n\n mkdocs_yml (Path):\n Path to the MkDocs configuration file.\n\n out_dir (Path):\n Root directory containing MCP documentation resources.\n\nRaises:\n click.UsageError:\n If invalid or conflicting options are provided." }, "tree": { "name": "tree", "kind": "function", "path": "docforge.cli.commands.tree", - "signature": "", - "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (Optional[str]):\n Optional name to display as the project root." - }, - "Any": { - "name": "Any", - "kind": "alias", - "path": "docforge.cli.commands.Any", - "signature": "", - "docstring": null + "signature": "", + "docstring": "Display the documentation object tree for a module.\n\nThis command introspects the specified module and prints a\nhierarchical representation of the discovered documentation\nobjects, including modules, classes, functions, and members.\n\nArgs:\n module (str):\n Python module import path to introspect.\n\n project_name (str | None):\n Optional name to display as the project root." }, "Group": { "name": "Group", @@ -726,7 +798,7 @@ "kind": "module", "path": "docforge.cli.mcp_utils", "signature": null, - "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MCP in the doc-forge CLI.\n\n---\n\nNotes:\n - `generate_resources` produces the bundle consumed by `MCPServer`:\n `index.json`, `nav.json`, and per-module resources under `modules/`.\n - Resource URIs use the `docs://` scheme: `docs://index`, `docs://nav`,\n and `docs://modules/{module}`.\n\n---", "members": { "Path": { "name": "Path", @@ -747,21 +819,21 @@ "kind": "class", "path": "docforge.cli.mcp_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mcp_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -770,7 +842,7 @@ "kind": "function", "path": "docforge.cli.mcp_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MCPRenderer": { "name": "MCPRenderer", @@ -800,7 +872,7 @@ "kind": "class", "path": "docforge.cli.mcp_utils.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -829,14 +901,14 @@ "name": "generate_resources", "kind": "function", "path": "docforge.cli.mcp_utils.generate_resources", - "signature": "", - "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (Optional[str]):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." + "signature": "", + "docstring": "Generate MCP documentation resources from a Python module.\n\nThe function performs project introspection, builds the internal\ndocumentation model, and renders MCP-compatible JSON resources\nto the specified output directory.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n project_name (str | None):\n Optional override for the project name used in generated\n documentation metadata.\n\n out_dir (Path):\n Directory where MCP resources (index.json, nav.json, and module data)\n will be written." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mcp_utils.serve", - "signature": "", + "signature": "", "docstring": "Start an MCP server for a pre-generated documentation bundle.\n\nThe server exposes documentation resources such as project metadata,\nnavigation structure, and module documentation through MCP endpoints.\n\nArgs:\n module (str):\n Python module import path used to identify the served\n documentation instance.\n\n mcp_root (Path):\n Path to the directory containing the MCP documentation\n bundle (index.json, nav.json, and modules/).\n\nRaises:\n click.ClickException:\n If the MCP documentation bundle is missing required files or directories." } } @@ -846,7 +918,7 @@ "kind": "module", "path": "docforge.cli.mkdocs_utils", "signature": null, - "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.", + "docstring": "# Summary\n\nUtilities for working with MkDocs in the doc-forge CLI.\n\n---\n\nNotes:\n - A single generated `mkdocs.yml` serves lib, api, and wiki content with\n merged navigation. Wiki navigation, when enabled, precedes every other\n group and its `index.md` becomes the site `Home`.\n\n---", "members": { "os": { "name": "os", @@ -895,21 +967,21 @@ "kind": "class", "path": "docforge.cli.mkdocs_utils.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.cli.mkdocs_utils.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -918,7 +990,7 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -932,23 +1004,30 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.cli.mkdocs_utils.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "load_nav_spec": { "name": "load_nav_spec", "kind": "function", "path": "docforge.cli.mkdocs_utils.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "resolve_nav": { "name": "resolve_nav", "kind": "function", "path": "docforge.cli.mkdocs_utils.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsRenderer": { "name": "MkDocsRenderer", @@ -969,14 +1048,14 @@ "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.cli.mkdocs_utils.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -984,28 +1063,28 @@ "name": "generate_sources", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_sources", - "signature": "", - "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (Optional[str]):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (Optional[bool]):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." + "signature": "", + "docstring": "Generate MkDocs Markdown sources for a Python module.\n\nThis function introspects the specified module, builds the internal\ndocumentation model, and renders Markdown documentation files for\nuse with MkDocs.\n\nArgs:\n module (str):\n Python module import path used as the entry point for\n documentation generation.\n\n docs_dir (Path):\n Directory where the generated Markdown files will be written.\n\n project_name (str | None):\n Optional override for the project name used in documentation metadata.\n\n module_is_source (bool | None):\n If True, treat the specified module directory as the project root\n rather than a nested module.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written. If not\n provided, defaults to the parent of ``docs_dir``." }, "generate_config": { "name": "generate_config", "kind": "function", "path": "docforge.cli.mkdocs_utils.generate_config", - "signature": "", - "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification.\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Optional[Path]):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Optional[Iterable[str]]):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib`` or ``api``),\n merged on top of the shared ``mkdocs.common.yml`` template.\n\n site_description (Optional[str]):\n Optional site description written into the configuration.\n\n site_author (Optional[str]):\n Optional site author written into the configuration.\n\nRaises:\n click.FileError:\n If the navigation specification or template file cannot be found." + "signature": "", + "docstring": "Generate an `mkdocs.yml` configuration file.\n\nThe configuration is created by combining a template configuration\nwith a navigation structure derived from the docforge navigation\nspecification (and, when a wiki directory is provided, from the wiki\nfile structure).\n\nThe ``docs_dir`` is always written relative to the MkDocs root and is\nexpected to be the shared documentation parent (for example ``docs``),\nwith generated sources nested under ``lib/`` or ``api/`` subdirectories\nand hand-written wiki content under a ``wiki/`` subdirectory.\n\nArgs:\n docs_dir (Path):\n Shared documentation root used as the MkDocs ``docs_dir``.\n\n nav_file (Path):\n Path to the `docforge.nav.yml` navigation specification.\n\n template (Path | None):\n Optional path to a fully custom MkDocs configuration template.\n If not provided, built-in templates are merged; the provided\n template replaces the built-in templates entirely.\n\n out (Path):\n Destination path where the generated `mkdocs.yml` file will be written.\n\n site_name (str):\n Display name for the generated documentation site.\n\n modes (Iterable[str] | None):\n Documentation modes to enable. Each mode contributes its own\n built-in template fragment (for example ``lib``, ``api``, or\n ``wiki``), merged on top of the shared ``mkdocs.common.yml``\n template.\n\n site_description (str | None):\n Optional site description written into the configuration.\n\n site_author (str | None):\n Optional site author written into the configuration.\n\n wiki_dir (Path | None):\n Optional path to a hand-written wiki directory (for example\n ``docs/wiki``). When provided, the site navigation is derived\n from the wiki file structure and placed before the navigation\n groups defined in ``nav_file``.\n\nRaises:\n click.FileError:\n If the navigation specification, template, or wiki directory\n cannot be found." }, "build": { "name": "build", "kind": "function", "path": "docforge.cli.mkdocs_utils.build", - "signature": "", + "signature": "", "docstring": "Build the MkDocs documentation site.\n\nThis function loads the MkDocs configuration and runs the MkDocs\nbuild command to generate the final static documentation site.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist." }, "serve": { "name": "serve", "kind": "function", "path": "docforge.cli.mkdocs_utils.serve", - "signature": "", + "signature": "", "docstring": "Start an MkDocs development server with live reload.\n\nThe server watches documentation files and automatically reloads\nthe site when changes are detected.\n\nArgs:\n mkdocs_yml (Path):\n Path to the `mkdocs.yml` configuration file.\n\nRaises:\n click.ClickException:\n If the configuration file does not exist." } } @@ -1024,21 +1103,21 @@ "kind": "class", "path": "docforge.loaders.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -1047,14 +1126,14 @@ "kind": "function", "path": "docforge.loaders.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "griffe_loader": { "name": "griffe_loader", "kind": "module", "path": "docforge.loaders.griffe_loader", "signature": null, - "docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.", + "docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n\n---", "members": { "logging": { "name": "logging", @@ -1103,7 +1182,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -1152,7 +1231,7 @@ "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -1175,7 +1254,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -1226,7 +1305,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -1283,29 +1362,29 @@ "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", - "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "signature": "", + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", - "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "signature": "", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", - "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "signature": "", + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", - "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "signature": "", + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } } @@ -1325,7 +1404,7 @@ "kind": "class", "path": "docforge.models.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -1376,7 +1455,7 @@ "kind": "class", "path": "docforge.models.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -1427,7 +1506,7 @@ "kind": "class", "path": "docforge.models.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -1476,7 +1555,7 @@ "kind": "function", "path": "docforge.models.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -1499,7 +1578,7 @@ "kind": "module", "path": "docforge.models.module", "signature": null, - "docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.", + "docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.\n\n---\n\nNotes:\n - Only public members are stored; private names are filtered by the loader.\n\n---", "members": { "Iterable": { "name": "Iterable", @@ -1513,7 +1592,7 @@ "kind": "class", "path": "docforge.models.module.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -1562,7 +1641,7 @@ "kind": "function", "path": "docforge.models.module.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -1584,8 +1663,8 @@ "name": "Module", "kind": "class", "path": "docforge.models.module.Module", - "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "signature": "", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -1612,21 +1691,21 @@ "name": "add_object", "kind": "function", "path": "docforge.models.module.Module.add_object", - "signature": "", + "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.module.Module.get_object", - "signature": "", + "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.module.Module.get_all_objects", - "signature": "", + "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members." } } @@ -1638,7 +1717,7 @@ "kind": "module", "path": "docforge.models.object", "signature": null, - "docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.", + "docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.\n\n---\n\nNotes:\n - `DocObject` instances form a tree mirroring the Python import hierarchy.\n - Objects are renderer-agnostic and may be consumed by any renderer.\n\n---", "members": { "Iterable": { "name": "Iterable", @@ -1651,8 +1730,8 @@ "name": "DocObject", "kind": "class", "path": "docforge.models.object.DocObject", - "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "signature": "", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -1700,21 +1779,21 @@ "name": "add_member", "kind": "function", "path": "docforge.models.object.DocObject.add_member", - "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "signature": "", + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.object.DocObject.get_member", - "signature": "", + "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.object.DocObject.get_all_members", - "signature": "", + "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." } } @@ -1726,7 +1805,7 @@ "kind": "module", "path": "docforge.models.project", "signature": null, - "docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.", + "docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.\n\n---\n\nNotes:\n - Modules are keyed by their dotted import path.\n - Objects are renderer-agnostic; the same model feeds every renderer.\n\n---", "members": { "Iterable": { "name": "Iterable", @@ -1740,7 +1819,7 @@ "kind": "class", "path": "docforge.models.project.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -1790,8 +1869,8 @@ "name": "Project", "kind": "class", "path": "docforge.models.project.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -1811,28 +1890,28 @@ "name": "add_module", "kind": "function", "path": "docforge.models.project.Project.add_module", - "signature": "", + "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.models.project.Project.get_module", - "signature": "", + "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.project.Project.get_all_modules", - "signature": "", + "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.project.Project.get_module_list", - "signature": "", + "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project." } } @@ -1881,14 +1960,14 @@ "kind": "function", "path": "docforge.nav.NavSpec.load", "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.NavSpec.all_patterns", "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -1897,7 +1976,7 @@ "kind": "function", "path": "docforge.nav.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "ResolvedNav": { "name": "ResolvedNav", @@ -1925,7 +2004,7 @@ "kind": "function", "path": "docforge.nav.ResolvedNav.all_files", "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -1934,7 +2013,7 @@ "kind": "function", "path": "docforge.nav.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -1948,16 +2027,23 @@ "kind": "function", "path": "docforge.nav.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.nav.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "mkdocs": { "name": "mkdocs", "kind": "module", "path": "docforge.nav.mkdocs", "signature": null, - "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.", + "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.\n\n---\n\nNotes:\n - The emitted structure is a list of dictionaries, one per top-level nav\n entry, matching the MkDocs ``nav`` YAML format.\n\n---", "members": { "Path": { "name": "Path", @@ -1999,7 +2085,7 @@ "kind": "function", "path": "docforge.nav.mkdocs.ResolvedNav.all_files", "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -2007,15 +2093,15 @@ "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.mkdocs.MkDocsNavEmitter", - "signature": "", + "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } } @@ -2026,7 +2112,7 @@ "kind": "module", "path": "docforge.nav.resolver", "signature": null, - "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.", + "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.\n\n---\n\nNotes:\n - Glob resolution is recursive and returns paths in sorted order.\n - Unmatched patterns raise ``FileNotFoundError`` to fail fast on typos.\n\n---", "members": { "glob": { "name": "glob", @@ -2082,14 +2168,14 @@ "kind": "function", "path": "docforge.nav.resolver.NavSpec.load", "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.resolver.NavSpec.all_patterns", "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -2097,7 +2183,7 @@ "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", - "signature": "", + "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { @@ -2118,8 +2204,8 @@ "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", - "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "signature": "", + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -2127,8 +2213,8 @@ "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", - "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "signature": "", + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." } } }, @@ -2137,8 +2223,15 @@ "kind": "module", "path": "docforge.nav.spec", "signature": null, - "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).", + "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).\n\n---\n\nNotes:\n - The spec file supports an optional ``icon`` mapping for MkDocs theme\n customization.\n - All file references in ``groups`` are relative to the documentation root.\n\n---", "members": { + "annotations": { + "name": "annotations", + "kind": "alias", + "path": "docforge.nav.spec.annotations", + "signature": "", + "docstring": null + }, "Path": { "name": "Path", "kind": "alias", @@ -2157,7 +2250,7 @@ "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", - "signature": "", + "signature": "", "docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.", "members": { "home": { @@ -2185,15 +2278,15 @@ "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", - "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "signature": "", + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", - "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "signature": "", + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -2201,8 +2294,52 @@ "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", - "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "signature": "", + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + } + } + }, + "wiki": { + "name": "wiki", + "kind": "module", + "path": "docforge.nav.wiki", + "signature": null, + "docstring": "# Summary\n\nWiki navigation derivation.\n\nThis module provides ``build_wiki_nav``, which derives an MkDocs-ready\nnavigation block from the file structure of a hand-written wiki directory\n(typically ``docs/wiki``). wiki content is authored by hand and is never\nmodified by doc-forge; only the navigation layout is inferred.\n\n# Notes\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.", + "members": { + "re": { + "name": "re", + "kind": "alias", + "path": "docforge.nav.wiki.re", + "signature": "", + "docstring": null + }, + "Callable": { + "name": "Callable", + "kind": "alias", + "path": "docforge.nav.wiki.Callable", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.nav.wiki.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "docforge.nav.wiki.Any", + "signature": "", + "docstring": null + }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.nav.wiki.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." } } } @@ -2234,14 +2371,14 @@ "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -2294,7 +2431,7 @@ "kind": "class", "path": "docforge.renderers.base.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -2414,7 +2551,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -2463,7 +2600,7 @@ "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -2486,7 +2623,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -2537,7 +2674,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -2634,7 +2771,7 @@ "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -2685,7 +2822,7 @@ "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -2735,7 +2872,7 @@ "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { @@ -2750,14 +2887,14 @@ "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } } @@ -2777,7 +2914,7 @@ "kind": "class", "path": "docforge.servers.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -2807,7 +2944,7 @@ "kind": "module", "path": "docforge.servers.mcp_server", "signature": null, - "docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).", + "docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).\n\n---\n\nNotes:\n - The served bundle is generated offline by `MCPRenderer`.\n - Missing resources are reported as structured error dictionaries rather\n than raising exceptions.\n - The server exposes read-only resources and a single health-check tool.\n\n---", "members": { "annotations": { "name": "annotations", @@ -2855,8 +2992,8 @@ "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", - "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "signature": "", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -2876,7 +3013,7 @@ "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", - "signature": "", + "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`." } } diff --git a/doc-forge/mcp/modules/docforge.loaders.griffe_loader.json b/doc-forge/mcp/modules/docforge.loaders.griffe_loader.json index 316d34f..82f2bd7 100644 --- a/doc-forge/mcp/modules/docforge.loaders.griffe_loader.json +++ b/doc-forge/mcp/modules/docforge.loaders.griffe_loader.json @@ -2,7 +2,7 @@ "module": "docforge.loaders.griffe_loader", "content": { "path": "docforge.loaders.griffe_loader", - "docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.", + "docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n\n---", "objects": { "logging": { "name": "logging", @@ -51,7 +51,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -100,7 +100,7 @@ "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -123,7 +123,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -174,7 +174,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -231,29 +231,29 @@ "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", - "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "signature": "", + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", - "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "signature": "", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", - "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "signature": "", + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", - "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "signature": "", + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } } diff --git a/doc-forge/mcp/modules/docforge.loaders.json b/doc-forge/mcp/modules/docforge.loaders.json index fcfe8b7..ade3960 100644 --- a/doc-forge/mcp/modules/docforge.loaders.json +++ b/doc-forge/mcp/modules/docforge.loaders.json @@ -9,21 +9,21 @@ "kind": "class", "path": "docforge.loaders.GriffeLoader", "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_project", "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.GriffeLoader.load_module", "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } }, @@ -32,14 +32,14 @@ "kind": "function", "path": "docforge.loaders.discover_module_paths", "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "griffe_loader": { "name": "griffe_loader", "kind": "module", "path": "docforge.loaders.griffe_loader", "signature": null, - "docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.", + "docstring": "# Summary\n\nUtilities for loading and introspecting Python modules using Griffe.\n\nThis module provides the `GriffeLoader` class and helper utilities used to\ndiscover Python modules, introspect their structure, and convert the results\ninto doc-forge documentation models.\n\n---\n\nNotes:\n - All analysis is static; analyzed modules are never executed.\n - Private members (names starting with `_`) are skipped during conversion.\n\n---", "members": { "logging": { "name": "logging", @@ -88,7 +88,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -137,7 +137,7 @@ "kind": "function", "path": "docforge.loaders.griffe_loader.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -160,7 +160,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -211,7 +211,7 @@ "kind": "class", "path": "docforge.loaders.griffe_loader.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -268,29 +268,29 @@ "name": "discover_module_paths", "kind": "function", "path": "docforge.loaders.griffe_loader.discover_module_paths", - "signature": "", - "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path, optional):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n List[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." + "signature": "", + "docstring": "Discover Python modules within a package directory.\n\nThe function scans the filesystem for `.py` files inside the specified\npackage and converts them into dotted module import paths.\n\nDiscovery rules:\n\n- Directories containing `__init__.py` are treated as packages.\n- Each `.py` file is treated as a module.\n- Results are returned as dotted import paths.\n\nArgs:\n module_name (str):\n Top-level package name to discover modules from.\n\n project_root (Path | None):\n Root directory used to resolve module paths. If not provided, the\n current working directory is used.\n\nReturns:\n list[str]:\n A sorted list of unique dotted module import paths.\n\nRaises:\n FileNotFoundError:\n If the specified package directory does not exist." }, "GriffeLoader": { "name": "GriffeLoader", "kind": "class", "path": "docforge.loaders.griffe_loader.GriffeLoader", - "signature": "", - "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.", + "signature": "", + "docstring": "Load Python modules using Griffe and convert them into doc-forge models.\n\nThis loader uses the Griffe introspection engine to analyze Python source\ncode and transform the extracted information into `Project`, `Module`,\nand `DocObject` instances used by doc-forge.\n\nAttributes:\n _loader (_GriffeLoader):\n Internal Griffe loader with dedicated module and line collections.", "members": { "load_project": { "name": "load_project", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_project", - "signature": "", - "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (List[str]):\n List of dotted module import paths to load.\n\n project_name (str, optional):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool, optional):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." + "signature": "", + "docstring": "Load multiple modules and assemble them into a Project model.\n\nEach module path is introspected and converted into a `Module`\ninstance. All modules are then aggregated into a single `Project`\nobject.\n\nArgs:\n module_paths (list[str]):\n List of dotted module import paths to load.\n\n project_name (str | None):\n Optional override for the project name. Defaults to the top-level\n name of the first module.\n\n skip_import_errors (bool | None):\n If True, modules that fail to load will be skipped instead of raising an error.\n\nReturns:\n Project:\n A populated `Project` instance containing the loaded modules.\n\nRaises:\n ValueError:\n If no module paths are provided.\n\n ImportError:\n If a module fails to load and `skip_import_errors` is False." }, "load_module": { "name": "load_module", "kind": "function", "path": "docforge.loaders.griffe_loader.GriffeLoader.load_module", - "signature": "", - "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance." + "signature": "", + "docstring": "Load and convert a single Python module.\n\nThe module is introspected using Griffe and then transformed into\na doc-forge `Module` model.\n\nArgs:\n path (str):\n Dotted import path of the module.\n\nReturns:\n Module:\n A populated `Module` instance.\n\nRaises:\n ImportError:\n If the module cannot be loaded by Griffe.\n\n KeyError:\n If the loaded module is missing from the module collection.\n\nExample:\n Load a single module:\n\n ```python\n loader = GriffeLoader()\n module = loader.load_module(\"mypackage.submodule\")\n ```" } } } diff --git a/doc-forge/mcp/modules/docforge.models.json b/doc-forge/mcp/modules/docforge.models.json index 1d513fb..a167787 100644 --- a/doc-forge/mcp/modules/docforge.models.json +++ b/doc-forge/mcp/modules/docforge.models.json @@ -9,7 +9,7 @@ "kind": "class", "path": "docforge.models.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -60,7 +60,7 @@ "kind": "class", "path": "docforge.models.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -111,7 +111,7 @@ "kind": "class", "path": "docforge.models.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -160,7 +160,7 @@ "kind": "function", "path": "docforge.models.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -183,7 +183,7 @@ "kind": "module", "path": "docforge.models.module", "signature": null, - "docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.", + "docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.\n\n---\n\nNotes:\n - Only public members are stored; private names are filtered by the loader.\n\n---", "members": { "Iterable": { "name": "Iterable", @@ -197,7 +197,7 @@ "kind": "class", "path": "docforge.models.module.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -246,7 +246,7 @@ "kind": "function", "path": "docforge.models.module.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -268,8 +268,8 @@ "name": "Module", "kind": "class", "path": "docforge.models.module.Module", - "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "signature": "", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -296,21 +296,21 @@ "name": "add_object", "kind": "function", "path": "docforge.models.module.Module.add_object", - "signature": "", + "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.module.Module.get_object", - "signature": "", + "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.module.Module.get_all_objects", - "signature": "", + "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members." } } @@ -322,7 +322,7 @@ "kind": "module", "path": "docforge.models.object", "signature": null, - "docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.", + "docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.\n\n---\n\nNotes:\n - `DocObject` instances form a tree mirroring the Python import hierarchy.\n - Objects are renderer-agnostic and may be consumed by any renderer.\n\n---", "members": { "Iterable": { "name": "Iterable", @@ -335,8 +335,8 @@ "name": "DocObject", "kind": "class", "path": "docforge.models.object.DocObject", - "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "signature": "", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -384,21 +384,21 @@ "name": "add_member", "kind": "function", "path": "docforge.models.object.DocObject.add_member", - "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "signature": "", + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.object.DocObject.get_member", - "signature": "", + "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.object.DocObject.get_all_members", - "signature": "", + "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." } } @@ -410,7 +410,7 @@ "kind": "module", "path": "docforge.models.project", "signature": null, - "docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.", + "docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.\n\n---\n\nNotes:\n - Modules are keyed by their dotted import path.\n - Objects are renderer-agnostic; the same model feeds every renderer.\n\n---", "members": { "Iterable": { "name": "Iterable", @@ -424,7 +424,7 @@ "kind": "class", "path": "docforge.models.project.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -474,8 +474,8 @@ "name": "Project", "kind": "class", "path": "docforge.models.project.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -495,28 +495,28 @@ "name": "add_module", "kind": "function", "path": "docforge.models.project.Project.add_module", - "signature": "", + "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.models.project.Project.get_module", - "signature": "", + "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.project.Project.get_all_modules", - "signature": "", + "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.project.Project.get_module_list", - "signature": "", + "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project." } } diff --git a/doc-forge/mcp/modules/docforge.models.module.json b/doc-forge/mcp/modules/docforge.models.module.json index 55fb892..12cc47e 100644 --- a/doc-forge/mcp/modules/docforge.models.module.json +++ b/doc-forge/mcp/modules/docforge.models.module.json @@ -2,7 +2,7 @@ "module": "docforge.models.module", "content": { "path": "docforge.models.module", - "docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.", + "docstring": "# Summary\n\nDocumentation model representing a Python module or package.\n\nThis module defines the `Module` class used in the doc-forge documentation\nmodel. A `Module` acts as a container for top-level documented objects\n(classes, functions, variables, and other members) discovered during\nintrospection.\n\n---\n\nNotes:\n - Only public members are stored; private names are filtered by the loader.\n\n---", "objects": { "Iterable": { "name": "Iterable", @@ -16,7 +16,7 @@ "kind": "class", "path": "docforge.models.module.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -65,7 +65,7 @@ "kind": "function", "path": "docforge.models.module.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -87,8 +87,8 @@ "name": "Module", "kind": "class", "path": "docforge.models.module.Module", - "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "signature": "", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -115,21 +115,21 @@ "name": "add_object", "kind": "function", "path": "docforge.models.module.Module.add_object", - "signature": "", + "signature": "", "docstring": "Add a documented object to the module.\n\nArgs:\n obj (DocObject):\n Documentation object to register as a top-level member of the module." }, "get_object": { "name": "get_object", "kind": "function", "path": "docforge.models.module.Module.get_object", - "signature": "", + "signature": "", "docstring": "Retrieve a documented object by name.\n\nArgs:\n name (str):\n Name of the object to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If no object with the given name exists." }, "get_all_objects": { "name": "get_all_objects", "kind": "function", "path": "docforge.models.module.Module.get_all_objects", - "signature": "", + "signature": "", "docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing the module's public members." } } diff --git a/doc-forge/mcp/modules/docforge.models.object.json b/doc-forge/mcp/modules/docforge.models.object.json index 3c18f97..ff22ae4 100644 --- a/doc-forge/mcp/modules/docforge.models.object.json +++ b/doc-forge/mcp/modules/docforge.models.object.json @@ -2,7 +2,7 @@ "module": "docforge.models.object", "content": { "path": "docforge.models.object", - "docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.", + "docstring": "# Summary\n\nDocumentation model representing individual Python objects.\n\nThis module defines the `DocObject` class, the fundamental recursive unit of\nthe doc-forge documentation model. Each `DocObject` represents a Python\nentity such as a class, function, method, or attribute, and may contain nested\nmembers that form a hierarchical documentation structure.\n\n---\n\nNotes:\n - `DocObject` instances form a tree mirroring the Python import hierarchy.\n - Objects are renderer-agnostic and may be consumed by any renderer.\n\n---", "objects": { "Iterable": { "name": "Iterable", @@ -15,8 +15,8 @@ "name": "DocObject", "kind": "class", "path": "docforge.models.object.DocObject", - "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "signature": "", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -64,21 +64,21 @@ "name": "add_member", "kind": "function", "path": "docforge.models.object.DocObject.add_member", - "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "signature": "", + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", "kind": "function", "path": "docforge.models.object.DocObject.get_member", - "signature": "", + "signature": "", "docstring": "Retrieve a member object by name.\n\nArgs:\n name (str):\n Name of the member to retrieve.\n\nReturns:\n DocObject:\n The corresponding `DocObject` instance.\n\nRaises:\n KeyError:\n If the member does not exist." }, "get_all_members": { "name": "get_all_members", "kind": "function", "path": "docforge.models.object.DocObject.get_all_members", - "signature": "", + "signature": "", "docstring": "Return all child members of the object.\n\nReturns:\n Iterable[DocObject]:\n An iterable of `DocObject` instances representing nested members." } } diff --git a/doc-forge/mcp/modules/docforge.models.project.json b/doc-forge/mcp/modules/docforge.models.project.json index c91f83b..5ae72c9 100644 --- a/doc-forge/mcp/modules/docforge.models.project.json +++ b/doc-forge/mcp/modules/docforge.models.project.json @@ -2,7 +2,7 @@ "module": "docforge.models.project", "content": { "path": "docforge.models.project", - "docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.", + "docstring": "# Summary\n\nDocumentation model representing a project.\n\nThis module defines the `Project` class, the top-level container used by\ndoc-forge to represent a documented codebase. A `Project` aggregates multiple\nmodules and provides access to them through a unified interface.\n\n---\n\nNotes:\n - Modules are keyed by their dotted import path.\n - Objects are renderer-agnostic; the same model feeds every renderer.\n\n---", "objects": { "Iterable": { "name": "Iterable", @@ -16,7 +16,7 @@ "kind": "class", "path": "docforge.models.project.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -66,8 +66,8 @@ "name": "Project", "kind": "class", "path": "docforge.models.project.Project", - "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "signature": "", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -87,28 +87,28 @@ "name": "add_module", "kind": "function", "path": "docforge.models.project.Project.add_module", - "signature": "", + "signature": "", "docstring": "Register a module in the project.\n\nArgs:\n module (Module):\n Module instance to add to the project." }, "get_module": { "name": "get_module", "kind": "function", "path": "docforge.models.project.Project.get_module", - "signature": "", + "signature": "", "docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path (str):\n Fully qualified dotted module path (for example `pkg.module`).\n\nReturns:\n Module:\n The corresponding `Module` instance.\n\nRaises:\n KeyError:\n If the module does not exist in the project." }, "get_all_modules": { "name": "get_all_modules", "kind": "function", "path": "docforge.models.project.Project.get_all_modules", - "signature": "", + "signature": "", "docstring": "Return all modules contained in the project.\n\nReturns:\n Iterable[Module]:\n An iterable of `Module` instances." }, "get_module_list": { "name": "get_module_list", "kind": "function", "path": "docforge.models.project.Project.get_module_list", - "signature": "", + "signature": "", "docstring": "Return the list of module import paths.\n\nReturns:\n list[str]:\n A list containing the dotted paths of all modules in the project." } } diff --git a/doc-forge/mcp/modules/docforge.nav.json b/doc-forge/mcp/modules/docforge.nav.json index 85ef248..6cd1fae 100644 --- a/doc-forge/mcp/modules/docforge.nav.json +++ b/doc-forge/mcp/modules/docforge.nav.json @@ -37,14 +37,14 @@ "kind": "function", "path": "docforge.nav.NavSpec.load", "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.NavSpec.all_patterns", "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -53,7 +53,7 @@ "kind": "function", "path": "docforge.nav.load_nav_spec", "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." }, "ResolvedNav": { "name": "ResolvedNav", @@ -81,7 +81,7 @@ "kind": "function", "path": "docforge.nav.ResolvedNav.all_files", "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -90,7 +90,7 @@ "kind": "function", "path": "docforge.nav.resolve_nav", "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." }, "MkDocsNavEmitter": { "name": "MkDocsNavEmitter", @@ -104,16 +104,23 @@ "kind": "function", "path": "docforge.nav.MkDocsNavEmitter.emit", "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.nav.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + }, "mkdocs": { "name": "mkdocs", "kind": "module", "path": "docforge.nav.mkdocs", "signature": null, - "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.", + "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.\n\n---\n\nNotes:\n - The emitted structure is a list of dictionaries, one per top-level nav\n entry, matching the MkDocs ``nav`` YAML format.\n\n---", "members": { "Path": { "name": "Path", @@ -155,7 +162,7 @@ "kind": "function", "path": "docforge.nav.mkdocs.ResolvedNav.all_files", "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -163,15 +170,15 @@ "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.mkdocs.MkDocsNavEmitter", - "signature": "", + "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } } @@ -182,7 +189,7 @@ "kind": "module", "path": "docforge.nav.resolver", "signature": null, - "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.", + "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.\n\n---\n\nNotes:\n - Glob resolution is recursive and returns paths in sorted order.\n - Unmatched patterns raise ``FileNotFoundError`` to fail fast on typos.\n\n---", "members": { "glob": { "name": "glob", @@ -238,14 +245,14 @@ "kind": "function", "path": "docforge.nav.resolver.NavSpec.load", "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.resolver.NavSpec.all_patterns", "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -253,7 +260,7 @@ "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", - "signature": "", + "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { @@ -274,8 +281,8 @@ "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", - "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "signature": "", + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -283,8 +290,8 @@ "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", - "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "signature": "", + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." } } }, @@ -293,8 +300,15 @@ "kind": "module", "path": "docforge.nav.spec", "signature": null, - "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).", + "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).\n\n---\n\nNotes:\n - The spec file supports an optional ``icon`` mapping for MkDocs theme\n customization.\n - All file references in ``groups`` are relative to the documentation root.\n\n---", "members": { + "annotations": { + "name": "annotations", + "kind": "alias", + "path": "docforge.nav.spec.annotations", + "signature": "", + "docstring": null + }, "Path": { "name": "Path", "kind": "alias", @@ -313,7 +327,7 @@ "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", - "signature": "", + "signature": "", "docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.", "members": { "home": { @@ -341,15 +355,15 @@ "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", - "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "signature": "", + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", - "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "signature": "", + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -357,8 +371,52 @@ "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", - "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "signature": "", + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + } + } + }, + "wiki": { + "name": "wiki", + "kind": "module", + "path": "docforge.nav.wiki", + "signature": null, + "docstring": "# Summary\n\nWiki navigation derivation.\n\nThis module provides ``build_wiki_nav``, which derives an MkDocs-ready\nnavigation block from the file structure of a hand-written wiki directory\n(typically ``docs/wiki``). wiki content is authored by hand and is never\nmodified by doc-forge; only the navigation layout is inferred.\n\n# Notes\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.", + "members": { + "re": { + "name": "re", + "kind": "alias", + "path": "docforge.nav.wiki.re", + "signature": "", + "docstring": null + }, + "Callable": { + "name": "Callable", + "kind": "alias", + "path": "docforge.nav.wiki.Callable", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.nav.wiki.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "docforge.nav.wiki.Any", + "signature": "", + "docstring": null + }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.nav.wiki.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." } } } diff --git a/doc-forge/mcp/modules/docforge.nav.mkdocs.json b/doc-forge/mcp/modules/docforge.nav.mkdocs.json index 1bb40f9..9d272f8 100644 --- a/doc-forge/mcp/modules/docforge.nav.mkdocs.json +++ b/doc-forge/mcp/modules/docforge.nav.mkdocs.json @@ -2,7 +2,7 @@ "module": "docforge.nav.mkdocs", "content": { "path": "docforge.nav.mkdocs", - "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.", + "docstring": "MkDocs navigation emitter.\n\nThis module provides the ``MkDocsNavEmitter`` class, which converts a\n``ResolvedNav`` instance into the navigation structure required by the\nMkDocs ``nav`` configuration.\n\n---\n\nNotes:\n - The emitted structure is a list of dictionaries, one per top-level nav\n entry, matching the MkDocs ``nav`` YAML format.\n\n---", "objects": { "Path": { "name": "Path", @@ -44,7 +44,7 @@ "kind": "function", "path": "docforge.nav.mkdocs.ResolvedNav.all_files", "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -52,15 +52,15 @@ "name": "MkDocsNavEmitter", "kind": "class", "path": "docforge.nav.mkdocs.MkDocsNavEmitter", - "signature": "", + "signature": "", "docstring": "Emit MkDocs navigation structures from resolved navigation data.\n\nThe emitter transforms a ``ResolvedNav`` object into the YAML-compatible\nlist structure expected by the MkDocs ``nav`` configuration field.", "members": { "emit": { "name": "emit", "kind": "function", "path": "docforge.nav.mkdocs.MkDocsNavEmitter.emit", - "signature": "", - "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav: Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." + "signature": "", + "docstring": "Generate a navigation structure for ``mkdocs.yml``.\n\nArgs:\n nav (ResolvedNav):\n Resolved navigation data describing documentation groups\n and their associated Markdown files.\n\nReturns:\n list[dict[str, Any]]:\n A list of dictionaries representing the MkDocs navigation layout.\n Each dictionary maps a navigation label to a page or a list of\n pages." } } } diff --git a/doc-forge/mcp/modules/docforge.nav.resolver.json b/doc-forge/mcp/modules/docforge.nav.resolver.json index 2df085f..2f0432a 100644 --- a/doc-forge/mcp/modules/docforge.nav.resolver.json +++ b/doc-forge/mcp/modules/docforge.nav.resolver.json @@ -2,7 +2,7 @@ "module": "docforge.nav.resolver", "content": { "path": "docforge.nav.resolver", - "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.", + "docstring": "Navigation resolution utilities.\n\nThis module resolves a ``NavSpec`` against the filesystem by expanding glob\npatterns and validating that referenced documentation files exist.\n\n---\n\nNotes:\n - Glob resolution is recursive and returns paths in sorted order.\n - Unmatched patterns raise ``FileNotFoundError`` to fail fast on typos.\n\n---", "objects": { "glob": { "name": "glob", @@ -58,14 +58,14 @@ "kind": "function", "path": "docforge.nav.resolver.NavSpec.load", "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.resolver.NavSpec.all_patterns", "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -73,7 +73,7 @@ "name": "ResolvedNav", "kind": "class", "path": "docforge.nav.resolver.ResolvedNav", - "signature": "", + "signature": "", "docstring": "Resolved navigation structure.\n\nA ``ResolvedNav`` represents navigation data after glob patterns have been\nexpanded and paths validated against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page.\n groups: Mapping of navigation group titles to lists of resolved\n documentation file paths.", "members": { "home": { @@ -94,8 +94,8 @@ "name": "all_files", "kind": "function", "path": "docforge.nav.resolver.ResolvedNav.all_files", - "signature": "", - "docstring": "Iterate over all files referenced by the navigation structure.\n\nReturns:\n An iterable of ``Path`` objects representing documentation files.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." + "signature": "", + "docstring": "Iterate over all files referenced by the navigation structure.\n\nYields:\n Path:\n A documentation file referenced by the navigation, including\n the home page when defined.\n\nRaises:\n RuntimeError: If the home page is defined but the documentation\n root is not available for resolution." } } }, @@ -103,8 +103,8 @@ "name": "resolve_nav", "kind": "function", "path": "docforge.nav.resolver.resolve_nav", - "signature": "", - "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec: Navigation specification describing documentation layout.\n docs_root: Root directory containing documentation Markdown files.\n\nReturns:\n A ``ResolvedNav`` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." + "signature": "", + "docstring": "Resolve a navigation specification against the filesystem.\n\nThe function expands glob patterns defined in a ``NavSpec`` and verifies\nthat referenced documentation files exist within the documentation root.\n\nArgs:\n spec (NavSpec):\n Navigation specification describing documentation layout.\n docs_root (Path):\n Root directory containing documentation Markdown files.\n\nReturns:\n ResolvedNav:\n A `ResolvedNav` instance containing validated navigation paths.\n\nRaises:\n FileNotFoundError: If the documentation root does not exist or a\n navigation pattern does not match any files." } } } diff --git a/doc-forge/mcp/modules/docforge.nav.spec.json b/doc-forge/mcp/modules/docforge.nav.spec.json index ab0d693..825783a 100644 --- a/doc-forge/mcp/modules/docforge.nav.spec.json +++ b/doc-forge/mcp/modules/docforge.nav.spec.json @@ -2,8 +2,15 @@ "module": "docforge.nav.spec", "content": { "path": "docforge.nav.spec", - "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).", + "docstring": "Navigation specification model.\n\nThis module defines the ``NavSpec`` class, which represents the navigation\nstructure defined by the user in the doc-forge navigation specification\n(typically ``docforge.nav.yml``).\n\n---\n\nNotes:\n - The spec file supports an optional ``icon`` mapping for MkDocs theme\n customization.\n - All file references in ``groups`` are relative to the documentation root.\n\n---", "objects": { + "annotations": { + "name": "annotations", + "kind": "alias", + "path": "docforge.nav.spec.annotations", + "signature": "", + "docstring": null + }, "Path": { "name": "Path", "kind": "alias", @@ -22,7 +29,7 @@ "name": "NavSpec", "kind": "class", "path": "docforge.nav.spec.NavSpec", - "signature": "", + "signature": "", "docstring": "Parsed representation of a navigation specification.\n\nA ``NavSpec`` describes the intended documentation navigation layout before\nit is resolved against the filesystem.\n\nAttributes:\n home: Relative path to the documentation home page (for example\n ``index.md``).\n groups: Mapping of navigation group titles to lists of file patterns\n or glob expressions.\n icon: Optional mapping of theme icon entries (for example\n ``{\"logo\": \"material/code-tags\"}``) injected into the MkDocs\n theme as ``theme.icon``.", "members": { "home": { @@ -50,15 +57,15 @@ "name": "load", "kind": "function", "path": "docforge.nav.spec.NavSpec.load", - "signature": "", - "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path: Filesystem path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." + "signature": "", + "docstring": "Load a navigation specification from a YAML file.\n\nArgs:\n path (Path):\n Filesystem path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed configuration.\n\nRaises:\n FileNotFoundError: If the specified file does not exist.\n ValueError: If the file contents are not a valid navigation\n specification." }, "all_patterns": { "name": "all_patterns", "kind": "function", "path": "docforge.nav.spec.NavSpec.all_patterns", - "signature": "", - "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n A list containing the home document (if defined) and all\n group pattern entries." + "signature": "", + "docstring": "Return all path patterns referenced by the specification.\n\nReturns:\n list[str]:\n A list containing the home document (if defined) and all\n group pattern entries." } } }, @@ -66,8 +73,8 @@ "name": "load_nav_spec", "kind": "function", "path": "docforge.nav.spec.load_nav_spec", - "signature": "", - "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path: Path to the navigation specification file.\n\nReturns:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." + "signature": "", + "docstring": "Load a navigation specification file.\n\nThis helper function reads a YAML navigation file and constructs a\ncorresponding ``NavSpec`` instance.\n\nArgs:\n path (Path):\n Path to the navigation specification file.\n\nReturns:\n NavSpec:\n A ``NavSpec`` instance representing the parsed specification.\n\nRaises:\n FileNotFoundError: If the specification file does not exist.\n ValueError: If the YAML structure is invalid." } } } diff --git a/doc-forge/mcp/modules/docforge.nav.wiki.json b/doc-forge/mcp/modules/docforge.nav.wiki.json new file mode 100644 index 0000000..7fde14e --- /dev/null +++ b/doc-forge/mcp/modules/docforge.nav.wiki.json @@ -0,0 +1,44 @@ +{ + "module": "docforge.nav.wiki", + "content": { + "path": "docforge.nav.wiki", + "docstring": "# Summary\n\nWiki navigation derivation.\n\nThis module provides ``build_wiki_nav``, which derives an MkDocs-ready\nnavigation block from the file structure of a hand-written wiki directory\n(typically ``docs/wiki``). wiki content is authored by hand and is never\nmodified by doc-forge; only the navigation layout is inferred.\n\n# Notes\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.", + "objects": { + "re": { + "name": "re", + "kind": "alias", + "path": "docforge.nav.wiki.re", + "signature": "", + "docstring": null + }, + "Callable": { + "name": "Callable", + "kind": "alias", + "path": "docforge.nav.wiki.Callable", + "signature": "", + "docstring": null + }, + "Path": { + "name": "Path", + "kind": "alias", + "path": "docforge.nav.wiki.Path", + "signature": "", + "docstring": null + }, + "Any": { + "name": "Any", + "kind": "alias", + "path": "docforge.nav.wiki.Any", + "signature": "", + "docstring": null + }, + "build_wiki_nav": { + "name": "build_wiki_nav", + "kind": "function", + "path": "docforge.nav.wiki.build_wiki_nav", + "signature": "", + "docstring": "Derive an MkDocs navigation block from a wiki directory.\n\nReturned paths are relative to the parent of ``wiki_dir`` and carry the\nwiki directory name as their leading component (for example\n``wiki/01_overview.md`` when the wiki lives at ``docs/wiki``). This makes\nthe result directly usable in an MkDocs ``nav`` block with\n\n- ``index.md`` at the wiki root becomes the ``Home`` entry.\n- Page labels are derived from filenames: numeric order prefixes such as\n ``01_`` or ``02-`` are stripped, separators are replaced with spaces, and\n names are title-cased (``01_overview.md`` becomes ``Overview``).\n- Subdirectories become nested navigation groups. A nested ``index.md`` is\n rendered as the section root placed first inside the group.\n- Only ``.md`` files are considered; hidden entries are ignored.\n\nArgs:\n wiki_dir (Path):\n Path to the hand-written wiki directory, for example ``docs/wiki``.\n\nReturns:\n list[dict[str, Any]]:\n Navigation entries compatible with the MkDocs ``nav`` configuration.\n The list is empty if the wiki contains no Markdown files.\n\nRaises:\n FileNotFoundError:\n If the wiki directory does not exist." + } + } + } +} \ No newline at end of file diff --git a/doc-forge/mcp/modules/docforge.renderers.base.json b/doc-forge/mcp/modules/docforge.renderers.base.json index f19dd9b..3df962e 100644 --- a/doc-forge/mcp/modules/docforge.renderers.base.json +++ b/doc-forge/mcp/modules/docforge.renderers.base.json @@ -23,7 +23,7 @@ "kind": "class", "path": "docforge.renderers.base.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", diff --git a/doc-forge/mcp/modules/docforge.renderers.json b/doc-forge/mcp/modules/docforge.renderers.json index e2e2aa7..2f6f8fc 100644 --- a/doc-forge/mcp/modules/docforge.renderers.json +++ b/doc-forge/mcp/modules/docforge.renderers.json @@ -23,14 +23,14 @@ "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.MkDocsRenderer.generate_readme", "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } }, @@ -83,7 +83,7 @@ "kind": "class", "path": "docforge.renderers.base.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -203,7 +203,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -252,7 +252,7 @@ "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -275,7 +275,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -326,7 +326,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -423,7 +423,7 @@ "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -474,7 +474,7 @@ "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -524,7 +524,7 @@ "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { @@ -539,14 +539,14 @@ "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } } diff --git a/doc-forge/mcp/modules/docforge.renderers.mcp_renderer.json b/doc-forge/mcp/modules/docforge.renderers.mcp_renderer.json index 0fad6c6..3fc1e34 100644 --- a/doc-forge/mcp/modules/docforge.renderers.mcp_renderer.json +++ b/doc-forge/mcp/modules/docforge.renderers.mcp_renderer.json @@ -23,7 +23,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.DocObject", "signature": "", - "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (Optional[str]):\n Callable signature if the object represents a callable.\n\n docstring (Optional[str]):\n Raw docstring text extracted from the source code.\n\n members (Dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", + "docstring": "Representation of a documented Python object.\n\nA `DocObject` models a single Python entity discovered during\nintrospection. Objects may contain nested members, allowing the structure\nof modules, classes, and other containers to be represented recursively.\n\nAttributes:\n name (str):\n Local name of the object.\n\n kind (str):\n Type of object (for example `class`, `function`, `method`, or `attribute`).\n\n path (str):\n Fully qualified dotted path to the object.\n\n signature (str | None):\n Callable signature if the object represents a callable.\n\n docstring (str | None):\n Raw docstring text extracted from the source code.\n\n members (dict[str, DocObject]):\n Mapping of member names to child `DocObject` instances.", "members": { "name": { "name": "name", @@ -72,7 +72,7 @@ "kind": "function", "path": "docforge.renderers.mcp_renderer.DocObject.add_member", "signature": "", - "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj: Documentation object to add as a member." + "docstring": "Add a child documentation object.\n\nThis is typically used when attaching methods to classes or\nnested objects to their parent containers.\n\nArgs:\n obj (DocObject):\n Documentation object to add as a member." }, "get_member": { "name": "get_member", @@ -95,7 +95,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -146,7 +146,7 @@ "kind": "class", "path": "docforge.renderers.mcp_renderer.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", diff --git a/doc-forge/mcp/modules/docforge.renderers.mkdocs_renderer.json b/doc-forge/mcp/modules/docforge.renderers.mkdocs_renderer.json index 352c9cd..1e468a0 100644 --- a/doc-forge/mcp/modules/docforge.renderers.mkdocs_renderer.json +++ b/doc-forge/mcp/modules/docforge.renderers.mkdocs_renderer.json @@ -16,7 +16,7 @@ "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Module", "signature": "", - "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (Optional[str]):\n Module-level documentation string, if present.\n\n members (Dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", + "docstring": "Representation of a documented Python module or package.\n\nA `Module` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path (str):\n Dotted import path of the module.\n\n docstring (str | None):\n Module-level documentation string, if present.\n\n members (dict[str, DocObject]):\n Mapping of object names to their corresponding `DocObject` representations.", "members": { "path": { "name": "path", @@ -67,7 +67,7 @@ "kind": "class", "path": "docforge.renderers.mkdocs_renderer.Project", "signature": "", - "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (Dict[str, Module]):\n Mapping of module paths to `Module` instances.", + "docstring": "Representation of a documentation project.\n\nA `Project` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name (str):\n Name of the project.\n\n modules (dict[str, Module]):\n Mapping of module paths to `Module` instances.", "members": { "name": { "name": "name", @@ -117,7 +117,7 @@ "name": "MkDocsRenderer", "kind": "class", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer", - "signature": "", + "signature": "", "docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.", "members": { "name": { @@ -132,14 +132,14 @@ "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources", "signature": "", - "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool, optional):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." + "docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project (Project):\n Project model containing modules to document.\n\n out_dir (Path):\n Directory where generated Markdown files will be written.\n\n module_is_source (bool | None):\n If True, treat the specified module as the documentation root\n rather than nesting it inside a folder." }, "generate_readme": { "name": "generate_readme", "kind": "function", "path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme", - "signature": "", - "docstring": "Generate a `README.md` file from the root module docstring.\n\nBehavior:\n\n- If `module_is_source` is True, `README.md` is written to the project\n root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (Optional[bool]):\n Whether the module is treated as the project source root.\n\n readme_dir (Optional[Path]):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." + "signature": "", + "docstring": "Generate a `README.md` file from the root module docstring.\n\nNotes:\n - If `module_is_source` is True, `README.md` is written to the\n project root directory.\n - If False, README generation is currently not implemented.\n\nArgs:\n project (Project):\n Project model containing documentation metadata.\n\n docs_dir (Path):\n Directory containing generated documentation sources.\n\n module_is_source (bool | None):\n Whether the module is treated as the project source root.\n\n readme_dir (Path | None):\n Directory where the generated README.md should be written.\n Defaults to the parent of `docs_dir`." } } } diff --git a/doc-forge/mcp/modules/docforge.servers.json b/doc-forge/mcp/modules/docforge.servers.json index 7d09733..c82cf66 100644 --- a/doc-forge/mcp/modules/docforge.servers.json +++ b/doc-forge/mcp/modules/docforge.servers.json @@ -9,7 +9,7 @@ "kind": "class", "path": "docforge.servers.MCPServer", "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -39,7 +39,7 @@ "kind": "module", "path": "docforge.servers.mcp_server", "signature": null, - "docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).", + "docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).\n\n---\n\nNotes:\n - The served bundle is generated offline by `MCPRenderer`.\n - Missing resources are reported as structured error dictionaries rather\n than raising exceptions.\n - The server exposes read-only resources and a single health-check tool.\n\n---", "members": { "annotations": { "name": "annotations", @@ -87,8 +87,8 @@ "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", - "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "signature": "", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -108,7 +108,7 @@ "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", - "signature": "", + "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`." } } diff --git a/doc-forge/mcp/modules/docforge.servers.mcp_server.json b/doc-forge/mcp/modules/docforge.servers.mcp_server.json index 372c906..a7a69f8 100644 --- a/doc-forge/mcp/modules/docforge.servers.mcp_server.json +++ b/doc-forge/mcp/modules/docforge.servers.mcp_server.json @@ -2,7 +2,7 @@ "module": "docforge.servers.mcp_server", "content": { "path": "docforge.servers.mcp_server", - "docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).", + "docstring": "# Summary\n\nMCP server implementation.\n\nThis module defines the `MCPServer` class, which serves pre-generated\ndocumentation bundles through the Model Context Protocol (MCP).\n\n---\n\nNotes:\n - The served bundle is generated offline by `MCPRenderer`.\n - Missing resources are reported as structured error dictionaries rather\n than raising exceptions.\n - The server exposes read-only resources and a single health-check tool.\n\n---", "objects": { "annotations": { "name": "annotations", @@ -50,8 +50,8 @@ "name": "MCPServer", "kind": "class", "path": "docforge.servers.mcp_server.MCPServer", - "signature": "", - "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.", + "signature": "", + "docstring": "MCP server for serving a pre-generated documentation bundle.\n\nThe server exposes documentation resources and diagnostic tools through\nMCP endpoints backed by JSON files generated by the MCP renderer.\n\nAttributes:\n mcp_root (Path):\n Directory containing the generated MCP documentation bundle.\n\n app (FastMCP):\n Underlying FastMCP application instance that registers resources\n and tools.", "members": { "mcp_root": { "name": "mcp_root", @@ -71,7 +71,7 @@ "name": "run", "kind": "function", "path": "docforge.servers.mcp_server.MCPServer.run", - "signature": "", + "signature": "", "docstring": "Start the MCP server.\n\nArgs:\n transport (Literal[\"stdio\", \"sse\", \"streamable-http\"]):\n Transport mechanism used by the MCP server. Supported options\n include `stdio`, `sse`, and `streamable-http`." } } diff --git a/doc-forge/mcp/nav.json b/doc-forge/mcp/nav.json index 8f62362..c73b16b 100644 --- a/doc-forge/mcp/nav.json +++ b/doc-forge/mcp/nav.json @@ -1,94 +1,98 @@ [ { "module": "docforge", - "resource": "doc://modules/docforge" + "resource": "docs://modules/docforge" }, { "module": "docforge.cli", - "resource": "doc://modules/docforge.cli" + "resource": "docs://modules/docforge.cli" }, { "module": "docforge.cli.api_utils", - "resource": "doc://modules/docforge.cli.api_utils" + "resource": "docs://modules/docforge.cli.api_utils" }, { "module": "docforge.cli.commands", - "resource": "doc://modules/docforge.cli.commands" + "resource": "docs://modules/docforge.cli.commands" }, { "module": "docforge.cli.main", - "resource": "doc://modules/docforge.cli.main" + "resource": "docs://modules/docforge.cli.main" }, { "module": "docforge.cli.mcp_utils", - "resource": "doc://modules/docforge.cli.mcp_utils" + "resource": "docs://modules/docforge.cli.mcp_utils" }, { "module": "docforge.cli.mkdocs_utils", - "resource": "doc://modules/docforge.cli.mkdocs_utils" + "resource": "docs://modules/docforge.cli.mkdocs_utils" }, { "module": "docforge.loaders", - "resource": "doc://modules/docforge.loaders" + "resource": "docs://modules/docforge.loaders" }, { "module": "docforge.loaders.griffe_loader", - "resource": "doc://modules/docforge.loaders.griffe_loader" + "resource": "docs://modules/docforge.loaders.griffe_loader" }, { "module": "docforge.models", - "resource": "doc://modules/docforge.models" + "resource": "docs://modules/docforge.models" }, { "module": "docforge.models.module", - "resource": "doc://modules/docforge.models.module" + "resource": "docs://modules/docforge.models.module" }, { "module": "docforge.models.object", - "resource": "doc://modules/docforge.models.object" + "resource": "docs://modules/docforge.models.object" }, { "module": "docforge.models.project", - "resource": "doc://modules/docforge.models.project" + "resource": "docs://modules/docforge.models.project" }, { "module": "docforge.nav", - "resource": "doc://modules/docforge.nav" + "resource": "docs://modules/docforge.nav" }, { "module": "docforge.nav.mkdocs", - "resource": "doc://modules/docforge.nav.mkdocs" + "resource": "docs://modules/docforge.nav.mkdocs" }, { "module": "docforge.nav.resolver", - "resource": "doc://modules/docforge.nav.resolver" + "resource": "docs://modules/docforge.nav.resolver" }, { "module": "docforge.nav.spec", - "resource": "doc://modules/docforge.nav.spec" + "resource": "docs://modules/docforge.nav.spec" + }, + { + "module": "docforge.nav.wiki", + "resource": "docs://modules/docforge.nav.wiki" }, { "module": "docforge.renderers", - "resource": "doc://modules/docforge.renderers" + "resource": "docs://modules/docforge.renderers" }, { "module": "docforge.renderers.base", - "resource": "doc://modules/docforge.renderers.base" + "resource": "docs://modules/docforge.renderers.base" }, { "module": "docforge.renderers.mcp_renderer", - "resource": "doc://modules/docforge.renderers.mcp_renderer" + "resource": "docs://modules/docforge.renderers.mcp_renderer" }, { "module": "docforge.renderers.mkdocs_renderer", - "resource": "doc://modules/docforge.renderers.mkdocs_renderer" + "resource": "docs://modules/docforge.renderers.mkdocs_renderer" }, { "module": "docforge.servers", - "resource": "doc://modules/docforge.servers" + "resource": "docs://modules/docforge.servers" }, { "module": "docforge.servers.mcp_server", - "resource": "doc://modules/docforge.servers.mcp_server" + "resource": "docs://modules/docforge.servers.mcp_server" } ] \ No newline at end of file diff --git a/doc-forge/objects.inv b/doc-forge/objects.inv index 46cacd7bff6230e69b9da0f0a5e30e7ba84961e1..37767ec533cfa9d67fefd04fa7dd6f4c55dd380f 100644 GIT binary patch delta 1129 zcmV-v1eW`Q3e^dadw;!|&2F495XbL*ij|scsgh%FRa;e+nhzxpfV|+{y5VDm*{%Ba zH5iP+@_B@vqRk+`R?@hQ(5Qdg70p3h1h?5f3y4WE+3vI-y3l_ z@SioydDEF@1(PypnH1_zI$)LRaIUge)D=;9YURU6+wc|gl8FlJtnPuw-iQEKJ{eGzTc|32 z{WagNLb-tn zUWe8%623Xo>WMWxN`P15t!E{o`nPB*8?S$qAK2wvDcaU`QL&4KSO2++Fn(p{&b62u zY)_6!cF#%wh*y!SsRFI)reh(&=>Kay*gnmY$m;4Kj#tPL;oKIB>`x&od+rIum-V>< zV|QCYp?}U_)OyhEkOrc)qm^!0|W47~2dg8Z*PIEk7#oO0~r zNehz`Fr70i3h7EmSeQ*IV|>IbN_-6`;qu3Oxi^7RGCx=csZUd+6zpgo{@uYcQkF_3B}gHbIy=yoAjv*uR1;t&n?(7*)d6Um!?Wt#mKL z3uxHYV4QSCQ%5-Etdg;w`V%5q^sL`Z^9P;8aEO+m5Az`4&Vtp*T?i)gzsqAP{l*OT zhJNJLkUAxnf%Q#@1(s>LZ5Zws8u;3wnSaR_4t!S`SYk&mnA#~8ug+Z*(^R?&FQ(BA z8Ho=WXk^?s=);vA=vdu^=TGwyF#^sadO5e9r5;C`>63NT&I{c{Rd2N@Zs-QlH vPsC0c%*SNN8u|tuB}&2F495XbL*ib&11RL!xsDy^zY&4-c)KrDE-ZunSXcB{U9 zZ7^WKGoAr@iUR)sW;`<V1;^xy$E)O3wd*kE#+nW#X`v0Qu zwLBih&nn48Z8T|~C`FeFWwZ zI|Jr)R|^?XqP~hfBGA-g3#UkAi5H<60SE^*W*pLcGUro|DTEPwE`ky2eO`e~cQl54 zHHn9TZC%uEN!cro7Q|;#rIj9GpYHKFX?{(+ALzbc3V&L1o`=LHOG_kaS)eHY!u3%m zD;NdsT3;@=+Z{Y6*KdVv8iZXYSBJ0vTS~)rIMqBAU~Ez^=LEY2#((6SjP*pZ@?Az{ zrp3(s_r>BG8`eu&l}CBnGhCc4C70dqd2}F``<-AWrc%s^X(74Z2(pvy3NZt;rUHj0 zTq)?zJ%4Zez_J_J>;BQ`TOM5*c-iBE;CDWpM2#R$Iko=8`4AItI47ehq)4~Ar$aw4 zZ)4Pk#AKh>U2v2^Bb0pdU0;#wJ&c6wfN$ktaGaF_D+}VEN0(XrUKcdLt#K?uvt7CK z+R<*Nmpgb@+xop&9{v1omt%bkfFX*KOqZP~4u4%?&!$U5oJ12Rd2TUk6K9nx^Xj82 z+R0Z3U^Ni*{meUtS`S&}#9~#DC0*8`WaaRWG-_N}(=8m6Q_ ze7gKD8&r4Q|0tT8LTjAhDx>1*G;;m(kXsxawZ5G8d4QF{e#$|Rx+@Dv?zL>{7B`(O zg?}&V_BN^owh;84!wiQvN0LXJX2}AQnZjUQ!bw52?}77C$Vm!E6$$;< z~Yyy5;Kd z%*o_@HXn0o&_e7$X;a+e6g!0%jxj>%Ykv{wEzo#Vlh!ET=hdrs zg{h6NK>&8oBD24?P^x1(5{|%h9J#se!)GpZ*w diff --git a/doc-forge/search/search_index.json b/doc-forge/search/search_index.json index a845cbb..eafaff0 100644 --- a/doc-forge/search/search_index.json +++ b/doc-forge/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"lib/","title":"docforge","text":"
        • Docforge
        "},{"location":"lib/#docforge","title":"docforge","text":""},{"location":"lib/#docforge--summary","title":"Summary","text":"

        Renderer-agnostic Python documentation compiler that converts Python docstrings into structured documentation for both humans (MkDocs) and machines (MCP / AI agents).

        doc-forge statically analyzes source code, builds a semantic model of modules, classes, functions, and attributes, and renders that model into documentation outputs without executing user code.

        "},{"location":"lib/#docforge--installation","title":"Installation","text":"

        Install using pip:

        pip install doc-forge\n
        "},{"location":"lib/#docforge--cli-usage","title":"CLI usage","text":""},{"location":"lib/#docforge--generate-an-mkdocs-site-from-a-python-package","title":"Generate an MkDocs site from a Python package:","text":"
        doc-forge build --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--generate-mcp-json-documentation","title":"Generate MCP JSON documentation:","text":"
        doc-forge build --mcp --module my_package\n
        "},{"location":"lib/#docforge--generate-mkdocs-site-and-mcp-json-documentation","title":"Generate MkDocs site and MCP JSON documentation:","text":"
        doc-forge build --mcp --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--serve-mkdocs-locally","title":"Serve MkDocs locally:","text":"
        doc-forge serve --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--serve-mcp-locally","title":"Serve MCP locally:","text":"
        doc-forge serve --mcp --module my_package\n
        "},{"location":"lib/#docforge--core-concepts","title":"Core concepts","text":""},{"location":"lib/#docforge--loader","title":"Loader","text":"

        Extracts symbols, signatures, and docstrings using static analysis.

        "},{"location":"lib/#docforge--semantic-model","title":"Semantic model","text":"

        Structured, renderer-agnostic representation of the API.

        "},{"location":"lib/#docforge--renderer","title":"Renderer","text":"

        Converts the semantic model into output formats such as MkDocs or MCP JSON.

        "},{"location":"lib/#docforge--symbol","title":"Symbol","text":"

        Any documentable object

        • module
        • class
        • function
        • method
        • property
        • attribute
        "},{"location":"lib/#docforge--architecture","title":"Architecture","text":"

        doc-forge follows a compiler architecture:

        "},{"location":"lib/#docforge--front-end","title":"Front-end:","text":"

        Static analysis of modules, classes, functions, type hints, and docstrings.

        "},{"location":"lib/#docforge--middle-end","title":"Middle-end:","text":"

        Builds a semantic model describing symbols and relationships.

        "},{"location":"lib/#docforge--back-end","title":"Back-end:","text":"

        Renders documentation using interchangeable renderers.

        This architecture ensures deterministic documentation generation.

        "},{"location":"lib/#docforge--rendering-pipeline","title":"Rendering pipeline","text":"

        Typical flow:

        Python package\n    |\nLoader (static analysis)\n    |\nSemantic model\n    |\nRenderer\n    |\nMkDocs site or MCP JSON\n
        "},{"location":"lib/#docforge--google-styled-doc-forge-convention-gsdfc","title":"Google-Styled Doc-Forge Convention (GSDFC)","text":"

        GSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.

        • Docstrings are the single source of truth.
        • doc-forge compiles docstrings but does not generate documentation content.
        • Documentation follows the Python import hierarchy.
        • Every public symbol should have a complete and accurate docstring.
        "},{"location":"lib/#docforge--general-rules","title":"General rules","text":"
        • Use Markdown headings at package and module level.
        • Use Google-style structured sections at class, function, and method level.
        • Use type hints in signatures instead of duplicating types in prose.
        • Write summaries in imperative form.
        • Sections are separated by ---
        "},{"location":"lib/#docforge--notes-subsection-grouping","title":"Notes subsection grouping","text":"

        Group related information using labeled subsections.

        Example:

        Notes:\n    **Guarantees:**\n\n        - deterministic behavior\n\n    **Lifecycle:**\n\n        - created during initialization\n        - reused across executions\n\n    **Thread safety:**\n\n        - safe for concurrent reads\n
        "},{"location":"lib/#docforge--example-formatting","title":"Example formatting","text":"
        • Use indentation for examples.
        • Indent section contents using four spaces.
        • Use code blocks for example code.
        Example

        Single example:

        Example:\n\n    ```python\n    foo = Foo(\"example\")\n    process(foo, multiplier=2)\n    ```\n

        Multiple examples:

        Example:\n    Create foo:\n\n        ```python\n        foo = Foo(\"example\")\n        ```\n\n    Run engine:\n\n        ```python\n        engine = BarEngine([foo])\n        engine.run()\n        ```\n

        Avoid fenced code blocks inside structured sections.

        "},{"location":"lib/#docforge--separator-rules","title":"Separator rules","text":"

        Use horizontal separators only at docstring root level to separate sections:

        ---\n

        Allowed locations:

        • package docstrings
        • module docstrings
        • major documentation sections

        Do not use separators inside code sections.

        "},{"location":"lib/#docforge--package-docstrings","title":"Package docstrings","text":"

        Package docstrings act as the documentation home page.

        Recommended sections:

        # Summary\n# Installation\n# Quick start\n# CLI usage\n# Core concepts\n# Architecture\n# Rendering pipeline\n# Examples\n# Notes\n
        Example

        Package Doc String:

        '''\n# Summary\n\nFoo-bar processing framework.\n\nProvides tools for defining Foo objects and executing Bar pipelines.\n\n---\n\n# Installation\n\n```bash\npip install foo-bar\n```\n\n---\n\n# Quick start\n\n```python\nfrom foobar import Foo, BarEngine\n\nfoo = Foo(\"example\")\nengine = BarEngine([foo])\n\nresult = engine.run()\n```\n\n---\n'''\n
        "},{"location":"lib/#docforge--module-docstrings","title":"Module docstrings","text":"

        Module docstrings describe a subsystem.

        Recommended sections:

        # Summary\n# Examples\n# Notes\n
        Example

        Module Doc String:

        '''\n# Summary\n\nFoo execution subsystem.\n\nProvides utilities for executing Foo objects through Bar stages.\n\n---\n\nExample:\n\n    ```python\n    from foobar.engine import BarEngine\n    from foobar.foo import Foo\n\n    foo = Foo(\"example\")\n\n    engine = BarEngine([foo])\n    engine.run()\n    ```\n\n---\n'''\n
        "},{"location":"lib/#docforge--class-docstrings","title":"Class docstrings","text":"

        Class docstrings define object responsibility, lifecycle, and attributes.

        Recommended sections:

        Attributes:\nNotes:\nExample:\nRaises:\n
        Example

        Simple Foo:

        class Foo:\n    '''\n    Represents a unit of work.\n\n    Attributes:\n        name (str):\n            Identifier of the foo instance.\n\n        value (int):\n            Numeric value associated with foo.\n\n    Notes:\n        Guarantees:\n\n            - instances are immutable after creation\n\n        Lifecycle:\n\n            - create instance\n            - pass to processing engine\n\n    Example:\n        Create and inspect a Foo:\n\n            ```python\n            foo = Foo(\"example\", value=42)\n            print(foo.name)\n            ```\n    '''\n

        Complex Bar:

        class BarEngine:\n    '''\n    Executes Foo objects through Bar stages.\n\n    Attributes:\n        foos (tuple[Foo, ...]):\n            Foo instances managed by the engine.\n\n    Notes:\n        Guarantees:\n\n            - deterministic execution order\n\n    Example:\n        Run engine:\n\n            ```python\n            foo1 = Foo(\"a\")\n            foo2 = Foo(\"b\")\n\n            engine = BarEngine([foo1, foo2])\n            engine.run()\n            ```\n    '''\n
        "},{"location":"lib/#docforge--function-and-method-docstrings","title":"Function and method docstrings","text":"

        Function docstrings define API contracts.

        Recommended sections:

        Args:\nReturns:\nRaises:\nYields:\nNotes:\nExample:\n
        Example

        Simple process method:

        def process(foo: Foo, multiplier: int) -> int:\n    '''\n    Process a Foo instance.\n\n    Args:\n        foo (Foo):\n            Foo instance to process.\n\n        multiplier (int):\n            Value used to scale foo.\n\n    Returns:\n        int:\n            Processed result.\n\n    Raises:\n        ValueError:\n            If multiplier is negative.\n\n    Notes:\n        Guarantees:\n\n            - foo is not modified\n\n    Example:\n        Process foo:\n\n            ```python\n            foo = Foo(\"example\", value=10)\n\n            result = process(foo, multiplier=2)\n            print(result)\n            ```\n    '''\n

        Multiple Examples:

        def combine(foo_a: Foo, foo_b: Foo) -> Foo:\n    '''\n    Combine two Foo instances.\n\n    Args:\n        foo_a (Foo):\n            First foo.\n\n        foo_b (Foo):\n            Second foo.\n\n    Returns:\n        Foo:\n            Combined foo.\n\n    Example:\n        Basic usage:\n\n            ```python\n            foo1 = Foo(\"a\")\n            foo2 = Foo(\"b\")\n\n            combined = combine(foo1, foo2)\n            ```\n\n        Pipeline usage:\n\n            ```python\n            engine = BarEngine([foo1, foo2])\n            engine.run()\n            ```\n    '''\n
        "},{"location":"lib/#docforge--property-docstrings","title":"Property docstrings","text":"

        Properties must document return values.

        Example

        Property Doc String:

        ```python\n@property\ndef foos(self) -> tuple[Foo, ...]:\n    '''\n    Return contained Foo instances.\n\n    Returns:\n        tuple[Foo, ...]:\n            Stored foo objects.\n\n    Example:\n        ```python\n        container = FooContainer()\n\n        foos = container.foos\n        ```\n    '''\n```\n
        "},{"location":"lib/#docforge--attribute-documentation","title":"Attribute documentation","text":"

        Document attributes in class docstrings using Attributes:.

        Example

        Attribute Doc String:

        ```python\n'''\nRepresents a processing stage.\n\nAttributes:\n    id (str):\n        Unique identifier.\n\n    enabled (bool):\n        Whether the stage is active.\n'''\n```\n
        "},{"location":"lib/#docforge--parsing-guarantees","title":"Parsing guarantees","text":"

        GSDFC ensures doc-forge can deterministically extract:

        • symbol kind (module, class, function, property, attribute)
        • symbol name
        • parameters
        • return values
        • attributes
        • examples
        • structured Notes subsections

        This enables:

        • reliable MkDocs rendering
        • deterministic MCP export
        • accurate AI semantic interpretation
        Notes
        • doc-forge never executes analyzed modules.
        • Documentation is generated entirely through static analysis.
        "},{"location":"lib/#docforge-classes","title":"Classes","text":""},{"location":"lib/#docforge.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/#docforge.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/#docforge.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        "},{"location":"lib/#docforge.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths List[str]

        List of dotted module import paths to load.

        required project_name str

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/#docforge.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/#docforge.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/#docforge.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/#docforge.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/#docforge.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/#docforge.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Behavior:

        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source Optional[bool]

        Whether the module is treated as the project source root.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/#docforge.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/#docforge-functions","title":"Functions","text":""},{"location":"lib/#docforge.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        List[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/cli/","title":"Cli","text":""},{"location":"lib/cli/#docforge.cli","title":"docforge.cli","text":""},{"location":"lib/cli/#docforge.cli--summary","title":"Summary","text":"

        Command line interface entry point for doc-forge.

        This module exposes the primary CLI entry function used by the doc-forge command. The actual command implementation resides in docforge.cli.main, while this module provides a stable import path for external tools and the package entry point configuration.

        The CLI is responsible for orchestrating documentation workflows such as generating renderer sources, building documentation sites, exporting machine-readable documentation bundles, and starting development or MCP servers.

        "},{"location":"lib/cli/#docforge.cli--typical-usage","title":"Typical usage","text":"

        The CLI is normally invoked through the installed command:

        doc-forge <command> [options]\n

        Programmatic invocation is also possible:

        Example:

        ```python\nfrom docforge.cli import main\nmain()\n```\n
        "},{"location":"lib/cli/api_utils/","title":"Api Utils","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils","title":"docforge.cli.api_utils","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils--summary","title":"Summary","text":"

        Utilities for building API documentation from an OpenAPI specification.

        "},{"location":"lib/cli/api_utils/#docforge.cli.api_utils-classes","title":"Classes","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.OpenAPIMetadata","title":"OpenAPIMetadata dataclass","text":"
        OpenAPIMetadata(\n    site_name: str,\n    site_description: str | None,\n    site_author: str | None,\n)\n

        Metadata derived from the info block of an OpenAPI specification.

        Attributes:

        Name Type Description site_name str

        Spec title, used as the MkDocs site name.

        site_description str | None

        Spec description, used as the site description.

        site_author str | None

        Contact name (fallback: contact email), used as the site author.

        "},{"location":"lib/cli/api_utils/#docforge.cli.api_utils-functions","title":"Functions","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.derive_metadata","title":"derive_metadata","text":"
        derive_metadata(spec: dict[Any, Any]) -> OpenAPIMetadata\n

        Derive MkDocs site metadata from an OpenAPI spec info block.

        Parameters:

        Name Type Description Default spec dict[Any, Any]

        Parsed OpenAPI specification.

        required

        Returns:

        Name Type Description OpenAPIMetadata OpenAPIMetadata

        Site name, description, and author derived from the spec.

        "},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.generate_api_sources","title":"generate_api_sources","text":"
        generate_api_sources(\n    spec: dict[Any, Any], docs_dir: Path\n) -> None\n

        Generate swagger-enabled Markdown sources and the spec copy.

        The specification is written as openapi.json inside docs_dir and an index.md embedding the swagger UI is generated alongside it.

        Parameters:

        Name Type Description Default spec dict[Any, Any]

        Parsed OpenAPI specification.

        required docs_dir Path

        Directory (for example docs/api) where the swagger sources are written.

        required"},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.load_openapi_spec","title":"load_openapi_spec","text":"
        load_openapi_spec(spec_path: Path) -> dict[Any, Any]\n

        Load and validate an OpenAPI specification from a JSON file.

        Parameters:

        Name Type Description Default spec_path Path

        Path to the OpenAPI JSON specification file.

        required

        Returns:

        Name Type Description dict dict[Any, Any]

        The parsed OpenAPI specification.

        Raises:

        Type Description ClickException

        If the file cannot be read or the info block is invalid.

        "},{"location":"lib/cli/commands/","title":"Commands","text":""},{"location":"lib/cli/commands/#docforge.cli.commands","title":"docforge.cli.commands","text":""},{"location":"lib/cli/commands/#docforge.cli.commands--summary","title":"Summary","text":"

        Command definitions for the doc-forge CLI.

        Provides the CLI structure using Click, including build, serve, and tree commands.

        "},{"location":"lib/cli/commands/#docforge.cli.commands-classes","title":"Classes","text":""},{"location":"lib/cli/commands/#docforge.cli.commands-functions","title":"Functions","text":""},{"location":"lib/cli/commands/#docforge.cli.commands.build","title":"build","text":"
        build(\n    mcp: bool,\n    mkdocs: bool,\n    api: bool,\n    wiki: bool,\n    module_is_source: bool,\n    module: str | None,\n    openapi_spec: Path | None,\n    project_name: str | None,\n    site_name: str | None,\n    docs_dir: Path,\n    wiki_dir: Path,\n    nav_file: Path,\n    template: Path | None,\n    mkdocs_yml: Path,\n    out_dir: Path,\n) -> None\n

        Build documentation artifacts.

        This command performs the full documentation build pipeline: style of the selected platform, generates renderer-specific documentation sources, and optionally builds the final output.

        Depending on the selected options, the build can target:

        • MkDocs static documentation sites for library reference docs
        • Swagger-enabled API docs generated from an OpenAPI spec
        • Hand-written wiki pages included in the MkDocs site
        • MCP structured documentation resources

        Parameters:

        Name Type Description Default mcp bool

        Enable MCP documentation generation.

        required mkdocs bool

        Enable MkDocs library documentation generation.

        required api bool

        Enable API documentation generation from an OpenAPI spec.

        required wiki bool

        Include a hand-written wiki directory in the MkDocs site.

        required module_is_source bool

        Treat the specified module directory as the project root.

        required module Optional[str]

        Python module import path to document.

        required openapi_spec Optional[Path]

        Path to the OpenAPI JSON specification used for API docs.

        required project_name Optional[str]

        Optional override for the project name.

        required site_name Optional[str]

        Display name for the MkDocs site.

        required docs_dir Path

        Shared documentation root used as the MkDocs docs_dir.

        required wiki_dir Path

        Directory containing hand-written wiki markdown files.

        required nav_file Path

        Path to the navigation specification file.

        required template Optional[Path]

        Optional custom MkDocs configuration template.

        required mkdocs_yml Path

        Output path for the generated MkDocs configuration.

        required out_dir Path

        Output directory for generated MCP resources.

        required

        Raises:

        Type Description UsageError

        If required options are missing or conflicting.

        "},{"location":"lib/cli/commands/#docforge.cli.commands.serve","title":"serve","text":"
        serve(\n    mcp: bool,\n    mkdocs: bool,\n    module: str | None,\n    mkdocs_yml: Path,\n    out_dir: Path,\n) -> None\n

        Serve generated documentation locally.

        Depending on the selected mode, this command starts either:

        • A MkDocs development server for browsing documentation
        • An MCP server exposing structured documentation resources

        Parameters:

        Name Type Description Default mcp bool

        Serve documentation using the MCP server.

        required mkdocs bool

        Serve the MkDocs development site.

        required module Optional[str]

        Python module import path to serve via MCP.

        required mkdocs_yml Path

        Path to the MkDocs configuration file.

        required out_dir Path

        Root directory containing MCP documentation resources.

        required

        Raises:

        Type Description UsageError

        If invalid or conflicting options are provided.

        "},{"location":"lib/cli/commands/#docforge.cli.commands.tree","title":"tree","text":"
        tree(module: str, project_name: str | None) -> None\n

        Display the documentation object tree for a module.

        This command introspects the specified module and prints a hierarchical representation of the discovered documentation objects, including modules, classes, functions, and members.

        Parameters:

        Name Type Description Default module str

        Python module import path to introspect.

        required project_name Optional[str]

        Optional name to display as the project root.

        required"},{"location":"lib/cli/main/","title":"Main","text":""},{"location":"lib/cli/main/#docforge.cli.main","title":"docforge.cli.main","text":""},{"location":"lib/cli/main/#docforge.cli.main--summary","title":"Summary","text":"

        Command-line entry point for the doc-forge CLI.

        This module exposes the executable entry point that initializes the Click command group defined in docforge.cli.commands.

        "},{"location":"lib/cli/main/#docforge.cli.main-functions","title":"Functions","text":""},{"location":"lib/cli/main/#docforge.cli.main.main","title":"main","text":"
        main() -> None\n

        Run the doc-forge command-line interface.

        This function initializes and executes the Click CLI application. It is used as the console entry point when invoking doc-forge from the command line.

        "},{"location":"lib/cli/mcp_utils/","title":"Mcp Utils","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils","title":"docforge.cli.mcp_utils","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils--summary","title":"Summary","text":"

        Utilities for working with MCP in the doc-forge CLI.

        "},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils-classes","title":"Classes","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils-functions","title":"Functions","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils.generate_resources","title":"generate_resources","text":"
        generate_resources(\n    module: str, project_name: str | None, out_dir: Path\n) -> None\n

        Generate MCP documentation resources from a Python module.

        The function performs project introspection, builds the internal documentation model, and renders MCP-compatible JSON resources to the specified output directory.

        Parameters:

        Name Type Description Default module str

        Python module import path used as the entry point for documentation generation.

        required project_name Optional[str]

        Optional override for the project name used in generated documentation metadata.

        required out_dir Path

        Directory where MCP resources (index.json, nav.json, and module data) will be written.

        required"},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils.serve","title":"serve","text":"
        serve(module: str, mcp_root: Path) -> None\n

        Start an MCP server for a pre-generated documentation bundle.

        The server exposes documentation resources such as project metadata, navigation structure, and module documentation through MCP endpoints.

        Parameters:

        Name Type Description Default module str

        Python module import path used to identify the served documentation instance.

        required mcp_root Path

        Path to the directory containing the MCP documentation bundle (index.json, nav.json, and modules/).

        required

        Raises:

        Type Description ClickException

        If the MCP documentation bundle is missing required files or directories.

        "},{"location":"lib/cli/mkdocs_utils/","title":"Mkdocs Utils","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils","title":"docforge.cli.mkdocs_utils","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils--summary","title":"Summary","text":"

        Utilities for working with MkDocs in the doc-forge CLI.

        "},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils-classes","title":"Classes","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils-functions","title":"Functions","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.build","title":"build","text":"
        build(mkdocs_yml: Path) -> None\n

        Build the MkDocs documentation site.

        This function loads the MkDocs configuration and runs the MkDocs build command to generate the final static documentation site.

        Parameters:

        Name Type Description Default mkdocs_yml Path

        Path to the mkdocs.yml configuration file.

        required

        Raises:

        Type Description ClickException

        If the configuration file does not exist.

        "},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_config","title":"generate_config","text":"
        generate_config(\n    docs_dir: Path,\n    nav_file: Path,\n    template: Path | None,\n    out: Path,\n    site_name: str,\n    modes: Iterable[str] | None = None,\n    site_description: str | None = None,\n    site_author: str | None = None,\n    wiki_dir: Path | None = None,\n) -> None\n

        Generate an mkdocs.yml configuration file.

        The configuration is created by combining a template configuration with a navigation structure derived from the docforge navigation specification (and, when a wiki directory is provided, from the wiki file structure).

        The docs_dir is always written relative to the MkDocs root and is expected to be the shared documentation parent (for example docs), with generated sources nested under lib/ or api/ subdirectories and hand-written wiki content under a wiki/ subdirectory.

        Parameters:

        Name Type Description Default docs_dir Path

        Shared documentation root used as the MkDocs docs_dir.

        required nav_file Path

        Path to the docforge.nav.yml navigation specification.

        required template Optional[Path]

        Optional path to a fully custom MkDocs configuration template. If not provided, built-in templates are merged; the provided template replaces the built-in templates entirely.

        required out Path

        Destination path where the generated mkdocs.yml file will be written.

        required site_name str

        Display name for the generated documentation site.

        required modes Optional[Iterable[str]]

        Documentation modes to enable. Each mode contributes its own built-in template fragment (for example lib, api, or wiki), merged on top of the shared mkdocs.common.yml template.

        None site_description Optional[str]

        Optional site description written into the configuration.

        None site_author Optional[str]

        Optional site author written into the configuration.

        None wiki_dir Optional[Path]

        Optional path to a hand-written wiki directory (for example docs/wiki). When provided, the site navigation is derived from the wiki file structure and placed before the navigation groups defined in nav_file.

        None

        Raises:

        Type Description FileError

        If the navigation specification, template, or wiki directory cannot be found.

        "},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    module: str,\n    docs_dir: Path,\n    project_name: str | None = None,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate MkDocs Markdown sources for a Python module.

        This function introspects the specified module, builds the internal documentation model, and renders Markdown documentation files for use with MkDocs.

        Parameters:

        Name Type Description Default module str

        Python module import path used as the entry point for documentation generation.

        required docs_dir Path

        Directory where the generated Markdown files will be written.

        required project_name Optional[str]

        Optional override for the project name used in documentation metadata.

        None module_is_source Optional[bool]

        If True, treat the specified module directory as the project root rather than a nested module.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. If not provided, defaults to the parent of docs_dir.

        None"},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.serve","title":"serve","text":"
        serve(mkdocs_yml: Path) -> None\n

        Start an MkDocs development server with live reload.

        The server watches documentation files and automatically reloads the site when changes are detected.

        Parameters:

        Name Type Description Default mkdocs_yml Path

        Path to the mkdocs.yml configuration file.

        required

        Raises:

        Type Description ClickException

        If the configuration file does not exist.

        "},{"location":"lib/docforge/","title":"Docforge","text":"
        • Cli
        • Loaders
        • Models
        • Nav
        • Renderers
        • Servers
        "},{"location":"lib/docforge/#docforge","title":"docforge","text":""},{"location":"lib/docforge/#docforge--summary","title":"Summary","text":"

        Renderer-agnostic Python documentation compiler that converts Python docstrings into structured documentation for both humans (MkDocs) and machines (MCP / AI agents).

        doc-forge statically analyzes source code, builds a semantic model of modules, classes, functions, and attributes, and renders that model into documentation outputs without executing user code.

        "},{"location":"lib/docforge/#docforge--installation","title":"Installation","text":"

        Install using pip:

        pip install doc-forge\n
        "},{"location":"lib/docforge/#docforge--cli-usage","title":"CLI usage","text":""},{"location":"lib/docforge/#docforge--generate-an-mkdocs-site-from-a-python-package","title":"Generate an MkDocs site from a Python package:","text":"
        doc-forge build --mkdocs --module my_package\n
        "},{"location":"lib/docforge/#docforge--generate-mcp-json-documentation","title":"Generate MCP JSON documentation:","text":"
        doc-forge build --mcp --module my_package\n
        "},{"location":"lib/docforge/#docforge--generate-mkdocs-site-and-mcp-json-documentation","title":"Generate MkDocs site and MCP JSON documentation:","text":"
        doc-forge build --mcp --mkdocs --module my_package\n
        "},{"location":"lib/docforge/#docforge--serve-mkdocs-locally","title":"Serve MkDocs locally:","text":"
        doc-forge serve --mkdocs --module my_package\n
        "},{"location":"lib/docforge/#docforge--serve-mcp-locally","title":"Serve MCP locally:","text":"
        doc-forge serve --mcp --module my_package\n
        "},{"location":"lib/docforge/#docforge--core-concepts","title":"Core concepts","text":""},{"location":"lib/docforge/#docforge--loader","title":"Loader","text":"

        Extracts symbols, signatures, and docstrings using static analysis.

        "},{"location":"lib/docforge/#docforge--semantic-model","title":"Semantic model","text":"

        Structured, renderer-agnostic representation of the API.

        "},{"location":"lib/docforge/#docforge--renderer","title":"Renderer","text":"

        Converts the semantic model into output formats such as MkDocs or MCP JSON.

        "},{"location":"lib/docforge/#docforge--symbol","title":"Symbol","text":"

        Any documentable object

        • module
        • class
        • function
        • method
        • property
        • attribute
        "},{"location":"lib/docforge/#docforge--architecture","title":"Architecture","text":"

        doc-forge follows a compiler architecture:

        "},{"location":"lib/docforge/#docforge--front-end","title":"Front-end:","text":"

        Static analysis of modules, classes, functions, type hints, and docstrings.

        "},{"location":"lib/docforge/#docforge--middle-end","title":"Middle-end:","text":"

        Builds a semantic model describing symbols and relationships.

        "},{"location":"lib/docforge/#docforge--back-end","title":"Back-end:","text":"

        Renders documentation using interchangeable renderers.

        This architecture ensures deterministic documentation generation.

        "},{"location":"lib/docforge/#docforge--rendering-pipeline","title":"Rendering pipeline","text":"

        Typical flow:

        Python package\n    |\nLoader (static analysis)\n    |\nSemantic model\n    |\nRenderer\n    |\nMkDocs site or MCP JSON\n
        "},{"location":"lib/docforge/#docforge--google-styled-doc-forge-convention-gsdfc","title":"Google-Styled Doc-Forge Convention (GSDFC)","text":"

        GSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.

        • Docstrings are the single source of truth.
        • doc-forge compiles docstrings but does not generate documentation content.
        • Documentation follows the Python import hierarchy.
        • Every public symbol should have a complete and accurate docstring.
        "},{"location":"lib/docforge/#docforge--general-rules","title":"General rules","text":"
        • Use Markdown headings at package and module level.
        • Use Google-style structured sections at class, function, and method level.
        • Use type hints in signatures instead of duplicating types in prose.
        • Write summaries in imperative form.
        • Sections are separated by ---
        "},{"location":"lib/docforge/#docforge--notes-subsection-grouping","title":"Notes subsection grouping","text":"

        Group related information using labeled subsections.

        Example:

        Notes:\n    **Guarantees:**\n\n        - deterministic behavior\n\n    **Lifecycle:**\n\n        - created during initialization\n        - reused across executions\n\n    **Thread safety:**\n\n        - safe for concurrent reads\n
        "},{"location":"lib/docforge/#docforge--example-formatting","title":"Example formatting","text":"
        • Use indentation for examples.
        • Indent section contents using four spaces.
        • Use code blocks for example code.
        Example

        Single example:

        Example:\n\n    ```python\n    foo = Foo(\"example\")\n    process(foo, multiplier=2)\n    ```\n

        Multiple examples:

        Example:\n    Create foo:\n\n        ```python\n        foo = Foo(\"example\")\n        ```\n\n    Run engine:\n\n        ```python\n        engine = BarEngine([foo])\n        engine.run()\n        ```\n

        Avoid fenced code blocks inside structured sections.

        "},{"location":"lib/docforge/#docforge--separator-rules","title":"Separator rules","text":"

        Use horizontal separators only at docstring root level to separate sections:

        ---\n

        Allowed locations:

        • package docstrings
        • module docstrings
        • major documentation sections

        Do not use separators inside code sections.

        "},{"location":"lib/docforge/#docforge--package-docstrings","title":"Package docstrings","text":"

        Package docstrings act as the documentation home page.

        Recommended sections:

        # Summary\n# Installation\n# Quick start\n# CLI usage\n# Core concepts\n# Architecture\n# Rendering pipeline\n# Examples\n# Notes\n
        Example

        Package Doc String:

        '''\n# Summary\n\nFoo-bar processing framework.\n\nProvides tools for defining Foo objects and executing Bar pipelines.\n\n---\n\n# Installation\n\n```bash\npip install foo-bar\n```\n\n---\n\n# Quick start\n\n```python\nfrom foobar import Foo, BarEngine\n\nfoo = Foo(\"example\")\nengine = BarEngine([foo])\n\nresult = engine.run()\n```\n\n---\n'''\n
        "},{"location":"lib/docforge/#docforge--module-docstrings","title":"Module docstrings","text":"

        Module docstrings describe a subsystem.

        Recommended sections:

        # Summary\n# Examples\n# Notes\n
        Example

        Module Doc String:

        '''\n# Summary\n\nFoo execution subsystem.\n\nProvides utilities for executing Foo objects through Bar stages.\n\n---\n\nExample:\n\n    ```python\n    from foobar.engine import BarEngine\n    from foobar.foo import Foo\n\n    foo = Foo(\"example\")\n\n    engine = BarEngine([foo])\n    engine.run()\n    ```\n\n---\n'''\n
        "},{"location":"lib/docforge/#docforge--class-docstrings","title":"Class docstrings","text":"

        Class docstrings define object responsibility, lifecycle, and attributes.

        Recommended sections:

        Attributes:\nNotes:\nExample:\nRaises:\n
        Example

        Simple Foo:

        class Foo:\n    '''\n    Represents a unit of work.\n\n    Attributes:\n        name (str):\n            Identifier of the foo instance.\n\n        value (int):\n            Numeric value associated with foo.\n\n    Notes:\n        Guarantees:\n\n            - instances are immutable after creation\n\n        Lifecycle:\n\n            - create instance\n            - pass to processing engine\n\n    Example:\n        Create and inspect a Foo:\n\n            ```python\n            foo = Foo(\"example\", value=42)\n            print(foo.name)\n            ```\n    '''\n

        Complex Bar:

        class BarEngine:\n    '''\n    Executes Foo objects through Bar stages.\n\n    Attributes:\n        foos (tuple[Foo, ...]):\n            Foo instances managed by the engine.\n\n    Notes:\n        Guarantees:\n\n            - deterministic execution order\n\n    Example:\n        Run engine:\n\n            ```python\n            foo1 = Foo(\"a\")\n            foo2 = Foo(\"b\")\n\n            engine = BarEngine([foo1, foo2])\n            engine.run()\n            ```\n    '''\n
        "},{"location":"lib/docforge/#docforge--function-and-method-docstrings","title":"Function and method docstrings","text":"

        Function docstrings define API contracts.

        Recommended sections:

        Args:\nReturns:\nRaises:\nYields:\nNotes:\nExample:\n
        Example

        Simple process method:

        def process(foo: Foo, multiplier: int) -> int:\n    '''\n    Process a Foo instance.\n\n    Args:\n        foo (Foo):\n            Foo instance to process.\n\n        multiplier (int):\n            Value used to scale foo.\n\n    Returns:\n        int:\n            Processed result.\n\n    Raises:\n        ValueError:\n            If multiplier is negative.\n\n    Notes:\n        Guarantees:\n\n            - foo is not modified\n\n    Example:\n        Process foo:\n\n            ```python\n            foo = Foo(\"example\", value=10)\n\n            result = process(foo, multiplier=2)\n            print(result)\n            ```\n    '''\n

        Multiple Examples:

        def combine(foo_a: Foo, foo_b: Foo) -> Foo:\n    '''\n    Combine two Foo instances.\n\n    Args:\n        foo_a (Foo):\n            First foo.\n\n        foo_b (Foo):\n            Second foo.\n\n    Returns:\n        Foo:\n            Combined foo.\n\n    Example:\n        Basic usage:\n\n            ```python\n            foo1 = Foo(\"a\")\n            foo2 = Foo(\"b\")\n\n            combined = combine(foo1, foo2)\n            ```\n\n        Pipeline usage:\n\n            ```python\n            engine = BarEngine([foo1, foo2])\n            engine.run()\n            ```\n    '''\n
        "},{"location":"lib/docforge/#docforge--property-docstrings","title":"Property docstrings","text":"

        Properties must document return values.

        Example

        Property Doc String:

        ```python\n@property\ndef foos(self) -> tuple[Foo, ...]:\n    '''\n    Return contained Foo instances.\n\n    Returns:\n        tuple[Foo, ...]:\n            Stored foo objects.\n\n    Example:\n        ```python\n        container = FooContainer()\n\n        foos = container.foos\n        ```\n    '''\n```\n
        "},{"location":"lib/docforge/#docforge--attribute-documentation","title":"Attribute documentation","text":"

        Document attributes in class docstrings using Attributes:.

        Example

        Attribute Doc String:

        ```python\n'''\nRepresents a processing stage.\n\nAttributes:\n    id (str):\n        Unique identifier.\n\n    enabled (bool):\n        Whether the stage is active.\n'''\n```\n
        "},{"location":"lib/docforge/#docforge--parsing-guarantees","title":"Parsing guarantees","text":"

        GSDFC ensures doc-forge can deterministically extract:

        • symbol kind (module, class, function, property, attribute)
        • symbol name
        • parameters
        • return values
        • attributes
        • examples
        • structured Notes subsections

        This enables:

        • reliable MkDocs rendering
        • deterministic MCP export
        • accurate AI semantic interpretation
        Notes
        • doc-forge never executes analyzed modules.
        • Documentation is generated entirely through static analysis.
        "},{"location":"lib/docforge/#docforge-classes","title":"Classes","text":""},{"location":"lib/docforge/#docforge.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/docforge/#docforge.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/docforge/#docforge.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        "},{"location":"lib/docforge/#docforge.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths List[str]

        List of dotted module import paths to load.

        required project_name str

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/docforge/#docforge.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/docforge/#docforge.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/#docforge.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/docforge/#docforge.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/docforge/#docforge.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/#docforge.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Behavior:

        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source Optional[bool]

        Whether the module is treated as the project source root.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/docforge/#docforge.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/docforge/#docforge-functions","title":"Functions","text":""},{"location":"lib/docforge/#docforge.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        List[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/docforge/cli/","title":"Cli","text":"
        • Api Utils
        • Commands
        • Main
        • Mcp Utils
        • Mkdocs Utils
        "},{"location":"lib/docforge/cli/#docforge.cli","title":"docforge.cli","text":""},{"location":"lib/docforge/cli/#docforge.cli--summary","title":"Summary","text":"

        Command line interface entry point for doc-forge.

        This module exposes the primary CLI entry function used by the doc-forge command. The actual command implementation resides in docforge.cli.main, while this module provides a stable import path for external tools and the package entry point configuration.

        The CLI is responsible for orchestrating documentation workflows such as generating renderer sources, building documentation sites, exporting machine-readable documentation bundles, and starting development or MCP servers.

        "},{"location":"lib/docforge/cli/#docforge.cli--typical-usage","title":"Typical usage","text":"

        The CLI is normally invoked through the installed command:

        doc-forge <command> [options]\n

        Programmatic invocation is also possible:

        Example:

        ```python\nfrom docforge.cli import main\nmain()\n```\n
        "},{"location":"lib/docforge/cli/api_utils/","title":"Api Utils","text":""},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils","title":"docforge.cli.api_utils","text":""},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils--summary","title":"Summary","text":"

        Utilities for building API documentation from an OpenAPI specification.

        "},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils-classes","title":"Classes","text":""},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils.OpenAPIMetadata","title":"OpenAPIMetadata dataclass","text":"
        OpenAPIMetadata(\n    site_name: str,\n    site_description: str | None,\n    site_author: str | None,\n)\n

        Metadata derived from the info block of an OpenAPI specification.

        Attributes:

        Name Type Description site_name str

        Spec title, used as the MkDocs site name.

        site_description str | None

        Spec description, used as the site description.

        site_author str | None

        Contact name (fallback: contact email), used as the site author.

        "},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils-functions","title":"Functions","text":""},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils.derive_metadata","title":"derive_metadata","text":"
        derive_metadata(spec: dict[Any, Any]) -> OpenAPIMetadata\n

        Derive MkDocs site metadata from an OpenAPI spec info block.

        Parameters:

        Name Type Description Default spec dict[Any, Any]

        Parsed OpenAPI specification.

        required

        Returns:

        Name Type Description OpenAPIMetadata OpenAPIMetadata

        Site name, description, and author derived from the spec.

        "},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils.generate_api_sources","title":"generate_api_sources","text":"
        generate_api_sources(\n    spec: dict[Any, Any], docs_dir: Path\n) -> None\n

        Generate swagger-enabled Markdown sources and the spec copy.

        The specification is written as openapi.json inside docs_dir and an index.md embedding the swagger UI is generated alongside it.

        Parameters:

        Name Type Description Default spec dict[Any, Any]

        Parsed OpenAPI specification.

        required docs_dir Path

        Directory (for example docs/api) where the swagger sources are written.

        required"},{"location":"lib/docforge/cli/api_utils/#docforge.cli.api_utils.load_openapi_spec","title":"load_openapi_spec","text":"
        load_openapi_spec(spec_path: Path) -> dict[Any, Any]\n

        Load and validate an OpenAPI specification from a JSON file.

        Parameters:

        Name Type Description Default spec_path Path

        Path to the OpenAPI JSON specification file.

        required

        Returns:

        Name Type Description dict dict[Any, Any]

        The parsed OpenAPI specification.

        Raises:

        Type Description ClickException

        If the file cannot be read or the info block is invalid.

        "},{"location":"lib/docforge/cli/commands/","title":"Commands","text":""},{"location":"lib/docforge/cli/commands/#docforge.cli.commands","title":"docforge.cli.commands","text":""},{"location":"lib/docforge/cli/commands/#docforge.cli.commands--summary","title":"Summary","text":"

        Command definitions for the doc-forge CLI.

        Provides the CLI structure using Click, including build, serve, and tree commands.

        "},{"location":"lib/docforge/cli/commands/#docforge.cli.commands-classes","title":"Classes","text":""},{"location":"lib/docforge/cli/commands/#docforge.cli.commands-functions","title":"Functions","text":""},{"location":"lib/docforge/cli/commands/#docforge.cli.commands.build","title":"build","text":"
        build(\n    mcp: bool,\n    mkdocs: bool,\n    api: bool,\n    wiki: bool,\n    module_is_source: bool,\n    module: str | None,\n    openapi_spec: Path | None,\n    project_name: str | None,\n    site_name: str | None,\n    docs_dir: Path,\n    wiki_dir: Path,\n    nav_file: Path,\n    template: Path | None,\n    mkdocs_yml: Path,\n    out_dir: Path,\n) -> None\n

        Build documentation artifacts.

        This command performs the full documentation build pipeline: style of the selected platform, generates renderer-specific documentation sources, and optionally builds the final output.

        Depending on the selected options, the build can target:

        • MkDocs static documentation sites for library reference docs
        • Swagger-enabled API docs generated from an OpenAPI spec
        • Hand-written wiki pages included in the MkDocs site
        • MCP structured documentation resources

        Parameters:

        Name Type Description Default mcp bool

        Enable MCP documentation generation.

        required mkdocs bool

        Enable MkDocs library documentation generation.

        required api bool

        Enable API documentation generation from an OpenAPI spec.

        required wiki bool

        Include a hand-written wiki directory in the MkDocs site.

        required module_is_source bool

        Treat the specified module directory as the project root.

        required module Optional[str]

        Python module import path to document.

        required openapi_spec Optional[Path]

        Path to the OpenAPI JSON specification used for API docs.

        required project_name Optional[str]

        Optional override for the project name.

        required site_name Optional[str]

        Display name for the MkDocs site.

        required docs_dir Path

        Shared documentation root used as the MkDocs docs_dir.

        required wiki_dir Path

        Directory containing hand-written wiki markdown files.

        required nav_file Path

        Path to the navigation specification file.

        required template Optional[Path]

        Optional custom MkDocs configuration template.

        required mkdocs_yml Path

        Output path for the generated MkDocs configuration.

        required out_dir Path

        Output directory for generated MCP resources.

        required

        Raises:

        Type Description UsageError

        If required options are missing or conflicting.

        "},{"location":"lib/docforge/cli/commands/#docforge.cli.commands.serve","title":"serve","text":"
        serve(\n    mcp: bool,\n    mkdocs: bool,\n    module: str | None,\n    mkdocs_yml: Path,\n    out_dir: Path,\n) -> None\n

        Serve generated documentation locally.

        Depending on the selected mode, this command starts either:

        • A MkDocs development server for browsing documentation
        • An MCP server exposing structured documentation resources

        Parameters:

        Name Type Description Default mcp bool

        Serve documentation using the MCP server.

        required mkdocs bool

        Serve the MkDocs development site.

        required module Optional[str]

        Python module import path to serve via MCP.

        required mkdocs_yml Path

        Path to the MkDocs configuration file.

        required out_dir Path

        Root directory containing MCP documentation resources.

        required

        Raises:

        Type Description UsageError

        If invalid or conflicting options are provided.

        "},{"location":"lib/docforge/cli/commands/#docforge.cli.commands.tree","title":"tree","text":"
        tree(module: str, project_name: str | None) -> None\n

        Display the documentation object tree for a module.

        This command introspects the specified module and prints a hierarchical representation of the discovered documentation objects, including modules, classes, functions, and members.

        Parameters:

        Name Type Description Default module str

        Python module import path to introspect.

        required project_name Optional[str]

        Optional name to display as the project root.

        required"},{"location":"lib/docforge/cli/main/","title":"Main","text":""},{"location":"lib/docforge/cli/main/#docforge.cli.main","title":"docforge.cli.main","text":""},{"location":"lib/docforge/cli/main/#docforge.cli.main--summary","title":"Summary","text":"

        Command-line entry point for the doc-forge CLI.

        This module exposes the executable entry point that initializes the Click command group defined in docforge.cli.commands.

        "},{"location":"lib/docforge/cli/main/#docforge.cli.main-functions","title":"Functions","text":""},{"location":"lib/docforge/cli/main/#docforge.cli.main.main","title":"main","text":"
        main() -> None\n

        Run the doc-forge command-line interface.

        This function initializes and executes the Click CLI application. It is used as the console entry point when invoking doc-forge from the command line.

        "},{"location":"lib/docforge/cli/mcp_utils/","title":"Mcp Utils","text":""},{"location":"lib/docforge/cli/mcp_utils/#docforge.cli.mcp_utils","title":"docforge.cli.mcp_utils","text":""},{"location":"lib/docforge/cli/mcp_utils/#docforge.cli.mcp_utils--summary","title":"Summary","text":"

        Utilities for working with MCP in the doc-forge CLI.

        "},{"location":"lib/docforge/cli/mcp_utils/#docforge.cli.mcp_utils-classes","title":"Classes","text":""},{"location":"lib/docforge/cli/mcp_utils/#docforge.cli.mcp_utils-functions","title":"Functions","text":""},{"location":"lib/docforge/cli/mcp_utils/#docforge.cli.mcp_utils.generate_resources","title":"generate_resources","text":"
        generate_resources(\n    module: str, project_name: str | None, out_dir: Path\n) -> None\n

        Generate MCP documentation resources from a Python module.

        The function performs project introspection, builds the internal documentation model, and renders MCP-compatible JSON resources to the specified output directory.

        Parameters:

        Name Type Description Default module str

        Python module import path used as the entry point for documentation generation.

        required project_name Optional[str]

        Optional override for the project name used in generated documentation metadata.

        required out_dir Path

        Directory where MCP resources (index.json, nav.json, and module data) will be written.

        required"},{"location":"lib/docforge/cli/mcp_utils/#docforge.cli.mcp_utils.serve","title":"serve","text":"
        serve(module: str, mcp_root: Path) -> None\n

        Start an MCP server for a pre-generated documentation bundle.

        The server exposes documentation resources such as project metadata, navigation structure, and module documentation through MCP endpoints.

        Parameters:

        Name Type Description Default module str

        Python module import path used to identify the served documentation instance.

        required mcp_root Path

        Path to the directory containing the MCP documentation bundle (index.json, nav.json, and modules/).

        required

        Raises:

        Type Description ClickException

        If the MCP documentation bundle is missing required files or directories.

        "},{"location":"lib/docforge/cli/mkdocs_utils/","title":"Mkdocs Utils","text":""},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils","title":"docforge.cli.mkdocs_utils","text":""},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils--summary","title":"Summary","text":"

        Utilities for working with MkDocs in the doc-forge CLI.

        "},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils-classes","title":"Classes","text":""},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils-functions","title":"Functions","text":""},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.build","title":"build","text":"
        build(mkdocs_yml: Path) -> None\n

        Build the MkDocs documentation site.

        This function loads the MkDocs configuration and runs the MkDocs build command to generate the final static documentation site.

        Parameters:

        Name Type Description Default mkdocs_yml Path

        Path to the mkdocs.yml configuration file.

        required

        Raises:

        Type Description ClickException

        If the configuration file does not exist.

        "},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_config","title":"generate_config","text":"
        generate_config(\n    docs_dir: Path,\n    nav_file: Path,\n    template: Path | None,\n    out: Path,\n    site_name: str,\n    modes: Iterable[str] | None = None,\n    site_description: str | None = None,\n    site_author: str | None = None,\n    wiki_dir: Path | None = None,\n) -> None\n

        Generate an mkdocs.yml configuration file.

        The configuration is created by combining a template configuration with a navigation structure derived from the docforge navigation specification (and, when a wiki directory is provided, from the wiki file structure).

        The docs_dir is always written relative to the MkDocs root and is expected to be the shared documentation parent (for example docs), with generated sources nested under lib/ or api/ subdirectories and hand-written wiki content under a wiki/ subdirectory.

        Parameters:

        Name Type Description Default docs_dir Path

        Shared documentation root used as the MkDocs docs_dir.

        required nav_file Path

        Path to the docforge.nav.yml navigation specification.

        required template Optional[Path]

        Optional path to a fully custom MkDocs configuration template. If not provided, built-in templates are merged; the provided template replaces the built-in templates entirely.

        required out Path

        Destination path where the generated mkdocs.yml file will be written.

        required site_name str

        Display name for the generated documentation site.

        required modes Optional[Iterable[str]]

        Documentation modes to enable. Each mode contributes its own built-in template fragment (for example lib, api, or wiki), merged on top of the shared mkdocs.common.yml template.

        None site_description Optional[str]

        Optional site description written into the configuration.

        None site_author Optional[str]

        Optional site author written into the configuration.

        None wiki_dir Optional[Path]

        Optional path to a hand-written wiki directory (for example docs/wiki). When provided, the site navigation is derived from the wiki file structure and placed before the navigation groups defined in nav_file.

        None

        Raises:

        Type Description FileError

        If the navigation specification, template, or wiki directory cannot be found.

        "},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    module: str,\n    docs_dir: Path,\n    project_name: str | None = None,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate MkDocs Markdown sources for a Python module.

        This function introspects the specified module, builds the internal documentation model, and renders Markdown documentation files for use with MkDocs.

        Parameters:

        Name Type Description Default module str

        Python module import path used as the entry point for documentation generation.

        required docs_dir Path

        Directory where the generated Markdown files will be written.

        required project_name Optional[str]

        Optional override for the project name used in documentation metadata.

        None module_is_source Optional[bool]

        If True, treat the specified module directory as the project root rather than a nested module.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. If not provided, defaults to the parent of docs_dir.

        None"},{"location":"lib/docforge/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.serve","title":"serve","text":"
        serve(mkdocs_yml: Path) -> None\n

        Start an MkDocs development server with live reload.

        The server watches documentation files and automatically reloads the site when changes are detected.

        Parameters:

        Name Type Description Default mkdocs_yml Path

        Path to the mkdocs.yml configuration file.

        required

        Raises:

        Type Description ClickException

        If the configuration file does not exist.

        "},{"location":"lib/docforge/loaders/","title":"Loaders","text":"
        • Griffe Loader
        "},{"location":"lib/docforge/loaders/#docforge.loaders","title":"docforge.loaders","text":""},{"location":"lib/docforge/loaders/#docforge.loaders--summary","title":"Summary","text":"

        Loader layer for doc-forge.

        The docforge.loaders package is responsible for discovering Python modules and extracting documentation data using static analysis.

        "},{"location":"lib/docforge/loaders/#docforge.loaders--overview","title":"Overview","text":"

        This layer converts Python source code into an intermediate documentation model used by doc-forge. It performs module discovery, introspection, and initial filtering before the data is passed to the core documentation models.

        Core capabilities include:

        • Module discovery \u2013 Locate Python modules and packages within a project.
        • Static introspection \u2013 Parse docstrings, signatures, and object hierarchies using the griffe library without executing the code.
        • Public API filtering \u2013 Exclude private members (names prefixed with _) to produce clean public documentation structures.
        "},{"location":"lib/docforge/loaders/#docforge.loaders-classes","title":"Classes","text":""},{"location":"lib/docforge/loaders/#docforge.loaders.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/docforge/loaders/#docforge.loaders.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/docforge/loaders/#docforge.loaders.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        "},{"location":"lib/docforge/loaders/#docforge.loaders.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths List[str]

        List of dotted module import paths to load.

        required project_name str

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/docforge/loaders/#docforge.loaders-functions","title":"Functions","text":""},{"location":"lib/docforge/loaders/#docforge.loaders.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        List[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/docforge/loaders/griffe_loader/","title":"Griffe Loader","text":""},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader","title":"docforge.loaders.griffe_loader","text":""},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader--summary","title":"Summary","text":"

        Utilities for loading and introspecting Python modules using Griffe.

        This module provides the GriffeLoader class and helper utilities used to discover Python modules, introspect their structure, and convert the results into doc-forge documentation models.

        "},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader-classes","title":"Classes","text":""},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        "},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths List[str]

        List of dotted module import paths to load.

        required project_name str

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader-functions","title":"Functions","text":""},{"location":"lib/docforge/loaders/griffe_loader/#docforge.loaders.griffe_loader.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        List[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/docforge/models/","title":"Models","text":"
        • Module
        • Object
        • Project
        "},{"location":"lib/docforge/models/#docforge.models","title":"docforge.models","text":""},{"location":"lib/docforge/models/#docforge.models--summary","title":"Summary","text":"

        Model layer for doc-forge.

        The docforge.models package defines the core data structures used to represent Python source code as a structured documentation model.

        "},{"location":"lib/docforge/models/#docforge.models--overview","title":"Overview","text":"

        The model layer forms the central intermediate representation used throughout doc-forge. Python modules and objects discovered during introspection are converted into a hierarchy of documentation models that can later be rendered into different documentation formats.

        Key components:

        • Project \u2013 Root container representing an entire documented codebase.
        • Module \u2013 Representation of a Python module or package containing documented members.
        • DocObject \u2013 Recursive structure representing Python objects such as classes, functions, methods, and attributes.

        These models are intentionally renderer-agnostic, allowing the same documentation structure to be transformed into multiple output formats (e.g., MkDocs, MCP, or other renderers).

        "},{"location":"lib/docforge/models/#docforge.models-classes","title":"Classes","text":""},{"location":"lib/docforge/models/#docforge.models.DocObject","title":"DocObject","text":"
        DocObject(\n    name: str,\n    kind: str,\n    path: str,\n    signature: str | None = None,\n    docstring: str | None = None,\n)\n

        Representation of a documented Python object.

        A DocObject models a single Python entity discovered during introspection. Objects may contain nested members, allowing the structure of modules, classes, and other containers to be represented recursively.

        Attributes:

        Name Type Description name str

        Local name of the object.

        kind str

        Type of object (for example class, function, method, or attribute).

        path str

        Fully qualified dotted path to the object.

        signature Optional[str]

        Callable signature if the object represents a callable.

        docstring Optional[str]

        Raw docstring text extracted from the source code.

        members Dict[str, DocObject]

        Mapping of member names to child DocObject instances.

        Initialize a DocObject instance.

        Parameters:

        Name Type Description Default name str

        Local name of the object.

        required kind str

        Object type identifier (for example class or function).

        required path str

        Fully qualified dotted path of the object.

        required signature Optional[str]

        Callable signature if applicable.

        None docstring Optional[str]

        Documentation string associated with the object.

        None"},{"location":"lib/docforge/models/#docforge.models.DocObject-functions","title":"Functions","text":""},{"location":"lib/docforge/models/#docforge.models.DocObject.add_member","title":"add_member","text":"
        add_member(obj: DocObject) -> None\n

        Add a child documentation object.

        This is typically used when attaching methods to classes or nested objects to their parent containers.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to add as a member.

        required"},{"location":"lib/docforge/models/#docforge.models.DocObject.get_all_members","title":"get_all_members","text":"
        get_all_members() -> Iterable[DocObject]\n

        Return all child members of the object.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing nested members.

        "},{"location":"lib/docforge/models/#docforge.models.DocObject.get_member","title":"get_member","text":"
        get_member(name: str) -> DocObject\n

        Retrieve a member object by name.

        Parameters:

        Name Type Description Default name str

        Name of the member to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If the member does not exist.

        "},{"location":"lib/docforge/models/#docforge.models.Module","title":"Module","text":"
        Module(path: str, docstring: str | None = None)\n

        Representation of a documented Python module or package.

        A Module stores metadata about the module itself and maintains a collection of top-level documentation objects discovered during introspection.

        Attributes:

        Name Type Description path str

        Dotted import path of the module.

        docstring Optional[str]

        Module-level documentation string, if present.

        members Dict[str, DocObject]

        Mapping of object names to their corresponding DocObject representations.

        Initialize a Module instance.

        Parameters:

        Name Type Description Default path str

        Dotted import path identifying the module.

        required docstring Optional[str]

        Module-level documentation text, if available.

        None"},{"location":"lib/docforge/models/#docforge.models.Module-functions","title":"Functions","text":""},{"location":"lib/docforge/models/#docforge.models.Module.add_object","title":"add_object","text":"
        add_object(obj: DocObject) -> None\n

        Add a documented object to the module.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to register as a top-level member of the module.

        required"},{"location":"lib/docforge/models/#docforge.models.Module.get_all_objects","title":"get_all_objects","text":"
        get_all_objects() -> Iterable[DocObject]\n

        Return all top-level documentation objects in the module.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing the module's public members.

        "},{"location":"lib/docforge/models/#docforge.models.Module.get_object","title":"get_object","text":"
        get_object(name: str) -> DocObject\n

        Retrieve a documented object by name.

        Parameters:

        Name Type Description Default name str

        Name of the object to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If no object with the given name exists.

        "},{"location":"lib/docforge/models/#docforge.models.Project","title":"Project","text":"
        Project(name: str)\n

        Representation of a documentation project.

        A Project serves as the root container for all modules discovered during introspection. Each module is stored by its dotted import path.

        Attributes:

        Name Type Description name str

        Name of the project.

        modules Dict[str, Module]

        Mapping of module paths to Module instances.

        Initialize a Project instance.

        Parameters:

        Name Type Description Default name str

        Name used to identify the documentation project.

        required"},{"location":"lib/docforge/models/#docforge.models.Project-functions","title":"Functions","text":""},{"location":"lib/docforge/models/#docforge.models.Project.add_module","title":"add_module","text":"
        add_module(module: Module) -> None\n

        Register a module in the project.

        Parameters:

        Name Type Description Default module Module

        Module instance to add to the project.

        required"},{"location":"lib/docforge/models/#docforge.models.Project.get_all_modules","title":"get_all_modules","text":"
        get_all_modules() -> Iterable[Module]\n

        Return all modules contained in the project.

        Returns:

        Type Description Iterable[Module]

        Iterable[Module]: An iterable of Module instances.

        "},{"location":"lib/docforge/models/#docforge.models.Project.get_module","title":"get_module","text":"
        get_module(path: str) -> Module\n

        Retrieve a module by its dotted path.

        Parameters:

        Name Type Description Default path str

        Fully qualified dotted module path (for example pkg.module).

        required

        Returns:

        Name Type Description Module Module

        The corresponding Module instance.

        Raises:

        Type Description KeyError

        If the module does not exist in the project.

        "},{"location":"lib/docforge/models/#docforge.models.Project.get_module_list","title":"get_module_list","text":"
        get_module_list() -> list[str]\n

        Return the list of module import paths.

        Returns:

        Type Description list[str]

        list[str]: A list containing the dotted paths of all modules in the project.

        "},{"location":"lib/docforge/models/module/","title":"Module","text":""},{"location":"lib/docforge/models/module/#docforge.models.module","title":"docforge.models.module","text":""},{"location":"lib/docforge/models/module/#docforge.models.module--summary","title":"Summary","text":"

        Documentation model representing a Python module or package.

        This module defines the Module class used in the doc-forge documentation model. A Module acts as a container for top-level documented objects (classes, functions, variables, and other members) discovered during introspection.

        "},{"location":"lib/docforge/models/module/#docforge.models.module-classes","title":"Classes","text":""},{"location":"lib/docforge/models/module/#docforge.models.module.Module","title":"Module","text":"
        Module(path: str, docstring: str | None = None)\n

        Representation of a documented Python module or package.

        A Module stores metadata about the module itself and maintains a collection of top-level documentation objects discovered during introspection.

        Attributes:

        Name Type Description path str

        Dotted import path of the module.

        docstring Optional[str]

        Module-level documentation string, if present.

        members Dict[str, DocObject]

        Mapping of object names to their corresponding DocObject representations.

        Initialize a Module instance.

        Parameters:

        Name Type Description Default path str

        Dotted import path identifying the module.

        required docstring Optional[str]

        Module-level documentation text, if available.

        None"},{"location":"lib/docforge/models/module/#docforge.models.module.Module-functions","title":"Functions","text":""},{"location":"lib/docforge/models/module/#docforge.models.module.Module.add_object","title":"add_object","text":"
        add_object(obj: DocObject) -> None\n

        Add a documented object to the module.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to register as a top-level member of the module.

        required"},{"location":"lib/docforge/models/module/#docforge.models.module.Module.get_all_objects","title":"get_all_objects","text":"
        get_all_objects() -> Iterable[DocObject]\n

        Return all top-level documentation objects in the module.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing the module's public members.

        "},{"location":"lib/docforge/models/module/#docforge.models.module.Module.get_object","title":"get_object","text":"
        get_object(name: str) -> DocObject\n

        Retrieve a documented object by name.

        Parameters:

        Name Type Description Default name str

        Name of the object to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If no object with the given name exists.

        "},{"location":"lib/docforge/models/object/","title":"Object","text":""},{"location":"lib/docforge/models/object/#docforge.models.object","title":"docforge.models.object","text":""},{"location":"lib/docforge/models/object/#docforge.models.object--summary","title":"Summary","text":"

        Documentation model representing individual Python objects.

        This module defines the DocObject class, the fundamental recursive unit of the doc-forge documentation model. Each DocObject represents a Python entity such as a class, function, method, or attribute, and may contain nested members that form a hierarchical documentation structure.

        "},{"location":"lib/docforge/models/object/#docforge.models.object-classes","title":"Classes","text":""},{"location":"lib/docforge/models/object/#docforge.models.object.DocObject","title":"DocObject","text":"
        DocObject(\n    name: str,\n    kind: str,\n    path: str,\n    signature: str | None = None,\n    docstring: str | None = None,\n)\n

        Representation of a documented Python object.

        A DocObject models a single Python entity discovered during introspection. Objects may contain nested members, allowing the structure of modules, classes, and other containers to be represented recursively.

        Attributes:

        Name Type Description name str

        Local name of the object.

        kind str

        Type of object (for example class, function, method, or attribute).

        path str

        Fully qualified dotted path to the object.

        signature Optional[str]

        Callable signature if the object represents a callable.

        docstring Optional[str]

        Raw docstring text extracted from the source code.

        members Dict[str, DocObject]

        Mapping of member names to child DocObject instances.

        Initialize a DocObject instance.

        Parameters:

        Name Type Description Default name str

        Local name of the object.

        required kind str

        Object type identifier (for example class or function).

        required path str

        Fully qualified dotted path of the object.

        required signature Optional[str]

        Callable signature if applicable.

        None docstring Optional[str]

        Documentation string associated with the object.

        None"},{"location":"lib/docforge/models/object/#docforge.models.object.DocObject-functions","title":"Functions","text":""},{"location":"lib/docforge/models/object/#docforge.models.object.DocObject.add_member","title":"add_member","text":"
        add_member(obj: DocObject) -> None\n

        Add a child documentation object.

        This is typically used when attaching methods to classes or nested objects to their parent containers.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to add as a member.

        required"},{"location":"lib/docforge/models/object/#docforge.models.object.DocObject.get_all_members","title":"get_all_members","text":"
        get_all_members() -> Iterable[DocObject]\n

        Return all child members of the object.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing nested members.

        "},{"location":"lib/docforge/models/object/#docforge.models.object.DocObject.get_member","title":"get_member","text":"
        get_member(name: str) -> DocObject\n

        Retrieve a member object by name.

        Parameters:

        Name Type Description Default name str

        Name of the member to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If the member does not exist.

        "},{"location":"lib/docforge/models/project/","title":"Project","text":""},{"location":"lib/docforge/models/project/#docforge.models.project","title":"docforge.models.project","text":""},{"location":"lib/docforge/models/project/#docforge.models.project--summary","title":"Summary","text":"

        Documentation model representing a project.

        This module defines the Project class, the top-level container used by doc-forge to represent a documented codebase. A Project aggregates multiple modules and provides access to them through a unified interface.

        "},{"location":"lib/docforge/models/project/#docforge.models.project-classes","title":"Classes","text":""},{"location":"lib/docforge/models/project/#docforge.models.project.Project","title":"Project","text":"
        Project(name: str)\n

        Representation of a documentation project.

        A Project serves as the root container for all modules discovered during introspection. Each module is stored by its dotted import path.

        Attributes:

        Name Type Description name str

        Name of the project.

        modules Dict[str, Module]

        Mapping of module paths to Module instances.

        Initialize a Project instance.

        Parameters:

        Name Type Description Default name str

        Name used to identify the documentation project.

        required"},{"location":"lib/docforge/models/project/#docforge.models.project.Project-functions","title":"Functions","text":""},{"location":"lib/docforge/models/project/#docforge.models.project.Project.add_module","title":"add_module","text":"
        add_module(module: Module) -> None\n

        Register a module in the project.

        Parameters:

        Name Type Description Default module Module

        Module instance to add to the project.

        required"},{"location":"lib/docforge/models/project/#docforge.models.project.Project.get_all_modules","title":"get_all_modules","text":"
        get_all_modules() -> Iterable[Module]\n

        Return all modules contained in the project.

        Returns:

        Type Description Iterable[Module]

        Iterable[Module]: An iterable of Module instances.

        "},{"location":"lib/docforge/models/project/#docforge.models.project.Project.get_module","title":"get_module","text":"
        get_module(path: str) -> Module\n

        Retrieve a module by its dotted path.

        Parameters:

        Name Type Description Default path str

        Fully qualified dotted module path (for example pkg.module).

        required

        Returns:

        Name Type Description Module Module

        The corresponding Module instance.

        Raises:

        Type Description KeyError

        If the module does not exist in the project.

        "},{"location":"lib/docforge/models/project/#docforge.models.project.Project.get_module_list","title":"get_module_list","text":"
        get_module_list() -> list[str]\n

        Return the list of module import paths.

        Returns:

        Type Description list[str]

        list[str]: A list containing the dotted paths of all modules in the project.

        "},{"location":"lib/docforge/nav/","title":"Nav","text":"
        • Mkdocs
        • Resolver
        • Spec
        • Wiki
        "},{"location":"lib/docforge/nav/#docforge.nav","title":"docforge.nav","text":"

        Navigation layer for doc-forge.

        The docforge.nav package manages the relationship between the logical documentation structure defined by the user and the physical documentation files generated on disk.

        "},{"location":"lib/docforge/nav/#docforge.nav--workflow","title":"Workflow","text":"
        1. Specification \u2013 Users define navigation intent in docforge.nav.yml.
        2. Resolution \u2013 resolve_nav expands patterns and matches them against generated Markdown files.
        3. Emission \u2013 MkDocsNavEmitter converts the resolved structure into the YAML navigation format required by mkdocs.yml.

        This layer separates documentation organization from the underlying source code layout, enabling flexible grouping, ordering, and navigation structures independent of module hierarchy.

        "},{"location":"lib/docforge/nav/#docforge.nav-classes","title":"Classes","text":""},{"location":"lib/docforge/nav/#docforge.nav.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"

        Emit MkDocs navigation structures from resolved navigation data.

        The emitter transforms a ResolvedNav object into the YAML-compatible list structure expected by the MkDocs nav configuration field.

        "},{"location":"lib/docforge/nav/#docforge.nav.MkDocsNavEmitter-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/#docforge.nav.MkDocsNavEmitter.emit","title":"emit","text":"
        emit(nav: ResolvedNav) -> list[dict[str, Any]]\n

        Generate a navigation structure for mkdocs.yml.

        Parameters:

        Name Type Description Default nav ResolvedNav

        Resolved navigation data describing documentation groups and their associated Markdown files.

        required

        Returns:

        Type Description list[dict[str, Any]]

        A list of dictionaries representing the MkDocs navigation layout.

        list[dict[str, Any]]

        Each dictionary maps a navigation label to a page or a list of

        list[dict[str, Any]]

        pages.

        "},{"location":"lib/docforge/nav/#docforge.nav.NavSpec","title":"NavSpec","text":"
        NavSpec(\n    home: str | None,\n    groups: dict[str, list[str]],\n    icon: dict[str, str] | None = None,\n)\n

        Parsed representation of a navigation specification.

        A NavSpec describes the intended documentation navigation layout before it is resolved against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page (for example index.md).

        groups dict[str, list[str]]

        Mapping of navigation group titles to lists of file patterns or glob expressions.

        icon

        Optional mapping of theme icon entries (for example {\"logo\": \"material/code-tags\"}) injected into the MkDocs theme as theme.icon.

        Initialize a NavSpec instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home document.

        required groups dict[str, list[str]]

        Mapping of group names to lists of path patterns (glob expressions).

        required icon dict[str, str] | None

        Optional mapping of theme icon entries applied to the generated MkDocs configuration.

        None"},{"location":"lib/docforge/nav/#docforge.nav.NavSpec-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/#docforge.nav.NavSpec.all_patterns","title":"all_patterns","text":"
        all_patterns() -> list[str]\n

        Return all path patterns referenced by the specification.

        Returns:

        Type Description list[str]

        A list containing the home document (if defined) and all

        list[str]

        group pattern entries.

        "},{"location":"lib/docforge/nav/#docforge.nav.NavSpec.load","title":"load classmethod","text":"
        load(path: Path) -> NavSpec\n

        Load a navigation specification from a YAML file.

        Parameters:

        Name Type Description Default path Path

        Filesystem path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed configuration.

        Raises:

        Type Description FileNotFoundError

        If the specified file does not exist.

        ValueError

        If the file contents are not a valid navigation specification.

        "},{"location":"lib/docforge/nav/#docforge.nav.ResolvedNav","title":"ResolvedNav","text":"
        ResolvedNav(\n    home: str | None,\n    groups: dict[str, list[Path]],\n    docs_root: Path | None = None,\n)\n

        Resolved navigation structure.

        A ResolvedNav represents navigation data after glob patterns have been expanded and paths validated against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page.

        groups dict[str, list[Path]]

        Mapping of navigation group titles to lists of resolved documentation file paths.

        Initialize a ResolvedNav instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home page within the documentation root.

        required groups dict[str, list[Path]]

        Mapping of group titles to resolved documentation file paths.

        required docs_root Path | None

        Root directory of the documentation source files.

        None"},{"location":"lib/docforge/nav/#docforge.nav.ResolvedNav-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/#docforge.nav.ResolvedNav.all_files","title":"all_files","text":"
        all_files() -> Iterable[Path]\n

        Iterate over all files referenced by the navigation structure.

        Returns:

        Type Description Iterable[Path]

        An iterable of Path objects representing documentation files.

        Raises:

        Type Description RuntimeError

        If the home page is defined but the documentation root is not available for resolution.

        "},{"location":"lib/docforge/nav/#docforge.nav-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/#docforge.nav.build_wiki_nav","title":"build_wiki_nav","text":"
        build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]\n

        Derive an MkDocs navigation block from a wiki directory.

        Returned paths are relative to the parent of wiki_dir and carry the wiki directory name as their leading component (for example wiki/01_overview.md when the wiki lives at docs/wiki). This makes the result directly usable in an MkDocs nav block with

        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.

        Parameters:

        Name Type Description Default wiki_dir Path

        Path to the hand-written wiki directory, for example docs/wiki.

        required

        Returns:

        Type Description list[dict[str, Any]]

        List[Dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

        Raises:

        Type Description FileNotFoundError

        If the wiki directory does not exist.

        "},{"location":"lib/docforge/nav/#docforge.nav.load_nav_spec","title":"load_nav_spec","text":"
        load_nav_spec(path: Path) -> NavSpec\n

        Load a navigation specification file.

        This helper function reads a YAML navigation file and constructs a corresponding NavSpec instance.

        Parameters:

        Name Type Description Default path Path

        Path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed specification.

        Raises:

        Type Description FileNotFoundError

        If the specification file does not exist.

        ValueError

        If the YAML structure is invalid.

        "},{"location":"lib/docforge/nav/#docforge.nav.resolve_nav","title":"resolve_nav","text":"
        resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n

        Resolve a navigation specification against the filesystem.

        The function expands glob patterns defined in a NavSpec and verifies that referenced documentation files exist within the documentation root.

        Parameters:

        Name Type Description Default spec NavSpec

        Navigation specification describing documentation layout.

        required docs_root Path

        Root directory containing documentation Markdown files.

        required

        Returns:

        Type Description ResolvedNav

        A ResolvedNav instance containing validated navigation paths.

        Raises:

        Type Description FileNotFoundError

        If the documentation root does not exist or a navigation pattern does not match any files.

        "},{"location":"lib/docforge/nav/mkdocs/","title":"Mkdocs","text":""},{"location":"lib/docforge/nav/mkdocs/#docforge.nav.mkdocs","title":"docforge.nav.mkdocs","text":"

        MkDocs navigation emitter.

        This module provides the MkDocsNavEmitter class, which converts a ResolvedNav instance into the navigation structure required by the MkDocs nav configuration.

        "},{"location":"lib/docforge/nav/mkdocs/#docforge.nav.mkdocs-classes","title":"Classes","text":""},{"location":"lib/docforge/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"

        Emit MkDocs navigation structures from resolved navigation data.

        The emitter transforms a ResolvedNav object into the YAML-compatible list structure expected by the MkDocs nav configuration field.

        "},{"location":"lib/docforge/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter.emit","title":"emit","text":"
        emit(nav: ResolvedNav) -> list[dict[str, Any]]\n

        Generate a navigation structure for mkdocs.yml.

        Parameters:

        Name Type Description Default nav ResolvedNav

        Resolved navigation data describing documentation groups and their associated Markdown files.

        required

        Returns:

        Type Description list[dict[str, Any]]

        A list of dictionaries representing the MkDocs navigation layout.

        list[dict[str, Any]]

        Each dictionary maps a navigation label to a page or a list of

        list[dict[str, Any]]

        pages.

        "},{"location":"lib/docforge/nav/resolver/","title":"Resolver","text":""},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver","title":"docforge.nav.resolver","text":"

        Navigation resolution utilities.

        This module resolves a NavSpec against the filesystem by expanding glob patterns and validating that referenced documentation files exist.

        "},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver-classes","title":"Classes","text":""},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver.ResolvedNav","title":"ResolvedNav","text":"
        ResolvedNav(\n    home: str | None,\n    groups: dict[str, list[Path]],\n    docs_root: Path | None = None,\n)\n

        Resolved navigation structure.

        A ResolvedNav represents navigation data after glob patterns have been expanded and paths validated against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page.

        groups dict[str, list[Path]]

        Mapping of navigation group titles to lists of resolved documentation file paths.

        Initialize a ResolvedNav instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home page within the documentation root.

        required groups dict[str, list[Path]]

        Mapping of group titles to resolved documentation file paths.

        required docs_root Path | None

        Root directory of the documentation source files.

        None"},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver.ResolvedNav-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver.ResolvedNav.all_files","title":"all_files","text":"
        all_files() -> Iterable[Path]\n

        Iterate over all files referenced by the navigation structure.

        Returns:

        Type Description Iterable[Path]

        An iterable of Path objects representing documentation files.

        Raises:

        Type Description RuntimeError

        If the home page is defined but the documentation root is not available for resolution.

        "},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/resolver/#docforge.nav.resolver.resolve_nav","title":"resolve_nav","text":"
        resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n

        Resolve a navigation specification against the filesystem.

        The function expands glob patterns defined in a NavSpec and verifies that referenced documentation files exist within the documentation root.

        Parameters:

        Name Type Description Default spec NavSpec

        Navigation specification describing documentation layout.

        required docs_root Path

        Root directory containing documentation Markdown files.

        required

        Returns:

        Type Description ResolvedNav

        A ResolvedNav instance containing validated navigation paths.

        Raises:

        Type Description FileNotFoundError

        If the documentation root does not exist or a navigation pattern does not match any files.

        "},{"location":"lib/docforge/nav/spec/","title":"Spec","text":""},{"location":"lib/docforge/nav/spec/#docforge.nav.spec","title":"docforge.nav.spec","text":"

        Navigation specification model.

        This module defines the NavSpec class, which represents the navigation structure defined by the user in the doc-forge navigation specification (typically docforge.nav.yml).

        "},{"location":"lib/docforge/nav/spec/#docforge.nav.spec-classes","title":"Classes","text":""},{"location":"lib/docforge/nav/spec/#docforge.nav.spec.NavSpec","title":"NavSpec","text":"
        NavSpec(\n    home: str | None,\n    groups: dict[str, list[str]],\n    icon: dict[str, str] | None = None,\n)\n

        Parsed representation of a navigation specification.

        A NavSpec describes the intended documentation navigation layout before it is resolved against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page (for example index.md).

        groups dict[str, list[str]]

        Mapping of navigation group titles to lists of file patterns or glob expressions.

        icon

        Optional mapping of theme icon entries (for example {\"logo\": \"material/code-tags\"}) injected into the MkDocs theme as theme.icon.

        Initialize a NavSpec instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home document.

        required groups dict[str, list[str]]

        Mapping of group names to lists of path patterns (glob expressions).

        required icon dict[str, str] | None

        Optional mapping of theme icon entries applied to the generated MkDocs configuration.

        None"},{"location":"lib/docforge/nav/spec/#docforge.nav.spec.NavSpec-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/spec/#docforge.nav.spec.NavSpec.all_patterns","title":"all_patterns","text":"
        all_patterns() -> list[str]\n

        Return all path patterns referenced by the specification.

        Returns:

        Type Description list[str]

        A list containing the home document (if defined) and all

        list[str]

        group pattern entries.

        "},{"location":"lib/docforge/nav/spec/#docforge.nav.spec.NavSpec.load","title":"load classmethod","text":"
        load(path: Path) -> NavSpec\n

        Load a navigation specification from a YAML file.

        Parameters:

        Name Type Description Default path Path

        Filesystem path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed configuration.

        Raises:

        Type Description FileNotFoundError

        If the specified file does not exist.

        ValueError

        If the file contents are not a valid navigation specification.

        "},{"location":"lib/docforge/nav/spec/#docforge.nav.spec-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/spec/#docforge.nav.spec.load_nav_spec","title":"load_nav_spec","text":"
        load_nav_spec(path: Path) -> NavSpec\n

        Load a navigation specification file.

        This helper function reads a YAML navigation file and constructs a corresponding NavSpec instance.

        Parameters:

        Name Type Description Default path Path

        Path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed specification.

        Raises:

        Type Description FileNotFoundError

        If the specification file does not exist.

        ValueError

        If the YAML structure is invalid.

        "},{"location":"lib/docforge/nav/wiki/","title":"Wiki","text":""},{"location":"lib/docforge/nav/wiki/#docforge.nav.wiki","title":"docforge.nav.wiki","text":""},{"location":"lib/docforge/nav/wiki/#docforge.nav.wiki--summary","title":"Summary","text":"

        Wiki navigation derivation.

        This module provides build_wiki_nav, which derives an MkDocs-ready navigation block from the file structure of a hand-written wiki directory (typically docs/wiki). wiki content is authored by hand and is never modified by doc-forge; only the navigation layout is inferred.

        "},{"location":"lib/docforge/nav/wiki/#docforge.nav.wiki--notes","title":"Notes","text":"
        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.
        "},{"location":"lib/docforge/nav/wiki/#docforge.nav.wiki-functions","title":"Functions","text":""},{"location":"lib/docforge/nav/wiki/#docforge.nav.wiki.build_wiki_nav","title":"build_wiki_nav","text":"
        build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]\n

        Derive an MkDocs navigation block from a wiki directory.

        Returned paths are relative to the parent of wiki_dir and carry the wiki directory name as their leading component (for example wiki/01_overview.md when the wiki lives at docs/wiki). This makes the result directly usable in an MkDocs nav block with

        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.

        Parameters:

        Name Type Description Default wiki_dir Path

        Path to the hand-written wiki directory, for example docs/wiki.

        required

        Returns:

        Type Description list[dict[str, Any]]

        List[Dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

        Raises:

        Type Description FileNotFoundError

        If the wiki directory does not exist.

        "},{"location":"lib/docforge/renderers/","title":"Renderers","text":"
        • Base
        • Mcp Renderer
        • Mkdocs Renderer
        "},{"location":"lib/docforge/renderers/#docforge.renderers","title":"docforge.renderers","text":""},{"location":"lib/docforge/renderers/#docforge.renderers--summary","title":"Summary","text":"

        Renderers layer for doc-forge.

        The docforge.renderers package transforms the internal documentation models into files formatted for specific documentation systems.

        "},{"location":"lib/docforge/renderers/#docforge.renderers--overview","title":"Overview","text":"

        Renderers consume the doc-forge project model and generate output suitable for documentation tools or machine interfaces.

        Current implementations:

        • MkDocsRenderer \u2013 Produces Markdown files compatible with MkDocs and the mkdocstrings plugin. It automatically handles package hierarchy and generates index.md files for packages.
        • MCPRenderer \u2013 Emits structured JSON resources designed for consumption by Model Context Protocol (MCP) clients.
        "},{"location":"lib/docforge/renderers/#docforge.renderers--extending","title":"Extending","text":"

        New renderers can be added by implementing the DocRenderer protocol defined in docforge.renderers.base.

        "},{"location":"lib/docforge/renderers/#docforge.renderers-classes","title":"Classes","text":""},{"location":"lib/docforge/renderers/#docforge.renderers.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/docforge/renderers/#docforge.renderers.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/renderers/#docforge.renderers.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/docforge/renderers/#docforge.renderers.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/docforge/renderers/#docforge.renderers.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/renderers/#docforge.renderers.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Behavior:

        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source Optional[bool]

        Whether the module is treated as the project source root.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/docforge/renderers/#docforge.renderers.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/docforge/renderers/base/","title":"Base","text":""},{"location":"lib/docforge/renderers/base/#docforge.renderers.base","title":"docforge.renderers.base","text":""},{"location":"lib/docforge/renderers/base/#docforge.renderers.base--summary","title":"Summary","text":"

        Renderer base interfaces and configuration models.

        This module defines the base protocol and configuration container used by doc-forge renderers. Concrete renderer implementations should implement the DocRenderer protocol.

        "},{"location":"lib/docforge/renderers/base/#docforge.renderers.base-classes","title":"Classes","text":""},{"location":"lib/docforge/renderers/base/#docforge.renderers.base.DocRenderer","title":"DocRenderer","text":"

        Bases: Protocol

        Protocol defining the interface for documentation renderers.

        Implementations of this protocol are responsible for transforming a Project model into renderer-specific documentation sources.

        "},{"location":"lib/docforge/renderers/base/#docforge.renderers.base.DocRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/renderers/base/#docforge.renderers.base.DocRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate renderer-specific documentation sources.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules and documentation objects.

        required out_dir Path

        Directory where generated documentation sources should be written.

        required"},{"location":"lib/docforge/renderers/base/#docforge.renderers.base.RendererConfig","title":"RendererConfig","text":"
        RendererConfig(out_dir: Path, project: Project)\n

        Configuration container for documentation renderers.

        A RendererConfig instance groups together the project model and the output directory used during rendering.

        Attributes:

        Name Type Description out_dir Path

        Directory where generated documentation files will be written.

        project Project

        Documentation project model to be rendered.

        Initialize a RendererConfig instance.

        Parameters:

        Name Type Description Default out_dir Path

        Target directory where documentation files should be written.

        required project Project

        Introspected project model to render.

        required"},{"location":"lib/docforge/renderers/base/#docforge.renderers.base.RendererConfig-functions","title":"Functions","text":""},{"location":"lib/docforge/renderers/mcp_renderer/","title":"Mcp Renderer","text":""},{"location":"lib/docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer","title":"docforge.renderers.mcp_renderer","text":""},{"location":"lib/docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer--summary","title":"Summary","text":"

        MCP renderer implementation.

        This module defines the MCPRenderer class, which generates documentation resources compatible with the Model Context Protocol (MCP).

        "},{"location":"lib/docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer-classes","title":"Classes","text":""},{"location":"lib/docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/docforge/renderers/mkdocs_renderer/","title":"Mkdocs Renderer","text":""},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer","title":"docforge.renderers.mkdocs_renderer","text":""},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer--summary","title":"Summary","text":"

        MkDocs renderer implementation.

        This module defines the MkDocsRenderer class, which generates Markdown documentation sources compatible with MkDocs Material and the mkdocstrings plugin.

        The renderer ensures a consistent documentation structure by:

        • Creating a root index.md if one does not exist
        • Generating package index pages automatically
        • Linking child modules within parent package pages
        • Optionally generating README.md from the root package docstring
        "},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer-classes","title":"Classes","text":""},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Behavior:

        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source Optional[bool]

        Whether the module is treated as the project source root.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/docforge/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/docforge/servers/","title":"Servers","text":"
        • Mcp Server
        "},{"location":"lib/docforge/servers/#docforge.servers","title":"docforge.servers","text":""},{"location":"lib/docforge/servers/#docforge.servers--summary","title":"Summary","text":"

        Server layer for doc-forge.

        This module exposes server implementations used to provide live access to generated documentation resources. Currently, it includes the MCP documentation server.

        "},{"location":"lib/docforge/servers/#docforge.servers-classes","title":"Classes","text":""},{"location":"lib/docforge/servers/#docforge.servers.MCPServer","title":"MCPServer","text":"
        MCPServer(mcp_root: Path, name: str)\n

        MCP server for serving a pre-generated documentation bundle.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        Initialize the MCP server.

        Parameters:

        Name Type Description Default mcp_root Path

        Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

        required name str

        Identifier used for the MCP server instance.

        required"},{"location":"lib/docforge/servers/#docforge.servers.MCPServer-functions","title":"Functions","text":""},{"location":"lib/docforge/servers/#docforge.servers.MCPServer.run","title":"run","text":"
        run(\n    transport: Literal[\n        \"stdio\", \"sse\", \"streamable-http\"\n    ] = \"streamable-http\",\n) -> None\n

        Start the MCP server.

        Parameters:

        Name Type Description Default transport Literal['stdio', 'sse', 'streamable-http']

        Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

        'streamable-http'"},{"location":"lib/docforge/servers/mcp_server/","title":"Mcp Server","text":""},{"location":"lib/docforge/servers/mcp_server/#docforge.servers.mcp_server","title":"docforge.servers.mcp_server","text":""},{"location":"lib/docforge/servers/mcp_server/#docforge.servers.mcp_server--summary","title":"Summary","text":"

        MCP server implementation.

        This module defines the MCPServer class, which serves pre-generated documentation bundles through the Model Context Protocol (MCP).

        "},{"location":"lib/docforge/servers/mcp_server/#docforge.servers.mcp_server-classes","title":"Classes","text":""},{"location":"lib/docforge/servers/mcp_server/#docforge.servers.mcp_server.MCPServer","title":"MCPServer","text":"
        MCPServer(mcp_root: Path, name: str)\n

        MCP server for serving a pre-generated documentation bundle.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        Initialize the MCP server.

        Parameters:

        Name Type Description Default mcp_root Path

        Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

        required name str

        Identifier used for the MCP server instance.

        required"},{"location":"lib/docforge/servers/mcp_server/#docforge.servers.mcp_server.MCPServer-functions","title":"Functions","text":""},{"location":"lib/docforge/servers/mcp_server/#docforge.servers.mcp_server.MCPServer.run","title":"run","text":"
        run(\n    transport: Literal[\n        \"stdio\", \"sse\", \"streamable-http\"\n    ] = \"streamable-http\",\n) -> None\n

        Start the MCP server.

        Parameters:

        Name Type Description Default transport Literal['stdio', 'sse', 'streamable-http']

        Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

        'streamable-http'"},{"location":"lib/loaders/","title":"Loaders","text":""},{"location":"lib/loaders/#docforge.loaders","title":"docforge.loaders","text":""},{"location":"lib/loaders/#docforge.loaders--summary","title":"Summary","text":"

        Loader layer for doc-forge.

        The docforge.loaders package is responsible for discovering Python modules and extracting documentation data using static analysis.

        "},{"location":"lib/loaders/#docforge.loaders--overview","title":"Overview","text":"

        This layer converts Python source code into an intermediate documentation model used by doc-forge. It performs module discovery, introspection, and initial filtering before the data is passed to the core documentation models.

        Core capabilities include:

        • Module discovery \u2013 Locate Python modules and packages within a project.
        • Static introspection \u2013 Parse docstrings, signatures, and object hierarchies using the griffe library without executing the code.
        • Public API filtering \u2013 Exclude private members (names prefixed with _) to produce clean public documentation structures.
        "},{"location":"lib/loaders/#docforge.loaders-classes","title":"Classes","text":""},{"location":"lib/loaders/#docforge.loaders.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/loaders/#docforge.loaders.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/loaders/#docforge.loaders.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        "},{"location":"lib/loaders/#docforge.loaders.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths List[str]

        List of dotted module import paths to load.

        required project_name str

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/loaders/#docforge.loaders-functions","title":"Functions","text":""},{"location":"lib/loaders/#docforge.loaders.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        List[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/loaders/griffe_loader/","title":"Griffe Loader","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader","title":"docforge.loaders.griffe_loader","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader--summary","title":"Summary","text":"

        Utilities for loading and introspecting Python modules using Griffe.

        This module provides the GriffeLoader class and helper utilities used to discover Python modules, introspect their structure, and convert the results into doc-forge documentation models.

        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader-classes","title":"Classes","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths List[str]

        List of dotted module import paths to load.

        required project_name str

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader-functions","title":"Functions","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        List[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/models/","title":"Models","text":""},{"location":"lib/models/#docforge.models","title":"docforge.models","text":""},{"location":"lib/models/#docforge.models--summary","title":"Summary","text":"

        Model layer for doc-forge.

        The docforge.models package defines the core data structures used to represent Python source code as a structured documentation model.

        "},{"location":"lib/models/#docforge.models--overview","title":"Overview","text":"

        The model layer forms the central intermediate representation used throughout doc-forge. Python modules and objects discovered during introspection are converted into a hierarchy of documentation models that can later be rendered into different documentation formats.

        Key components:

        • Project \u2013 Root container representing an entire documented codebase.
        • Module \u2013 Representation of a Python module or package containing documented members.
        • DocObject \u2013 Recursive structure representing Python objects such as classes, functions, methods, and attributes.

        These models are intentionally renderer-agnostic, allowing the same documentation structure to be transformed into multiple output formats (e.g., MkDocs, MCP, or other renderers).

        "},{"location":"lib/models/#docforge.models-classes","title":"Classes","text":""},{"location":"lib/models/#docforge.models.DocObject","title":"DocObject","text":"
        DocObject(\n    name: str,\n    kind: str,\n    path: str,\n    signature: str | None = None,\n    docstring: str | None = None,\n)\n

        Representation of a documented Python object.

        A DocObject models a single Python entity discovered during introspection. Objects may contain nested members, allowing the structure of modules, classes, and other containers to be represented recursively.

        Attributes:

        Name Type Description name str

        Local name of the object.

        kind str

        Type of object (for example class, function, method, or attribute).

        path str

        Fully qualified dotted path to the object.

        signature Optional[str]

        Callable signature if the object represents a callable.

        docstring Optional[str]

        Raw docstring text extracted from the source code.

        members Dict[str, DocObject]

        Mapping of member names to child DocObject instances.

        Initialize a DocObject instance.

        Parameters:

        Name Type Description Default name str

        Local name of the object.

        required kind str

        Object type identifier (for example class or function).

        required path str

        Fully qualified dotted path of the object.

        required signature Optional[str]

        Callable signature if applicable.

        None docstring Optional[str]

        Documentation string associated with the object.

        None"},{"location":"lib/models/#docforge.models.DocObject-functions","title":"Functions","text":""},{"location":"lib/models/#docforge.models.DocObject.add_member","title":"add_member","text":"
        add_member(obj: DocObject) -> None\n

        Add a child documentation object.

        This is typically used when attaching methods to classes or nested objects to their parent containers.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to add as a member.

        required"},{"location":"lib/models/#docforge.models.DocObject.get_all_members","title":"get_all_members","text":"
        get_all_members() -> Iterable[DocObject]\n

        Return all child members of the object.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing nested members.

        "},{"location":"lib/models/#docforge.models.DocObject.get_member","title":"get_member","text":"
        get_member(name: str) -> DocObject\n

        Retrieve a member object by name.

        Parameters:

        Name Type Description Default name str

        Name of the member to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If the member does not exist.

        "},{"location":"lib/models/#docforge.models.Module","title":"Module","text":"
        Module(path: str, docstring: str | None = None)\n

        Representation of a documented Python module or package.

        A Module stores metadata about the module itself and maintains a collection of top-level documentation objects discovered during introspection.

        Attributes:

        Name Type Description path str

        Dotted import path of the module.

        docstring Optional[str]

        Module-level documentation string, if present.

        members Dict[str, DocObject]

        Mapping of object names to their corresponding DocObject representations.

        Initialize a Module instance.

        Parameters:

        Name Type Description Default path str

        Dotted import path identifying the module.

        required docstring Optional[str]

        Module-level documentation text, if available.

        None"},{"location":"lib/models/#docforge.models.Module-functions","title":"Functions","text":""},{"location":"lib/models/#docforge.models.Module.add_object","title":"add_object","text":"
        add_object(obj: DocObject) -> None\n

        Add a documented object to the module.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to register as a top-level member of the module.

        required"},{"location":"lib/models/#docforge.models.Module.get_all_objects","title":"get_all_objects","text":"
        get_all_objects() -> Iterable[DocObject]\n

        Return all top-level documentation objects in the module.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing the module's public members.

        "},{"location":"lib/models/#docforge.models.Module.get_object","title":"get_object","text":"
        get_object(name: str) -> DocObject\n

        Retrieve a documented object by name.

        Parameters:

        Name Type Description Default name str

        Name of the object to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If no object with the given name exists.

        "},{"location":"lib/models/#docforge.models.Project","title":"Project","text":"
        Project(name: str)\n

        Representation of a documentation project.

        A Project serves as the root container for all modules discovered during introspection. Each module is stored by its dotted import path.

        Attributes:

        Name Type Description name str

        Name of the project.

        modules Dict[str, Module]

        Mapping of module paths to Module instances.

        Initialize a Project instance.

        Parameters:

        Name Type Description Default name str

        Name used to identify the documentation project.

        required"},{"location":"lib/models/#docforge.models.Project-functions","title":"Functions","text":""},{"location":"lib/models/#docforge.models.Project.add_module","title":"add_module","text":"
        add_module(module: Module) -> None\n

        Register a module in the project.

        Parameters:

        Name Type Description Default module Module

        Module instance to add to the project.

        required"},{"location":"lib/models/#docforge.models.Project.get_all_modules","title":"get_all_modules","text":"
        get_all_modules() -> Iterable[Module]\n

        Return all modules contained in the project.

        Returns:

        Type Description Iterable[Module]

        Iterable[Module]: An iterable of Module instances.

        "},{"location":"lib/models/#docforge.models.Project.get_module","title":"get_module","text":"
        get_module(path: str) -> Module\n

        Retrieve a module by its dotted path.

        Parameters:

        Name Type Description Default path str

        Fully qualified dotted module path (for example pkg.module).

        required

        Returns:

        Name Type Description Module Module

        The corresponding Module instance.

        Raises:

        Type Description KeyError

        If the module does not exist in the project.

        "},{"location":"lib/models/#docforge.models.Project.get_module_list","title":"get_module_list","text":"
        get_module_list() -> list[str]\n

        Return the list of module import paths.

        Returns:

        Type Description list[str]

        list[str]: A list containing the dotted paths of all modules in the project.

        "},{"location":"lib/models/module/","title":"Module","text":""},{"location":"lib/models/module/#docforge.models.module","title":"docforge.models.module","text":""},{"location":"lib/models/module/#docforge.models.module--summary","title":"Summary","text":"

        Documentation model representing a Python module or package.

        This module defines the Module class used in the doc-forge documentation model. A Module acts as a container for top-level documented objects (classes, functions, variables, and other members) discovered during introspection.

        "},{"location":"lib/models/module/#docforge.models.module-classes","title":"Classes","text":""},{"location":"lib/models/module/#docforge.models.module.Module","title":"Module","text":"
        Module(path: str, docstring: str | None = None)\n

        Representation of a documented Python module or package.

        A Module stores metadata about the module itself and maintains a collection of top-level documentation objects discovered during introspection.

        Attributes:

        Name Type Description path str

        Dotted import path of the module.

        docstring Optional[str]

        Module-level documentation string, if present.

        members Dict[str, DocObject]

        Mapping of object names to their corresponding DocObject representations.

        Initialize a Module instance.

        Parameters:

        Name Type Description Default path str

        Dotted import path identifying the module.

        required docstring Optional[str]

        Module-level documentation text, if available.

        None"},{"location":"lib/models/module/#docforge.models.module.Module-functions","title":"Functions","text":""},{"location":"lib/models/module/#docforge.models.module.Module.add_object","title":"add_object","text":"
        add_object(obj: DocObject) -> None\n

        Add a documented object to the module.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to register as a top-level member of the module.

        required"},{"location":"lib/models/module/#docforge.models.module.Module.get_all_objects","title":"get_all_objects","text":"
        get_all_objects() -> Iterable[DocObject]\n

        Return all top-level documentation objects in the module.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing the module's public members.

        "},{"location":"lib/models/module/#docforge.models.module.Module.get_object","title":"get_object","text":"
        get_object(name: str) -> DocObject\n

        Retrieve a documented object by name.

        Parameters:

        Name Type Description Default name str

        Name of the object to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If no object with the given name exists.

        "},{"location":"lib/models/object/","title":"Object","text":""},{"location":"lib/models/object/#docforge.models.object","title":"docforge.models.object","text":""},{"location":"lib/models/object/#docforge.models.object--summary","title":"Summary","text":"

        Documentation model representing individual Python objects.

        This module defines the DocObject class, the fundamental recursive unit of the doc-forge documentation model. Each DocObject represents a Python entity such as a class, function, method, or attribute, and may contain nested members that form a hierarchical documentation structure.

        "},{"location":"lib/models/object/#docforge.models.object-classes","title":"Classes","text":""},{"location":"lib/models/object/#docforge.models.object.DocObject","title":"DocObject","text":"
        DocObject(\n    name: str,\n    kind: str,\n    path: str,\n    signature: str | None = None,\n    docstring: str | None = None,\n)\n

        Representation of a documented Python object.

        A DocObject models a single Python entity discovered during introspection. Objects may contain nested members, allowing the structure of modules, classes, and other containers to be represented recursively.

        Attributes:

        Name Type Description name str

        Local name of the object.

        kind str

        Type of object (for example class, function, method, or attribute).

        path str

        Fully qualified dotted path to the object.

        signature Optional[str]

        Callable signature if the object represents a callable.

        docstring Optional[str]

        Raw docstring text extracted from the source code.

        members Dict[str, DocObject]

        Mapping of member names to child DocObject instances.

        Initialize a DocObject instance.

        Parameters:

        Name Type Description Default name str

        Local name of the object.

        required kind str

        Object type identifier (for example class or function).

        required path str

        Fully qualified dotted path of the object.

        required signature Optional[str]

        Callable signature if applicable.

        None docstring Optional[str]

        Documentation string associated with the object.

        None"},{"location":"lib/models/object/#docforge.models.object.DocObject-functions","title":"Functions","text":""},{"location":"lib/models/object/#docforge.models.object.DocObject.add_member","title":"add_member","text":"
        add_member(obj: DocObject) -> None\n

        Add a child documentation object.

        This is typically used when attaching methods to classes or nested objects to their parent containers.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to add as a member.

        required"},{"location":"lib/models/object/#docforge.models.object.DocObject.get_all_members","title":"get_all_members","text":"
        get_all_members() -> Iterable[DocObject]\n

        Return all child members of the object.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing nested members.

        "},{"location":"lib/models/object/#docforge.models.object.DocObject.get_member","title":"get_member","text":"
        get_member(name: str) -> DocObject\n

        Retrieve a member object by name.

        Parameters:

        Name Type Description Default name str

        Name of the member to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If the member does not exist.

        "},{"location":"lib/models/project/","title":"Project","text":""},{"location":"lib/models/project/#docforge.models.project","title":"docforge.models.project","text":""},{"location":"lib/models/project/#docforge.models.project--summary","title":"Summary","text":"

        Documentation model representing a project.

        This module defines the Project class, the top-level container used by doc-forge to represent a documented codebase. A Project aggregates multiple modules and provides access to them through a unified interface.

        "},{"location":"lib/models/project/#docforge.models.project-classes","title":"Classes","text":""},{"location":"lib/models/project/#docforge.models.project.Project","title":"Project","text":"
        Project(name: str)\n

        Representation of a documentation project.

        A Project serves as the root container for all modules discovered during introspection. Each module is stored by its dotted import path.

        Attributes:

        Name Type Description name str

        Name of the project.

        modules Dict[str, Module]

        Mapping of module paths to Module instances.

        Initialize a Project instance.

        Parameters:

        Name Type Description Default name str

        Name used to identify the documentation project.

        required"},{"location":"lib/models/project/#docforge.models.project.Project-functions","title":"Functions","text":""},{"location":"lib/models/project/#docforge.models.project.Project.add_module","title":"add_module","text":"
        add_module(module: Module) -> None\n

        Register a module in the project.

        Parameters:

        Name Type Description Default module Module

        Module instance to add to the project.

        required"},{"location":"lib/models/project/#docforge.models.project.Project.get_all_modules","title":"get_all_modules","text":"
        get_all_modules() -> Iterable[Module]\n

        Return all modules contained in the project.

        Returns:

        Type Description Iterable[Module]

        Iterable[Module]: An iterable of Module instances.

        "},{"location":"lib/models/project/#docforge.models.project.Project.get_module","title":"get_module","text":"
        get_module(path: str) -> Module\n

        Retrieve a module by its dotted path.

        Parameters:

        Name Type Description Default path str

        Fully qualified dotted module path (for example pkg.module).

        required

        Returns:

        Name Type Description Module Module

        The corresponding Module instance.

        Raises:

        Type Description KeyError

        If the module does not exist in the project.

        "},{"location":"lib/models/project/#docforge.models.project.Project.get_module_list","title":"get_module_list","text":"
        get_module_list() -> list[str]\n

        Return the list of module import paths.

        Returns:

        Type Description list[str]

        list[str]: A list containing the dotted paths of all modules in the project.

        "},{"location":"lib/nav/","title":"Nav","text":""},{"location":"lib/nav/#docforge.nav","title":"docforge.nav","text":"

        Navigation layer for doc-forge.

        The docforge.nav package manages the relationship between the logical documentation structure defined by the user and the physical documentation files generated on disk.

        "},{"location":"lib/nav/#docforge.nav--workflow","title":"Workflow","text":"
        1. Specification \u2013 Users define navigation intent in docforge.nav.yml.
        2. Resolution \u2013 resolve_nav expands patterns and matches them against generated Markdown files.
        3. Emission \u2013 MkDocsNavEmitter converts the resolved structure into the YAML navigation format required by mkdocs.yml.

        This layer separates documentation organization from the underlying source code layout, enabling flexible grouping, ordering, and navigation structures independent of module hierarchy.

        "},{"location":"lib/nav/#docforge.nav-classes","title":"Classes","text":""},{"location":"lib/nav/#docforge.nav.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"

        Emit MkDocs navigation structures from resolved navigation data.

        The emitter transforms a ResolvedNav object into the YAML-compatible list structure expected by the MkDocs nav configuration field.

        "},{"location":"lib/nav/#docforge.nav.MkDocsNavEmitter-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.MkDocsNavEmitter.emit","title":"emit","text":"
        emit(nav: ResolvedNav) -> list[dict[str, Any]]\n

        Generate a navigation structure for mkdocs.yml.

        Parameters:

        Name Type Description Default nav ResolvedNav

        Resolved navigation data describing documentation groups and their associated Markdown files.

        required

        Returns:

        Type Description list[dict[str, Any]]

        A list of dictionaries representing the MkDocs navigation layout.

        list[dict[str, Any]]

        Each dictionary maps a navigation label to a page or a list of

        list[dict[str, Any]]

        pages.

        "},{"location":"lib/nav/#docforge.nav.NavSpec","title":"NavSpec","text":"
        NavSpec(\n    home: str | None,\n    groups: dict[str, list[str]],\n    icon: dict[str, str] | None = None,\n)\n

        Parsed representation of a navigation specification.

        A NavSpec describes the intended documentation navigation layout before it is resolved against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page (for example index.md).

        groups dict[str, list[str]]

        Mapping of navigation group titles to lists of file patterns or glob expressions.

        icon

        Optional mapping of theme icon entries (for example {\"logo\": \"material/code-tags\"}) injected into the MkDocs theme as theme.icon.

        Initialize a NavSpec instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home document.

        required groups dict[str, list[str]]

        Mapping of group names to lists of path patterns (glob expressions).

        required icon dict[str, str] | None

        Optional mapping of theme icon entries applied to the generated MkDocs configuration.

        None"},{"location":"lib/nav/#docforge.nav.NavSpec-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.NavSpec.all_patterns","title":"all_patterns","text":"
        all_patterns() -> list[str]\n

        Return all path patterns referenced by the specification.

        Returns:

        Type Description list[str]

        A list containing the home document (if defined) and all

        list[str]

        group pattern entries.

        "},{"location":"lib/nav/#docforge.nav.NavSpec.load","title":"load classmethod","text":"
        load(path: Path) -> NavSpec\n

        Load a navigation specification from a YAML file.

        Parameters:

        Name Type Description Default path Path

        Filesystem path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed configuration.

        Raises:

        Type Description FileNotFoundError

        If the specified file does not exist.

        ValueError

        If the file contents are not a valid navigation specification.

        "},{"location":"lib/nav/#docforge.nav.ResolvedNav","title":"ResolvedNav","text":"
        ResolvedNav(\n    home: str | None,\n    groups: dict[str, list[Path]],\n    docs_root: Path | None = None,\n)\n

        Resolved navigation structure.

        A ResolvedNav represents navigation data after glob patterns have been expanded and paths validated against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page.

        groups dict[str, list[Path]]

        Mapping of navigation group titles to lists of resolved documentation file paths.

        Initialize a ResolvedNav instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home page within the documentation root.

        required groups dict[str, list[Path]]

        Mapping of group titles to resolved documentation file paths.

        required docs_root Path | None

        Root directory of the documentation source files.

        None"},{"location":"lib/nav/#docforge.nav.ResolvedNav-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.ResolvedNav.all_files","title":"all_files","text":"
        all_files() -> Iterable[Path]\n

        Iterate over all files referenced by the navigation structure.

        Returns:

        Type Description Iterable[Path]

        An iterable of Path objects representing documentation files.

        Raises:

        Type Description RuntimeError

        If the home page is defined but the documentation root is not available for resolution.

        "},{"location":"lib/nav/#docforge.nav-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.build_wiki_nav","title":"build_wiki_nav","text":"
        build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]\n

        Derive an MkDocs navigation block from a wiki directory.

        Returned paths are relative to the parent of wiki_dir and carry the wiki directory name as their leading component (for example wiki/01_overview.md when the wiki lives at docs/wiki). This makes the result directly usable in an MkDocs nav block with

        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.

        Parameters:

        Name Type Description Default wiki_dir Path

        Path to the hand-written wiki directory, for example docs/wiki.

        required

        Returns:

        Type Description list[dict[str, Any]]

        List[Dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

        Raises:

        Type Description FileNotFoundError

        If the wiki directory does not exist.

        "},{"location":"lib/nav/#docforge.nav.load_nav_spec","title":"load_nav_spec","text":"
        load_nav_spec(path: Path) -> NavSpec\n

        Load a navigation specification file.

        This helper function reads a YAML navigation file and constructs a corresponding NavSpec instance.

        Parameters:

        Name Type Description Default path Path

        Path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed specification.

        Raises:

        Type Description FileNotFoundError

        If the specification file does not exist.

        ValueError

        If the YAML structure is invalid.

        "},{"location":"lib/nav/#docforge.nav.resolve_nav","title":"resolve_nav","text":"
        resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n

        Resolve a navigation specification against the filesystem.

        The function expands glob patterns defined in a NavSpec and verifies that referenced documentation files exist within the documentation root.

        Parameters:

        Name Type Description Default spec NavSpec

        Navigation specification describing documentation layout.

        required docs_root Path

        Root directory containing documentation Markdown files.

        required

        Returns:

        Type Description ResolvedNav

        A ResolvedNav instance containing validated navigation paths.

        Raises:

        Type Description FileNotFoundError

        If the documentation root does not exist or a navigation pattern does not match any files.

        "},{"location":"lib/nav/mkdocs/","title":"Mkdocs","text":""},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs","title":"docforge.nav.mkdocs","text":"

        MkDocs navigation emitter.

        This module provides the MkDocsNavEmitter class, which converts a ResolvedNav instance into the navigation structure required by the MkDocs nav configuration.

        "},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs-classes","title":"Classes","text":""},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"

        Emit MkDocs navigation structures from resolved navigation data.

        The emitter transforms a ResolvedNav object into the YAML-compatible list structure expected by the MkDocs nav configuration field.

        "},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter-functions","title":"Functions","text":""},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter.emit","title":"emit","text":"
        emit(nav: ResolvedNav) -> list[dict[str, Any]]\n

        Generate a navigation structure for mkdocs.yml.

        Parameters:

        Name Type Description Default nav ResolvedNav

        Resolved navigation data describing documentation groups and their associated Markdown files.

        required

        Returns:

        Type Description list[dict[str, Any]]

        A list of dictionaries representing the MkDocs navigation layout.

        list[dict[str, Any]]

        Each dictionary maps a navigation label to a page or a list of

        list[dict[str, Any]]

        pages.

        "},{"location":"lib/nav/resolver/","title":"Resolver","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver","title":"docforge.nav.resolver","text":"

        Navigation resolution utilities.

        This module resolves a NavSpec against the filesystem by expanding glob patterns and validating that referenced documentation files exist.

        "},{"location":"lib/nav/resolver/#docforge.nav.resolver-classes","title":"Classes","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver.ResolvedNav","title":"ResolvedNav","text":"
        ResolvedNav(\n    home: str | None,\n    groups: dict[str, list[Path]],\n    docs_root: Path | None = None,\n)\n

        Resolved navigation structure.

        A ResolvedNav represents navigation data after glob patterns have been expanded and paths validated against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page.

        groups dict[str, list[Path]]

        Mapping of navigation group titles to lists of resolved documentation file paths.

        Initialize a ResolvedNav instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home page within the documentation root.

        required groups dict[str, list[Path]]

        Mapping of group titles to resolved documentation file paths.

        required docs_root Path | None

        Root directory of the documentation source files.

        None"},{"location":"lib/nav/resolver/#docforge.nav.resolver.ResolvedNav-functions","title":"Functions","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver.ResolvedNav.all_files","title":"all_files","text":"
        all_files() -> Iterable[Path]\n

        Iterate over all files referenced by the navigation structure.

        Returns:

        Type Description Iterable[Path]

        An iterable of Path objects representing documentation files.

        Raises:

        Type Description RuntimeError

        If the home page is defined but the documentation root is not available for resolution.

        "},{"location":"lib/nav/resolver/#docforge.nav.resolver-functions","title":"Functions","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver.resolve_nav","title":"resolve_nav","text":"
        resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n

        Resolve a navigation specification against the filesystem.

        The function expands glob patterns defined in a NavSpec and verifies that referenced documentation files exist within the documentation root.

        Parameters:

        Name Type Description Default spec NavSpec

        Navigation specification describing documentation layout.

        required docs_root Path

        Root directory containing documentation Markdown files.

        required

        Returns:

        Type Description ResolvedNav

        A ResolvedNav instance containing validated navigation paths.

        Raises:

        Type Description FileNotFoundError

        If the documentation root does not exist or a navigation pattern does not match any files.

        "},{"location":"lib/nav/spec/","title":"Spec","text":""},{"location":"lib/nav/spec/#docforge.nav.spec","title":"docforge.nav.spec","text":"

        Navigation specification model.

        This module defines the NavSpec class, which represents the navigation structure defined by the user in the doc-forge navigation specification (typically docforge.nav.yml).

        "},{"location":"lib/nav/spec/#docforge.nav.spec-classes","title":"Classes","text":""},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec","title":"NavSpec","text":"
        NavSpec(\n    home: str | None,\n    groups: dict[str, list[str]],\n    icon: dict[str, str] | None = None,\n)\n

        Parsed representation of a navigation specification.

        A NavSpec describes the intended documentation navigation layout before it is resolved against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page (for example index.md).

        groups dict[str, list[str]]

        Mapping of navigation group titles to lists of file patterns or glob expressions.

        icon

        Optional mapping of theme icon entries (for example {\"logo\": \"material/code-tags\"}) injected into the MkDocs theme as theme.icon.

        Initialize a NavSpec instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home document.

        required groups dict[str, list[str]]

        Mapping of group names to lists of path patterns (glob expressions).

        required icon dict[str, str] | None

        Optional mapping of theme icon entries applied to the generated MkDocs configuration.

        None"},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec-functions","title":"Functions","text":""},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec.all_patterns","title":"all_patterns","text":"
        all_patterns() -> list[str]\n

        Return all path patterns referenced by the specification.

        Returns:

        Type Description list[str]

        A list containing the home document (if defined) and all

        list[str]

        group pattern entries.

        "},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec.load","title":"load classmethod","text":"
        load(path: Path) -> NavSpec\n

        Load a navigation specification from a YAML file.

        Parameters:

        Name Type Description Default path Path

        Filesystem path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed configuration.

        Raises:

        Type Description FileNotFoundError

        If the specified file does not exist.

        ValueError

        If the file contents are not a valid navigation specification.

        "},{"location":"lib/nav/spec/#docforge.nav.spec-functions","title":"Functions","text":""},{"location":"lib/nav/spec/#docforge.nav.spec.load_nav_spec","title":"load_nav_spec","text":"
        load_nav_spec(path: Path) -> NavSpec\n

        Load a navigation specification file.

        This helper function reads a YAML navigation file and constructs a corresponding NavSpec instance.

        Parameters:

        Name Type Description Default path Path

        Path to the navigation specification file.

        required

        Returns:

        Type Description NavSpec

        A NavSpec instance representing the parsed specification.

        Raises:

        Type Description FileNotFoundError

        If the specification file does not exist.

        ValueError

        If the YAML structure is invalid.

        "},{"location":"lib/renderers/","title":"Renderers","text":""},{"location":"lib/renderers/#docforge.renderers","title":"docforge.renderers","text":""},{"location":"lib/renderers/#docforge.renderers--summary","title":"Summary","text":"

        Renderers layer for doc-forge.

        The docforge.renderers package transforms the internal documentation models into files formatted for specific documentation systems.

        "},{"location":"lib/renderers/#docforge.renderers--overview","title":"Overview","text":"

        Renderers consume the doc-forge project model and generate output suitable for documentation tools or machine interfaces.

        Current implementations:

        • MkDocsRenderer \u2013 Produces Markdown files compatible with MkDocs and the mkdocstrings plugin. It automatically handles package hierarchy and generates index.md files for packages.
        • MCPRenderer \u2013 Emits structured JSON resources designed for consumption by Model Context Protocol (MCP) clients.
        "},{"location":"lib/renderers/#docforge.renderers--extending","title":"Extending","text":"

        New renderers can be added by implementing the DocRenderer protocol defined in docforge.renderers.base.

        "},{"location":"lib/renderers/#docforge.renderers-classes","title":"Classes","text":""},{"location":"lib/renderers/#docforge.renderers.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/renderers/#docforge.renderers.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/#docforge.renderers.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Behavior:

        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source Optional[bool]

        Whether the module is treated as the project source root.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/renderers/base/","title":"Base","text":""},{"location":"lib/renderers/base/#docforge.renderers.base","title":"docforge.renderers.base","text":""},{"location":"lib/renderers/base/#docforge.renderers.base--summary","title":"Summary","text":"

        Renderer base interfaces and configuration models.

        This module defines the base protocol and configuration container used by doc-forge renderers. Concrete renderer implementations should implement the DocRenderer protocol.

        "},{"location":"lib/renderers/base/#docforge.renderers.base-classes","title":"Classes","text":""},{"location":"lib/renderers/base/#docforge.renderers.base.DocRenderer","title":"DocRenderer","text":"

        Bases: Protocol

        Protocol defining the interface for documentation renderers.

        Implementations of this protocol are responsible for transforming a Project model into renderer-specific documentation sources.

        "},{"location":"lib/renderers/base/#docforge.renderers.base.DocRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/base/#docforge.renderers.base.DocRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate renderer-specific documentation sources.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules and documentation objects.

        required out_dir Path

        Directory where generated documentation sources should be written.

        required"},{"location":"lib/renderers/base/#docforge.renderers.base.RendererConfig","title":"RendererConfig","text":"
        RendererConfig(out_dir: Path, project: Project)\n

        Configuration container for documentation renderers.

        A RendererConfig instance groups together the project model and the output directory used during rendering.

        Attributes:

        Name Type Description out_dir Path

        Directory where generated documentation files will be written.

        project Project

        Documentation project model to be rendered.

        Initialize a RendererConfig instance.

        Parameters:

        Name Type Description Default out_dir Path

        Target directory where documentation files should be written.

        required project Project

        Introspected project model to render.

        required"},{"location":"lib/renderers/base/#docforge.renderers.base.RendererConfig-functions","title":"Functions","text":""},{"location":"lib/renderers/mcp_renderer/","title":"Mcp Renderer","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer","title":"docforge.renderers.mcp_renderer","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer--summary","title":"Summary","text":"

        MCP renderer implementation.

        This module defines the MCPRenderer class, which generates documentation resources compatible with the Model Context Protocol (MCP).

        "},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer-classes","title":"Classes","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/renderers/mkdocs_renderer/","title":"Mkdocs Renderer","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer","title":"docforge.renderers.mkdocs_renderer","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer--summary","title":"Summary","text":"

        MkDocs renderer implementation.

        This module defines the MkDocsRenderer class, which generates Markdown documentation sources compatible with MkDocs Material and the mkdocstrings plugin.

        The renderer ensures a consistent documentation structure by:

        • Creating a root index.md if one does not exist
        • Generating package index pages automatically
        • Linking child modules within parent package pages
        • Optionally generating README.md from the root package docstring
        "},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer-classes","title":"Classes","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Behavior:

        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source Optional[bool]

        Whether the module is treated as the project source root.

        None readme_dir Optional[Path]

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/servers/","title":"Servers","text":""},{"location":"lib/servers/#docforge.servers","title":"docforge.servers","text":""},{"location":"lib/servers/#docforge.servers--summary","title":"Summary","text":"

        Server layer for doc-forge.

        This module exposes server implementations used to provide live access to generated documentation resources. Currently, it includes the MCP documentation server.

        "},{"location":"lib/servers/#docforge.servers-classes","title":"Classes","text":""},{"location":"lib/servers/#docforge.servers.MCPServer","title":"MCPServer","text":"
        MCPServer(mcp_root: Path, name: str)\n

        MCP server for serving a pre-generated documentation bundle.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        Initialize the MCP server.

        Parameters:

        Name Type Description Default mcp_root Path

        Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

        required name str

        Identifier used for the MCP server instance.

        required"},{"location":"lib/servers/#docforge.servers.MCPServer-functions","title":"Functions","text":""},{"location":"lib/servers/#docforge.servers.MCPServer.run","title":"run","text":"
        run(\n    transport: Literal[\n        \"stdio\", \"sse\", \"streamable-http\"\n    ] = \"streamable-http\",\n) -> None\n

        Start the MCP server.

        Parameters:

        Name Type Description Default transport Literal['stdio', 'sse', 'streamable-http']

        Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

        'streamable-http'"},{"location":"lib/servers/mcp_server/","title":"Mcp Server","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server","title":"docforge.servers.mcp_server","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server--summary","title":"Summary","text":"

        MCP server implementation.

        This module defines the MCPServer class, which serves pre-generated documentation bundles through the Model Context Protocol (MCP).

        "},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server-classes","title":"Classes","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server.MCPServer","title":"MCPServer","text":"
        MCPServer(mcp_root: Path, name: str)\n

        MCP server for serving a pre-generated documentation bundle.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        Initialize the MCP server.

        Parameters:

        Name Type Description Default mcp_root Path

        Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

        required name str

        Identifier used for the MCP server instance.

        required"},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server.MCPServer-functions","title":"Functions","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server.MCPServer.run","title":"run","text":"
        run(\n    transport: Literal[\n        \"stdio\", \"sse\", \"streamable-http\"\n    ] = \"streamable-http\",\n) -> None\n

        Start the MCP server.

        Parameters:

        Name Type Description Default transport Literal['stdio', 'sse', 'streamable-http']

        Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

        'streamable-http'"},{"location":"wiki/","title":"\ud83d\udd28 docforge \u2014 Docstring-Driven Documentation Forge","text":"

        docforge is an internal documentation tool that generates reference documentation from Google-Styled Doc-Forge Convention (GSDFC) docstrings and assembles it into a single MkDocs site, alongside hand-written wiki pages and OpenAPI-based API docs.

        "},{"location":"wiki/#key-features","title":"\ud83d\ude80 Key Features","text":"
        • \ud83e\uddea GSDFC docstring extraction via Griffe
        • \ud83e\udded Auto-derived navigation for hand-written wiki pages
        • \ud83d\uddc2 Combined MkDocs build: wiki first, then generated library/API reference
        • \ud83d\udd0c Material MkDocs theming out of the box
        • \ud83d\udce6 MCP structured documentation resources
        "},{"location":"wiki/#documentation-structure","title":"\ud83d\udcc1 Documentation Structure","text":"Section Description Overview What docforge is and how it fits the pipeline Architecture Loaders, models, nav, renderers, CLI Conventions GSDFC, .pyi stubs, and template conventions Iterative Workflow How a docs build runs end to end Development Environment setup and quality gates"},{"location":"wiki/#related-resources","title":"\ud83d\udd17 Related Resources","text":"
        • Source Code: C:\\Users\\vishe\\WorkSpace\\code\\aetos\\doc-forge
        • Wiki Kind: hand-written content lives in docs/wiki/

        \u00a9 Aetoskia Internal

        "},{"location":"wiki/01_overview/","title":"Overview","text":"

        docforge turns GSDFC-compliant Python docstrings into maintainable reference documentation. It never edits source docstrings; it reads them, renders them, and assembles a single MkDocs site from all available material.

        "},{"location":"wiki/01_overview/#what-it-generates","title":"What it generates","text":"Kind Source Output lib GSDFC docstrings docs/lib/** rendered markdown api OpenAPI JSON spec docs/api/** rendered markdown wiki Hand-written markdown docs/wiki/** (unchanged) mcp Griffe + renderers docs/mcp/** structured files"},{"location":"wiki/01_overview/#combined-build","title":"Combined build","text":"

        One mkdocs.yml and one MkDocs build serve all kinds:

        1. Wiki navigation is derived from the docs/wiki/ file structure.
        2. Generated library/API navigation is appended after it.
        3. The wiki index.md becomes the site Home.

        Hand-written wiki content is never overwritten or regenerated \u2014 only its navigation is derived automatically.

        "},{"location":"wiki/02_architecture/","title":"Architecture","text":"

        docforge is split into four horizontal layers. Everything flows top to bottom through the CLI.

        "},{"location":"wiki/02_architecture/#loaders-models","title":"Loaders \u2192 Models","text":"

        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).

        "},{"location":"wiki/02_architecture/#navigation","title":"Navigation","text":"

        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.

        "},{"location":"wiki/02_architecture/#renderers","title":"Renderers","text":"

        docforge/renderers turn model data into artifacts:

        • MkDocsRenderer \u2192 docs/lib/** reference markdown
        • MCPRenderer \u2192 docs/mcp/** structured documentation
        "},{"location":"wiki/02_architecture/#cli","title":"CLI","text":"

        docforge/cli wires it all together:

        • commands.py \u2014 the build command and its --mkdocs / --api / --wiki / --mcp modes
        • mkdocs_utils.py \u2014 config generation (mkdocs.yml) including merged wiki + lib + api navigation
        • api_utils.py \u2014 OpenAPI loading and API docs generation
        "},{"location":"wiki/03_conventions/","title":"Conventions","text":""},{"location":"wiki/03_conventions/#gsdfc-docstrings","title":"GSDFC docstrings","text":"

        All documented source uses the Google-Styled Doc-Forge Convention (GSDFC): Args:, Returns:, Raises:, and Attributes: sections with properly typed signatures.

        "},{"location":"wiki/03_conventions/#pyi-stubs","title":".pyi stubs","text":"

        Every module ships a matching .pyi stub kept in sync with the .py implementation. When signatures change, update both files.

        "},{"location":"wiki/03_conventions/#wiki-pages","title":"Wiki pages","text":"
        • 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 \u2192 group Development.
        • index.md is the site Home at 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.
        "},{"location":"wiki/03_conventions/#templates","title":"Templates","text":"

        MkDocs config fragments live in docforge/templates. The mkdocs.wiki.yml fragment carries only the search plugin, since wiki pages contain no mkdocstrings directives.

        "},{"location":"wiki/04_iterative_workflow/","title":"Iterative Workflow","text":"

        A docs build runs through the CLI in a single pass.

        "},{"location":"wiki/04_iterative_workflow/#build-commands","title":"Build commands","text":"
        # Library reference only\ndoc-forge build --mkdocs --module docforge\n\n# Wik + library combined (single MkDocs build)\ndoc-forge build --wiki --mkdocs --module docforge\n\n# Wiki only \u2014 no module required\ndoc-forge build --wiki --site-name docforge\n
        "},{"location":"wiki/04_iterative_workflow/#what-a-combined-build-does","title":"What a combined build does","text":"
        1. Validates the requested modes (--mkdocs, --api, --wiki, --mcp).
        2. Generates library sources under docs/lib/** with MkDocsRenderer.
        3. Generates API sources under docs/api/** when --api is given.
        4. Derives wiki navigation from docs/wiki/**.
        5. Writes mkdocs.yml with merged navigation \u2014 wiki first, generated groups appended, and the wiki Home replacing any spec Home entry.
        6. Runs mkdocs build once and emits the site.
        "},{"location":"wiki/04_iterative_workflow/#explore-the-site","title":"Explore the site","text":"
        doc-forge build --wiki --mkdocs --module docforge\ndoc-forge serve --mkdocs-yml mkdocs.yml\n
        "},{"location":"wiki/05_development/01_environment/","title":"Environment Setup","text":""},{"location":"wiki/05_development/01_environment/#create-the-environment","title":"Create the environment","text":"
        python -m venv .venv\n.venv\\Scripts\\activate\npip install -e .\n

        Requires Python 3.11+.

        "},{"location":"wiki/05_development/01_environment/#dependencies","title":"Dependencies","text":"

        Development extras include:

        • pytest, pytest-cov \u2014 test suite and coverage
        • ruff \u2014 lint and format checking
        • black \u2014 auto-formatting
        • mypy \u2014 strict typing checks
        "},{"location":"wiki/05_development/02_quality_gates/","title":"Quality Gates","text":"

        Run all checks before pushing:

        .venv\\Scripts\\python.exe -m pytest\n.venv\\Scripts\\python.exe -m ruff check docforge tests\n.venv\\Scripts\\python.exe -m black --check docforge tests\n.venv\\Scripts\\python.exe -m mypy docforge\n
        "},{"location":"wiki/05_development/02_quality_gates/#test-layout","title":"Test layout","text":"Path Covers tests/nav/ Nav spec, resolver, wiki nav tests/cli/ Build command flows and modes tests/renderers/ MkDocs / MCP rendering

        CLI tests use the cli_runner fixture with mock_mkdocs_build and mock_mkdocs_load_config so they exercise the full flow without invoking a real MkDocs build.

        "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"lib/","title":"docforge","text":""},{"location":"lib/#docforge","title":"docforge","text":""},{"location":"lib/#docforge--summary","title":"Summary","text":"

        Renderer-agnostic Python documentation compiler that converts Python docstrings into structured documentation for both humans (MkDocs) and machines (MCP / AI agents).

        doc-forge statically analyzes source code, builds a semantic model of modules, classes, functions, and attributes, and renders that model into documentation outputs without executing user code.

        "},{"location":"lib/#docforge--installation","title":"Installation","text":"

        Install using pip:

        pip install doc-forge\n
        "},{"location":"lib/#docforge--cli-usage","title":"CLI usage","text":""},{"location":"lib/#docforge--generate-an-mkdocs-site-from-a-python-package","title":"Generate an MkDocs site from a Python package:","text":"
        doc-forge build --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--generate-mcp-json-documentation","title":"Generate MCP JSON documentation:","text":"
        doc-forge build --mcp --module my_package\n
        "},{"location":"lib/#docforge--generate-mkdocs-site-and-mcp-json-documentation","title":"Generate MkDocs site and MCP JSON documentation:","text":"
        doc-forge build --mcp --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--include-a-hand-written-wiki-in-the-mkdocs-site","title":"Include a hand-written wiki in the MkDocs site:","text":"
        doc-forge build --wiki --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--build-wiki-pages-only-no-module-required","title":"Build wiki pages only (no module required):","text":"
        doc-forge build --wiki --site-name my_package\n
        "},{"location":"lib/#docforge--serve-mkdocs-locally","title":"Serve MkDocs locally:","text":"
        doc-forge serve --mkdocs --module my_package\n
        "},{"location":"lib/#docforge--serve-mcp-locally","title":"Serve MCP locally:","text":"
        doc-forge serve --mcp --module my_package\n
        "},{"location":"lib/#docforge--core-concepts","title":"Core concepts","text":""},{"location":"lib/#docforge--loader","title":"Loader","text":"

        Extracts symbols, signatures, and docstrings using static analysis.

        "},{"location":"lib/#docforge--semantic-model","title":"Semantic model","text":"

        Structured, renderer-agnostic representation of the API.

        "},{"location":"lib/#docforge--renderer","title":"Renderer","text":"

        Converts the semantic model into output formats such as MkDocs or MCP JSON.

        "},{"location":"lib/#docforge--symbol","title":"Symbol","text":"

        Any documentable object

        • module
        • class
        • function
        • method
        • property
        • attribute
        "},{"location":"lib/#docforge--architecture","title":"Architecture","text":"

        doc-forge follows a compiler architecture:

        "},{"location":"lib/#docforge--front-end","title":"Front-end:","text":"

        Static analysis of modules, classes, functions, type hints, and docstrings.

        "},{"location":"lib/#docforge--middle-end","title":"Middle-end:","text":"

        Builds a semantic model describing symbols and relationships.

        "},{"location":"lib/#docforge--back-end","title":"Back-end:","text":"

        Renders documentation using interchangeable renderers.

        This architecture ensures deterministic documentation generation.

        "},{"location":"lib/#docforge--rendering-pipeline","title":"Rendering pipeline","text":"

        Typical flow:

        Python package\n    |\nLoader (static analysis)\n    |\nSemantic model\n    |\nRenderer\n    |\nMkDocs site or MCP JSON\n
        "},{"location":"lib/#docforge--google-styled-doc-forge-convention-gsdfc","title":"Google-Styled Doc-Forge Convention (GSDFC)","text":"

        GSDFC defines how docstrings must be written so they render correctly in MkDocs and remain machine-parsable by doc-forge and AI tooling.

        • Docstrings are the single source of truth.
        • doc-forge compiles docstrings but does not generate documentation content.
        • Documentation follows the Python import hierarchy.
        • Every public symbol should have a complete and accurate docstring.
        "},{"location":"lib/#docforge--general-rules","title":"General rules","text":"
        • Use Markdown headings at package and module level.
        • Use Google-style structured sections at class, function, and method level.
        • Use type hints in signatures.
        • Use parenthesized types in prose entries (name (Type):) that match the signature types. This keeps docstrings self-contained and machine-parseable.
        • Write summaries in imperative form.
        • Sections are separated by ---
        "},{"location":"lib/#docforge--notes-subsection-grouping","title":"Notes subsection grouping","text":"

        Group related information using labeled subsections.

        Example:

        Notes:\n    **Guarantees:**\n\n        - deterministic behavior\n\n    **Lifecycle:**\n\n        - created during initialization\n        - reused across executions\n\n    **Thread safety:**\n\n        - safe for concurrent reads\n
        "},{"location":"lib/#docforge--example-formatting","title":"Example formatting","text":"
        • Use indentation for examples.
        • Indent section contents using four spaces.
        • Use code blocks for example code.
        Example

        Single example:

        Example:\n\n    ```python\n    foo = Foo(\"example\")\n    process(foo, multiplier=2)\n    ```\n

        Multiple examples:

        Example:\n    Create foo:\n\n        ```python\n        foo = Foo(\"example\")\n        ```\n\n    Run engine:\n\n        ```python\n        engine = BarEngine([foo])\n        engine.run()\n        ```\n

        Avoid fenced code blocks inside argument descriptions and other prose lines.

        Inside Example: sections, fenced python code blocks are allowed and must be indented four spaces, matching the examples below.

        "},{"location":"lib/#docforge--separator-rules","title":"Separator rules","text":"

        Use horizontal separators only at docstring root level to separate sections:

        ---\n

        Allowed locations:

        • package docstrings
        • module docstrings
        • major documentation sections

        Do not use separators inside code sections.

        "},{"location":"lib/#docforge--package-docstrings","title":"Package docstrings","text":"

        Package docstrings act as the documentation home page.

        Recommended sections:

        # Summary\n# Installation\n# Quick start\n# CLI usage\n# Core concepts\n# Architecture\n# Rendering pipeline\n# Examples\n# Notes\n
        Example

        Package Doc String:

        '''\n# Summary\n\nFoo-bar processing framework.\n\nProvides tools for defining Foo objects and executing Bar pipelines.\n\n---\n\n# Installation\n\n```bash\npip install foo-bar\n```\n\n---\n\n# Quick start\n\n```python\nfrom foobar import Foo, BarEngine\n\nfoo = Foo(\"example\")\nengine = BarEngine([foo])\n\nresult = engine.run()\n```\n\n---\n'''\n
        "},{"location":"lib/#docforge--module-docstrings","title":"Module docstrings","text":"

        Module docstrings describe a subsystem.

        Recommended sections:

        # Summary\n# Examples\n# Notes\n
        Example

        Module Doc String:

        '''\n# Summary\n\nFoo execution subsystem.\n\nProvides utilities for executing Foo objects through Bar stages.\n\n---\n\nExample:\n\n    ```python\n    from foobar.engine import BarEngine\n    from foobar.foo import Foo\n\n    foo = Foo(\"example\")\n\n    engine = BarEngine([foo])\n    engine.run()\n    ```\n\n---\n'''\n
        "},{"location":"lib/#docforge--class-docstrings","title":"Class docstrings","text":"

        Class docstrings define object responsibility, lifecycle, and attributes.

        Recommended sections:

        Attributes:\nNotes:\nExample:\nRaises:\n
        Example

        Simple Foo:

        class Foo:\n    '''\n    Represents a unit of work.\n\n    Attributes:\n        name (str):\n            Identifier of the foo instance.\n\n        value (int):\n            Numeric value associated with foo.\n\n    Notes:\n        Guarantees:\n\n            - instances are immutable after creation\n\n        Lifecycle:\n\n            - create instance\n            - pass to processing engine\n\n    Example:\n        Create and inspect a Foo:\n\n            ```python\n            foo = Foo(\"example\", value=42)\n            print(foo.name)\n            ```\n    '''\n

        Complex Bar:

        class BarEngine:\n    '''\n    Executes Foo objects through Bar stages.\n\n    Attributes:\n        foos (tuple[Foo, ...]):\n            Foo instances managed by the engine.\n\n    Notes:\n        Guarantees:\n\n            - deterministic execution order\n\n    Example:\n        Run engine:\n\n            ```python\n            foo1 = Foo(\"a\")\n            foo2 = Foo(\"b\")\n\n            engine = BarEngine([foo1, foo2])\n            engine.run()\n            ```\n    '''\n
        "},{"location":"lib/#docforge--function-and-method-docstrings","title":"Function and method docstrings","text":"

        Function docstrings define API contracts.

        Recommended sections:

        Args:\nReturns:\nRaises:\nYields:\nNotes:\nExample:\n
        Example

        Simple process method:

        def process(foo: Foo, multiplier: int) -> int:\n    '''\n    Process a Foo instance.\n\n    Args:\n        foo (Foo):\n            Foo instance to process.\n\n        multiplier (int):\n            Value used to scale foo.\n\n    Returns:\n        int:\n            Processed result.\n\n    Raises:\n        ValueError:\n            If multiplier is negative.\n\n    Notes:\n        Guarantees:\n\n            - foo is not modified\n\n    Example:\n        Process foo:\n\n            ```python\n            foo = Foo(\"example\", value=10)\n\n            result = process(foo, multiplier=2)\n            print(result)\n            ```\n    '''\n

        Multiple Examples:

        def combine(foo_a: Foo, foo_b: Foo) -> Foo:\n    '''\n    Combine two Foo instances.\n\n    Args:\n        foo_a (Foo):\n            First foo.\n\n        foo_b (Foo):\n            Second foo.\n\n    Returns:\n        Foo:\n            Combined foo.\n\n    Example:\n        Basic usage:\n\n            ```python\n            foo1 = Foo(\"a\")\n            foo2 = Foo(\"b\")\n\n            combined = combine(foo1, foo2)\n            ```\n\n        Pipeline usage:\n\n            ```python\n            engine = BarEngine([foo1, foo2])\n            engine.run()\n            ```\n    '''\n
        "},{"location":"lib/#docforge--property-docstrings","title":"Property docstrings","text":"

        Properties must document return values.

        Example

        Property Doc String:

        ```python\n@property\ndef foos(self) -> tuple[Foo, ...]:\n    '''\n    Return contained Foo instances.\n\n    Returns:\n        tuple[Foo, ...]:\n            Stored foo objects.\n\n    Example:\n        ```python\n        container = FooContainer()\n\n        foos = container.foos\n        ```\n    '''\n```\n
        "},{"location":"lib/#docforge--attribute-documentation","title":"Attribute documentation","text":"

        Document attributes in class docstrings using Attributes:.

        Example

        Attribute Doc String:

        ```python\n'''\nRepresents a processing stage.\n\nAttributes:\n    id (str):\n        Unique identifier.\n\n    enabled (bool):\n        Whether the stage is active.\n'''\n```\n
        "},{"location":"lib/#docforge--parsing-guarantees","title":"Parsing guarantees","text":"

        GSDFC ensures doc-forge can deterministically extract:

        • symbol kind (module, class, function, property, attribute)
        • symbol name
        • parameters
        • return values
        • attributes
        • examples
        • structured Notes subsections

        This enables:

        • reliable MkDocs rendering
        • deterministic MCP export
        • accurate AI semantic interpretation
        Notes
        • doc-forge never executes analyzed modules.
        • Documentation is generated entirely through static analysis.
        "},{"location":"lib/#docforge-classes","title":"Classes","text":""},{"location":"lib/#docforge.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Attributes:

        Name Type Description _loader GriffeLoader

        Internal Griffe loader with dedicated module and line collections.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/#docforge.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/#docforge.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        Raises:

        Type Description ImportError

        If the module cannot be loaded by Griffe.

        KeyError

        If the loaded module is missing from the module collection.

        Example

        Load a single module:

        ```python\nloader = GriffeLoader()\nmodule = loader.load_module(\"mypackage.submodule\")\n```\n
        "},{"location":"lib/#docforge.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool | None = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths list[str]

        List of dotted module import paths to load.

        required project_name str | None

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool | None

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/#docforge.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/#docforge.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/#docforge.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/#docforge.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/#docforge.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/#docforge.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Notes
        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source bool | None

        Whether the module is treated as the project source root.

        None readme_dir Path | None

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/#docforge.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool | None

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/#docforge-functions","title":"Functions","text":""},{"location":"lib/#docforge.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path | None

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        list[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/cli/","title":"Cli","text":""},{"location":"lib/cli/#docforge.cli","title":"docforge.cli","text":""},{"location":"lib/cli/#docforge.cli--summary","title":"Summary","text":"

        Command line interface entry point for doc-forge.

        This module exposes the primary CLI entry function used by the doc-forge command. The actual command implementation resides in docforge.cli.main, while this module provides a stable import path for external tools and the package entry point configuration.

        The CLI is responsible for orchestrating documentation workflows such as generating renderer sources, building documentation sites, exporting machine-readable documentation bundles, and starting development or MCP servers.

        "},{"location":"lib/cli/#docforge.cli--typical-usage","title":"Typical usage","text":"

        The CLI is normally invoked through the installed command:

        doc-forge <command> [options]\n

        Programmatic invocation is also possible:

        Example:

        ```python\nfrom docforge.cli import main\nmain()\n```\n
        "},{"location":"lib/cli/api_utils/","title":"Api Utils","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils","title":"docforge.cli.api_utils","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils--summary","title":"Summary","text":"

        Utilities for building API documentation from an OpenAPI specification.

        "},{"location":"lib/cli/api_utils/#docforge.cli.api_utils-classes","title":"Classes","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.OpenAPIMetadata","title":"OpenAPIMetadata dataclass","text":"
        OpenAPIMetadata(\n    site_name: str,\n    site_description: str | None,\n    site_author: str | None,\n)\n

        Metadata derived from the info block of an OpenAPI specification.

        Attributes:

        Name Type Description site_name str

        Spec title, used as the MkDocs site name.

        site_description str | None

        Spec description, used as the site description.

        site_author str | None

        Contact name (fallback: contact email), used as the site author.

        "},{"location":"lib/cli/api_utils/#docforge.cli.api_utils-functions","title":"Functions","text":""},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.derive_metadata","title":"derive_metadata","text":"
        derive_metadata(spec: dict[Any, Any]) -> OpenAPIMetadata\n

        Derive MkDocs site metadata from an OpenAPI spec info block.

        Parameters:

        Name Type Description Default spec dict

        Parsed OpenAPI specification.

        required

        Returns:

        Name Type Description OpenAPIMetadata OpenAPIMetadata

        Site name, description, and author derived from the spec.

        "},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.generate_api_sources","title":"generate_api_sources","text":"
        generate_api_sources(\n    spec: dict[Any, Any], docs_dir: Path\n) -> None\n

        Generate swagger-enabled Markdown sources and the spec copy.

        The specification is written as openapi.json inside docs_dir and an index.md embedding the swagger UI is generated alongside it.

        Parameters:

        Name Type Description Default spec dict

        Parsed OpenAPI specification.

        required docs_dir Path

        Directory (for example docs/api) where the swagger sources are written.

        required"},{"location":"lib/cli/api_utils/#docforge.cli.api_utils.load_openapi_spec","title":"load_openapi_spec","text":"
        load_openapi_spec(spec_path: Path) -> dict[Any, Any]\n

        Load and validate an OpenAPI specification from a JSON file.

        Parameters:

        Name Type Description Default spec_path Path

        Path to the OpenAPI JSON specification file.

        required

        Returns:

        Name Type Description dict dict[Any, Any]

        The parsed OpenAPI specification.

        Raises:

        Type Description ClickException

        If the file cannot be read or the info block is invalid.

        "},{"location":"lib/cli/commands/","title":"Commands","text":""},{"location":"lib/cli/commands/#docforge.cli.commands","title":"docforge.cli.commands","text":""},{"location":"lib/cli/commands/#docforge.cli.commands--summary","title":"Summary","text":"

        Command definitions for the doc-forge CLI.

        Provides the CLI structure using Click, including build, serve, and tree commands.

        Notes
        • The build command validates requested modes before generating anything.
        • --mkdocs, --api, and --wiki share a single MkDocs build; --mcp generates a machine-readable bundle independently.
        "},{"location":"lib/cli/commands/#docforge.cli.commands-classes","title":"Classes","text":""},{"location":"lib/cli/commands/#docforge.cli.commands-functions","title":"Functions","text":""},{"location":"lib/cli/commands/#docforge.cli.commands.build","title":"build","text":"
        build(\n    mcp: bool,\n    mkdocs: bool,\n    api: bool,\n    wiki: bool,\n    module_is_source: bool,\n    module: str | None,\n    openapi_spec: Path | None,\n    project_name: str | None,\n    site_name: str | None,\n    docs_dir: Path,\n    wiki_dir: Path,\n    nav_file: Path,\n    template: Path | None,\n    mkdocs_yml: Path,\n    out_dir: Path,\n) -> None\n

        Build documentation artifacts.

        This command runs the full documentation pipeline: it loads Python modules, generates renderer-specific documentation sources, and optionally builds or serves the final output.

        Depending on the selected options, the build can target:

        • MkDocs static documentation sites for library reference docs
        • Swagger-enabled API docs generated from an OpenAPI spec
        • Hand-written wiki pages included in the MkDocs site
        • MCP structured documentation resources
        Notes
        • At least one of --mcp, --mkdocs, --wiki, or --api must be provided.
        • --mkdocs, --api, and --wiki are combined into a single MkDocs build, while --mcp emits a machine-readable bundle.

        Parameters:

        Name Type Description Default mcp bool

        Enable MCP documentation generation.

        required mkdocs bool

        Enable MkDocs library documentation generation.

        required api bool

        Enable API documentation generation from an OpenAPI spec.

        required wiki bool

        Include a hand-written wiki directory in the MkDocs site.

        required module_is_source bool

        Treat the specified module directory as the project root.

        required module str | None

        Python module import path to document.

        required openapi_spec Path | None

        Path to the OpenAPI JSON specification used for API docs.

        required project_name str | None

        Optional override for the project name.

        required site_name str | None

        Display name for the MkDocs site.

        required docs_dir Path

        Shared documentation root used as the MkDocs docs_dir.

        required wiki_dir Path

        Directory containing hand-written wiki markdown files.

        required nav_file Path

        Path to the navigation specification file.

        required template Path | None

        Optional custom MkDocs configuration template.

        required mkdocs_yml Path

        Output path for the generated MkDocs configuration.

        required out_dir Path

        Output directory for generated MCP resources.

        required

        Raises:

        Type Description UsageError

        If required options are missing or conflicting.

        "},{"location":"lib/cli/commands/#docforge.cli.commands.serve","title":"serve","text":"
        serve(\n    mcp: bool,\n    mkdocs: bool,\n    module: str | None,\n    mkdocs_yml: Path,\n    out_dir: Path,\n) -> None\n

        Serve generated documentation locally.

        Depending on the selected mode, this command starts either:

        • A MkDocs development server for browsing documentation
        • An MCP server exposing structured documentation resources

        Parameters:

        Name Type Description Default mcp bool

        Serve documentation using the MCP server.

        required mkdocs bool

        Serve the MkDocs development site.

        required module str | None

        Python module import path to serve via MCP.

        required mkdocs_yml Path

        Path to the MkDocs configuration file.

        required out_dir Path

        Root directory containing MCP documentation resources.

        required

        Raises:

        Type Description UsageError

        If invalid or conflicting options are provided.

        "},{"location":"lib/cli/commands/#docforge.cli.commands.tree","title":"tree","text":"
        tree(module: str, project_name: str | None) -> None\n

        Display the documentation object tree for a module.

        This command introspects the specified module and prints a hierarchical representation of the discovered documentation objects, including modules, classes, functions, and members.

        Parameters:

        Name Type Description Default module str

        Python module import path to introspect.

        required project_name str | None

        Optional name to display as the project root.

        required"},{"location":"lib/cli/main/","title":"Main","text":""},{"location":"lib/cli/main/#docforge.cli.main","title":"docforge.cli.main","text":""},{"location":"lib/cli/main/#docforge.cli.main--summary","title":"Summary","text":"

        Command-line entry point for the doc-forge CLI.

        This module exposes the executable entry point that initializes the Click command group defined in docforge.cli.commands.

        "},{"location":"lib/cli/main/#docforge.cli.main-functions","title":"Functions","text":""},{"location":"lib/cli/main/#docforge.cli.main.main","title":"main","text":"
        main() -> None\n

        Run the doc-forge command-line interface.

        This function initializes and executes the Click CLI application. It is used as the console entry point when invoking doc-forge from the command line.

        "},{"location":"lib/cli/mcp_utils/","title":"Mcp Utils","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils","title":"docforge.cli.mcp_utils","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils--summary","title":"Summary","text":"

        Utilities for working with MCP in the doc-forge CLI.

        Notes
        • generate_resources produces the bundle consumed by MCPServer: index.json, nav.json, and per-module resources under modules/.
        • Resource URIs use the docs:// scheme: docs://index, docs://nav, and docs://modules/{module}.
        "},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils-classes","title":"Classes","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils-functions","title":"Functions","text":""},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils.generate_resources","title":"generate_resources","text":"
        generate_resources(\n    module: str, project_name: str | None, out_dir: Path\n) -> None\n

        Generate MCP documentation resources from a Python module.

        The function performs project introspection, builds the internal documentation model, and renders MCP-compatible JSON resources to the specified output directory.

        Parameters:

        Name Type Description Default module str

        Python module import path used as the entry point for documentation generation.

        required project_name str | None

        Optional override for the project name used in generated documentation metadata.

        required out_dir Path

        Directory where MCP resources (index.json, nav.json, and module data) will be written.

        required"},{"location":"lib/cli/mcp_utils/#docforge.cli.mcp_utils.serve","title":"serve","text":"
        serve(module: str, mcp_root: Path) -> None\n

        Start an MCP server for a pre-generated documentation bundle.

        The server exposes documentation resources such as project metadata, navigation structure, and module documentation through MCP endpoints.

        Parameters:

        Name Type Description Default module str

        Python module import path used to identify the served documentation instance.

        required mcp_root Path

        Path to the directory containing the MCP documentation bundle (index.json, nav.json, and modules/).

        required

        Raises:

        Type Description ClickException

        If the MCP documentation bundle is missing required files or directories.

        "},{"location":"lib/cli/mkdocs_utils/","title":"Mkdocs Utils","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils","title":"docforge.cli.mkdocs_utils","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils--summary","title":"Summary","text":"

        Utilities for working with MkDocs in the doc-forge CLI.

        Notes
        • A single generated mkdocs.yml serves lib, api, and wiki content with merged navigation. Wiki navigation, when enabled, precedes every other group and its index.md becomes the site Home.
        "},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils-classes","title":"Classes","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils-functions","title":"Functions","text":""},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.build","title":"build","text":"
        build(mkdocs_yml: Path) -> None\n

        Build the MkDocs documentation site.

        This function loads the MkDocs configuration and runs the MkDocs build command to generate the final static documentation site.

        Parameters:

        Name Type Description Default mkdocs_yml Path

        Path to the mkdocs.yml configuration file.

        required

        Raises:

        Type Description ClickException

        If the configuration file does not exist.

        "},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_config","title":"generate_config","text":"
        generate_config(\n    docs_dir: Path,\n    nav_file: Path,\n    template: Path | None,\n    out: Path,\n    site_name: str,\n    modes: Iterable[str] | None = None,\n    site_description: str | None = None,\n    site_author: str | None = None,\n    wiki_dir: Path | None = None,\n) -> None\n

        Generate an mkdocs.yml configuration file.

        The configuration is created by combining a template configuration with a navigation structure derived from the docforge navigation specification (and, when a wiki directory is provided, from the wiki file structure).

        The docs_dir is always written relative to the MkDocs root and is expected to be the shared documentation parent (for example docs), with generated sources nested under lib/ or api/ subdirectories and hand-written wiki content under a wiki/ subdirectory.

        Parameters:

        Name Type Description Default docs_dir Path

        Shared documentation root used as the MkDocs docs_dir.

        required nav_file Path

        Path to the docforge.nav.yml navigation specification.

        required template Path | None

        Optional path to a fully custom MkDocs configuration template. If not provided, built-in templates are merged; the provided template replaces the built-in templates entirely.

        required out Path

        Destination path where the generated mkdocs.yml file will be written.

        required site_name str

        Display name for the generated documentation site.

        required modes Iterable[str] | None

        Documentation modes to enable. Each mode contributes its own built-in template fragment (for example lib, api, or wiki), merged on top of the shared mkdocs.common.yml template.

        None site_description str | None

        Optional site description written into the configuration.

        None site_author str | None

        Optional site author written into the configuration.

        None wiki_dir Path | None

        Optional path to a hand-written wiki directory (for example docs/wiki). When provided, the site navigation is derived from the wiki file structure and placed before the navigation groups defined in nav_file.

        None

        Raises:

        Type Description FileError

        If the navigation specification, template, or wiki directory cannot be found.

        "},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    module: str,\n    docs_dir: Path,\n    project_name: str | None = None,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate MkDocs Markdown sources for a Python module.

        This function introspects the specified module, builds the internal documentation model, and renders Markdown documentation files for use with MkDocs.

        Parameters:

        Name Type Description Default module str

        Python module import path used as the entry point for documentation generation.

        required docs_dir Path

        Directory where the generated Markdown files will be written.

        required project_name str | None

        Optional override for the project name used in documentation metadata.

        None module_is_source bool | None

        If True, treat the specified module directory as the project root rather than a nested module.

        None readme_dir Path | None

        Directory where the generated README.md should be written. If not provided, defaults to the parent of docs_dir.

        None"},{"location":"lib/cli/mkdocs_utils/#docforge.cli.mkdocs_utils.serve","title":"serve","text":"
        serve(mkdocs_yml: Path) -> None\n

        Start an MkDocs development server with live reload.

        The server watches documentation files and automatically reloads the site when changes are detected.

        Parameters:

        Name Type Description Default mkdocs_yml Path

        Path to the mkdocs.yml configuration file.

        required

        Raises:

        Type Description ClickException

        If the configuration file does not exist.

        "},{"location":"lib/loaders/","title":"Loaders","text":""},{"location":"lib/loaders/#docforge.loaders","title":"docforge.loaders","text":""},{"location":"lib/loaders/#docforge.loaders--summary","title":"Summary","text":"

        Loader layer for doc-forge.

        The docforge.loaders package is responsible for discovering Python modules and extracting documentation data using static analysis.

        "},{"location":"lib/loaders/#docforge.loaders--overview","title":"Overview","text":"

        This layer converts Python source code into an intermediate documentation model used by doc-forge. It performs module discovery, introspection, and initial filtering before the data is passed to the core documentation models.

        Core capabilities include:

        • Module discovery \u2013 Locate Python modules and packages within a project.
        • Static introspection \u2013 Parse docstrings, signatures, and object hierarchies using the griffe library without executing the code.
        • Public API filtering \u2013 Exclude private members (names prefixed with _) to produce clean public documentation structures.
        "},{"location":"lib/loaders/#docforge.loaders-classes","title":"Classes","text":""},{"location":"lib/loaders/#docforge.loaders.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Attributes:

        Name Type Description _loader GriffeLoader

        Internal Griffe loader with dedicated module and line collections.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/loaders/#docforge.loaders.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/loaders/#docforge.loaders.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        Raises:

        Type Description ImportError

        If the module cannot be loaded by Griffe.

        KeyError

        If the loaded module is missing from the module collection.

        Example

        Load a single module:

        ```python\nloader = GriffeLoader()\nmodule = loader.load_module(\"mypackage.submodule\")\n```\n
        "},{"location":"lib/loaders/#docforge.loaders.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool | None = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths list[str]

        List of dotted module import paths to load.

        required project_name str | None

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool | None

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/loaders/#docforge.loaders-functions","title":"Functions","text":""},{"location":"lib/loaders/#docforge.loaders.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path | None

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        list[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/loaders/griffe_loader/","title":"Griffe Loader","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader","title":"docforge.loaders.griffe_loader","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader--summary","title":"Summary","text":"

        Utilities for loading and introspecting Python modules using Griffe.

        This module provides the GriffeLoader class and helper utilities used to discover Python modules, introspect their structure, and convert the results into doc-forge documentation models.

        Notes
        • All analysis is static; analyzed modules are never executed.
        • Private members (names starting with _) are skipped during conversion.
        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader-classes","title":"Classes","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader","title":"GriffeLoader","text":"
        GriffeLoader()\n

        Load Python modules using Griffe and convert them into doc-forge models.

        This loader uses the Griffe introspection engine to analyze Python source code and transform the extracted information into Project, Module, and DocObject instances used by doc-forge.

        Attributes:

        Name Type Description _loader GriffeLoader

        Internal Griffe loader with dedicated module and line collections.

        Initialize the Griffe-backed loader.

        Creates an internal Griffe loader instance with dedicated collections for modules and source lines.

        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader-functions","title":"Functions","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_module","title":"load_module","text":"
        load_module(path: str) -> Module\n

        Load and convert a single Python module.

        The module is introspected using Griffe and then transformed into a doc-forge Module model.

        Parameters:

        Name Type Description Default path str

        Dotted import path of the module.

        required

        Returns:

        Name Type Description Module Module

        A populated Module instance.

        Raises:

        Type Description ImportError

        If the module cannot be loaded by Griffe.

        KeyError

        If the loaded module is missing from the module collection.

        Example

        Load a single module:

        ```python\nloader = GriffeLoader()\nmodule = loader.load_module(\"mypackage.submodule\")\n```\n
        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.GriffeLoader.load_project","title":"load_project","text":"
        load_project(\n    module_paths: list[str],\n    project_name: str | None = None,\n    skip_import_errors: bool | None = None,\n) -> Project\n

        Load multiple modules and assemble them into a Project model.

        Each module path is introspected and converted into a Module instance. All modules are then aggregated into a single Project object.

        Parameters:

        Name Type Description Default module_paths list[str]

        List of dotted module import paths to load.

        required project_name str | None

        Optional override for the project name. Defaults to the top-level name of the first module.

        None skip_import_errors bool | None

        If True, modules that fail to load will be skipped instead of raising an error.

        None

        Returns:

        Name Type Description Project Project

        A populated Project instance containing the loaded modules.

        Raises:

        Type Description ValueError

        If no module paths are provided.

        ImportError

        If a module fails to load and skip_import_errors is False.

        "},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader-functions","title":"Functions","text":""},{"location":"lib/loaders/griffe_loader/#docforge.loaders.griffe_loader.discover_module_paths","title":"discover_module_paths","text":"
        discover_module_paths(\n    module_name: str, project_root: Path | None = None\n) -> list[str]\n

        Discover Python modules within a package directory.

        The function scans the filesystem for .py files inside the specified package and converts them into dotted module import paths.

        Discovery rules:

        • Directories containing __init__.py are treated as packages.
        • Each .py file is treated as a module.
        • Results are returned as dotted import paths.

        Parameters:

        Name Type Description Default module_name str

        Top-level package name to discover modules from.

        required project_root Path | None

        Root directory used to resolve module paths. If not provided, the current working directory is used.

        None

        Returns:

        Type Description list[str]

        list[str]: A sorted list of unique dotted module import paths.

        Raises:

        Type Description FileNotFoundError

        If the specified package directory does not exist.

        "},{"location":"lib/models/","title":"Models","text":""},{"location":"lib/models/#docforge.models","title":"docforge.models","text":""},{"location":"lib/models/#docforge.models--summary","title":"Summary","text":"

        Model layer for doc-forge.

        The docforge.models package defines the core data structures used to represent Python source code as a structured documentation model.

        "},{"location":"lib/models/#docforge.models--overview","title":"Overview","text":"

        The model layer forms the central intermediate representation used throughout doc-forge. Python modules and objects discovered during introspection are converted into a hierarchy of documentation models that can later be rendered into different documentation formats.

        Key components:

        • Project \u2013 Root container representing an entire documented codebase.
        • Module \u2013 Representation of a Python module or package containing documented members.
        • DocObject \u2013 Recursive structure representing Python objects such as classes, functions, methods, and attributes.

        These models are intentionally renderer-agnostic, allowing the same documentation structure to be transformed into multiple output formats (e.g., MkDocs, MCP, or other renderers).

        "},{"location":"lib/models/#docforge.models-classes","title":"Classes","text":""},{"location":"lib/models/#docforge.models.DocObject","title":"DocObject","text":"
        DocObject(\n    name: str,\n    kind: str,\n    path: str,\n    signature: str | None = None,\n    docstring: str | None = None,\n)\n

        Representation of a documented Python object.

        A DocObject models a single Python entity discovered during introspection. Objects may contain nested members, allowing the structure of modules, classes, and other containers to be represented recursively.

        Attributes:

        Name Type Description name str

        Local name of the object.

        kind str

        Type of object (for example class, function, method, or attribute).

        path str

        Fully qualified dotted path to the object.

        signature str | None

        Callable signature if the object represents a callable.

        docstring str | None

        Raw docstring text extracted from the source code.

        members dict[str, DocObject]

        Mapping of member names to child DocObject instances.

        Initialize a DocObject instance.

        Parameters:

        Name Type Description Default name str

        Local name of the object.

        required kind str

        Object type identifier (for example class or function).

        required path str

        Fully qualified dotted path of the object.

        required signature str | None

        Callable signature if applicable.

        None docstring str | None

        Documentation string associated with the object.

        None"},{"location":"lib/models/#docforge.models.DocObject-functions","title":"Functions","text":""},{"location":"lib/models/#docforge.models.DocObject.add_member","title":"add_member","text":"
        add_member(obj: DocObject) -> None\n

        Add a child documentation object.

        This is typically used when attaching methods to classes or nested objects to their parent containers.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to add as a member.

        required"},{"location":"lib/models/#docforge.models.DocObject.get_all_members","title":"get_all_members","text":"
        get_all_members() -> Iterable[DocObject]\n

        Return all child members of the object.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing nested members.

        "},{"location":"lib/models/#docforge.models.DocObject.get_member","title":"get_member","text":"
        get_member(name: str) -> DocObject\n

        Retrieve a member object by name.

        Parameters:

        Name Type Description Default name str

        Name of the member to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If the member does not exist.

        "},{"location":"lib/models/#docforge.models.Module","title":"Module","text":"
        Module(path: str, docstring: str | None = None)\n

        Representation of a documented Python module or package.

        A Module stores metadata about the module itself and maintains a collection of top-level documentation objects discovered during introspection.

        Attributes:

        Name Type Description path str

        Dotted import path of the module.

        docstring str | None

        Module-level documentation string, if present.

        members dict[str, DocObject]

        Mapping of object names to their corresponding DocObject representations.

        Initialize a Module instance.

        Parameters:

        Name Type Description Default path str

        Dotted import path identifying the module.

        required docstring str | None

        Module-level documentation text, if available.

        None"},{"location":"lib/models/#docforge.models.Module-functions","title":"Functions","text":""},{"location":"lib/models/#docforge.models.Module.add_object","title":"add_object","text":"
        add_object(obj: DocObject) -> None\n

        Add a documented object to the module.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to register as a top-level member of the module.

        required"},{"location":"lib/models/#docforge.models.Module.get_all_objects","title":"get_all_objects","text":"
        get_all_objects() -> Iterable[DocObject]\n

        Return all top-level documentation objects in the module.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing the module's public members.

        "},{"location":"lib/models/#docforge.models.Module.get_object","title":"get_object","text":"
        get_object(name: str) -> DocObject\n

        Retrieve a documented object by name.

        Parameters:

        Name Type Description Default name str

        Name of the object to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If no object with the given name exists.

        "},{"location":"lib/models/#docforge.models.Project","title":"Project","text":"
        Project(name: str)\n

        Representation of a documentation project.

        A Project serves as the root container for all modules discovered during introspection. Each module is stored by its dotted import path.

        Attributes:

        Name Type Description name str

        Name of the project.

        modules dict[str, Module]

        Mapping of module paths to Module instances.

        Initialize a Project instance.

        Parameters:

        Name Type Description Default name str

        Name used to identify the documentation project.

        required Example

        Create a project and register a module:

        ```python\nproject = Project(\"mypackage\")\nproject.add_module(module)\n```\n
        "},{"location":"lib/models/#docforge.models.Project-functions","title":"Functions","text":""},{"location":"lib/models/#docforge.models.Project.add_module","title":"add_module","text":"
        add_module(module: Module) -> None\n

        Register a module in the project.

        Parameters:

        Name Type Description Default module Module

        Module instance to add to the project.

        required"},{"location":"lib/models/#docforge.models.Project.get_all_modules","title":"get_all_modules","text":"
        get_all_modules() -> Iterable[Module]\n

        Return all modules contained in the project.

        Returns:

        Type Description Iterable[Module]

        Iterable[Module]: An iterable of Module instances.

        "},{"location":"lib/models/#docforge.models.Project.get_module","title":"get_module","text":"
        get_module(path: str) -> Module\n

        Retrieve a module by its dotted path.

        Parameters:

        Name Type Description Default path str

        Fully qualified dotted module path (for example pkg.module).

        required

        Returns:

        Name Type Description Module Module

        The corresponding Module instance.

        Raises:

        Type Description KeyError

        If the module does not exist in the project.

        "},{"location":"lib/models/#docforge.models.Project.get_module_list","title":"get_module_list","text":"
        get_module_list() -> list[str]\n

        Return the list of module import paths.

        Returns:

        Type Description list[str]

        list[str]: A list containing the dotted paths of all modules in the project.

        "},{"location":"lib/models/module/","title":"Module","text":""},{"location":"lib/models/module/#docforge.models.module","title":"docforge.models.module","text":""},{"location":"lib/models/module/#docforge.models.module--summary","title":"Summary","text":"

        Documentation model representing a Python module or package.

        This module defines the Module class used in the doc-forge documentation model. A Module acts as a container for top-level documented objects (classes, functions, variables, and other members) discovered during introspection.

        Notes
        • Only public members are stored; private names are filtered by the loader.
        "},{"location":"lib/models/module/#docforge.models.module-classes","title":"Classes","text":""},{"location":"lib/models/module/#docforge.models.module.Module","title":"Module","text":"
        Module(path: str, docstring: str | None = None)\n

        Representation of a documented Python module or package.

        A Module stores metadata about the module itself and maintains a collection of top-level documentation objects discovered during introspection.

        Attributes:

        Name Type Description path str

        Dotted import path of the module.

        docstring str | None

        Module-level documentation string, if present.

        members dict[str, DocObject]

        Mapping of object names to their corresponding DocObject representations.

        Initialize a Module instance.

        Parameters:

        Name Type Description Default path str

        Dotted import path identifying the module.

        required docstring str | None

        Module-level documentation text, if available.

        None"},{"location":"lib/models/module/#docforge.models.module.Module-functions","title":"Functions","text":""},{"location":"lib/models/module/#docforge.models.module.Module.add_object","title":"add_object","text":"
        add_object(obj: DocObject) -> None\n

        Add a documented object to the module.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to register as a top-level member of the module.

        required"},{"location":"lib/models/module/#docforge.models.module.Module.get_all_objects","title":"get_all_objects","text":"
        get_all_objects() -> Iterable[DocObject]\n

        Return all top-level documentation objects in the module.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing the module's public members.

        "},{"location":"lib/models/module/#docforge.models.module.Module.get_object","title":"get_object","text":"
        get_object(name: str) -> DocObject\n

        Retrieve a documented object by name.

        Parameters:

        Name Type Description Default name str

        Name of the object to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If no object with the given name exists.

        "},{"location":"lib/models/object/","title":"Object","text":""},{"location":"lib/models/object/#docforge.models.object","title":"docforge.models.object","text":""},{"location":"lib/models/object/#docforge.models.object--summary","title":"Summary","text":"

        Documentation model representing individual Python objects.

        This module defines the DocObject class, the fundamental recursive unit of the doc-forge documentation model. Each DocObject represents a Python entity such as a class, function, method, or attribute, and may contain nested members that form a hierarchical documentation structure.

        Notes
        • DocObject instances form a tree mirroring the Python import hierarchy.
        • Objects are renderer-agnostic and may be consumed by any renderer.
        "},{"location":"lib/models/object/#docforge.models.object-classes","title":"Classes","text":""},{"location":"lib/models/object/#docforge.models.object.DocObject","title":"DocObject","text":"
        DocObject(\n    name: str,\n    kind: str,\n    path: str,\n    signature: str | None = None,\n    docstring: str | None = None,\n)\n

        Representation of a documented Python object.

        A DocObject models a single Python entity discovered during introspection. Objects may contain nested members, allowing the structure of modules, classes, and other containers to be represented recursively.

        Attributes:

        Name Type Description name str

        Local name of the object.

        kind str

        Type of object (for example class, function, method, or attribute).

        path str

        Fully qualified dotted path to the object.

        signature str | None

        Callable signature if the object represents a callable.

        docstring str | None

        Raw docstring text extracted from the source code.

        members dict[str, DocObject]

        Mapping of member names to child DocObject instances.

        Initialize a DocObject instance.

        Parameters:

        Name Type Description Default name str

        Local name of the object.

        required kind str

        Object type identifier (for example class or function).

        required path str

        Fully qualified dotted path of the object.

        required signature str | None

        Callable signature if applicable.

        None docstring str | None

        Documentation string associated with the object.

        None"},{"location":"lib/models/object/#docforge.models.object.DocObject-functions","title":"Functions","text":""},{"location":"lib/models/object/#docforge.models.object.DocObject.add_member","title":"add_member","text":"
        add_member(obj: DocObject) -> None\n

        Add a child documentation object.

        This is typically used when attaching methods to classes or nested objects to their parent containers.

        Parameters:

        Name Type Description Default obj DocObject

        Documentation object to add as a member.

        required"},{"location":"lib/models/object/#docforge.models.object.DocObject.get_all_members","title":"get_all_members","text":"
        get_all_members() -> Iterable[DocObject]\n

        Return all child members of the object.

        Returns:

        Type Description Iterable[DocObject]

        Iterable[DocObject]: An iterable of DocObject instances representing nested members.

        "},{"location":"lib/models/object/#docforge.models.object.DocObject.get_member","title":"get_member","text":"
        get_member(name: str) -> DocObject\n

        Retrieve a member object by name.

        Parameters:

        Name Type Description Default name str

        Name of the member to retrieve.

        required

        Returns:

        Name Type Description DocObject DocObject

        The corresponding DocObject instance.

        Raises:

        Type Description KeyError

        If the member does not exist.

        "},{"location":"lib/models/project/","title":"Project","text":""},{"location":"lib/models/project/#docforge.models.project","title":"docforge.models.project","text":""},{"location":"lib/models/project/#docforge.models.project--summary","title":"Summary","text":"

        Documentation model representing a project.

        This module defines the Project class, the top-level container used by doc-forge to represent a documented codebase. A Project aggregates multiple modules and provides access to them through a unified interface.

        Notes
        • Modules are keyed by their dotted import path.
        • Objects are renderer-agnostic; the same model feeds every renderer.
        "},{"location":"lib/models/project/#docforge.models.project-classes","title":"Classes","text":""},{"location":"lib/models/project/#docforge.models.project.Project","title":"Project","text":"
        Project(name: str)\n

        Representation of a documentation project.

        A Project serves as the root container for all modules discovered during introspection. Each module is stored by its dotted import path.

        Attributes:

        Name Type Description name str

        Name of the project.

        modules dict[str, Module]

        Mapping of module paths to Module instances.

        Initialize a Project instance.

        Parameters:

        Name Type Description Default name str

        Name used to identify the documentation project.

        required Example

        Create a project and register a module:

        ```python\nproject = Project(\"mypackage\")\nproject.add_module(module)\n```\n
        "},{"location":"lib/models/project/#docforge.models.project.Project-functions","title":"Functions","text":""},{"location":"lib/models/project/#docforge.models.project.Project.add_module","title":"add_module","text":"
        add_module(module: Module) -> None\n

        Register a module in the project.

        Parameters:

        Name Type Description Default module Module

        Module instance to add to the project.

        required"},{"location":"lib/models/project/#docforge.models.project.Project.get_all_modules","title":"get_all_modules","text":"
        get_all_modules() -> Iterable[Module]\n

        Return all modules contained in the project.

        Returns:

        Type Description Iterable[Module]

        Iterable[Module]: An iterable of Module instances.

        "},{"location":"lib/models/project/#docforge.models.project.Project.get_module","title":"get_module","text":"
        get_module(path: str) -> Module\n

        Retrieve a module by its dotted path.

        Parameters:

        Name Type Description Default path str

        Fully qualified dotted module path (for example pkg.module).

        required

        Returns:

        Name Type Description Module Module

        The corresponding Module instance.

        Raises:

        Type Description KeyError

        If the module does not exist in the project.

        "},{"location":"lib/models/project/#docforge.models.project.Project.get_module_list","title":"get_module_list","text":"
        get_module_list() -> list[str]\n

        Return the list of module import paths.

        Returns:

        Type Description list[str]

        list[str]: A list containing the dotted paths of all modules in the project.

        "},{"location":"lib/nav/","title":"Nav","text":""},{"location":"lib/nav/#docforge.nav","title":"docforge.nav","text":"

        Navigation layer for doc-forge.

        The docforge.nav package manages the relationship between the logical documentation structure defined by the user and the physical documentation files generated on disk.

        "},{"location":"lib/nav/#docforge.nav--workflow","title":"Workflow","text":"
        1. Specification \u2013 Users define navigation intent in docforge.nav.yml.
        2. Resolution \u2013 resolve_nav expands patterns and matches them against generated Markdown files.
        3. Emission \u2013 MkDocsNavEmitter converts the resolved structure into the YAML navigation format required by mkdocs.yml.

        This layer separates documentation organization from the underlying source code layout, enabling flexible grouping, ordering, and navigation structures independent of module hierarchy.

        "},{"location":"lib/nav/#docforge.nav-classes","title":"Classes","text":""},{"location":"lib/nav/#docforge.nav.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"

        Emit MkDocs navigation structures from resolved navigation data.

        The emitter transforms a ResolvedNav object into the YAML-compatible list structure expected by the MkDocs nav configuration field.

        "},{"location":"lib/nav/#docforge.nav.MkDocsNavEmitter-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.MkDocsNavEmitter.emit","title":"emit","text":"
        emit(nav: ResolvedNav) -> list[dict[str, Any]]\n

        Generate a navigation structure for mkdocs.yml.

        Parameters:

        Name Type Description Default nav ResolvedNav

        Resolved navigation data describing documentation groups and their associated Markdown files.

        required

        Returns:

        Type Description list[dict[str, Any]]

        list[dict[str, Any]]: A list of dictionaries representing the MkDocs navigation layout. Each dictionary maps a navigation label to a page or a list of pages.

        "},{"location":"lib/nav/#docforge.nav.NavSpec","title":"NavSpec","text":"
        NavSpec(\n    home: str | None,\n    groups: dict[str, list[str]],\n    icon: dict[str, str] | None = None,\n)\n

        Parsed representation of a navigation specification.

        A NavSpec describes the intended documentation navigation layout before it is resolved against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page (for example index.md).

        groups dict[str, list[str]]

        Mapping of navigation group titles to lists of file patterns or glob expressions.

        icon

        Optional mapping of theme icon entries (for example {\"logo\": \"material/code-tags\"}) injected into the MkDocs theme as theme.icon.

        Initialize a NavSpec instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home document.

        required groups dict[str, list[str]]

        Mapping of group names to lists of path patterns (glob expressions).

        required icon dict[str, str] | None

        Optional mapping of theme icon entries applied to the generated MkDocs configuration.

        None"},{"location":"lib/nav/#docforge.nav.NavSpec-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.NavSpec.all_patterns","title":"all_patterns","text":"
        all_patterns() -> list[str]\n

        Return all path patterns referenced by the specification.

        Returns:

        Type Description list[str]

        list[str]: A list containing the home document (if defined) and all group pattern entries.

        "},{"location":"lib/nav/#docforge.nav.NavSpec.load","title":"load classmethod","text":"
        load(path: Path) -> NavSpec\n

        Load a navigation specification from a YAML file.

        Parameters:

        Name Type Description Default path Path

        Filesystem path to the navigation specification file.

        required

        Returns:

        Name Type Description NavSpec NavSpec

        A NavSpec instance representing the parsed configuration.

        Raises:

        Type Description FileNotFoundError

        If the specified file does not exist.

        ValueError

        If the file contents are not a valid navigation specification.

        "},{"location":"lib/nav/#docforge.nav.ResolvedNav","title":"ResolvedNav","text":"
        ResolvedNav(\n    home: str | None,\n    groups: dict[str, list[Path]],\n    docs_root: Path | None = None,\n)\n

        Resolved navigation structure.

        A ResolvedNav represents navigation data after glob patterns have been expanded and paths validated against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page.

        groups dict[str, list[Path]]

        Mapping of navigation group titles to lists of resolved documentation file paths.

        Initialize a ResolvedNav instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home page within the documentation root.

        required groups dict[str, list[Path]]

        Mapping of group titles to resolved documentation file paths.

        required docs_root Path | None

        Root directory of the documentation source files.

        None"},{"location":"lib/nav/#docforge.nav.ResolvedNav-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.ResolvedNav.all_files","title":"all_files","text":"
        all_files() -> Iterable[Path]\n

        Iterate over all files referenced by the navigation structure.

        Yields:

        Name Type Description Path Iterable[Path]

        A documentation file referenced by the navigation, including the home page when defined.

        Raises:

        Type Description RuntimeError

        If the home page is defined but the documentation root is not available for resolution.

        "},{"location":"lib/nav/#docforge.nav-functions","title":"Functions","text":""},{"location":"lib/nav/#docforge.nav.build_wiki_nav","title":"build_wiki_nav","text":"
        build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]\n

        Derive an MkDocs navigation block from a wiki directory.

        Returned paths are relative to the parent of wiki_dir and carry the wiki directory name as their leading component (for example wiki/01_overview.md when the wiki lives at docs/wiki). This makes the result directly usable in an MkDocs nav block with

        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.

        Parameters:

        Name Type Description Default wiki_dir Path

        Path to the hand-written wiki directory, for example docs/wiki.

        required

        Returns:

        Type Description list[dict[str, Any]]

        list[dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

        Raises:

        Type Description FileNotFoundError

        If the wiki directory does not exist.

        "},{"location":"lib/nav/#docforge.nav.load_nav_spec","title":"load_nav_spec","text":"
        load_nav_spec(path: Path) -> NavSpec\n

        Load a navigation specification file.

        This helper function reads a YAML navigation file and constructs a corresponding NavSpec instance.

        Parameters:

        Name Type Description Default path Path

        Path to the navigation specification file.

        required

        Returns:

        Name Type Description NavSpec NavSpec

        A NavSpec instance representing the parsed specification.

        Raises:

        Type Description FileNotFoundError

        If the specification file does not exist.

        ValueError

        If the YAML structure is invalid.

        "},{"location":"lib/nav/#docforge.nav.resolve_nav","title":"resolve_nav","text":"
        resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n

        Resolve a navigation specification against the filesystem.

        The function expands glob patterns defined in a NavSpec and verifies that referenced documentation files exist within the documentation root.

        Parameters:

        Name Type Description Default spec NavSpec

        Navigation specification describing documentation layout.

        required docs_root Path

        Root directory containing documentation Markdown files.

        required

        Returns:

        Name Type Description ResolvedNav ResolvedNav

        A ResolvedNav instance containing validated navigation paths.

        Raises:

        Type Description FileNotFoundError

        If the documentation root does not exist or a navigation pattern does not match any files.

        "},{"location":"lib/nav/mkdocs/","title":"Mkdocs","text":""},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs","title":"docforge.nav.mkdocs","text":"

        MkDocs navigation emitter.

        This module provides the MkDocsNavEmitter class, which converts a ResolvedNav instance into the navigation structure required by the MkDocs nav configuration.

        Notes
        • The emitted structure is a list of dictionaries, one per top-level nav entry, matching the MkDocs nav YAML format.
        "},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs-classes","title":"Classes","text":""},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter","title":"MkDocsNavEmitter","text":"

        Emit MkDocs navigation structures from resolved navigation data.

        The emitter transforms a ResolvedNav object into the YAML-compatible list structure expected by the MkDocs nav configuration field.

        "},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter-functions","title":"Functions","text":""},{"location":"lib/nav/mkdocs/#docforge.nav.mkdocs.MkDocsNavEmitter.emit","title":"emit","text":"
        emit(nav: ResolvedNav) -> list[dict[str, Any]]\n

        Generate a navigation structure for mkdocs.yml.

        Parameters:

        Name Type Description Default nav ResolvedNav

        Resolved navigation data describing documentation groups and their associated Markdown files.

        required

        Returns:

        Type Description list[dict[str, Any]]

        list[dict[str, Any]]: A list of dictionaries representing the MkDocs navigation layout. Each dictionary maps a navigation label to a page or a list of pages.

        "},{"location":"lib/nav/resolver/","title":"Resolver","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver","title":"docforge.nav.resolver","text":"

        Navigation resolution utilities.

        This module resolves a NavSpec against the filesystem by expanding glob patterns and validating that referenced documentation files exist.

        Notes
        • Glob resolution is recursive and returns paths in sorted order.
        • Unmatched patterns raise FileNotFoundError to fail fast on typos.
        "},{"location":"lib/nav/resolver/#docforge.nav.resolver-classes","title":"Classes","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver.ResolvedNav","title":"ResolvedNav","text":"
        ResolvedNav(\n    home: str | None,\n    groups: dict[str, list[Path]],\n    docs_root: Path | None = None,\n)\n

        Resolved navigation structure.

        A ResolvedNav represents navigation data after glob patterns have been expanded and paths validated against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page.

        groups dict[str, list[Path]]

        Mapping of navigation group titles to lists of resolved documentation file paths.

        Initialize a ResolvedNav instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home page within the documentation root.

        required groups dict[str, list[Path]]

        Mapping of group titles to resolved documentation file paths.

        required docs_root Path | None

        Root directory of the documentation source files.

        None"},{"location":"lib/nav/resolver/#docforge.nav.resolver.ResolvedNav-functions","title":"Functions","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver.ResolvedNav.all_files","title":"all_files","text":"
        all_files() -> Iterable[Path]\n

        Iterate over all files referenced by the navigation structure.

        Yields:

        Name Type Description Path Iterable[Path]

        A documentation file referenced by the navigation, including the home page when defined.

        Raises:

        Type Description RuntimeError

        If the home page is defined but the documentation root is not available for resolution.

        "},{"location":"lib/nav/resolver/#docforge.nav.resolver-functions","title":"Functions","text":""},{"location":"lib/nav/resolver/#docforge.nav.resolver.resolve_nav","title":"resolve_nav","text":"
        resolve_nav(spec: NavSpec, docs_root: Path) -> ResolvedNav\n

        Resolve a navigation specification against the filesystem.

        The function expands glob patterns defined in a NavSpec and verifies that referenced documentation files exist within the documentation root.

        Parameters:

        Name Type Description Default spec NavSpec

        Navigation specification describing documentation layout.

        required docs_root Path

        Root directory containing documentation Markdown files.

        required

        Returns:

        Name Type Description ResolvedNav ResolvedNav

        A ResolvedNav instance containing validated navigation paths.

        Raises:

        Type Description FileNotFoundError

        If the documentation root does not exist or a navigation pattern does not match any files.

        "},{"location":"lib/nav/spec/","title":"Spec","text":""},{"location":"lib/nav/spec/#docforge.nav.spec","title":"docforge.nav.spec","text":"

        Navigation specification model.

        This module defines the NavSpec class, which represents the navigation structure defined by the user in the doc-forge navigation specification (typically docforge.nav.yml).

        Notes
        • The spec file supports an optional icon mapping for MkDocs theme customization.
        • All file references in groups are relative to the documentation root.
        "},{"location":"lib/nav/spec/#docforge.nav.spec-classes","title":"Classes","text":""},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec","title":"NavSpec","text":"
        NavSpec(\n    home: str | None,\n    groups: dict[str, list[str]],\n    icon: dict[str, str] | None = None,\n)\n

        Parsed representation of a navigation specification.

        A NavSpec describes the intended documentation navigation layout before it is resolved against the filesystem.

        Attributes:

        Name Type Description home str | None

        Relative path to the documentation home page (for example index.md).

        groups dict[str, list[str]]

        Mapping of navigation group titles to lists of file patterns or glob expressions.

        icon

        Optional mapping of theme icon entries (for example {\"logo\": \"material/code-tags\"}) injected into the MkDocs theme as theme.icon.

        Initialize a NavSpec instance.

        Parameters:

        Name Type Description Default home str | None

        Relative path to the home document.

        required groups dict[str, list[str]]

        Mapping of group names to lists of path patterns (glob expressions).

        required icon dict[str, str] | None

        Optional mapping of theme icon entries applied to the generated MkDocs configuration.

        None"},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec-functions","title":"Functions","text":""},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec.all_patterns","title":"all_patterns","text":"
        all_patterns() -> list[str]\n

        Return all path patterns referenced by the specification.

        Returns:

        Type Description list[str]

        list[str]: A list containing the home document (if defined) and all group pattern entries.

        "},{"location":"lib/nav/spec/#docforge.nav.spec.NavSpec.load","title":"load classmethod","text":"
        load(path: Path) -> NavSpec\n

        Load a navigation specification from a YAML file.

        Parameters:

        Name Type Description Default path Path

        Filesystem path to the navigation specification file.

        required

        Returns:

        Name Type Description NavSpec NavSpec

        A NavSpec instance representing the parsed configuration.

        Raises:

        Type Description FileNotFoundError

        If the specified file does not exist.

        ValueError

        If the file contents are not a valid navigation specification.

        "},{"location":"lib/nav/spec/#docforge.nav.spec-functions","title":"Functions","text":""},{"location":"lib/nav/spec/#docforge.nav.spec.load_nav_spec","title":"load_nav_spec","text":"
        load_nav_spec(path: Path) -> NavSpec\n

        Load a navigation specification file.

        This helper function reads a YAML navigation file and constructs a corresponding NavSpec instance.

        Parameters:

        Name Type Description Default path Path

        Path to the navigation specification file.

        required

        Returns:

        Name Type Description NavSpec NavSpec

        A NavSpec instance representing the parsed specification.

        Raises:

        Type Description FileNotFoundError

        If the specification file does not exist.

        ValueError

        If the YAML structure is invalid.

        "},{"location":"lib/nav/wiki/","title":"Wiki","text":""},{"location":"lib/nav/wiki/#docforge.nav.wiki","title":"docforge.nav.wiki","text":""},{"location":"lib/nav/wiki/#docforge.nav.wiki--summary","title":"Summary","text":"

        Wiki navigation derivation.

        This module provides build_wiki_nav, which derives an MkDocs-ready navigation block from the file structure of a hand-written wiki directory (typically docs/wiki). wiki content is authored by hand and is never modified by doc-forge; only the navigation layout is inferred.

        "},{"location":"lib/nav/wiki/#docforge.nav.wiki--notes","title":"Notes","text":"
        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.
        "},{"location":"lib/nav/wiki/#docforge.nav.wiki-functions","title":"Functions","text":""},{"location":"lib/nav/wiki/#docforge.nav.wiki.build_wiki_nav","title":"build_wiki_nav","text":"
        build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]\n

        Derive an MkDocs navigation block from a wiki directory.

        Returned paths are relative to the parent of wiki_dir and carry the wiki directory name as their leading component (for example wiki/01_overview.md when the wiki lives at docs/wiki). This makes the result directly usable in an MkDocs nav block with

        • index.md at the wiki root becomes the Home entry.
        • Page labels are derived from filenames: numeric order prefixes such as 01_ or 02- are stripped, separators are replaced with spaces, and names are title-cased (01_overview.md becomes Overview).
        • Subdirectories become nested navigation groups. A nested index.md is rendered as the section root placed first inside the group.
        • Only .md files are considered; hidden entries are ignored.

        Parameters:

        Name Type Description Default wiki_dir Path

        Path to the hand-written wiki directory, for example docs/wiki.

        required

        Returns:

        Type Description list[dict[str, Any]]

        list[dict[str, Any]]: Navigation entries compatible with the MkDocs nav configuration. The list is empty if the wiki contains no Markdown files.

        Raises:

        Type Description FileNotFoundError

        If the wiki directory does not exist.

        "},{"location":"lib/renderers/","title":"Renderers","text":""},{"location":"lib/renderers/#docforge.renderers","title":"docforge.renderers","text":""},{"location":"lib/renderers/#docforge.renderers--summary","title":"Summary","text":"

        Renderers layer for doc-forge.

        The docforge.renderers package transforms the internal documentation models into files formatted for specific documentation systems.

        "},{"location":"lib/renderers/#docforge.renderers--overview","title":"Overview","text":"

        Renderers consume the doc-forge project model and generate output suitable for documentation tools or machine interfaces.

        Current implementations:

        • MkDocsRenderer \u2013 Produces Markdown files compatible with MkDocs and the mkdocstrings plugin. It automatically handles package hierarchy and generates index.md files for packages.
        • MCPRenderer \u2013 Emits structured JSON resources designed for consumption by Model Context Protocol (MCP) clients.
        "},{"location":"lib/renderers/#docforge.renderers--extending","title":"Extending","text":"

        New renderers can be added by implementing the DocRenderer protocol defined in docforge.renderers.base.

        "},{"location":"lib/renderers/#docforge.renderers-classes","title":"Classes","text":""},{"location":"lib/renderers/#docforge.renderers.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/renderers/#docforge.renderers.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/#docforge.renderers.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Notes
        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source bool | None

        Whether the module is treated as the project source root.

        None readme_dir Path | None

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/renderers/#docforge.renderers.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool | None

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/renderers/base/","title":"Base","text":""},{"location":"lib/renderers/base/#docforge.renderers.base","title":"docforge.renderers.base","text":""},{"location":"lib/renderers/base/#docforge.renderers.base--summary","title":"Summary","text":"

        Renderer base interfaces and configuration models.

        This module defines the base protocol and configuration container used by doc-forge renderers. Concrete renderer implementations should implement the DocRenderer protocol.

        "},{"location":"lib/renderers/base/#docforge.renderers.base-classes","title":"Classes","text":""},{"location":"lib/renderers/base/#docforge.renderers.base.DocRenderer","title":"DocRenderer","text":"

        Bases: Protocol

        Protocol defining the interface for documentation renderers.

        Implementations of this protocol are responsible for transforming a Project model into renderer-specific documentation sources.

        "},{"location":"lib/renderers/base/#docforge.renderers.base.DocRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/base/#docforge.renderers.base.DocRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate renderer-specific documentation sources.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules and documentation objects.

        required out_dir Path

        Directory where generated documentation sources should be written.

        required"},{"location":"lib/renderers/base/#docforge.renderers.base.RendererConfig","title":"RendererConfig","text":"
        RendererConfig(out_dir: Path, project: Project)\n

        Configuration container for documentation renderers.

        A RendererConfig instance groups together the project model and the output directory used during rendering.

        Attributes:

        Name Type Description out_dir Path

        Directory where generated documentation files will be written.

        project Project

        Documentation project model to be rendered.

        Initialize a RendererConfig instance.

        Parameters:

        Name Type Description Default out_dir Path

        Target directory where documentation files should be written.

        required project Project

        Introspected project model to render.

        required"},{"location":"lib/renderers/base/#docforge.renderers.base.RendererConfig-functions","title":"Functions","text":""},{"location":"lib/renderers/mcp_renderer/","title":"Mcp Renderer","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer","title":"docforge.renderers.mcp_renderer","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer--summary","title":"Summary","text":"

        MCP renderer implementation.

        This module defines the MCPRenderer class, which generates documentation resources compatible with the Model Context Protocol (MCP).

        "},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer-classes","title":"Classes","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer","title":"MCPRenderer","text":"

        Renderer that generates MCP-compatible documentation resources.

        This renderer converts doc-forge project models into structured JSON resources suitable for consumption by systems implementing the Model Context Protocol (MCP).

        "},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/mcp_renderer/#docforge.renderers.mcp_renderer.MCPRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(project: Project, out_dir: Path) -> None\n

        Generate MCP documentation resources for a project.

        The renderer serializes each module into a JSON resource and produces supporting metadata files such as nav.json and index.json.

        Parameters:

        Name Type Description Default project Project

        Documentation project model to render.

        required out_dir Path

        Directory where MCP resources will be written.

        required"},{"location":"lib/renderers/mkdocs_renderer/","title":"Mkdocs Renderer","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer","title":"docforge.renderers.mkdocs_renderer","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer--summary","title":"Summary","text":"

        MkDocs renderer implementation.

        This module defines the MkDocsRenderer class, which generates Markdown documentation sources compatible with MkDocs Material and the mkdocstrings plugin.

        The renderer ensures a consistent documentation structure by:

        • Creating a root index.md if one does not exist
        • Generating package index pages automatically
        • Linking child modules within parent package pages
        • Optionally generating README.md from the root package docstring
        "},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer-classes","title":"Classes","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer","title":"MkDocsRenderer","text":"

        Renderer that produces Markdown documentation for MkDocs.

        Generated pages use mkdocstrings directives to reference Python modules, allowing MkDocs to render API documentation dynamically.

        "},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer-functions","title":"Functions","text":""},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme","title":"generate_readme","text":"
        generate_readme(\n    project: Project,\n    docs_dir: Path,\n    module_is_source: bool | None = None,\n    readme_dir: Path | None = None,\n) -> None\n

        Generate a README.md file from the root module docstring.

        Notes
        • If module_is_source is True, README.md is written to the project root directory.
        • If False, README generation is currently not implemented.

        Parameters:

        Name Type Description Default project Project

        Project model containing documentation metadata.

        required docs_dir Path

        Directory containing generated documentation sources.

        required module_is_source bool | None

        Whether the module is treated as the project source root.

        None readme_dir Path | None

        Directory where the generated README.md should be written. Defaults to the parent of docs_dir.

        None"},{"location":"lib/renderers/mkdocs_renderer/#docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources","title":"generate_sources","text":"
        generate_sources(\n    project: Project,\n    out_dir: Path,\n    module_is_source: bool | None = None,\n) -> None\n

        Generate Markdown documentation files for a project.

        This method renders a documentation structure from the provided project model and writes the resulting Markdown files to the specified output directory.

        Parameters:

        Name Type Description Default project Project

        Project model containing modules to document.

        required out_dir Path

        Directory where generated Markdown files will be written.

        required module_is_source bool | None

        If True, treat the specified module as the documentation root rather than nesting it inside a folder.

        None"},{"location":"lib/servers/","title":"Servers","text":""},{"location":"lib/servers/#docforge.servers","title":"docforge.servers","text":""},{"location":"lib/servers/#docforge.servers--summary","title":"Summary","text":"

        Server layer for doc-forge.

        This module exposes server implementations used to provide live access to generated documentation resources. Currently, it includes the MCP documentation server.

        "},{"location":"lib/servers/#docforge.servers-classes","title":"Classes","text":""},{"location":"lib/servers/#docforge.servers.MCPServer","title":"MCPServer","text":"
        MCPServer(mcp_root: Path, name: str)\n

        MCP server for serving a pre-generated documentation bundle.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        Attributes:

        Name Type Description mcp_root Path

        Directory containing the generated MCP documentation bundle.

        app FastMCP

        Underlying FastMCP application instance that registers resources and tools.

        Initialize the MCP server.

        Parameters:

        Name Type Description Default mcp_root Path

        Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

        required name str

        Identifier used for the MCP server instance.

        required"},{"location":"lib/servers/#docforge.servers.MCPServer-functions","title":"Functions","text":""},{"location":"lib/servers/#docforge.servers.MCPServer.run","title":"run","text":"
        run(\n    transport: Literal[\n        \"stdio\", \"sse\", \"streamable-http\"\n    ] = \"streamable-http\",\n) -> None\n

        Start the MCP server.

        Parameters:

        Name Type Description Default transport Literal['stdio', 'sse', 'streamable-http']

        Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

        'streamable-http'"},{"location":"lib/servers/mcp_server/","title":"Mcp Server","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server","title":"docforge.servers.mcp_server","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server--summary","title":"Summary","text":"

        MCP server implementation.

        This module defines the MCPServer class, which serves pre-generated documentation bundles through the Model Context Protocol (MCP).

        Notes
        • The served bundle is generated offline by MCPRenderer.
        • Missing resources are reported as structured error dictionaries rather than raising exceptions.
        • The server exposes read-only resources and a single health-check tool.
        "},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server-classes","title":"Classes","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server.MCPServer","title":"MCPServer","text":"
        MCPServer(mcp_root: Path, name: str)\n

        MCP server for serving a pre-generated documentation bundle.

        The server exposes documentation resources and diagnostic tools through MCP endpoints backed by JSON files generated by the MCP renderer.

        Attributes:

        Name Type Description mcp_root Path

        Directory containing the generated MCP documentation bundle.

        app FastMCP

        Underlying FastMCP application instance that registers resources and tools.

        Initialize the MCP server.

        Parameters:

        Name Type Description Default mcp_root Path

        Directory containing the generated MCP documentation bundle (for example index.json, nav.json, and modules/).

        required name str

        Identifier used for the MCP server instance.

        required"},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server.MCPServer-functions","title":"Functions","text":""},{"location":"lib/servers/mcp_server/#docforge.servers.mcp_server.MCPServer.run","title":"run","text":"
        run(\n    transport: Literal[\n        \"stdio\", \"sse\", \"streamable-http\"\n    ] = \"streamable-http\",\n) -> None\n

        Start the MCP server.

        Parameters:

        Name Type Description Default transport Literal['stdio', 'sse', 'streamable-http']

        Transport mechanism used by the MCP server. Supported options include stdio, sse, and streamable-http.

        'streamable-http'"},{"location":"wiki/","title":"\ud83d\udd28 docforge \u2014 Docstring-Driven Documentation Forge","text":"

        docforge is an internal documentation tool that generates reference documentation from Google-Styled Doc-Forge Convention (GSDFC) docstrings and assembles it into a single MkDocs site, alongside hand-written wiki pages and OpenAPI-based API docs.

        "},{"location":"wiki/#key-features","title":"\ud83d\ude80 Key Features","text":"
        • \ud83e\uddea GSDFC docstring extraction via Griffe
        • \ud83e\udded Auto-derived navigation for hand-written wiki pages
        • \ud83d\uddc2 Combined MkDocs build: wiki first, then generated library/API reference
        • \ud83d\udd0c Material MkDocs theming out of the box
        • \ud83d\udce6 MCP structured documentation resources
        "},{"location":"wiki/#documentation-structure","title":"\ud83d\udcc1 Documentation Structure","text":"Section Description Overview What docforge is and how it fits the pipeline Architecture Loaders, models, nav, renderers, CLI, servers Conventions GSDFC, .pyi stubs, and template conventions Iterative Workflow How a docs build runs end to end Development Environment setup and quality gates Docstring Guide How to write GSDFC-conformant docstrings MCP Guide Building, serving, and consuming the MCP bundle"},{"location":"wiki/#related-resources","title":"\ud83d\udd17 Related Resources","text":"
        • Source Code: the doc-forge repository
        • Wiki Kind: hand-written content lives in docs/wiki/
        • MCP Bundle: generated by doc-forge build --mcp --module docforge into docs/mcp/

        \u00a9 Aetoskia Internal

        "},{"location":"wiki/01_overview/","title":"Overview","text":"

        docforge turns GSDFC-compliant Python docstrings into maintainable reference documentation. It never edits source docstrings; it reads them, renders them, and assembles a single MkDocs site from all available material.

        "},{"location":"wiki/01_overview/#what-it-generates","title":"What it generates","text":"Kind Source Output lib GSDFC docstrings docs/lib/** rendered markdown api OpenAPI JSON spec docs/api/** rendered markdown wiki Hand-written markdown docs/wiki/** (unchanged) mcp GSDFC docstrings + renderers docs/mcp/** structured JSON"},{"location":"wiki/01_overview/#combined-build","title":"Combined build","text":"

        One mkdocs.yml and one MkDocs build serve all kinds:

        1. Wiki navigation is derived from the docs/wiki/ file structure.
        2. Generated library/API navigation is appended after it.
        3. The wiki index.md becomes the site Home.

        Hand-written wiki content is never overwritten or regenerated \u2014 only its navigation is derived automatically.

        "},{"location":"wiki/01_overview/#mcp-bundle","title":"MCP bundle","text":"

        docs/mcp/** is a self-contained, machine-readable reference generated from docforge's own GSDFC docstrings. doc-forge serve --mcp --module docforge serves it over MCP. See the MCP Guide.

        "},{"location":"wiki/02_architecture/","title":"Architecture","text":"

        docforge is split into four horizontal layers. Everything flows top to bottom through the CLI.

        "},{"location":"wiki/02_architecture/#loaders-models","title":"Loaders \u2192 Models","text":"

        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 (Project, Module, DocObject).

        "},{"location":"wiki/02_architecture/#navigation","title":"Navigation","text":"

        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.

        "},{"location":"wiki/02_architecture/#renderers","title":"Renderers","text":"

        docforge/renderers turn model data into artifacts:

        • MkDocsRenderer \u2192 docs/lib/** reference markdown
        • MCPRenderer \u2192 docs/mcp/** structured documentation
        "},{"location":"wiki/02_architecture/#servers","title":"Servers","text":"

        docforge/servers serves generated artifacts over live protocols:

        • MCPServer \u2192 serves a pre-generated docs/mcp/** bundle through MCP resources (docs://index, docs://nav, docs://modules/{module})
        "},{"location":"wiki/02_architecture/#cli","title":"CLI","text":"

        docforge/cli wires it all together:

        • commands.py \u2014 the build command and its --mkdocs / --api / --wiki / --mcp modes
        • mkdocs_utils.py \u2014 config generation (mkdocs.yml) including merged wiki + lib + api navigation
        • api_utils.py \u2014 OpenAPI loading and API docs generation
        "},{"location":"wiki/03_conventions/","title":"Conventions","text":""},{"location":"wiki/03_conventions/#gsdfc-docstrings","title":"GSDFC docstrings","text":"

        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 # Notes sections at module level.
        • Use Args:, Returns:, Raises:, Yields:, Notes:, and Example: sections at function and method level.
        • Always update the matching .pyi stub alongside the .py implementation.
        "},{"location":"wiki/03_conventions/#pyi-stubs","title":".pyi stubs","text":"

        Every module ships a matching .pyi stub kept in sync with the .py implementation. When signatures change, update both files.

        "},{"location":"wiki/03_conventions/#wiki-pages","title":"Wiki pages","text":"
        • Hand-written markdown lives in docs/wiki/** and is never generated.
        • File names use a numeric prefix: 01_overview.md, 02_architecture.md.
        • Nested directories become nested navigation groups: 05_development/01_environment.md \u2192 group Development.
        • index.md is the site Home at 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.
        "},{"location":"wiki/03_conventions/#templates","title":"Templates","text":"

        MkDocs config fragments live in docforge/templates. The mkdocs.wiki.yml fragment carries only the search plugin, since wiki pages contain no mkdocstrings directives.

        "},{"location":"wiki/04_iterative_workflow/","title":"Iterative Workflow","text":"

        A docs build runs through the CLI in a single pass.

        "},{"location":"wiki/04_iterative_workflow/#build-commands","title":"Build commands","text":"
        # Library reference only\ndoc-forge build --mkdocs --module docforge\n\n# Wiki + library combined (single MkDocs build)\ndoc-forge build --wiki --mkdocs --module docforge\n\n# Wiki only \u2014 no module required\ndoc-forge build --wiki --site-name docforge\n\n# MCP structured bundle\ndoc-forge build --mcp --module docforge\n
        "},{"location":"wiki/04_iterative_workflow/#what-a-combined-build-does","title":"What a combined build does","text":"
        1. Validates the requested modes (--mkdocs, --api, --wiki, --mcp).
        2. Generates library sources under docs/lib/** with MkDocsRenderer.
        3. Generates API sources under docs/api/** when --api is given.
        4. Derives wiki navigation from docs/wiki/**.
        5. Writes mkdocs.yml with merged navigation \u2014 wiki first, generated groups appended, and the wiki Home replacing any spec Home entry.
        6. Runs mkdocs build once and emits the site.
        "},{"location":"wiki/04_iterative_workflow/#explore-the-site","title":"Explore the site","text":"
        doc-forge build --wiki --mkdocs --module docforge\ndoc-forge serve --mkdocs --mkdocs-yml mkdocs.yml\n
        "},{"location":"wiki/04_iterative_workflow/#serve-the-mcp-bundle","title":"Serve the MCP bundle","text":"
        doc-forge build --mcp --module docforge\ndoc-forge serve --mcp --module docforge\n
        "},{"location":"wiki/05_development/01_environment/","title":"Environment Setup","text":""},{"location":"wiki/05_development/01_environment/#create-the-environment","title":"Create the environment","text":"
        python -m venv .venv\n.venv\\Scripts\\activate\npip install -e .\n

        Requires Python 3.10+ (per pyproject.toml).

        "},{"location":"wiki/05_development/01_environment/#dependencies","title":"Dependencies","text":"

        Development extras include:

        • pytest, pytest-cov \u2014 test suite and coverage
        • ruff \u2014 lint and format checking
        • black \u2014 auto-formatting
        • mypy \u2014 strict typing checks
        • pydoclint \u2014 docstring \u2194 signature consistency checks
        "},{"location":"wiki/05_development/02_quality_gates/","title":"Quality Gates","text":"

        Run all checks before pushing:

        .venv\\Scripts\\python.exe -m pytest\n.venv\\Scripts\\python.exe -m ruff check docforge tests\n.venv\\Scripts\\python.exe -m black --check docforge tests\n.venv\\Scripts\\python.exe -m mypy docforge\n.venv\\Scripts\\pydoclint.exe docforge\n
        "},{"location":"wiki/05_development/02_quality_gates/#test-layout","title":"Test layout","text":"Path Covers tests/nav/ Nav spec, resolver, wiki nav tests/cli/ Build command flows and modes tests/renderers/ MkDocs / MCP rendering

        CLI tests use the cli_runner fixture with mock_mkdocs_build and mock_mkdocs_load_config so they exercise the full flow without invoking a real MkDocs build.

        "},{"location":"wiki/05_development/03_gsdfc_guide/","title":"GSDFC Docstring Guide","text":"

        This page is the practical companion to the authoritative GSDFC specification in the docforge/__init__.py package docstring. It describes how to write docstrings that render correctly in MkDocs and stay machine-parseable by doc-forge, MkDocs, and MCP clients.

        "},{"location":"wiki/05_development/03_gsdfc_guide/#overview","title":"Overview","text":"
        • Docstrings are the single source of truth.
        • doc-forge compiles docstrings but never rewrites them.
        • Every public symbol should have a complete, accurate docstring.
        • Type hints live in signatures; prose entries repeat the type in parentheses and must match the signature.
        "},{"location":"wiki/05_development/03_gsdfc_guide/#module-docstrings","title":"Module docstrings","text":"

        Modules use Markdown headings and --- separators.

        Recommended sections:

        • # Summary \u2014 what the subsystem does
        • # Examples \u2014 a representative usage snippet
        • # Notes \u2014 guarantees, lifecycle, and thread-safety notes
        "},{"location":"wiki/05_development/03_gsdfc_guide/#class-docstrings","title":"Class docstrings","text":"

        Recommended sections, in order:

        • summary line describing responsibility
        • Attributes: \u2014 instance attributes with name (Type): entries
        • Notes: \u2014 grouped subsections such as Guarantees, Lifecycle
        • Example: \u2014 indented python code block
        "},{"location":"wiki/05_development/03_gsdfc_guide/#function-and-method-docstrings","title":"Function and method docstrings","text":"

        Recommended section order:

        1. Args:
        2. Returns:
        3. Raises:
        4. Yields:
        5. Notes:
        6. Example:

        Formatting rules:

        • Args: entries are name (Type): followed by an indented description.
        • Returns: entries are Type: followed by an indented description.
        • Raises: entries are ExceptionType: followed by an indented condition.
        • Yields: replaces Returns: for generators.
        • Summaries are written in the imperative mood.
        • Fenced python blocks are allowed inside Example: sections, indented four spaces.
        "},{"location":"wiki/05_development/03_gsdfc_guide/#property-docstrings","title":"Property docstrings","text":"

        Properties document their return values with a Returns: section and, when meaningful, an Example:.

        "},{"location":"wiki/05_development/03_gsdfc_guide/#example","title":"Example","text":"
        def process(foo: Foo, multiplier: int) -> int:\n    \"\"\"Process a Foo instance.\n\n    Args:\n        foo (Foo):\n            Foo instance to process.\n\n        multiplier (int):\n            Value used to scale foo.\n\n    Returns:\n        int:\n            Processed result.\n\n    Raises:\n        ValueError:\n            If multiplier is negative.\n\n    Example:\n        Process foo:\n\n            ```python\n            foo = Foo(\"example\", value=10)\n            result = process(foo, multiplier=2)\n            print(result)\n            ```\n    \"\"\"\n
        "},{"location":"wiki/05_development/03_gsdfc_guide/#keeping-stubs-in-sync","title":"Keeping stubs in sync","text":"

        Every .py module ships a matching .pyi stub. When a signature or a public symbol changes, update both files. Signature annotations in the stub must match the implementation.

        "},{"location":"wiki/05_development/03_gsdfc_guide/#enforcement","title":"Enforcement","text":"

        pydoclint (Google style) runs in CI and verifies that Args:/Returns: sections match function signatures, including types.

        • allow-init-docstring = true \u2014 __init__ docstrings are allowed.
        • skip-checking-raises = true \u2014 Raises: sections are descriptive and are not required to map to literal raise statements.
        • check-class-attributes = false \u2014 Attributes: sections document instance attributes without class-level annotations.
        "},{"location":"wiki/05_development/04_mcp_guide/","title":"MCP Guide","text":"

        Doc-forge can export a machine-readable MCP bundle from a project's GSDFC docstrings and serve that bundle over the Model Context Protocol (MCP). The bundle is self-contained: readers can derive the full API reference \u2014 signatures, docstrings, and structure \u2014 for the documented project.

        "},{"location":"wiki/05_development/04_mcp_guide/#building-the-bundle","title":"Building the bundle","text":"
        doc-forge build --mcp --module docforge\n

        This writes structured JSON into docs/mcp/:

        • index.json \u2014 project metadata and module count
        • nav.json \u2014 module list with docs://modules/{module} resource URIs
        • modules/{dotted.path}.json \u2014 per-module serialized documentation
        "},{"location":"wiki/05_development/04_mcp_guide/#serving-the-bundle","title":"Serving the bundle","text":"
        doc-forge serve --mcp --module docforge\n

        The MCPServer (in docforge/servers/mcp_server.py) exposes:

        Resource Description docs://index Project metadata docs://nav Navigation structure docs://modules/{module} Individual module documentation

        The server also registers a single diagnostic tool, ping, and is read-only. Missing resources are returned as structured error dictionaries rather than exceptions. The default transport is streamable-http; stdio and sse are supported via MCPServer.run.

        "},{"location":"wiki/05_development/04_mcp_guide/#bundle-contents","title":"Bundle contents","text":"

        Each module resource contains:

        • path \u2014 dotted module path
        • docstring \u2014 the raw GSDFC module docstring
        • objects \u2014 a recursive mapping of public symbols with name, kind, path, signature, and docstring, plus nested members

        Because the bundle is generated from docstrings, the quality of the bundle equals the quality of the project's GSDFC docstrings. For docforge itself, the GSDFC specification is carried in modules/docforge.json via the docforge/__init__.py package docstring, making the bundle self-documenting.

        "}]} \ No newline at end of file diff --git a/doc-forge/wiki/01_overview/index.html b/doc-forge/wiki/01_overview/index.html index 746dea3..4eda187 100644 --- a/doc-forge/wiki/01_overview/index.html +++ b/doc-forge/wiki/01_overview/index.html @@ -314,6 +314,15 @@ + + +
      • + + + MCP bundle + + +
      • @@ -403,6 +412,10 @@ + + + + @@ -487,6 +500,52 @@ + + + + + + +
      • + + + + + + Gsdfc Guide + + + + + +
      • + + + + + + + + + + +
      • + + + + + + Mcp Guide + + + + + +
      • + + + + @@ -1246,6 +1305,15 @@ + + +
      • + + + MCP bundle + + +
      • @@ -1295,8 +1363,8 @@ and assembles a single MkDocs site from all available material.

        mcpGriffe + renderersdocs/mcp/** structured filesGSDFC docstrings + renderersdocs/mcp/** structured JSON
        @@ -1309,6 +1377,10 @@ and assembles a single MkDocs site from all available material.

        Hand-written wiki content is never overwritten or regenerated — only its navigation is derived automatically.

        +

        MCP bundle

        +

        docs/mcp/** is a self-contained, machine-readable reference generated from +docforge's own GSDFC docstrings. doc-forge serve --mcp --module docforge +serves it over MCP. See the MCP Guide.

        diff --git a/doc-forge/wiki/02_architecture/index.html b/doc-forge/wiki/02_architecture/index.html index e43a9cf..0677112 100644 --- a/doc-forge/wiki/02_architecture/index.html +++ b/doc-forge/wiki/02_architecture/index.html @@ -345,6 +345,15 @@ + + +
      • + + + Servers + + +
      • @@ -421,6 +430,10 @@ + + + + @@ -505,6 +518,52 @@ + + + + + + +
      • + + + + + + Gsdfc Guide + + + + + +
      • + + + + + + + + + + +
      • + + + + + + Mcp Guide + + + + + +
      • + + + +
      @@ -1273,6 +1332,15 @@ + + +
    • + + + Servers + + +
    • @@ -1306,8 +1374,7 @@ 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).

      +the object model under docforge/models (Project, Module, DocObject).

      docforge/nav parses docforge.nav.yml specs (NavSpec, Resolver, and the MkDocs nav emitter) and, since the wiki kind, derives wiki navigation from the @@ -1318,6 +1385,12 @@ file structure via build_wiki_nav.

    • MkDocsRenderer → docs/lib/** reference markdown
    • MCPRenderer → docs/mcp/** structured documentation
    • +

      Servers

      +

      docforge/servers serves generated artifacts over live protocols:

      +
        +
      • MCPServer → serves a pre-generated docs/mcp/** bundle through MCP + resources (docs://index, docs://nav, docs://modules/{module})
      • +

      CLI

      docforge/cli wires it all together:

        diff --git a/doc-forge/wiki/03_conventions/index.html b/doc-forge/wiki/03_conventions/index.html index e968667..eb62161 100644 --- a/doc-forge/wiki/03_conventions/index.html +++ b/doc-forge/wiki/03_conventions/index.html @@ -421,6 +421,10 @@ + + + + @@ -505,6 +509,52 @@ + + + + + + +
      • + + + + + + Gsdfc Guide + + + + + +
      • + + + + + + + + + + +
      • + + + + + + Mcp Guide + + + + + +
      • + + + +
      @@ -1305,13 +1355,25 @@

      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 # Notes sections at module level.
      • +
      • Use Args:, Returns:, Raises:, Yields:, Notes:, and Example: + sections at function and method level.
      • +
      • Always update the matching .pyi stub alongside the .py implementation.
      • +

      .pyi stubs

      Every module ships a matching .pyi stub kept in sync with the .py implementation. When signatures change, update both files.

      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.
      • +
      • File names use a numeric prefix: 01_overview.md, 02_architecture.md.
      • Nested directories become nested navigation groups: 05_development/01_environment.md → group Development.
      • index.md is the site Home at the root, and a section root inside a diff --git a/doc-forge/wiki/04_iterative_workflow/index.html b/doc-forge/wiki/04_iterative_workflow/index.html index 4119646..3097e1a 100644 --- a/doc-forge/wiki/04_iterative_workflow/index.html +++ b/doc-forge/wiki/04_iterative_workflow/index.html @@ -389,6 +389,15 @@ +
      • + +
      • + + + Serve the MCP bundle + + +
      @@ -412,6 +421,10 @@ + + + + @@ -496,6 +509,52 @@ + + + + + + +
    • + + + + + + Gsdfc Guide + + + + + +
    • + + + + + + + + + + +
    • + + + + + + Mcp Guide + + + + + +
    • + + + + @@ -1264,6 +1323,15 @@ + + +
    • + + + Serve the MCP bundle + + +
    • @@ -1285,21 +1353,27 @@

      Iterative Workflow

      A docs build runs through the CLI in a single pass.

      Build commands

      -
      1
      -2
      -3
      -4
      -5
      -6
      -7
      -8
      # Library reference only
      +
       1
      + 2
      + 3
      + 4
      + 5
      + 6
      + 7
      + 8
      + 9
      +10
      +11
      # Library reference only
       doc-forge build --mkdocs --module docforge
       
      -# Wik + library combined (single MkDocs build)
      +# Wiki + library combined (single MkDocs build)
       doc-forge build --wiki --mkdocs --module docforge
       
       # Wiki only — no module required
       doc-forge build --wiki --site-name docforge
      +
      +# MCP structured bundle
      +doc-forge build --mcp --module docforge
       

      What a combined build does

        @@ -1314,7 +1388,12 @@

        Explore the site

        doc-forge build --wiki --mkdocs --module docforge
        -doc-forge serve --mkdocs-yml mkdocs.yml
        +doc-forge serve --mkdocs --mkdocs-yml mkdocs.yml
        +
        +

        Serve the MCP bundle

        +
        1
        +2
        doc-forge build --mcp --module docforge
        +doc-forge serve --mcp --module docforge
         
        diff --git a/doc-forge/wiki/05_development/01_environment/index.html b/doc-forge/wiki/05_development/01_environment/index.html index 2f119b7..d5d86b8 100644 --- a/doc-forge/wiki/05_development/01_environment/index.html +++ b/doc-forge/wiki/05_development/01_environment/index.html @@ -343,6 +343,10 @@ + + + + @@ -487,6 +491,52 @@ + + + + + + +
      1. + + + + + + Gsdfc Guide + + + + + +
      2. + + + + + + + + + + +
      3. + + + + + + Mcp Guide + + + + + +
      4. + + + + @@ -1272,7 +1322,7 @@ .venv\Scripts\activate pip install -e .
      -

      Requires Python 3.11+.

      +

      Requires Python 3.10+ (per pyproject.toml).

      Dependencies

      Development extras include:

        @@ -1280,6 +1330,7 @@
      • ruff — lint and format checking
      • black — auto-formatting
      • mypy — strict typing checks
      • +
      • pydoclint — docstring ↔ signature consistency checks
      diff --git a/doc-forge/wiki/05_development/02_quality_gates/index.html b/doc-forge/wiki/05_development/02_quality_gates/index.html index a1a1149..36ac78f 100644 --- a/doc-forge/wiki/05_development/02_quality_gates/index.html +++ b/doc-forge/wiki/05_development/02_quality_gates/index.html @@ -12,7 +12,7 @@ - + @@ -343,6 +343,10 @@ + + + + @@ -478,6 +482,52 @@ + + + + + + +
    • + + + + + + Gsdfc Guide + + + + + +
    • + + + + + + + + + + +
    • + + + + + + Mcp Guide + + + + + +
    • + + + + @@ -1251,10 +1301,12 @@
      1
       2
       3
      -4
      .venv\Scripts\python.exe -m pytest
      +4
      +5
      .venv\Scripts\python.exe -m pytest
       .venv\Scripts\python.exe -m ruff check docforge tests
       .venv\Scripts\python.exe -m black --check docforge tests
       .venv\Scripts\python.exe -m mypy docforge
      +.venv\Scripts\pydoclint.exe docforge
       

      Test layout

      diff --git a/doc-forge/lib/docforge/servers/index.html b/doc-forge/wiki/05_development/03_gsdfc_guide/index.html similarity index 61% rename from doc-forge/lib/docforge/servers/index.html rename to doc-forge/wiki/05_development/03_gsdfc_guide/index.html index 615c80f..8a907fd 100644 --- a/doc-forge/lib/docforge/servers/index.html +++ b/doc-forge/wiki/05_development/03_gsdfc_guide/index.html @@ -9,6 +9,10 @@ + + + + @@ -16,7 +20,7 @@ - Servers - docforge + Gsdfc Guide - docforge @@ -72,7 +76,7 @@
      - + Skip to content @@ -108,7 +112,7 @@
      - Servers + Gsdfc Guide
      @@ -223,7 +227,7 @@
    • - + @@ -245,7 +249,7 @@
    • - + @@ -267,7 +271,7 @@
    • - + @@ -289,7 +293,7 @@
    • - + @@ -311,7 +315,7 @@
    • - + @@ -330,6 +334,8 @@ + + @@ -337,6 +343,10 @@ + + + + @@ -348,13 +358,11 @@ -
    • +
    • - - - + -
    • MCPServer(mcp_root: Path, name: str)
      +

      GSDFC Docstring Guide

      +

      This page is the practical companion to the authoritative GSDFC specification +in the docforge/__init__.py package docstring. It describes how to write +docstrings that render correctly in MkDocs and stay machine-parseable by +doc-forge, MkDocs, and MCP clients.

      +

      Overview

      +
        +
      • Docstrings are the single source of truth.
      • +
      • doc-forge compiles docstrings but never rewrites them.
      • +
      • Every public symbol should have a complete, accurate docstring.
      • +
      • Type hints live in signatures; prose entries repeat the type in + parentheses and must match the signature.
      • +
      +

      Module docstrings

      +

      Modules use Markdown headings and --- separators.

      +

      Recommended sections:

      +
        +
      • # Summary — what the subsystem does
      • +
      • # Examples — a representative usage snippet
      • +
      • # Notes — guarantees, lifecycle, and thread-safety notes
      • +
      +

      Class docstrings

      +

      Recommended sections, in order:

      +
        +
      • summary line describing responsibility
      • +
      • Attributes: — instance attributes with name (Type): entries
      • +
      • Notes: — grouped subsections such as Guarantees, Lifecycle
      • +
      • Example: — indented python code block
      • +
      +

      Function and method docstrings

      +

      Recommended section order:

      +
        +
      1. Args:
      2. +
      3. Returns:
      4. +
      5. Raises:
      6. +
      7. Yields:
      8. +
      9. Notes:
      10. +
      11. Example:
      12. +
      +

      Formatting rules:

      +
        +
      • Args: entries are name (Type): followed by an indented description.
      • +
      • Returns: entries are Type: followed by an indented description.
      • +
      • Raises: entries are ExceptionType: followed by an indented condition.
      • +
      • Yields: replaces Returns: for generators.
      • +
      • Summaries are written in the imperative mood.
      • +
      • Fenced python blocks are allowed inside Example: sections, indented + four spaces.
      • +
      +

      Property docstrings

      +

      Properties document their return values with a Returns: section and, when +meaningful, an Example:.

      +

      Example

      +
       1
      + 2
      + 3
      + 4
      + 5
      + 6
      + 7
      + 8
      + 9
      +10
      +11
      +12
      +13
      +14
      +15
      +16
      +17
      +18
      +19
      +20
      +21
      +22
      +23
      +24
      +25
      +26
      +27
      def process(foo: Foo, multiplier: int) -> int:
      +    """Process a Foo instance.
      +
      +    Args:
      +        foo (Foo):
      +            Foo instance to process.
      +
      +        multiplier (int):
      +            Value used to scale foo.
      +
      +    Returns:
      +        int:
      +            Processed result.
      +
      +    Raises:
      +        ValueError:
      +            If multiplier is negative.
      +
      +    Example:
      +        Process foo:
      +
      +            ```python
      +            foo = Foo("example", value=10)
      +            result = process(foo, multiplier=2)
      +            print(result)
      +            ```
      +    """
       
      - -
      - - -

      MCP server for serving a pre-generated documentation bundle.

      -

      The server exposes documentation resources and diagnostic tools through -MCP endpoints backed by JSON files generated by the MCP renderer.

      - -

      Initialize the MCP server.

      - - -

      Parameters:

      - - - - - - - - - - - - - - - - - - - - - - - -
      NameTypeDescriptionDefault
      mcp_root - Path - -
      -

      Directory containing the generated MCP documentation bundle -(for example index.json, nav.json, and modules/).

      -
      -
      - required -
      name - str - -
      -

      Identifier used for the MCP server instance.

      -
      -
      - required -
      - - - - -
      - - - - - - - -
      Functions
      - -
      - - -
      - run - - -
      -
      1
      -2
      -3
      -4
      -5
      run(
      -    transport: Literal[
      -        "stdio", "sse", "streamable-http"
      -    ] = "streamable-http",
      -) -> None
      -
      - -
      - -

      Start the MCP server.

      - - -

      Parameters:

      - - - - - - - - - - - - - - - - - -
      NameTypeDescriptionDefault
      transport - Literal['stdio', 'sse', 'streamable-http'] - -
      -

      Transport mechanism used by the MCP server. Supported options -include stdio, sse, and streamable-http.

      -
      -
      - 'streamable-http' -
      - -
      - -
      - - - -
      - -
      - -
      - - - - - - - - - @@ -464,7 +587,7 @@