deepdoc 0.4.2__tar.gz → 0.5.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 (185) hide show
  1. {deepdoc-0.4.2 → deepdoc-0.5.0}/PKG-INFO +85 -14
  2. {deepdoc-0.4.2 → deepdoc-0.5.0}/README.md +84 -13
  3. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/__init__.py +1 -1
  4. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/answer_mixin.py +71 -14
  5. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/chunker.py +1 -15
  6. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/deep_research.py +87 -30
  7. deepdoc-0.5.0/deepdoc/chatbot/embedding_capabilities.py +182 -0
  8. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/indexer.py +249 -153
  9. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/linking.py +4 -7
  10. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/persistence.py +320 -24
  11. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/providers.py +125 -25
  12. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/retrieval_mixin.py +49 -7
  13. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/service.py +2 -1
  14. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/settings.py +5 -0
  15. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/source_archive.py +97 -54
  16. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/cli.py +162 -5
  17. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/config.py +31 -0
  18. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/generator/evidence.py +144 -68
  19. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/generator/generation.py +306 -180
  20. deepdoc-0.5.0/deepdoc/llm/__init__.py +30 -0
  21. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/llm/client.py +229 -17
  22. deepdoc-0.5.0/deepdoc/llm/rate_limit.py +88 -0
  23. deepdoc-0.5.0/deepdoc/llm/token_budget.py +266 -0
  24. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/manifest.py +48 -3
  25. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/registry.py +13 -8
  26. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/repo_resolver.py +16 -8
  27. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/persistence_v2.py +54 -10
  28. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/pipeline_v2.py +99 -41
  29. deepdoc-0.5.0/deepdoc/plan_contract.py +76 -0
  30. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/bucket_refinement.py +84 -43
  31. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/common.py +6 -5
  32. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/engine.py +472 -80
  33. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/heuristics.py +147 -1
  34. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/utils.py +9 -3
  35. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_builder.py +1 -1
  36. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/components/mermaid-runner.tsx +1 -1
  37. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/lib/docs.ts +2 -2
  38. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/lib/nav.ts +2 -2
  39. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/smart_update_v2.py +283 -61
  40. deepdoc-0.5.0/deepdoc/telemetry.py +179 -0
  41. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/updater_v2.py +0 -1
  42. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/v2_models.py +3 -0
  43. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc.egg-info/PKG-INFO +85 -14
  44. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc.egg-info/SOURCES.txt +16 -1
  45. {deepdoc-0.4.2 → deepdoc-0.5.0}/pyproject.toml +1 -1
  46. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_index.py +190 -0
  47. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_providers.py +55 -16
  48. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_source_archive.py +141 -1
  49. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_classify.py +15 -2
  50. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_cli_serve.py +2 -0
  51. deepdoc-0.5.0/tests/test_embedding_capabilities.py +103 -0
  52. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_generation_evidence.py +185 -1
  53. deepdoc-0.5.0/tests/test_manifest_performance.py +273 -0
  54. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_next_builder.py +24 -3
  55. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_parallel_pipeline.py +93 -4
  56. deepdoc-0.5.0/tests/test_parallel_scan.py +88 -0
  57. deepdoc-0.5.0/tests/test_phase1_perf.py +397 -0
  58. deepdoc-0.5.0/tests/test_plan_contract.py +201 -0
  59. deepdoc-0.5.0/tests/test_planner_assignment_partition.py +177 -0
  60. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_planner_granularity.py +3 -2
  61. deepdoc-0.5.0/tests/test_rate_limit.py +237 -0
  62. deepdoc-0.5.0/tests/test_scan_telemetry.py +109 -0
  63. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_smart_update.py +315 -1
  64. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_stale.py +32 -0
  65. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_state.py +6 -0
  66. deepdoc-0.5.0/tests/test_telemetry.py +200 -0
  67. deepdoc-0.5.0/tests/test_token_budget.py +189 -0
  68. deepdoc-0.4.2/deepdoc/llm/__init__.py +0 -6
  69. {deepdoc-0.4.2 → deepdoc-0.5.0}/LICENSE +0 -0
  70. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/__main__.py +0 -0
  71. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/benchmark_v2.py +0 -0
  72. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/call_graph.py +0 -0
  73. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/changelog_writer.py +0 -0
  74. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/__init__.py +0 -0
  75. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/constants.py +0 -0
  76. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/docs_summary.py +0 -0
  77. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/embeddings.py +0 -0
  78. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/live_fallback_mixin.py +0 -0
  79. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/routes.py +0 -0
  80. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/scaffold.py +0 -0
  81. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/symbol_index.py +0 -0
  82. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/chatbot/types.py +0 -0
  83. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/generator/__init__.py +0 -0
  84. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/generator/consistency.py +0 -0
  85. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/generator/post_processors.py +0 -0
  86. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/generator/validation.py +0 -0
  87. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/llm/json_utils.py +0 -0
  88. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/llm/litellm_compat.py +0 -0
  89. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/llm/retry.py +0 -0
  90. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/openapi.py +0 -0
  91. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/__init__.py +0 -0
  92. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/api_detector.py +0 -0
  93. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/base.py +0 -0
  94. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/go_parser.py +0 -0
  95. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/js_ts_parser.py +0 -0
  96. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/php_parser.py +0 -0
  97. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/python_parser.py +0 -0
  98. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/__init__.py +0 -0
  99. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/base.py +0 -0
  100. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/common.py +0 -0
  101. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/detector.py +0 -0
  102. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/django.py +0 -0
  103. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/express.py +0 -0
  104. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/falcon.py +0 -0
  105. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/fastify.py +0 -0
  106. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/go.py +0 -0
  107. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/js_shared.py +0 -0
  108. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/laravel.py +0 -0
  109. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/nestjs.py +0 -0
  110. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/python_shared.py +0 -0
  111. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/routes/registry.py +0 -0
  112. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/parser/vue_parser.py +0 -0
  113. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/__init__.py +0 -0
  114. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/bucket_injection.py +0 -0
  115. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/endpoint_refs.py +0 -0
  116. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/flow_candidates.py +0 -0
  117. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/nav_shaping.py +0 -0
  118. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/specializations.py +0 -0
  119. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/planner/topology.py +0 -0
  120. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/prompts/__init__.py +0 -0
  121. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/prompts/bucket_types.py +0 -0
  122. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/prompts/page_types.py +0 -0
  123. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/prompts/selectors.py +0 -0
  124. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/prompts/system.py +0 -0
  125. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/prompts/update.py +0 -0
  126. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/py.typed +0 -0
  127. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/__init__.py +0 -0
  128. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/artifacts.py +0 -0
  129. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/clustering.py +0 -0
  130. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/common.py +0 -0
  131. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/database.py +0 -0
  132. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/endpoints.py +0 -0
  133. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/integrations.py +0 -0
  134. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/runtime.py +0 -0
  135. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/scanner/utils.py +0 -0
  136. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/__init__.py +0 -0
  137. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/__init__.py +0 -0
  138. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/common.py +0 -0
  139. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/mdx_utils.py +0 -0
  140. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/.gitignore +0 -0
  141. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/(main)/[[...slug]]/page.tsx +0 -0
  142. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/(main)/layout.tsx +0 -0
  143. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/ask/layout.tsx +0 -0
  144. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/ask/page.tsx +0 -0
  145. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/globals.css +0 -0
  146. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/app/layout.tsx +0 -0
  147. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/components/chatbot.tsx +0 -0
  148. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/deepdoc.config.json +0 -0
  149. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/lib/config.ts +0 -0
  150. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/next.config.mjs +0 -0
  151. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/package.json +0 -0
  152. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/next_template/tsconfig.json +0 -0
  153. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/vendor/highlight.min.js +0 -0
  154. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/vendor/hljs-theme.css +0 -0
  155. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/site/builder/vendor/markdown-it.min.js +0 -0
  156. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc/source_metadata.py +0 -0
  157. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc.egg-info/dependency_links.txt +0 -0
  158. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc.egg-info/entry_points.txt +0 -0
  159. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc.egg-info/requires.txt +0 -0
  160. {deepdoc-0.4.2 → deepdoc-0.5.0}/deepdoc.egg-info/top_level.txt +0 -0
  161. {deepdoc-0.4.2 → deepdoc-0.5.0}/setup.cfg +0 -0
  162. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_benchmark_scorecard.py +0 -0
  163. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_call_graph.py +0 -0
  164. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_changelog.py +0 -0
  165. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_config.py +0 -0
  166. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_embeddings.py +0 -0
  167. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_eval.py +0 -0
  168. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_persistence.py +0 -0
  169. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_query.py +0 -0
  170. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_relationship.py +0 -0
  171. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_chatbot_scaffold.py +0 -0
  172. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_cli_generate.py +0 -0
  173. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_cli_update.py +0 -0
  174. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_consistency_pass.py +0 -0
  175. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_flow_candidates.py +0 -0
  176. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_framework_fixtures.py +0 -0
  177. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_framework_support.py +0 -0
  178. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_internal_docs_metadata.py +0 -0
  179. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_litellm_compat.py +0 -0
  180. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_llm_json_utils.py +0 -0
  181. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_llm_retry.py +0 -0
  182. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_parser_ranges.py +0 -0
  183. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_planner_consolidation.py +0 -0
  184. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_route_registry.py +0 -0
  185. {deepdoc-0.4.2 → deepdoc-0.5.0}/tests/test_runtime_scan.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepdoc
