agent-notes 2.22.0__tar.gz → 2.24.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. {agent_notes-2.22.0 → agent_notes-2.24.0}/PKG-INFO +9 -4
  2. {agent_notes-2.22.0 → agent_notes-2.24.0}/README.md +8 -3
  3. agent_notes-2.24.0/agent_notes/VERSION +1 -0
  4. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/cli.py +11 -2
  5. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/build.py +4 -4
  6. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/config.py +24 -10
  7. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/doctor.py +15 -6
  8. agent_notes-2.24.0/agent_notes/commands/hook.py +42 -0
  9. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/info.py +2 -2
  10. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/install.py +9 -8
  11. agent_notes-2.24.0/agent_notes/commands/memory/__init__.py +104 -0
  12. agent_notes-2.24.0/agent_notes/commands/memory/_common.py +63 -0
  13. agent_notes-2.24.0/agent_notes/commands/memory/migrate.py +152 -0
  14. agent_notes-2.24.0/agent_notes/commands/memory/notes.py +208 -0
  15. agent_notes-2.24.0/agent_notes/commands/memory/reset.py +87 -0
  16. agent_notes-2.24.0/agent_notes/commands/memory/transfer.py +73 -0
  17. agent_notes-2.24.0/agent_notes/commands/memory/vault.py +66 -0
  18. agent_notes-2.24.0/agent_notes/commands/memory/wiki.py +153 -0
  19. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/regenerate.py +6 -7
  20. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/set_role.py +5 -7
  21. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/uninstall.py +2 -2
  22. agent_notes-2.24.0/agent_notes/commands/wizard/__init__.py +421 -0
  23. agent_notes-2.24.0/agent_notes/commands/wizard/_common.py +63 -0
  24. agent_notes-2.24.0/agent_notes/commands/wizard/execute.py +195 -0
  25. agent_notes-2.24.0/agent_notes/commands/wizard/orchestrator.py +87 -0
  26. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/config.py +8 -4
  27. agent_notes-2.24.0/agent_notes/constants.py +32 -0
  28. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/agents.yaml +1 -1
  29. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/analyst.md +1 -11
  30. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/api-reviewer.md +1 -11
  31. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/architect.md +1 -11
  32. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/coder.md +8 -18
  33. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/database-specialist.md +1 -11
  34. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/debugger.md +1 -11
  35. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/devil.md +1 -11
  36. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/devops.md +8 -18
  37. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/explorer.md +1 -11
  38. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/integrations.md +8 -18
  39. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/performance-profiler.md +1 -11
  40. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/refactorer.md +8 -18
  41. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/reviewer.md +1 -11
  42. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/security-auditor.md +1 -11
  43. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/execution.md +6 -2
  44. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/hard_limits.md +8 -0
  45. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/system-auditor.md +1 -11
  46. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/tech-writer.md +8 -18
  47. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/test-runner.md +8 -18
  48. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/test-writer.md +8 -18
  49. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/global-claude.md +9 -15
  50. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/roles/reasoner.yaml +1 -0
  51. agent_notes-2.24.0/agent_notes/data/rules/safety.md +41 -0
  52. agent_notes-2.24.0/agent_notes/data/skills/handoff/SKILL.md +26 -0
  53. agent_notes-2.24.0/agent_notes/data/skills/ingest/SKILL.md +239 -0
  54. agent_notes-2.24.0/agent_notes/data/skills/migrate-memory/SKILL.md +172 -0
  55. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/obsidian-memory/SKILL.md +5 -86
  56. agent_notes-2.24.0/agent_notes/data/skills/prototype/LOGIC.md +47 -0
  57. agent_notes-2.24.0/agent_notes/data/skills/prototype/SKILL.md +29 -0
  58. agent_notes-2.24.0/agent_notes/data/skills/prototype/UI.md +45 -0
  59. agent_notes-2.24.0/agent_notes/data/skills/to-issues/SKILL.md +61 -0
  60. agent_notes-2.24.0/agent_notes/data/skills/to-prd/SKILL.md +49 -0
  61. agent_notes-2.24.0/agent_notes/data/skills/write-a-skill/SKILL.md +72 -0
  62. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/doctor_checks.py +2 -1
  63. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/__init__.py +1 -1
  64. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/role.py +2 -1
  65. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/skill.py +2 -1
  66. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/state.py +1 -1
  67. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/role_registry.py +1 -0
  68. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/skill_registry.py +24 -20
  69. agent_notes-2.24.0/agent_notes/services/_memory_utils.py +59 -0
  70. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/diagnostics/_checks.py +4 -6
  71. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/diagnostics/_fix.py +2 -2
  72. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/installer.py +85 -9
  73. agent_notes-2.24.0/agent_notes/services/local_backend.py +32 -0
  74. agent_notes-2.24.0/agent_notes/services/memory_router.py +32 -0
  75. agent_notes-2.24.0/agent_notes/services/migrations/__init__.py +1 -0
  76. agent_notes-2.22.0/agent_notes/services/memory_backend.py → agent_notes-2.24.0/agent_notes/services/obsidian_backend.py +100 -100
  77. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/rendering.py +64 -6
  78. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/settings_writer.py +18 -9
  79. agent_notes-2.24.0/agent_notes/services/wiki/__init__.py +25 -0
  80. agent_notes-2.24.0/agent_notes/services/wiki/_wiki_utils.py +193 -0
  81. agent_notes-2.24.0/agent_notes/services/wiki/wiki_index.py +171 -0
  82. agent_notes-2.24.0/agent_notes/services/wiki/wiki_ingest.py +382 -0
  83. agent_notes-2.24.0/agent_notes/services/wiki/wiki_lint.py +176 -0
  84. agent_notes-2.24.0/agent_notes/services/wiki/wiki_query.py +103 -0
  85. agent_notes-2.24.0/agent_notes/services/wiki/wiki_storage.py +125 -0
  86. agent_notes-2.24.0/agent_notes/services/wiki_backend.py +3 -0
  87. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes.egg-info/PKG-INFO +9 -4
  88. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes.egg-info/SOURCES.txt +45 -6
  89. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_config_command.py +6 -6
  90. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_regenerate_command.py +2 -2
  91. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_uninstall_command.py +1 -1
  92. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/memory/test_memory_command.py +1 -1
  93. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/plugins/test_skills.py +17 -0
  94. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_info.py +2 -2
  95. agent_notes-2.24.0/tests/unit/commands/test_memory_add_description.py +42 -0
  96. agent_notes-2.24.0/tests/unit/commands/test_memory_imports.py +117 -0
  97. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_memory_migrate.py +35 -34
  98. agent_notes-2.24.0/tests/unit/commands/test_wizard_imports.py +106 -0
  99. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_wizard_steps.py +4 -4
  100. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/registries/test_registries.py +9 -0
  101. agent_notes-2.24.0/tests/unit/services/test_credential_filter.py +132 -0
  102. agent_notes-2.24.0/tests/unit/services/test_installer_hooks.py +132 -0
  103. agent_notes-2.24.0/tests/unit/services/test_local_backend.py +242 -0
  104. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_memory_backend.py +3 -1
  105. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_memory_backend_io.py +239 -42
  106. agent_notes-2.24.0/tests/unit/services/test_memory_router.py +100 -0
  107. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_settings_writer.py +94 -0
  108. agent_notes-2.24.0/tests/unit/services/test_skill_filtering.py +65 -0
  109. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_wiki_backend.py +213 -0
  110. agent_notes-2.24.0/tests/unit/services/test_wiki_imports.py +222 -0
  111. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/test_memory_dir_for_backend.py +15 -13
  112. agent_notes-2.22.0/agent_notes/VERSION +0 -1
  113. agent_notes-2.22.0/agent_notes/commands/memory.py +0 -843
  114. agent_notes-2.22.0/agent_notes/commands/wizard.py +0 -749
  115. agent_notes-2.22.0/agent_notes/data/rules/safety.md +0 -10
  116. agent_notes-2.22.0/agent_notes/install_state.py +0 -11
  117. agent_notes-2.22.0/agent_notes/services/wiki_backend.py +0 -1022
  118. agent_notes-2.22.0/agent_notes/state.py +0 -21
  119. {agent_notes-2.22.0 → agent_notes-2.24.0}/LICENSE +0 -0
  120. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/__init__.py +0 -0
  121. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/__main__.py +0 -0
  122. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/__init__.py +0 -0
  123. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/_install_helpers.py +0 -0
  124. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/list.py +0 -0
  125. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/commands/validate.py +0 -0
  126. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/lead.md +0 -0
  127. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/cost_reporting.md +0 -0
  128. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/guardrails.md +0 -0
  129. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/phase0.md +0 -0
  130. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/pipelines.md +0 -0
  131. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/review.md +0 -0
  132. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/verification.md +0 -0
  133. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/shared/wiki_compile.md +0 -0
  134. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/agents/wiki-compiler.md +0 -0
  135. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/cli/claude.yaml +0 -0
  136. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/cli/copilot.yaml +0 -0
  137. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/cli/opencode.yaml +0 -0
  138. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/commands/brainstorm.md +0 -0
  139. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/commands/debug.md +0 -0
  140. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/commands/review.md +0 -0
  141. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/global-copilot.md +0 -0
  142. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/global-opencode.md +0 -0
  143. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/hooks/session-context.md.tpl +0 -0
  144. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-haiku-4-5.yaml +0 -0
  145. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-opus-4-1.yaml +0 -0
  146. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-opus-4-5.yaml +0 -0
  147. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-opus-4-6.yaml +0 -0
  148. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-opus-4-7.yaml +0 -0
  149. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-sonnet-4-5.yaml +0 -0
  150. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-sonnet-4-6.yaml +0 -0
  151. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/models/claude-sonnet-4.yaml +0 -0
  152. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/plugin/claude.yaml +0 -0
  153. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/plugin/opencode-index.js.template +0 -0
  154. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/plugin/opencode.yaml +0 -0
  155. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/pricing.yaml +0 -0
  156. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/roles/orchestrator.yaml +0 -0
  157. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/roles/scout.yaml +0 -0
  158. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/roles/worker.yaml +0 -0
  159. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/rules/code-quality.md +0 -0
  160. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/brainstorming/SKILL.md +0 -0
  161. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/caveman/SKILL.md +0 -0
  162. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/code-review/SKILL.md +0 -0
  163. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/debugging-protocol/SKILL.md +0 -0
  164. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/docker/SKILL.md +0 -0
  165. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/docker/compose.md +0 -0
  166. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/docker/dockerfile.md +0 -0
  167. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/git/SKILL.md +0 -0
  168. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/grill-me/SKILL.md +0 -0
  169. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/grill-with-docs/SKILL.md +0 -0
  170. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/improve-codebase-architecture/SKILL.md +0 -0
  171. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/SKILL.md +0 -0
  172. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/controllers.md +0 -0
  173. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/frontend.md +0 -0
  174. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/infra.md +0 -0
  175. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/models.md +0 -0
  176. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/testing.md +0 -0
  177. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/rails/views.md +0 -0
  178. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/refactoring-protocol/SKILL.md +0 -0
  179. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/setup-project-context/SKILL.md +0 -0
  180. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/tdd/SKILL.md +0 -0
  181. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/skills/zoom-out/SKILL.md +0 -0
  182. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/__init__.py +0 -0
  183. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/__pycache__/__init__.cpython-314.pyc +0 -0
  184. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/frontmatter/__init__.py +0 -0
  185. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/frontmatter/__pycache__/__init__.cpython-314.pyc +0 -0
  186. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/frontmatter/__pycache__/claude.cpython-314.pyc +0 -0
  187. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/frontmatter/__pycache__/opencode.cpython-314.pyc +0 -0
  188. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/frontmatter/claude.py +0 -0
  189. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/data/templates/frontmatter/opencode.py +0 -0
  190. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/agent.py +0 -0
  191. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/cli_backend.py +0 -0
  192. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/diagnostics.py +0 -0
  193. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/diff.py +0 -0
  194. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/model.py +0 -0
  195. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/domain/rule.py +0 -0
  196. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/__init__.py +0 -0
  197. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/_base.py +0 -0
  198. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/agent_registry.py +0 -0
  199. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/cli_registry.py +0 -0
  200. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/model_registry.py +0 -0
  201. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/registries/rule_registry.py +0 -0
  202. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/scripts/__init__.py +0 -0
  203. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/scripts/_claude_backend.py +0 -0
  204. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/scripts/_formatting.py +0 -0
  205. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/scripts/_opencode_backend.py +0 -0
  206. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/scripts/_pricing.py +0 -0
  207. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/scripts/cost_report.py +0 -0
  208. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/__init__.py +0 -0
  209. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/counts.py +0 -0
  210. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/credentials.py +0 -0
  211. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/diagnostics/__init__.py +0 -0
  212. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/diagnostics/_display.py +0 -0
  213. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/diff.py +0 -0
  214. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/fs.py +0 -0
  215. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/install_state_builder.py +0 -0
  216. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/session_context.py +0 -0
  217. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/state_store.py +0 -0
  218. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/ui.py +0 -0
  219. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/user_config.py +0 -0
  220. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes/services/validation.py +0 -0
  221. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes.egg-info/dependency_links.txt +0 -0
  222. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes.egg-info/entry_points.txt +0 -0
  223. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes.egg-info/requires.txt +0 -0
  224. {agent_notes-2.22.0 → agent_notes-2.24.0}/agent_notes.egg-info/top_level.txt +0 -0
  225. {agent_notes-2.22.0 → agent_notes-2.24.0}/pyproject.toml +0 -0
  226. {agent_notes-2.22.0 → agent_notes-2.24.0}/setup.cfg +0 -0
  227. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/conftest.py +0 -0
  228. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/__init__.py +0 -0
  229. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/__init__.py +0 -0
  230. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_doctor_command.py +0 -0
  231. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_info_command.py +0 -0
  232. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_install_command.py +0 -0
  233. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_list_command.py +0 -0
  234. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/commands/test_validate_command.py +0 -0
  235. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/memory/__init__.py +0 -0
  236. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/scripts/__init__.py +0 -0
  237. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/functional/scripts/test_release_script.py +0 -0
  238. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/__init__.py +0 -0
  239. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/build_output/__init__.py +0 -0
  240. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/build_output/test_build_output.py +0 -0
  241. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/install/__init__.py +0 -0
  242. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/install/test_install_methods.py +0 -0
  243. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/plugin_builders/__init__.py +0 -0
  244. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/integration/plugin_builders/test_plugin_builders.py +0 -0
  245. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/plugins/__init__.py +0 -0
  246. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/plugins/claude/__init__.py +0 -0
  247. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/plugins/claude/test_agents.py +0 -0
  248. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/__init__.py +0 -0
  249. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/__init__.py +0 -0
  250. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_cost_report_subcommand.py +0 -0
  251. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_count_agents.py +0 -0
  252. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_wizard_orchestrator_skip.py +0 -0
  253. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/commands/test_wizard_preflight.py +0 -0
  254. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/registries/__init__.py +0 -0
  255. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/scripts/__init__.py +0 -0
  256. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/scripts/test_cost_report.py +0 -0
  257. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/scripts/test_cost_report_scoping.py +0 -0
  258. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/scripts/test_formatting_tty.py +0 -0
  259. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/scripts/test_time_aggregation.py +0 -0
  260. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/__init__.py +0 -0
  261. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_build_functions.py +0 -0
  262. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_credentials.py +0 -0
  263. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_fs.py +0 -0
  264. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_installer_plan.py +0 -0
  265. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_rendering_includes.py +0 -0
  266. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_session_context.py +0 -0
  267. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_state_store.py +0 -0
  268. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/services/test_validation.py +0 -0
  269. {agent_notes-2.22.0 → agent_notes-2.24.0}/tests/unit/test_import_health.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-notes
