kingmadoc 0.3.0.dev15__tar.gz → 0.3.0.dev17__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 (194) hide show
  1. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/PKG-INFO +1 -1
  2. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/examples/verify-mode-plan.md +22 -3
  3. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/SKILL.md +4 -3
  4. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/codex.md +88 -7
  5. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/copilot.md +88 -7
  6. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/cursor.md +88 -7
  7. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/SKILL.md +2 -1
  8. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/reference/diagram-rules.md +67 -3
  9. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/reference/formats.md +17 -1
  10. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/config.py +8 -2
  11. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/plan/generator.py +6 -0
  12. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templates/plan_default.md.j2 +20 -0
  13. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/.featuredoc.yml +0 -0
  14. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  15. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  16. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/.github/workflows/ci.yml +0 -0
  17. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/.github/workflows/release.yml +0 -0
  18. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/.gitignore +0 -0
  19. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/CHANGELOG.md +0 -0
  20. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/CLAUDE.md +0 -0
  21. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/CONTRIBUTING.md +0 -0
  22. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/LICENSE +0 -0
  23. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/README.md +0 -0
  24. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/docs/conventions.md +0 -0
  25. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/docs/index.md +0 -0
  26. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/docs/releasing.md +0 -0
  27. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/docs/roadmap.md +0 -0
  28. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/docs/test-plan.md +0 -0
  29. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/README.md +0 -0
  30. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/manage.py +0 -0
  31. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/requirements.txt +0 -0
  32. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/shop/__init__.py +0 -0
  33. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/shop/models.py +0 -0
  34. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/shop/services.py +0 -0
  35. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/shop/settings.py +0 -0
  36. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/shop/urls.py +0 -0
  37. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop/shop/views.py +0 -0
  38. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop-discount/shop/discounts.py +0 -0
  39. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/fixtures/shop-discount/shop/services.py +0 -0
  40. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/results/2026-09-27T111837Z.json +0 -0
  41. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/results/2026-09-27T112600Z.json +0 -0
  42. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/results/2026-09-27T162715Z.json +0 -0
  43. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/results/2026-09-28T064505Z.json +0 -0
  44. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/results/2026-09-28T092643Z.json +0 -0
  45. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/results/2026-09-28T093046Z.json +0 -0
  46. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/scenarios/explain-branch.yml +0 -0
  47. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/scenarios/explain-feature.yml +0 -0
  48. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/scenarios/explain-fo-to.yml +0 -0
  49. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/evals/scenarios/plan-feature.yml +0 -0
  50. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/pyproject.toml +0 -0
  51. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/scripts/build_skill_variants.py +0 -0
  52. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/scripts/build_threat_reference.py +0 -0
  53. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/scripts/import_tmt_knowledge_base.py +0 -0
  54. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/scripts/run_evals.py +0 -0
  55. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/arc42.md +0 -0
  56. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/c4-model.md +0 -0
  57. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/c4.md +0 -0
  58. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/models.md +0 -0
  59. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/split.md +0 -0
  60. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/stories.md +0 -0
  61. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/threat-model.md +0 -0
  62. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/skill/explaining-code/reference/threats.md +0 -0
  63. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/__init__.py +0 -0
  64. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/about.py +0 -0
  65. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/adr.py +0 -0
  66. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/cli.py +0 -0
  67. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/d2_binary.py +0 -0
  68. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/diagrams/__init__.py +0 -0
  69. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/diagrams/base.py +0 -0
  70. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/diagrams/d2.py +0 -0
  71. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/diagrams/mermaid.py +0 -0
  72. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/diagrams/plantuml.py +0 -0
  73. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/documents.py +0 -0
  74. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/exceptions.py +0 -0
  75. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/explain.py +0 -0
  76. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/__init__.py +0 -0
  77. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/branch.py +0 -0
  78. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/collect.py +0 -0
  79. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/data_model.py +0 -0
  80. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/dominators.py +0 -0
  81. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/js_modules.py +0 -0
  82. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/projects.py +0 -0
  83. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/routes.py +0 -0
  84. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/facts/services.py +0 -0
  85. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/git.py +0 -0
  86. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/naming.py +0 -0
  87. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/plan/__init__.py +0 -0
  88. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/plan/analyzer.py +0 -0
  89. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/plan/dependencies.py +0 -0
  90. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/plan/models.py +0 -0
  91. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/plandoc.py +0 -0
  92. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/raster.py +0 -0
  93. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/render.py +0 -0
  94. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/scaffold.py +0 -0
  95. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/screenshots.py +0 -0
  96. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/skills.py +0 -0
  97. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templates/adr.md.j2 +0 -0
  98. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templates/domain_design.md.j2 +0 -0
  99. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templates/functional_design.md.j2 +0 -0
  100. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templates/security_design.md.j2 +0 -0
  101. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templates/technical_design.md.j2 +0 -0
  102. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/templating.py +0 -0
  103. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/threats/__init__.py +0 -0
  104. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/threats/filters.py +0 -0
  105. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/threats/knowledge_base.py +0 -0
  106. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/threats/model.py +0 -0
  107. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/threats/report.py +0 -0
  108. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/threats/sdl_knowledge_base.json +0 -0
  109. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/verify/__init__.py +0 -0
  110. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/verify/changes.py +0 -0
  111. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/verify/commands.py +0 -0
  112. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/verify/deviations.py +0 -0
  113. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/verify/locate.py +0 -0
  114. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/verify/report.py +0 -0
  115. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/src/kingmadoc/vscode.py +0 -0
  116. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/conftest.py +0 -0
  117. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/data/d2-sample.svg +0 -0
  118. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/d2/class.d2 +0 -0
  119. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/d2/component.d2 +0 -0
  120. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/d2/container.d2 +0 -0
  121. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/d2/context.d2 +0 -0
  122. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/d2/sequence.d2 +0 -0
  123. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/mermaid/class.mmd +0 -0
  124. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/mermaid/component.mmd +0 -0
  125. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/mermaid/container.mmd +0 -0
  126. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/mermaid/context.mmd +0 -0
  127. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/mermaid/sequence.mmd +0 -0
  128. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/plantuml/class.puml +0 -0
  129. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/plantuml/component.puml +0 -0
  130. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/plantuml/container.puml +0 -0
  131. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/plantuml/context.puml +0 -0
  132. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/backends/plantuml/sequence.puml +0 -0
  133. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/mermaid/component.mmd +0 -0
  134. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/mermaid/container.mmd +0 -0
  135. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/fixtures/mermaid/context.mmd +0 -0
  136. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_adr.py +0 -0
  137. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_adr_numbering.py +0 -0
  138. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_analyzer.py +0 -0
  139. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_cli.py +0 -0
  140. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_cli_encoding.py +0 -0
  141. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_cli_init.py +0 -0
  142. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_cli_plan_custom_template.py +0 -0
  143. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_cli_sigint.py +0 -0
  144. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_cli_verify_config.py +0 -0
  145. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_config.py +0 -0
  146. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_config_poetry.py +0 -0
  147. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_config_shape.py +0 -0
  148. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_d2_download.py +0 -0
  149. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_dependencies.py +0 -0
  150. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_dependency_graph_model.py +0 -0
  151. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_design_diagrams_compile.py +0 -0
  152. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_design_models.py +0 -0
  153. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_diagram_backends.py +0 -0
  154. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_diagrams_mermaid.py +0 -0
  155. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_documents.py +0 -0
  156. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_duplicate_names.py +0 -0
  157. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_evals.py +0 -0
  158. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_explain.py +0 -0
  159. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_explain_check.py +0 -0
  160. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_explain_config.py +0 -0
  161. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_explain_status.py +0 -0
  162. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_extra_designs_coverage.py +0 -0
  163. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_facts.py +0 -0
  164. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_facts_code.py +0 -0
  165. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_facts_data_model.py +0 -0
  166. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_facts_dominators.py +0 -0
  167. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_functional_design.py +0 -0
  168. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_generator.py +0 -0
  169. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_grep_performance.py +0 -0
  170. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_manifests.py +0 -0
  171. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_max_lines_per_file.py +0 -0
  172. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_output_dir.py +0 -0
  173. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_plan_e2e.py +0 -0
  174. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_plandoc.py +0 -0
  175. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_properties.py +0 -0
  176. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_raster.py +0 -0
  177. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_render.py +0 -0
  178. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_scaffold.py +0 -0
  179. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_screenshots.py +0 -0
  180. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_security_domain_designs.py +0 -0
  181. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_skill.py +0 -0
  182. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_skill_explaining_code.py +0 -0
  183. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_skill_models.py +0 -0
  184. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_skills_install.py +0 -0
  185. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_source_dirs.py +0 -0
  186. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_summary_slug_diagram_defaults.py +0 -0
  187. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_technical_design.py +0 -0
  188. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_templating_security.py +0 -0
  189. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_threats.py +0 -0
  190. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_verify.py +0 -0
  191. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_verify_locate.py +0 -0
  192. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_version.py +0 -0
  193. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/tests/test_vscode_preview.py +0 -0
  194. {kingmadoc-0.3.0.dev15 → kingmadoc-0.3.0.dev17}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: kingmadoc
3
- Version: 0.3.0.dev15
3
+ Version: 0.3.0.dev17
4
4
  Summary: Feature docs for AI coding agents: a plan with C4 diagrams before the code, a verification doc after.
5
5
  Project-URL: Homepage, https://github.com/ATkingma/KingmaDoc
6
6
  Project-URL: Issues, https://github.com/ATkingma/KingmaDoc/issues
@@ -11,7 +11,7 @@ files_expected: ["src/kingmadoc/cli.py", "src/kingmadoc/verify"]
11
11
  |---|---|
12
12
  | **Project** | KingmaDoc |
13
13
  | **Status** | Draft |
14
- | **Generated** | 2026-09-28T10:44+00:00 by KingmaDoc 0.1.0.dev50 |
14
+ | **Generated** | 2026-09-28T12:54+00:00 by KingmaDoc 0.1.0.dev50 |
15
15
 
16
16
  > Generated before implementation. Fill in every _TODO_ and review everything marked
17
17
  > _(inferred)_: it comes from the codebase analysis and is a starting point, not the truth.
@@ -97,6 +97,18 @@ _Disabled in `.featuredoc.yml` (`diagrams`)._
97
97
 
98
98
  _Disabled in `.featuredoc.yml` (`diagrams`)._
99
99
 
100
+ ## Data flow diagram (Mermaid)
101
+
102
+ Where the feature's data comes from, what transforms it and where it is stored.
103
+
104
+ _Disabled in `.featuredoc.yml` (`diagrams`)._
105
+
106
+ ## State diagram (Mermaid)
107
+
108
+ The states of the object whose lifecycle the feature changes.
109
+
110
+ _Disabled in `.featuredoc.yml` (`diagrams`)._
111
+
100
112
  ## Open questions
101
113
 
102
114
  - [ ] _TODO: anything else that must be decided before implementation._
@@ -121,12 +133,12 @@ _Disabled in `.featuredoc.yml` (`diagrams`)._
121
133
  | python | 113 |
122
134
  | markdown | 28 |
123
135
  | jinja | 6 |
136
+ | json | 4 |
124
137
  | yaml | 3 |
125
- | json | 2 |
126
138
  | toml | 1 |
127
139
 
128
140
  <details>
129
- <summary>File tree (230 files)</summary>
141
+ <summary>File tree (236 files)</summary>
130
142
 