3
- Version: 0.4.2
3
+ Version: 0.5.0
4
4
  Summary: Auto-generate beautiful docs from any codebase
5
5
  Author: Pranav Kumar
6
6
  License: MIT
@@ -88,7 +88,15 @@ DeepDoc scans your repo, builds a bucket-based documentation plan, generates ric
88
88
  - **OpenAPI-aware API docs** — auto-detects OpenAPI/Swagger specs and renders an interactive Swagger UI page in the generated site.
89
89
  - **Local-first Next.js + Fumadocs site** — generates a `site/` shell (Fumadocs UI, Mermaid, syntax highlighting, built-in search); `deepdoc deploy` runs `next build` and exports a static site to any host. Requires Node.js ≥18.
90
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.
91
+ Works with Anthropic, OpenAI, Azure OpenAI, Google Gemini, Ollama, and any other LiteLLM-compatible provider.
92
+
93
+ > **Use DeepDoc for its supported stacks.** DeepDoc is built and tested for
94
+ > Python backends using **Django, Django REST Framework, or Falcon**;
95
+ > JavaScript/TypeScript backends using **Express, Fastify, or NestJS**;
96
+ > **Laravel** PHP applications; and conventional **Go** services. It also
97
+ > extracts symbols from Vue SFCs. It is deliberately **not** a generic
98
+ > framework-agnostic documentation generator: do not rely on it for FastAPI,
99
+ > Flask, Nuxt, or unsupported frameworks just because their files can be parsed.
92
100
 
93
101
  ---
94
102
 
@@ -396,7 +404,7 @@ Generation writes quality artifacts under `.deepdoc/`:
396
404
  - `.deepdoc/generation_quality.json` records invalid/degraded pages, coverage metrics, local setup warnings, and consistency summary data.
397
405
  - `.deepdoc/consistency_warnings.json` records warning-only cross-page identifier consistency findings.
398
406
 
