docsweep 0.3.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 (253) hide show
  1. {docsweep-0.3.0 → docsweep-0.3.1}/CHANGELOG.md +29 -0
  2. {docsweep-0.3.0 → docsweep-0.3.1}/PKG-INFO +3 -2
  3. {docsweep-0.3.0 → docsweep-0.3.1}/README.en.md +2 -1
  4. {docsweep-0.3.0 → docsweep-0.3.1}/README.md +2 -1
  5. {docsweep-0.3.0 → docsweep-0.3.1}/docs/conventions.md +2 -1
  6. {docsweep-0.3.0 → docsweep-0.3.1}/docs/okf-mapping.md +4 -2
  7. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/__init__.py +1 -1
  8. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/atomic.py +9 -72
  9. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/config.py +1 -0
  10. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/state.py +1 -1
  11. {docsweep-0.3.0 → docsweep-0.3.1}/pyproject.toml +1 -1
  12. {docsweep-0.3.0 → docsweep-0.3.1}/templates/AGENTS.md +1 -1
  13. {docsweep-0.3.0 → docsweep-0.3.1}/templates/CLAUDE.md +4 -2
  14. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_atomic.py +28 -51
  15. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_audit_fixes_2026_07_16.py +8 -7
  16. docsweep-0.3.1/tests/test_config.py +51 -0
  17. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_invariants.py +6 -6
  18. {docsweep-0.3.0 → docsweep-0.3.1}/.docsweep.yaml +0 -0
  19. {docsweep-0.3.0 → docsweep-0.3.1}/.githooks/pre-push +0 -0
  20. {docsweep-0.3.0 → docsweep-0.3.1}/.github/workflows/ci.yml +0 -0
  21. {docsweep-0.3.0 → docsweep-0.3.1}/.github/workflows/publish.yml +0 -0
  22. {docsweep-0.3.0 → docsweep-0.3.1}/.gitignore +0 -0
  23. {docsweep-0.3.0 → docsweep-0.3.1}/AGENTS.md +0 -0
  24. {docsweep-0.3.0 → docsweep-0.3.1}/CLAUDE.md +0 -0
  25. {docsweep-0.3.0 → docsweep-0.3.1}/LICENSE +0 -0
  26. {docsweep-0.3.0 → docsweep-0.3.1}/NOTICES.md +0 -0
  27. {docsweep-0.3.0 → docsweep-0.3.1}/archive/plan_drop-last-updated-followup.md +0 -0
  28. {docsweep-0.3.0 → docsweep-0.3.1}/archive/plan_name-docsweep-availability.md +0 -0
  29. {docsweep-0.3.0 → docsweep-0.3.1}/archive/plan_templates-drop-last-updated-line.md +0 -0
  30. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icon-a-broom.svg +0 -0
  31. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icon-b-doc-check.svg +0 -0
  32. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icon-c-sweep-sparkle.svg +0 -0
  33. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icon.svg +0 -0
  34. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/apple-touch-icon.png +0 -0
  35. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/favicon-16.png +0 -0
  36. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/favicon-32.png +0 -0
  37. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/favicon-48.png +0 -0
  38. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/favicon.ico +0 -0
  39. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/favicon.svg +0 -0
  40. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/icon-192.png +0 -0
  41. {docsweep-0.3.0 → docsweep-0.3.1}/assets/icons/icon-512.png +0 -0
  42. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/apple-touch-icon.png +0 -0
  43. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon-16.png +0 -0
  44. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon-32.png +0 -0
  45. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon-48.png +0 -0
  46. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon.ico +0 -0
  47. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/favicon.svg +0 -0
  48. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/icon-192.png +0 -0
  49. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/a-broom/icon-512.png +0 -0
  50. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/apple-touch-icon.png +0 -0
  51. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon-16.png +0 -0
  52. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon-32.png +0 -0
  53. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon-48.png +0 -0
  54. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon.ico +0 -0
  55. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/favicon.svg +0 -0
  56. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/icon-192.png +0 -0
  57. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/b-doc-check/icon-512.png +0 -0
  58. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/apple-touch-icon.png +0 -0
  59. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon-16.png +0 -0
  60. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon-32.png +0 -0
  61. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon-48.png +0 -0
  62. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon.ico +0 -0
  63. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/favicon.svg +0 -0
  64. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/icon-192.png +0 -0
  65. {docsweep-0.3.0 → docsweep-0.3.1}/assets/proposals/c-sweep-sparkle/icon-512.png +0 -0
  66. {docsweep-0.3.0 → docsweep-0.3.1}/assets/screenshots/webui-archive.png +0 -0
  67. {docsweep-0.3.0 → docsweep-0.3.1}/assets/screenshots/webui-todo.png +0 -0
  68. {docsweep-0.3.0 → docsweep-0.3.1}/docs/D-skill-update-proposal.md +0 -0
  69. {docsweep-0.3.0 → docsweep-0.3.1}/docs/ai-agent-integration.md +0 -0
  70. {docsweep-0.3.0 → docsweep-0.3.1}/docs/guidance-rewrite-proposal.md +0 -0
  71. {docsweep-0.3.0 → docsweep-0.3.1}/docs/mockups/dashboard_v0.1.0.html +0 -0
  72. {docsweep-0.3.0 → docsweep-0.3.1}/docs/mockups/dashboard_v0.1.0.png +0 -0
  73. {docsweep-0.3.0 → docsweep-0.3.1}/docs/mockups/mcp_usage_v0.1.0.html +0 -0
  74. {docsweep-0.3.0 → docsweep-0.3.1}/docs/okf-export-format.md +0 -0
  75. {docsweep-0.3.0 → docsweep-0.3.1}/docs/zenn/docsweep/2026-06-22_slash-commands-p-s-d/20260622-claude-code-slash-commands.md +0 -0
  76. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/__main__.py +0 -0
  77. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/activity.py +0 -0
  78. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/aggregate_index.py +0 -0
  79. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/archive.py +0 -0
  80. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/auto_triage.py +0 -0
  81. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/brief/__init__.py +0 -0
  82. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/brief/score.py +0 -0
  83. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/brief/service.py +0 -0
  84. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/capture/__init__.py +0 -0
  85. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/capture/heuristics.py +0 -0
  86. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/capture/llm.py +0 -0
  87. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/capture/models.py +0 -0
  88. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/capture/service.py +0 -0
  89. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/claim.py +0 -0
  90. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/__init__.py +0 -0
  91. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/__init__.py +0 -0
  92. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/completion.py +0 -0
  93. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/excluded.py +0 -0
  94. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/ics.py +0 -0
  95. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/index.py +0 -0
  96. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/init.py +0 -0
  97. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/inject.py +0 -0
  98. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/mcp.py +0 -0
  99. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/memory.py +0 -0
  100. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/notify.py +0 -0
  101. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/read.py +0 -0
  102. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/serve.py +0 -0
  103. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/commands/write.py +0 -0
  104. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cli/parser.py +0 -0
  105. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/completion.py +0 -0
  106. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/context.py +0 -0
  107. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cookbook.py +0 -0
  108. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cross/__init__.py +0 -0
  109. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/cross/service.py +0 -0
  110. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/day.py +0 -0
  111. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/detect.py +0 -0
  112. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/doctor.py +0 -0
  113. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/engine.py +0 -0
  114. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/excluded.py +0 -0
  115. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/export.py +0 -0
  116. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/find.py +0 -0
  117. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/fix_conflict.py +0 -0
  118. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/graph/__init__.py +0 -0
  119. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/graph/service.py +0 -0
  120. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/hints.py +0 -0
  121. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/history.py +0 -0
  122. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/ics_export.py +0 -0
  123. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/index.py +0 -0
  124. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/init_cmd.py +0 -0
  125. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/inject/__init__.py +0 -0
  126. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/inject/agent_claude.py +0 -0
  127. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/inject/agent_codex.py +0 -0
  128. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/inject/api.py +0 -0
  129. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/inject/blocks.py +0 -0
  130. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/inject/manifest.py +0 -0
  131. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/intent.py +0 -0
  132. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/interactive.py +0 -0
  133. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/linkcheck.py +0 -0
  134. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/mcp_server.py +0 -0
  135. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/memory_scan.py +0 -0
  136. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/migrate.py +0 -0
  137. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/models.py +0 -0
  138. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/notify.py +0 -0
  139. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/presets.py +0 -0
  140. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/related.py +0 -0
  141. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/reports.py +0 -0
  142. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/resurrect/__init__.py +0 -0
  143. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/resurrect/embedding.py +0 -0
  144. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/resurrect/service.py +0 -0
  145. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/resurrect/similarity.py +0 -0
  146. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/review.py +0 -0
  147. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/scan.py +0 -0
  148. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/secrets_guard.py +0 -0
  149. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/security/__init__.py +0 -0
  150. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/security/path.py +0 -0
  151. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/__init__.py +0 -0
  152. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/app.py +0 -0
  153. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/config_write.py +0 -0
  154. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/i18n.py +0 -0
  155. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/__init__.py +0 -0
  156. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/board.py +0 -0
  157. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/brief.py +0 -0
  158. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/capture.py +0 -0
  159. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/cards.py +0 -0
  160. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/cross.py +0 -0
  161. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/graph.py +0 -0
  162. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/routes/resurrect.py +0 -0
  163. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/sanitize.py +0 -0
  164. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/security.py +0 -0
  165. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/board.css +0 -0
  166. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/dnd.js +0 -0
  167. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/edit.js +0 -0
  168. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/htmx.min.js +0 -0
  169. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/i18n.js +0 -0
  170. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/icons/apple-touch-icon.png +0 -0
  171. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/icons/favicon.ico +0 -0
  172. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/icons/favicon.svg +0 -0
  173. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/icons/icon-192.png +0 -0
  174. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/icons/icon-512.png +0 -0
  175. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/static/keymap.js +0 -0
  176. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_board_body.html +0 -0
  177. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_card.html +0 -0
  178. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_change_picker.html +0 -0
  179. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_due_picker.html +0 -0
  180. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_edit_pane.html +0 -0
  181. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_label_picker.html +0 -0
  182. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_preview.html +0 -0
  183. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/_settings.html +0 -0
  184. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/board.html +0 -0
  185. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/brief.html +0 -0
  186. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/capture.html +0 -0
  187. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/cross.html +0 -0
  188. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/graph.html +0 -0
  189. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/server/templates/resurrect.html +0 -0
  190. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/services/__init__.py +0 -0
  191. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/services/archive.py +0 -0
  192. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/services/content.py +0 -0
  193. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/services/due.py +0 -0
  194. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/services/frontmatter.py +0 -0
  195. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/services/status.py +0 -0
  196. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/similar_guard.py +0 -0
  197. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/stale.py +0 -0
  198. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/states.py +0 -0
  199. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/templates_gen.py +0 -0
  200. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep/timeline.py +0 -0
  201. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep-ui.cmd +0 -0
  202. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep-ui.command +0 -0
  203. {docsweep-0.3.0 → docsweep-0.3.1}/docsweep-ui.sh +0 -0
  204. {docsweep-0.3.0 → docsweep-0.3.1}/templates/.docsweep.yaml +0 -0
  205. {docsweep-0.3.0 → docsweep-0.3.1}/templates/.githooks/docsweep-check.py +0 -0
  206. {docsweep-0.3.0 → docsweep-0.3.1}/templates/AGENT_GUIDE.md +0 -0
  207. {docsweep-0.3.0 → docsweep-0.3.1}/templates/install-hooks.ps1 +0 -0
  208. {docsweep-0.3.0 → docsweep-0.3.1}/templates/install-hooks.sh +0 -0
  209. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_activity.py +0 -0
  210. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_audit_fixes.py +0 -0
  211. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_audit_server.py +0 -0
  212. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_brief.py +0 -0
  213. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_c2_commands.py +0 -0
  214. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_c5_features.py +0 -0
  215. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_capture.py +0 -0
  216. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_cli_smoke.py +0 -0
  217. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_config_due.py +0 -0
  218. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_cross.py +0 -0
  219. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_db_index.py +0 -0
  220. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_detect.py +0 -0
  221. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_doctor.py +0 -0
  222. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_engine.py +0 -0
  223. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_export.py +0 -0
  224. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_extras.py +0 -0
  225. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_githooks.py +0 -0
  226. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_index_prune.py +0 -0
  227. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_index_stats.py +0 -0
  228. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_index_vacuum.py +0 -0
  229. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_index_wal.py +0 -0
  230. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_init_and_undo_cli.py +0 -0
  231. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_interactive.py +0 -0
  232. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_mcp_tools.py +0 -0
  233. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_mcp_write_tools.py +0 -0
  234. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_new_cli_project_dir_autodetect.py +0 -0
  235. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_parser.py +0 -0
  236. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_resurrect.py +0 -0
  237. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_server.py +0 -0
  238. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_server_board.py +0 -0
  239. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_server_bulk.py +0 -0
  240. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_server_okf.py +0 -0
  241. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_server_routes_extras.py +0 -0
  242. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_services_archive.py +0 -0
  243. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_services_content.py +0 -0
  244. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_services_due.py +0 -0
  245. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_services_frontmatter.py +0 -0
  246. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_services_status.py +0 -0
  247. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_state.py +0 -0
  248. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_templates_gen.py +0 -0
  249. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_triage_schema.py +0 -0
  250. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_undo.py +0 -0
  251. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_ux_final.py +0 -0
  252. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_ux_remaining.py +0 -0
  253. {docsweep-0.3.0 → docsweep-0.3.1}/tests/test_ux_w2.py +0 -0