131
143
  ```text
132
144
  KingmaDoc/
@@ -149,6 +161,7 @@ KingmaDoc/
149
161
  │ │ ├── 0b0dfdcede5596e1
150
162
  │ │ ├── 1b81a71a7607fbf6
151
163
  │ │ ├── 2003bed8cb6acdf2
164
+ │ │ ├── 27972aa85104d731
152
165
  │ │ ├── 2e00d1a2bca2c453
153
166
  │ │ ├── 390efa9697d4e1bf
154
167
  │ │ ├── 429e7d227d43fa43
@@ -189,6 +202,7 @@ KingmaDoc/
189
202
  │ │ ├── c7c62939844fec2e
190
203
  │ │ ├── cc4dfad2dc9d75e2
191
204
  │ │ ├── cd82d38bc12deabd
205
+ │ │ ├── d1d54a4302c7359c
192
206
  │ │ ├── d6e5d66b09a82b49
193
207
  │ │ ├── da39a3ee5e6b4b0d
194
208
  │ │ ├── e36626a891f1bf04
@@ -200,6 +214,11 @@ KingmaDoc/
200
214
  │ │ └── 14.0.0/
201
215
  │ │ └── …
202
216
  │ └── .gitignore
217
+ ├── .import_linter_cache/
218
+ │ ├── .gitignore
219
+ │ ├── 3516dc116b537972f63cac11b7ceb5fffe116986.data.json
220
+ │ ├── CACHEDIR.TAG
221
+ │ └── kingmadoc.meta.json
203
222
  ├── docs/
204
223
  │ ├── conventions.md
205
224
  │ ├── index.md
@@ -52,8 +52,8 @@ brackets); ignore the file if it is absent:
52
52
  - `analyzer.exclude_dirs` [`.git`, `node_modules`, `.venv`, `venv`, `__pycache__`,
53
53
  `dist`, `build`, `*.egg-info`, tool caches], `analyzer.max_files` [`5000`],
54
54
  `analyzer.tree_depth` [`3`].
55
- - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`]: which sections get
56
- a diagram.
55
+ - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`, `data_flow`, `state`]:
56
+ which sections get a diagram.
57
57
  - `diagrams_png` [`embed`]: `embed`, `file` or `off`; see
58
58
  [Rendering](reference/diagram-rules.md#rendering).
59
59
  - `language` [`en`]: language of fixed sentences, notes and captions (headings stay English).
@@ -145,7 +145,8 @@ the diagrams, but never beyond what the user said or the code shows.
145
145
  vague REQ or invented ones. Under each: `Verified by: <test, test case or command>`
146
146
  (or `_TODO_`).
147
147
  - **Planned changes**: per `files_expected` path what changes and why (the "how" of
148
- answer 4), one to three lines, no code blocks. Risks and assumptions may add code
148
+ answer 4), one to three lines, no code blocks; where a code snippet would help
149
+ (a new method, a changed signature), draw a small `classDiagram` with just those members. Risks and assumptions may add code
149
150
  findings marked _(inferred)_.
150
151
  - **Generated**: the real system time (`date -Iminutes`).
151
152
  - External systems: those from answer 3, plus systems the code demonstrably uses
@@ -52,8 +52,8 @@ brackets); ignore the file if it is absent:
52
52
  - `analyzer.exclude_dirs` [`.git`, `node_modules`, `.venv`, `venv`, `__pycache__`,
53
53
  `dist`, `build`, `*.egg-info`, tool caches], `analyzer.max_files` [`5000`],
54
54
  `analyzer.tree_depth` [`3`].
55
- - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`]: which sections get
56
- a diagram.
55
+ - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`, `data_flow`, `state`]:
56
+ which sections get a diagram.
57
57
  - `diagrams_png` [`embed`]: `embed`, `file` or `off`; see
58
58
  [Rendering](#rendering).
59
59
  - `language` [`en`]: language of fixed sentences, notes and captions (headings stay English).
@@ -145,7 +145,8 @@ the diagrams, but never beyond what the user said or the code shows.
145
145
  vague REQ or invented ones. Under each: `Verified by: <test, test case or command>`
146
146
  (or `_TODO_`).
147
147
  - **Planned changes**: per `files_expected` path what changes and why (the "how" of
148
- answer 4), one to three lines, no code blocks. Risks and assumptions may add code
148
+ answer 4), one to three lines, no code blocks; where a code snippet would help
149
+ (a new method, a changed signature), draw a small `classDiagram` with just those members. Risks and assumptions may add code
149
150
  findings marked _(inferred)_.
150
151
  - **Generated**: the real system time (`date -Iminutes`).
151
152
  - External systems: those from answer 3, plus systems the code demonstrably uses
@@ -238,7 +239,7 @@ Show the user the path, the number of deviations, and any failing check.
238
239
  - **Always labeled**:
239
240
  - C4 and `sequenceDiagram`: the first line after the diagram type is `title <text>`
240
241
  (`System Context: <project>`, `Containers: <project>`);
241
- - `classDiagram`, `erDiagram` and `flowchart` have no `title` line; put frontmatter
242
+ - `classDiagram`, `erDiagram`, `flowchart` and `stateDiagram-v2` have no `title` line; put frontmatter
242
243
  before the diagram type instead: `---`, `title: "<text>"`, `---` (quote the
243
244
  title: an unquoted `:` breaks the YAML and the render);
244
245
  - every element has a quoted label: `Person(alias, "Label", "Description")`,
@@ -284,10 +285,73 @@ C4Context
284
285
  Rel(shop, sendgrid, "Sends email via")
285
286
  ```
286
287
 
287
- `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`]
288
+ `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`,
289
+ `data_flow`, `state`]
288
290
  selects the diagrams. If one is disabled, keep its section and replace the diagram with
289
291
  this line: _Disabled in `.featuredoc.yml` (`diagrams`)._
290
292
 