3
- Version: 2.22.0
3
+ Version: 2.24.0
4
4
  Summary: AI agent configuration manager for Claude Code, OpenCode, and Copilot
5
5
  Author-email: Eugene Naumov <min.verkligheten@gmail.com>
6
6
  License-Expression: MIT
@@ -42,7 +42,7 @@ agent-notes doctor
42
42
 
43
43
  **What's Included**
44
44
  - 19 specialized AI subagents (Opus reasons, Sonnet executes, Haiku explores)
45
- - 42+ on-demand skills (Rails, Docker, Git, Kamal, Process)
45
+ - 47+ on-demand skills (Rails, Docker, Git, Kamal, Process)
46
46
  - Global rules and guardrails
47
47
  - Agent memory with 3 storage options (Local, Obsidian, Wiki)
48
48
  - Configuration for Claude Code, OpenCode, and GitHub Copilot
@@ -267,7 +267,7 @@ Implements Karpathy's LLM Wiki pattern (v1). Auto-creates a folder per project (
267
267
 
268
268
  - **Query** — Search wiki pages, synthesize answers with citations, optionally file answers back as new pages
269
269
 
270
- - **Lint** — Health-check for contradictions, stale claims, orphan pages, missing cross-references
270
+ - **Lint** — Health-check for contradictions, stale pages, data gaps, orphan pages, missing cross-references
271
271
 