399
- Generated Markdown 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 Fumadocs UI renders these pages with built-in navigation, search, and table of contents.
407
+ Generated Markdown pages include provenance frontmatter such as `deepdoc_generated_commit`, `deepdoc_generated_at`, `deepdoc_generated_version`, `deepdoc_status`, `deepdoc_evidence_files`, `deepdoc_prereqs`, and evidence-budget usage/trimming fields. The Fumadocs UI renders these pages with built-in navigation, search, and table of contents.
400
408
 
401
409
  **Options:**
402
410
 
@@ -416,6 +424,20 @@ deepdoc status
416
424
 
417
425
  This is useful after `generate` or `update` when you want a quick health check without opening the site.
418
426
 
427
+ ### `deepdoc performance`
428
+
429
+ Show the latest local pipeline timings, LLM token usage, retries, and I/O counters.
430
+
431
+ ```bash
432
+ deepdoc performance
433
+ ```
434
+
435
+ DeepDoc stores one sanitized JSON record per completed `generate` or `update`
436
+ under `.deepdoc/performance/runs.jsonl`. Records contain measurements only—never
437
+ source code, prompts, generated content, API keys, or endpoint URLs. The history
438
+ rotates when it reaches 10 MB, and the command compares the latest duration with
439
+ the previous run when available.
440
+
419
441
  ### `deepdoc serve`
420
442
 
421
443
  Preview the generated docs locally with live reload using the Next.js + Fumadocs site in `site/`.
@@ -627,8 +649,16 @@ llm:
627
649
  model: claude-3-5-sonnet-20241022
628
650
  api_key_env: ANTHROPIC_API_KEY
629
651
  base_url: null # Set for Ollama/custom endpoints
630
- max_tokens: null # null = no cap (recommended); set a number to limit output
652
+ max_tokens: null # null = provider default; set a number to request an explicit cap
653
+ base_model: null # Set only for a custom/Azure deployment alias
654
+ context_window_tokens: null # null = resolve locally from LiteLLM model metadata
655
+ output_reserve_tokens: null # null = derive from the resolved model output capability
631
656
  temperature: 0.2
657
+ rate_limits:
658
+ max_concurrency: 6
659
+ requests_per_minute: 60
660
+ tokens_per_minute: 250000
661
+ adaptive_backoff: true
632
662
 
633
663
  languages:
634
664
  - python
@@ -690,8 +720,15 @@ site:
690
720
  | `llm.model` | `claude-3-5-sonnet-20241022` | Model name (use provider prefix for non-Anthropic, e.g. `azure/gpt-4.1`) |
691
721
  | `llm.api_key_env` | `ANTHROPIC_API_KEY` | Environment variable that holds the API key |
692
722
  | `llm.base_url` | `null` | Custom endpoint URL (required for Ollama, optional for Azure) |
693
- | `llm.max_tokens` | `null` | Max output tokens per LLM call. `null` = no cap (recommended). Set explicitly if your provider requires it (e.g. some Azure deployments). Typical values: `4096` for shorter pages, `8192`–`16384` for detailed docs |
723
+ | `llm.base_model` | `null` | Canonical LiteLLM model name for an otherwise unknown Azure/custom deployment alias |
724
+ | `llm.max_tokens` | `null` | Requested provider output cap. `null` omits the parameter and uses the provider default; configured values are clamped to `output_reserve_tokens` |
694
725
  | `llm.temperature` | `0.2` | LLM sampling temperature |
726
+ | `llm.context_window_tokens` | `null` | Model context window resolved locally from LiteLLM; set an integer for an unknown/private deployment alias |
727
+ | `llm.output_reserve_tokens` | `null` | Output reservation derived from the resolved model; set an integer to override or cap explicit `max_tokens` |
728
+ | `llm.rate_limits.max_concurrency` | `6` | Maximum simultaneous documentation-model requests |
729
+ | `llm.rate_limits.requests_per_minute` | `60` | Rolling request limit for the documentation model |
730
+ | `llm.rate_limits.tokens_per_minute` | `250000` | Rolling estimated input-token limit for the documentation model |
731
+ | `llm.rate_limits.adaptive_backoff` | `true` | Share provider `429`/`Retry-After` cooldown across workers |
695
732
  | **Generation** | | |
696
733
  | `generation_mode` | `feature_buckets` | Documentation generation mode |
697
734
  | `max_pages` | `0` | Max pages to generate. `0` = no cap |
@@ -701,8 +738,9 @@ site:
701
738
  | `include_endpoint_pages` | `true` | Generate endpoint documentation pages |
702
739
  | `include_integration_pages` | `true` | Generate integration documentation pages |
703
740
  | **Parallelism** | | |
704
- | `max_parallel_workers` | `6` | Concurrent LLM calls. Increase for Azure PTU or high-TPM deployments |
705
- | `batch_size` | `10` | Pages per batch before rate-limit pause |
741
+ | `max_parallel_workers` | `6` | Generation executor size; actual hosted request concurrency is also bounded by `llm.rate_limits.max_concurrency` |
742
+ | `batch_size` | `10` | Submission-throttle cadence retained for compatibility; generation uses one rolling executor, not batch barriers |
743
+ | `scan.max_workers` | `8` | Bounded local workers for source reads, parsing, and per-file endpoint detection (`1` forces serial scanning) |
706
744
  | **File filters** | | |
707
745
  | `languages` | `[python, javascript, typescript, go, php, vue]` | Languages to parse |
708
746
  | `include` | `[]` | Glob patterns to include (empty = everything) |
@@ -748,7 +786,7 @@ All chatbot endpoints now share one response contract:
748
786
  - `evidence[]` is the canonical source of right-pane code/config snippets. Each item has an ID like `E1`, `file_path`, `start_line`, `end_line`, and `snippet`.
749
787
  - `references[]` contains generated docs or repo-authored docs. These are read-next links, not implementation proof.
750
788
  - Legacy fields such as `code_citations`, `doc_links`, `code_workspace_citations`, and `file_inventory` are derived for compatibility.
751
- - SQLite FTS, FAISS vectors, symbol chunks, and relationship chunks are candidate retrieval artifacts only. A candidate becomes evidence only after it is hydrated from the source archive/catalog.
789
+ - SQLite FTS, FAISS vectors, symbol chunks, and relationship chunks are candidate retrieval artifacts only. A candidate becomes evidence only after it is hydrated from the content-addressed SQLite source archive/catalog. Existing gzip source archives migrate automatically on the next update.
752
790
  - Generated/internal paths such as `.deepdoc*`, `docs/`, `site/`, and `chatbot_backend/` are excluded from source evidence.
753
791
  - The answer validator rejects invented source paths, `line unknown`, unknown evidence IDs, and docs used as implementation proof. If a retry still fails, the backend returns a conservative answer with diagnostics.
754
792
 
@@ -966,7 +1004,7 @@ The defaults work for almost every project. Expand below only when you need to t
966
1004
  |-----|---------|-------------|
967
1005
  | **General** | | |
968
1006
  | `chatbot.enabled` | `false` | Enable chatbot indexing and backend (set automatically by `deepdoc init --with-chatbot`) |
969
- | `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
1007
+ | `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for the transactional SQLite source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
970
1008
  | **Indexing** | | |
971
1009
  | `chatbot.indexing.include_repo_docs` | `true` | Index selected repo-authored docs such as README/design notes in a separate corpus |
972
1010
  | `chatbot.indexing.include_tests` | `false` | Allow test/example/fixture docs into the repo-doc corpus |
@@ -1244,7 +1282,26 @@ deepdoc clean --yes # Skip confirmation prompt
1244
1282
 
1245
1283
  ## Supported Languages & Frameworks
1246
1284
 
1247
- **Parsing (tree-sitter AST + regex fallback):**
1285
+ > ## Supported Stacks Only
1286
+ >
1287
+ > **Use DeepDoc when your repository is primarily one of these targets:**
1288
+ >
1289
+ > - **Python:** Django, Django REST Framework, Falcon
1290
+ > - **JavaScript / TypeScript:** Express, Fastify, NestJS
1291
+ > - **PHP:** Laravel
1292
+ > - **Go:** conventional HTTP services and supported route helpers
1293
+ > - **Vue:** component and symbol extraction, not a standalone backend route target
1294
+ >
1295
+ > DeepDoc can parse a number of source formats, but parsing is not the same as
1296
+ > full framework support. Endpoint resolution, runtime discovery, call-graph
1297
+ > enrichment, and generated API documentation are only guaranteed for the
1298
+ > supported stacks above. **Do not adopt DeepDoc for FastAPI, Flask, Nuxt, or an
1299
+ > unlisted framework unless you are prepared to extend scanner coverage first.**
1300
+
1301
+ ### Supported Source Parsing
1302
+
1303
+ These file types receive AST/symbol extraction. This alone does not imply
1304
+ framework-level route or runtime coverage.
1248
1305
 
1249
1306
  | Language | Extensions | Extracts |
1250
1307
  |----------|-----------|----------|
@@ -1255,7 +1312,7 @@ deepdoc clean --yes # Skip confirmation prompt
1255
1312
  | PHP | `.php` | Functions, classes, methods, namespaces |
1256
1313
  | Vue | `.vue` | SFC script symbols, props/emits/slots, router/store usage |
1257
1314
 
1258
- **High-confidence framework support (fixture-backed):**
1315
+ ### Supported Framework Targets
1259
1316
 
1260
1317
  | Framework | Language | Proven patterns |
1261
1318
  |-----------|----------|-----------------|
@@ -1263,14 +1320,28 @@ deepdoc clean --yes # Skip confirmation prompt
1263
1320
  | Django / DRF | Python | `path()`, `re_path()`, `@api_view`, `as_view()`, DRF routers, `@action` |
1264
1321
  | Express | JS/TS | Mounted routers via `app.use()`, nested prefixes, chained `route()` calls |
1265
1322
  | Fastify | JS/TS | Plugin `register(..., { prefix })`, shorthand methods, `route({ ... })`, schema hints |
1323
+ | NestJS | JS/TS | Decorator controllers and method routes |
1266
1324
  | Falcon | Python | `app.add_route()`, responder classes, imported resources, app middleware |
1267
- | Vue | Vue SFC | Component detection, `defineProps`, `defineEmits`, `defineModel`, `defineSlots`, router/store signals |
1325
+ | Go services | Go | Conventional HTTP handlers and common route helpers |
1268
1326
 
1269
- **Supported but not headline-high-confidence yet:**
1327
+ ### Parser Coverage, Not A Supported Backend Target
1270
1328
 
1271
1329
  | Framework | Language | Current coverage |
1272
1330
  |-----------|----------|------------------|
1273
- | Gin / Echo / Fiber | Go | Common route helpers (`GET`, `POST`, `HandleFunc`) |
1331
+ | Vue SFC | Vue | Component detection, `defineProps`, `defineEmits`, `defineModel`, `defineSlots`, router/store signals |
1332
+ | Gin / Echo / Fiber | Go | Common route helpers (`GET`, `POST`, `HandleFunc`); validate against your codebase before adoption |
1333
+
1334
+ ### Explicitly Unsupported Scan Targets
1335
+
1336
+ | Framework | Why this matters |
1337
+ |-----------|------------------|
1338
+ | FastAPI | No supported route-resolution or scanner contract |
1339
+ | Flask | No supported route-resolution or scanner contract |
1340
+ | Nuxt | No supported route-resolution or scanner contract |
1341
+
1342
+ If your framework is not listed under **Supported Framework Targets**, treat it
1343
+ as unsupported. Extend `deepdoc/scanner/` and route fixtures before using
1344
+ DeepDoc as the source of truth for that stack.
1274
1345
 
1275
1346
  **Runtime/background surface extraction:**
1276
1347
 
@@ -49,7 +49,15 @@ DeepDoc scans your repo, builds a bucket-based documentation plan, generates ric
49
49
  - **OpenAPI-aware API docs** — auto-detects OpenAPI/Swagger specs and renders an interactive Swagger UI page in the generated site.
50
50
  - **Local-first Next.js + Fumadocs site** — generates a `site/` shell (Fumadocs UI, Mermaid, syntax highlighting, built-in search); `deepdoc deploy` runs `next build` and exports a static site to any host. Requires Node.js ≥18.
51
51
 
52
- Works with Anthropic, OpenAI, Azure OpenAI, Google Gemini, Ollama, and any other LiteLLM-compatible provider. Parses Python, JavaScript/TypeScript, Go, PHP, and Vue.
52
+ Works with Anthropic, OpenAI, Azure OpenAI, Google Gemini, Ollama, and any other LiteLLM-compatible provider.
53
+
54
+ > **Use DeepDoc for its supported stacks.** DeepDoc is built and tested for
55
+ > Python backends using **Django, Django REST Framework, or Falcon**;
56
+ > JavaScript/TypeScript backends using **Express, Fastify, or NestJS**;
57
+ > **Laravel** PHP applications; and conventional **Go** services. It also
58
+ > extracts symbols from Vue SFCs. It is deliberately **not** a generic
59
+ > framework-agnostic documentation generator: do not rely on it for FastAPI,
60
+ > Flask, Nuxt, or unsupported frameworks just because their files can be parsed.
53
61
 
54
62
  ---
55
63
 
@@ -357,7 +365,7 @@ Generation writes quality artifacts under `.deepdoc/`:
357
365
  - `.deepdoc/generation_quality.json` records invalid/degraded pages, coverage metrics, local setup warnings, and consistency summary data.
358
366
  - `.deepdoc/consistency_warnings.json` records warning-only cross-page identifier consistency findings.
359
367
 
360
- Generated Markdown 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 Fumadocs UI renders these pages with built-in navigation, search, and table of contents.
368
+ Generated Markdown pages include provenance frontmatter such as `deepdoc_generated_commit`, `deepdoc_generated_at`, `deepdoc_generated_version`, `deepdoc_status`, `deepdoc_evidence_files`, `deepdoc_prereqs`, and evidence-budget usage/trimming fields. The Fumadocs UI renders these pages with built-in navigation, search, and table of contents.
361
369
 
362
370
  **Options:**
363
371
 
@@ -377,6 +385,20 @@ deepdoc status
377
385
 
378
386
  This is useful after `generate` or `update` when you want a quick health check without opening the site.
379
387
 
388
+ ### `deepdoc performance`
389
+
390
+ Show the latest local pipeline timings, LLM token usage, retries, and I/O counters.
391
+
392
+ ```bash
393
+ deepdoc performance
394
+ ```
395
+
396
+ DeepDoc stores one sanitized JSON record per completed `generate` or `update`
397
+ under `.deepdoc/performance/runs.jsonl`. Records contain measurements only—never
398
+ source code, prompts, generated content, API keys, or endpoint URLs. The history
399
+ rotates when it reaches 10 MB, and the command compares the latest duration with
400
+ the previous run when available.
401
+
380
402
  ### `deepdoc serve`
381
403
 
382
404
  Preview the generated docs locally with live reload using the Next.js + Fumadocs site in `site/`.
@@ -588,8 +610,16 @@ llm:
588
610
  model: claude-3-5-sonnet-20241022
589
611
  api_key_env: ANTHROPIC_API_KEY
590
612
  base_url: null # Set for Ollama/custom endpoints
591
- max_tokens: null # null = no cap (recommended); set a number to limit output
613
+ max_tokens: null # null = provider default; set a number to request an explicit cap
614
+ base_model: null # Set only for a custom/Azure deployment alias
615
+ context_window_tokens: null # null = resolve locally from LiteLLM model metadata
616
+ output_reserve_tokens: null # null = derive from the resolved model output capability
592
617
  temperature: 0.2
618
+ rate_limits:
619
+ max_concurrency: 6
620
+ requests_per_minute: 60
621
+ tokens_per_minute: 250000
622
+ adaptive_backoff: true
593
623
 
594
624
  languages:
595
625
  - python
@@ -651,8 +681,15 @@ site:
651
681
  | `llm.model` | `claude-3-5-sonnet-20241022` | Model name (use provider prefix for non-Anthropic, e.g. `azure/gpt-4.1`) |
652
682
  | `llm.api_key_env` | `ANTHROPIC_API_KEY` | Environment variable that holds the API key |
653
683
  | `llm.base_url` | `null` | Custom endpoint URL (required for Ollama, optional for Azure) |
654
- | `llm.max_tokens` | `null` | Max output tokens per LLM call. `null` = no cap (recommended). Set explicitly if your provider requires it (e.g. some Azure deployments). Typical values: `4096` for shorter pages, `8192`–`16384` for detailed docs |
684
+ | `llm.base_model` | `null` | Canonical LiteLLM model name for an otherwise unknown Azure/custom deployment alias |
685
+ | `llm.max_tokens` | `null` | Requested provider output cap. `null` omits the parameter and uses the provider default; configured values are clamped to `output_reserve_tokens` |
655
686
  | `llm.temperature` | `0.2` | LLM sampling temperature |
687
+ | `llm.context_window_tokens` | `null` | Model context window resolved locally from LiteLLM; set an integer for an unknown/private deployment alias |
688
+ | `llm.output_reserve_tokens` | `null` | Output reservation derived from the resolved model; set an integer to override or cap explicit `max_tokens` |
689
+ | `llm.rate_limits.max_concurrency` | `6` | Maximum simultaneous documentation-model requests |
690
+ | `llm.rate_limits.requests_per_minute` | `60` | Rolling request limit for the documentation model |
691
+ | `llm.rate_limits.tokens_per_minute` | `250000` | Rolling estimated input-token limit for the documentation model |
692
+ | `llm.rate_limits.adaptive_backoff` | `true` | Share provider `429`/`Retry-After` cooldown across workers |
656
693
  | **Generation** | | |
657
694
  | `generation_mode` | `feature_buckets` | Documentation generation mode |
658
695
  | `max_pages` | `0` | Max pages to generate. `0` = no cap |
@@ -662,8 +699,9 @@ site:
662
699
  | `include_endpoint_pages` | `true` | Generate endpoint documentation pages |
663
700
  | `include_integration_pages` | `true` | Generate integration documentation pages |
664
701
  | **Parallelism** | | |
665
- | `max_parallel_workers` | `6` | Concurrent LLM calls. Increase for Azure PTU or high-TPM deployments |
666
- | `batch_size` | `10` | Pages per batch before rate-limit pause |
702
+ | `max_parallel_workers` | `6` | Generation executor size; actual hosted request concurrency is also bounded by `llm.rate_limits.max_concurrency` |
703
+ | `batch_size` | `10` | Submission-throttle cadence retained for compatibility; generation uses one rolling executor, not batch barriers |
704
+ | `scan.max_workers` | `8` | Bounded local workers for source reads, parsing, and per-file endpoint detection (`1` forces serial scanning) |
667
705
  | **File filters** | | |
668
706
  | `languages` | `[python, javascript, typescript, go, php, vue]` | Languages to parse |
669
707
  | `include` | `[]` | Glob patterns to include (empty = everything) |
@@ -709,7 +747,7 @@ All chatbot endpoints now share one response contract:
709
747
  - `evidence[]` is the canonical source of right-pane code/config snippets. Each item has an ID like `E1`, `file_path`, `start_line`, `end_line`, and `snippet`.
710
748
  - `references[]` contains generated docs or repo-authored docs. These are read-next links, not implementation proof.
711
749
  - Legacy fields such as `code_citations`, `doc_links`, `code_workspace_citations`, and `file_inventory` are derived for compatibility.
712
- - SQLite FTS, FAISS vectors, symbol chunks, and relationship chunks are candidate retrieval artifacts only. A candidate becomes evidence only after it is hydrated from the source archive/catalog.
750
+ - SQLite FTS, FAISS vectors, symbol chunks, and relationship chunks are candidate retrieval artifacts only. A candidate becomes evidence only after it is hydrated from the content-addressed SQLite source archive/catalog. Existing gzip source archives migrate automatically on the next update.
713
751
  - Generated/internal paths such as `.deepdoc*`, `docs/`, `site/`, and `chatbot_backend/` are excluded from source evidence.
714
752
  - The answer validator rejects invented source paths, `line unknown`, unknown evidence IDs, and docs used as implementation proof. If a retry still fails, the backend returns a conservative answer with diagnostics.
715
753
 
@@ -927,7 +965,7 @@ The defaults work for almost every project. Expand below only when you need to t
927
965
  |-----|---------|-------------|
928
966
  | **General** | | |
929
967
  | `chatbot.enabled` | `false` | Enable chatbot indexing and backend (set automatically by `deepdoc init --with-chatbot`) |
930
- | `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
968
+ | `chatbot.index_dir` | `.deepdoc/chatbot` | Directory for the transactional SQLite source archive/catalog, SQLite lexical index, vector indexes, relationship artifacts, and chunk data |
931
969
  | **Indexing** | | |
932
970
  | `chatbot.indexing.include_repo_docs` | `true` | Index selected repo-authored docs such as README/design notes in a separate corpus |
933
971
  | `chatbot.indexing.include_tests` | `false` | Allow test/example/fixture docs into the repo-doc corpus |
@@ -1205,7 +1243,26 @@ deepdoc clean --yes # Skip confirmation prompt
1205
1243
 
1206
1244
  ## Supported Languages & Frameworks
1207
1245
 
1208
- **Parsing (tree-sitter AST + regex fallback):**
1246
+ > ## Supported Stacks Only
1247
+ >
1248
+ > **Use DeepDoc when your repository is primarily one of these targets:**
1249
+ >
1250
+ > - **Python:** Django, Django REST Framework, Falcon
1251
+ > - **JavaScript / TypeScript:** Express, Fastify, NestJS
1252
+ > - **PHP:** Laravel
1253
+ > - **Go:** conventional HTTP services and supported route helpers
1254
+ > - **Vue:** component and symbol extraction, not a standalone backend route target
1255
+ >
1256
+ > DeepDoc can parse a number of source formats, but parsing is not the same as
1257
+ > full framework support. Endpoint resolution, runtime discovery, call-graph
1258
+ > enrichment, and generated API documentation are only guaranteed for the
1259
+ > supported stacks above. **Do not adopt DeepDoc for FastAPI, Flask, Nuxt, or an
1260
+ > unlisted framework unless you are prepared to extend scanner coverage first.**
1261
+
1262
+ ### Supported Source Parsing
1263
+
1264
+ These file types receive AST/symbol extraction. This alone does not imply
1265
+ framework-level route or runtime coverage.
1209
1266
 
1210
1267
  | Language | Extensions | Extracts |
1211
1268
  |----------|-----------|----------|
@@ -1216,7 +1273,7 @@ deepdoc clean --yes # Skip confirmation prompt
1216
1273
  | PHP | `.php` | Functions, classes, methods, namespaces |
1217
1274
  | Vue | `.vue` | SFC script symbols, props/emits/slots, router/store usage |
1218
1275
 
1219
- **High-confidence framework support (fixture-backed):**
1276
+ ### Supported Framework Targets
1220
1277
 
1221
1278
  | Framework | Language | Proven patterns |
1222
1279
  |-----------|----------|-----------------|
@@ -1224,14 +1281,28 @@ deepdoc clean --yes # Skip confirmation prompt
1224
1281
  | Django / DRF | Python | `path()`, `re_path()`, `@api_view`, `as_view()`, DRF routers, `@action` |
1225
1282
  | Express | JS/TS | Mounted routers via `app.use()`, nested prefixes, chained `route()` calls |
1226
1283
  | Fastify | JS/TS | Plugin `register(..., { prefix })`, shorthand methods, `route({ ... })`, schema hints |
1284
+ | NestJS | JS/TS | Decorator controllers and method routes |
1227
1285
  | Falcon | Python | `app.add_route()`, responder classes, imported resources, app middleware |
1228
- | Vue | Vue SFC | Component detection, `defineProps`, `defineEmits`, `defineModel`, `defineSlots`, router/store signals |
1286
+ | Go services | Go | Conventional HTTP handlers and common route helpers |
1229
1287
 
1230
- **Supported but not headline-high-confidence yet:**
1288
+ ### Parser Coverage, Not A Supported Backend Target
1231
1289
 
1232
1290
  | Framework | Language | Current coverage |
1233
1291
  |-----------|----------|------------------|
1234
- | Gin / Echo / Fiber | Go | Common route helpers (`GET`, `POST`, `HandleFunc`) |
1292
+ | Vue SFC | Vue | Component detection, `defineProps`, `defineEmits`, `defineModel`, `defineSlots`, router/store signals |
1293
+ | Gin / Echo / Fiber | Go | Common route helpers (`GET`, `POST`, `HandleFunc`); validate against your codebase before adoption |
1294
+
1295
+ ### Explicitly Unsupported Scan Targets
1296
+
1297
+ | Framework | Why this matters |
1298
+ |-----------|------------------|
1299
+ | FastAPI | No supported route-resolution or scanner contract |
1300
+ | Flask | No supported route-resolution or scanner contract |
1301
+ | Nuxt | No supported route-resolution or scanner contract |
1302
+
1303
+ If your framework is not listed under **Supported Framework Targets**, treat it
1304
+ as unsupported. Extend `deepdoc/scanner/` and route fixtures before using
1305
+ DeepDoc as the source of truth for that stack.
1235
1306
 
1236
1307
  **Runtime/background surface extraction:**
1237
1308
 
@@ -1,3 +1,3 @@
1
1
  """DeepDoc — Auto-generate beautiful docs from any codebase."""
2
2
 
3
- __version__ = "3.3.1"
3
+ __version__ = "0.5.0"
@@ -57,13 +57,17 @@ class AnswerMixin:
57
57
  current = answer
58
58
  retries = 0
59
59
  while retries < max_retries and self._answer_looks_incomplete(current):
60
- continuation_prompt = (
60
+ instruction = (
61
61
  "The previous answer appears incomplete and ended abruptly. "
62
62
  "Continue from the exact point where it stopped. "
63
63
  "Do not repeat earlier sections. Complete any unfinished bullets, "
64
- "headings, or sentences, and end with `## Summary`.\n\n"
65
- "Previous answer tail:\n"
66
- f"{current[-context_chars:]}"
64
+ "headings, or sentences, and end with `## Summary`."
65
+ )
66
+ fit_continuation = getattr(self.chat_client, "fit_continuation_prompt", None)
67
+ continuation_prompt = (
68
+ fit_continuation(system, instruction, current, context_chars)
69
+ if callable(fit_continuation)
70
+ else instruction + "\n\nPrevious answer tail:\n" + current[-context_chars:]
67
71
  )
68
72
  continuation = self.chat_client.complete(system, continuation_prompt)
69
73
  if not continuation or not continuation.strip():
@@ -182,11 +186,11 @@ class AnswerMixin:
182
186
  if content:
183
187
  history_lines.append(f"{role.title()}: {content}")
184
188
 
185
- sections = [f"Question: {question}"]
189
+ required_sections = [f"Question: {question}"]
186
190
  if history_lines:
187
- sections.append("Conversation:\n" + "\n".join(history_lines))
191
+ required_sections.append("Conversation:\n" + "\n".join(history_lines))
188
192
 
