axon-context-mcp 0.1.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 (656) hide show
  1. axon_context_mcp-0.1.1/.claude/loop.yaml +43 -0
  2. axon_context_mcp-0.1.1/.env.example +107 -0
  3. axon_context_mcp-0.1.1/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
  4. axon_context_mcp-0.1.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
  5. axon_context_mcp-0.1.1/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  6. axon_context_mcp-0.1.1/.github/workflows/ci.yml +97 -0
  7. axon_context_mcp-0.1.1/.gitignore +71 -0
  8. axon_context_mcp-0.1.1/.rtk/filters.toml +13 -0
  9. axon_context_mcp-0.1.1/AGENTS.md +1 -0
  10. axon_context_mcp-0.1.1/CLAUDE.md +181 -0
  11. axon_context_mcp-0.1.1/CODE_OF_CONDUCT.md +50 -0
  12. axon_context_mcp-0.1.1/CONTRIBUTING.md +50 -0
  13. axon_context_mcp-0.1.1/LICENSE +190 -0
  14. axon_context_mcp-0.1.1/Makefile +10 -0
  15. axon_context_mcp-0.1.1/PKG-INFO +359 -0
  16. axon_context_mcp-0.1.1/README.md +308 -0
  17. axon_context_mcp-0.1.1/RULES.md +96 -0
  18. axon_context_mcp-0.1.1/SECURITY.md +37 -0
  19. axon_context_mcp-0.1.1/TASKS.md +591 -0
  20. axon_context_mcp-0.1.1/benchmarks/README.md +92 -0
  21. axon_context_mcp-0.1.1/benchmarks/__init__.py +1 -0
  22. axon_context_mcp-0.1.1/benchmarks/model.py +73 -0
  23. axon_context_mcp-0.1.1/benchmarks/phase0_baseline.json +77 -0
  24. axon_context_mcp-0.1.1/benchmarks/phase0_gpu.json +16 -0
  25. axon_context_mcp-0.1.1/benchmarks/phase0_gpu.py +68 -0
  26. axon_context_mcp-0.1.1/benchmarks/phase0_gpu_diag.json +16 -0
  27. axon_context_mcp-0.1.1/benchmarks/phase0_gpu_diag.py +56 -0
  28. axon_context_mcp-0.1.1/benchmarks/phase0_heavy.json +22 -0
  29. axon_context_mcp-0.1.1/benchmarks/phase0_heavy.py +89 -0
  30. axon_context_mcp-0.1.1/benchmarks/phase0_probe.json +42 -0
  31. axon_context_mcp-0.1.1/benchmarks/phase0_probe.py +130 -0
  32. axon_context_mcp-0.1.1/benchmarks/results/.gitkeep +0 -0
  33. axon_context_mcp-0.1.1/benchmarks/scenarios/__init__.py +1 -0
  34. axon_context_mcp-0.1.1/benchmarks/scenarios/long_session_axon.py +31 -0
  35. axon_context_mcp-0.1.1/benchmarks/scenarios/long_session_baseline.py +24 -0
  36. axon_context_mcp-0.1.1/benchmarks/visualize.py +57 -0
  37. axon_context_mcp-0.1.1/config/expansion_sources.json +91 -0
  38. axon_context_mcp-0.1.1/config/projects.json +123 -0
  39. axon_context_mcp-0.1.1/conftest.py +5 -0
  40. axon_context_mcp-0.1.1/data/compression/stats.jsonl +194 -0
  41. axon_context_mcp-0.1.1/doc/docs/metrics/ecosystem-health.json +99 -0
  42. axon_context_mcp-0.1.1/doc/scripts/checks/__init__.py +1 -0
  43. axon_context_mcp-0.1.1/doc/scripts/checks/ci_status.py +78 -0
  44. axon_context_mcp-0.1.1/doc/scripts/checks/coupling.py +122 -0
  45. axon_context_mcp-0.1.1/doc/scripts/checks/drift.py +59 -0
  46. axon_context_mcp-0.1.1/doc/scripts/checks/performance.py +75 -0
  47. axon_context_mcp-0.1.1/doc/scripts/checks/versioning.py +145 -0
  48. axon_context_mcp-0.1.1/doc/scripts/health-check.py +89 -0
  49. axon_context_mcp-0.1.1/doc/tests/test_health_check.py +140 -0
  50. axon_context_mcp-0.1.1/docker-compose.yml +88 -0
  51. axon_context_mcp-0.1.1/docs/.capture-marker +1 -0
  52. axon_context_mcp-0.1.1/docs/ADOPTION.md +70 -0
  53. axon_context_mcp-0.1.1/docs/ADR.md +198 -0
  54. axon_context_mcp-0.1.1/docs/ARD.md +80 -0
  55. axon_context_mcp-0.1.1/docs/AUDIT_EXCEPTIONS.md +50 -0
  56. axon_context_mcp-0.1.1/docs/CAPTURE_ROBUSTNESS.md +221 -0
  57. axon_context_mcp-0.1.1/docs/COGNITIVE_AUDIT.md +249 -0
  58. axon_context_mcp-0.1.1/docs/GLYPH_INTEGRATION_FOLLOWUPS.md +188 -0
  59. axon_context_mcp-0.1.1/docs/METRICS.md +90 -0
  60. axon_context_mcp-0.1.1/docs/MIGRATION.md +366 -0
  61. axon_context_mcp-0.1.1/docs/MIGRATION_LOGGING.md +45 -0
  62. axon_context_mcp-0.1.1/docs/MIGRATION_PYDANTIC.md +88 -0
  63. axon_context_mcp-0.1.1/docs/P3_EXTENSION_DOCS.md +170 -0
  64. axon_context_mcp-0.1.1/docs/P3_PLAN.md +119 -0
  65. axon_context_mcp-0.1.1/docs/PROFILES.md +339 -0
  66. axon_context_mcp-0.1.1/docs/PROJECT_OVERVIEW.md +192 -0
  67. axon_context_mcp-0.1.1/docs/QUICKSTART_LINUX.md +85 -0
  68. axon_context_mcp-0.1.1/docs/QUICKSTART_MACOS.md +86 -0
  69. axon_context_mcp-0.1.1/docs/QUICKSTART_WINDOWS_WSL2.md +92 -0
  70. axon_context_mcp-0.1.1/docs/ROADMAP.md +171 -0
  71. axon_context_mcp-0.1.1/docs/SECOND_BRAIN.md +395 -0
  72. axon_context_mcp-0.1.1/docs/SUPPORT_MATRIX.md +103 -0
  73. axon_context_mcp-0.1.1/docs/TIL_AUTOMATION.md +127 -0
  74. axon_context_mcp-0.1.1/docs/USAGE_GUIDE.md +303 -0
  75. axon_context_mcp-0.1.1/docs/VAULT_SETUP.md +144 -0
  76. axon_context_mcp-0.1.1/docs/agent-backlog.md +497 -0
  77. axon_context_mcp-0.1.1/docs/assets/axon-hero.png +0 -0
  78. axon_context_mcp-0.1.1/docs/decisions/dec-100-rename-prometheus-to-axon.md +41 -0
  79. axon_context_mcp-0.1.1/docs/decisions/dec-101-revoke-d4-drop-neo4j.md +39 -0
  80. axon_context_mcp-0.1.1/docs/decisions/dec-102-cut-scope-router-cloud-profiles.md +34 -0
  81. axon_context_mcp-0.1.1/docs/decisions/dec-103-cross-agent-mcp-primary.md +29 -0
  82. axon_context_mcp-0.1.1/docs/decisions/dec-104-event-driven-not-time-driven.md +30 -0
  83. axon_context_mcp-0.1.1/docs/decisions/dec-105-migrate-domain-models-to-pydantic.md +42 -0
  84. axon_context_mcp-0.1.1/docs/decisions/dec-106-routing-profiles.md +130 -0
  85. axon_context_mcp-0.1.1/docs/decisions/dec-107-validation-strategy.md +94 -0
  86. axon_context_mcp-0.1.1/docs/decisions/dec-108-complete-axon-rename.md +99 -0
  87. axon_context_mcp-0.1.1/docs/decisions/dec-109-tool-tracing-and-risk-gating.md +129 -0
  88. axon_context_mcp-0.1.1/docs/decisions/dec-110-declarative-memory-signal.md +64 -0
  89. axon_context_mcp-0.1.1/docs/decisions/dec-111-adr-validation-layers.md +156 -0
  90. axon_context_mcp-0.1.1/docs/decisions/dec-112-sqlite-wal-pending-dir.md +137 -0
  91. axon_context_mcp-0.1.1/docs/decisions/dec-113-hooks-pre-commit-framework.md +107 -0
  92. axon_context_mcp-0.1.1/docs/decisions/dec-114-doctor-diagnostic-first.md +103 -0
  93. axon_context_mcp-0.1.1/docs/decisions/dec-115-supersession-ranking-penalty.md +128 -0
  94. axon_context_mcp-0.1.1/docs/decisions/dec-116-glyph-graph-delegation.md +62 -0
  95. axon_context_mcp-0.1.1/docs/decisions/dec-117-glyph-vs-graphiti-graph-layer.md +84 -0
  96. axon_context_mcp-0.1.1/docs/decisions/dec-118-rtkx-vs-llmlingua-compression-baseline.md +69 -0
  97. axon_context_mcp-0.1.1/docs/decisions/dec-119-canonical-activity-stores-for-live-renderers.md +116 -0
  98. axon_context_mcp-0.1.1/docs/decisions/dec-120-no-langchain-langgraph-chat.md +88 -0
  99. axon_context_mcp-0.1.1/docs/decisions/dec-121-postgres-unified-storage.md +223 -0
  100. axon_context_mcp-0.1.1/docs/decisions/dec-122-local-roles-backend-gpt-oss-120b.md +84 -0
  101. axon_context_mcp-0.1.1/docs/decisions/dec-125-retire-pb-entry-point.md +57 -0
  102. axon_context_mcp-0.1.1/docs/gpu-setup.md +68 -0
  103. axon_context_mcp-0.1.1/docs/launch/RUNBOOK.md +236 -0
  104. axon_context_mcp-0.1.1/docs/launch/beta.md +128 -0
  105. axon_context_mcp-0.1.1/docs/launch/posts/bluesky-thread.md +83 -0
  106. axon_context_mcp-0.1.1/docs/launch/posts/hn-show-hn.md +72 -0
  107. axon_context_mcp-0.1.1/docs/launch/posts/linkedin.md +75 -0
  108. axon_context_mcp-0.1.1/docs/launch/posts/reddit-claudeai.md +68 -0
  109. axon_context_mcp-0.1.1/docs/launch/posts/reddit-cursor.md +54 -0
  110. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-05-22-axon-cli-t6-3.md +815 -0
  111. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-05-22-axon-phase7-benchmark.md +484 -0
  112. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-19-axon-claude-code-integration.md +301 -0
  113. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-20-axon-perf-A-chunking-linear-walk-plan.md +1881 -0
  114. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-20-axon-perf-B-embedding-acceleration-plan.md +1601 -0
  115. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-20-axon-perf-C-incremental-cache-plan.md +2492 -0
  116. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-20-axon-perf-MASTER-plan.md +118 -0
  117. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-21-fileindex-postgres-plan.md +526 -0
  118. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-21-graph-postgres-plan.md +741 -0
  119. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-21-pgvector-cutover-plan.md +379 -0
  120. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-21-pgvector-vector-store-plan.md +820 -0
  121. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-22-decisions-postgres-plan.md +625 -0
  122. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-22-sessions-postgres-plan.md +577 -0
  123. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-25-md-chunking-standard.md +590 -0
  124. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-29-dec121-decision-backfill.md +613 -0
  125. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-29-dec121-phase1-retire-qdrant.md +408 -0
  126. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-29-dec121-phase2-retire-redis.md +162 -0
  127. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-29-dec121-phase3-retire-sqlite.md +151 -0
  128. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-06-29-md-generation-templates.md +462 -0
  129. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-07-01-agentic-retrieval.md +837 -0
  130. axon_context_mcp-0.1.1/docs/superpowers/plans/2026-07-06-axon-cli-unify.md +732 -0
  131. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-05-18-prometheus-second-brain-design.md +179 -0
  132. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-19-axon-claude-code-integration-design.md +123 -0
  133. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-19-axon-init-code-embedding-design.md +152 -0
  134. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-19-axon-perf-A-chunking-linear-walk-design.md +900 -0
  135. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-19-axon-perf-B-embedding-acceleration-design.md +715 -0
  136. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-19-axon-perf-C-incremental-cache-design.md +1058 -0
  137. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-21-fileindex-postgres-design.md +169 -0
  138. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-21-graph-postgres-design.md +187 -0
  139. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-21-pgvector-cutover-design.md +173 -0
  140. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-21-pgvector-vector-store-design.md +176 -0
  141. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-22-decisions-postgres-design.md +216 -0
  142. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-22-pg-storage-hardening-design.md +111 -0
  143. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-22-sessions-postgres-design.md +179 -0
  144. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-25-md-chunking-standard-design.md +142 -0
  145. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-29-dec121-decision-backfill-design.md +149 -0
  146. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-06-29-md-generation-templates-design.md +187 -0
  147. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-07-01-agentic-retrieval-design.md +213 -0
  148. axon_context_mcp-0.1.1/docs/superpowers/specs/2026-07-02-embedder-bge-m3-fallback-design.md +124 -0
  149. axon_context_mcp-0.1.1/domain-packs/corporate-use/domain-pack.json +39 -0
  150. axon_context_mcp-0.1.1/domain-packs/go.json +31 -0
  151. axon_context_mcp-0.1.1/domain-packs/kotlin.json +31 -0
  152. axon_context_mcp-0.1.1/domain-packs/python.json +31 -0
  153. axon_context_mcp-0.1.1/domain-packs/research/domain-pack.json +40 -0
  154. axon_context_mcp-0.1.1/domain-packs/rust.json +31 -0
  155. axon_context_mcp-0.1.1/domain-packs/software/domain-pack.json +45 -0
  156. axon_context_mcp-0.1.1/domain-packs/support/domain-pack.json +39 -0
  157. axon_context_mcp-0.1.1/domain-packs/typescript.json +31 -0
  158. axon_context_mcp-0.1.1/pyproject.toml +123 -0
  159. axon_context_mcp-0.1.1/scripts/analyze_retrieval_telemetry.py +94 -0
  160. axon_context_mcp-0.1.1/scripts/axon-adopt-all.sh +55 -0
  161. axon_context_mcp-0.1.1/scripts/axon-backends-start.sh +36 -0
  162. axon_context_mcp-0.1.1/scripts/axon-bootstrap.sh +79 -0
  163. axon_context_mcp-0.1.1/scripts/build_ablation_index.py +208 -0
  164. axon_context_mcp-0.1.1/scripts/calibrate_retrieval_bands.py +55 -0
  165. axon_context_mcp-0.1.1/scripts/check_onboarding_drift.py +131 -0
  166. axon_context_mcp-0.1.1/scripts/collect_metrics_mac.sh +93 -0
  167. axon_context_mcp-0.1.1/scripts/eval_exact_terms.py +121 -0
  168. axon_context_mcp-0.1.1/scripts/index_once.py +42 -0
  169. axon_context_mcp-0.1.1/scripts/install_vault_hook.sh +34 -0
  170. axon_context_mcp-0.1.1/scripts/populate_recall_baseline.py +109 -0
  171. axon_context_mcp-0.1.1/scripts/recall_savings_report.py +76 -0
  172. axon_context_mcp-0.1.1/scripts/vault-post-commit.sh +34 -0
  173. axon_context_mcp-0.1.1/setup.sh +258 -0
  174. axon_context_mcp-0.1.1/site/README.md +7 -0
  175. axon_context_mcp-0.1.1/site/index.html +190 -0
  176. axon_context_mcp-0.1.1/site/style.css +315 -0
  177. axon_context_mcp-0.1.1/src/axon/__init__.py +0 -0
  178. axon_context_mcp-0.1.1/src/axon/__main__.py +488 -0
  179. axon_context_mcp-0.1.1/src/axon/adr/__init__.py +0 -0
  180. axon_context_mcp-0.1.1/src/axon/adr/audit.py +119 -0
  181. axon_context_mcp-0.1.1/src/axon/adr/commit_context.py +98 -0
  182. axon_context_mcp-0.1.1/src/axon/adr/draft_pool.py +212 -0
  183. axon_context_mcp-0.1.1/src/axon/adr/gates/__init__.py +159 -0
  184. axon_context_mcp-0.1.1/src/axon/adr/gates/density.py +105 -0
  185. axon_context_mcp-0.1.1/src/axon/adr/gates/l1.py +131 -0
  186. axon_context_mcp-0.1.1/src/axon/adr/gates/l2.py +84 -0
  187. axon_context_mcp-0.1.1/src/axon/adr/gates/l3.py +37 -0
  188. axon_context_mcp-0.1.1/src/axon/adr/gates/structural.py +109 -0
  189. axon_context_mcp-0.1.1/src/axon/adr/inference.py +245 -0
  190. axon_context_mcp-0.1.1/src/axon/adr/lexicon.py +35 -0
  191. axon_context_mcp-0.1.1/src/axon/adr/signal.py +97 -0
  192. axon_context_mcp-0.1.1/src/axon/benchmark/__init__.py +84 -0
  193. axon_context_mcp-0.1.1/src/axon/benchmark/compression_fallback.py +93 -0
  194. axon_context_mcp-0.1.1/src/axon/benchmark/contracts.py +62 -0
  195. axon_context_mcp-0.1.1/src/axon/benchmark/fixtures/__init__.py +1 -0
  196. axon_context_mcp-0.1.1/src/axon/benchmark/fixtures/model_eval_cases.py +94 -0
  197. axon_context_mcp-0.1.1/src/axon/benchmark/fixtures/supersession_gold.py +253 -0
  198. axon_context_mcp-0.1.1/src/axon/benchmark/harness.py +21 -0
  199. axon_context_mcp-0.1.1/src/axon/benchmark/model_eval.py +244 -0
  200. axon_context_mcp-0.1.1/src/axon/benchmark/recall.py +287 -0
  201. axon_context_mcp-0.1.1/src/axon/benchmark/reporting.py +133 -0
  202. axon_context_mcp-0.1.1/src/axon/benchmark/retrieval.py +210 -0
  203. axon_context_mcp-0.1.1/src/axon/benchmark/retrieval_eval.py +72 -0
  204. axon_context_mcp-0.1.1/src/axon/benchmark/setup_mode.py +151 -0
  205. axon_context_mcp-0.1.1/src/axon/benchmark/suite.py +28 -0
  206. axon_context_mcp-0.1.1/src/axon/benchmark/supersession.py +166 -0
  207. axon_context_mcp-0.1.1/src/axon/cli/pb.py +2232 -0
  208. axon_context_mcp-0.1.1/src/axon/cli/setup.py +285 -0
  209. axon_context_mcp-0.1.1/src/axon/cli/setup_session.py +14 -0
  210. axon_context_mcp-0.1.1/src/axon/code/__init__.py +0 -0
  211. axon_context_mcp-0.1.1/src/axon/code/diff_symbols.py +71 -0
  212. axon_context_mcp-0.1.1/src/axon/code/indexer.py +80 -0
  213. axon_context_mcp-0.1.1/src/axon/code/resolver.py +104 -0
  214. axon_context_mcp-0.1.1/src/axon/config/__init__.py +5 -0
  215. axon_context_mcp-0.1.1/src/axon/config/data_root.py +30 -0
  216. axon_context_mcp-0.1.1/src/axon/config/platform.py +289 -0
  217. axon_context_mcp-0.1.1/src/axon/config/projects.py +111 -0
  218. axon_context_mcp-0.1.1/src/axon/config/runtime.py +806 -0
  219. axon_context_mcp-0.1.1/src/axon/context/__init__.py +13 -0
  220. axon_context_mcp-0.1.1/src/axon/context/cache_key.py +23 -0
  221. axon_context_mcp-0.1.1/src/axon/context/compression_quality.py +113 -0
  222. axon_context_mcp-0.1.1/src/axon/context/contracts.py +142 -0
  223. axon_context_mcp-0.1.1/src/axon/context/detector.py +180 -0
  224. axon_context_mcp-0.1.1/src/axon/context/graph_source.py +279 -0
  225. axon_context_mcp-0.1.1/src/axon/context/registry.py +12 -0
  226. axon_context_mcp-0.1.1/src/axon/context/rtk.py +145 -0
  227. axon_context_mcp-0.1.1/src/axon/context/rtk_bootstrap.py +240 -0
  228. axon_context_mcp-0.1.1/src/axon/context/staleness.py +152 -0
  229. axon_context_mcp-0.1.1/src/axon/core/__init__.py +7 -0
  230. axon_context_mcp-0.1.1/src/axon/core/decision.py +87 -0
  231. axon_context_mcp-0.1.1/src/axon/core/edge.py +22 -0
  232. axon_context_mcp-0.1.1/src/axon/core/symbol.py +35 -0
  233. axon_context_mcp-0.1.1/src/axon/data/architectural_lexicon.txt +138 -0
  234. axon_context_mcp-0.1.1/src/axon/doctor/__init__.py +67 -0
  235. axon_context_mcp-0.1.1/src/axon/doctor/checks/__init__.py +0 -0
  236. axon_context_mcp-0.1.1/src/axon/doctor/checks/adr.py +39 -0
  237. axon_context_mcp-0.1.1/src/axon/doctor/checks/capture.py +137 -0
  238. axon_context_mcp-0.1.1/src/axon/doctor/checks/index_composition.py +86 -0
  239. axon_context_mcp-0.1.1/src/axon/doctor/checks/install_branch.py +60 -0
  240. axon_context_mcp-0.1.1/src/axon/doctor/checks/recall_savings.py +37 -0
  241. axon_context_mcp-0.1.1/src/axon/doctor/checks/toolchain.py +108 -0
  242. axon_context_mcp-0.1.1/src/axon/doctor/formatters/__init__.py +0 -0
  243. axon_context_mcp-0.1.1/src/axon/doctor/formatters/human.py +23 -0
  244. axon_context_mcp-0.1.1/src/axon/doctor/formatters/json.py +40 -0
  245. axon_context_mcp-0.1.1/src/axon/domains/__init__.py +15 -0
  246. axon_context_mcp-0.1.1/src/axon/domains/pack.py +155 -0
  247. axon_context_mcp-0.1.1/src/axon/embedder/__init__.py +0 -0
  248. axon_context_mcp-0.1.1/src/axon/embedder/chunker.py +751 -0
  249. axon_context_mcp-0.1.1/src/axon/embedder/engine.py +134 -0
  250. axon_context_mcp-0.1.1/src/axon/embedder/graph_extractor.py +241 -0
  251. axon_context_mcp-0.1.1/src/axon/embedder/md_chunker.py +453 -0
  252. axon_context_mcp-0.1.1/src/axon/embedder/pipeline.py +401 -0
  253. axon_context_mcp-0.1.1/src/axon/embedder/providers.py +145 -0
  254. axon_context_mcp-0.1.1/src/axon/embedder/tokens.py +8 -0
  255. axon_context_mcp-0.1.1/src/axon/exceptions.py +48 -0
  256. axon_context_mcp-0.1.1/src/axon/expansion/__init__.py +32 -0
  257. axon_context_mcp-0.1.1/src/axon/expansion/budget.py +115 -0
  258. axon_context_mcp-0.1.1/src/axon/expansion/collector.py +41 -0
  259. axon_context_mcp-0.1.1/src/axon/expansion/extractors.py +322 -0
  260. axon_context_mcp-0.1.1/src/axon/expansion/models.py +64 -0
  261. axon_context_mcp-0.1.1/src/axon/expansion/registry.py +107 -0
  262. axon_context_mcp-0.1.1/src/axon/expansion/scoring.py +391 -0
  263. axon_context_mcp-0.1.1/src/axon/expansion/service.py +747 -0
  264. axon_context_mcp-0.1.1/src/axon/expansion/staging.py +129 -0
  265. axon_context_mcp-0.1.1/src/axon/expansion/telemetry.py +42 -0
  266. axon_context_mcp-0.1.1/src/axon/expansion/transport.py +34 -0
  267. axon_context_mcp-0.1.1/src/axon/hooks/__init__.py +1 -0
  268. axon_context_mcp-0.1.1/src/axon/hooks/file_bridge.py +56 -0
  269. axon_context_mcp-0.1.1/src/axon/hooks/git_event.py +297 -0
  270. axon_context_mcp-0.1.1/src/axon/hooks/git_installer.py +146 -0
  271. axon_context_mcp-0.1.1/src/axon/hooks/husky_integration.py +45 -0
  272. axon_context_mcp-0.1.1/src/axon/hooks/precommit_integration.py +76 -0
  273. axon_context_mcp-0.1.1/src/axon/hooks/toolchain_detector.py +73 -0
  274. axon_context_mcp-0.1.1/src/axon/http/__init__.py +0 -0
  275. axon_context_mcp-0.1.1/src/axon/http/app.py +303 -0
  276. axon_context_mcp-0.1.1/src/axon/http/dashboard.py +185 -0
  277. axon_context_mcp-0.1.1/src/axon/mcp/__init__.py +0 -0
  278. axon_context_mcp-0.1.1/src/axon/mcp/server.py +1298 -0
  279. axon_context_mcp-0.1.1/src/axon/memory/__init__.py +0 -0
  280. axon_context_mcp-0.1.1/src/axon/memory/session_compressor.py +69 -0
  281. axon_context_mcp-0.1.1/src/axon/memory/session_hook.py +49 -0
  282. axon_context_mcp-0.1.1/src/axon/observability/__init__.py +18 -0
  283. axon_context_mcp-0.1.1/src/axon/observability/compliance.py +27 -0
  284. axon_context_mcp-0.1.1/src/axon/observability/compression_telemetry.py +126 -0
  285. axon_context_mcp-0.1.1/src/axon/observability/gain.py +178 -0
  286. axon_context_mcp-0.1.1/src/axon/observability/logger.py +79 -0
  287. axon_context_mcp-0.1.1/src/axon/observability/recall_telemetry.py +89 -0
  288. axon_context_mcp-0.1.1/src/axon/observability/savings.py +108 -0
  289. axon_context_mcp-0.1.1/src/axon/observability/trace_store.py +160 -0
  290. axon_context_mcp-0.1.1/src/axon/observability/traced_tool.py +241 -0
  291. axon_context_mcp-0.1.1/src/axon/obsidian/__init__.py +0 -0
  292. axon_context_mcp-0.1.1/src/axon/obsidian/discovery.py +74 -0
  293. axon_context_mcp-0.1.1/src/axon/obsidian/exporter.py +126 -0
  294. axon_context_mcp-0.1.1/src/axon/obsidian/importer.py +286 -0
  295. axon_context_mcp-0.1.1/src/axon/pet/README.md +57 -0
  296. axon_context_mcp-0.1.1/src/axon/pet/__init__.py +12 -0
  297. axon_context_mcp-0.1.1/src/axon/pet/__main__.py +12 -0
  298. axon_context_mcp-0.1.1/src/axon/pet/familiar.py +502 -0
  299. axon_context_mcp-0.1.1/src/axon/policy/__init__.py +15 -0
  300. axon_context_mcp-0.1.1/src/axon/policy/core.py +278 -0
  301. axon_context_mcp-0.1.1/src/axon/portability/__init__.py +15 -0
  302. axon_context_mcp-0.1.1/src/axon/portability/exporter.py +178 -0
  303. axon_context_mcp-0.1.1/src/axon/portability/importer.py +55 -0
  304. axon_context_mcp-0.1.1/src/axon/recall/__init__.py +6 -0
  305. axon_context_mcp-0.1.1/src/axon/recall/strategy.py +251 -0
  306. axon_context_mcp-0.1.1/src/axon/recall/supersession.py +80 -0
  307. axon_context_mcp-0.1.1/src/axon/registry/__init__.py +9 -0
  308. axon_context_mcp-0.1.1/src/axon/registry/contracts.py +64 -0
  309. axon_context_mcp-0.1.1/src/axon/registry/local.py +192 -0
  310. axon_context_mcp-0.1.1/src/axon/repo/__init__.py +1 -0
  311. axon_context_mcp-0.1.1/src/axon/repo/file_walk.py +105 -0
  312. axon_context_mcp-0.1.1/src/axon/resilience/__init__.py +3 -0
  313. axon_context_mcp-0.1.1/src/axon/resilience/circuit_breaker.py +84 -0
  314. axon_context_mcp-0.1.1/src/axon/resilience/rate_limiter.py +95 -0
  315. axon_context_mcp-0.1.1/src/axon/retrieval/__init__.py +0 -0
  316. axon_context_mcp-0.1.1/src/axon/retrieval/self_correct.py +129 -0
  317. axon_context_mcp-0.1.1/src/axon/router/__init__.py +0 -0
  318. axon_context_mcp-0.1.1/src/axon/router/classifier.py +105 -0
  319. axon_context_mcp-0.1.1/src/axon/router/compressor.py +133 -0
  320. axon_context_mcp-0.1.1/src/axon/router/engine.py +323 -0
  321. axon_context_mcp-0.1.1/src/axon/router/llm_backend.py +74 -0
  322. axon_context_mcp-0.1.1/src/axon/router/profiles.py +79 -0
  323. axon_context_mcp-0.1.1/src/axon/router/provider_validation.py +39 -0
  324. axon_context_mcp-0.1.1/src/axon/store/__init__.py +0 -0
  325. axon_context_mcp-0.1.1/src/axon/store/_session_columns.py +62 -0
  326. axon_context_mcp-0.1.1/src/axon/store/collections.py +37 -0
  327. axon_context_mcp-0.1.1/src/axon/store/failure_store.py +124 -0
  328. axon_context_mcp-0.1.1/src/axon/store/file_cache.py +78 -0
  329. axon_context_mcp-0.1.1/src/axon/store/index_lock.py +134 -0
  330. axon_context_mcp-0.1.1/src/axon/store/migrations/pg/0001_session_baseline.sql +37 -0
  331. axon_context_mcp-0.1.1/src/axon/store/migrations/pg/0002_natural_key_indexes.sql +9 -0
  332. axon_context_mcp-0.1.1/src/axon/store/outcome_store.py +116 -0
  333. axon_context_mcp-0.1.1/src/axon/store/pending.py +193 -0
  334. axon_context_mcp-0.1.1/src/axon/store/pg_decision_repository.py +218 -0
  335. axon_context_mcp-0.1.1/src/axon/store/pg_file_cache.py +103 -0
  336. axon_context_mcp-0.1.1/src/axon/store/pg_graph_repository.py +213 -0
  337. axon_context_mcp-0.1.1/src/axon/store/pg_migrations.py +54 -0
  338. axon_context_mcp-0.1.1/src/axon/store/pg_session_repository.py +186 -0
  339. axon_context_mcp-0.1.1/src/axon/store/pg_symbol_deps.py +88 -0
  340. axon_context_mcp-0.1.1/src/axon/store/pg_vector_store.py +274 -0
  341. axon_context_mcp-0.1.1/src/axon/store/retry.py +56 -0
  342. axon_context_mcp-0.1.1/src/axon/store/session_store.py +285 -0
  343. axon_context_mcp-0.1.1/src/axon/store/vector_common.py +166 -0
  344. axon_context_mcp-0.1.1/src/axon/store/vector_store_factory.py +10 -0
  345. axon_context_mcp-0.1.1/src/axon/templates/adr_classifier.txt +20 -0
  346. axon_context_mcp-0.1.1/src/axon/templates/adr_project.md.jinja +21 -0
  347. axon_context_mcp-0.1.1/src/axon/templates/post_commit_hook.sh +14 -0
  348. axon_context_mcp-0.1.1/src/axon/triggers/__init__.py +0 -0
  349. axon_context_mcp-0.1.1/src/axon/triggers/scope_detector.py +62 -0
  350. axon_context_mcp-0.1.1/src/axon/validation/__init__.py +0 -0
  351. axon_context_mcp-0.1.1/src/axon/validation/aggregate.py +43 -0
  352. axon_context_mcp-0.1.1/src/axon/validation/judge.py +45 -0
  353. axon_context_mcp-0.1.1/src/axon/validation/prompts.py +29 -0
  354. axon_context_mcp-0.1.1/src/axon/vault/__init__.py +0 -0
  355. axon_context_mcp-0.1.1/src/axon/vault/deep_suggester.py +89 -0
  356. axon_context_mcp-0.1.1/src/axon/vault/til_promoter.py +128 -0
  357. axon_context_mcp-0.1.1/src/axon/watcher/__init__.py +0 -0
  358. axon_context_mcp-0.1.1/src/axon/watcher/main.py +76 -0
  359. axon_context_mcp-0.1.1/src/embedder/__init__.py +1 -0
  360. axon_context_mcp-0.1.1/src/embedder/chunker.py +3 -0
  361. axon_context_mcp-0.1.1/tests/__init__.py +0 -0
  362. axon_context_mcp-0.1.1/tests/adr/__init__.py +0 -0
  363. axon_context_mcp-0.1.1/tests/adr/gates/__init__.py +0 -0
  364. axon_context_mcp-0.1.1/tests/adr/gates/test_density.py +97 -0
  365. axon_context_mcp-0.1.1/tests/adr/gates/test_l1.py +94 -0
  366. axon_context_mcp-0.1.1/tests/adr/gates/test_l2_l3.py +91 -0
  367. axon_context_mcp-0.1.1/tests/adr/gates/test_pipeline.py +120 -0
  368. axon_context_mcp-0.1.1/tests/adr/gates/test_structural.py +75 -0
  369. axon_context_mcp-0.1.1/tests/adr/test_adr_model_resolution.py +39 -0
  370. axon_context_mcp-0.1.1/tests/adr/test_audit.py +85 -0
  371. axon_context_mcp-0.1.1/tests/adr/test_clis.py +140 -0
  372. axon_context_mcp-0.1.1/tests/adr/test_draft_pool.py +126 -0
  373. axon_context_mcp-0.1.1/tests/adr/test_infer_commit_signal_gate.py +158 -0
  374. axon_context_mcp-0.1.1/tests/adr/test_inference.py +172 -0
  375. axon_context_mcp-0.1.1/tests/adr/test_signal.py +107 -0
  376. axon_context_mcp-0.1.1/tests/benchmark/__init__.py +1 -0
  377. axon_context_mcp-0.1.1/tests/benchmark/fixtures/exact_term_queries.json +42 -0
  378. axon_context_mcp-0.1.1/tests/benchmark/fixtures/retrieval_golden.json +28 -0
  379. axon_context_mcp-0.1.1/tests/benchmark/test_compression_fallback.py +29 -0
  380. axon_context_mcp-0.1.1/tests/benchmark/test_contracts.py +22 -0
  381. axon_context_mcp-0.1.1/tests/benchmark/test_harness.py +38 -0
  382. axon_context_mcp-0.1.1/tests/benchmark/test_model_eval.py +133 -0
  383. axon_context_mcp-0.1.1/tests/benchmark/test_reporting.py +57 -0
  384. axon_context_mcp-0.1.1/tests/benchmark/test_retrieval.py +33 -0
  385. axon_context_mcp-0.1.1/tests/benchmark/test_retrieval_eval.py +51 -0
  386. axon_context_mcp-0.1.1/tests/benchmark/test_setup_mode.py +26 -0
  387. axon_context_mcp-0.1.1/tests/benchmark/test_suite.py +20 -0
  388. axon_context_mcp-0.1.1/tests/benchmark/test_supersession_benchmark.py +30 -0
  389. axon_context_mcp-0.1.1/tests/benchmarks/test_model.py +62 -0
  390. axon_context_mcp-0.1.1/tests/benchmarks/test_scenarios.py +18 -0
  391. axon_context_mcp-0.1.1/tests/benchmarks/test_visualize.py +12 -0
  392. axon_context_mcp-0.1.1/tests/cli/__init__.py +0 -0
  393. axon_context_mcp-0.1.1/tests/cli/test_axon_cli.py +365 -0
  394. axon_context_mcp-0.1.1/tests/cli/test_gain_cli.py +126 -0
  395. axon_context_mcp-0.1.1/tests/cli/test_index_lock_guard.py +46 -0
  396. axon_context_mcp-0.1.1/tests/cli/test_open_file_cache_backend.py +31 -0
  397. axon_context_mcp-0.1.1/tests/cli/test_pb_cli.py +1017 -0
  398. axon_context_mcp-0.1.1/tests/cli/test_setup.py +194 -0
  399. axon_context_mcp-0.1.1/tests/cli/test_setup_session.py +32 -0
  400. axon_context_mcp-0.1.1/tests/code/__init__.py +0 -0
  401. axon_context_mcp-0.1.1/tests/code/test_diff_symbols.py +49 -0
  402. axon_context_mcp-0.1.1/tests/code/test_indexer.py +89 -0
  403. axon_context_mcp-0.1.1/tests/code/test_resolver.py +63 -0
  404. axon_context_mcp-0.1.1/tests/config/test_configure.py +170 -0
  405. axon_context_mcp-0.1.1/tests/config/test_db_backend.py +30 -0
  406. axon_context_mcp-0.1.1/tests/config/test_decisions_backend.py +25 -0
  407. axon_context_mcp-0.1.1/tests/config/test_fileindex_backend.py +25 -0
  408. axon_context_mcp-0.1.1/tests/config/test_graph_backend.py +25 -0
  409. axon_context_mcp-0.1.1/tests/config/test_platform.py +362 -0
  410. axon_context_mcp-0.1.1/tests/config/test_profiles.py +205 -0
  411. axon_context_mcp-0.1.1/tests/config/test_project_manifest.py +97 -0
  412. axon_context_mcp-0.1.1/tests/config/test_runtime.py +15 -0
  413. axon_context_mcp-0.1.1/tests/config/test_runtime_expansion.py +114 -0
  414. axon_context_mcp-0.1.1/tests/config/test_runtime_modes.py +37 -0
  415. axon_context_mcp-0.1.1/tests/config/test_runtime_pg.py +17 -0
  416. axon_context_mcp-0.1.1/tests/config/test_runtime_toml.py +57 -0
  417. axon_context_mcp-0.1.1/tests/config/test_scoring_config.py +20 -0
  418. axon_context_mcp-0.1.1/tests/config/test_sessions_backend.py +25 -0
  419. axon_context_mcp-0.1.1/tests/config/test_setup_script.py +245 -0
  420. axon_context_mcp-0.1.1/tests/config/test_vector_backend.py +25 -0
  421. axon_context_mcp-0.1.1/tests/conftest.py +111 -0
  422. axon_context_mcp-0.1.1/tests/context/test_cache_key.py +22 -0
  423. axon_context_mcp-0.1.1/tests/context/test_compression_quality.py +145 -0
  424. axon_context_mcp-0.1.1/tests/context/test_contracts.py +76 -0
  425. axon_context_mcp-0.1.1/tests/context/test_graph_source.py +157 -0
  426. axon_context_mcp-0.1.1/tests/context/test_graph_source_cache_pg.py +86 -0
  427. axon_context_mcp-0.1.1/tests/context/test_rtk_bootstrap.py +223 -0
  428. axon_context_mcp-0.1.1/tests/context/test_rtk_ccr.py +45 -0
  429. axon_context_mcp-0.1.1/tests/context/test_rtk_resolution.py +81 -0
  430. axon_context_mcp-0.1.1/tests/context/test_staleness.py +69 -0
  431. axon_context_mcp-0.1.1/tests/core/__init__.py +0 -0
  432. axon_context_mcp-0.1.1/tests/core/test_decision.py +130 -0
  433. axon_context_mcp-0.1.1/tests/core/test_edge.py +51 -0
  434. axon_context_mcp-0.1.1/tests/core/test_symbol.py +64 -0
  435. axon_context_mcp-0.1.1/tests/doctor/__init__.py +0 -0
  436. axon_context_mcp-0.1.1/tests/doctor/test_checks_adr.py +59 -0
  437. axon_context_mcp-0.1.1/tests/doctor/test_checks_capture.py +115 -0
  438. axon_context_mcp-0.1.1/tests/doctor/test_checks_index_composition.py +94 -0
  439. axon_context_mcp-0.1.1/tests/doctor/test_checks_install_branch.py +61 -0
  440. axon_context_mcp-0.1.1/tests/doctor/test_checks_recall_savings.py +53 -0
  441. axon_context_mcp-0.1.1/tests/doctor/test_checks_toolchain.py +76 -0
  442. axon_context_mcp-0.1.1/tests/doctor/test_cli_doctor.py +106 -0
  443. axon_context_mcp-0.1.1/tests/domains/__init__.py +1 -0
  444. axon_context_mcp-0.1.1/tests/domains/fixtures/software/domain-pack.json +40 -0
  445. axon_context_mcp-0.1.1/tests/domains/test_pack.py +124 -0
  446. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/adr_manager.py +76 -0
  447. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/chunker_utils.py +36 -0
  448. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/context_detector.py +37 -0
  449. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/embedder_engine.py +55 -0
  450. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/graph_service.py +43 -0
  451. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/router.py +40 -0
  452. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/session_store.py +57 -0
  453. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/simple_service.py +35 -0
  454. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/til_promoter.py +44 -0
  455. axon_context_mcp-0.1.1/tests/embedder/fixtures/python/vector_store.py +50 -0
  456. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/AbstractAuditService.java +31 -0
  457. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/AnonymousClassService.java +33 -0
  458. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/AspectConfig.java +33 -0
  459. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/AsyncService.java +27 -0
  460. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/AuditLog.java +33 -0
  461. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/CacheConfig.java +19 -0
  462. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/CircuitBreakerService.java +24 -0
  463. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/CommandHandler.java +23 -0
  464. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/ConditionalBeanConfig.java +20 -0
  465. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/ConfigProperties.java +26 -0
  466. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/CustomAnnotation.java +12 -0
  467. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/DefaultMethodInterface.java +18 -0
  468. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/EnumWithMethods.java +25 -0
  469. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/EventDrivenService.java +31 -0
  470. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/GenericBoundedService.java +16 -0
  471. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/GenericRepositoryService.java +25 -0
  472. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/GlobalExceptionHandler.java +24 -0
  473. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/KafkaConsumerService.java +43 -0
  474. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/LambdaChainService.java +44 -0
  475. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/LargeServiceClass.java +168 -0
  476. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/MultipleInnerClassService.java +51 -0
  477. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/NestedGenericService.java +29 -0
  478. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/NonStaticInnerClassService.java +28 -0
  479. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/NotificationService.java +39 -0
  480. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/OrderRepository.java +16 -0
  481. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/OrderService.java +330 -0
  482. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/OrderStatusEnum.java +19 -0
  483. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/PaymentService.java +20 -0
  484. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/ProductController.java +50 -0
  485. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/ReactiveController.java +29 -0
  486. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/RecordWithCompactConstructor.java +37 -0
  487. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/RetryableService.java +23 -0
  488. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/ScheduledTaskService.java +28 -0
  489. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/SchedulerConfig.java +25 -0
  490. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/SecurityService.java +26 -0
  491. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/SelfInvocationService.java +30 -0
  492. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/SimpleController.java +23 -0
  493. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/StaticInnerClassService.java +24 -0
  494. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/StreamProcessingAdvanced.java +37 -0
  495. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/StreamProcessingService.java +36 -0
  496. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/TransactionalService.java +51 -0
  497. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/UserRecord.java +9 -0
  498. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/UserService.java +29 -0
  499. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/ValidationService.java +23 -0
  500. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/WebClientWrapper.java +39 -0
  501. axon_context_mcp-0.1.1/tests/embedder/fixtures/spring/WildcardService.java +26 -0
  502. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/api_client.ts +40 -0
  503. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/chunker.ts +38 -0
  504. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/collections.ts +23 -0
  505. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/context_detector.ts +48 -0
  506. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/cost_tracker.ts +48 -0
  507. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/mcp_tools.ts +47 -0
  508. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/platform_utils.ts +52 -0
  509. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/router.ts +33 -0
  510. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/session_manager.ts +44 -0
  511. axon_context_mcp-0.1.1/tests/embedder/fixtures/typescript/vault_client.ts +41 -0
  512. axon_context_mcp-0.1.1/tests/embedder/test_batching.py +130 -0
  513. axon_context_mcp-0.1.1/tests/embedder/test_chunker_java.py +854 -0
  514. axon_context_mcp-0.1.1/tests/embedder/test_chunker_markdown.py +321 -0
  515. axon_context_mcp-0.1.1/tests/embedder/test_chunker_python.py +104 -0
  516. axon_context_mcp-0.1.1/tests/embedder/test_chunker_size_cap.py +100 -0
  517. axon_context_mcp-0.1.1/tests/embedder/test_chunker_typescript.py +113 -0
  518. axon_context_mcp-0.1.1/tests/embedder/test_crash_safety.py +65 -0
  519. axon_context_mcp-0.1.1/tests/embedder/test_cross_ctx_no_false_positive.py +104 -0
  520. axon_context_mcp-0.1.1/tests/embedder/test_deleted_file_cleanup.py +67 -0
  521. axon_context_mcp-0.1.1/tests/embedder/test_embedder_chain.py +167 -0
  522. axon_context_mcp-0.1.1/tests/embedder/test_engine_dimension.py +66 -0
  523. axon_context_mcp-0.1.1/tests/embedder/test_engine_providers.py +138 -0
  524. axon_context_mcp-0.1.1/tests/embedder/test_excluded_dir_sync.py +19 -0
  525. axon_context_mcp-0.1.1/tests/embedder/test_file_walk.py +31 -0
  526. axon_context_mcp-0.1.1/tests/embedder/test_graph_extractor.py +77 -0
  527. axon_context_mcp-0.1.1/tests/embedder/test_graph_extractor_ts_java.py +152 -0
  528. axon_context_mcp-0.1.1/tests/embedder/test_incremental_skip.py +92 -0
  529. axon_context_mcp-0.1.1/tests/embedder/test_md_frontmatter.py +36 -0
  530. axon_context_mcp-0.1.1/tests/embedder/test_md_packing.py +89 -0
  531. axon_context_mcp-0.1.1/tests/embedder/test_md_relations.py +109 -0
  532. axon_context_mcp-0.1.1/tests/embedder/test_md_sections.py +21 -0
  533. axon_context_mcp-0.1.1/tests/embedder/test_md_split.py +103 -0
  534. axon_context_mcp-0.1.1/tests/embedder/test_orphan_reconcile.py +136 -0
  535. axon_context_mcp-0.1.1/tests/embedder/test_parse_once.py +162 -0
  536. axon_context_mcp-0.1.1/tests/embedder/test_pipeline_batching.py +200 -0
  537. axon_context_mcp-0.1.1/tests/embedder/test_pipeline_chunk_id.py +51 -0
  538. axon_context_mcp-0.1.1/tests/embedder/test_pipeline_excludes.py +255 -0
  539. axon_context_mcp-0.1.1/tests/embedder/test_pipeline_symbol_deps.py +64 -0
  540. axon_context_mcp-0.1.1/tests/embedder/test_provider_smoke.py +72 -0
  541. axon_context_mcp-0.1.1/tests/embedder/test_single_file_reconcile_scope.py +86 -0
  542. axon_context_mcp-0.1.1/tests/embedder/test_tokens.py +9 -0
  543. axon_context_mcp-0.1.1/tests/expansion/helpers.py +32 -0
  544. axon_context_mcp-0.1.1/tests/expansion/test_collector.py +214 -0
  545. axon_context_mcp-0.1.1/tests/expansion/test_expand_cli_contract.py +182 -0
  546. axon_context_mcp-0.1.1/tests/expansion/test_scoring.py +177 -0
  547. axon_context_mcp-0.1.1/tests/expansion/test_service_integration.py +328 -0
  548. axon_context_mcp-0.1.1/tests/expansion/test_service_security.py +134 -0
  549. axon_context_mcp-0.1.1/tests/hooks/__init__.py +0 -0
  550. axon_context_mcp-0.1.1/tests/hooks/test_file_bridge.py +83 -0
  551. axon_context_mcp-0.1.1/tests/hooks/test_git_event.py +374 -0
  552. axon_context_mcp-0.1.1/tests/hooks/test_git_installer.py +75 -0
  553. axon_context_mcp-0.1.1/tests/hooks/test_hooks_cli.py +93 -0
  554. axon_context_mcp-0.1.1/tests/hooks/test_precommit_integration.py +52 -0
  555. axon_context_mcp-0.1.1/tests/hooks/test_toolchain_detector.py +68 -0
  556. axon_context_mcp-0.1.1/tests/http/__init__.py +0 -0
  557. axon_context_mcp-0.1.1/tests/http/test_chat_completions.py +584 -0
  558. axon_context_mcp-0.1.1/tests/http/test_dashboard.py +159 -0
  559. axon_context_mcp-0.1.1/tests/integration/test_second_brain_e2e.py +139 -0
  560. axon_context_mcp-0.1.1/tests/mcp/test_ask_self_correct.py +95 -0
  561. axon_context_mcp-0.1.1/tests/mcp/test_axon_tools.py +176 -0
  562. axon_context_mcp-0.1.1/tests/mcp/test_get_dependencies_pg.py +52 -0
  563. axon_context_mcp-0.1.1/tests/mcp/test_graph_context_fallback.py +40 -0
  564. axon_context_mcp-0.1.1/tests/mcp/test_graph_context_tool.py +85 -0
  565. axon_context_mcp-0.1.1/tests/mcp/test_graph_tools.py +67 -0
  566. axon_context_mcp-0.1.1/tests/mcp/test_retrieval_tools.py +915 -0
  567. axon_context_mcp-0.1.1/tests/mcp/test_reversible.py +28 -0
  568. axon_context_mcp-0.1.1/tests/mcp/test_session_tools.py +85 -0
  569. axon_context_mcp-0.1.1/tests/mcp/test_traced_tools_integration.py +130 -0
  570. axon_context_mcp-0.1.1/tests/mcp/test_validation_stats_tool.py +123 -0
  571. axon_context_mcp-0.1.1/tests/observability/test_compression_telemetry.py +171 -0
  572. axon_context_mcp-0.1.1/tests/observability/test_conftest_isolation.py +24 -0
  573. axon_context_mcp-0.1.1/tests/observability/test_gain.py +288 -0
  574. axon_context_mcp-0.1.1/tests/observability/test_recall_telemetry.py +109 -0
  575. axon_context_mcp-0.1.1/tests/observability/test_savings.py +83 -0
  576. axon_context_mcp-0.1.1/tests/observability/test_trace_store.py +202 -0
  577. axon_context_mcp-0.1.1/tests/observability/test_traced_tool.py +227 -0
  578. axon_context_mcp-0.1.1/tests/observability/test_traced_tool_policy.py +193 -0
  579. axon_context_mcp-0.1.1/tests/obsidian/__init__.py +0 -0
  580. axon_context_mcp-0.1.1/tests/obsidian/test_discovery.py +58 -0
  581. axon_context_mcp-0.1.1/tests/obsidian/test_exporter.py +130 -0
  582. axon_context_mcp-0.1.1/tests/obsidian/test_importer.py +339 -0
  583. axon_context_mcp-0.1.1/tests/pet/__init__.py +0 -0
  584. axon_context_mcp-0.1.1/tests/pet/test_familiar.py +292 -0
  585. axon_context_mcp-0.1.1/tests/policy/test_registry.py +75 -0
  586. axon_context_mcp-0.1.1/tests/policy/test_work_barrier.py +136 -0
  587. axon_context_mcp-0.1.1/tests/portability/__init__.py +1 -0
  588. axon_context_mcp-0.1.1/tests/portability/test_exporter.py +186 -0
  589. axon_context_mcp-0.1.1/tests/portability/test_importer.py +99 -0
  590. axon_context_mcp-0.1.1/tests/recall/__init__.py +0 -0
  591. axon_context_mcp-0.1.1/tests/recall/baseline.json +188 -0
  592. axon_context_mcp-0.1.1/tests/recall/golden_set.json +22 -0
  593. axon_context_mcp-0.1.1/tests/recall/test_recall_guard.py +146 -0
  594. axon_context_mcp-0.1.1/tests/recall/test_recall_pgvector_path.py +88 -0
  595. axon_context_mcp-0.1.1/tests/recall/test_strategy.py +101 -0
  596. axon_context_mcp-0.1.1/tests/recall/test_supersession.py +278 -0
  597. axon_context_mcp-0.1.1/tests/recall/test_supersession_similarity.py +41 -0
  598. axon_context_mcp-0.1.1/tests/registry/__init__.py +1 -0
  599. axon_context_mcp-0.1.1/tests/registry/test_contracts.py +38 -0
  600. axon_context_mcp-0.1.1/tests/registry/test_local_registry.py +223 -0
  601. axon_context_mcp-0.1.1/tests/resilience/test_circuit_breaker.py +30 -0
  602. axon_context_mcp-0.1.1/tests/resilience/test_rate_limiter.py +115 -0
  603. axon_context_mcp-0.1.1/tests/retrieval/__init__.py +0 -0
  604. axon_context_mcp-0.1.1/tests/retrieval/test_correct_retrieval.py +108 -0
  605. axon_context_mcp-0.1.1/tests/retrieval/test_self_correct_cascade.py +47 -0
  606. axon_context_mcp-0.1.1/tests/router/test_budget_guardrails.py +80 -0
  607. axon_context_mcp-0.1.1/tests/router/test_complete_usage.py +141 -0
  608. axon_context_mcp-0.1.1/tests/router/test_compressor.py +197 -0
  609. axon_context_mcp-0.1.1/tests/router/test_llm_backend.py +47 -0
  610. axon_context_mcp-0.1.1/tests/router/test_pinned_model.py +294 -0
  611. axon_context_mcp-0.1.1/tests/router/test_provider_validation.py +27 -0
  612. axon_context_mcp-0.1.1/tests/router/test_router.py +183 -0
  613. axon_context_mcp-0.1.1/tests/scripts/__init__.py +0 -0
  614. axon_context_mcp-0.1.1/tests/scripts/test_build_ablation_index.py +146 -0
  615. axon_context_mcp-0.1.1/tests/scripts/test_check_onboarding_drift.py +143 -0
  616. axon_context_mcp-0.1.1/tests/scripts/test_recall_savings_report.py +108 -0
  617. axon_context_mcp-0.1.1/tests/store/__init__.py +0 -0
  618. axon_context_mcp-0.1.1/tests/store/test_concurrent_pool_init.py +183 -0
  619. axon_context_mcp-0.1.1/tests/store/test_decision_repo_methods.py +98 -0
  620. axon_context_mcp-0.1.1/tests/store/test_graph_listing.py +70 -0
  621. axon_context_mcp-0.1.1/tests/store/test_graph_methods.py +134 -0
  622. axon_context_mcp-0.1.1/tests/store/test_index_lock.py +98 -0
  623. axon_context_mcp-0.1.1/tests/store/test_pending.py +163 -0
  624. axon_context_mcp-0.1.1/tests/store/test_pg_decision_repository.py +128 -0
  625. axon_context_mcp-0.1.1/tests/store/test_pg_failure_store.py +73 -0
  626. axon_context_mcp-0.1.1/tests/store/test_pg_file_cache.py +65 -0
  627. axon_context_mcp-0.1.1/tests/store/test_pg_graph_repository.py +104 -0
  628. axon_context_mcp-0.1.1/tests/store/test_pg_migrations.py +141 -0
  629. axon_context_mcp-0.1.1/tests/store/test_pg_outcome_store.py +62 -0
  630. axon_context_mcp-0.1.1/tests/store/test_pg_session_repository.py +58 -0
  631. axon_context_mcp-0.1.1/tests/store/test_pg_session_repository_lifecycle.py +123 -0
  632. axon_context_mcp-0.1.1/tests/store/test_pg_symbol_deps.py +46 -0
  633. axon_context_mcp-0.1.1/tests/store/test_pg_vector_dim_guard.py +54 -0
  634. axon_context_mcp-0.1.1/tests/store/test_pg_vector_store.py +206 -0
  635. axon_context_mcp-0.1.1/tests/store/test_pg_vector_store_hybrid.py +185 -0
  636. axon_context_mcp-0.1.1/tests/store/test_rank_and_limit.py +73 -0
  637. axon_context_mcp-0.1.1/tests/store/test_retry.py +91 -0
  638. axon_context_mcp-0.1.1/tests/store/test_save_code_change_unification.py +115 -0
  639. axon_context_mcp-0.1.1/tests/store/test_session_decisions_backend.py +24 -0
  640. axon_context_mcp-0.1.1/tests/store/test_session_graph_backend.py +24 -0
  641. axon_context_mcp-0.1.1/tests/store/test_session_sessions_backend.py +24 -0
  642. axon_context_mcp-0.1.1/tests/store/test_session_store_find_by_hash.py +77 -0
  643. axon_context_mcp-0.1.1/tests/store/test_stores.py +151 -0
  644. axon_context_mcp-0.1.1/tests/store/test_vector_common.py +31 -0
  645. axon_context_mcp-0.1.1/tests/store/test_vector_size_default.py +54 -0
  646. axon_context_mcp-0.1.1/tests/store/test_vector_store_factory.py +43 -0
  647. axon_context_mcp-0.1.1/tests/test_file_walk_security.py +93 -0
  648. axon_context_mcp-0.1.1/tests/test_no_mem0.py +16 -0
  649. axon_context_mcp-0.1.1/tests/test_no_qdrant.py +48 -0
  650. axon_context_mcp-0.1.1/tests/test_no_redis.py +39 -0
  651. axon_context_mcp-0.1.1/tests/test_no_sqlite.py +48 -0
  652. axon_context_mcp-0.1.1/tests/triggers/__init__.py +0 -0
  653. axon_context_mcp-0.1.1/tests/triggers/test_scope_detector.py +53 -0
  654. axon_context_mcp-0.1.1/tests/validation/__init__.py +0 -0
  655. axon_context_mcp-0.1.1/tests/validation/test_judge.py +69 -0
  656. axon_context_mcp-0.1.1/tests/validation/test_pass_rate.py +138 -0