272
272
  **Commands:**
273
273
  ```bash
@@ -312,7 +312,7 @@ The installed `CLAUDE.md` already points agents to your vault. At the start of a
312
312
  <details>
313
313
  <summary>Skills</summary>
314
314
 
315
- 42+ on-demand knowledge modules across Rails, Docker, Kamal, Git, and Process. Run `agent-notes list skills` for the current list, or browse `agent_notes/data/skills/`.
315
+ 47+ on-demand knowledge modules across Rails, Docker, Kamal, Git, and Process. Run `agent-notes list skills` for the current list, or browse `agent_notes/data/skills/`.
316
316
 
317
317
  The session context hook auto-generates a skill index from SKILL.md frontmatter at install time, so agents always know what skills are available without loading full skill content. This keeps context overhead low while maintaining skill discoverability.
318
318
 
@@ -342,6 +342,11 @@ Load the docker-compose skill for multi-service setup
342
342
  - `/debugging-protocol` — Phase 1 rewritten as "build a feedback loop first" with 9 strategies
343
343
  - `/improve-codebase-architecture` — Deletion test to find shallow modules; surfaces deepening opportunities
344
344
  - `/zoom-out` — Quick orientation map of an unfamiliar code area
345
+ - `/handoff` — Compact conversation into a handoff document for a fresh agent session
346
+ - `/to-prd` — Synthesize conversation into a Product Requirements Document
347
+ - `/to-issues` — Break a plan/PRD into vertical-slice issues (HITL/AFK classification)
348
+ - `/prototype` — Throwaway prototypes: terminal app for logic or UI variations for visual
349
+ - `/write-a-skill` — Meta-skill for creating new skills with proper structure
345
350
 
346
351
  </details>
347
352
 
@@ -12,7 +12,7 @@ agent-notes doctor
12
12
 
13
13
  **What's Included**
14
14
  - 19 specialized AI subagents (Opus reasons, Sonnet executes, Haiku explores)
15
- - 42+ on-demand skills (Rails, Docker, Git, Kamal, Process)
15
+ - 47+ on-demand skills (Rails, Docker, Git, Kamal, Process)
16
16
  - Global rules and guardrails
17
17
  - Agent memory with 3 storage options (Local, Obsidian, Wiki)
18
18
  - Configuration for Claude Code, OpenCode, and GitHub Copilot
@@ -237,7 +237,7 @@ Implements Karpathy's LLM Wiki pattern (v1). Auto-creates a folder per project (
237
237
 
238
238
  - **Query** — Search wiki pages, synthesize answers with citations, optionally file answers back as new pages
239
239
 
240
- - **Lint** — Health-check for contradictions, stale claims, orphan pages, missing cross-references
240
+ - **Lint** — Health-check for contradictions, stale pages, data gaps, orphan pages, missing cross-references
241
241
 
242
242
  **Commands:**
243
243
  ```bash
@@ -282,7 +282,7 @@ The installed `CLAUDE.md` already points agents to your vault. At the start of a
282
282
  <details>
283
283
  <summary>Skills</summary>
284
284
 
285
- 42+ on-demand knowledge modules across Rails, Docker, Kamal, Git, and Process. Run `agent-notes list skills` for the current list, or browse `agent_notes/data/skills/`.
285
+ 47+ on-demand knowledge modules across Rails, Docker, Kamal, Git, and Process. Run `agent-notes list skills` for the current list, or browse `agent_notes/data/skills/`.
286
286
 
287
287
  The session context hook auto-generates a skill index from SKILL.md frontmatter at install time, so agents always know what skills are available without loading full skill content. This keeps context overhead low while maintaining skill discoverability.
288
288
 
@@ -312,6 +312,11 @@ Load the docker-compose skill for multi-service setup
312
312
  - `/debugging-protocol` — Phase 1 rewritten as "build a feedback loop first" with 9 strategies
313
313
  - `/improve-codebase-architecture` — Deletion test to find shallow modules; surfaces deepening opportunities
314
314
  - `/zoom-out` — Quick orientation map of an unfamiliar code area
315
+ - `/handoff` — Compact conversation into a handoff document for a fresh agent session
316
+ - `/to-prd` — Synthesize conversation into a Product Requirements Document
317
+ - `/to-issues` — Break a plan/PRD into vertical-slice issues (HITL/AFK classification)
318
+ - `/prototype` — Throwaway prototypes: terminal app for logic or UI variations for visual
319
+ - `/write-a-skill` — Meta-skill for creating new skills with proper structure
315
320
 