189
- used = sum(len(s) for s in sections)
193
+ used = sum(len(section) for section in required_sections)
190
194
  evidence, _ = self._evidence_from_workspace_rows(
191
195
  self._code_workspace_citations(
192
196
  {
@@ -220,7 +224,7 @@ class AnswerMixin:
220
224
  "do not cite docs as source proof:\n"
221
225
  + "\n\n".join(evidence_blocks)
222
226
  )
223
- sections.append(evidence_text)
227
+ required_sections.append(evidence_text)
224
228
  used += len(evidence_text)
225
229
 
226
230
  sections_by_mode = {
@@ -249,6 +253,7 @@ class AnswerMixin:
249
253
  ("Docs context", doc_hits),
250
254
  ],
251
255
  }
256
+ optional_sections: list[tuple[str, str]] = []
252
257
  for label, hits in sections_by_mode.get(
253
258
  profile.get("query_mode", "general"),
254
259
  [
@@ -268,9 +273,37 @@ class AnswerMixin:
268
273
  parts.append(chunk_text)
269
274
  used += len(chunk_text) + 2 # account for join separator
270
275
  if len(parts) > 1:
271
- sections.append("\n\n".join(parts))
276
+ optional_sections.append((label, "\n\n".join(parts)))
277
+
278
+ required_text = "\n\n".join(required_sections)
279
+ fit_prompt = getattr(self.chat_client, "fit_prompt_sections", None)
280
+ if not callable(fit_prompt):
281
+ return "\n\n".join(
282
+ [required_text, *(text for _, text in optional_sections)]
283
+ )
284
+
285
+ def _render(sections: dict[str, str]) -> str:
286
+ return "\n\n".join(
287
+ [
288
+ sections["required"],
289
+ *(
290
+ sections.get(f"optional_{index}", "")
291
+ for index, _ in enumerate(optional_sections)
292
+ ),
293
+ ]
294
+ ).strip()
272
295
 
273
- return "\n\n".join(sections)
296
+ fitted = fit_prompt(
297
+ system=self._system_prompt(),
298
+ render_prompt=_render,
299
+ required_sections={"required": required_text},
300
+ optional_sections=[
301
+ (f"optional_{index}", [text])
302
+ for index, (_, text) in enumerate(optional_sections)
303
+ ],
304
+ step_name="chatbot answer",
305
+ )
306
+ return fitted.prompt
274
307
 
275
308
  def _system_prompt(self) -> str:
276
309
  return (
@@ -334,6 +367,7 @@ class AnswerMixin:
334
367
  original_prompt,
335
368
  response,
336
369
  errors,
370
+ system_prompt=system_prompt,
337
371
  )
338
372
  corrected = self.chat_client.complete(system_prompt, correction_prompt)
339
373
  if corrected and corrected.strip():
@@ -911,6 +945,8 @@ class AnswerMixin:
911
945
  original_prompt: str,
912
946
  response: dict[str, Any],
913
947
  errors: list[str],
948
+ *,
949
+ system_prompt: str = "",
914
950
  ) -> str:
915
951
  evidence_blocks = []
916
952
  for item in response.get("evidence", []) or []:
@@ -927,7 +963,7 @@ class AnswerMixin:
927
963
  f"- {item.get('kind')}: {item.get('path')} ({item.get('title') or item.get('url') or ''})"
928
964
  for item in response.get("references", []) or []
929
965
  ]
930
- return (
966
+ required_prompt = (
931
967
  "Your previous answer failed evidence validation.\n\n"
932
968
  f"Question: {question}\n\n"
933
969
  "Validation errors:\n"
@@ -942,10 +978,31 @@ class AnswerMixin:
942
978
  + ("\n\n".join(evidence_blocks) if evidence_blocks else "(none)")
943
979
  + "\n\nReference-only docs:\n"
944
980
  + ("\n".join(references) if references else "(none)")
945
- + "\n\nOriginal retrieval prompt:\n"
946
- + original_prompt
947
- + "\n\nReturn only the corrected answer."
948
981
  )
982
+ fit_prompt = getattr(self.chat_client, "fit_prompt_sections", None)
983
+ if not callable(fit_prompt):
984
+ return (
985
+ required_prompt
986
+ + "\n\nOriginal retrieval prompt:\n"
987
+ + original_prompt
988
+ + "\n\nReturn only the corrected answer."
989
+ )
990
+
991
+ def _render(sections: dict[str, str]) -> str:
992
+ return (
993
+ sections["required"]
994
+ + "\n\nOriginal retrieval prompt:\n"
995
+ + sections.get("original", "")
996
+ + "\n\nReturn only the corrected answer."
997
+ )
998
+
999
+ return fit_prompt(
1000
+ system=system_prompt or self._system_prompt(),
1001
+ render_prompt=_render,
1002
+ required_sections={"required": required_prompt},
1003
+ optional_sections=[("original", [original_prompt])],
1004
+ step_name="chatbot evidence correction",
1005
+ ).prompt
949
1006
 
950
1007
  def _conservative_grounded_answer(
951
1008
  self,
@@ -68,8 +68,6 @@ IGNORED_PARTS = {
68
68
  "coverage",
69
69
  }
70
70
 
71
- # Safe limit for text-embedding-3-small (8,192 token limit ≈ 6,000 chars for code)
72
- MAX_CHUNK_CHARS = 6000
73
71
  EMPTY_LINK_INFO = LinkInfo()
74
72
 
75
73
 
@@ -474,11 +472,6 @@ def _format_code_chunk_text(
474
472
  parts.append("")
475
473
  parts.append(snippet.strip())
476
474
  result = "\n".join(parts).strip()
477
- if len(result) > MAX_CHUNK_CHARS:
478
- # Truncate the snippet portion to stay within embedding model limits
479
- header = result[: result.index("\n\n") + 2] if "\n\n" in result else ""
480
- budget = MAX_CHUNK_CHARS - len(header) - 20 # room for truncation marker
481
- result = header + snippet.strip()[:budget] + "\n... [truncated]"
482
475
  return result
483
476
 
484
477
 
@@ -651,11 +644,7 @@ def build_artifact_chunks(
651
644
  for start_line, end_line, section_name in windows:
652
645
  snippet = "\n".join(lines[start_line - 1 : end_line])
653
646
  header = f"Artifact: {rel_path}\nType: {artifact_type}\nSection: {section_name}\nLines: {start_line}-{end_line}\n\n"
654
- body = snippet.strip()
655
- if len(header) + len(body) > MAX_CHUNK_CHARS:
656
- budget = MAX_CHUNK_CHARS - len(header) - 20
657
- body = body[:budget] + "\n... [truncated]"
658
- text = (header + body).strip()
647
+ text = (header + snippet.strip()).strip()
659
648
  chunk_hash = _hash_text(text)
660
649
  chunks.append(
661
650
  ChunkRecord(
@@ -879,9 +868,6 @@ def build_relationship_chunks(
879
868
  f"{Path(rel_path).name} defines {len(parsed.symbols)} symbols:\n"
880
869
  + "\n".join(symbol_lines)
881
870
  )
882
- # Respect embedding limits
883
- if len(text) > MAX_CHUNK_CHARS:
884
- text = text[: MAX_CHUNK_CHARS - 20] + "\n... [truncated]"
885
871
  chunk_hash = _hash_text(text)
886
872
  chunks.append(
887
873
  ChunkRecord(