293
+ ## Data flow diagram
294
+
295
+ Yourdon/DeMarco style (Gane-Sarson draws the same with other shapes) as a `flowchart LR`:
296
+
297
+ - **External entity** (person or system outside the scope): rectangle `user[User]`.
298
+ - **Process** (transforms data): circle with a number and a verb phrase,
299
+ `p1((1. Validate order))`.
300
+ - **Data store** (data at rest): `d1[("D1 Orders")]`, named with a noun, numbered `D1`.
301
+ - **Data flow**: an arrow labelled with the **data** (a noun: `order`, `invoice`), never an
302
+ action; every arrow has a label.
303
+ - Rules: every flow starts or ends at a process (never entity → entity, entity → store
304
+ or store → store); every process has at least one input and one output (no black
305
+ holes, no miracles) and its output can be made from its input (no grey holes); a
306
+ store is both written and read somewhere, or it is outside the feature; no control
307
+ flow, loops or decisions (that is the sequence or state diagram).
308
+ - **Levels**: the Context diagram is level 0; this is level 1 for the feature. The flows
309
+ in and out must balance with the Context diagram (same external systems, same data).
310
+ - Mark new or changed processes and flows _(inferred)_ or from the answers, as usual.
311
+
312
+ ```mermaid
313
+ ---
314
+ title: "Data flow: place order"
315
+ ---
316
+ flowchart LR
317
+ user[Customer] -- order --> p1((1. Validate order))
318
+ p1 -- valid order --> p2((2. Store order))
319
+ p2 -- order --> d1[("D1 Orders")]
320
+ p2 -- confirmation --> user
321
+ ```
322
+
323
+ ## State diagram
324
+
325
+ UML 2 state machine as `stateDiagram-v2`, for the one object whose lifecycle the feature
326
+ changes (an order, a job, a document):
327
+
328
+ - **States** are conditions, named with an adjective or past participle (`Draft`,
329
+ `Paid`, `Cancelled`), never an action (`Pay`).
330
+ - One initial `[*] --> <state>` (unlabelled); final `<state> --> [*]` only where the
331
+ object's life really ends.
332
+ - **Transitions**: `A --> B : event [guard] / action`; event, guard and action are each
333
+ optional, but every transition has at least the event. Guards leaving the same state
334
+ on the same event must not overlap; use `state check <<choice>>` for a decision.
335
+ - Every state is reachable from the initial state, and every non-final state has a way
336
+ out (no dead ends unless intended).
337
+ - Composite states (`state Active { … }`) only when they remove repeated transitions;
338
+ keep it to about ten states.
339
+ - New states and transitions from the answers or "Planned changes"; existing ones from
340
+ the code are _(inferred)_.
341
+
342
+ ```mermaid
343
+ ---
344
+ title: "States: Order"
345
+ ---
346
+ stateDiagram-v2
347
+ [*] --> Draft
348
+ Draft --> Placed : submit [cart not empty]
349
+ Placed --> Paid : payment received / send receipt
350
+ Placed --> Cancelled : cancel
351
+ Paid --> [*]
352
+ Cancelled --> [*]
353
+ ```
354
+
291
355
  ## Rendering
292
356
 
293
357
  `diagrams_png` in `.featuredoc.yml` [`embed`]: `embed` (below), `file` (the PNG goes to
@@ -305,7 +369,8 @@ or `off` (no image; the ` ```mermaid ` block stays in the document).
305
369
  `<output_dir>/diagrams/<slug>-<diagram>.mmd`.
306
370
 
307
371
  1. Write each diagram to `<output_dir>/diagrams/<slug>-<diagram>.mmd` (`<diagram>`:
308
- `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`) and run:
372
+ `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`,
373
+ `data-flow`, `state`) and run:
309
374
  `npx -y @mermaid-js/mermaid-cli -i <that>.mmd -o <tmp>.png -s 2 -b white -t default -p <puppeteer.json>`
310
375
  (`-t default`: Mermaid's normal theme; newer versions otherwise colour every shape).
311
376
  2. Set `PUPPETEER_SKIP_DOWNLOAD=true`, and let `puppeteer.json` point at an installed
@@ -373,7 +438,8 @@ files_expected: [<existing files or folders the user said will change>]
373
438
  ## Planned changes
374
439
 
375
440
  - `<path from files_expected>`: <what changes and why, one to three lines, no code
376
- blocks; the "how" from answer 4, or> _TODO: what changes here and why._
441
+ blocks (a small classDiagram with the changed members instead of a snippet); the "how"
442
+ from answer 4, or> _TODO: what changes here and why._
377
443
 
378
444
  ## Requirements
379
445
 
@@ -421,6 +487,18 @@ The classes this feature touches and their direct collaborators.
421
487
 
422
488
  <sequenceDiagram of the flow after the change>
423
489
 
490
+ ## Data flow diagram (Mermaid)
491
+
492
+ Where the feature's data comes from, what transforms it and where it is stored.
493
+
494
+ <flowchart DFD, or _Not applicable: <reason>._>
495
+
496
+ ## State diagram (Mermaid)
497
+
498
+ The states of <the object whose lifecycle the feature changes>.
499
+
500
+ <stateDiagram-v2, or _Not applicable: <reason>._>
501
+
424
502
  ## Open questions
425
503
 
426
504
  - [ ] <each unanswered clarifying question>
@@ -468,6 +546,9 @@ Omit "**Answered while planning**" when nothing was answered.
468
546
  result, with real classes as participants and real method names as messages;
469
547
  `activate`/`deactivate` for nested calls, `alt`/`opt` for branches. In **Current**,
470
548
  a `Note` marks where it goes wrong.
549
+ - **Data flow diagram** and **State diagram**: rules in
550
+ [diagram-rules.md](diagram-rules.md#data-flow-diagram); _Not applicable: <reason>._ when
551
+ the feature moves no data between parts, or has no object with a lifecycle.
471
552
  - **Open changes**: when an uncommitted change or stash touches the feature, also list
472
553
  it under Open questions.
473
554
  - `language` in `.featuredoc.yml` [`en`]: headings stay English (the CLI's), but fixed
@@ -52,8 +52,8 @@ brackets); ignore the file if it is absent:
52
52
  - `analyzer.exclude_dirs` [`.git`, `node_modules`, `.venv`, `venv`, `__pycache__`,
53
53
  `dist`, `build`, `*.egg-info`, tool caches], `analyzer.max_files` [`5000`],
54
54
  `analyzer.tree_depth` [`3`].
55
- - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`]: which sections get
56
- a diagram.
55
+ - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`, `data_flow`, `state`]:
56
+ which sections get a diagram.
57
57
  - `diagrams_png` [`embed`]: `embed`, `file` or `off`; see
58
58
  [Rendering](#rendering).
59
59
  - `language` [`en`]: language of fixed sentences, notes and captions (headings stay English).
@@ -145,7 +145,8 @@ the diagrams, but never beyond what the user said or the code shows.
145
145
  vague REQ or invented ones. Under each: `Verified by: <test, test case or command>`
146
146
  (or `_TODO_`).
147
147
  - **Planned changes**: per `files_expected` path what changes and why (the "how" of
148
- answer 4), one to three lines, no code blocks. Risks and assumptions may add code
148
+ answer 4), one to three lines, no code blocks; where a code snippet would help
149
+ (a new method, a changed signature), draw a small `classDiagram` with just those members. Risks and assumptions may add code
149
150
  findings marked _(inferred)_.
150
151
  - **Generated**: the real system time (`date -Iminutes`).
151
152
  - External systems: those from answer 3, plus systems the code demonstrably uses
@@ -238,7 +239,7 @@ Show the user the path, the number of deviations, and any failing check.
238
239
  - **Always labeled**:
239
240
  - C4 and `sequenceDiagram`: the first line after the diagram type is `title <text>`
240
241
  (`System Context: <project>`, `Containers: <project>`);
241
- - `classDiagram`, `erDiagram` and `flowchart` have no `title` line; put frontmatter
242
+ - `classDiagram`, `erDiagram`, `flowchart` and `stateDiagram-v2` have no `title` line; put frontmatter
242
243
  before the diagram type instead: `---`, `title: "<text>"`, `---` (quote the
243
244
  title: an unquoted `:` breaks the YAML and the render);
244
245
  - every element has a quoted label: `Person(alias, "Label", "Description")`,
@@ -284,10 +285,73 @@ C4Context
284
285
  Rel(shop, sendgrid, "Sends email via")
285
286
  ```
286
287
 
287
- `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`]
288
+ `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`,
289
+ `data_flow`, `state`]
288
290
  selects the diagrams. If one is disabled, keep its section and replace the diagram with
