deepdoc 2.1.0__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. {deepdoc-2.1.0 → deepdoc-2.2.1}/PKG-INFO +159 -245
  2. {deepdoc-2.1.0 → deepdoc-2.2.1}/README.md +158 -244
  3. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/__init__.py +1 -1
  4. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/changelog_writer.py +10 -2
  5. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/indexer.py +36 -2
  6. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/persistence.py +53 -17
  7. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/service.py +14 -0
  8. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/source_archive.py +72 -1
  9. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/cli.py +77 -9
  10. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/config.py +12 -0
  11. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/__init__.py +8 -0
  12. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/evidence.py +17 -8
  13. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/generation.py +180 -29
  14. deepdoc-2.2.1/deepdoc/generator/mdx_compile_gate.py +390 -0
  15. deepdoc-2.2.1/deepdoc/generator/mdx_validator/__init__.py +182 -0
  16. deepdoc-2.2.1/deepdoc/generator/mdx_validator/package.json +12 -0
  17. deepdoc-2.2.1/deepdoc/generator/mdx_validator/validate.mjs +53 -0
  18. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/post_processors.py +11 -0
  19. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/generator/validation.py +85 -16
  20. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/client.py +13 -0
  21. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/persistence_v2.py +124 -17
  22. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/pipeline_v2.py +97 -41
  23. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/bucket_injection.py +20 -0
  24. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/bucket_refinement.py +164 -83
  25. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/common.py +186 -0
  26. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/endpoint_refs.py +4 -142
  27. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/engine.py +80 -7
  28. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/heuristics.py +4 -142
  29. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/nav_shaping.py +9 -0
  30. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/topology.py +10 -2
  31. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/artifacts.py +17 -5
  32. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/clustering.py +6 -2
  33. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/database.py +9 -2
  34. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/endpoints.py +3 -3
  35. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/integrations.py +3 -1
  36. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/runtime.py +8 -0
  37. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/utils.py +4 -0
  38. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/engine.py +1 -1
  39. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/scaffold_files.py +45 -2
  40. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/smart_update_v2.py +115 -26
  41. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/v2_models.py +33 -0
  42. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/PKG-INFO +159 -245
  43. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/SOURCES.txt +5 -0
  44. {deepdoc-2.1.0 → deepdoc-2.2.1}/pyproject.toml +4 -1
  45. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_index.py +81 -1
  46. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_source_archive.py +78 -1
  47. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_cli_serve.py +92 -0
  48. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_fumadocs_builder.py +45 -0
  49. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_generation_evidence.py +99 -0
  50. deepdoc-2.2.1/tests/test_mdx_compile_gate.py +287 -0
  51. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_parallel_pipeline.py +160 -0
  52. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_planner_granularity.py +104 -0
  53. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_smart_update.py +149 -0
  54. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_stale.py +28 -0
  55. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_state.py +16 -1
  56. {deepdoc-2.1.0 → deepdoc-2.2.1}/LICENSE +0 -0
  57. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/__main__.py +0 -0
  58. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/_legacy_types.py +0 -0
  59. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/benchmark_v2.py +0 -0
  60. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/call_graph.py +0 -0
  61. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/__init__.py +0 -0
  62. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/answer_mixin.py +0 -0
  63. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/chunker.py +0 -0
  64. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/deep_research.py +0 -0
  65. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/docs_summary.py +0 -0
  66. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/embeddings.py +0 -0
  67. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/linking.py +0 -0
  68. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/live_fallback_mixin.py +0 -0
  69. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/providers.py +0 -0
  70. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/retrieval_mixin.py +0 -0
  71. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/routes.py +0 -0
  72. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/scaffold.py +0 -0
  73. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/settings.py +0 -0
  74. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/symbol_index.py +0 -0
  75. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/chatbot/types.py +0 -0
  76. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/__init__.py +0 -0
  77. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/json_utils.py +0 -0
  78. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/llm/litellm_compat.py +0 -0
  79. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/manifest.py +0 -0
  80. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/openapi.py +0 -0
  81. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/__init__.py +0 -0
  82. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/api_detector.py +0 -0
  83. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/base.py +0 -0
  84. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/go_parser.py +0 -0
  85. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/js_ts_parser.py +0 -0
  86. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/php_parser.py +0 -0
  87. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/python_parser.py +0 -0
  88. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/registry.py +0 -0
  89. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/__init__.py +0 -0
  90. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/base.py +0 -0
  91. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/common.py +0 -0
  92. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/detector.py +0 -0
  93. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/django.py +0 -0
  94. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/express.py +0 -0
  95. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/falcon.py +0 -0
  96. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/fastify.py +0 -0
  97. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/go.py +0 -0
  98. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/js_shared.py +0 -0
  99. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/laravel.py +0 -0
  100. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/nestjs.py +0 -0
  101. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/python_shared.py +0 -0
  102. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/registry.py +0 -0
  103. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/routes/repo_resolver.py +0 -0
  104. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/parser/vue_parser.py +0 -0
  105. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/__init__.py +0 -0
  106. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/flow_candidates.py +0 -0
  107. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/specializations.py +0 -0
  108. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/planner/utils.py +0 -0
  109. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/__init__.py +0 -0
  110. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/bucket_types.py +0 -0
  111. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/page_types.py +0 -0
  112. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/selectors.py +0 -0
  113. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/system.py +0 -0
  114. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts/update.py +0 -0
  115. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/prompts_v2.py +0 -0
  116. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/py.typed +0 -0
  117. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/__init__.py +0 -0
  118. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/scanner/common.py +0 -0
  119. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/__init__.py +0 -0
  120. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/__init__.py +0 -0
  121. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/chatbot_components.py +0 -0
  122. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/common.py +0 -0
  123. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/mdx_utils.py +0 -0
  124. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/site/builder/templates.py +0 -0
  125. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/source_metadata.py +0 -0
  126. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc/updater_v2.py +0 -0
  127. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/dependency_links.txt +0 -0
  128. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/entry_points.txt +0 -0
  129. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/requires.txt +0 -0
  130. {deepdoc-2.1.0 → deepdoc-2.2.1}/deepdoc.egg-info/top_level.txt +0 -0
  131. {deepdoc-2.1.0 → deepdoc-2.2.1}/setup.cfg +0 -0
  132. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_benchmark_scorecard.py +0 -0
  133. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_call_graph.py +0 -0
  134. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_changelog.py +0 -0
  135. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_config.py +0 -0
  136. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_embeddings.py +0 -0
  137. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_eval.py +0 -0
  138. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_persistence.py +0 -0
  139. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_providers.py +0 -0
  140. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_query.py +0 -0
  141. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_relationship.py +0 -0
  142. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_chatbot_scaffold.py +0 -0
  143. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_classify.py +0 -0
  144. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_cli_generate.py +0 -0
  145. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_cli_update.py +0 -0
  146. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_flow_candidates.py +0 -0
  147. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_framework_fixtures.py +0 -0
  148. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_framework_support.py +0 -0
  149. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_internal_docs_metadata.py +0 -0
  150. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_litellm_compat.py +0 -0
  151. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_llm_json_utils.py +0 -0
  152. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_parser_ranges.py +0 -0
  153. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_planner_consolidation.py +0 -0
  154. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_route_registry.py +0 -0
  155. {deepdoc-2.1.0 → deepdoc-2.2.1}/tests/test_runtime_scan.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepdoc
3
- Version: 2.1.0
3
+ Version: 2.2.1
4
4
  Summary: Auto-generate beautiful docs from any codebase
5
5
  Author: Pranav Kumar
6
6
  License: MIT
@@ -43,33 +43,52 @@ Dynamic: license-file
43
43
  [![Python versions](https://img.shields.io/pypi/pyversions/deepdoc)](https://pypi.org/project/deepdoc/)
44
44
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
45
45
 
46
+ ## Repository Layout
47
+
48
+ | Directory | What it is | Where to start |
49
+ |---|---|---|
50
+ | [`deepdoc/`](./deepdoc/) | The Python package — CLI, pipeline, planner, generator, chatbot, and site builder. This is the core product. | [`deepdoc/README.md`](./deepdoc/README.md) |
51
+ | [`web/`](./web/) | Marketing and changelog site built with Astro 5 + Tailwind. Deployed to the public DeepDoc website. | [`web/README.md`](./web/README.md) |
52
+ | [`vscode-extension/`](./vscode-extension/) | VS Code extension — explains selected code snippets in Fast or Deep mode and inserts AI-generated comments inline. | [`vscode-extension/README.md`](./vscode-extension/README.md) |
53
+ | [`tests/`](./tests/) | pytest test suite for the Python package. | Run `python3 -m pytest -q` from repo root. |
54
+ | [`scripts/`](./scripts/) | One-off release and maintenance scripts. | — |
55
+
56
+ ---
57
+
46
58
  Auto-generate deep engineering documentation from real codebases using AI.
47
59
 
48
60
  DeepDoc scans your repo, builds a bucket-based documentation plan, generates rich MDX pages with Mermaid diagrams, and builds a local-first Fumadocs site with Orama search.
49
61
 
62
+ ## Contents
63
+
64
+ - [Quick Start](#quick-start)
65
+ - [Chatbot in 5 Minutes](#chatbot-in-5-minutes)
66
+ - [Installation](#installation)
67
+ - [Commands](#commands)
68
+ - [LLM Provider Setup](#llm-provider-setup)
69
+ - [Configuration](#configuration)
70
+ - [Chatbot](#chatbot)
71
+ - [Supported Languages & Frameworks](#supported-languages--frameworks)
72
+ - [Architecture](#architecture)
73
+ - [Generated Files](#generated-files)
74
+ - [GitHub Actions CI/CD](#github-actions-cicd)
75
+ - [Requirements](#requirements)
76
+ - [Contributing & Release Flow](./CONTRIBUTING.md)
77
+
50
78
  ---
51
79
 
52
80
  ## Features
53
81
 
54
- - **Bucket-Based Documentation Architecture** — Docs are planned as system, feature, endpoint, endpoint reference, integration, and database buckets instead of noisy one-file-per-page output.
55
- - **Five-Phase Pipeline** — Scan, plan, generate, playground, build. Planning and generation are separated so large repos and large files are handled more cleanly.
56
- - **Multi-Step AI Planner** — The planner classifies the repo, proposes buckets, then assigns files, symbols, artifacts, and dependencies into the final doc structure.
57
- - **Giant-File Handling** — Large files are decomposed into feature-aligned clusters so giant controllers or service files can feed multiple doc pages.
58
- - **Reader-First Repo-Agnostic Nav** — The planner normalizes bucket output into a natural onboarding flow (for backend repos: Start Here Core Workflows API Reference → Data Model → runtime/integrations/ops) while preserving full coverage.
59
- - **Large-Database Anti-Noise Grouping** — Sparse singleton model files are coalesced into stable aggregate groups (for example `core-models`) so huge schemas stay complete without one-file-per-page nav spam.
60
- - **Grouped API Reference Docs** — High-level endpoint family pages are AI-planned and enriched from scanned runtime endpoints, avoiding one-page-per-route navigation spam. OpenAPI specs still stage canonical interactive `/api/*` pages when present.
61
- - **Integration Discovery** — Third-party systems like payment gateways, delivery providers, warehouse systems, and webhook integrations can be grouped into integration docs.
62
- - **Trust Signals & Coverage Reporting** — Generated pages include DeepDoc provenance frontmatter and a site badge with the source commit; generation also reports endpoint, file, and symbol coverage plus consistency warnings.
63
- - **Evidence-First Chatbot Answers** Symbol chunks, lexical search, and semantic retrieval gather candidates, but final code proof is hydrated from archived source/config snippets with exact file paths, line ranges, evidence IDs, and validation.
64
- - **Incremental Updates** — `deepdoc update` uses persisted plan and ledger data to regenerate only stale or structurally affected docs.
65
- - **Full Refresh and Clean Rebuild Modes** — `generate --force` fully refreshes DeepDoc-managed docs and removes stale generated pages; `generate --clean --yes` wipes output and rebuilds from scratch.
66
- - **Safe Existing-Docs Behavior** — Plain `generate` refuses to run over an existing DeepDoc-managed docs set and will not silently mix into a non-DeepDoc `docs/` folder.
67
- - **Multi-Language Support** — JavaScript/TypeScript, Python, Go, PHP/Laravel with tree-sitter AST parsing and regex fallback.
68
- - **Configurable LLM** — Works with Anthropic, OpenAI, Azure OpenAI, Ollama, and other LiteLLM-compatible providers.
69
- - **Mermaid Diagrams** — Generated pages can include architecture, flow, and request-sequence diagrams.
70
- - **OpenAPI-Aware API Docs** — Auto-detects OpenAPI/Swagger specs and stages canonical interactive `/api/*` pages in the generated site.
71
- - **Local-First Fumadocs Site** — Generates a `site/` Next.js app with Fumadocs UI, Mermaid rendering, and built-in Orama search.
72
- - **Static Export** — `deepdoc deploy` exports a static site to `site/out/` for any static host.
82
+ - **Bucket-based documentation architecture** — system, feature, endpoint, integration, and database buckets instead of one-file-per-page noise.
83
+ - **Multi-step AI planner** — classifies the repo, proposes buckets, then assigns files, symbols, artifacts, and dependencies into a final reader-first plan.
84
+ - **Giant-file handling** — large files are decomposed into feature-aligned clusters so a single controller can feed multiple doc pages.
85
+ - **MDX compile gate** — every page is compile-checked before being written; broken MDX is auto-fixed via LLM retry or degraded to safe Markdown rather than shipped.
86
+ - **Evidence-first chatbot answers** — final code proof is hydrated from archived source snippets with exact file paths and line ranges, not just retrieval guesses.
87
+ - **Incremental updates** — `deepdoc update` regenerates only stale or structurally affected docs against the last synced commit.
88
+ - **OpenAPI-aware API docs** — auto-detects OpenAPI/Swagger specs and stages interactive `/api/*` pages in the generated site.
89
+ - **Local-first Fumadocs site** — generates a `site/` Next.js app with Fumadocs UI, Mermaid rendering, and built-in search; `deepdoc deploy` exports a static site to any host.
90
+
91
+ Works with Anthropic, OpenAI, Azure OpenAI, Google Gemini, Ollama, and any other LiteLLM-compatible provider. Parses Python, JavaScript/TypeScript, Go, PHP, and Vue.
73
92
 
74
93
  ---
75
94
 
@@ -110,12 +129,15 @@ pip install click litellm gitpython rich pyyaml jinja2
110
129
  pip install -e . --no-deps
111
130
  ```
112
131
 
132
+ You will also need **Node 18+** on `PATH`. DeepDoc uses Node at generate time to compile-check each MDX page before writing it, and at `serve`/`deploy` time for the Fumadocs site. The small set of MDX validation dependencies installs into `deepdoc/generator/mdx_validator/node_modules/` automatically on first `deepdoc generate`.
133
+
113
134
  ### Verify installation
114
135
 
115
136
  ```bash
116
137
  deepdoc --version
117
138
  deepdoc --help
118
139
  python -m deepdoc --help
140
+ node --version # must report 18 or higher
119
141
  ```
120
142
 
121
143
  If you installed the chatbot extra, you can verify those dependencies with:
@@ -128,128 +150,85 @@ pip show faiss-cpu fastapi uvicorn
128
150
 
129
151
  ## Quick Start
130
152
 
131
- DeepDoc has two separate model surfaces:
132
-
133
- - `llm.*` powers planning and doc generation.
134
- - `chatbot.answer.*` and `chatbot.embeddings.*` power the optional chatbot.
135
-
136
- If you only want generated docs, configure `llm.*` and skip the chatbot sections.
137
- If you want docs plus chatbot, install `deepdoc[chatbot]` and configure both.
138
-
139
- When `chatbot.enabled` is `false`, DeepDoc now generates a docs-only site: no chatbot route, no chatbot UI components, and no `chatbot_backend/` scaffold.
140
-
141
- ### Docs Only
153
+ ### Docs only
142
154
 
143
155
  ```bash
144
- # 1. Go to your project
145
156
  cd /path/to/your-project
146
-
147
- # 2. Initialize DeepDoc
148
157
  deepdoc init --provider anthropic
149
-
150
- # 3. Set your API key
151
158
  export ANTHROPIC_API_KEY=sk-ant-...
152
-
153
- # 4. Generate docs
154
159
  deepdoc generate
160
+ deepdoc serve # → http://localhost:3000
161
+ ```
155
162
 
156
- # 5. Preview locally
157
- deepdoc serve
158
- # → Open http://localhost:3000
163
+ ### Docs + chatbot — one env var
164
+
165
+ ```bash
166
+ cd /path/to/your-project
167
+ pip install "deepdoc[chatbot]"
168
+ deepdoc init --with-chatbot --provider anthropic
169
+ export ANTHROPIC_API_KEY=sk-ant-...
170
+ deepdoc generate
171
+ deepdoc serve # → http://localhost:3000 • chatbot at /ask
159
172
  ```
160
173
 
161
- ### Docs + Chatbot
174
+ The chatbot reuses your doc-gen LLM and runs embeddings locally via `fastembed`. **No extra keys, no extra config.** Swap `--provider anthropic` for `openai`, `gemini`, `azure`, or `ollama` to use a different LLM.
162
175
 
163
- If you also want the AI chatbot, see **[Chatbot in 5 Minutes](#chatbot-in-5-minutes)** right below for complete copy-paste setup for every major provider.
176
+ When `chatbot.enabled` is `false`, DeepDoc generates a docs-only site: no chatbot route, no chatbot UI components, and no `chatbot_backend/` scaffold.
164
177
 
165
178
  ---
166
179
 
167
180
  ## Chatbot in 5 Minutes
168
181
 
169
- Pick your provider and copy-paste the entire block. Each recipe gets you from zero to a working chatbot at `localhost:3000/ask`.
182
+ > **Defaults work out of the box.** The chatbot inherits your `llm.*` config and runs embeddings locally via `fastembed`. The recipes below only add config when you actually need to override the defaults (Azure endpoints, custom Ollama base URL, or mixing providers).
170
183
 
171
- > **You do not need to tune anything.** The defaults for retrieval, chunking, and reranking all work out of the box. Advanced configuration is in the [Chatbot](#chatbot) section further down.
184
+ ### Single provider one key for everything
172
185
 
173
- ### OpenAI One Key for Everything
174
-
175
- Simplest setup. One API key powers docs, answers, and embeddings.
186
+ This is the path 95% of users want. Anthropic shown; swap `--provider` for `openai`, `gemini`, etc.
176
187
 
177
188
  ```bash
178
189
  pip install "deepdoc[chatbot]"
179
190
  cd /path/to/your-project
180
191
 
181
- export OPENAI_API_KEY=sk-...
182
-
183
- deepdoc init --with-chatbot --provider openai --model gpt-4o
184
-
185
- # Wire chatbot to the same OpenAI key
186
- deepdoc config set chatbot.answer.provider openai
187
- deepdoc config set chatbot.answer.model gpt-4o-mini
188
- deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
189
- deepdoc config set chatbot.embeddings.provider openai
190
- deepdoc config set chatbot.embeddings.model text-embedding-3-large
191
- deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
192
+ deepdoc init --with-chatbot --provider anthropic
193
+ export ANTHROPIC_API_KEY=sk-ant-...
192
194
 
193
195
  deepdoc generate
194
196
  deepdoc serve
195
197
  # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
196
198
  ```
197
199
 
198
- ### Claude + OpenAI Embeddings
200
+ ### Mix providers different LLM for chat than for docs
199
201
 
200
- Claude for docs and answers, OpenAI for embeddings (Anthropic doesn't offer embedding models).
202
+ Use Claude for docs (great long-form), GPT-4o-mini for chat answers (fast + cheap), local embeddings.
201
203
 
202
204
  ```bash
203
205
  pip install "deepdoc[chatbot]"
204
206
  cd /path/to/your-project
205
207
 
208
+ deepdoc init --with-chatbot --provider anthropic
206
209
  export ANTHROPIC_API_KEY=sk-ant-...
207
210
  export OPENAI_API_KEY=sk-...
208
211
 
209
- deepdoc init --with-chatbot --provider anthropic
210
-
211
- deepdoc config set chatbot.answer.provider anthropic
212
- deepdoc config set chatbot.answer.model claude-3-5-sonnet-20241022
213
- deepdoc config set chatbot.answer.api_key_env ANTHROPIC_API_KEY
214
- deepdoc config set chatbot.embeddings.provider openai
215
- deepdoc config set chatbot.embeddings.model text-embedding-3-large
216
- deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
212
+ deepdoc config set chatbot.answer.provider openai
213
+ deepdoc config set chatbot.answer.model gpt-4o-mini
214
+ deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
217
215
 
218
216
  deepdoc generate
219
217
  deepdoc serve
220
- # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
221
218
  ```
222
219
 
223
- ### Google Gemini One Key for Everything
224
-
225
- One Gemini API key for docs, answers, and embeddings. Keep the `gemini/` prefix.
220
+ Want cloud embeddings instead of local? Add:
226
221
 
227
222
  ```bash
228
- pip install "deepdoc[chatbot]"
229
- cd /path/to/your-project
230
-
231
- export GEMINI_API_KEY=...
232
-
233
- deepdoc init --with-chatbot
234
- deepdoc config set llm.provider gemini
235
- deepdoc config set llm.model gemini/gemini-2.0-flash
236
- deepdoc config set llm.api_key_env GEMINI_API_KEY
237
-
238
- deepdoc config set chatbot.answer.provider gemini
239
- deepdoc config set chatbot.answer.model gemini/gemini-2.0-flash
240
- deepdoc config set chatbot.answer.api_key_env GEMINI_API_KEY
241
- deepdoc config set chatbot.embeddings.provider gemini
242
- deepdoc config set chatbot.embeddings.model gemini/text-embedding-004
243
- deepdoc config set chatbot.embeddings.api_key_env GEMINI_API_KEY
244
-
245
- deepdoc generate
246
- deepdoc serve
247
- # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
223
+ deepdoc config set chatbot.embeddings.backend litellm
224
+ deepdoc config set chatbot.embeddings.provider openai
225
+ deepdoc config set chatbot.embeddings.model text-embedding-3-large
226
+ deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
248
227
  ```
249
228
 
250
229
  ### Azure OpenAI
251
230
 
252
- Replace `YOUR-RESOURCE` and deployment names with your actual Azure values.
231
+ Azure deployments need explicit endpoint + API-version values. Replace `YOUR-RESOURCE` and deployment names with your actual values.
253
232
 
254
233
  ```bash
255
234
  pip install "deepdoc[chatbot]"
@@ -261,11 +240,8 @@ export AZURE_API_BASE=https://YOUR-RESOURCE.openai.azure.com
261
240
  deepdoc init --with-chatbot --provider azure --model azure/gpt-4o
262
241
  deepdoc config set llm.base_url $AZURE_API_BASE
263
242
 
264
- deepdoc config set chatbot.answer.provider azure
265
- deepdoc config set chatbot.answer.model azure/gpt-4o-mini
266
- deepdoc config set chatbot.answer.api_key_env AZURE_API_KEY
267
- deepdoc config set chatbot.answer.base_url $AZURE_API_BASE
268
- deepdoc config set chatbot.answer.api_version 2024-02-01
243
+ # Only embeddings need separate Azure config (different deployment)
244
+ deepdoc config set chatbot.embeddings.backend litellm
269
245
  deepdoc config set chatbot.embeddings.provider azure
270
246
  deepdoc config set chatbot.embeddings.model azure/text-embedding-3-large
271
247
  deepdoc config set chatbot.embeddings.api_key_env AZURE_API_KEY
@@ -274,10 +250,11 @@ deepdoc config set chatbot.embeddings.api_version 2024-02-01
274
250
 
275
251
  deepdoc generate
276
252
  deepdoc serve
277
- # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
278
253
  ```
279
254
 
280
- ### Ollama Fully Local, No API Keys
255
+ The answer LLM inherits `llm.*` (Azure deployment + base URL + key) automatically.
256
+
257
+ ### Ollama — Fully local, no API keys
281
258
 
282
259
  Free and private. Runs everything on your machine.
283
260
 
@@ -289,11 +266,7 @@ cd /path/to/your-project
289
266
  ollama pull llama3.2
290
267
 
291
268
  deepdoc init --with-chatbot --provider ollama --model ollama/llama3.2
292
-
293
- deepdoc config set chatbot.answer.provider ollama
294
- deepdoc config set chatbot.answer.model ollama/llama3.2
295
- deepdoc config set chatbot.answer.base_url http://localhost:11434
296
- deepdoc config set chatbot.embeddings.backend fastembed
269
+ deepdoc config set llm.base_url http://localhost:11434
297
270
 
298
271
  deepdoc generate
299
272
  deepdoc serve
@@ -373,7 +346,7 @@ deepdoc generate --exclude "tests/**"
373
346
 
374
347
  1. **Phase 1: Scan** — Walk the repo, parse supported languages, detect endpoints, config/setup artifacts, runtime surfaces, integration signals, and OpenAPI specs.
375
348
  2. **Phase 2: Plan** — Run the multi-step bucket planner. It classifies the repo, proposes bucket candidates, and assigns files/symbols/artifacts to the final doc structure.
376
- 3. **Phase 3: Generate** — Generate bucket pages in batches with parallel workers. High-level buckets are AI-planned; scanned endpoints enrich grouped API-reference pages instead of creating one page per route.
349
+ 3. **Phase 3: Generate** — Generate bucket pages in batches with parallel workers. High-level buckets are AI-planned; scanned endpoints enrich grouped API-reference pages instead of creating one page per route. Each page passes through an MDX compile-check (with bounded LLM-driven retry on failure) before being written to disk.
377
350
  4. **Phase 4: API Ref** — Stage OpenAPI assets for the generated Fumadocs `/api/*` pages when a spec exists.
378
351
  5. **Phase 5: Build** — Write the generated `site/` Fumadocs scaffold, page tree, search route, and static assets from the generated plan.
379
352
 
@@ -398,6 +371,7 @@ deepdoc update # Normal ongoing refresh
398
371
  deepdoc update --since HEAD~3 # Changes in last 3 commits
399
372
  deepdoc update --since main # All changes since branching from main
400
373
  deepdoc update --replan # Force a full replan
374
+ deepdoc update --strict-quality # Fail if generated docs are invalid/degraded
401
375
  deepdoc update --deploy # Update + deploy
402
376
  ```
403
377
 
@@ -415,6 +389,7 @@ deepdoc update --deploy # Update + deploy
415
389
  8. Rebuilds site config and nav afterward.
416
390
 
417
391
  If git is unavailable, it falls back to hash-based staleness detection for recovery.
392
+ When `--deploy` is used, DeepDoc deploys only after a fully successful update; failed page generation or chatbot sync blocks deployment.
418
393
 
419
394
  Generation writes quality artifacts under `.deepdoc/`:
420
395
 
@@ -429,7 +404,7 @@ Generated MDX pages include provenance frontmatter such as `deepdoc_generated_co
429
404
  |------|---------|-------------|
430
405
  | `--since` | last synced commit | Git ref to diff against |
431
406
  | `--replan` | off | Force a full replan even if the change set looks incremental |
432
- | `--deploy` | off | Deploy after updating |
407
+ | `--deploy` | off | Deploy after a fully successful update |
433
408
 
434
409
  ### `deepdoc status`
435
410
 
@@ -748,9 +723,11 @@ site:
748
723
 
749
724
  DeepDoc can generate an AI-powered chatbot that answers questions about your codebase using evidence-first RAG. Retrieval indexes find candidate files, but final code proof always comes from archived source/config snippets with exact file paths and line ranges. Generated docs and repo-authored docs can help explain concepts, but they are returned as references, not right-pane code evidence.
750
725
 
726
+ > **Defaults you should know.** The chatbot **inherits** `provider`, `model`, and `api_key_env` from your `llm.*` config when `chatbot.answer.*` is empty (the scaffolded default). Embeddings default to `fastembed` — fully local, no API key. You only need extra config if (a) you want a different LLM for chat than for docs, or (b) you want cloud embeddings.
727
+
751
728
  If chatbot is disabled, DeepDoc keeps the generated site docs-only: it does not generate the `/ask` route, chatbot frontend components, or `chatbot_backend/` scaffold.
752
729
 
753
- > **Already running?** If you followed the [Chatbot in 5 Minutes](#chatbot-in-5-minutes) guide above, your chatbot is already configured and working. Everything below is for advanced configuration, tuning, and production deployment. **The defaults work well out of the box** — most users never need to change the settings below.
730
+ > **Already running?** If you followed the [Chatbot in 5 Minutes](#chatbot-in-5-minutes) guide above, your chatbot is already configured and working. Everything below is for advanced configuration, tuning, and production deployment.
754
731
 
755
732
  ### How the Model Surfaces Work
756
733
 
@@ -787,99 +764,70 @@ Public endpoints remain stable:
787
764
 
788
765
  ### Provider Recipes
789
766
 
790
- #### Claude For Docs + Chatbot Answers
767
+ These are advanced recipes that override the inheritance defaults — e.g. mixing providers or using cloud embeddings. For the simple "one key for everything" path, see [Chatbot in 5 Minutes](#chatbot-in-5-minutes) above.
768
+
769
+ #### Claude for docs, OpenAI for embeddings
791
770
 
792
- Anthropic works well for doc generation and chatbot answers, but you still need a separate embeddings provider.
771
+ Claude doesn't offer embedding models, so cloud embeddings need a separate provider. (Or just keep the default `fastembed` and skip this entirely.)
793
772
 
794
773
  ```bash
795
774
  export ANTHROPIC_API_KEY=...
796
775
  export OPENAI_API_KEY=...
797
- export DEEPDOC_CHAT_API_KEY=$ANTHROPIC_API_KEY
798
- export DEEPDOC_EMBED_API_KEY=$OPENAI_API_KEY
799
776
 
800
777
  deepdoc config set llm.provider anthropic
801
778
  deepdoc config set llm.model claude-3-5-sonnet-20241022
802
779
  deepdoc config set llm.api_key_env ANTHROPIC_API_KEY
803
780
 
804
781
  deepdoc config set chatbot.enabled true
805
- deepdoc config set chatbot.answer.provider anthropic
806
- deepdoc config set chatbot.answer.model claude-3-5-sonnet-20241022
807
- deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
808
-
782
+ deepdoc config set chatbot.embeddings.backend litellm
809
783
  deepdoc config set chatbot.embeddings.provider openai
810
784
  deepdoc config set chatbot.embeddings.model text-embedding-3-large
811
- deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
785
+ deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
812
786
  ```
813
787
 
814
- #### OpenAI For Docs + Chatbot
788
+ The chatbot answer LLM inherits `llm.*` (Claude) automatically.
789
+
790
+ #### Different model for chat than for docs
791
+
792
+ Claude for docs, GPT-4o-mini for cheaper/faster chat answers. Embeddings stay local.
815
793
 
816
794
  ```bash
795
+ export ANTHROPIC_API_KEY=...
817
796
  export OPENAI_API_KEY=...
818
- export DEEPDOC_CHAT_API_KEY=$OPENAI_API_KEY
819
- export DEEPDOC_EMBED_API_KEY=$OPENAI_API_KEY
820
797
 
821
- deepdoc config set llm.provider openai
822
- deepdoc config set llm.model gpt-4o
823
- deepdoc config set llm.api_key_env OPENAI_API_KEY
798
+ deepdoc config set llm.provider anthropic
799
+ deepdoc config set llm.model claude-3-5-sonnet-20241022
800
+ deepdoc config set llm.api_key_env ANTHROPIC_API_KEY
824
801
 
825
802
  deepdoc config set chatbot.enabled true
826
803
  deepdoc config set chatbot.answer.provider openai
827
804
  deepdoc config set chatbot.answer.model gpt-4o-mini
828
- deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
829
-
830
- deepdoc config set chatbot.embeddings.provider openai
831
- deepdoc config set chatbot.embeddings.model text-embedding-3-large
832
- deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
805
+ deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
833
806
  ```
834
807
 
835
- #### Google Gemini For Docs + Chatbot
808
+ #### Azure with separate embedding deployment
836
809
 
837
- With Google AI Studio, keep the `gemini/` prefix in model names and use `GEMINI_API_KEY`.
810
+ Azure deployments need explicit `base_url` + `api_version`, and embeddings typically live on a different deployment.
838
811
 
839
812
  ```bash
840
- export GEMINI_API_KEY=...
841
- export DEEPDOC_CHAT_API_KEY=$GEMINI_API_KEY
842
- export DEEPDOC_EMBED_API_KEY=$GEMINI_API_KEY
843
-
844
- deepdoc config set llm.provider gemini
845
- deepdoc config set llm.model gemini/gemini-2.0-flash
846
- deepdoc config set llm.api_key_env GEMINI_API_KEY
847
-
848
- deepdoc config set chatbot.enabled true
849
- deepdoc config set chatbot.answer.provider gemini
850
- deepdoc config set chatbot.answer.model gemini/gemini-2.0-flash
851
- deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
852
-
853
- deepdoc config set chatbot.embeddings.provider gemini
854
- deepdoc config set chatbot.embeddings.model gemini/text-embedding-004
855
- deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
856
- ```
857
-
858
- #### Azure For Docs + Chatbot
859
-
860
- ```bash
861
- export AZURE_OPENAI_API_KEY=...
862
- export AZURE_EMBEDDING_API_KEY=...
813
+ export AZURE_API_KEY=...
863
814
 
864
815
  deepdoc config set llm.provider azure
865
816
  deepdoc config set llm.model azure/gpt-4.1
866
- deepdoc config set llm.api_key_env AZURE_OPENAI_API_KEY
817
+ deepdoc config set llm.api_key_env AZURE_API_KEY
867
818
  deepdoc config set llm.base_url https://YOUR-RESOURCE.openai.azure.com/
868
819
 
869
820
  deepdoc config set chatbot.enabled true
870
- deepdoc config set chatbot.answer.provider azure
871
- deepdoc config set chatbot.answer.model azure/gpt-4.1
872
- deepdoc config set chatbot.answer.api_key_env AZURE_OPENAI_API_KEY
873
- deepdoc config set chatbot.answer.base_url https://YOUR-RESOURCE.openai.azure.com/
874
- deepdoc config set chatbot.answer.api_version 2024-02-15-preview
875
-
821
+ deepdoc config set chatbot.embeddings.backend litellm
876
822
  deepdoc config set chatbot.embeddings.provider azure
877
823
  deepdoc config set chatbot.embeddings.model azure/text-embedding-3-small
878
- deepdoc config set chatbot.embeddings.api_key_env AZURE_EMBEDDING_API_KEY
824
+ deepdoc config set chatbot.embeddings.api_key_env AZURE_API_KEY
879
825
  deepdoc config set chatbot.embeddings.base_url https://YOUR-RESOURCE.openai.azure.com/
880
826
  deepdoc config set chatbot.embeddings.api_version 2024-02-15-preview
881
827
  ```
882
828
 
829
+ The answer LLM inherits `llm.*` (Azure deployment, base URL, version, key) automatically — no `chatbot.answer.*` config needed for Azure.
830
+
883
831
  ### Installation
884
832
 
885
833
  The chatbot requires extra dependencies not included in the base install:
@@ -1009,10 +957,15 @@ chatbot:
1009
957
 
1010
958
  ### Chatbot Configuration Reference
1011
959
 
960
+ The defaults work for almost every project. Expand below only when you need to tune a specific knob.
961
+
962
+ <details>
963
+ <summary><strong>Full chatbot configuration reference (60+ keys)</strong></summary>
964
+
1012
965
  | Key | Default | Description |
1013
966
  |-----|---------|-------------|
1014
967
  | **General** | | |
1015
- | `chatbot.enabled` | `false` | Enable chatbot indexing and backend |
968
+ | `chatbot.enabled` | `false` | Enable chatbot indexing and backend (set automatically by `deepdoc init --with-chatbot`) |
1016
969
  | `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
1017
970
  | **Indexing** | | |
1018
971
  | `chatbot.indexing.include_repo_docs` | `true` | Index selected repo-authored docs such as README/design notes in a separate corpus |
@@ -1099,6 +1052,8 @@ chatbot:
1099
1052
  | `chatbot.chunking.max_doc_summary_chunks_per_page` | `4` | Doc summary chunks extracted per page |
1100
1053
  | `chatbot.chunking.max_doc_summary_chars` | `4000` | Max chars per doc summary chunk |
1101
1054
 
1055
+ </details>
1056
+
1102
1057
  ### Chatbot Provider Examples
1103
1058
 
1104
1059
  The chatbot's `answer` and `embeddings` sections are configured independently from the main `llm` section, so you can use different providers for doc generation vs. chatbot.
@@ -1490,7 +1445,7 @@ jobs:
1490
1445
  env:
1491
1446
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
1492
1447
  run: |
1493
- deepdoc update --deploy
1448
+ deepdoc update --strict-quality --deploy
1494
1449
 
1495
1450
  - name: Upload Pages artifact
1496
1451
  uses: actions/upload-pages-artifact@v3
@@ -1509,101 +1464,59 @@ jobs:
1509
1464
 
1510
1465
  Add your API key to repo Settings → Secrets → Actions → `ANTHROPIC_API_KEY`.
1511
1466
 
1512
- ---
1513
-
1514
- ## Releasing
1515
-
1516
- DeepDoc now supports automated releases through GitHub Actions.
1517
-
1518
- ### Release tracks
1467
+ If you self-host and just want docs kept fresh without deploying to GitHub Pages, use this minimal variant instead — it commits the refreshed `docs/` and `.deepdoc/` state back to the branch:
1519
1468
 
1520
- This repository now has two independent release tracks:
1521
-
1522
- - **Python package (`deepdoc`)**: controlled by `pyproject.toml`, root `CHANGELOG.md`, and `.github/workflows/release.yml`.
1523
- - **VS Code extension (`vscode-extension/`)**: controlled by `vscode-extension/package.json`, `vscode-extension/CHANGELOG.md`, and `.github/workflows/release-vscode-extension.yml`.
1524
-
1525
- Keep versions and changelog entries separated by track.
1526
-
1527
- ### What happens automatically
1528
-
1529
- When you push to `main`, the release workflow checks the version in `pyproject.toml`.
1530
- If that version does not already have a matching Git tag like `v0.1.1`, GitHub Actions will:
1531
-
1532
- - build the package
1533
- - publish it to PyPI
1534
- - create the Git tag
1535
- - create a GitHub Release and attach the built files
1536
- - use the matching section from `CHANGELOG.md` as the release notes when present
1537
-
1538
- ### Your release flow
1469
+ ```yaml
1470
+ # .github/workflows/deepdoc-refresh.yml
1471
+ name: Refresh Docs
1539
1472
 
1540
- 1. Update `version = "..."` in `pyproject.toml`
1541
- 2. Update `__version__ = "..."` in `deepdoc/__init__.py`
1542
- 3. Add a matching section to `CHANGELOG.md`
1543
- 4. Commit your changes
1544
- 5. Push to `main`
1473
+ on:
1474
+ push:
1475
+ branches: [main]
1545
1476
 
1546
- That is it. You do not need to manually create tags or GitHub Releases anymore.
1477
+ jobs:
1478
+ refresh:
1479
+ runs-on: ubuntu-latest
1480
+ permissions:
1481
+ contents: write
1547
1482
 
1548
- ### Changelog format
1483
+ steps:
1484
+ - uses: actions/checkout@v4
1485
+ with:
1486
+ fetch-depth: 0 # Full history needed for git diff
1549
1487
 
1550
- The release workflow looks for a section in `CHANGELOG.md` that matches the version in `pyproject.toml`.
1551
- These heading styles all work:
1488
+ - uses: actions/setup-python@v5
1489
+ with:
1490
+ python-version: "3.11"
1552
1491
 
1553
- - `## 0.1.2`
1554
- - `## [0.1.2]`
1555
- - `## v0.1.2`
1556
- - `## [0.1.2] - 2026-04-03`
1492
+ - uses: actions/setup-node@v4
1493
+ with:
1494
+ node-version: "20"
1557
1495
 
1558
- Example:
1496
+ - name: Install deepdoc
1497
+ run: pip install deepdoc
1559
1498
 
1560
- ```md
1561
- ## [0.1.2] - 2026-04-03
1499
+ - name: Refresh docs
1500
+ env:
1501
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
1502
+ run: deepdoc update --strict-quality
1562
1503
 
1563
- - Added automated GitHub releases
1564
- - Improved PyPI metadata
1565
- - Documented `deepdoc[chatbot]` installation
1504
+ - name: Commit updated docs
1505
+ run: |
1506
+ git config user.name "github-actions[bot]"
1507
+ git config user.email "github-actions[bot]@users.noreply.github.com"
1508
+ git add docs/ .deepdoc/
1509
+ git diff --cached --quiet || git commit -m "chore: refresh docs [skip ci]"
1510
+ git push
1566
1511
  ```
1567
1512
 
1568
- If the matching version section is missing, GitHub falls back to auto-generated release notes.
1569
-
1570
- ### One-time setup
1513
+ The `[skip ci]` tag on the commit message prevents the workflow from triggering itself again.
1571
1514
 
1572
- 1. On PyPI, open the `deepdoc` project
1573
- 2. Go to `Publishing`
1574
- 3. Add a Trusted Publisher for GitHub Actions with:
1575
- - owner: `tss-pranavkumar`
1576
- - repository: `deepdoc`
1577
- - workflow filename: `release.yml`
1578
- - environment name: `pypi`
1579
- 4. In GitHub, open Settings → Actions → General
1580
- 5. Set Workflow permissions to `Read and write permissions`
1581
-
1582
- After that, every new version pushed to `main` can publish without a PyPI token.
1583
-
1584
- ### VS Code extension release flow
1585
-
1586
- The VS Code extension release is automated from `main` when files under `vscode-extension/` change.
1587
-
1588
- What the extension workflow does:
1589
-
1590
- - reads `vscode-extension/package.json` version
1591
- - checks whether tag `vscode-extension-v<version>` already exists
1592
- - builds and packages the extension
1593
- - publishes to Marketplace using `VSCE_PAT`
1594
- - creates and pushes the matching git tag
1595
- - creates a GitHub release with notes from `vscode-extension/CHANGELOG.md` (fallback to generated notes)
1596
-
1597
- One-time setup for extension publishing:
1598
-
1599
- 1. Create a VS Code Marketplace PAT with Manage scope for publisher `Pranawww`
1600
- 2. Add repo secret `VSCE_PAT` in GitHub Actions secrets
1515
+ ---
1601
1516
 
1602
- Extension release flow on each version:
1517
+ ## Contributing & Releases
1603
1518
 
1604
- 1. Update `vscode-extension/package.json` version
1605
- 2. Add matching section to `vscode-extension/CHANGELOG.md`
1606
- 3. Commit and push to `main`
1519
+ Release flow for the Python package and the VS Code extension, plus repo layout and test-running notes, lives in [CONTRIBUTING.md](./CONTRIBUTING.md). Both tracks publish automatically when you push a version bump to `main`.
1607
1520
 
1608
1521
  ---
1609
1522
 
@@ -1649,6 +1562,7 @@ deepdoc generate --force # Full regen with new model
1649
1562
  ## Requirements
1650
1563
 
1651
1564
  - Python 3.10+
1565
+ - **Node 18+** on `PATH` — used at generate time for MDX compile validation, and at `serve`/`deploy` time for the Fumadocs site
1652
1566
  - Git (for `deepdoc update` and `deepdoc deploy`)
1653
1567
  - An LLM API key (or Ollama running locally)
1654
1568