316
321
  </details>
317
322
 
@@ -0,0 +1 @@
1
+ 2.24.0
@@ -275,6 +275,12 @@ def main():
275
275
  help="Memory action")
276
276
  p_memory.add_argument("name", nargs="?", help="Agent name / note title (for show/reset/add)")
277
277
  p_memory.add_argument("extra", nargs="*", help="Additional args (for add: body [type] [agent] [project])")
278
+ p_memory.add_argument("--description", default="", help="One-liner description for index display")
279
+
280
+ # hook
281
+ p_hook = subparsers.add_parser("hook", help="Claude Code hook integrations")
282
+ p_hook.add_argument("subaction", choices=["memory-bridge"],
283
+ help="Hook to run")
278
284
 
279
285
  # cost-report
280
286
  p_cost_report = subparsers.add_parser("cost-report", help="Report token usage and cost for the current AI session")
@@ -284,7 +290,7 @@ def main():
284
290
  # config
285
291
  p_config = subparsers.add_parser("config", help="Reconfigure role/agent/model/memory/skill assignments after install")
286
292
  p_config.add_argument("action", nargs="?", default="wizard",
287
- choices=["wizard", "show", "role-model", "role-agent", "provider", "providers"],
293
+ choices=["wizard", "show", "role-model", "role-agent", "provider", "providers", "memory"],
288
294
  help="Config action (default: wizard)")
289
295
  p_config.add_argument("extra", nargs="*", help="Additional positional args (role, model, agent)")
290
296
  p_config.add_argument("--cli", help="Target CLI (claude / opencode / both)")
@@ -335,10 +341,13 @@ def main():
335
341
  regenerate(scope=args.scope, cli=args.cli, local=args.local)
336
342
  elif args.command == "memory":
337
343
  from .commands.memory import memory
338
- memory(args.action, args.name, getattr(args, "extra", None))
344
+ memory(args.action, args.name, getattr(args, "extra", None), description=getattr(args, "description", ""))
339
345
  elif args.command == "config":
340
346
  from .commands.config import config
341
347
  config(action=args.action, args=getattr(args, "extra", None) or [], cli_filter=args.cli)
348
+ elif args.command == "hook":
349
+ from .commands.hook import hook
350
+ hook(args.subaction)
342
351
  elif args.command == "cost-report":
343
352
  # Rebuild sys.argv slice so cost_report.main() can parse it normally
344
353
  argv = []
@@ -91,18 +91,18 @@ def count_lines(file_path: Path) -> int:
91
91
 
92
92
  def build() -> None:
93
93
  """Build agent configuration files from source."""
94
- from .. import state as state_module
94
+ from ..services.state_store import load_state
95
95
  from ..config import ROOT
96
-
96
+
97
97
  # Read configuration
98
98
  try:
99
99
  agents_config, tiers = load_agents_config()
100
100
  except FileNotFoundError as e:
101
101
  print(f"Error: {e}")
102
102
  return
103
-
103
+
104
104
  # Load state if present (no error if missing)
105
- state = state_module.load()
105
+ state = load_state()
106
106
 
107
107
  # Generate agent files (state=None is backward compatible)
108
108
  print("Generating agent files...")
@@ -7,11 +7,13 @@ import sys
7
7
  from pathlib import Path
8
8
  from typing import Optional
9
9
 
10
+ from ..constants import DEFAULT_VAULT_DIR, DEFAULT_VAULT_NAME, Wiki, Obsidian
11
+
10
12
 
11
13
  def _load_state():
12
14
  """Load state or exit with a clear message."""
13
- from .. import state as state_mod
14
- st = state_mod.load()
15
+ from ..services.state_store import load_state
16
+ st = load_state()
15
17
  if st is None:
16
18
  print("No installation found. Run `agent-notes install` first.")
17
19
  sys.exit(1)
@@ -95,7 +97,7 @@ def _print_diff(before: str, after: str) -> None:
95
97
 
96
98
  def _apply_and_regenerate(state, before: str) -> None:
97
99
  """Show diff, prompt, then write + regenerate on Y."""
98
- from .. import install_state
100
+ from ..services.state_store import record_install_state
99
101
  from ..config import Color
100
102
  from ..services.ui import _safe_input
101
103
 
@@ -114,7 +116,7 @@ def _apply_and_regenerate(state, before: str) -> None:
114
116
  print("Discarded. No changes written.")
115
117
  return
116
118
 
117
- install_state.record_install_state(state)
119
+ record_install_state(state)
118
120
  print("State written.")
119
121
 
120
122
  # Regenerate
@@ -311,9 +313,9 @@ def _wizard_memory(state, before: str) -> bool:
311
313
  from ..services.ui import _safe_input, _path_input
312
314
 
313
315
  storage_options = {
314
- "1": ("local", "Local markdown files (~/.claude/agent-memory/)"),
316
+ "1": ("local", "Local files"),
315
317
  "2": ("obsidian", "Obsidian vault"),
316
- "3": ("none", "None (disable memory)"),
318
+ "3": ("none", "Disabled"),
317
319
  }
318
320
 
319
321
  print("\nMemory storage options:")
@@ -329,7 +331,10 @@ def _wizard_memory(state, before: str) -> bool:
329
331
  path = ""
330
332
 
331
333
  if backend == "obsidian":
332
- mode_options = {"1": ("obsidian", "Session-oriented"), "2": ("wiki", "Wiki")}
334
+ mode_options = {
335
+ "1": ("obsidian", "Session notes — project-scoped decisions, patterns, mistakes"),
336
+ "2": ("wiki", "Knowledge wiki — Karpathy compile-once pattern with concepts, entities, sources"),
337
+ }
333
338
  print("\n Obsidian mode:")
334
339
  for key, (_, mlabel) in mode_options.items():
335
340
  print(f" {key}) {mlabel}")
@@ -337,8 +342,8 @@ def _wizard_memory(state, before: str) -> bool:
337
342
  if mode_choice in mode_options:
338
343
  backend, label = mode_options[mode_choice]
339
344
 
340
- subfolder = "notes" if backend == "obsidian" else "knowledge"
341
- default_vault = str(Path.home() / "Documents" / "Obsidian Vault")
345
+ subfolder = Obsidian.SUBFOLDER if backend == "obsidian" else Wiki.SUBFOLDER
346
+ default_vault = str(Path.home() / DEFAULT_VAULT_DIR / DEFAULT_VAULT_NAME)
342
347
  print(f" Folder name: {subfolder}")
343
348
  print(" Press Tab to autocomplete paths")
344
349
  raw = _path_input(f" Vault path [{default_vault}]: ", default_vault).strip()
@@ -453,6 +458,13 @@ def interactive_config() -> None:
453
458
  print(f"Unknown choice '{choice}'. Quit.")
454
459
 
455
460
 
461
+ def interactive_config_memory() -> None:
462
+ """Run the interactive memory config wizard."""
463
+ state = _load_state()
464
+ before = _state_snapshot(state)
465
+ _wizard_memory(state, before)
466
+
467
+
456
468
  # ── Entry point ──────────────────────────────────────────────────────────────
457
469
 
458
470
  def config(action: str = "wizard", args: Optional[list] = None, cli_filter: Optional[str] = None) -> None:
@@ -483,7 +495,9 @@ def config(action: str = "wizard", args: Optional[list] = None, cli_filter: Opti
483
495
  print("Usage: agent-notes config provider <name>")
484
496
  sys.exit(1)
485
497
  _wizard_provider_status(args[0])
498
+ elif action == "memory":
499
+ interactive_config_memory()
486
500
  else:
487
501
  print(f"Unknown config action: {action}")
488
- print("Actions: wizard, show, role-model, role-agent, providers, provider")
502
+ print("Actions: wizard, show, role-model, role-agent, providers, provider, memory")
489
503
  sys.exit(1)
@@ -61,16 +61,26 @@ def _check_session_hook(scope: str, issues: list) -> None:
61
61
  "SessionStart hook not found — run: agent-notes install to re-add the hook",
62
62
  ))
63
63
 
64
+ from ..constants import Hooks
65
+ from ..services.state_store import load_state
66
+ state = load_state()
67
+ if state and state.memory.backend in ("obsidian", "wiki"):
68
+ if not has_hook(settings_path, "SessionStart", Hooks.MEMORY_BRIDGE):
69
+ issues.append(Issue(
70
+ "missing_hook",
71
+ str(settings_path),
72
+ "memory-bridge SessionStart hook not found — run: agent-notes install to re-add",
73
+ ))
74
+
64
75
 
65
76
  def check_version_drift(scope: str, issues: list, fix_actions: list) -> None:
66
77
  """Check if the installed package version matches the current running version."""
67
- from .. import install_state
78
+ from ..services.state_store import load_current_state, get_scope
68
79
  from ..config import get_version
69
80
  from ..domain.diagnostics import Issue, FixAction
70
- from ..services.state_store import get_scope
71
81
  from pathlib import Path
72
82
 
73
- state = install_state.load_current_state()
83
+ state = load_current_state()
74
84
  if state is None:
75
85
  return
76
86
 
@@ -96,8 +106,6 @@ def check_version_drift(scope: str, issues: list, fix_actions: list) -> None:
96
106
 
97
107
  def diagnose(scope: str, fix: bool = False) -> bool:
98
108
  """Run all diagnostic checks and optionally apply fixes."""
99
- from .. import install_state
100
-
101
109
  print_summary(scope)
102
110
 
103
111
  issues = []
@@ -120,7 +128,8 @@ def diagnose(scope: str, fix: bool = False) -> bool:
120
128
  _check_session_hook(scope, issues)
121
129
 
122
130
  # Print role→model assignments
123
- state = install_state.load_current_state()
131
+ from ..services.state_store import load_current_state
132
+ state = load_current_state()
124
133
  if state is not None:
125
134
  _check_role_models(state)
126
135
 
@@ -0,0 +1,42 @@
1
+ """Hook command - Claude Code hook integrations."""
2
+
3
+ from pathlib import Path
4
+
5
+
6
+ def hook(subaction: str) -> None:
7
+ """Handle hook subactions."""
8
+ if subaction == "memory-bridge":
9
+ _memory_bridge()
10
+
11
+
12
+ def _memory_bridge() -> None:
13
+ """SessionStart hook that prints the agent-notes memory index.
14
+
15
+ Unconditionally loads and prints the memory index so it is visible in
16
+ context at the start of every Claude Code session.
17
+ """
18
+ try:
19
+ from .memory._common import _load_memory_config
20
+ from ..constants import Obsidian, Wiki
21
+
22
+ backend, path = _load_memory_config()
23
+
24
+ if backend == "none" or backend is None:
25
+ return
26
+
27
+ if backend == "obsidian":
28
+ index_file = Path(path) / Obsidian.INDEX
29
+ elif backend == "wiki":
30
+ index_file = Path(path) / Wiki.DIR / Wiki.INDEX
31
+ else:
32
+ # local and any unknown backends: use Index.md at root
33
+ index_file = Path(path) / "Index.md"
34
+
35
+ if not index_file.exists():
36
+ return
37
+
38
+ content = index_file.read_text(encoding="utf-8")
39
+ print("<!-- agent-notes memory index (auto-loaded) -->")
40
+ print(content)
41
+ except Exception:
42
+ return
@@ -2,7 +2,7 @@
2
2
 
3
3
  from pathlib import Path
4
4
 
5
- from .. import install_state
5
+ from ..services.state_store import load_current_state as _load_current_state
6
6
  from ..config import get_version, CLAUDE_HOME, Color
7
7
  from ._install_helpers import count_skills, count_agents, count_global
8
8
 
@@ -49,7 +49,7 @@ def show_info() -> None:
49
49
  print(f" Local: {Color.CYAN}not detected{Color.NC}")
50
50
 
51
51
  # State info
52
- st = install_state.load_current_state()
52
+ st = _load_current_state()
53
53
  if st is not None:
54
54
  print("")
55
55
  print("Last install:")
@@ -3,19 +3,20 @@
3
3
  from pathlib import Path
4
4
 
5
5
  from ..config import Color, PKG_DIR
6
- from .. import install_state
6
+ from ..services.install_state_builder import build_install_state
7
+ from ..services.state_store import load_current_state, record_install_state, remove_install_state
7
8
  from ._install_helpers import _verify_install
8
9
 
9
10
 
10
11
  def install(local: bool = False, copy: bool = False, reconfigure: bool = False) -> None:
11
12
  """Build from source and install to targets."""
12
- from ..state import get_scope, state_file
13
+ from ..services.state_store import get_scope, state_file
13
14
  from pathlib import Path
14
-
15
+
15
16
  scope = "local" if local else "global"
16
17
  project_path = Path.cwd().resolve() if local else None
17
18
 
18
- state = install_state.load_current_state()
19
+ state = load_current_state()
19
20
  existing = get_scope(state, scope, project_path) if state else None
20
21
 
21
22
  if existing and not reconfigure:
@@ -55,7 +56,7 @@ def install(local: bool = False, copy: bool = False, reconfigure: bool = False)
55
56
 
56
57
  if existing and reconfigure:
57
58
  print(f"Clearing existing {scope} state (--reconfigure) ...")
58
- install_state.remove_install_state(scope, project_path)
59
+ remove_install_state(scope, project_path)
59
60
  # Fall through to normal install flow
60
61
 
61
62
  # Validate args
@@ -88,13 +89,13 @@ def install(local: bool = False, copy: bool = False, reconfigure: bool = False)
88
89
  # Record state
89
90
  try:
90
91
  project_path = Path.cwd() if local else None