289
291
  this line: _Disabled in `.featuredoc.yml` (`diagrams`)._
290
292
 
293
+ ## Data flow diagram
294
+
295
+ Yourdon/DeMarco style (Gane-Sarson draws the same with other shapes) as a `flowchart LR`:
296
+
297
+ - **External entity** (person or system outside the scope): rectangle `user[User]`.
298
+ - **Process** (transforms data): circle with a number and a verb phrase,
299
+ `p1((1. Validate order))`.
300
+ - **Data store** (data at rest): `d1[("D1 Orders")]`, named with a noun, numbered `D1`.
301
+ - **Data flow**: an arrow labelled with the **data** (a noun: `order`, `invoice`), never an
302
+ action; every arrow has a label.
303
+ - Rules: every flow starts or ends at a process (never entity → entity, entity → store
304
+ or store → store); every process has at least one input and one output (no black
305
+ holes, no miracles) and its output can be made from its input (no grey holes); a
306
+ store is both written and read somewhere, or it is outside the feature; no control
307
+ flow, loops or decisions (that is the sequence or state diagram).
308
+ - **Levels**: the Context diagram is level 0; this is level 1 for the feature. The flows
309
+ in and out must balance with the Context diagram (same external systems, same data).
310
+ - Mark new or changed processes and flows _(inferred)_ or from the answers, as usual.
311
+
312
+ ```mermaid
313
+ ---
314
+ title: "Data flow: place order"
315
+ ---
316
+ flowchart LR
317
+ user[Customer] -- order --> p1((1. Validate order))
318
+ p1 -- valid order --> p2((2. Store order))
319
+ p2 -- order --> d1[("D1 Orders")]
320
+ p2 -- confirmation --> user
321
+ ```
322
+
323
+ ## State diagram
324
+
325
+ UML 2 state machine as `stateDiagram-v2`, for the one object whose lifecycle the feature
326
+ changes (an order, a job, a document):
327
+
328
+ - **States** are conditions, named with an adjective or past participle (`Draft`,
329
+ `Paid`, `Cancelled`), never an action (`Pay`).
330
+ - One initial `[*] --> <state>` (unlabelled); final `<state> --> [*]` only where the
331
+ object's life really ends.
332
+ - **Transitions**: `A --> B : event [guard] / action`; event, guard and action are each
333
+ optional, but every transition has at least the event. Guards leaving the same state
334
+ on the same event must not overlap; use `state check <<choice>>` for a decision.
335
+ - Every state is reachable from the initial state, and every non-final state has a way
336
+ out (no dead ends unless intended).
337
+ - Composite states (`state Active { … }`) only when they remove repeated transitions;
338
+ keep it to about ten states.
339
+ - New states and transitions from the answers or "Planned changes"; existing ones from
340
+ the code are _(inferred)_.
341
+
342
+ ```mermaid
343
+ ---
344
+ title: "States: Order"
345
+ ---
346
+ stateDiagram-v2
347
+ [*] --> Draft
348
+ Draft --> Placed : submit [cart not empty]
349
+ Placed --> Paid : payment received / send receipt
350
+ Placed --> Cancelled : cancel
351
+ Paid --> [*]
352
+ Cancelled --> [*]
353
+ ```
354
+
291
355
  ## Rendering
292
356
 
293
357
  `diagrams_png` in `.featuredoc.yml` [`embed`]: `embed` (below), `file` (the PNG goes to
@@ -305,7 +369,8 @@ or `off` (no image; the ` ```mermaid ` block stays in the document).
305
369
  `<output_dir>/diagrams/<slug>-<diagram>.mmd`.
306
370
 
307
371
  1. Write each diagram to `<output_dir>/diagrams/<slug>-<diagram>.mmd` (`<diagram>`:
308
- `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`) and run:
372
+ `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`,
373
+ `data-flow`, `state`) and run:
309
374
  `npx -y @mermaid-js/mermaid-cli -i <that>.mmd -o <tmp>.png -s 2 -b white -t default -p <puppeteer.json>`
310
375
  (`-t default`: Mermaid's normal theme; newer versions otherwise colour every shape).
311
376
  2. Set `PUPPETEER_SKIP_DOWNLOAD=true`, and let `puppeteer.json` point at an installed
@@ -373,7 +438,8 @@ files_expected: [<existing files or folders the user said will change>]
373
438
  ## Planned changes
374
439
 
375
440
  - `<path from files_expected>`: <what changes and why, one to three lines, no code
376
- blocks; the "how" from answer 4, or> _TODO: what changes here and why._
441
+ blocks (a small classDiagram with the changed members instead of a snippet); the "how"
442
+ from answer 4, or> _TODO: what changes here and why._
377
443
 
378
444
  ## Requirements
379
445
 
@@ -421,6 +487,18 @@ The classes this feature touches and their direct collaborators.
421
487
 
422
488
  <sequenceDiagram of the flow after the change>
423
489
 
490
+ ## Data flow diagram (Mermaid)
491
+
492
+ Where the feature's data comes from, what transforms it and where it is stored.
493
+
494
+ <flowchart DFD, or _Not applicable: <reason>._>
495
+
496
+ ## State diagram (Mermaid)
497
+
498
+ The states of <the object whose lifecycle the feature changes>.
499
+
500
+ <stateDiagram-v2, or _Not applicable: <reason>._>
501
+
424
502
  ## Open questions
425
503
 
426
504
  - [ ] <each unanswered clarifying question>
@@ -468,6 +546,9 @@ Omit "**Answered while planning**" when nothing was answered.
468
546
  result, with real classes as participants and real method names as messages;
469
547
  `activate`/`deactivate` for nested calls, `alt`/`opt` for branches. In **Current**,
470
548
  a `Note` marks where it goes wrong.
549
+ - **Data flow diagram** and **State diagram**: rules in
550
+ [diagram-rules.md](diagram-rules.md#data-flow-diagram); _Not applicable: <reason>._ when
551
+ the feature moves no data between parts, or has no object with a lifecycle.
471
552
  - **Open changes**: when an uncommitted change or stash touches the feature, also list
472
553
  it under Open questions.
473
554
  - `language` in `.featuredoc.yml` [`en`]: headings stay English (the CLI's), but fixed
@@ -53,8 +53,8 @@ brackets); ignore the file if it is absent:
53
53
  - `analyzer.exclude_dirs` [`.git`, `node_modules`, `.venv`, `venv`, `__pycache__`,
54
54
  `dist`, `build`, `*.egg-info`, tool caches], `analyzer.max_files` [`5000`],
55
55
  `analyzer.tree_depth` [`3`].
56
- - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`]: which sections get
57
- a diagram.
56
+ - `diagrams` [`c4_context`, `c4_container`, `class`, `sequence`, `data_flow`, `state`]:
57
+ which sections get a diagram.
58
58
  - `diagrams_png` [`embed`]: `embed`, `file` or `off`; see
59
59
  [Rendering](#rendering).
60
60
  - `language` [`en`]: language of fixed sentences, notes and captions (headings stay English).
@@ -146,7 +146,8 @@ the diagrams, but never beyond what the user said or the code shows.
146
146
  vague REQ or invented ones. Under each: `Verified by: <test, test case or command>`
147
147
  (or `_TODO_`).
148
148
  - **Planned changes**: per `files_expected` path what changes and why (the "how" of
149
- answer 4), one to three lines, no code blocks. Risks and assumptions may add code
149
+ answer 4), one to three lines, no code blocks; where a code snippet would help
150
+ (a new method, a changed signature), draw a small `classDiagram` with just those members. Risks and assumptions may add code
150
151
  findings marked _(inferred)_.
151
152
  - **Generated**: the real system time (`date -Iminutes`).
152
153
  - External systems: those from answer 3, plus systems the code demonstrably uses
@@ -239,7 +240,7 @@ Show the user the path, the number of deviations, and any failing check.
239
240
  - **Always labeled**:
240
241
  - C4 and `sequenceDiagram`: the first line after the diagram type is `title <text>`
241
242
  (`System Context: <project>`, `Containers: <project>`);
242
- - `classDiagram`, `erDiagram` and `flowchart` have no `title` line; put frontmatter
243
+ - `classDiagram`, `erDiagram`, `flowchart` and `stateDiagram-v2` have no `title` line; put frontmatter
243
244
  before the diagram type instead: `---`, `title: "<text>"`, `---` (quote the
244
245
  title: an unquoted `:` breaks the YAML and the render);
245
246
  - every element has a quoted label: `Person(alias, "Label", "Description")`,
@@ -285,10 +286,73 @@ C4Context
285
286
  Rel(shop, sendgrid, "Sends email via")
286
287
  ```
287
288
 
288
- `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`]
289
+ `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`,
290
+ `data_flow`, `state`]
289
291
  selects the diagrams. If one is disabled, keep its section and replace the diagram with
290
292
  this line: _Disabled in `.featuredoc.yml` (`diagrams`)._
291
293
 
294
+ ## Data flow diagram
295
+
296
+ Yourdon/DeMarco style (Gane-Sarson draws the same with other shapes) as a `flowchart LR`:
297
+
298
+ - **External entity** (person or system outside the scope): rectangle `user[User]`.
299
+ - **Process** (transforms data): circle with a number and a verb phrase,
300
+ `p1((1. Validate order))`.
301
+ - **Data store** (data at rest): `d1[("D1 Orders")]`, named with a noun, numbered `D1`.
302
+ - **Data flow**: an arrow labelled with the **data** (a noun: `order`, `invoice`), never an
303
+ action; every arrow has a label.
304
+ - Rules: every flow starts or ends at a process (never entity → entity, entity → store
305
+ or store → store); every process has at least one input and one output (no black
306
+ holes, no miracles) and its output can be made from its input (no grey holes); a
307
+ store is both written and read somewhere, or it is outside the feature; no control
308
+ flow, loops or decisions (that is the sequence or state diagram).
309
+ - **Levels**: the Context diagram is level 0; this is level 1 for the feature. The flows
310
+ in and out must balance with the Context diagram (same external systems, same data).
311
+ - Mark new or changed processes and flows _(inferred)_ or from the answers, as usual.
312
+
313
+ ```mermaid
314
+ ---
315
+ title: "Data flow: place order"
316
+ ---
317
+ flowchart LR
318
+ user[Customer] -- order --> p1((1. Validate order))
319
+ p1 -- valid order --> p2((2. Store order))
320
+ p2 -- order --> d1[("D1 Orders")]
321
+ p2 -- confirmation --> user
322
+ ```
323
+
324
+ ## State diagram
325
+
326
+ UML 2 state machine as `stateDiagram-v2`, for the one object whose lifecycle the feature
327
+ changes (an order, a job, a document):
328
+
329
+ - **States** are conditions, named with an adjective or past participle (`Draft`,
330
+ `Paid`, `Cancelled`), never an action (`Pay`).
331
+ - One initial `[*] --> <state>` (unlabelled); final `<state> --> [*]` only where the
332
+ object's life really ends.
333
+ - **Transitions**: `A --> B : event [guard] / action`; event, guard and action are each
334
+ optional, but every transition has at least the event. Guards leaving the same state
335
+ on the same event must not overlap; use `state check <<choice>>` for a decision.
336
+ - Every state is reachable from the initial state, and every non-final state has a way
337
+ out (no dead ends unless intended).
338
+ - Composite states (`state Active { … }`) only when they remove repeated transitions;
339
+ keep it to about ten states.
340
+ - New states and transitions from the answers or "Planned changes"; existing ones from
341
+ the code are _(inferred)_.
342
+
343
+ ```mermaid
344
+ ---
345
+ title: "States: Order"
346
+ ---
347
+ stateDiagram-v2
348
+ [*] --> Draft
349
+ Draft --> Placed : submit [cart not empty]
350
+ Placed --> Paid : payment received / send receipt
351
+ Placed --> Cancelled : cancel
352
+ Paid --> [*]
353
+ Cancelled --> [*]
354
+ ```
355
+
292
356
  ## Rendering
293
357
 
294
358
  `diagrams_png` in `.featuredoc.yml` [`embed`]: `embed` (below), `file` (the PNG goes to
@@ -306,7 +370,8 @@ or `off` (no image; the ` ```mermaid ` block stays in the document).
306
370
  `<output_dir>/diagrams/<slug>-<diagram>.mmd`.
