deepdoc 2.0.0__tar.gz → 2.2.0__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 (157) hide show
  1. {deepdoc-2.0.0 → deepdoc-2.2.0}/PKG-INFO +155 -255
  2. {deepdoc-2.0.0 → deepdoc-2.2.0}/README.md +154 -254
  3. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/__init__.py +1 -1
  4. deepdoc-2.2.0/deepdoc/changelog_writer.py +169 -0
  5. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/answer_mixin.py +8 -6
  6. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/indexer.py +36 -2
  7. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/persistence.py +54 -18
  8. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/providers.py +108 -3
  9. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/retrieval_mixin.py +1 -1
  10. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/routes.py +23 -4
  11. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/service.py +14 -7
  12. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/settings.py +8 -6
  13. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/source_archive.py +72 -1
  14. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/cli.py +120 -10
  15. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/config.py +29 -11
  16. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/generator/__init__.py +8 -0
  17. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/generator/evidence.py +2 -6
  18. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/generator/generation.py +108 -14
  19. deepdoc-2.2.0/deepdoc/generator/mdx_compile_gate.py +383 -0
  20. deepdoc-2.2.0/deepdoc/generator/mdx_validator/__init__.py +182 -0
  21. deepdoc-2.2.0/deepdoc/generator/mdx_validator/package.json +12 -0
  22. deepdoc-2.2.0/deepdoc/generator/mdx_validator/validate.mjs +53 -0
  23. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/generator/post_processors.py +25 -3
  24. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/generator/validation.py +1 -0
  25. deepdoc-2.2.0/deepdoc/llm/client.py +190 -0
  26. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/nestjs.py +16 -5
  27. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/repo_resolver.py +1 -1
  28. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/persistence_v2.py +125 -20
  29. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/pipeline_v2.py +74 -21
  30. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/bucket_injection.py +21 -1
  31. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/bucket_refinement.py +4 -0
  32. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/common.py +181 -0
  33. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/endpoint_refs.py +4 -142
  34. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/engine.py +81 -1
  35. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/heuristics.py +21 -353
  36. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/nav_shaping.py +27 -1
  37. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts/bucket_types.py +37 -27
  38. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/artifacts.py +1 -1
  39. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/common.py +1 -1
  40. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/database.py +2 -2
  41. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/utils.py +2 -2
  42. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/engine.py +15 -0
  43. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/scaffold_files.py +48 -4
  44. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/smart_update_v2.py +133 -30
  45. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/v2_models.py +33 -0
  46. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc.egg-info/PKG-INFO +155 -255
  47. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc.egg-info/SOURCES.txt +5 -0
  48. {deepdoc-2.0.0 → deepdoc-2.2.0}/pyproject.toml +4 -1
  49. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_changelog.py +3 -1
  50. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_index.py +82 -2
  51. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_source_archive.py +78 -1
  52. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_cli_serve.py +92 -0
  53. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_fumadocs_builder.py +45 -0
  54. deepdoc-2.2.0/tests/test_mdx_compile_gate.py +285 -0
  55. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_smart_update.py +149 -0
  56. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_stale.py +28 -0
  57. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_state.py +16 -1
  58. deepdoc-2.0.0/deepdoc/changelog_writer.py +0 -106
  59. deepdoc-2.0.0/deepdoc/llm/client.py +0 -84
  60. {deepdoc-2.0.0 → deepdoc-2.2.0}/LICENSE +0 -0
  61. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/__main__.py +0 -0
  62. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/_legacy_types.py +0 -0
  63. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/benchmark_v2.py +0 -0
  64. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/call_graph.py +0 -0
  65. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/__init__.py +0 -0
  66. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/chunker.py +0 -0
  67. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/deep_research.py +0 -0
  68. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/docs_summary.py +0 -0
  69. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/embeddings.py +0 -0
  70. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/linking.py +0 -0
  71. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/live_fallback_mixin.py +0 -0
  72. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/scaffold.py +0 -0
  73. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/symbol_index.py +0 -0
  74. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/chatbot/types.py +0 -0
  75. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/llm/__init__.py +0 -0
  76. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/llm/json_utils.py +0 -0
  77. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/llm/litellm_compat.py +0 -0
  78. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/manifest.py +0 -0
  79. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/openapi.py +0 -0
  80. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/__init__.py +0 -0
  81. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/api_detector.py +0 -0
  82. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/base.py +0 -0
  83. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/go_parser.py +0 -0
  84. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/js_ts_parser.py +0 -0
  85. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/php_parser.py +0 -0
  86. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/python_parser.py +0 -0
  87. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/registry.py +0 -0
  88. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/__init__.py +0 -0
  89. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/base.py +0 -0
  90. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/common.py +0 -0
  91. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/detector.py +0 -0
  92. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/django.py +0 -0
  93. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/express.py +0 -0
  94. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/falcon.py +0 -0
  95. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/fastify.py +0 -0
  96. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/go.py +0 -0
  97. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/js_shared.py +0 -0
  98. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/laravel.py +0 -0
  99. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/python_shared.py +0 -0
  100. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/routes/registry.py +0 -0
  101. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/parser/vue_parser.py +0 -0
  102. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/__init__.py +0 -0
  103. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/flow_candidates.py +0 -0
  104. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/specializations.py +0 -0
  105. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/topology.py +0 -0
  106. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/planner/utils.py +0 -0
  107. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts/__init__.py +0 -0
  108. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts/page_types.py +0 -0
  109. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts/selectors.py +0 -0
  110. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts/system.py +0 -0
  111. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts/update.py +0 -0
  112. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/prompts_v2.py +0 -0
  113. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/py.typed +0 -0
  114. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/__init__.py +0 -0
  115. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/clustering.py +0 -0
  116. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/endpoints.py +0 -0
  117. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/integrations.py +0 -0
  118. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/scanner/runtime.py +0 -0
  119. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/__init__.py +0 -0
  120. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/__init__.py +0 -0
  121. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/chatbot_components.py +0 -0
  122. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/common.py +0 -0
  123. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/mdx_utils.py +0 -0
  124. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/site/builder/templates.py +0 -0
  125. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/source_metadata.py +0 -0
  126. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc/updater_v2.py +0 -0
  127. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc.egg-info/dependency_links.txt +0 -0
  128. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc.egg-info/entry_points.txt +0 -0
  129. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc.egg-info/requires.txt +0 -0
  130. {deepdoc-2.0.0 → deepdoc-2.2.0}/deepdoc.egg-info/top_level.txt +0 -0
  131. {deepdoc-2.0.0 → deepdoc-2.2.0}/setup.cfg +0 -0
  132. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_benchmark_scorecard.py +0 -0
  133. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_call_graph.py +0 -0
  134. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_config.py +0 -0
  135. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_embeddings.py +0 -0
  136. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_eval.py +0 -0
  137. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_persistence.py +0 -0
  138. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_providers.py +0 -0
  139. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_query.py +0 -0
  140. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_relationship.py +0 -0
  141. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_chatbot_scaffold.py +0 -0
  142. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_classify.py +0 -0
  143. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_cli_generate.py +0 -0
  144. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_cli_update.py +0 -0
  145. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_flow_candidates.py +0 -0
  146. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_framework_fixtures.py +0 -0
  147. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_framework_support.py +0 -0
  148. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_generation_evidence.py +0 -0
  149. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_internal_docs_metadata.py +0 -0
  150. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_litellm_compat.py +0 -0
  151. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_llm_json_utils.py +0 -0
  152. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_parallel_pipeline.py +0 -0
  153. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_parser_ranges.py +0 -0
  154. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_planner_consolidation.py +0 -0
  155. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_planner_granularity.py +0 -0
  156. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_route_registry.py +0 -0
  157. {deepdoc-2.0.0 → deepdoc-2.2.0}/tests/test_runtime_scan.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepdoc
3
- Version: 2.0.0
3
+ Version: 2.2.0
4
4
  Summary: Auto-generate beautiful docs from any codebase
5
5
  Author: Pranav Kumar
6
6
  License: MIT
@@ -47,29 +47,36 @@ Auto-generate deep engineering documentation from real codebases using AI.
47
47
 
48
48
  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
49
 
50
+ ## Contents
51
+
52
+ - [Quick Start](#quick-start)
53
+ - [Chatbot in 5 Minutes](#chatbot-in-5-minutes)
54
+ - [Installation](#installation)
55
+ - [Commands](#commands)
56
+ - [LLM Provider Setup](#llm-provider-setup)
57
+ - [Configuration](#configuration)
58
+ - [Chatbot](#chatbot)
59
+ - [Supported Languages & Frameworks](#supported-languages--frameworks)
60
+ - [Architecture](#architecture)
61
+ - [Generated Files](#generated-files)
62
+ - [GitHub Actions CI/CD](#github-actions-cicd)
63
+ - [Requirements](#requirements)
64
+ - [Contributing & Release Flow](./CONTRIBUTING.md)
65
+
50
66
  ---
51
67
 
52
68
  ## Features
53
69
 
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.
70
+ - **Bucket-based documentation architecture** — system, feature, endpoint, integration, and database buckets instead of one-file-per-page noise.
71
+ - **Multi-step AI planner** — classifies the repo, proposes buckets, then assigns files, symbols, artifacts, and dependencies into a final reader-first plan.
72
+ - **Giant-file handling** — large files are decomposed into feature-aligned clusters so a single controller can feed multiple doc pages.
73
+ - **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.
74
+ - **Evidence-first chatbot answers** — final code proof is hydrated from archived source snippets with exact file paths and line ranges, not just retrieval guesses.
75
+ - **Incremental updates** — `deepdoc update` regenerates only stale or structurally affected docs against the last synced commit.
76
+ - **OpenAPI-aware API docs** — auto-detects OpenAPI/Swagger specs and stages interactive `/api/*` pages in the generated site.
77
+ - **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.
78
+
79
+ Works with Anthropic, OpenAI, Azure OpenAI, Google Gemini, Ollama, and any other LiteLLM-compatible provider. Parses Python, JavaScript/TypeScript, Go, PHP, and Vue.
73
80
 
74
81
  ---
75
82
 
@@ -110,12 +117,15 @@ pip install click litellm gitpython rich pyyaml jinja2
110
117
  pip install -e . --no-deps
111
118
  ```
112
119
 
120
+ 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`.
121
+
113
122
  ### Verify installation
114
123
 
115
124
  ```bash
116
125
  deepdoc --version
117
126
  deepdoc --help
118
127
  python -m deepdoc --help
128
+ node --version # must report 18 or higher
119
129
  ```
120
130
 
121
131
  If you installed the chatbot extra, you can verify those dependencies with:
@@ -128,128 +138,85 @@ pip show faiss-cpu fastapi uvicorn
128
138
 
129
139
  ## Quick Start
130
140
 
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
141
+ ### Docs only
142
142
 
143
143
  ```bash
144
- # 1. Go to your project
145
144
  cd /path/to/your-project
146
-
147
- # 2. Initialize DeepDoc
148
145
  deepdoc init --provider anthropic
149
-
150
- # 3. Set your API key
151
146
  export ANTHROPIC_API_KEY=sk-ant-...
152
-
153
- # 4. Generate docs
154
147
  deepdoc generate
148
+ deepdoc serve # → http://localhost:3000
149
+ ```
155
150
 
156
- # 5. Preview locally
157
- deepdoc serve
158
- # → Open http://localhost:3000
151
+ ### Docs + chatbot — one env var
152
+
153
+ ```bash
154
+ cd /path/to/your-project
155
+ pip install "deepdoc[chatbot]"
156
+ deepdoc init --with-chatbot --provider anthropic
157
+ export ANTHROPIC_API_KEY=sk-ant-...
158
+ deepdoc generate
159
+ deepdoc serve # → http://localhost:3000 • chatbot at /ask
159
160
  ```
160
161
 
161
- ### Docs + Chatbot
162
+ 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
163
 
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.
164
+ When `chatbot.enabled` is `false`, DeepDoc generates a docs-only site: no chatbot route, no chatbot UI components, and no `chatbot_backend/` scaffold.
164
165
 
165
166
  ---
166
167
 
167
168
  ## Chatbot in 5 Minutes
168
169
 
169
- Pick your provider and copy-paste the entire block. Each recipe gets you from zero to a working chatbot at `localhost:3000/ask`.
170
-
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.
170
+ > **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).
172
171
 
173
- ### OpenAIOne Key for Everything
172
+ ### Single provider one key for everything
174
173
 
175
- Simplest setup. One API key powers docs, answers, and embeddings.
174
+ This is the path 95% of users want. Anthropic shown; swap `--provider` for `openai`, `gemini`, etc.
176
175
 
177
176
  ```bash
178
177
  pip install "deepdoc[chatbot]"
179
178
  cd /path/to/your-project
180
179
 
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
180
+ deepdoc init --with-chatbot --provider anthropic
181
+ export ANTHROPIC_API_KEY=sk-ant-...
192
182
 
193
183
  deepdoc generate
194
184
  deepdoc serve
195
185
  # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
196
186
  ```
197
187
 
198
- ### Claude + OpenAI Embeddings
188
+ ### Mix providers different LLM for chat than for docs
199
189
 
200
- Claude for docs and answers, OpenAI for embeddings (Anthropic doesn't offer embedding models).
190
+ Use Claude for docs (great long-form), GPT-4o-mini for chat answers (fast + cheap), local embeddings.
201
191
 
202
192
  ```bash
203
193
  pip install "deepdoc[chatbot]"
204
194
  cd /path/to/your-project
205
195
 
196
+ deepdoc init --with-chatbot --provider anthropic
206
197
  export ANTHROPIC_API_KEY=sk-ant-...
207
198
  export OPENAI_API_KEY=sk-...
208
199
 
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
200
+ deepdoc config set chatbot.answer.provider openai
201
+ deepdoc config set chatbot.answer.model gpt-4o-mini
202
+ deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
217
203
 
218
204
  deepdoc generate
219
205
  deepdoc serve
220
- # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
221
206
  ```
222
207
 
223
- ### Google Gemini One Key for Everything
224
-
225
- One Gemini API key for docs, answers, and embeddings. Keep the `gemini/` prefix.
208
+ Want cloud embeddings instead of local? Add:
226
209
 
227
210
  ```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
211
+ deepdoc config set chatbot.embeddings.backend litellm
212
+ deepdoc config set chatbot.embeddings.provider openai
213
+ deepdoc config set chatbot.embeddings.model text-embedding-3-large
214
+ deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
248
215
  ```
249
216
 
250
217
  ### Azure OpenAI
251
218
 
252
- Replace `YOUR-RESOURCE` and deployment names with your actual Azure values.
219
+ Azure deployments need explicit endpoint + API-version values. Replace `YOUR-RESOURCE` and deployment names with your actual values.
253
220
 
254
221
  ```bash
255
222
  pip install "deepdoc[chatbot]"
@@ -261,11 +228,8 @@ export AZURE_API_BASE=https://YOUR-RESOURCE.openai.azure.com
261
228
  deepdoc init --with-chatbot --provider azure --model azure/gpt-4o
262
229
  deepdoc config set llm.base_url $AZURE_API_BASE
263
230
 
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
231
+ # Only embeddings need separate Azure config (different deployment)
232
+ deepdoc config set chatbot.embeddings.backend litellm
269
233
  deepdoc config set chatbot.embeddings.provider azure
270
234
  deepdoc config set chatbot.embeddings.model azure/text-embedding-3-large
271
235
  deepdoc config set chatbot.embeddings.api_key_env AZURE_API_KEY
@@ -274,10 +238,11 @@ deepdoc config set chatbot.embeddings.api_version 2024-02-01
274
238
 
275
239
  deepdoc generate
276
240
  deepdoc serve
277
- # → Docs at http://localhost:3000 • Chatbot at http://localhost:3000/ask
278
241
  ```
279
242
 
280
- ### Ollama Fully Local, No API Keys
243
+ The answer LLM inherits `llm.*` (Azure deployment + base URL + key) automatically.
244
+
245
+ ### Ollama — Fully local, no API keys
281
246
 
282
247
  Free and private. Runs everything on your machine.
283
248
 
@@ -289,11 +254,7 @@ cd /path/to/your-project
289
254
  ollama pull llama3.2
290
255
 
291
256
  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
257
+ deepdoc config set llm.base_url http://localhost:11434
297
258
 
298
259
  deepdoc generate
299
260
  deepdoc serve
@@ -373,7 +334,7 @@ deepdoc generate --exclude "tests/**"
373
334
 
374
335
  1. **Phase 1: Scan** — Walk the repo, parse supported languages, detect endpoints, config/setup artifacts, runtime surfaces, integration signals, and OpenAPI specs.
375
336
  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.
337
+ 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
338
  4. **Phase 4: API Ref** — Stage OpenAPI assets for the generated Fumadocs `/api/*` pages when a spec exists.
378
339
  5. **Phase 5: Build** — Write the generated `site/` Fumadocs scaffold, page tree, search route, and static assets from the generated plan.
379
340
 
@@ -398,6 +359,7 @@ deepdoc update # Normal ongoing refresh
398
359
  deepdoc update --since HEAD~3 # Changes in last 3 commits
399
360
  deepdoc update --since main # All changes since branching from main
400
361
  deepdoc update --replan # Force a full replan
362
+ deepdoc update --strict-quality # Fail if generated docs are invalid/degraded
401
363
  deepdoc update --deploy # Update + deploy
402
364
  ```
403
365
 
@@ -406,22 +368,23 @@ deepdoc update --deploy # Update + deploy
406
368
  1. Loads the saved sync baseline, plan, and generation ledger from `.deepdoc/`.
407
369
  2. Diffs committed changes from the last synced commit to the current `HEAD`.
408
370
  3. Chooses a strategy automatically:
409
- - incremental update
410
- - targeted replan
411
- - full replan
371
+ - **incremental** — regenerate only the stale bucket pages
372
+ - **targeted replan** — new/deleted files or endpoint structure changes; re-plans affected buckets then regenerates them. Full replan is never triggered automatically for normal code changes.
412
373
  4. Compares the saved scan cache with the current scan so semantic endpoint changes can refresh impacted docs even when ownership files do not line up directly.
413
- 5. Regenerates only the affected bucket pages when safe.
414
- 6. Incrementally refreshes the chatbot corpora from the same update run.
415
- 7. Rebuilds site config and nav afterward.
374
+ 5. Regenerates only the affected bucket pages. Deleted files are cleaned up in-place: orphaned buckets and their MDX pages are removed, partially-emptied buckets are marked stale and regenerated.
375
+ 6. Appends an entry to `.deepdoc/changelog.json` and regenerates `docs/whats-changed.mdx` so the docs site always shows a current commit-by-commit change log.
376
+ 7. Incrementally refreshes the chatbot corpora from the same update run.
377
+ 8. Rebuilds site config and nav afterward.
416
378
 
417
379
  If git is unavailable, it falls back to hash-based staleness detection for recovery.
380
+ When `--deploy` is used, DeepDoc deploys only after a fully successful update; failed page generation or chatbot sync blocks deployment.
418
381
 
419
382
  Generation writes quality artifacts under `.deepdoc/`:
420
383
 
421
384
  - `.deepdoc/generation_quality.json` records invalid/degraded pages, coverage metrics, local setup warnings, and consistency summary data.
422
385
  - `.deepdoc/consistency_warnings.json` records warning-only cross-page identifier consistency findings.
423
386
 
424
- Generated MDX pages include provenance frontmatter such as `deepdoc_generated_commit`, `deepdoc_generated_at`, `deepdoc_generated_version`, `deepdoc_status`, and `deepdoc_evidence_files`. The generated Fumadocs site renders a subtle "Last generated from commit ..." badge when this metadata is present.
387
+ Generated MDX pages include provenance frontmatter such as `deepdoc_generated_commit`, `deepdoc_generated_at`, `deepdoc_generated_version`, `deepdoc_status`, `deepdoc_evidence_files`, and `deepdoc_prereqs` (prerequisite page slugs). The generated Fumadocs site renders a subtle "Last generated from commit ..." badge and wires prev/next navigation arrows automatically. Pages with prerequisites show a "Read first:" callout at the top.
425
388
 
426
389
  **Options:**
427
390
 
@@ -429,7 +392,7 @@ Generated MDX pages include provenance frontmatter such as `deepdoc_generated_co
429
392
  |------|---------|-------------|
430
393
  | `--since` | last synced commit | Git ref to diff against |
431
394
  | `--replan` | off | Force a full replan even if the change set looks incremental |
432
- | `--deploy` | off | Deploy after updating |
395
+ | `--deploy` | off | Deploy after a fully successful update |
433
396
 
434
397
  ### `deepdoc status`
435
398
 
@@ -740,9 +703,7 @@ site:
740
703
  | `site.favicon` | `""` | Path to favicon |
741
704
  | `site.logo` | `""` | Path to logo |
742
705
  | **Compatibility** | | |
743
- | `compatibility.deprecated_version_warning.enabled` | `true` | Warn when existing generated docs were produced by a deprecated DeepDoc version |
744
- | `compatibility.deprecated_version_warning.minimum_version` | `1.0.0` | Minimum generated DeepDoc version before an upgrade warning appears |
745
- | `compatibility.deprecated_version_warning.upgrade_command` | `python3 -m pip install --upgrade deepdoc` | Command shown in the upgrade warning |
706
+ | `compatibility.deprecated_version_warning.enabled` | `true` | Warn when existing generated docs were produced by a different major version of DeepDoc (e.g. docs from v1.x with CLI v2.x). Suppressed for minor/patch version gaps. |
746
707
 
747
708
  ---
748
709
 
@@ -750,9 +711,11 @@ site:
750
711
 
751
712
  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.
752
713
 
714
+ > **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.
715
+
753
716
  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.
754
717
 
755
- > **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.
718
+ > **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.
756
719
 
757
720
  ### How the Model Surfaces Work
758
721
 
@@ -789,99 +752,70 @@ Public endpoints remain stable:
789
752
 
790
753
  ### Provider Recipes
791
754
 
792
- #### Claude For Docs + Chatbot Answers
755
+ 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.
756
+
757
+ #### Claude for docs, OpenAI for embeddings
793
758
 
794
- Anthropic works well for doc generation and chatbot answers, but you still need a separate embeddings provider.
759
+ Claude doesn't offer embedding models, so cloud embeddings need a separate provider. (Or just keep the default `fastembed` and skip this entirely.)
795
760
 
796
761
  ```bash
797
762
  export ANTHROPIC_API_KEY=...
798
763
  export OPENAI_API_KEY=...
799
- export DEEPDOC_CHAT_API_KEY=$ANTHROPIC_API_KEY
800
- export DEEPDOC_EMBED_API_KEY=$OPENAI_API_KEY
801
764
 
802
765
  deepdoc config set llm.provider anthropic
803
766
  deepdoc config set llm.model claude-3-5-sonnet-20241022
804
767
  deepdoc config set llm.api_key_env ANTHROPIC_API_KEY
805
768
 
806
769
  deepdoc config set chatbot.enabled true
807
- deepdoc config set chatbot.answer.provider anthropic
808
- deepdoc config set chatbot.answer.model claude-3-5-sonnet-20241022
809
- deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
810
-
770
+ deepdoc config set chatbot.embeddings.backend litellm
811
771
  deepdoc config set chatbot.embeddings.provider openai
812
772
  deepdoc config set chatbot.embeddings.model text-embedding-3-large
813
- deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
773
+ deepdoc config set chatbot.embeddings.api_key_env OPENAI_API_KEY
814
774
  ```
815
775
 
816
- #### OpenAI For Docs + Chatbot
776
+ The chatbot answer LLM inherits `llm.*` (Claude) automatically.
777
+
778
+ #### Different model for chat than for docs
779
+
780
+ Claude for docs, GPT-4o-mini for cheaper/faster chat answers. Embeddings stay local.
817
781
 
818
782
  ```bash
783
+ export ANTHROPIC_API_KEY=...
819
784
  export OPENAI_API_KEY=...
820
- export DEEPDOC_CHAT_API_KEY=$OPENAI_API_KEY
821
- export DEEPDOC_EMBED_API_KEY=$OPENAI_API_KEY
822
785
 
823
- deepdoc config set llm.provider openai
824
- deepdoc config set llm.model gpt-4o
825
- deepdoc config set llm.api_key_env OPENAI_API_KEY
786
+ deepdoc config set llm.provider anthropic
787
+ deepdoc config set llm.model claude-3-5-sonnet-20241022
788
+ deepdoc config set llm.api_key_env ANTHROPIC_API_KEY
826
789
 
827
790
  deepdoc config set chatbot.enabled true
828
791
  deepdoc config set chatbot.answer.provider openai
829
792
  deepdoc config set chatbot.answer.model gpt-4o-mini
830
- deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
831
-
832
- deepdoc config set chatbot.embeddings.provider openai
833
- deepdoc config set chatbot.embeddings.model text-embedding-3-large
834
- deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
793
+ deepdoc config set chatbot.answer.api_key_env OPENAI_API_KEY
835
794
  ```
836
795
 
837
- #### Google Gemini For Docs + Chatbot
838
-
839
- With Google AI Studio, keep the `gemini/` prefix in model names and use `GEMINI_API_KEY`.
840
-
841
- ```bash
842
- export GEMINI_API_KEY=...
843
- export DEEPDOC_CHAT_API_KEY=$GEMINI_API_KEY
844
- export DEEPDOC_EMBED_API_KEY=$GEMINI_API_KEY
845
-
846
- deepdoc config set llm.provider gemini
847
- deepdoc config set llm.model gemini/gemini-2.0-flash
848
- deepdoc config set llm.api_key_env GEMINI_API_KEY
849
-
850
- deepdoc config set chatbot.enabled true
851
- deepdoc config set chatbot.answer.provider gemini
852
- deepdoc config set chatbot.answer.model gemini/gemini-2.0-flash
853
- deepdoc config set chatbot.answer.api_key_env DEEPDOC_CHAT_API_KEY
854
-
855
- deepdoc config set chatbot.embeddings.provider gemini
856
- deepdoc config set chatbot.embeddings.model gemini/text-embedding-004
857
- deepdoc config set chatbot.embeddings.api_key_env DEEPDOC_EMBED_API_KEY
858
- ```
796
+ #### Azure with separate embedding deployment
859
797
 
860
- #### Azure For Docs + Chatbot
798
+ Azure deployments need explicit `base_url` + `api_version`, and embeddings typically live on a different deployment.
861
799
 
862
800
  ```bash
863
- export AZURE_OPENAI_API_KEY=...
864
- export AZURE_EMBEDDING_API_KEY=...
801
+ export AZURE_API_KEY=...
865
802
 
866
803
  deepdoc config set llm.provider azure
867
804
  deepdoc config set llm.model azure/gpt-4.1
868
- deepdoc config set llm.api_key_env AZURE_OPENAI_API_KEY
805
+ deepdoc config set llm.api_key_env AZURE_API_KEY
869
806
  deepdoc config set llm.base_url https://YOUR-RESOURCE.openai.azure.com/
870
807
 
871
808
  deepdoc config set chatbot.enabled true
872
- deepdoc config set chatbot.answer.provider azure
873
- deepdoc config set chatbot.answer.model azure/gpt-4.1
874
- deepdoc config set chatbot.answer.api_key_env AZURE_OPENAI_API_KEY
875
- deepdoc config set chatbot.answer.base_url https://YOUR-RESOURCE.openai.azure.com/
876
- deepdoc config set chatbot.answer.api_version 2024-02-15-preview
877
-
809
+ deepdoc config set chatbot.embeddings.backend litellm
878
810
  deepdoc config set chatbot.embeddings.provider azure
879
811
  deepdoc config set chatbot.embeddings.model azure/text-embedding-3-small
880
- deepdoc config set chatbot.embeddings.api_key_env AZURE_EMBEDDING_API_KEY
812
+ deepdoc config set chatbot.embeddings.api_key_env AZURE_API_KEY
881
813
  deepdoc config set chatbot.embeddings.base_url https://YOUR-RESOURCE.openai.azure.com/
882
814
  deepdoc config set chatbot.embeddings.api_version 2024-02-15-preview
883
815
  ```
884
816
 
817
+ The answer LLM inherits `llm.*` (Azure deployment, base URL, version, key) automatically — no `chatbot.answer.*` config needed for Azure.
818
+
885
819
  ### Installation
886
820
 
887
821
  The chatbot requires extra dependencies not included in the base install:
@@ -1011,10 +945,15 @@ chatbot:
1011
945
 
1012
946
  ### Chatbot Configuration Reference
1013
947
 
948
+ The defaults work for almost every project. Expand below only when you need to tune a specific knob.
949
+
950
+ <details>
951
+ <summary><strong>Full chatbot configuration reference (60+ keys)</strong></summary>
952
+
1014
953
  | Key | Default | Description |
1015
954
  |-----|---------|-------------|
1016
955
  | **General** | | |
1017
- | `chatbot.enabled` | `false` | Enable chatbot indexing and backend |
956
+ | `chatbot.enabled` | `false` | Enable chatbot indexing and backend (set automatically by `deepdoc init --with-chatbot`) |
1018
957
  | `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
1019
958
  | **Indexing** | | |
1020
959
  | `chatbot.indexing.include_repo_docs` | `true` | Index selected repo-authored docs such as README/design notes in a separate corpus |
@@ -1101,6 +1040,8 @@ chatbot:
1101
1040
  | `chatbot.chunking.max_doc_summary_chunks_per_page` | `4` | Doc summary chunks extracted per page |
1102
1041
  | `chatbot.chunking.max_doc_summary_chars` | `4000` | Max chars per doc summary chunk |
1103
1042
 
1043
+ </details>
1044
+
1104
1045
  ### Chatbot Provider Examples
1105
1046
 
1106
1047
  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.
@@ -1492,7 +1433,7 @@ jobs:
1492
1433
  env:
1493
1434
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
1494
1435
  run: |
1495
- deepdoc update --deploy
1436
+ deepdoc update --strict-quality --deploy
1496
1437
 
1497
1438
  - name: Upload Pages artifact
1498
1439
  uses: actions/upload-pages-artifact@v3
@@ -1511,101 +1452,59 @@ jobs:
1511
1452
 
1512
1453
  Add your API key to repo Settings → Secrets → Actions → `ANTHROPIC_API_KEY`.
1513
1454
 
1514
- ---
1515
-
1516
- ## Releasing
1517
-
1518
- DeepDoc now supports automated releases through GitHub Actions.
1519
-
1520
- ### Release tracks
1521
-
1522
- This repository now has two independent release tracks:
1455
+ 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:
1523
1456
 
1524
- - **Python package (`deepdoc`)**: controlled by `pyproject.toml`, root `CHANGELOG.md`, and `.github/workflows/release.yml`.
1525
- - **VS Code extension (`vscode-extension/`)**: controlled by `vscode-extension/package.json`, `vscode-extension/CHANGELOG.md`, and `.github/workflows/release-vscode-extension.yml`.
1526
-
1527
- Keep versions and changelog entries separated by track.
1528
-
1529
- ### What happens automatically
1530
-
1531
- When you push to `main`, the release workflow checks the version in `pyproject.toml`.
1532
- If that version does not already have a matching Git tag like `v0.1.1`, GitHub Actions will:
1533
-
1534
- - build the package
1535
- - publish it to PyPI
1536
- - create the Git tag
1537
- - create a GitHub Release and attach the built files
1538
- - use the matching section from `CHANGELOG.md` as the release notes when present
1539
-
1540
- ### Your release flow
1457
+ ```yaml
1458
+ # .github/workflows/deepdoc-refresh.yml
1459
+ name: Refresh Docs
1541
1460
 
1542
- 1. Update `version = "..."` in `pyproject.toml`
1543
- 2. Update `__version__ = "..."` in `deepdoc/__init__.py`
1544
- 3. Add a matching section to `CHANGELOG.md`
1545
- 4. Commit your changes
1546
- 5. Push to `main`
1461
+ on:
1462
+ push:
1463
+ branches: [main]
1547
1464
 
1548
- That is it. You do not need to manually create tags or GitHub Releases anymore.
1465
+ jobs:
1466
+ refresh:
1467
+ runs-on: ubuntu-latest
1468
+ permissions:
1469
+ contents: write
1549
1470
 
1550
- ### Changelog format
1471
+ steps:
1472
+ - uses: actions/checkout@v4
1473
+ with:
1474
+ fetch-depth: 0 # Full history needed for git diff
1551
1475
 
1552
- The release workflow looks for a section in `CHANGELOG.md` that matches the version in `pyproject.toml`.
1553
- These heading styles all work:
1476
+ - uses: actions/setup-python@v5
1477
+ with:
1478
+ python-version: "3.11"
1554
1479
 
1555
- - `## 0.1.2`
1556
- - `## [0.1.2]`
1557
- - `## v0.1.2`
1558
- - `## [0.1.2] - 2026-04-03`
1480
+ - uses: actions/setup-node@v4
1481
+ with:
1482
+ node-version: "20"
1559
1483
 
1560
- Example:
1484
+ - name: Install deepdoc
1485
+ run: pip install deepdoc
1561
1486
 
1562
- ```md
1563
- ## [0.1.2] - 2026-04-03
1487
+ - name: Refresh docs
1488
+ env:
1489
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
1490
+ run: deepdoc update --strict-quality
1564
1491
 
1565
- - Added automated GitHub releases
1566
- - Improved PyPI metadata
1567
- - Documented `deepdoc[chatbot]` installation
1492
+ - name: Commit updated docs
1493
+ run: |
1494
+ git config user.name "github-actions[bot]"
1495
+ git config user.email "github-actions[bot]@users.noreply.github.com"
1496
+ git add docs/ .deepdoc/
1497
+ git diff --cached --quiet || git commit -m "chore: refresh docs [skip ci]"
1498
+ git push
1568
1499
  ```
1569
1500
 
1570
- If the matching version section is missing, GitHub falls back to auto-generated release notes.
1571
-
1572
- ### One-time setup
1501
+ The `[skip ci]` tag on the commit message prevents the workflow from triggering itself again.
1573
1502
 
1574
- 1. On PyPI, open the `deepdoc` project
1575
- 2. Go to `Publishing`
1576
- 3. Add a Trusted Publisher for GitHub Actions with:
1577
- - owner: `tss-pranavkumar`
1578
- - repository: `deepdoc`
1579
- - workflow filename: `release.yml`
1580
- - environment name: `pypi`
1581
- 4. In GitHub, open Settings → Actions → General
1582
- 5. Set Workflow permissions to `Read and write permissions`
1583
-
1584
- After that, every new version pushed to `main` can publish without a PyPI token.
1585
-
1586
- ### VS Code extension release flow
1587
-
1588
- The VS Code extension release is automated from `main` when files under `vscode-extension/` change.
1589
-
1590
- What the extension workflow does:
1591
-
1592
- - reads `vscode-extension/package.json` version
1593
- - checks whether tag `vscode-extension-v<version>` already exists
1594
- - builds and packages the extension
1595
- - publishes to Marketplace using `VSCE_PAT`
1596
- - creates and pushes the matching git tag
1597
- - creates a GitHub release with notes from `vscode-extension/CHANGELOG.md` (fallback to generated notes)
1598
-
1599
- One-time setup for extension publishing:
1600
-
1601
- 1. Create a VS Code Marketplace PAT with Manage scope for publisher `Pranawww`
1602
- 2. Add repo secret `VSCE_PAT` in GitHub Actions secrets
1503
+ ---
1603
1504
 
1604
- Extension release flow on each version:
1505
+ ## Contributing & Releases
1605
1506
 
1606
- 1. Update `vscode-extension/package.json` version
1607
- 2. Add matching section to `vscode-extension/CHANGELOG.md`
1608
- 3. Commit and push to `main`
1507
+ 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`.
1609
1508
 
1610
1509
  ---
1611
1510
 
@@ -1651,6 +1550,7 @@ deepdoc generate --force # Full regen with new model
1651
1550
  ## Requirements
1652
1551
 
1653
1552
  - Python 3.10+
1553
+ - **Node 18+** on `PATH` — used at generate time for MDX compile validation, and at `serve`/`deploy` time for the Fumadocs site
1654
1554
  - Git (for `deepdoc update` and `deepdoc deploy`)
1655
1555
  - An LLM API key (or Ollama running locally)
1656
1556