91
- st = install_state.build_install_state(
92
+ st = build_install_state(
92
93
  mode="copy" if copy else "symlink",
93
94
  scope="local" if local else "global",
94
95
  repo_root=PKG_DIR.parent, # repo root (parent of agent_notes pkg)
95
96
  project_path=project_path,
96
97
  )
97
- install_state.record_install_state(st)
98
+ record_install_state(st)
98
99
  except Exception as e:
99
100
  print(f"{Color.YELLOW}Warning: failed to write state.json: {e}{Color.NC}")
100
101
 
@@ -117,7 +118,7 @@ def uninstall(local: bool = False, global_: bool = False) -> None:
117
118
 
118
119
  # Remove state entry for this scope
119
120
  try:
120
- install_state.remove_install_state(scope, project_path)
121
+ remove_install_state(scope, project_path)
121
122
  except Exception as e:
122
123
  print(f"{Color.YELLOW}Warning: failed to clear state.json: {e}{Color.NC}")
123
124
 
@@ -0,0 +1,104 @@
1
+ """Manage agent memory stored in ~/.claude/agent-memory/."""
2
+
3
+ from typing import Optional
4
+
5
+ from . import _common
6
+ from ._common import _load_memory_config, get_directory_size, format_size, _WIKI_TYPE_MAP
7
+ from .vault import do_vault, do_init, do_index
8
+ from .notes import do_add, do_list, do_show, do_size
9
+ from .transfer import do_export, do_import
10
+ from .wiki import do_ingest, do_query, do_lint, do_scan_raw
11
+ from .reset import do_reset
12
+
13
+
14
+ def show_help() -> None:
15
+ """Show memory command help."""
16
+ help_text = """Usage: agent-notes memory [command] [args]
17
+
18
+ Manage agent memory.
19
+
20
+ Commands:
21
+ init Create folder structure and Index.md
22
+ list List all agent memories with sizes (default)
23
+ vault Show current backend and memory path
24
+ index Regenerate Index.md for the current backend
25
+ add <title> <body> Add a note (obsidian and wiki backends)
26
+ migrate Migrate old per-project layout to new shared flat layout
27
+ size Total disk usage
28
+ show <name> Show memory contents for one agent/category
29
+ reset Clear ALL memories (requires confirmation)
30
+ reset <name> Clear one agent's memory
31
+ export Back up memories to agent-notes/memory-backup/
32
+ import Restore from agent-notes/memory-backup/
33
+ ingest <title> <body> Ingest source material and fan-out to concepts/entities (wiki backend)
34
+ query <keyword> Search wiki pages by keyword (wiki backend)
35
+ lint Check wiki health: orphans, broken links, stale index (wiki backend)
36
+
37
+ Examples:
38
+ agent-notes memory List all memories
39
+ agent-notes memory vault Show backend configuration
40
+ agent-notes memory index Regenerate Index.md
41
+ agent-notes memory migrate Migrate to new flat layout
42
+ agent-notes memory show coder View coder agent's memory
43
+ agent-notes memory reset reviewer Clear reviewer's memory
44
+ agent-notes memory export Back up before cleanup"""
45
+
46
+ print(help_text)
47
+
48
+
49
+ def memory(action: str = "list", name: Optional[str] = None, extra: Optional[list] = None, description: str = "") -> None:
50
+ """Manage agent memory."""
51
+ if action == "list":
52
+ do_list()
53
+ elif action == "init":
54
+ do_init()
55
+ elif action == "vault":
56
+ do_vault()
57
+ elif action == "index":
58
+ do_index()
59
+ elif action == "add":
60
+ # name is title, extra[0] is body
61
+ if not name:
62
+ print("Error: add requires a title.")
63
+ exit(1)
64
+ body = extra[0] if extra else ""
65
+ note_type = extra[1] if extra and len(extra) > 1 else "context"
66
+ agent = extra[2] if extra and len(extra) > 2 else ""
67
+ project = extra[3] if extra and len(extra) > 3 else ""
68
+ do_add(name, body, note_type=note_type, agent=agent, project=project, description=description)
69
+ elif action == "size":
70
+ do_size()
71
+ elif action == "show":
72
+ if not name:
73
+ print("Error: show requires an agent name.")
74
+ exit(1)
75
+ do_show(name)
76
+ elif action == "reset":
77
+ do_reset(name)
78
+ elif action == "export":
79
+ do_export()
80
+ elif action == "import":
81
+ do_import()
82
+ elif action == "ingest":
83
+ if not name:
84
+ do_scan_raw()
85
+ exit(0)
86
+ body = extra[0] if extra else ""
87
+ concepts_csv = extra[1] if extra and len(extra) > 1 else ""
88
+ entities_csv = extra[2] if extra and len(extra) > 2 else ""
89
+ tags_csv = extra[3] if extra and len(extra) > 3 else ""
90
+ concepts = [c.strip() for c in concepts_csv.split(",") if c.strip()] if concepts_csv else None
91
+ entities = [e.strip() for e in entities_csv.split(",") if e.strip()] if entities_csv else None
92
+ tags = [t.strip() for t in tags_csv.split(",") if t.strip()] if tags_csv else None
93
+ do_ingest(name, body, concepts=concepts, entities=entities, tags=tags)
94
+ elif action == "query":
95
+ if not name:
96
+ print("Error: query requires a keyword.")
97
+ exit(1)
98
+ do_query(name)
99
+ elif action == "lint":
100
+ do_lint()
101
+ else:
102
+ print(f"Unknown command: {action}")
103
+ show_help()
104
+ exit(1)
@@ -0,0 +1,63 @@
1
+ """Shared helpers for memory subcommands."""
2
+
3
+ from pathlib import Path
4
+ from typing import Optional
5
+
6
+ from ...config import MEMORY_DIR
7
+
8
+
9
+ _WIKI_TYPE_MAP = {
10
+ "pattern": "concepts",
11
+ "decision": "concepts",
12
+ "mistake": "concepts",
13
+ "context": "concepts",
14
+ "concept": "concepts",
15
+ "concepts": "concepts",
16
+ "entity": "entities",
17
+ "entities": "entities",
18
+ "synthesis": "synthesis",
19
+ "session": "sessions",
20
+ "sessions": "sessions",
21
+ "source": "sources",
22
+ "sources": "sources",
23
+ }
24
+
25
+
26
+ def _load_memory_config():
27
+ from ...services.state_store import load_state
28
+ from ...config import memory_dir_for_backend
29
+ state = load_state()
30
+ if state is None:
31
+ return "local", MEMORY_DIR
32
+ backend = state.memory.backend
33
+ path = memory_dir_for_backend(backend, state.memory.path)
34
+ return backend, path
35
+
36
+
37
+ def get_directory_size(path: Path) -> int:
38
+ """Calculate total size of directory in bytes."""
39
+ total = 0
40
+ try:
41
+ for item in path.rglob('*'):
42
+ if item.is_file():
43
+ total += item.stat().st_size
44
+ except (OSError, PermissionError):
45
+ pass
46
+ return total
47
+
48
+
49
+ def format_size(size_bytes: int) -> str:
50
+ """Format size in human-readable format."""
51
+ if size_bytes == 0:
52
+ return "0B"
53
+
54
+ original_size = size_bytes
55
+ for unit in ['B', 'K', 'M', 'G', 'T']:
56
+ if original_size < 1024:
57
+ if unit == 'B':
58
+ return f"{original_size}B"
59
+ else:
60
+ return f"{original_size:.1f}{unit}"
61
+ original_size /= 1024
62
+
63
+ return f"{original_size:.1f}P"