@@ -0,0 +1,43 @@
1
+ # Onboards axon to the global agentic loop (~/.claude/agents/forge.md).
2
+ # See docs/superpowers/specs/*loop-multi-repo-config*.
3
+
4
+ # wiring
5
+ repo_slug: sammyjdev/axon
6
+ default_branch: master # axon uses master, not main
7
+ # Gate mirrors what CI actually enforces (router + resilience) and extends pytest
8
+ # to the working area for the current backlog (store + scripts + cli + doctor).
9
+ # tests/cli and tests/doctor were verified green (non-interactive, no skips) on
10
+ # 2026-07-06 before being added here - see issue #60, which touches both dirs.
11
+ # It does NOT run the full suite: tests/config and tests/benchmark carry
12
+ # pre-existing failures that CI never gated (ci.yml only runs router+resilience).
13
+ # See the "test-debt + expand CI" backlog item before widening further.
14
+ gate_cmd: "ruff check src/axon/router src/axon/resilience tests/router tests/resilience && pytest tests/router tests/resilience tests/store tests/scripts tests/cli tests/doctor -q"
15
+ setup_cmd: "pip install -e \".[dev]\"" # same as CI (ci.yml); shared venv already provisioned
16
+ labels:
17
+ ready: agent:ready
18
+ blocked: agent:blocked
19
+
20
+ # posture (axon is an internal context engine, not a customer-facing product)
21
+ posture: internal
22
+ risk_areas:
23
+ - restricted-context # ctx=work; DENY_RESTRICTED_TOOL_WRITE (dec-109) - never bypass
24
+ - destructive-tools # AXON_ALLOW_DESTRUCTIVE gate; default deny
25
+ - secrets # .env / API keys - never commit
26
+ - chunker # Java chunker is a release gate (D5) - do not weaken its tests
27
+ - migration # relational backend cutover (dec-121); SQLite rollback must survive
28
+ quality_rubric:
29
+ testability: true
30
+ scalability: true
31
+ progression: true
32
+
33
+ # Notes for the loop operator (axon-specific):
34
+ # - Worktrees are SAFE here: the root conftest.py inserts the worktree-relative
35
+ # src (no editable install), so per-worktree tests validate that worktree's code.
36
+ # - pytest can HANG ON EXIT (unclosed asyncpg pool past the printed summary);
37
+ # wrap gate runs in a timeout and read the printed "N passed/failed".
38
+ # - The full `pytest -q` is RED on master from pre-existing test debt (config mode
39
+ # default, benchmark, some hooks TTY+Windows cases) - that is NOT a regression
40
+ # and NOT an env leak; it is simply outside the CI gate. Do not treat it as a
41
+ # base failure; widen the gate only after the test-debt backlog item lands.
42
+ # (tests/doctor was moved out of this exclusion list on 2026-07-06 - it is
43
+ # green and now part of gate_cmd above.)
@@ -0,0 +1,107 @@
1
+ # AXON environment template
2
+ # Most users only need to review these values after `./setup.sh` creates `.env.local`.
3
+ # The usual edits are: engine path, vault path, and any cloud API keys.
4
+
5
+ # Required local paths
6
+ AXON_ENGINE=~/dev/axon
7
+ AXON_VAULT=~/vault
8
+
9
+ # Setup/bootstrap mode. setup.sh persists the resolved mode into .env.local.
10
+ # Supported values: full-local, hybrid-local, remote-infra, minimal.
11
+ AXON_RUNTIME_MODE=full-local
12
+
13
+ # Optional: point setup.sh at a remote Docker/Ollama host before running it.
14
+ # setup.sh writes the matching service URLs into `.env.local` automatically.
15
+ # AXON_INFRA_HOST=192.168.x.x
16
+
17
+ # Routing profile: "free" (Groq + NVIDIA NIM free tiers) ou "paid"
18
+ # (OpenRouter Claude D2 + Groq pago). FREE é o default — sem custo direto,
19
+ # mas sujeito a rate limits dos provedores.
20
+ AXON_PROVIDER_PROFILE=free
21
+
22
+ # Chaves dos provedores selecionados pelo profile ativo.
23
+ # FREE precisa: GROQ_API_KEY + NVIDIA_NIM_API_KEY
24
+ # PAID precisa: OPENROUTER_API_KEY + GROQ_API_KEY (Groq pago)
25
+ GROQ_API_KEY=your-groq-api-key
26
+ NVIDIA_NIM_API_KEY=your-nvidia-nim-api-key
27
+ OPENROUTER_API_KEY=your-openrouter-api-key
28
+
29
+ # Anthropic API direta (opcional; profiles free/paid não usam)
30
+ ANTHROPIC_API_KEY=your-anthropic-api-key
31
+
32
+ # Core service defaults
33
+ QDRANT_URL=http://localhost:6333
34
+ REDIS_URL=redis://localhost:6379
35
+ LANGFUSE_HOST=http://localhost:3000
36
+ AXON_OLLAMA_LOCAL_HOST=http://127.0.0.1:11434
37
+ AXON_OLLAMA_REMOTE_HOST=
38
+
39
+ # Langfuse / local infra secrets
40
+ LANGFUSE_NEXTAUTH_SECRET=change-me
41
+ LANGFUSE_SALT=change-me
42
+ POSTGRES_USER=axon
43
+ POSTGRES_PASSWORD=change-me
44
+ POSTGRES_DB=langfuse
45
+
46
+ # Runtime defaults
47
+ AXON_RTK_MAX_TOKENS=450
48
+ AXON_CAVEMAN_MODEL=phi3:mini
49
+ # Path to the rtkx binary. Leave unset to auto-resolve:
50
+ # AXON_RTK_BIN -> ~/.axon/bin/rtkx (installed by `axon rtk-init`) -> PATH (rtkx, then rtk).
51
+ # AXON_RTK_BIN=/custom/path/to/rtkx
52
+ AXON_DAILY_BUDGET=5.0
53
+ AXON_OPUS_BUDGET=2.0
54
+ AXON_MAX_PRE_SEND_TOKENS=8000
55
+ AXON_PROVIDER_ANTHROPIC=1
56
+ AXON_PROVIDER_OPENROUTER=1
57
+ # Ollama off por default — habilite explicitamente se tiver hardware adequado
58
+ AXON_PROVIDER_OLLAMA=0
59
+ # Override do modelo do classifier (vazio = usa default do profile ativo)
60
+ # AXON_CLASSIFIER_CLOUD_MODEL=groq/llama-3.1-8b-instant
61
+ AXON_CLASSIFIER_TIMEOUT=4.0
62
+ AXON_POLICY_VERSION=2026-04-21
63
+ # Validação de compliance OpenRouter (default off — habilite se exige
64
+ # metadata zdr/retention/training_use em task.extra)
65
+ AXON_OPENROUTER_COMPLIANCE=0
66
+
67
+ # Rate limit por provider (vazio = sem limite). Defaults conservadores
68
+ # pra free tier — margem sob os limites reais (Groq 30/min, NIM ~1000/dia).
69
+ AXON_GROQ_MAX_RPM=25
70
+ AXON_GROQ_MAX_RPD=13000
71
+ AXON_NVIDIA_NIM_MAX_RPM=50
72
+ AXON_NVIDIA_NIM_MAX_RPD=950
73
+ # OpenRouter, Anthropic, Ollama: sem cap por default (pago/local)
74
+ # AXON_OPENROUTER_MAX_RPM=
75
+ # AXON_OPENROUTER_MAX_RPD=
76
+ # AXON_ANTHROPIC_MAX_RPM=
77
+ # AXON_ANTHROPIC_MAX_RPD=
78
+
79
+ # Expansion
80
+ AXON_EXPANSION_SOURCE_CATALOG=${AXON_ENGINE}/config/expansion_sources.json
81
+ AXON_EXPANSION_ENABLED=true
82
+ AXON_EXPANSION_MANUAL_ONLY=true
83
+ AXON_EXPANSION_CONTEXTS=knowledge,career,personal
84
+ AXON_EXPANSION_ALLOW_CLOUD=true
85
+ AXON_EXPANSION_MONTHLY_BUDGET=4.0
86
+ AXON_EXPANSION_SOFT_CAP=3.2
87
+ AXON_EXPANSION_HARD_CAP=4.0
88
+
89
+ # Platform-generated defaults that setup.sh refreshes
90
+ AXON_PLATFORM=mac
91
+ EMBEDDING_PROVIDERS=CoreMLExecutionProvider,CPUExecutionProvider
92
+ OLLAMA_FLASH=false
93
+ OLLAMA_MAX_LOADED_MODELS=1
94
+ OLLAMA_MODEL_PRIMARY=gemma4:e4b
95
+ OLLAMA_MODEL_KNOWLEDGE=gemma4:e4b
96
+ OLLAMA_KEEP_ALIVE=10m
97
+ OLLAMA_NUM_PARALLEL=2
98
+ OLLAMA_HOST=http://localhost:11434
99
+
100
+ # Compatibility / local defaults
101
+ QDRANT_HOST=localhost
102
+ QDRANT_PORT=6333
103
+ REDIS_HOST=localhost
104
+ REDIS_PORT=6379
105
+ AXON_VECTOR_SIZE=384
106
+ AXON_WORK_CTX=0
107
+ SQLITE_PATH=./data/axon.db
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report something that doesn't work as expected
4
+ title: ""
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ **Describe the bug**
10
+ A clear description of what's broken.
11
+
12
+ **To reproduce**
13
+ Steps to reproduce the behavior, ideally a minimal command sequence
14
+ (`axon ...`).
15
+
16
+ **Expected behavior**
17
+ What you expected to happen instead.
18
+
19
+ **Environment**
20
+ - AXON version / commit: `axon --version`
21
+ - OS:
22
+ - Python version:
23
+ - Provider profile (`AXON_PROVIDER_PROFILE`): free / paid
24
+
25
+ **Logs / output**
26
+ Paste relevant output from `axon doctor` or the failing command. Redact any
27
+ API keys.
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Security vulnerability
4
+ url: https://github.com/sammyjdev/axon/security/advisories/new
5
+ about: Please report security vulnerabilities privately, not as a public issue.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for AXON
4
+ title: ""
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+ **Problem**
10
+ What are you trying to do that AXON doesn't support today?
11
+
12
+ **Proposed solution**
13
+ What would you like to happen?
14
+
15
+ **Alternatives considered**
16
+ Any workarounds you're using today, or other approaches you considered.
17
+
18
+ **Additional context**
19
+ Anything else — related issues, links, screenshots.
@@ -0,0 +1,97 @@
1
+ name: ci
2
+
3
+ # dec-107 — validation strategy. Lint, compile, and router/resilience tests
4
+ # under both provider profiles (free, paid). dec-106 defines the profile system.
5
+
6
+ on:
7
+ pull_request:
8
+ push:
9
+ branches: [master, main]
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ lint:
17
+ name: ruff
18
+ runs-on: ubuntu-latest
19
+ timeout-minutes: 5
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.11"
25
+ - name: install ruff
26
+ run: pip install "ruff>=0.4.0"
27
+ # TODO(dec-107): expand to `src/ tests/` once the existing lint debt
28
+ # outside router/resilience is cleared. Today the broader scope has
29
+ # 22 pre-existing UP/I001/F401/E501 findings. Tracked separately.
30
+ - name: ruff check (router + resilience)
31
+ run: ruff check src/axon/router src/axon/resilience tests/router tests/resilience
32
+
33
+ compile:
34
+ name: compileall
35
+ runs-on: ubuntu-latest
36
+ timeout-minutes: 5
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: actions/setup-python@v5
40
+ with:
41
+ python-version: "3.11"
42
+ - name: compileall src
43
+ run: python3 -m compileall -q src
44
+
45
+ test:
46
+ name: pytest (${{ matrix.profile }} / py${{ matrix.python }})
47
+ runs-on: ubuntu-latest
48
+ timeout-minutes: 15
49
+ strategy:
50
+ fail-fast: false
51
+ matrix:
52
+ python: ["3.11", "3.12"]
53
+ profile: [free, paid]
54
+ steps:
55
+ - uses: actions/checkout@v4
56
+ - uses: actions/setup-python@v5
57
+ with:
58
+ python-version: ${{ matrix.python }}
59
+ cache: pip
60
+ cache-dependency-path: pyproject.toml
61
+ - name: install project + dev deps
62
+ run: pip install -e ".[dev]"
63
+ - name: pytest router + resilience
64
+ env:
65
+ AXON_PROVIDER_PROFILE: ${{ matrix.profile }}
66
+ run: python3 -m pytest tests/router tests/resilience -q
67
+
68
+ profile-smoke:
69
+ name: profile import smoke (${{ matrix.profile }})
70
+ runs-on: ubuntu-latest
71
+ timeout-minutes: 5
72
+ strategy:
73
+ fail-fast: false
74
+ matrix:
75
+ profile: [free, paid]
76
+ steps:
77
+ - uses: actions/checkout@v4
78
+ - uses: actions/setup-python@v5
79
+ with:
80
+ python-version: "3.11"
81
+ cache: pip
82
+ cache-dependency-path: pyproject.toml
83
+ - name: install project
84
+ run: pip install -e .
85
+ - name: import and resolve profile
86
+ env:
87
+ AXON_PROVIDER_PROFILE: ${{ matrix.profile }}
88
+ run: |
89
+ python3 -c "
90
+ from axon.router.profiles import get_profile, available_profiles
91
+ from axon.router.engine import _MODEL_MAP, _COST_PER_1K, _PROFILE
92
+ assert _PROFILE.name == '${{ matrix.profile }}'
93
+ assert _MODEL_MAP, 'model map empty'
94
+ assert all(v for v in _MODEL_MAP.values()), 'unmapped task type'
95
+ print('profile:', _PROFILE.name)
96
+ print('models:', dict(_MODEL_MAP))
97
+ "
@@ -0,0 +1,71 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .mypy_cache/
9
+ .venv/
10
+ venv/
11
+
12
+ # Environment
13
+ .env
14
+ .env.local
15
+ .env.*.local
16
+ .env*.bak
17
+
18
+ # Per-repo AXON state (context fallback file, generated by hooks)
19
+ .axon/
20
+
21
+ # Per-repo agent settings (MCP config is machine-local); track the loop config
22
+ .claude/*
23
+ !.claude/loop.yaml
24
+
25
+ # Data (runtime volumes do docker-compose) — anchored to repo root so it does
26
+ # not also swallow packaged data like src/axon/data/ (dec-116 #6).
27
+ /data/*
28
+ # Exception: commit the compression telemetry snapshot so the metrics in
29
+ # docs/METRICS.md are reproducible from a fresh checkout.
30
+ !/data/compression/
31
+ /data/compression/*
32
+ !/data/compression/stats.jsonl
33
+ *.db
34
+ *.sqlite
35
+ *.sqlite3
36
+
37
+ # Local article drafts
38
+ docs/LINKEDIN_ARTICLE_NOTES.md
39
+
40
+ # Logs
41
+ *.log
42
+ logs/
43
+
44
+ # OS
45
+ .DS_Store
46
+ Thumbs.db
47
+
48
+ # IDE
49
+ .vscode/
50
+ .idea/
51
+ *.swp
52
+ *.swo
53
+
54
+ # Benchmark outputs
55
+ benchmarks/results/*.png
56
+
57
+ # Build artifacts
58
+ dist/
59
+
60
+ # Machine-specific docker override (redirects qdrant/redis volumes to D:)
61
+ docker-compose.override.yml
62
+
63
+ # Subagent-driven-development scratch (briefs, ledger, review packages)
64
+ .superpowers/
65
+
66
+ # forge scratch (spec/tasks/validation artifacts, never tracked)
67
+ .specs/
68
+
69
+ # Coverage artifacts
70
+ .coverage
71
+ .coverage.*
@@ -0,0 +1,13 @@
1
+ # Project-local RTK filters — commit this file with your repo.
2
+ # Filters here override user-global and built-in filters.
3
+ # Docs: https://github.com/rtk-ai/rtk#custom-filters
4
+ schema_version = 1
5
+
6
+ # Example: suppress build noise from a custom tool
7
+ # [filters.my-tool]
8
+ # description = "Compact my-tool output"
9
+ # match_command = "^my-tool\\s+build"
10
+ # strip_ansi = true
11
+ # strip_lines_matching = ["^\\s*$", "^Downloading", "^Installing"]
12
+ # max_lines = 30
13
+ # on_empty = "my-tool: ok"
@@ -0,0 +1 @@
1
+ CLAUDE.md
@@ -0,0 +1,181 @@
1
+ # AXON Agent Guide
2
+
3
+ This is the canonical agent context file for contributors working in this
4
+ repository. `AGENTS.md` points to this file.
5
+
6
+ ## Project Overview
7
+
8
+ AXON is a self-hosted context engine for local knowledge retrieval,
9
+ context compression, and agent-facing workflows through a CLI (`axon`) and MCP.
10
+
11
+ The repository contains the engine and runtime code. User knowledge lives in an
12
+ external Markdown vault, typically configured through:
13
+
14
+ - `AXON_ENGINE=/path/to/axon`
15
+ - `AXON_VAULT=~/vault`
16
+
17
+ ## Entry Points
18
+
19
+ - [README.md](README.md): public project overview and quick start
20
+ - [docs/VAULT_SETUP.md](docs/VAULT_SETUP.md): external vault bootstrap
21
+ - [docs/USAGE_GUIDE.md](docs/USAGE_GUIDE.md): CLI workflows
22
+ - [docs/ADR.md](docs/ADR.md): active architectural decisions
23
+ - [docs/ARD.md](docs/ARD.md): active architectural requirements
24
+
25
+ ## Stable Architectural Decisions
26
+
27
+ ### D1: Data and engine stay separate
28
+
29
+ - Vault data lives outside this repository.
30
+ - Runtime code and configuration live in this repository.
31
+ - Do not mix vault content into the engine tree.
32
+
33
+ ### D2: Task-based cloud routing
34
+
35
+ D2 defines the **tiering shape** (trivial → mid → top). The concrete model per
36
+ tier is selected by the active provider profile (see dec-106). The PAID profile
37
+ preserves D2 verbatim via OpenRouter; the FREE profile substitutes equivalent
38
+ free-tier models.
39
+
40
+ | Task type | PAID profile (D2 verbatim) | FREE profile |
41
+ | --- | --- | --- |
42
+ | trivial/completion | `openrouter/anthropic/claude-haiku-4` | `groq/llama-3.1-8b-instant` |
43
+ | code analysis | `openrouter/anthropic/claude-sonnet-4` | `groq/llama-3.3-70b-versatile` |
44
+ | architecture/deep reasoning | `openrouter/anthropic/claude-opus-4` | `nvidia_nim/meta/llama-3.1-70b-instruct` |
45
+ | fallback | trivial of the active profile | trivial of the active profile |
46
+
47
+ Downgrade is task-type-driven (top→mid when Opus budget is exceeded; mid→bottom
48
+ when daily budget is exceeded) and works identically under both profiles. See
49
+ `docs/decisions/dec-106-routing-profiles.md`.
50
+
51
+ ### D3: Local Ollama defaults (opt-in)
52
+
53
+ Ollama is **opt-in** as of dec-106 (`AXON_PROVIDER_OLLAMA=1`). When enabled,
54
+ the supported models are:
55
+
56
+ - `phi3:mini`: lightweight compression and local-first workflows
57
+ - `gemma4:e4b`: local scoring and classification
58
+ - `gemma4:26b`: heavier deep-suggestion workloads on larger hardware
59
+
60
+ Default profiles (FREE/PAID) never route to Ollama; enable it explicitly for
61
+ `ctx=work` or any other path that requires local-only execution.
62
+
63
+ ### D4: Single Postgres backend (dec-101 fully superseded by dec-121)
64
+
65
+ dec-121 is **complete** (all three slices landed; ADR accepted 2026-06-29).
66
+ Persistence is consolidated on a single PostgreSQL instance:
67
+
68
+ - **Relational source-of-truth** (decisions/ADRs/sessions/graph nodes+edges/
69
+ file_index, plus FailureStore/OutcomeStore) lives in Postgres. SQLite is fully
70
+ retired — the SQLite repositories, `SessionStore`'s aiosqlite connection, the
71
+ SQL migrations, and the `aiosqlite` dependency are deleted.
72
+ - **Vectors**: `pgvector` (Qdrant + mem0 dropped).
73
+ - **Code-dependency call-graph**: the `dep:*` graph lives in the Postgres
74
+ `symbol_deps` table (Redis retired; rate limiter / circuit breaker are in-memory).
75
+ - GLYPH keeps graph **retrieval** (dec-116/117 stand). Neo4j was evaluated and
76
+ dropped — see `docs/decisions/dec-101-revoke-d4-drop-neo4j.md`.
77
+
78
+ Guards `tests/test_no_{qdrant,redis,sqlite}.py` keep the retired backends out. See
79
+ `docs/decisions/dec-121-postgres-unified-storage.md` and the phase plans under
80
+ `docs/superpowers/plans/`.
81
+
82
+ ### D5: Chunker quality is a release gate
83
+
84
+ - The Java chunker is a high-risk subsystem.
85
+ - Structure-aware chunking and fixture coverage must remain intact.
86
+ - Do not weaken chunker tests to make implementation changes pass.
87
+
88
+ ## Recall ranking
89
+
90
+ `recall_context` supports **opt-in soft supersession** (dec-115, default off): a
91
+ stale decision is demoted (rank × 0.02), never dropped, when a newer decision in
92
+ the same scope revises it. Detection = shared scope **and** a confirmed revision
93
+ — a revision verb in the newer summary (EN/PT) or a near-duplicate
94
+ (cosine ≥ `_NEAR_DUP_THRESHOLD` 0.93). Additive same-area work is intentionally
95
+ *not* superseded (a flat cosine floor produced ~90% false positives on real
96
+ data). Enable via `recall_context(..., enable_supersession=True,
97
+ similarity=make_embedding_similarity(EmbedderEngine()))`; keep it off in
98
+ production until reworded-revision recall is validated. See
99
+ `docs/decisions/dec-115-supersession-ranking-penalty.md` and
100
+ `docs/USAGE_GUIDE.md`.
101
+
102
+ ## Onboarding layers (do not conflate)
103
+
104
+ Two separate, intentionally non-identical lists govern "which repos AXON knows
105
+ about". Do **not** try to unify or sync them:
106
+
107
+ - **Agent scope** — `~/.claude/axon/ROUTER.md` (global, synced dotfiles). The
108
+ **single source of truth** for which repos Claude should recall/capture in. Any
109
+ onboarded-repo list elsewhere (e.g. the integration plan/spec under
110
+ `docs/superpowers/`) only references this one.
111
+ - **Index manifest** — `config/projects.json` (committed, read by
112
+ `src/axon/cli/pb.py` for batch indexing). Per-machine and **multi-machine by
113
+ design**: it carries absolute paths for the machine that authored it (e.g. macOS
114
+ `/Users/...`), so on another machine it is dormant and onboarding happens
115
+ per-repo via `axon init <path>`. Foreign paths here are expected, not stale.
116
+
117
+ ## Code Conventions
118
+
119
+ - Python 3.11+ with type hints
120
+ - Domain/data models (persisted or serialized) use Pydantic v2; internal
121
+ config and in-process value objects may use `dataclass`. Prefer either over
122
+ ad-hoc dicts. See `docs/decisions/dec-105-migrate-domain-models-to-pydantic.md`.
123
+ - Prefer async for I/O-heavy paths
124
+ - Add comments only for non-obvious constraints or rationale
125
+ - Keep public examples and docs machine-agnostic
126
+ - `SessionStore` must be initialized explicitly with `.init()`
127
+
128
+ ## Agent Rules
129
+
130
+ - Start from tests when changing behavior.
131
+ - Bugfixes should begin with a regression test when feasible.
132
+ - Features should have testable acceptance criteria before implementation.
133
+ - Do not silence failing tests or guardrails to make a change appear complete.
134
+ - Prefer the smallest coherent change that satisfies the behavior.
135
+
136
+ ## Restricted Context Rules
137
+
138
+ - `work` is a restricted context.
139
+ - Never access restricted context implicitly.
140
+ - Use explicit `ctx=work` only when the task really requires it.
141
+ - Do not copy restricted or proprietary material into the repository or public
142
+ documentation.
143
+ - Write/destructive MCP tools called with `ctx=work` are denied with
144
+ `DENY_RESTRICTED_TOOL_WRITE` (dec-109). Downgrade the ctx explicitly if
145
+ the action really belongs in a different context — never bypass the
146
+ gate.
147
+
148
+ ## Tool Risk and Audit
149
+
150
+ - Every MCP tool carries a risk class (`read` / `write` / `destructive`)
151
+ enforced by `@traced_tool`. See ADR-013 / dec-109.
152
+ - Destructive tools require `AXON_ALLOW_DESTRUCTIVE` truthy
153
+ (`1`/`true`/`yes`/`on`). The default is deny — do not paper over the
154
+ consent gate in tests or scripts.
155
+ - `Decision.judged: bool` is the canonical "scored" flag. Never use
156
+ `validation_score == 0.0` as a sentinel for unscored decisions — that
157
+ conflates a legitimate clamped-to-zero score with the default and
158
+ causes re-judging on every push.
159
+
160
+ ## Safety Rules
161
+
162
+ - Never commit credentials, tokens, `.env` files, or user data.
163
+ - Never move vault content into the engine repository.
164
+ - Never weaken isolation around restricted contexts as a shortcut.
165
+ - Investigate failing tests, hooks, or checks instead of bypassing them.
166
+
167
+ ## Validation Defaults
168
+
169
+ Use `rtk` where available. Typical validation commands:
170
+
171
+ ```bash
172
+ rtk pytest tests/ -q
173
+ rtk ruff check
174
+ rtk python3 -m compileall src
175
+ ```
176
+
177
+ ## RTK Notes
178
+
179
+ AXON is commonly used with RTK (Rust Token Killer) for compact command
180
+ output. Prefix commands with `rtk` when possible; if no specialized filter is
181
+ available, RTK passes the command through unchanged.
@@ -0,0 +1,50 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic
9
+ status, nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to a positive environment:
15
+
16
+ - Demonstrating empathy and kindness toward other people
17
+ - Being respectful of differing opinions, viewpoints, and experiences
18
+ - Giving and gracefully accepting constructive feedback
19
+ - Focusing on what is best for the community
20
+
21
+ Examples of unacceptable behavior:
22
+
23
+ - The use of sexualized language or imagery, and unwelcome sexual attention
24
+ - Trolling, insulting or derogatory comments, and personal or political attacks
25
+ - Public or private harassment
26
+ - Publishing others' private information without explicit permission
27
+
28
+ ## Enforcement Responsibilities
29
+
30
+ Project maintainers are responsible for clarifying and enforcing standards of
31
+ acceptable behavior and will take appropriate corrective action in response to
32
+ any behavior deemed inappropriate, threatening, offensive, or harmful.
33
+
34
+ ## Scope
35
+
36
+ This Code of Conduct applies within all project spaces (issues, pull requests,
37
+ discussions) and when an individual is officially representing the project in
38
+ public spaces.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
43
+ reported to the maintainers via a GitHub issue marked confidential or through
44
+ GitHub's report-abuse form. All complaints will be reviewed and investigated
45
+ promptly and fairly.
46
+
47
+ ## Attribution
48
+
49
+ This Code of Conduct is adapted from the
50
+ [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
@@ -0,0 +1,50 @@
1
+ # Contributing to AXON
2
+
3
+ Thanks for considering a contribution. AXON is an early-stage (Alpha) project;
4
+ expect some rough edges and fast-moving internals.
5
+
6
+ ## Development setup
7
+
8
+ ```bash
9
+ git clone https://github.com/sammyjdev/axon.git
10
+ cd axon
11
+ pip install -e ".[dev]"
12
+ ```
13
+
14
+ ## Before opening a PR
15
+
16
+ ```bash
17
+ pytest tests/ -q
18
+ ruff check
19
+ python3 -m compileall src
20
+ ```
21
+
22
+ All tests must pass. Fix `ruff` errors; warnings are at your discretion until
23
+ the broader lint scope is enforced in CI (see `.github/workflows/ci.yml`).
24
+
25
+ ## Workflow
26
+
27
+ - TDD is expected: a failing test before production code, a regression test
28
+ for bugfixes.
29
+ - Keep changes surgical — match existing style, avoid drive-by refactors in
30
+ unrelated code.
31
+ - Commit messages: `<type>: <description>` (`feat`, `fix`, `refactor`, `docs`,
32
+ `test`, `chore`, `perf`, `ci`).
33
+ - Reference the architectural decisions under `docs/decisions/` (`dec-*.md`)
34
+ when a change touches an existing one; open a new one for decisions that
35
+ aren't obvious from the code.
36
+
37
+ ## Reporting bugs / requesting features
38
+
39
+ Open a GitHub issue. Use the provided issue templates when available.
40
+
41
+ ## Reporting security issues
42
+
43
+ See [SECURITY.md](SECURITY.md) — do not open a public issue for
44
+ vulnerabilities.
45
+
46
+ ## Project structure
47
+
48
+ See [CLAUDE.md](CLAUDE.md) (agent-facing) and
49
+ [docs/PROJECT_OVERVIEW.md](docs/PROJECT_OVERVIEW.md) for a map of the
50
+ subsystems, CLI surface, and MCP tools.