307
371
 
308
372
  1. Write each diagram to `<output_dir>/diagrams/<slug>-<diagram>.mmd` (`<diagram>`:
309
- `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`) and run:
373
+ `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`,
374
+ `data-flow`, `state`) and run:
310
375
  `npx -y @mermaid-js/mermaid-cli -i <that>.mmd -o <tmp>.png -s 2 -b white -t default -p <puppeteer.json>`
311
376
  (`-t default`: Mermaid's normal theme; newer versions otherwise colour every shape).
312
377
  2. Set `PUPPETEER_SKIP_DOWNLOAD=true`, and let `puppeteer.json` point at an installed
@@ -374,7 +439,8 @@ files_expected: [<existing files or folders the user said will change>]
374
439
  ## Planned changes
375
440
 
376
441
  - `<path from files_expected>`: <what changes and why, one to three lines, no code
377
- blocks; the "how" from answer 4, or> _TODO: what changes here and why._
442
+ blocks (a small classDiagram with the changed members instead of a snippet); the "how"
443
+ from answer 4, or> _TODO: what changes here and why._
378
444
 
379
445
  ## Requirements
380
446
 
@@ -422,6 +488,18 @@ The classes this feature touches and their direct collaborators.
422
488
 
423
489
  <sequenceDiagram of the flow after the change>
424
490
 
491
+ ## Data flow diagram (Mermaid)
492
+
493
+ Where the feature's data comes from, what transforms it and where it is stored.
494
+
495
+ <flowchart DFD, or _Not applicable: <reason>._>
496
+
497
+ ## State diagram (Mermaid)
498
+
499
+ The states of <the object whose lifecycle the feature changes>.
500
+
501
+ <stateDiagram-v2, or _Not applicable: <reason>._>
502
+
425
503
  ## Open questions
426
504
 
427
505
  - [ ] <each unanswered clarifying question>
@@ -469,6 +547,9 @@ Omit "**Answered while planning**" when nothing was answered.
469
547
  result, with real classes as participants and real method names as messages;
470
548
  `activate`/`deactivate` for nested calls, `alt`/`opt` for branches. In **Current**,
471
549
  a `Note` marks where it goes wrong.
550
+ - **Data flow diagram** and **State diagram**: rules in
551
+ [diagram-rules.md](diagram-rules.md#data-flow-diagram); _Not applicable: <reason>._ when
552
+ the feature moves no data between parts, or has no object with a lifecycle.
472
553
  - **Open changes**: when an uncommitted change or stash touches the feature, also list
473
554
  it under Open questions.
474
555
  - `language` in `.featuredoc.yml` [`en`]: headings stay English (the CLI's), but fixed
@@ -41,7 +41,8 @@ Rules:
41
41
  stops it; never a proposal.
42
42
  - **Picture, caption, table. No stories.** Every figure has a numbered caption
43
43
  (`**Figure 3.** …`, no gaps) and at most three sentences; a table decodes it. Never
44
- describe a diagram in prose, never paste code as an image, no filler.
44
+ describe a diagram in prose, never paste code as an image, no filler. Where a code
45
+ snippet would explain a class or signature, draw a small UML class diagram instead.
45
46
  - **Zoom in step by step,** one small diagram per level (at most about fifteen elements).
46
47
  - **Every figure follows its model's notation** ([reference/c4-model.md](reference/c4-model.md),
47
48
  [reference/models.md](reference/models.md)) and passes its checklist: a title, a
@@ -8,7 +8,7 @@
8
8
  - **Always labeled**:
9
9
  - C4 and `sequenceDiagram`: the first line after the diagram type is `title <text>`
10
10
  (`System Context: <project>`, `Containers: <project>`);
11
- - `classDiagram`, `erDiagram` and `flowchart` have no `title` line; put frontmatter
11
+ - `classDiagram`, `erDiagram`, `flowchart` and `stateDiagram-v2` have no `title` line; put frontmatter
12
12
  before the diagram type instead: `---`, `title: "<text>"`, `---` (quote the
13
13
  title: an unquoted `:` breaks the YAML and the render);
14
14
  - every element has a quoted label: `Person(alias, "Label", "Description")`,
@@ -54,10 +54,73 @@ C4Context
54
54
  Rel(shop, sendgrid, "Sends email via")
55
55
  ```
56
56
 
57
- `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`]
57
+ `diagrams` in `.featuredoc.yml` [`c4_context`, `c4_container`, `class`, `sequence`,
58
+ `data_flow`, `state`]
58
59
  selects the diagrams. If one is disabled, keep its section and replace the diagram with
59
60
  this line: _Disabled in `.featuredoc.yml` (`diagrams`)._
60
61
 
62
+ ## Data flow diagram
63
+
64
+ Yourdon/DeMarco style (Gane-Sarson draws the same with other shapes) as a `flowchart LR`:
65
+
66
+ - **External entity** (person or system outside the scope): rectangle `user[User]`.
67
+ - **Process** (transforms data): circle with a number and a verb phrase,
68
+ `p1((1. Validate order))`.
69
+ - **Data store** (data at rest): `d1[("D1 Orders")]`, named with a noun, numbered `D1`.
70
+ - **Data flow**: an arrow labelled with the **data** (a noun: `order`, `invoice`), never an
71
+ action; every arrow has a label.
72
+ - Rules: every flow starts or ends at a process (never entity → entity, entity → store
73
+ or store → store); every process has at least one input and one output (no black
74
+ holes, no miracles) and its output can be made from its input (no grey holes); a
75
+ store is both written and read somewhere, or it is outside the feature; no control
76
+ flow, loops or decisions (that is the sequence or state diagram).
77
+ - **Levels**: the Context diagram is level 0; this is level 1 for the feature. The flows
78
+ in and out must balance with the Context diagram (same external systems, same data).
79
+ - Mark new or changed processes and flows _(inferred)_ or from the answers, as usual.
80
+
81
+ ```mermaid
82
+ ---
83
+ title: "Data flow: place order"
84
+ ---
85
+ flowchart LR
86
+ user[Customer] -- order --> p1((1. Validate order))
87
+ p1 -- valid order --> p2((2. Store order))
88
+ p2 -- order --> d1[("D1 Orders")]
89
+ p2 -- confirmation --> user
90
+ ```
91
+
92
+ ## State diagram
93
+
94
+ UML 2 state machine as `stateDiagram-v2`, for the one object whose lifecycle the feature
95
+ changes (an order, a job, a document):
96
+
97
+ - **States** are conditions, named with an adjective or past participle (`Draft`,
98
+ `Paid`, `Cancelled`), never an action (`Pay`).
99
+ - One initial `[*] --> <state>` (unlabelled); final `<state> --> [*]` only where the
100
+ object's life really ends.
101
+ - **Transitions**: `A --> B : event [guard] / action`; event, guard and action are each
102
+ optional, but every transition has at least the event. Guards leaving the same state
103
+ on the same event must not overlap; use `state check <<choice>>` for a decision.
104
+ - Every state is reachable from the initial state, and every non-final state has a way
105
+ out (no dead ends unless intended).
106
+ - Composite states (`state Active { … }`) only when they remove repeated transitions;
107
+ keep it to about ten states.
108
+ - New states and transitions from the answers or "Planned changes"; existing ones from
109
+ the code are _(inferred)_.
110
+
111
+ ```mermaid
112
+ ---
113
+ title: "States: Order"
114
+ ---
115
+ stateDiagram-v2
116
+ [*] --> Draft
117
+ Draft --> Placed : submit [cart not empty]
118
+ Placed --> Paid : payment received / send receipt
119
+ Placed --> Cancelled : cancel
120
+ Paid --> [*]
121
+ Cancelled --> [*]
122
+ ```
123
+
61
124
  ## Rendering
62
125
 
63
126
  `diagrams_png` in `.featuredoc.yml` [`embed`]: `embed` (below), `file` (the PNG goes to
@@ -75,7 +138,8 @@ or `off` (no image; the ` ```mermaid ` block stays in the document).
75
138
  `<output_dir>/diagrams/<slug>-<diagram>.mmd`.
76
139
 
77
140
  1. Write each diagram to `<output_dir>/diagrams/<slug>-<diagram>.mmd` (`<diagram>`:
78
- `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`) and run:
141
+ `c4-context`, `c4-container`, `class`, `sequence-current`, `sequence-new`,
142
+ `data-flow`, `state`) and run:
79
143
  `npx -y @mermaid-js/mermaid-cli -i <that>.mmd -o <tmp>.png -s 2 -b white -t default -p <puppeteer.json>`
80
144
  (`-t default`: Mermaid's normal theme; newer versions otherwise colour every shape).
81
145
  2. Set `PUPPETEER_SKIP_DOWNLOAD=true`, and let `puppeteer.json` point at an installed