@@ -5,6 +5,35 @@
5
5
 
6
6
  ## [Unreleased]
7
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
+
8
37
  ## [0.3.0] - 2026-07-16
9
38
 
10
39
  2026-07-16 の ai-audit-prompts / ultracode 監査(52 findings 検出)と、その進言事項 15 件を
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docsweep
3
- Version: 0.3.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
@@ -80,7 +80,8 @@ md 冒頭の YAML frontmatter で `type` / `status` / `tags` / `owner` / `review
80
80
 
81
81
  docsweep 固有の追加規約は 2 点だけです:
82
82
 
83
- - **type 集合を `plan` / `bugfix` / `pending` に固定**(OKF より少し強い規約)。
83
+ - **type 集合を `plan` / `bugfix` / `pending` / `manual_release` に固定**
84
+ (OKF より少し強い規約)。
84
85
  archive 自動化のための制約で、自由な type 値は管理対象外として扱います。
85
86
  - **H1 ステータスラベル運用は廃止せず併用**。md を開いた瞬間に状態が見える人間向け価値を
86
87
  残し、frontmatter が無いファイルは H1 ラベルへフォールバックします(後方互換 100%)。
@@ -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%)。
@@ -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.3.0"
3
+ __version__ = "0.3.1"
@@ -1,4 +1,4 @@
1
- """アトミック書き込み + 楽観ロック(mtime check) + バックアップ。
1
+ """アトミック書き込み + 楽観ロック(mtime check)。
2
2
 
3
3
  全ての書き込み API はこのヘルパ経由で MD を更新する。Web UI と MCP どちらから書いても安全。
4
4
 
@@ -6,23 +6,23 @@
6
6
  Windows でも ``os.replace`` は atomic(NTFS の ``MoveFileEx`` 経由)。
7
7
  - 楽観ロック: ``expected_mtime`` を任意引数で受け取り、不一致なら ``ConflictError``。
8
8
  Web UI からは必ず送る(読み込み時の mtime を保持)。CLI / MCP は省略可。
9
- - バックアップ: 全書き込み前に ``.docsweep/backup/`` へコピー。既定 30 日保持・自動掃除。
10
9
  - 行単位編集 vs 全置換:
11
10
  - ``update_line`` は frontmatter `due:` 1 行や H1 ラベル先頭だけを置換(本文を触らない)
12
11
  - ``write_atomic`` は全置換(Web UI の本文編集ペインから呼ぶ)
12
+
13
+ 以前は書き込み前に ``.docsweep/backup/`` へ md 丸ごとコピーを 30 日保持する backup 機構を
14
+ 持っていたが、v0.4 で撤去した。理由: 実質 99% の書き込みは ``update_line`` 経由の 1 行差分
15
+ (H1 ラベル `[完了]` 化・`due:` 差替)で、その世代を全ファイル丸コピーで残すのは過剰。
16
+ また ``.docsweep/backup/`` を公開リポで gitignore し忘れて private md が意図せず push される
17
+ 事故が実際に発生した(`docs/local/*.md` 系)。復元用途は git 側で本体を追う運用に一本化する。
13
18
  """
14
19
 
15
20
  from __future__ import annotations
16
21
 
17
22
  import os
18
- import shutil
19
23
  import tempfile
20
- import time
21
24
  from pathlib import Path
22
25
 
23
- BACKUP_DIR_NAME = "backup"
24
- BACKUP_RETENTION_SECONDS = 30 * 24 * 60 * 60 # 30 日
25
-
26
26
 
27
27
  class ConflictError(Exception):
28
28
  """expected_mtime と実 mtime が一致しないときに発生(楽観ロックの不一致)。"""
@@ -40,82 +40,22 @@ def _mtime(path: Path) -> float:
40
40
  return path.stat().st_mtime
41
41
 
42
42
 
43
- def _project_root_for(path: Path) -> Path | None:
44
- """書き込み対象 path から ``.docsweep/`` を置くプロジェクト境界を辿る。
45
-
46
- ``backup`` の置き場決めにだけ使うので、見つからなければ path の親で代用する
47
- (バックアップを取らないより取った方が安全という選択)。
48
- """
49
- cur = path.parent.resolve()
50
- while True:
51
- for marker in (".docsweep.yaml", ".git", "pyproject.toml", "package.json"):
52
- if (cur / marker).exists():
53
- return cur
54
- parent = cur.parent
55
- if parent == cur:
56
- return None
57
- cur = parent
58
-
59
-
60
- def backup_dir_for(path: Path) -> Path:
61
- root = _project_root_for(path) or path.parent
62
- return root / ".docsweep" / BACKUP_DIR_NAME
63
-
64
-
65
- def backup(path: Path) -> Path | None:
66
- """書き込み直前に呼ぶ。``.docsweep/backup/<filename>.<unix_ns>`` へコピー。
67
-
68
- 対象が存在しない(新規作成)場合は何もしないで None を返す。古いバックアップは
69
- 呼び出しのついでに掃除する(30 日超で自動削除)。
70
-
71
- サフィックスは秒精度だと sweep が同一ファイルを短時間に 2 回書くケース(relabel →
72
- archive 移送)で前世代を上書きしてしまうため、``time.time_ns()`` のナノ秒精度に上げる。
73
- """
74
- if not path.is_file():
75
- return None
76
- dst_dir = backup_dir_for(path)
77
- dst_dir.mkdir(parents=True, exist_ok=True)
78
- ts = time.time_ns()
79
- dst = dst_dir / f"{path.name}.{ts}"
80
- shutil.copy2(str(path), str(dst))
81
- _cleanup_backups(dst_dir)
82
- return dst
83
-
84
-
85
- def _cleanup_backups(dst_dir: Path) -> None:
86
- """30 日経過したバックアップを削除する(best-effort・失敗無視)。"""
87
- cutoff = time.time() - BACKUP_RETENTION_SECONDS
88
- try:
89
- for entry in dst_dir.iterdir():
90
- try:
91
- if entry.is_file() and entry.stat().st_mtime < cutoff:
92
- entry.unlink()
93
- except OSError:
94
- pass
95
- except OSError:
96
- pass
97
-
98
-
99
43
  def write_atomic(
100
44
  path: Path,
101
45
  content: str,
102
46
  *,
103
47
  expected_mtime: float | None = None,
104
48
  encoding: str = "utf-8",
105
- take_backup: bool = True,
106
49
  ) -> float:
107
50
  """``path`` の内容を ``content`` で全置換する。書き込み後の新 mtime を返す。
108
51
 
109
52
  ``expected_mtime`` が指定され、実 mtime と一致しなければ ``ConflictError``。
110
- ``take_backup=True`` のとき、既存ファイルを `.docsweep/backup/` へ退避する。
111
53
  """
112
54
  path = Path(path)
113
55
  if expected_mtime is not None and path.is_file():
114
56
  actual = _mtime(path)
115
57
  if not _mtime_close(actual, expected_mtime):
116
58
  raise ConflictError(path, expected_mtime, actual)
117
- if take_backup:
118
- backup(path)
119
59
  path.parent.mkdir(parents=True, exist_ok=True)
120
60
  fd, tmp_name = tempfile.mkstemp(
121
61
  prefix=f".{path.name}.", suffix=".tmp", dir=str(path.parent)
@@ -139,13 +79,12 @@ def update_line(
139
79
  *,
140
80
  transform,
141
81
  expected_mtime: float | None = None,
142
- take_backup: bool = True,
143
82
  ) -> float:
144
83
  """``transform(text) -> new_text`` を経由して 1 ファイルを書き換える。
145
84
 
146
85
  呼び出し側の transform 関数が「frontmatter `due:` を 1 行だけ差し替える」「H1 行先頭の
147
86
  ラベルだけ差し替える」のような行単位の正規表現置換を行うため、本ヘルパは
148
- アトミック書き込み・楽観ロック・バックアップだけを担う。
87
+ アトミック書き込み・楽観ロックだけを担う。
149
88
  """
150
89
  path = Path(path)
151
90
  if expected_mtime is not None and path.is_file():
@@ -155,10 +94,8 @@ def update_line(
155
94
  text = path.open("r", encoding="utf-8", newline="").read()
156
95
  new_text = transform(text)
157
96
  if new_text == text:
158
- # 変更なし。書き込みも backup も省略する。
97
+ # 変更なし。書き込みも省略する。
159
98
  return _mtime(path)
160
- if take_backup:
161
- backup(path)
162
99
  fd, tmp_name = tempfile.mkstemp(
163
100
  prefix=f".{path.name}.", suffix=".tmp", dir=str(path.parent)
164
101
  )
@@ -38,6 +38,7 @@ DEFAULT_TYPES: tuple[TypeDef, ...] = (
38
38
  TypeDef("plan", "plan_*.md", ("概要",), "概要", 90),
39
39
  TypeDef("bugfix", "bugfix_*.md", ("症状", "根本原因", "修正内容", "変更ファイル", "検証", "備忘"), "症状", 30),
40
40
  TypeDef("pending", "pending_*.md", ("概要", "保留理由", "着手条件"), "概要", 180),
41
+ TypeDef("manual_release", "manual_release-*.md", (), "", 180),
41
42
  # session-recap(振り返り): docs/local に置く記録 md。archive_with_release で release 時に道連れ archive。
42
43
  TypeDef("recap", "recap_*.md", (), "", 180),
43
44
  # HTML 生成物(design-html / review-sheet skill から)。frontmatter を書けないので
@@ -108,7 +108,7 @@ def save(project_root: Path, doc: StateDoc) -> None:
108
108
  p = state_path(project_root)
109
109
  p.parent.mkdir(parents=True, exist_ok=True)
110
110
  content = json.dumps(doc.to_dict(), ensure_ascii=False, indent=2) + "\n"
111
- write_atomic(p, content, take_backup=False)
111
+ write_atomic(p, content)
112
112
 
113
113
 
114
114
  def _rel_key(project_root: Path, abs_path: Path) -> str:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "docsweep"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "Sweep, triage and archive AI coding agents' plan/bugfix/pending Markdown across projects."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -21,7 +21,7 @@ CLAUDE.md は H1 ラベル方式(`# [完了] タイトル`)を標準とし
21
21
 
22
22
  ```markdown
23
23
  ---
24
- type: plan # plan | bugfix | pending(docsweep 固定値)
24
+ type: plan # plan | bugfix | pending | manual_release(docsweep 固定値)
25
25
  status: planned # planned | in-progress | watching | done | discarded | pending
26
26
  tags: []
27
27
  owner: # claim コマンドで自動セット
@@ -15,6 +15,7 @@ Codex など他エージェント向けの `AGENTS.md` はこのファイルを
15
15
  | `plan_*.md` | 計画・調査メモ・検討メモ・将来計画 | `plan_<topic>.md` |
16
16
  | `bugfix_*.md` | 障害対応記録(完了・進行中) | `bugfix_<topic>_YYYY-MM-DD.md` |
17
17
  | `pending_*.md` | 保留・将来対応・着手条件待ち | `pending_<topic>.md` |
18
+ | `manual_release-*.md` | 手動リリースの実行記録 | `manual_release-<version>_YYYY-MM-DD.md` |
18
19
  | その他 | 参照資料・手順・セットアップ | `reference_*.md` / `manual_*.md` / `setup_*.md` |
19
20
 
20
21
  - `<topic>` はケバブケース(例: `files-tree-search-child-filter`)。
@@ -74,7 +75,7 @@ frontmatter を採用しています。新規 md は `python -m docsweep new`
74
75
 
75
76
  ```markdown
76
77
  ---
77
- type: plan # plan | bugfix | pending(docsweep 固定値)
78
+ type: plan # plan | bugfix | pending | manual_release(docsweep 固定値)
78
79
  status: planned # planned | in-progress | watching | done | discarded | pending
79
80
  tags: [] # 自由 list(語彙統制なし)
80
81
  owner: # ユーザー名スカラ(claim コマンドで自動セット)
@@ -89,7 +90,8 @@ due: 2026-07-06 # 任意・期日(看板方式)
89
90
 
90
91
  docsweep 固有の追加規約は 2 点だけ:
91
92
 
92
- - **type 集合を `plan` / `bugfix` / `pending` に固定**(archive 自動化のため)。
93
+ - **type 集合を `plan` / `bugfix` / `pending` / `manual_release` に固定**
94
+ (archive 自動化のため)。
93
95
  その他の type は管理対象外(破壊しないが docsweep の対象に含めない)。
94
96
  - **H1 ステータスラベル運用は廃止せず併用**。frontmatter があればそちら優先、無ければ
95
97
  H1 へフォールバック(後方互換 100%)。
@@ -1,17 +1,13 @@
1
- """atomic write helper のテスト — 楽観ロック・並行書き込み・バックアップ。"""
1
+ """atomic write helper のテスト — 楽観ロック・並行書き込み。"""
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import time
6
5
  from pathlib import Path
7
6
 
8
7
  import pytest
9
8
 
10
9
  from docsweep.atomic import (
11
- BACKUP_RETENTION_SECONDS,
12
10
  ConflictError,
13
- backup,
14
- backup_dir_for,
15
11
  update_line,
16
12
  write_atomic,
17
13
  )
@@ -28,7 +24,7 @@ def _setup_project(tmp_path: Path) -> Path:
28
24
  def test_write_atomic_creates_file(tmp_path: Path):
29
25
  proj = _setup_project(tmp_path)
30
26
  f = proj / "docs" / "plan_a.md"
31
- new_mtime = write_atomic(f, "# [計画] a\n", take_backup=False)
27
+ new_mtime = write_atomic(f, "# [計画] a\n")
32
28
  assert f.read_text(encoding="utf-8") == "# [計画] a\n"
33
29
  assert new_mtime > 0
34
30
 
@@ -37,7 +33,7 @@ def test_write_atomic_overwrites(tmp_path: Path):
37
33
  proj = _setup_project(tmp_path)
38
34
  f = proj / "plan.md"
39
35
  f.write_text("old", encoding="utf-8")
40
- write_atomic(f, "new", take_backup=False)
36
+ write_atomic(f, "new")
41
37
  assert f.read_text(encoding="utf-8") == "new"
42
38
 
43
39
 
@@ -47,7 +43,7 @@ def test_write_atomic_mtime_conflict(tmp_path: Path):
47
43
  f.write_text("v1", encoding="utf-8")
48
44
  stale = f.stat().st_mtime - 1000 # わざと古い mtime を渡す
49
45
  with pytest.raises(ConflictError):
50
- write_atomic(f, "v2", expected_mtime=stale, take_backup=False)
46
+ write_atomic(f, "v2", expected_mtime=stale)
51
47
  # 内容が書き換わっていないこと
52
48
  assert f.read_text(encoding="utf-8") == "v1"
53
49
 
@@ -57,48 +53,11 @@ def test_write_atomic_mtime_match_passes(tmp_path: Path):
57
53
  f = proj / "plan.md"
58
54
  f.write_text("v1", encoding="utf-8")
59
55
  current = f.stat().st_mtime
60
- new_mtime = write_atomic(f, "v2", expected_mtime=current, take_backup=False)
56
+ new_mtime = write_atomic(f, "v2", expected_mtime=current)
61
57
  assert f.read_text(encoding="utf-8") == "v2"
62
58
  assert new_mtime > 0
63
59
 
64
60
 
65
- def test_backup_copies_to_docsweep_backup(tmp_path: Path):
66
- proj = _setup_project(tmp_path)
67
- f = proj / "docs" / "plan.md"
68
- f.parent.mkdir(parents=True)
69
- f.write_text("content", encoding="utf-8")
70
- dst = backup(f)
71
- assert dst is not None
72
- assert dst.exists()
73
- assert dst.read_text(encoding="utf-8") == "content"
74
- # .docsweep/backup/ 配下に置かれているか(プロジェクト境界判定の確認)
75
- assert backup_dir_for(f) == proj / ".docsweep" / "backup"
76
- assert dst.parent == backup_dir_for(f)
77
-
78
-
79
- def test_backup_returns_none_for_missing_file(tmp_path: Path):
80
- proj = _setup_project(tmp_path)
81
- f = proj / "missing.md"
82
- assert backup(f) is None
83
-
84
-
85
- def test_backup_cleanup_removes_old_entries(tmp_path: Path):
86
- proj = _setup_project(tmp_path)
87
- bd = backup_dir_for(proj / "x.md")
88
- bd.mkdir(parents=True)
89
- old = bd / "x.md.1"
90
- old.write_text("old", encoding="utf-8")
91
- # 30 日 + 1 日前に mtime を巻き戻す
92
- old_ts = time.time() - BACKUP_RETENTION_SECONDS - 86400
93
- import os
94
- os.utime(old, (old_ts, old_ts))
95
- # 新規バックアップで cleanup が走り、古いものが消える
96
- f = proj / "y.md"
97
- f.write_text("c", encoding="utf-8")
98
- backup(f)
99
- assert not old.exists()
100
-
101
-
102
61
  def test_update_line_changes_only_when_transform_differs(tmp_path: Path):
103
62
  proj = _setup_project(tmp_path)
104
63
  f = proj / "plan.md"
@@ -108,7 +67,7 @@ def test_update_line_changes_only_when_transform_differs(tmp_path: Path):
108
67
  def _identity(text: str) -> str:
109
68
  return text
110
69
 
111
- new_mtime = update_line(f, transform=_identity, take_backup=False)
70
+ new_mtime = update_line(f, transform=_identity)
112
71
  # 変化なしでも例外にならない
113
72
  assert new_mtime == pytest.approx(pre_mtime, rel=0, abs=0.01)
114
73
  assert f.read_text(encoding="utf-8") == "old\nbody\n"
@@ -122,7 +81,7 @@ def test_update_line_writes_when_transform_differs(tmp_path: Path):
122
81
  def _xform(text: str) -> str:
123
82
  return text.replace("old", "new")
124
83
 
125
- update_line(f, transform=_xform, take_backup=False)
84
+ update_line(f, transform=_xform)
126
85
  assert f.read_text(encoding="utf-8") == "new\n"
127
86
 
128
87
 
@@ -136,7 +95,7 @@ def test_update_line_respects_mtime(tmp_path: Path):
136
95
  return text + "extra\n"
137
96
 
138
97
  with pytest.raises(ConflictError):
139
- update_line(f, transform=_xform, expected_mtime=stale, take_backup=False)
98
+ update_line(f, transform=_xform, expected_mtime=stale)
140
99
  assert f.read_text(encoding="utf-8") == "v1\n"
141
100
 
142
101
 
@@ -144,13 +103,31 @@ def test_write_atomic_preserves_unicode(tmp_path: Path):
144
103
  proj = _setup_project(tmp_path)
145
104
  f = proj / "日本語.md"
146
105
  text = "# [計画] テスト\n日本語コンテンツ。\n"
147
- write_atomic(f, text, take_backup=False)
106
+ write_atomic(f, text)
148
107
  assert f.read_text(encoding="utf-8") == text
149
108
 
150
109
 
151
110
  def test_write_atomic_no_tmpfile_leftover_on_success(tmp_path: Path):
152
111
  proj = _setup_project(tmp_path)
153
112
  f = proj / "plan.md"
154
- write_atomic(f, "x", take_backup=False)
113
+ write_atomic(f, "x")
155
114
  leftovers = [p for p in f.parent.iterdir() if p.name.startswith(".plan.md.")]
156
115
  assert leftovers == []
116
+
117
+
118
+ def test_write_atomic_does_not_create_docsweep_dir(tmp_path: Path):
119
+ """回帰防止: 書き込みが .docsweep/ ディレクトリを勝手に作らない。
120
+
121
+ v0.4 で backup 機構を撤去した。以前は初回書き込みで ``.docsweep/backup/`` が
122
+ 生成され、.gitignore し忘れの public リポで docs/local 由来の md が意図せず
123
+ push される事故が発生していた。同じ穴を再導入しないための保険。
124
+ """
125
+ proj = _setup_project(tmp_path)
126
+ f = proj / "plan.md"
127
+ write_atomic(f, "content")
128
+
129
+ def _xform(text: str) -> str:
130
+ return text + "\n更新\n"
131
+
132
+ update_line(f, transform=_xform)
133
+ assert not (proj / ".docsweep").exists()
@@ -103,9 +103,12 @@ def test_save_drafts_partial_write_prevented_on_bad_filename(tmp_path: Path):
103
103
  # ---------- A-01: relabel_file が atomic を迂回する ----------
104
104
 
105
105
 
106
- def test_relabel_file_takes_backup(tmp_path: Path):
107
- """relabel_file 経由の書換で atomic の backup が取られる(write_atomic 経由の確認)。"""
108
- from docsweep.atomic import backup_dir_for
106
+ def test_relabel_file_goes_through_atomic(tmp_path: Path):
107
+ """relabel_file が atomic 経由で書き換わる(H1 ラベル置換が反映される)。
108
+
109
+ 以前は backup ディレクトリの存在で「atomic 経由か」を間接検証していたが、
110
+ v0.4 で backup 機構を撤去したため、書き換え結果と ``.docsweep/`` 非生成で確認する。
111
+ """
109
112
  from docsweep.config import load_config
110
113
  from docsweep.engine import relabel_file
111
114
 
@@ -118,10 +121,8 @@ def test_relabel_file_takes_backup(tmp_path: Path):
118
121
  cfg = load_config(explicit_roots=[str(tmp_path)], global_path=tmp_path / "no.yaml")
119
122
  assert relabel_file(md, "[完了]", cfg) is True
120
123
  assert md.read_text(encoding="utf-8").startswith("# [完了] x")
121
- # backup ディレクトリに元テキストのコピーが出来ている
122
- bd = backup_dir_for(md)
123
- assert bd.is_dir()
124
- assert any(p.name.startswith("plan_x.md.") for p in bd.iterdir())
124
+ # backup 撤去後の回帰防止: .docsweep/ が勝手に作られないこと
125
+ assert not (proj / ".docsweep").exists()
125
126
 
126
127
 
127
128
  # ---------- A-02: config int() 剥き出しで load_config が落ちる ----------
@@ -0,0 +1,51 @@
1
+ from pathlib import Path
2
+
3
+ import pytest
4
+
5
+ from docsweep.config import DEFAULT_TYPES, load_config
6
+ from docsweep.engine import auto_sweep
7
+ from docsweep.scan import scan
8
+
9
+
10
+ def test_default_types_includes_manual_release():
11
+ release_type = next(t for t in DEFAULT_TYPES if t.name == "manual_release")
12
+
13
+ assert release_type.pattern == "manual_release-*.md"
14
+ assert release_type.stale_days == 180
15
+ assert release_type.archive_dir is None
16
+
17
+
18
+ @pytest.fixture
19
+ def manual_release_record(tmp_path: Path):
20
+ release = tmp_path / "manual_release-v0.1.0_2026-01-01.md"
21
+ release.write_text("# [完了] v0.1.0 release\n", encoding="utf-8")
22
+ (tmp_path / ".docsweep.yaml").write_text(
23
+ "archive_dir: docs/local/archive\n", encoding="utf-8"
24
+ )
25
+ config = load_config(
26
+ explicit_roots=[str(tmp_path)],
27
+ global_path=tmp_path / "no_global.yaml",
28
+ )
29
+
30
+ return tmp_path, config, scan(config)[0].record
31
+
32
+
33
+ def test_manual_release_type_recognized_in_scan(manual_release_record):
34
+ _, _, record = manual_release_record
35
+
36
+ assert record.type == "manual_release"
37
+
38
+
39
+ def test_manual_release_done_is_archivable(manual_release_record):
40
+ root, config, record = manual_release_record
41
+
42
+ assert record.archivable is True
43
+ assert record.auto_movable is True
44
+
45
+ moved = auto_sweep(config, dry_run=False)
46
+ assert [Path(entry.src).name for entry in moved] == [
47
+ "manual_release-v0.1.0_2026-01-01.md"
48
+ ]
49
+ assert (
50
+ root / "docs" / "local" / "archive" / "manual_release-v0.1.0_2026-01-01.md"
51
+ ).is_file()
@@ -124,17 +124,17 @@ def test_archive_done_only_moves_never_deletes(tmp_path: Path):
124
124
  def test_atomic_unlink_is_only_for_tempfile_cleanup():
125
125
  """``atomic.py`` の unlink 使用は tempfile クリーンアップに限定されることを目視確認。
126
126
 
127
- AST レベルでは検出できないため、ソース文字列で「except 直後の片付け」コンテキストか
128
- 「30 日超バックアップの掃除(_cleanup_backups)」のみであることを確認する。
129
- services / MCP からは atomic を経由しても物理削除されない(write は move/replace のみ)。
127
+ AST レベルでは検出できないため、ソース文字列で ``tempfile`` コンテキストに限定される
128
+ ことを確認する。services / MCP からは atomic を経由しても物理削除されない
129
+ (write は move/replace のみ)。v0.4 で backup 機構を撤去したため、`_cleanup_backups`
130
+ は allowed_contexts から外した。
130
131
  """
131
132
  src = (PKG_DIR / "atomic.py").read_text(encoding="utf-8")
132
133
  # unlink の登場行を抜き出す。
133
134
  lines = src.splitlines()
134
135
  unlink_lines = [(i, line) for i, line in enumerate(lines) if "unlink" in line]
135
- # 各登場箇所が backup cleanup or tempfile 後始末コンテキスト内にあること。
136
- # 簡易ヒューリスティック: 同関数内に "tempfile" / "_cleanup_backups" / "_cleanup" のいずれかが出現する。
137
- allowed_contexts = ("tempfile", "_cleanup_backups", "BACKUP_RETENTION_SECONDS")
136
+ # 各登場箇所が tempfile 後始末コンテキスト内にあること。
137
+ allowed_contexts = ("tempfile",)
138
138
  full = src
139
139
  for _, line in unlink_lines:
140
140
  # 「unlink を呼ぶ箇所」が unkown context だったら fail。
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes