docsweep 0.2.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. docsweep-0.3.1/.githooks/pre-push +44 -0
  2. docsweep-0.3.1/.github/workflows/ci.yml +40 -0
  3. {docsweep-0.2.0 → docsweep-0.3.1}/.gitignore +1 -0
  4. {docsweep-0.2.0 → docsweep-0.3.1}/CHANGELOG.md +163 -0
  5. {docsweep-0.2.0 → docsweep-0.3.1}/CLAUDE.md +39 -19
  6. {docsweep-0.2.0 → docsweep-0.3.1}/PKG-INFO +22 -3
  7. {docsweep-0.2.0 → docsweep-0.3.1}/README.en.md +2 -1
  8. {docsweep-0.2.0 → docsweep-0.3.1}/README.md +11 -2
  9. docsweep-0.3.1/assets/screenshots/webui-archive.png +0 -0
  10. docsweep-0.3.1/assets/screenshots/webui-todo.png +0 -0
  11. {docsweep-0.2.0 → docsweep-0.3.1}/docs/conventions.md +2 -1
  12. {docsweep-0.2.0 → docsweep-0.3.1}/docs/okf-mapping.md +4 -2
  13. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/__init__.py +1 -1
  14. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/atomic.py +10 -70
  15. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/brief/service.py +7 -5
  16. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/capture/llm.py +1 -1
  17. docsweep-0.3.1/docsweep/capture/service.py +156 -0
  18. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/claim.py +11 -7
  19. docsweep-0.3.1/docsweep/cli/__init__.py +107 -0
  20. docsweep-0.3.1/docsweep/cli/commands/__init__.py +1 -0
  21. docsweep-0.3.1/docsweep/cli/commands/completion.py +22 -0
  22. docsweep-0.3.1/docsweep/cli/commands/excluded.py +129 -0
  23. docsweep-0.3.1/docsweep/cli/commands/ics.py +22 -0
  24. docsweep-0.3.1/docsweep/cli/commands/index.py +281 -0
  25. docsweep-0.3.1/docsweep/cli/commands/init.py +76 -0
  26. docsweep-0.3.1/docsweep/cli/commands/inject.py +62 -0
  27. docsweep-0.3.1/docsweep/cli/commands/mcp.py +28 -0
  28. docsweep-0.3.1/docsweep/cli/commands/memory.py +31 -0
  29. docsweep-0.3.1/docsweep/cli/commands/notify.py +28 -0
  30. docsweep-0.3.1/docsweep/cli/commands/read.py +687 -0
  31. docsweep-0.3.1/docsweep/cli/commands/serve.py +67 -0
  32. docsweep-0.3.1/docsweep/cli/commands/write.py +394 -0
  33. docsweep-0.3.1/docsweep/cli/parser.py +562 -0
  34. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/config.py +27 -2
  35. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/context.py +4 -5
  36. docsweep-0.3.1/docsweep/cookbook.py +64 -0
  37. docsweep-0.3.1/docsweep/day.py +119 -0
  38. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/detect.py +44 -24
  39. docsweep-0.3.1/docsweep/doctor.py +289 -0
  40. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/engine.py +30 -2
  41. docsweep-0.3.1/docsweep/excluded.py +124 -0
  42. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/find.py +23 -0
  43. docsweep-0.3.1/docsweep/fix_conflict.py +153 -0
  44. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/graph/service.py +40 -10
  45. docsweep-0.3.1/docsweep/hints.py +43 -0
  46. docsweep-0.3.1/docsweep/history.py +64 -0
  47. docsweep-0.3.1/docsweep/ics_export.py +61 -0
  48. docsweep-0.3.1/docsweep/init_cmd.py +141 -0
  49. docsweep-0.3.1/docsweep/inject/__init__.py +62 -0
  50. docsweep-0.3.1/docsweep/inject/agent_claude.py +8 -0
  51. docsweep-0.3.1/docsweep/inject/agent_codex.py +42 -0
  52. docsweep-0.2.0/docsweep/inject.py → docsweep-0.3.1/docsweep/inject/api.py +66 -135
  53. docsweep-0.3.1/docsweep/inject/blocks.py +71 -0
  54. docsweep-0.3.1/docsweep/inject/manifest.py +38 -0
  55. docsweep-0.3.1/docsweep/intent.py +80 -0
  56. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/interactive.py +36 -30
  57. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/mcp_server.py +53 -1
  58. docsweep-0.3.1/docsweep/memory_scan.py +87 -0
  59. docsweep-0.3.1/docsweep/migrate.py +258 -0
  60. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/models.py +5 -0
  61. docsweep-0.3.1/docsweep/notify.py +111 -0
  62. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/related.py +4 -5
  63. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/resurrect/similarity.py +1 -1
  64. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/scan.py +18 -4
  65. docsweep-0.3.1/docsweep/secrets_guard.py +37 -0
  66. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/app.py +102 -18
  67. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/i18n.py +40 -0
  68. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/board.py +312 -26
  69. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/brief.py +4 -11
  70. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/capture.py +10 -12
  71. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/cards.py +12 -20
  72. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/cross.py +4 -11
  73. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/graph.py +4 -11
  74. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/resurrect.py +4 -11
  75. docsweep-0.3.1/docsweep/server/sanitize.py +55 -0
  76. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/security.py +33 -0
  77. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/board.css +95 -6
  78. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/edit.js +43 -3
  79. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/i18n.js +10 -0
  80. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/keymap.js +258 -6
  81. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_board_body.html +40 -3
  82. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_card.html +14 -1
  83. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_edit_pane.html +2 -0
  84. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_settings.html +7 -0
  85. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/board.html +36 -3
  86. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/capture.html +6 -6
  87. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/cross.html +1 -1
  88. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/services/content.py +6 -0
  89. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/services/due.py +12 -42
  90. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/services/frontmatter.py +79 -3
  91. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/services/status.py +1 -1
  92. docsweep-0.3.1/docsweep/similar_guard.py +39 -0
  93. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/state.py +1 -1
  94. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/templates_gen.py +68 -2
  95. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/timeline.py +11 -17
  96. docsweep-0.3.1/pyproject.toml +114 -0
  97. {docsweep-0.2.0 → docsweep-0.3.1}/templates/AGENTS.md +1 -1
  98. {docsweep-0.2.0 → docsweep-0.3.1}/templates/CLAUDE.md +11 -6
  99. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_atomic.py +28 -51
  100. docsweep-0.3.1/tests/test_audit_fixes_2026_07_16.py +316 -0
  101. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_c2_commands.py +54 -5
  102. docsweep-0.3.1/tests/test_cli_smoke.py +65 -0
  103. docsweep-0.3.1/tests/test_config.py +51 -0
  104. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_detect.py +81 -0
  105. docsweep-0.3.1/tests/test_doctor.py +47 -0
  106. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_engine.py +94 -0
  107. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_extras.py +22 -0
  108. docsweep-0.3.1/tests/test_init_and_undo_cli.py +46 -0
  109. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_invariants.py +6 -6
  110. docsweep-0.3.1/tests/test_mcp_tools.py +177 -0
  111. docsweep-0.3.1/tests/test_new_cli_project_dir_autodetect.py +53 -0
  112. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_server.py +2 -1
  113. docsweep-0.3.1/tests/test_server_routes_extras.py +352 -0
  114. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_services_frontmatter.py +87 -0
  115. docsweep-0.3.1/tests/test_ux_final.py +61 -0
  116. docsweep-0.3.1/tests/test_ux_remaining.py +56 -0
  117. docsweep-0.3.1/tests/test_ux_w2.py +71 -0
  118. docsweep-0.2.0/docsweep/capture/service.py +0 -79
  119. docsweep-0.2.0/docsweep/cli.py +0 -1774
  120. docsweep-0.2.0/docsweep/migrate.py +0 -167
  121. docsweep-0.2.0/docsweep/server/sanitize.py +0 -144
  122. docsweep-0.2.0/pyproject.toml +0 -82
  123. docsweep-0.2.0/tests/test_mcp_tools.py +0 -82
  124. {docsweep-0.2.0 → docsweep-0.3.1}/.docsweep.yaml +0 -0
  125. {docsweep-0.2.0 → docsweep-0.3.1}/.github/workflows/publish.yml +0 -0
  126. {docsweep-0.2.0 → docsweep-0.3.1}/AGENTS.md +0 -0
  127. {docsweep-0.2.0 → docsweep-0.3.1}/LICENSE +0 -0
  128. {docsweep-0.2.0 → docsweep-0.3.1}/NOTICES.md +0 -0
  129. {docsweep-0.2.0 → docsweep-0.3.1}/archive/plan_drop-last-updated-followup.md +0 -0
  130. {docsweep-0.2.0 → docsweep-0.3.1}/archive/plan_name-docsweep-availability.md +0 -0
  131. {docsweep-0.2.0 → docsweep-0.3.1}/archive/plan_templates-drop-last-updated-line.md +0 -0
  132. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icon-a-broom.svg +0 -0
  133. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icon-b-doc-check.svg +0 -0
  134. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icon-c-sweep-sparkle.svg +0 -0
  135. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icon.svg +0 -0
  136. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/apple-touch-icon.png +0 -0
  137. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/favicon-16.png +0 -0
  138. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/favicon-32.png +0 -0
  139. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/favicon-48.png +0 -0
  140. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/favicon.ico +0 -0
  141. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/favicon.svg +0 -0
  142. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/icon-192.png +0 -0
  143. {docsweep-0.2.0 → docsweep-0.3.1}/assets/icons/icon-512.png +0 -0
  144. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/apple-touch-icon.png +0 -0
  145. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon-16.png +0 -0
  146. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon-32.png +0 -0
  147. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon-48.png +0 -0
  148. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon.ico +0 -0
  149. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon.svg +0 -0
  150. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/icon-192.png +0 -0
  151. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/a-broom/icon-512.png +0 -0
  152. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/apple-touch-icon.png +0 -0
  153. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon-16.png +0 -0
  154. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon-32.png +0 -0
  155. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon-48.png +0 -0
  156. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon.ico +0 -0
  157. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon.svg +0 -0
  158. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/icon-192.png +0 -0
  159. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/icon-512.png +0 -0
  160. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/apple-touch-icon.png +0 -0
  161. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon-16.png +0 -0
  162. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon-32.png +0 -0
  163. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon-48.png +0 -0
  164. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon.ico +0 -0
  165. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon.svg +0 -0
  166. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/icon-192.png +0 -0
  167. {docsweep-0.2.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/icon-512.png +0 -0
  168. {docsweep-0.2.0 → docsweep-0.3.1}/docs/D-skill-update-proposal.md +0 -0
  169. {docsweep-0.2.0 → docsweep-0.3.1}/docs/ai-agent-integration.md +0 -0
  170. {docsweep-0.2.0 → docsweep-0.3.1}/docs/guidance-rewrite-proposal.md +0 -0
  171. {docsweep-0.2.0 → docsweep-0.3.1}/docs/mockups/dashboard_v0.1.0.html +0 -0
  172. {docsweep-0.2.0 → docsweep-0.3.1}/docs/mockups/dashboard_v0.1.0.png +0 -0
  173. {docsweep-0.2.0 → docsweep-0.3.1}/docs/mockups/mcp_usage_v0.1.0.html +0 -0
  174. {docsweep-0.2.0 → docsweep-0.3.1}/docs/okf-export-format.md +0 -0
  175. {docsweep-0.2.0 → docsweep-0.3.1}/docs/zenn/docsweep/2026-06-22_slash-commands-p-s-d/20260622-claude-code-slash-commands.md +0 -0
  176. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/__main__.py +0 -0
  177. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/activity.py +0 -0
  178. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/aggregate_index.py +0 -0
  179. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/archive.py +0 -0
  180. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/auto_triage.py +0 -0
  181. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/brief/__init__.py +0 -0
  182. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/brief/score.py +0 -0
  183. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/capture/__init__.py +0 -0
  184. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/capture/heuristics.py +0 -0
  185. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/capture/models.py +0 -0
  186. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/completion.py +0 -0
  187. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/cross/__init__.py +0 -0
  188. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/cross/service.py +0 -0
  189. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/export.py +0 -0
  190. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/graph/__init__.py +0 -0
  191. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/index.py +0 -0
  192. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/linkcheck.py +0 -0
  193. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/presets.py +0 -0
  194. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/reports.py +0 -0
  195. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/resurrect/__init__.py +0 -0
  196. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/resurrect/embedding.py +0 -0
  197. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/resurrect/service.py +0 -0
  198. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/review.py +0 -0
  199. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/security/__init__.py +0 -0
  200. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/security/path.py +0 -0
  201. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/__init__.py +0 -0
  202. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/config_write.py +0 -0
  203. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/routes/__init__.py +0 -0
  204. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/dnd.js +0 -0
  205. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/htmx.min.js +0 -0
  206. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/icons/apple-touch-icon.png +0 -0
  207. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/icons/favicon.ico +0 -0
  208. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/icons/favicon.svg +0 -0
  209. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/icons/icon-192.png +0 -0
  210. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/static/icons/icon-512.png +0 -0
  211. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_change_picker.html +0 -0
  212. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_due_picker.html +0 -0
  213. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_label_picker.html +0 -0
  214. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/_preview.html +0 -0
  215. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/brief.html +0 -0
  216. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/graph.html +0 -0
  217. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/server/templates/resurrect.html +0 -0
  218. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/services/__init__.py +0 -0
  219. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/services/archive.py +0 -0
  220. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/stale.py +0 -0
  221. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep/states.py +0 -0
  222. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep-ui.cmd +0 -0
  223. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep-ui.command +0 -0
  224. {docsweep-0.2.0 → docsweep-0.3.1}/docsweep-ui.sh +0 -0
  225. {docsweep-0.2.0 → docsweep-0.3.1}/templates/.docsweep.yaml +0 -0
  226. {docsweep-0.2.0 → docsweep-0.3.1}/templates/.githooks/docsweep-check.py +0 -0
  227. {docsweep-0.2.0 → docsweep-0.3.1}/templates/AGENT_GUIDE.md +0 -0
  228. {docsweep-0.2.0 → docsweep-0.3.1}/templates/install-hooks.ps1 +0 -0
  229. {docsweep-0.2.0 → docsweep-0.3.1}/templates/install-hooks.sh +0 -0
  230. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_activity.py +0 -0
  231. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_audit_fixes.py +0 -0
  232. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_audit_server.py +0 -0
  233. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_brief.py +0 -0
  234. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_c5_features.py +0 -0
  235. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_capture.py +0 -0
  236. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_config_due.py +0 -0
  237. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_cross.py +0 -0
  238. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_db_index.py +0 -0
  239. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_export.py +0 -0
  240. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_githooks.py +0 -0
  241. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_index_prune.py +0 -0
  242. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_index_stats.py +0 -0
  243. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_index_vacuum.py +0 -0
  244. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_index_wal.py +0 -0
  245. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_interactive.py +0 -0
  246. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_mcp_write_tools.py +0 -0
  247. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_parser.py +0 -0
  248. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_resurrect.py +0 -0
  249. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_server_board.py +0 -0
  250. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_server_bulk.py +0 -0
  251. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_server_okf.py +0 -0
  252. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_services_archive.py +0 -0
  253. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_services_content.py +0 -0
  254. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_services_due.py +0 -0
  255. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_services_status.py +0 -0
  256. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_state.py +0 -0
  257. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_templates_gen.py +0 -0
  258. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_triage_schema.py +0 -0
  259. {docsweep-0.2.0 → docsweep-0.3.1}/tests/test_undo.py +0 -0
@@ -0,0 +1,44 @@
1
+ #!/bin/sh
2
+ # docsweep 開発者向け pre-push フック — push 前に pytest 全走行して失敗を止める。
3
+ #
4
+ # 目的: 2026-07-16 の v0.3.0 release cascade(初回 CI で 5 連続失敗)の教訓。
5
+ # ローカルで pytest を走らせずに push すると、リモート CI で latent bug が一気に発火する。
6
+ # push 前に自動で pytest -q を走らせて、失敗なら push をブロックする(緊急時は --no-verify で回避可)。
7
+ #
8
+ # 有効化: リポジトリを clone した直後に 1 度だけ以下を実行:
9
+ # git config core.hooksPath .githooks
10
+ #
11
+ # 対応: docs/local/plan_audit-recommendations-phase2_2026-07-16.md 続きの CI 予防策。
12
+
13
+ set -e
14
+
15
+ # pytest が入っていない環境(本 hook 無関係の別プロジェクト clone 直後等)はスキップ。
16
+ if ! command -v python >/dev/null 2>&1 && ! command -v python3 >/dev/null 2>&1; then
17
+ echo "[pre-push] python が見つかりません。skip します。"
18
+ exit 0
19
+ fi
20
+
21
+ # Python 実行ファイルを解決(Windows は python.exe が優先・POSIX は python3 優先)。
22
+ if command -v python >/dev/null 2>&1; then
23
+ PY=python
24
+ else
25
+ PY=python3
26
+ fi
27
+
28
+ # pytest 未導入なら skip(`pip install -e .[dev]` を促す WARN のみ)。
29
+ if ! "$PY" -c "import pytest" 2>/dev/null; then
30
+ echo "[pre-push] pytest 未導入のため skip します。"
31
+ echo "[pre-push] 有効化には: pip install -e '.[dev]'"
32
+ exit 0
33
+ fi
34
+
35
+ echo "[pre-push] pytest -q を実行中(push 前検証)..."
36
+ if ! "$PY" -m pytest -q; then
37
+ echo ""
38
+ echo "[pre-push] pytest が失敗しました。push を中止します。"
39
+ echo "[pre-push] 修正して再 push するか、緊急時は --no-verify で回避してください。"
40
+ exit 1
41
+ fi
42
+
43
+ echo "[pre-push] pytest OK。push を許可します。"
44
+ exit 0
@@ -0,0 +1,40 @@
1
+ # Continuous Integration
2
+ #
3
+ # トリガー: 全 push / pull_request
4
+ # 目的: lint (ruff) / test (pytest) / typecheck (mypy) を回して
5
+ # リグレッションを PR 段階で検出する。
6
+ # 段階導入: mypy は初回 continue-on-error(赤許容)。ruff / pytest は fail on error。
7
+
8
+ name: CI
9
+
10
+ on: [push, pull_request]
11
+
12
+ jobs:
13
+ test:
14
+ name: Test (Python ${{ matrix.python-version }})
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.10", "3.12"]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: Install package with dev extras
28
+ # resurrect は torch を引きずるので省く。watch は Windows 限定の watchdog なので省く。
29
+ run: pip install -e ".[dev,web,mcp,review]"
30
+
31
+ - name: Run pytest
32
+ run: pytest -q
33
+
34
+ - name: Run ruff
35
+ run: ruff check docsweep tests
36
+
37
+ - name: Run mypy
38
+ # 段階導入: 初回は赤許容(continue-on-error)。将来的に外す。
39
+ continue-on-error: true
40
+ run: mypy docsweep
@@ -57,6 +57,7 @@ id_ed25519
57
57
  *.env
58
58
  secrets.*
59
59
  *secret*
60
+ !docsweep/secrets_guard.py
60
61
  *credential*
61
62
  *token*
62
63
  .netrc
@@ -3,6 +3,169 @@
3
3
  本ファイルは [Keep a Changelog](https://keepachangelog.com/ja/1.1.0/) の考え方を緩く参照しています。
4
4
  バージョニングは [SemVer](https://semver.org/lang/ja/) に従います。
5
5
 
6
+ ## [Unreleased]
7
+
8
+ ## [0.3.1] - 2026-07-18
9
+
10
+ v0.3.0 patch。`.docsweep/backup/` 経由で `docs/local/*.md`(家宣言 private)が
11
+ 公開リポの origin/main に意図せず到達する漏洩事故が実際に発生した(many-ai-cli /
12
+ offline-md-editor-viewer / PlainSheet / ShotTTL)ため、書き込み前 backup 機構を
13
+ 根本から撤去して漏洩経路そのものを消した。同時に `manual_release-*.md` を sweep 対象
14
+ type として正式認識した。削除したのは全て内部ヘルパで CLI/MCP の外向き API は無変更。
15
+
16
+ ### Added
17
+
18
+ - `manual_release-*.md` を内蔵の `manual_release` type として認識し、`[完了]` / `[廃止]`
19
+ に達したリリース記録を通常の `docsweep sweep` で自動 archive できるようにした。
20
+
21
+ ### Fixed
22
+
23
+ - **`.docsweep/backup/` 経由の docs/local 漏洩を根本対処**。書き込み前に
24
+ `.docsweep/backup/<name>.<ts>` へ md 丸コピーを 30 日保持する `atomic.backup()` 機構を
25
+ 丸ごと撤去し、`take_backup` 引数・`backup_dir_for` / `_ensure_gitignored` /
26
+ `_cleanup_backups` および関連定数(`BACKUP_DIR_NAME` / `BACKUP_RETENTION_SECONDS` /
27
+ `GITIGNORE_MARK` / `GITIGNORE_RULE`)を削除。
28
+ 背景: 実質 99% の書き込みは `update_line` 経由の 1 行差分(H1 ラベル `[完了]` 化・
29
+ `due:` 差替)で、その世代を md 全文で残すのは過剰。加えて `.docsweep/backup/` を
30
+ gitignore し忘れた公開リポで `docs/local/*.md`(非公開ポリシー宣言済み)が意図せず
31
+ push される事故が実際に発生した(many-ai-cli / offline-md-editor-viewer など)。
32
+ 復元は git 側の履歴に一本化し、docsweep はプロジェクト空間内に何も生成しない。
33
+ 外部利用者向け API(CLI サブコマンド / MCP tool)は無変更、削除したのは全て内部
34
+ ヘルパのため **v0.3.1(patch)** に留める。既存ユーザーは各プロジェクトの
35
+ `.docsweep/backup/` を手動削除して構わない(`state.json` は温存)。
36
+
37
+ ## [0.3.0] - 2026-07-16
38
+
39
+ 2026-07-16 の ai-audit-prompts / ultracode 監査(52 findings 検出)と、その進言事項 15 件を
40
+ 全消化した「監査シリーズ完結版」。critical / high の security fix、Cookie 認証への移行、
41
+ `cli.py` / `inject.py` の分割 refactor を含む minor bump。互換性維持: URL クエリ認証は
42
+ hybrid 経路として残る(v0.4.x で廃止予定)。
43
+
44
+ ### Security
45
+
46
+ - **[critical]** capture 経路(`POST /api/capture/save` と MCP `capture_save`)の任意ファイル
47
+ 書き込みを塞いだ。`save_drafts` に `target_dir` のスキャンルート境界チェックと
48
+ `suggested_filename` の basename 化・`.md` 拡張子検証を導入し、`../evil.md` 系の
49
+ トラバーサルと絶対パス書き込みを拒否する(`CaptureScopeError`)。**トークン漏洩時に
50
+ スタートアップ / 認証情報 / cron 等へ任意書き込みできた実質 RCE 経路を除去**。
51
+ - **[medium]** capture 画面(`server/templates/capture.html`)の innerHTML 経路で
52
+ `d.kind` / `d.suggested_filename` を `escapeHtml` 未通しだった箇所を修正(XSS 除去)。
53
+ - Web UI 認証を **HttpOnly / SameSite=Strict Cookie と `x-docsweep-token` ヘッダへ移行**。
54
+ 初回の `?token=` 付き URL は Cookie へ交換後に token 無し URL へ redirect する
55
+ hybrid モード(URL クエリ認証は v0.4.x で完全廃止予定・本版はその告知フェーズ)。
56
+ - `POST /api/config/roots` を `--allow-root-mutation` 起動フラグで守るようになった。
57
+ 未指定なら 403、指定時も `/`・`C:\`・HOME 直下の追加は allowlist で常時拒否
58
+ (トークン漏洩時のスキャン範囲拡張=任意 .md 読取/書換の連鎖を防ぐ)。
59
+ - `docsweep/server/sanitize.py` の stdlib HTMLParser フォールバック(88 行)を削除し、
60
+ `nh3` を `web` extras の必須依存に。パーサ実装差に依存した bypass 余地を除去。
61
+
62
+ ### Added
63
+
64
+ - **CI ワークフロー**(`.github/workflows/ci.yml`)を新設。Python 3.10 / 3.12 マトリクスで
65
+ `pytest` / `ruff check` / `mypy` を回す。mypy は段階導入のため `continue-on-error` で
66
+ 警告扱い(既存コードでの初回真っ赤を回避)。
67
+ - `--allow-root-mutation` CLI フラグ(上記 Security の項参照)。
68
+ - `[project.optional-dependencies].all-lite` extras 新設。`resurrect`(torch/CUDA を
69
+ 引きずる GB 級)を除いた実用最小構成(`web,review,mcp,watch`)。大半のユーザーは
70
+ こちらで足りる想定。
71
+ - `services/frontmatter.py` に `read_frontmatter(path)` / `read_frontmatter_text(text)` の
72
+ read API を追加。既存 9 モジュールに散っていた `_FRONTMATTER_RE` 直接利用を services
73
+ 内に集約するための基盤(下記 Refactor 参照)。
74
+ - `services/frontmatter.py` に `FrontmatterBlockStyleError` を追加し、手書き block-style
75
+ list(`tags:\n - a\n - b`)を検出したら書き換えを拒否(フロー記法前提の 1 行置換で
76
+ 継続行が孤立し YAML パースが壊れる事故を予防)。
77
+ - `migrate-frontmatter` を「素の md を OKF 形式に整えるフォーマッタ」へ一般化。従来は
78
+ frontmatter が 1 行でもあると無条件スキップだったが、OKF キー(type/status/tags/owner/
79
+ review_status/related/last_reviewed)が欠けている md へ**不足キーだけを追記**する
80
+ mode=`upgrade` を追加(`due:` だけの部分 frontmatter 等が対象。既存キーの値・行は不変・
81
+ H1 温存の不変条件は維持)。JSON 出力と CLI 表示に `mode` を追加。
82
+ - inject の導線(グローバル / プロジェクト)に「新規 md の作成(OKF frontmatter 必須)」節を追加
83
+ (`GUIDANCE_VERSION` 3 → 4)。AI が `docsweep new` を通さず手書きすると `due:` だけの
84
+ 最小 frontmatter になり OKF フィールドが欠落する穴を、docsweep 自身の注入ルールで塞ぐ
85
+ (特定の AI ツールに依存しない)。反映には `docsweep inject --global` の再実行が必要。
86
+ - pytest を `--strict-markers --strict-config` で厳格化。未宣言 marker と設定ミスを即エラー化。
87
+ - `[tool.mypy]` セクション追加(`ignore_missing_imports = true` / `warn_unused_ignores = true`)。
88
+ - `[tool.ruff.lint].select` を `E,F,I,UP,B,SIM,RUF` に拡張(バグ検出系 PLE/PIE は次版で
89
+ 段階導入予定)。
90
+
91
+ ### Fixed
92
+
93
+ 以下は 2026-07-16 監査で確定した finding のうち、最小修正で対応可能なもの 12 件。
94
+
95
+ - `engine.relabel_file` を `write_atomic` 経由へ寄せて、atomic.py の宣言(「全ての書き込み
96
+ API はこのヘルパ経由で MD を更新する」)と整合。バックアップと原子的差し替えが効くように
97
+ なり、Web UI 編集中の md を CLI/MCP 側から書き換える race が壊れにくくなる。(A-01)
98
+ - `config.load_config` が `postpone_warn_threshold` に文字列や null が入った YAML を読ませ
99
+ られると `ValueError` で全コマンドが起動不能になっていたのを、`_safe_int` フォールバック
100
+ に修正(既定値 3 / 5 へ落とす)。(A-02)
101
+ - `docsweep auto-triage --apply` が対象 JSON の欠損や破損で生の traceback を吐いていたのを、
102
+ `FileNotFoundError` / `JSONDecodeError` / `UnicodeDecodeError` を捕捉して exit 2 に修正。
103
+ (A-03)
104
+ - 空 `due:` 行(値なし)を含む md への `update_due` で `due:` キーが重複挿入され YAML
105
+ パーサ依存の last-wins になっていたのを、`_DUE_LINE_RE` を `[ \t]` 空白限定に修正して
106
+ 1 本置換に。(B-01)
107
+ - `inject.save_manifest` を tmp → `os.replace` のアトミック書き込みに変更。inject/eject 中の
108
+ プロセス停止で `injected.json` が truncate → 全プロジェクトの注入履歴(block ハッシュ・
109
+ preset_version)が事実上失われる事故を防止。(B-04)
110
+ - `graph` の node id で複数プロジェクトの同名 md(例: 各プロジェクトの `plan_v0.1.md`)が
111
+ basename 衝突していたのを、**衝突時のみ** `project/basename` の複合キーに昇格させる部分
112
+ 互換方式で修正(衝突なしの通常ケースは basename のまま・後方互換)。(C-02)
113
+ - `brief` の `yesterday_done` が age_days 降順(=古い順)になっていたのを mtime 降順
114
+ (=新しい順)に修正。24h ウィンドウ内での自然な並び順に。(C-03)
115
+ - `timeline._resolve_date` が `rec.mtime` None のレコード 1 件で TypeError → timeline 全体が
116
+ 落ちていたのを、`("", "unknown")` フォールバックに修正。(C-04)
117
+ - 対話 `triage --review` を Ctrl+C で中断すると蓄積した判定が全ロスしていたのを、
118
+ `KeyboardInterrupt` を捕捉してここまでの pairs を dispatch するよう修正
119
+ (EOFError と対称の挙動に)。(C-05)
120
+ - `atomic.backup` のファイル名 suffix を `time.time()` → `time.time_ns()` に上げ、同一秒内
121
+ 2 回書きで前世代を上書きする問題を修正。(A-05)
122
+
123
+ ### Changed / Refactor
124
+
125
+ - `docsweep/cli.py`(2311 行)を `docsweep/cli/` パッケージに分割。`cli/parser.py`
126
+ (argparse 定義)と `cli/commands/*.py`(読取系 / 書込系 / 特殊系)に責務分離。
127
+ 公開エントリ `docsweep.cli:main` と既存 `from docsweep.cli import ...` は `__init__.py`
128
+ の re-export で完全互換。(M-06)
129
+ - `docsweep/inject.py`(828 行)を `docsweep/inject/` パッケージに分割。`blocks.py` /
130
+ `manifest.py` / `agent_claude.py` / `agent_codex.py` / `api.py` の 5 モジュールへ責務分離。
131
+ 公開 API(`inject` / `eject` / `inject_global` / `eject_global` / `MANIFEST_PATH` / etc)は
132
+ `__init__.py` から re-export され後方互換 100%。(M-10)
133
+ - **frontmatter 読み書き API を `services/frontmatter.py` に一本化**。9 モジュール
134
+ (`claim.py` / `context.py` / `related.py` / `migrate.py` / `timeline.py` / `fix_conflict.py` /
135
+ `services/due.py` 他)に散っていた `_FRONTMATTER_RE` 直接利用を services 内に集約。
136
+ `services/due._replace_or_insert_due` は廃し、`services/frontmatter.update_frontmatter_field`
137
+ に統合。9 箇所の drift(`migrate.py:32` が「厳密版が必要」と告白していた既知の負債)を
138
+ 解消。(M-07 / M-08)
139
+
140
+ ### Tests
141
+
142
+ - 97 テスト追加(既存 535 → 632)。内訳:
143
+ - `tests/test_audit_fixes_2026_07_16.py`(16 件): 上記 Fixed の再現テスト
144
+ - `tests/test_server_routes_extras.py`(17 件): `/graph` `/resurrect` `/brief` `/cross`
145
+ `/capture` の 200 / 401 / エラー系 smoke
146
+ - `tests/test_cli_smoke.py`(55 件): 全 CLI サブコマンドの `--help` exit 0 smoke
147
+ - `tests/test_mcp_tools.py` に read 系 smoke 7 件追記
148
+ (`route_intent` / `doctor` / `day` / `list_projects` / `set_project_enabled` /
149
+ `inject_global` / `eject_global`)
150
+ - `tests/test_services_frontmatter.py` に block 記法検出テスト 2 件追記
151
+ - Phase 2 (L-01/02/03/04/05) の追加分と合わせて最終 **650 テスト green**。
152
+
153
+ ## [0.2.1] - 2026-07-04
154
+
155
+ ### Fixed
156
+
157
+ - `serve` を Ctrl+C で停止した際に KeyboardInterrupt のスタックトレースが出ていたのを
158
+ 1 行の停止メッセージに変更(Python 3.14 の asyncio.runners 再送出を捕捉)。
159
+ - frontmatter と H1 ラベルの status 食い違い warning が Web UI の描画のたびに
160
+ 繰り返し出力されていたのを、同一 (path, message) につきプロセス内 1 回に抑制
161
+ (矛盾自体は従来どおり needs_fix フラグで可視化され続ける)。
162
+ - 看板左上のロゴがファビコンと異なる「DS」テキストアイコンだったのを、
163
+ favicon.svg と同一画像に統一。
164
+ - 狭幅ウィンドウ(埋め込みブラウザ等)でトップバーの「再スキャン」ボタンや編集ペインの
165
+ 「プレビュー/編集」タブに `white-space: nowrap` が無く、文字が折り返して縦積みに
166
+ なっていたのを修正。900px 以下では看板と編集ペインを上下 2 段に、640px 以下では
167
+ 3 列カードを 1 列に切り替えるレスポンシブ対応も追加。
168
+
6
169
  ## [0.2.0] - 2026-07-03
7
170
 
8
171
  ### Added
@@ -16,7 +16,7 @@
16
16
  陳腐化を「要判断」フラグで可視化し、複数プロジェクトを横断 INDEX で一望できるようにする。
17
17
 
18
18
  - GitHub リポジトリ名: `docsweep`
19
- - 配布: `pip install docsweep` + 単体バイナリ(PyInstaller)、Win / Mac / Linux 対応
19
+ - 配布: PyPI(`pip install docsweep`、extras: `web` / `review` / `mcp` / `watch` / `resurrect` / `all`)、Win / Mac / Linux 対応。単体バイナリ(PyInstaller)は現時点で未提供
20
20
  - 設計の正本: [docs/local/plan_v0.1.0-product-requirements.md](docs/local/plan_v0.1.0-product-requirements.md)
21
21
  および [docs/local/plan_state-tag-orthogonalization.md](docs/local/plan_state-tag-orthogonalization.md)
22
22
 
@@ -37,28 +37,32 @@ docsweep は **自分自身のルールでドッグフーディング** する
37
37
  - 規約を変更するときは `templates/CLAUDE.md`(正本)→ `docs/conventions.md`(解説)の
38
38
  順で更新し、両者をズラさない
39
39
 
40
- ## 技術スタック(予定)
40
+ ## 技術スタック
41
41
 
42
42
  | レイヤ | 採用 |
43
43
  |------|------|
44
- | 言語 | Python(クロスプラットフォーム) |
44
+ | 言語 | Python >= 3.10(クロスプラットフォーム・core 依存は PyYAML のみ) |
45
45
  | パッケージ | `docsweep/`(`pip install docsweep`) |
46
- | CLI | サブコマンド + フラグ(`--auto` / `--dry-run` / `--review` / `--json` / `--report` / `--summary` / `new`) |
47
- | インタラクティブ UI | `InquirerPy` / `questionary`(`--review` のチェックリスト専用) |
46
+ | CLI | サブコマンド式(`triage` / `apply` / `sweep` / `serve` / `index` / `summary` / `new` / `inject` / `mcp` 等)+ `--json` / `--dry-run` / `--auto` |
47
+ | Web UI | FastAPI + Jinja2/htmx(`docsweep serve`、extras `web`) |
48
+ | インタラクティブ UI | `questionary`(`review` サブコマンド専用、extras `review`) |
48
49
  | 設定 | YAML(`~/.docsweep/config.yaml` / プロジェクトの `.docsweep.yaml`) |
49
- | 単体配布 | PyInstaller |
50
50
 
51
- ## リポジトリ構成(予定)
51
+ ## リポジトリ構成
52
52
 
53
53
  ```
54
54
  docsweep/
55
- ├─ docsweep/ # Python ツール本体(CLI・コアエンジン・Web UI)
55
+ ├─ docsweep/ # Python ツール本体(CLI・コアエンジン・MCP・Web UI: server/)
56
56
  ├─ templates/ # 配布物(採用者が取り込む)
57
- │ ├─ CLAUDE.md # Claude Code 向けルールの正本テンプレ
58
- │ ├─ AGENTS.md # Codex 向けの薄いポインタ
59
- │ └─ .docsweep.yaml# 設定サンプル
57
+ │ ├─ CLAUDE.md # AI 作業ドキュメント運用ルールの正本テンプレ
58
+ │ ├─ AGENTS.md # Codex 等他エージェント向けの薄いポインタ
59
+ │ ├─ AGENT_GUIDE.md # AI エージェント向け docsweep 操作ガイド
60
+ │ ├─ .docsweep.yaml # 設定サンプル
61
+ │ └─ .githooks/ + install-hooks.{sh,ps1} # opt-in pre-commit hook
62
+ ├─ tests/ # pytest
60
63
  ├─ docs/
61
64
  │ ├─ conventions.md # 命名・ステータス規約の人間向け解説
65
+ │ ├─ okf-mapping.md # OKF 語彙と内部 state の対応
62
66
  │ ├─ mockups/ # Web UI モックアップ
63
67
  │ └─ local/ # 設計書・作業ログ(非公開・gitignore)
64
68
  └─ CLAUDE.md / AGENTS.md # ← 本ファイル(リポジトリ開発者向け)
@@ -73,15 +77,31 @@ docsweep/
73
77
  - **インタラクティブ UI は `--review` 専用**。`--auto` / `--json` は非対話を厳守
74
78
  (cron・CI・AI エージェント委譲向け。プロンプトを出さない)。
75
79
 
76
- ## 作業運用ルール(AI 共通)
80
+ ## AI 作業共通ルール
77
81
 
78
- - **ビルド・パッケージング・公開・コミット・プッシュは全てユーザーが行う**。
79
- AI からは自動実行も提案もしない(確認質問も出さない)。
80
- - 例外: ユーザーが明示的に「ビルドして」「`pip install -e .` 走らせて」「コミットして」等と
81
- 指示した場合のみ。
82
- - 対象: `pyinstaller` / `pip install` / `pnpm publish` / `git commit` / `git push` / `git tag` 等。
83
- - 型チェック・テスト実行(`pytest` / `ruff` / `mypy` 等、コードの正しさ確認)は本ルールの対象外。
84
- - 完了報告では「公開しますか?」のような提案を出さず、コード変更の要約だけ伝える。
82
+ ビルド・コミット禁止、secrets-scan 責務、plan/bugfix/pending md の作成ルール等の
83
+ AI 作業共通ルールは、各利用者のグローバル AI 設定に従う
84
+ (作者環境の例: `~/.claude/CLAUDE.md` および `~/.claude/guides/`)。
85
+
86
+ - このリポジトリでの適用注: `pyinstaller` / `pip install -e .` もビルド・パッケージング扱い
87
+ (ユーザー指示があるまで実行しない)。`pytest` / `ruff` / `mypy` 等の正しさ確認は対象外。
88
+
89
+ ## 開発者向け git hook(推奨)
90
+
91
+ `.githooks/pre-push` が用意されている。push 前に自動で `pytest -q` を走らせて失敗を
92
+ 止めるためのフック。2026-07-16 v0.3.0 release で「ローカル pytest せず push → リモート
93
+ CI で 5 連続失敗」の cascade があった教訓から追加。
94
+
95
+ **有効化**(clone 後 1 回だけ):
96
+
97
+ ```bash
98
+ git config core.hooksPath .githooks
99
+ ```
100
+
101
+ - pytest 未導入や python 不在の環境では自動 skip(既存 clone に影響なし)
102
+ - 緊急時は `git push --no-verify` で回避可
103
+ - `git config` は per-clone の設定なので、リポに commit されない。clone した各自が
104
+ 上記コマンドを 1 回だけ実行する。
85
105
 
86
106
  ## 公開・配布の方針
87
107
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docsweep
3
- Version: 0.2.0
3
+ Version: 0.3.1
4
4
  Summary: Sweep, triage and archive AI coding agents' plan/bugfix/pending Markdown across projects.
5
5
  Project-URL: Homepage, https://github.com/ishizakahiroshi/docsweep
6
6
  Project-URL: Repository, https://github.com/ishizakahiroshi/docsweep
@@ -29,6 +29,16 @@ Requires-Dist: questionary>=2.0; extra == 'all'
29
29
  Requires-Dist: sentence-transformers>=2.0; extra == 'all'
30
30
  Requires-Dist: uvicorn>=0.29; extra == 'all'
31
31
  Requires-Dist: watchdog>=4.0; extra == 'all'
32
+ Provides-Extra: all-lite
33
+ Requires-Dist: fastapi>=0.110; extra == 'all-lite'
34
+ Requires-Dist: jinja2>=3.1; extra == 'all-lite'
35
+ Requires-Dist: markdown>=3.6; extra == 'all-lite'
36
+ Requires-Dist: mcp>=1.0; extra == 'all-lite'
37
+ Requires-Dist: nh3>=0.2; extra == 'all-lite'
38
+ Requires-Dist: python-multipart>=0.0.18; extra == 'all-lite'
39
+ Requires-Dist: questionary>=2.0; extra == 'all-lite'
40
+ Requires-Dist: uvicorn>=0.29; extra == 'all-lite'
41
+ Requires-Dist: watchdog>=4.0; extra == 'all-lite'
32
42
  Provides-Extra: dev
33
43
  Requires-Dist: mypy>=1.10; extra == 'dev'
34
44
  Requires-Dist: pytest>=8.0; extra == 'dev'
@@ -70,7 +80,8 @@ md 冒頭の YAML frontmatter で `type` / `status` / `tags` / `owner` / `review
70
80
 
71
81
  docsweep 固有の追加規約は 2 点だけです:
72
82
 
73
- - **type 集合を `plan` / `bugfix` / `pending` に固定**(OKF より少し強い規約)。
83
+ - **type 集合を `plan` / `bugfix` / `pending` / `manual_release` に固定**
84
+ (OKF より少し強い規約)。
74
85
  archive 自動化のための制約で、自由な type 値は管理対象外として扱います。
75
86
  - **H1 ステータスラベル運用は廃止せず併用**。md を開いた瞬間に状態が見える人間向け価値を
76
87
  残し、frontmatter が無いファイルは H1 ラベルへフォールバックします(後方互換 100%)。
@@ -336,13 +347,21 @@ python -m docsweep eject --global
336
347
 
337
348
  python -m docsweep list # 注入済み(プロジェクト+グローバル)一覧
338
349
 
339
- # Web UI(UX 主役・127.0.0.1・トークン付き URL)。注入/解除もダッシュボードから(プレビュー必須)
350
+ # Web UI(UX 主役・127.0.0.1・初回だけ ?token= 付き URL、以降は Cookie で /board を直接開ける)。注入/解除もダッシュボードから(プレビュー必須)
340
351
  python -m docsweep serve --root ~/dev
341
352
 
342
353
  # MCP サーバー(AI エージェント面・stdio)
343
354
  python -m docsweep mcp
344
355
  ```
345
356
 
357
+ Web UI(看板)はこんな見た目です。
358
+
359
+ ![やり忘れ列](assets/screenshots/webui-todo.png)
360
+
361
+ 「完了」「廃止」になったカードは archive 候補列にまとまり、まとめて archive へ送れます。
362
+
363
+ ![archive 候補列](assets/screenshots/webui-archive.png)
364
+
346
365
  ## 状態モデル(一直線・単一正本)
347
366
 
348
367
  ```
@@ -21,7 +21,8 @@ even when read by tools that don't have docsweep installed.
21
21
 
22
22
  docsweep adds only two conventions of its own:
23
23
 
24
- - **The type set is fixed to `plan` / `bugfix` / `pending`** (slightly stricter than OKF).
24
+ - **The type set is fixed to `plan` / `bugfix` / `pending` / `manual_release`**
25
+ (slightly stricter than OKF).
25
26
  This constraint enables archive automation; arbitrary type values are treated as unmanaged.
26
27
  - **H1 status labels are kept alongside, not deprecated**. They preserve the human-facing value
27
28
  of seeing the state the moment you open the file, and files without frontmatter fall back to
@@ -18,7 +18,8 @@ md 冒頭の YAML frontmatter で `type` / `status` / `tags` / `owner` / `review
18
18
 
19
19
  docsweep 固有の追加規約は 2 点だけです:
20
20
 
21
- - **type 集合を `plan` / `bugfix` / `pending` に固定**(OKF より少し強い規約)。
21
+ - **type 集合を `plan` / `bugfix` / `pending` / `manual_release` に固定**
22
+ (OKF より少し強い規約)。
22
23
  archive 自動化のための制約で、自由な type 値は管理対象外として扱います。
23
24
  - **H1 ステータスラベル運用は廃止せず併用**。md を開いた瞬間に状態が見える人間向け価値を
24
25
  残し、frontmatter が無いファイルは H1 ラベルへフォールバックします(後方互換 100%)。
@@ -284,13 +285,21 @@ python -m docsweep eject --global
284
285
 
285
286
  python -m docsweep list # 注入済み(プロジェクト+グローバル)一覧
286
287
 
287
- # Web UI(UX 主役・127.0.0.1・トークン付き URL)。注入/解除もダッシュボードから(プレビュー必須)
288
+ # Web UI(UX 主役・127.0.0.1・初回だけ ?token= 付き URL、以降は Cookie で /board を直接開ける)。注入/解除もダッシュボードから(プレビュー必須)
288
289
  python -m docsweep serve --root ~/dev
289
290
 
290
291
  # MCP サーバー(AI エージェント面・stdio)
291
292
  python -m docsweep mcp
292
293
  ```
293
294
 
295
+ Web UI(看板)はこんな見た目です。
296
+
297
+ ![やり忘れ列](assets/screenshots/webui-todo.png)
298
+
299
+ 「完了」「廃止」になったカードは archive 候補列にまとまり、まとめて archive へ送れます。
300
+
301
+ ![archive 候補列](assets/screenshots/webui-archive.png)
302
+
294
303
  ## 状態モデル(一直線・単一正本)
295
304
 
296
305
  ```
@@ -22,13 +22,14 @@ docsweep は **H1 ステータスラベルを機械的に読み取り**、完了
22
22
 
23
23
  ---
24
24
 
25
- ## 3 つのファイル種別
25
+ ## 4 つのファイル種別
26
26
 
27
27
  | 種別 | 役割 | ファイル名 | 状態の終点 |
28
28
  |---|---|---|---|
29
29
  | plan | 計画・調査・検討 | `plan_<topic>.md` | `[完了]` → archive |
30
30
  | bugfix | 障害対応の事後記録 | `bugfix_<topic>_YYYY-MM-DD.md` | `[完了]` → archive |
31
31
  | pending | 着手しない判断の保留 | `pending_<topic>.md` | 昇格 or 廃棄 |
32
+ | manual_release | 手動リリースの実行記録 | `manual_release-<version>_YYYY-MM-DD.md` | `[完了]` → archive |
32
33
 
33
34
  種別をまたぐ昇格は一方向です:
34
35
 
@@ -10,7 +10,8 @@ docsweep は OKF の **frontmatter による type / status / related の機械
10
10
 
11
11
  docsweep は OKF の「ルール最小」思想に **完全準拠していません**。理由は 2 つ:
12
12
 
13
- 1. **archive 自動化のため**、type 集合(plan / bugfix / pending)と status 語彙を固定したい。
13
+ 1. **archive 自動化のため**、type 集合(plan / bugfix / pending / manual_release)と
14
+ status 語彙を固定したい。
14
15
  OKF はここを自由にしているが、それだと「何を `archive` 移送してよいか」が判定不能になる。
15
16
  2. **H1 ステータスラベル運用を廃止しない**。md を開いた瞬間に状態が見える価値は人間向けに残す。
16
17
  frontmatter は併用(frontmatter があればそちらを優先、なければ H1 ラベルへフォールバック)。
@@ -25,9 +26,10 @@ docsweep は OKF の「ルール最小」思想に **完全準拠していませ
25
26
  | `plan` | `plan` | 計画 / 調査メモ / 検討メモ(着手前〜進行中の作業) |
26
27
  | `bugfix` | `incident` | 障害対応の事後記録(症状 / 根本原因 / 修正内容) |
27
28
  | `pending` | `deferred` | 保留 / 将来対応(着手条件待ち) |
29
+ | `manual_release` | `release` | 手動リリースの実行記録 |
28
30
 
29
31
  OKF 側の type 語彙は緩く、`note` / `decision` / `meeting` などの値も許容されますが、
30
- docsweep は **上記 3 つしか自動 archive 制御の対象に含めません**。それ以外の type を
32
+ docsweep は **上記 4 つを自動 archive 制御の対象に含めます**。それ以外の type を
31
33
  frontmatter に書いた md は docsweep スキャンの対象外として扱われます(破壊しないが管理もしない)。
32
34
 
33
35
  ## status 語彙のマッピング
@@ -1,3 +1,3 @@
1
1
  """docsweep — AI 作業ドキュメント(plan/bugfix/pending)の横断スキャン・判定・archive 移送ツール。"""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.3.1"