codebase-index 1.6.0__tar.gz → 1.7.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 (320) hide show
  1. codebase_index-1.7.0/.claude/skills/codebase-index/.skill_version +1 -0
  2. codebase_index-1.7.0/.claude/skills/codebase-index/SKILL.md +89 -0
  3. codebase_index-1.7.0/.claude/skills/codebase-index/references/commands.md +73 -0
  4. codebase_index-1.7.0/.claude/skills/codebase-index/references/response-contract.md +82 -0
  5. {codebase_index-1.6.0 → codebase_index-1.7.0}/.claude/skills/codebase-index/scripts/cbx +1 -1
  6. {codebase_index-1.6.0/.opencode → codebase_index-1.7.0/.claude}/skills/codebase-index/scripts/cbx.ps1 +4 -1
  7. {codebase_index-1.6.0 → codebase_index-1.7.0}/.claude-plugin/marketplace.json +1 -1
  8. {codebase_index-1.6.0 → codebase_index-1.7.0}/.claude-plugin/plugin.json +2 -2
  9. codebase_index-1.7.0/.codex/skills/codebase-index/.skill_version +1 -0
  10. codebase_index-1.7.0/.codex/skills/codebase-index/SKILL.md +89 -0
  11. codebase_index-1.7.0/.codex/skills/codebase-index/references/commands.md +73 -0
  12. codebase_index-1.7.0/.codex/skills/codebase-index/references/response-contract.md +82 -0
  13. {codebase_index-1.6.0/.opencode → codebase_index-1.7.0/.codex}/skills/codebase-index/scripts/cbx +1 -1
  14. {codebase_index-1.6.0 → codebase_index-1.7.0}/.codex/skills/codebase-index/scripts/cbx.ps1 +4 -1
  15. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/workflows/ci.yml +6 -4
  16. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/workflows/release.yml +10 -8
  17. codebase_index-1.7.0/.opencode/skills/codebase-index/.skill_version +1 -0
  18. codebase_index-1.7.0/.opencode/skills/codebase-index/SKILL.md +89 -0
  19. codebase_index-1.7.0/.opencode/skills/codebase-index/references/commands.md +73 -0
  20. codebase_index-1.7.0/.opencode/skills/codebase-index/references/response-contract.md +82 -0
  21. {codebase_index-1.6.0/.codex → codebase_index-1.7.0/.opencode}/skills/codebase-index/scripts/cbx +1 -1
  22. {codebase_index-1.6.0/.claude → codebase_index-1.7.0/.opencode}/skills/codebase-index/scripts/cbx.ps1 +4 -1
  23. {codebase_index-1.6.0 → codebase_index-1.7.0}/CHANGELOG.md +29 -1
  24. codebase_index-1.7.0/PKG-INFO +373 -0
  25. codebase_index-1.7.0/README.md +323 -0
  26. codebase_index-1.7.0/assets/demo.png +0 -0
  27. codebase_index-1.7.0/assets/mark.png +0 -0
  28. codebase_index-1.7.0/assets/social-preview.png +0 -0
  29. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/ARCHITECTURE.md +4 -3
  30. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/FAQ.md +10 -5
  31. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/INSTALLATION.md +22 -23
  32. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/MCP.md +6 -4
  33. codebase_index-1.7.0/docs/PRODUCT_UPGRADE_PLAN.md +109 -0
  34. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/QUICKSTART.md +2 -1
  35. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/RELEASE_CHECKLIST.md +1 -2
  36. codebase_index-1.7.0/docs/ROADMAP.md +103 -0
  37. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/SECURITY.md +12 -3
  38. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/SEO.md +2 -2
  39. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/SKILL_DESIGN.md +41 -8
  40. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/installer.md +2 -2
  41. {codebase_index-1.6.0 → codebase_index-1.7.0}/pyproject.toml +6 -1
  42. {codebase_index-1.6.0 → codebase_index-1.7.0}/requirements.lock +1 -1
  43. {codebase_index-1.6.0 → codebase_index-1.7.0}/scripts/gen_assets.py +142 -62
  44. {codebase_index-1.6.0 → codebase_index-1.7.0}/scripts/sync_skill_copies.py +11 -5
  45. codebase_index-1.7.0/skill/SKILL.md +89 -0
  46. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/examples/basic-usage.md +6 -0
  47. codebase_index-1.7.0/skill/references/commands.md +73 -0
  48. codebase_index-1.7.0/skill/references/response-contract.md +82 -0
  49. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/scripts/cbx +1 -1
  50. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/scripts/cbx.ps1 +4 -1
  51. codebase_index-1.7.0/skills/codebase-index/SKILL.md +89 -0
  52. codebase_index-1.7.0/skills/codebase-index/references/commands.md +73 -0
  53. codebase_index-1.7.0/skills/codebase-index/references/response-contract.md +82 -0
  54. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/__init__.py +1 -1
  55. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/cli.py +35 -0
  56. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/mcp/server.py +31 -0
  57. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/output/markdown.py +48 -0
  58. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/service.py +136 -0
  59. codebase_index-1.7.0/src/codebase_index/skill_template/SKILL.md +89 -0
  60. codebase_index-1.7.0/src/codebase_index/skill_template/references/commands.md +73 -0
  61. codebase_index-1.7.0/src/codebase_index/skill_template/references/response-contract.md +82 -0
  62. codebase_index-1.7.0/src/codebase_index/skill_template/scripts/cbx +25 -0
  63. codebase_index-1.7.0/src/codebase_index/skill_template/scripts/cbx.ps1 +28 -0
  64. codebase_index-1.7.0/tests/golden/mcp_impact_of_diff.json +25 -0
  65. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden_utils.py +1 -1
  66. codebase_index-1.7.0/tests/test_diff_impact.py +73 -0
  67. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_mcp_golden.py +2 -0
  68. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_mcp_server.py +7 -0
  69. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_packaging.py +15 -1
  70. codebase_index-1.6.0/.claude/skills/codebase-index/.skill_version +0 -1
  71. codebase_index-1.6.0/.claude/skills/codebase-index/SKILL.md +0 -198
  72. codebase_index-1.6.0/.codex/skills/codebase-index/.skill_version +0 -1
  73. codebase_index-1.6.0/.codex/skills/codebase-index/SKILL.md +0 -198
  74. codebase_index-1.6.0/.opencode/skills/codebase-index/.skill_version +0 -1
  75. codebase_index-1.6.0/.opencode/skills/codebase-index/SKILL.md +0 -198
  76. codebase_index-1.6.0/PKG-INFO +0 -748
  77. codebase_index-1.6.0/README.md +0 -698
  78. codebase_index-1.6.0/assets/demo.png +0 -0
  79. codebase_index-1.6.0/assets/social-preview.png +0 -0
  80. codebase_index-1.6.0/docs/PRODUCT_UPGRADE_PLAN.md +0 -171
  81. codebase_index-1.6.0/docs/ROADMAP.md +0 -111
  82. codebase_index-1.6.0/skill/SKILL.md +0 -198
  83. codebase_index-1.6.0/skills/codebase-index/SKILL.md +0 -198
  84. codebase_index-1.6.0/src/codebase_index/skill_template/SKILL.md +0 -198
  85. codebase_index-1.6.0/src/codebase_index/skill_template/scripts/cbx +0 -25
  86. codebase_index-1.6.0/src/codebase_index/skill_template/scripts/cbx.ps1 +0 -25
  87. {codebase_index-1.6.0 → codebase_index-1.7.0}/.claude/skills/codebase-index/examples/hooks/settings.json +0 -0
  88. {codebase_index-1.6.0 → codebase_index-1.7.0}/.codex/skills/codebase-index/examples/hooks/settings.json +0 -0
  89. {codebase_index-1.6.0 → codebase_index-1.7.0}/.editorconfig +0 -0
  90. {codebase_index-1.6.0 → codebase_index-1.7.0}/.gitattributes +0 -0
  91. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/FUNDING.yml +0 -0
  92. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  93. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  94. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/ISSUE_TEMPLATE/skill_listing_request.yml +0 -0
  95. {codebase_index-1.6.0 → codebase_index-1.7.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  96. {codebase_index-1.6.0 → codebase_index-1.7.0}/.gitignore +0 -0
  97. {codebase_index-1.6.0 → codebase_index-1.7.0}/.opencode/agents/codebase-index.md +0 -0
  98. {codebase_index-1.6.0 → codebase_index-1.7.0}/.opencode/commands/codebase-index.md +0 -0
  99. {codebase_index-1.6.0 → codebase_index-1.7.0}/.opencode/skills/codebase-index/examples/hooks/settings.json +0 -0
  100. {codebase_index-1.6.0 → codebase_index-1.7.0}/AGENTS.md +0 -0
  101. {codebase_index-1.6.0 → codebase_index-1.7.0}/CODE_OF_CONDUCT.md +0 -0
  102. {codebase_index-1.6.0 → codebase_index-1.7.0}/CONTRIBUTING.md +0 -0
  103. {codebase_index-1.6.0 → codebase_index-1.7.0}/LICENSE +0 -0
  104. {codebase_index-1.6.0 → codebase_index-1.7.0}/ROADMAP.md +0 -0
  105. {codebase_index-1.6.0 → codebase_index-1.7.0}/SECURITY.md +0 -0
  106. {codebase_index-1.6.0 → codebase_index-1.7.0}/adapters/claude.ps1 +0 -0
  107. {codebase_index-1.6.0 → codebase_index-1.7.0}/adapters/claude.sh +0 -0
  108. {codebase_index-1.6.0 → codebase_index-1.7.0}/adapters/codex.ps1 +0 -0
  109. {codebase_index-1.6.0 → codebase_index-1.7.0}/adapters/codex.sh +0 -0
  110. {codebase_index-1.6.0 → codebase_index-1.7.0}/adapters/opencode.ps1 +0 -0
  111. {codebase_index-1.6.0 → codebase_index-1.7.0}/adapters/opencode.sh +0 -0
  112. {codebase_index-1.6.0 → codebase_index-1.7.0}/bin/cbx +0 -0
  113. {codebase_index-1.6.0 → codebase_index-1.7.0}/bin/cbx.ps1 +0 -0
  114. {codebase_index-1.6.0 → codebase_index-1.7.0}/bin/codebase-index +0 -0
  115. {codebase_index-1.6.0 → codebase_index-1.7.0}/bin/codebase-index.ps1 +0 -0
  116. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/BENCHMARKS.md +0 -0
  117. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/COMPARISON.md +0 -0
  118. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/DATABASE_SCHEMA.md +0 -0
  119. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/LANGUAGES.md +0 -0
  120. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/RETRIEVAL.md +0 -0
  121. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/RETRIEVAL_PIPELINE.md +0 -0
  122. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/SCHEMA.md +0 -0
  123. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/SECURITY_MODEL.md +0 -0
  124. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-benchmark-index-improvements.md +0 -0
  125. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-generalize-skill-research-discipline.md +0 -0
  126. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m1-storage-discovery.md +0 -0
  127. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m2-fts-lexical.md +0 -0
  128. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m3-treesitter-symbols.md +0 -0
  129. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m4-hybrid-search.md +0 -0
  130. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m5-graph-impact.md +0 -0
  131. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m6-embeddings-vector.md +0 -0
  132. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m7-5-plugin-one-command-install.md +0 -0
  133. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m7-skill-packaging.md +0 -0
  134. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m8-hooks-watch.md +0 -0
  135. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-m9-release.md +0 -0
  136. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-05-29-multilang-symbols-make-skill-win.md +0 -0
  137. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/plans/2026-06-24-snippet-skeletonization.md +0 -0
  138. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/specs/2026-05-29-plugin-one-command-install-design.md +0 -0
  139. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/specs/2026-06-14-typed-framework-edges-design.md +0 -0
  140. {codebase_index-1.6.0 → codebase_index-1.7.0}/docs/superpowers/specs/2026-06-24-snippet-skeletonization-design.md +0 -0
  141. {codebase_index-1.6.0 → codebase_index-1.7.0}/examples/config.example.json +0 -0
  142. {codebase_index-1.6.0 → codebase_index-1.7.0}/examples/demo-project/README.md +0 -0
  143. {codebase_index-1.6.0 → codebase_index-1.7.0}/examples/hooks/settings.json +0 -0
  144. {codebase_index-1.6.0 → codebase_index-1.7.0}/examples/queries.md +0 -0
  145. {codebase_index-1.6.0 → codebase_index-1.7.0}/examples/sample-queries.md +0 -0
  146. {codebase_index-1.6.0 → codebase_index-1.7.0}/examples/sample-retrieval-output.md +0 -0
  147. {codebase_index-1.6.0 → codebase_index-1.7.0}/hooks/hooks.json +0 -0
  148. {codebase_index-1.6.0 → codebase_index-1.7.0}/install.ps1 +0 -0
  149. {codebase_index-1.6.0 → codebase_index-1.7.0}/install.sh +0 -0
  150. {codebase_index-1.6.0 → codebase_index-1.7.0}/lib/common.ps1 +0 -0
  151. {codebase_index-1.6.0 → codebase_index-1.7.0}/lib/common.sh +0 -0
  152. {codebase_index-1.6.0 → codebase_index-1.7.0}/scripts/bootstrap.ps1 +0 -0
  153. {codebase_index-1.6.0 → codebase_index-1.7.0}/scripts/bootstrap.sh +0 -0
  154. {codebase_index-1.6.0 → codebase_index-1.7.0}/scripts/release_smoke.py +0 -0
  155. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/examples/claude-md-example.md +0 -0
  156. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/examples/hooks-example.json +0 -0
  157. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/scripts/bootstrap.py +0 -0
  158. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/scripts/doctor.py +0 -0
  159. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/scripts/install.py +0 -0
  160. {codebase_index-1.6.0 → codebase_index-1.7.0}/skill/scripts/smoke_test.py +0 -0
  161. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/__main__.py +0 -0
  162. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/config.py +0 -0
  163. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/discovery/__init__.py +0 -0
  164. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/discovery/classify.py +0 -0
  165. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/discovery/ignore.py +0 -0
  166. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/discovery/walker.py +0 -0
  167. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/doctor.py +0 -0
  168. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/embeddings/__init__.py +0 -0
  169. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/embeddings/backend.py +0 -0
  170. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/embeddings/external.py +0 -0
  171. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/embeddings/local.py +0 -0
  172. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/embeddings/noop.py +0 -0
  173. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/graph/__init__.py +0 -0
  174. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/graph/analysis.py +0 -0
  175. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/graph/builder.py +0 -0
  176. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/graph/expand.py +0 -0
  177. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/graph/export.py +0 -0
  178. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/graph/navigate.py +0 -0
  179. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/indexer/__init__.py +0 -0
  180. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/indexer/doc_chunks.py +0 -0
  181. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/indexer/freshness.py +0 -0
  182. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/indexer/pipeline.py +0 -0
  183. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/mcp/__init__.py +0 -0
  184. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/models.py +0 -0
  185. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/output/__init__.py +0 -0
  186. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/output/json.py +0 -0
  187. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/output/redact.py +0 -0
  188. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/parsers/__init__.py +0 -0
  189. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/parsers/base.py +0 -0
  190. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/parsers/languages.py +0 -0
  191. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/parsers/line_chunker.py +0 -0
  192. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/parsers/symbol_chunks.py +0 -0
  193. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/parsers/treesitter.py +0 -0
  194. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/__init__.py +0 -0
  195. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/budget.py +0 -0
  196. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/fusion.py +0 -0
  197. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/intent.py +0 -0
  198. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/pipeline.py +0 -0
  199. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/rerank.py +0 -0
  200. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/searchers.py +0 -0
  201. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/skeleton.py +0 -0
  202. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/retrieval/types.py +0 -0
  203. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/scaffold.py +0 -0
  204. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/skill_template/examples/hooks/settings.json +0 -0
  205. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/skill_update.py +0 -0
  206. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/storage/__init__.py +0 -0
  207. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/storage/db.py +0 -0
  208. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/storage/repo.py +0 -0
  209. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/storage/schema.sql +0 -0
  210. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/watch/__init__.py +0 -0
  211. {codebase_index-1.6.0 → codebase_index-1.7.0}/src/codebase_index/watch/watcher.py +0 -0
  212. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/__init__.py +0 -0
  213. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/benchmark_honest.py +0 -0
  214. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/benchmark_honest_RESULTS.md +0 -0
  215. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/benchmark_honest_newtowny.txt +0 -0
  216. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/benchmark_public.py +0 -0
  217. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/benchmark_public_RESULTS.md +0 -0
  218. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/benchmark_real_repo.py +0 -0
  219. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/conftest.py +0 -0
  220. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/README.md +0 -0
  221. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/expected_answers.yml +0 -0
  222. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/multilang/sample.go +0 -0
  223. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/multilang/sample.java +0 -0
  224. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/multilang/sample.rs +0 -0
  225. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/.env +0 -0
  226. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/.gitignore +0 -0
  227. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/huge.json +0 -0
  228. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/logo.png +0 -0
  229. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/node_modules/leftpad/index.js +0 -0
  230. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/secrets.pem +0 -0
  231. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/src/api/service.py +0 -0
  232. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/src/auth/token.py +0 -0
  233. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/src/models/user.py +0 -0
  234. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/src/schema.generated.ts +0 -0
  235. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/fixtures/sample_repo/web/app.ts +0 -0
  236. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/architecture.json +0 -0
  237. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/describe_refresh.json +0 -0
  238. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/explain_auth.json +0 -0
  239. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/impact_user_model.json +0 -0
  240. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_architecture.json +0 -0
  241. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_describe_symbol.json +0 -0
  242. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_explain_code.json +0 -0
  243. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_find_refs.json +0 -0
  244. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_find_symbol.json +0 -0
  245. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_healthcheck.json +0 -0
  246. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_impact_of.json +0 -0
  247. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_index_stats.json +0 -0
  248. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_path_between.json +0 -0
  249. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/mcp_search_code.json +0 -0
  250. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/path_renew_to_token.json +0 -0
  251. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/refs_refresh_access_token.json +0 -0
  252. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/search_token.json +0 -0
  253. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/stats.json +0 -0
  254. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/golden/symbol_user.json +0 -0
  255. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/installer/smoke.ps1 +0 -0
  256. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/installer/smoke.sh +0 -0
  257. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_analysis.py +0 -0
  258. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_benchmark_comparison.py +0 -0
  259. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_bootstrap.py +0 -0
  260. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_budget.py +0 -0
  261. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_chunker.py +0 -0
  262. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_classify.py +0 -0
  263. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_clean_cli.py +0 -0
  264. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_cli.py +0 -0
  265. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_cli_golden.py +0 -0
  266. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_config.py +0 -0
  267. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_discovery.py +0 -0
  268. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_doc_chunks.py +0 -0
  269. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_doctor.py +0 -0
  270. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_embeddings_backend.py +0 -0
  271. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_embeddings_external.py +0 -0
  272. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_embeddings_local.py +0 -0
  273. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_freshness.py +0 -0
  274. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_fusion.py +0 -0
  275. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_graph.py +0 -0
  276. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_graph_coverage.py +0 -0
  277. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_graph_export_cli.py +0 -0
  278. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_hooks_merge.py +0 -0
  279. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_hybrid_ranking.py +0 -0
  280. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_ignore.py +0 -0
  281. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_impact_cli.py +0 -0
  282. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_index_cli.py +0 -0
  283. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_init_cli.py +0 -0
  284. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_intent.py +0 -0
  285. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_languages.py +0 -0
  286. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_multilang_symbols.py +0 -0
  287. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_navigate.py +0 -0
  288. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_output.py +0 -0
  289. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_parse_guardrails.py +0 -0
  290. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_perf_smoke.py +0 -0
  291. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_pipeline.py +0 -0
  292. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_pipeline_search.py +0 -0
  293. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_pipeline_vectors.py +0 -0
  294. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_plugin_manifest.py +0 -0
  295. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_plugin_skill_parity.py +0 -0
  296. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_plugin_wrappers.py +0 -0
  297. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_public_benchmark.py +0 -0
  298. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_quality_benchmark.py +0 -0
  299. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_redact.py +0 -0
  300. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_repo_search.py +0 -0
  301. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_rerank.py +0 -0
  302. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_retrieval_types.py +0 -0
  303. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_scaffold.py +0 -0
  304. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_search_cli.py +0 -0
  305. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_searchers.py +0 -0
  306. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_seeded_index.py +0 -0
  307. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_service.py +0 -0
  308. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_skeleton.py +0 -0
  309. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_skill_update.py +0 -0
  310. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_storage.py +0 -0
  311. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_symbol_cli.py +0 -0
  312. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_symbol_ranking.py +0 -0
  313. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_symbol_refs.py +0 -0
  314. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_sync_skill_copies.py +0 -0
  315. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_treesitter.py +0 -0
  316. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_update.py +0 -0
  317. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_update_cli.py +0 -0
  318. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_vector_search.py +0 -0
  319. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_vectors_storage.py +0 -0
  320. {codebase_index-1.6.0 → codebase_index-1.7.0}/tests/test_watcher.py +0 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: codebase-index
3
+ description: Use before answering repository questions about architecture, implementation, symbols, references, dependencies, refactoring impact, data flow, or bugs. Query the local hybrid index first so the agent reads only evidence-bearing file:line ranges instead of scanning the repository.
4
+ allowed-tools: Bash(codebase-index search *), Bash(codebase-index explain *), Bash(codebase-index architecture *), Bash(codebase-index symbol *), Bash(codebase-index refs *), Bash(codebase-index impact *), Bash(codebase-index diff-impact *), Bash(codebase-index path *), Bash(codebase-index describe *), Bash(codebase-index graph *), Bash(codebase-index stats *), Bash(codebase-index doctor *), Bash(codebase-index update *), Bash(codebase-index index *), Bash(cbx *), Read, Grep, Glob
5
+ ---
6
+
7
+ # Codebase Index
8
+
9
+ Use the local index before reading repository files.
10
+
11
+ The operating principle is **Find → Trace → Predict**:
12
+
13
+ - **Find** the implementation with ranked retrieval.
14
+ - **Trace** behavior through definitions, callers, dependencies, and paths.
15
+ - **Predict** change impact while preserving an explicit evidence trail.
16
+
17
+ ## Route the question
18
+
19
+ | Intent | Command |
20
+ |---|---|
21
+ | Where is X implemented? | `codebase-index search "X" --json` |
22
+ | How does X work? | `codebase-index explain "X" --json` |
23
+ | What is this codebase? | `codebase-index architecture --json` |
24
+ | Find a named symbol | `codebase-index symbol "X" --json` |
25
+ | Who calls or references X? | `codebase-index refs "X" --json` |
26
+ | What changes if X changes? | `codebase-index impact "X" --json` |
27
+ | What does my current diff affect? | `codebase-index diff-impact --json` |
28
+ | How are X and Y connected? | `codebase-index path "X" "Y" --json` |
29
+ | Describe X and its neighborhood | `codebase-index describe "X" --json` |
30
+ | Produce a human graph | `codebase-index graph "X" --output <path>` |
31
+
32
+ Use `search --mode symbol` for exact symbol work, `--mode fts` for text and
33
+ error messages, and the default `hybrid` mode for mixed questions. Use pure
34
+ `vector` mode only when embeddings are enabled and exact vocabulary is unknown.
35
+
36
+ Read [references/commands.md](references/commands.md) only when command options
37
+ or routing remain unclear.
38
+
39
+ ## Evidence protocol
40
+
41
+ 1. Run the best-matching command with `--json`.
42
+ 2. Check `index` before trusting the payload:
43
+ - missing → run `codebase-index index`, then repeat;
44
+ - stale with fewer than 20 changed files → run `codebase-index update`;
45
+ - stale with 20 or more changed files → run `codebase-index index`;
46
+ - fresh → continue.
47
+ 3. Start with ranks 1–3. Read only `recommended_reads` line ranges.
48
+ 4. Trace one additional hop only when the question requires behavior,
49
+ ownership, or impact.
50
+ 5. Answer with `file:line` evidence and state uncertainty explicitly.
51
+
52
+ Do not open whole files when a line range is available. A snippet may already
53
+ be sufficient. `skeletonized: true` means the response intentionally folded
54
+ unrelated body lines; read the supplied range when the missing body matters.
55
+
56
+ ## Confidence contract
57
+
58
+ - **high** — answer from the indexed evidence.
59
+ - **medium** — read the recommended ranges and confirm the key claim with one
60
+ targeted lookup if necessary.
61
+ - **low** or no results — follow `fallback_suggestions`, then use a narrow
62
+ Grep/Glob fallback.
63
+
64
+ On `refs` and `impact`, inspect `coverage`. If `coverage.partial` is true, an
65
+ empty result is inconclusive; confirm with targeted Grep before saying that
66
+ nothing references the target.
67
+
68
+ Edges carry `confidence`:
69
+
70
+ - `extracted` — exact parser evidence;
71
+ - `inferred` — heuristic resolution;
72
+ - `ambiguous` — unresolved or non-unique.
73
+
74
+ Never present an inferred or ambiguous chain as certain.
75
+
76
+ ## Answer contract
77
+
78
+ Structure repository answers around:
79
+
80
+ 1. **Answer** — the direct conclusion.
81
+ 2. **Evidence** — the minimum supporting `file:line` references.
82
+ 3. **Confidence** — only when evidence is partial, inferred, stale, or missing.
83
+ 4. **Next check** — only when another check would materially reduce uncertainty.
84
+
85
+ Do not narrate every search step. Do not claim absence from a partial graph.
86
+ Do not replace evidence with a generated HTML graph.
87
+
88
+ For payload fields and failure handling, read
89
+ [references/response-contract.md](references/response-contract.md).
@@ -0,0 +1,73 @@
1
+ # Command Reference
2
+
3
+ Load this reference only when the intent table in `SKILL.md` is insufficient.
4
+
5
+ ## Retrieval
6
+
7
+ ```bash
8
+ codebase-index search "<query>" --json
9
+ codebase-index explain "<topic or flow>" --json
10
+ ```
11
+
12
+ Useful search options:
13
+
14
+ - `--mode hybrid|fts|symbol|vector`
15
+ - `--token-budget <tokens>`
16
+ - `--limit <count>`
17
+ - `--offset <pagination offset>`
18
+ - `--raw` to disable snippet skeletonization
19
+ - `--no-fallback` to suppress fallback suggestions
20
+
21
+ `explain` uses the HOW_IT_WORKS intent and a larger default token budget. Prefer
22
+ it over repeatedly rewording a broad search.
23
+
24
+ ## Code graph
25
+
26
+ ```bash
27
+ codebase-index architecture --json
28
+ codebase-index refs "<symbol>" --json
29
+ codebase-index impact "<file-or-symbol>" --direction up --depth 2 --json
30
+ codebase-index diff-impact --base HEAD --direction up --depth 2 --json
31
+ codebase-index path "<source>" "<target>" --json
32
+ codebase-index describe "<file-or-symbol>" --json
33
+ ```
34
+
35
+ - `architecture` reads module analysis cached at index time.
36
+ - `refs` finds definitions, calls, and graph-backed references.
37
+ - `impact` walks dependents (`up`), dependencies (`down`), or both.
38
+ - `diff-impact` aggregates impact for tracked changes relative to a verified
39
+ Git commit; new or excluded files are reported as unresolved.
40
+ - `path` returns the shortest known dependency/call chain.
41
+ - `describe` returns a node card with callers, callees, module, and centrality.
42
+
43
+ Use `graph` only for a visualization intended for a person:
44
+
45
+ ```bash
46
+ codebase-index graph "<target>" --direction both --depth 2 --output graph.html
47
+ ```
48
+
49
+ For headless work, use `--output`; do not use `--open`. Exports also support
50
+ `--format graphml|dot|neo4j`.
51
+
52
+ ## Index health
53
+
54
+ ```bash
55
+ codebase-index stats --json
56
+ codebase-index doctor
57
+ codebase-index update
58
+ codebase-index index
59
+ ```
60
+
61
+ Run `stats` and `doctor` when several unrelated queries have low confidence.
62
+ Low symbol counts or partial graph coverage can explain weak results.
63
+
64
+ ## Query examples
65
+
66
+ ```bash
67
+ codebase-index search "auth token refresh" --json
68
+ codebase-index search "AuthService class" --mode symbol --json
69
+ codebase-index search "connection reset by peer" --mode fts --json
70
+ codebase-index explain "checkout flow" --json
71
+ codebase-index impact "User" --direction up --depth 2 --json
72
+ codebase-index path "ApiController" "Database" --json
73
+ ```
@@ -0,0 +1,82 @@
1
+ # Response Contract
2
+
3
+ Load this reference when interpreting a retrieval packet or handling a weak
4
+ result.
5
+
6
+ ## Ranked results
7
+
8
+ Each result can contain:
9
+
10
+ - `rank`
11
+ - `path`
12
+ - `line_start` / `line_end`
13
+ - `symbols`
14
+ - `score`
15
+ - `reason`
16
+ - `snippet`
17
+ - `skeletonized`
18
+ - `elided_lines`
19
+
20
+ `recommended_reads` is the read plan. Start with its first one to three entries
21
+ and use exact line ranges.
22
+
23
+ `pagination.has_more` and `pagination.next_offset` indicate additional results.
24
+ Prefer a more specific command or a larger token budget before paging.
25
+
26
+ ## Freshness
27
+
28
+ The `index` object is part of the evidence contract:
29
+
30
+ ```text
31
+ exists=false → index
32
+ stale=true, files_changed_since_build<20 → update
33
+ stale=true, files_changed_since_build≥20 → full index
34
+ stale=false → proceed
35
+ ```
36
+
37
+ Repeat the original query after rebuilding or updating.
38
+
39
+ ## Weak results
40
+
41
+ Fallback is allowed only when:
42
+
43
+ - results are empty;
44
+ - confidence is low;
45
+ - graph coverage is partial;
46
+ - the requested information is not represented by the index.
47
+
48
+ Use `fallback_suggestions.ripgrep` first. Otherwise construct one narrow Grep
49
+ pattern from the most distinctive symbol, error, or path in the question.
50
+ Avoid a full-repository scan unless targeted fallback also fails.
51
+
52
+ If several queries are weak:
53
+
54
+ ```bash
55
+ codebase-index stats --json
56
+ codebase-index doctor
57
+ ```
58
+
59
+ Report the limitation instead of inventing certainty.
60
+
61
+ ## Answer examples
62
+
63
+ High confidence:
64
+
65
+ ```text
66
+ Session validation is implemented in `src/auth/session.py:44`.
67
+ The request middleware calls it from `src/http/auth.py:18`.
68
+ ```
69
+
70
+ Partial graph:
71
+
72
+ ```text
73
+ The index found no graph-backed callers, but coverage for Lua is partial.
74
+ A targeted text search still finds two call sites in …
75
+ ```
76
+
77
+ Inferred chain:
78
+
79
+ ```text
80
+ The route-to-service link is parser-extracted; the service-to-model link is
81
+ heuristic, so the final hop should be verified before refactoring.
82
+ ```
@@ -4,7 +4,7 @@
4
4
  # - Whitelists subcommands so the skill can never invoke destructive ones (clean/init/watch).
5
5
  set -euo pipefail
6
6
 
7
- ALLOWED="search explain symbol refs impact graph stats doctor update index"
7
+ ALLOWED="search explain architecture symbol refs impact diff-impact path describe graph stats doctor update index"
8
8
 
9
9
  sub="${1:-}"
10
10
  case " $ALLOWED " in
@@ -8,7 +8,10 @@ param(
8
8
  )
9
9
 
10
10
  $ErrorActionPreference = "Stop"
11
- $allowed = @("search", "explain", "symbol", "refs", "impact", "graph", "stats", "doctor", "update", "index")
11
+ $allowed = @(
12
+ "search", "explain", "architecture", "symbol", "refs", "impact", "diff-impact",
13
+ "path", "describe", "graph", "stats", "doctor", "update", "index"
14
+ )
12
15
 
13
16
  if ($allowed -notcontains $Subcommand) {
14
17
  Write-Error "cbx: refusing subcommand '$Subcommand'. Allowed: $($allowed -join ', ')"
@@ -5,7 +5,7 @@
5
5
  {
6
6
  "name": "codebase-index",
7
7
  "source": "./",
8
- "description": "Local-first hybrid codebase index skill with auto-provisioned CLI."
8
+ "description": "Find, trace, and predict across a local codebase with evidence-bearing retrieval."
9
9
  }
10
10
  ]
11
11
  }
@@ -2,8 +2,8 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "codebase-index",
4
4
  "displayName": "Codebase Index",
5
- "description": "Local-first hybrid codebase index. Auto-provisions its Python CLI on first session start; the skill searches the index so Claude reads only the most relevant files.",
6
- "version": "1.6.0",
5
+ "description": "Give Claude a precise local map of your codebase: find implementations, trace behavior, and predict change impact with file-line evidence.",
6
+ "version": "1.7.0",
7
7
  "author": {
8
8
  "name": "codebase-index contributors"
9
9
  },
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: codebase-index
3
+ description: Use before answering repository questions about architecture, implementation, symbols, references, dependencies, refactoring impact, data flow, or bugs. Query the local hybrid index first so the agent reads only evidence-bearing file:line ranges instead of scanning the repository.
4
+ allowed-tools: Bash(codebase-index search *), Bash(codebase-index explain *), Bash(codebase-index architecture *), Bash(codebase-index symbol *), Bash(codebase-index refs *), Bash(codebase-index impact *), Bash(codebase-index diff-impact *), Bash(codebase-index path *), Bash(codebase-index describe *), Bash(codebase-index graph *), Bash(codebase-index stats *), Bash(codebase-index doctor *), Bash(codebase-index update *), Bash(codebase-index index *), Bash(cbx *), Read, Grep, Glob
5
+ ---
6
+
7
+ # Codebase Index
8
+
9
+ Use the local index before reading repository files.
10
+
11
+ The operating principle is **Find → Trace → Predict**:
12
+
13
+ - **Find** the implementation with ranked retrieval.
14
+ - **Trace** behavior through definitions, callers, dependencies, and paths.
15
+ - **Predict** change impact while preserving an explicit evidence trail.
16
+
17
+ ## Route the question
18
+
19
+ | Intent | Command |
20
+ |---|---|
21
+ | Where is X implemented? | `codebase-index search "X" --json` |
22
+ | How does X work? | `codebase-index explain "X" --json` |
23
+ | What is this codebase? | `codebase-index architecture --json` |
24
+ | Find a named symbol | `codebase-index symbol "X" --json` |
25
+ | Who calls or references X? | `codebase-index refs "X" --json` |
26
+ | What changes if X changes? | `codebase-index impact "X" --json` |
27
+ | What does my current diff affect? | `codebase-index diff-impact --json` |
28
+ | How are X and Y connected? | `codebase-index path "X" "Y" --json` |
29
+ | Describe X and its neighborhood | `codebase-index describe "X" --json` |
30
+ | Produce a human graph | `codebase-index graph "X" --output <path>` |
31
+
32
+ Use `search --mode symbol` for exact symbol work, `--mode fts` for text and
33
+ error messages, and the default `hybrid` mode for mixed questions. Use pure
34
+ `vector` mode only when embeddings are enabled and exact vocabulary is unknown.
35
+
36
+ Read [references/commands.md](references/commands.md) only when command options
37
+ or routing remain unclear.
38
+
39
+ ## Evidence protocol
40
+
41
+ 1. Run the best-matching command with `--json`.
42
+ 2. Check `index` before trusting the payload:
43
+ - missing → run `codebase-index index`, then repeat;
44
+ - stale with fewer than 20 changed files → run `codebase-index update`;
45
+ - stale with 20 or more changed files → run `codebase-index index`;
46
+ - fresh → continue.
47
+ 3. Start with ranks 1–3. Read only `recommended_reads` line ranges.
48
+ 4. Trace one additional hop only when the question requires behavior,
49
+ ownership, or impact.
50
+ 5. Answer with `file:line` evidence and state uncertainty explicitly.
51
+
52
+ Do not open whole files when a line range is available. A snippet may already
53
+ be sufficient. `skeletonized: true` means the response intentionally folded
54
+ unrelated body lines; read the supplied range when the missing body matters.
55
+
56
+ ## Confidence contract
57
+
58
+ - **high** — answer from the indexed evidence.
59
+ - **medium** — read the recommended ranges and confirm the key claim with one
60
+ targeted lookup if necessary.
61
+ - **low** or no results — follow `fallback_suggestions`, then use a narrow
62
+ Grep/Glob fallback.
63
+
64
+ On `refs` and `impact`, inspect `coverage`. If `coverage.partial` is true, an
65
+ empty result is inconclusive; confirm with targeted Grep before saying that
66
+ nothing references the target.
67
+
68
+ Edges carry `confidence`:
69
+
70
+ - `extracted` — exact parser evidence;
71
+ - `inferred` — heuristic resolution;
72
+ - `ambiguous` — unresolved or non-unique.
73
+
74
+ Never present an inferred or ambiguous chain as certain.
75
+
76
+ ## Answer contract
77
+
78
+ Structure repository answers around:
79
+
80
+ 1. **Answer** — the direct conclusion.
81
+ 2. **Evidence** — the minimum supporting `file:line` references.
82
+ 3. **Confidence** — only when evidence is partial, inferred, stale, or missing.
83
+ 4. **Next check** — only when another check would materially reduce uncertainty.
84
+
85
+ Do not narrate every search step. Do not claim absence from a partial graph.
86
+ Do not replace evidence with a generated HTML graph.
87
+
88
+ For payload fields and failure handling, read
89
+ [references/response-contract.md](references/response-contract.md).
@@ -0,0 +1,73 @@
1
+ # Command Reference
2
+
3
+ Load this reference only when the intent table in `SKILL.md` is insufficient.
4
+
5
+ ## Retrieval
6
+
7
+ ```bash
8
+ codebase-index search "<query>" --json
9
+ codebase-index explain "<topic or flow>" --json
10
+ ```
11
+
12
+ Useful search options:
13
+
14
+ - `--mode hybrid|fts|symbol|vector`
15
+ - `--token-budget <tokens>`
16
+ - `--limit <count>`
17
+ - `--offset <pagination offset>`
18
+ - `--raw` to disable snippet skeletonization
19
+ - `--no-fallback` to suppress fallback suggestions
20
+
21
+ `explain` uses the HOW_IT_WORKS intent and a larger default token budget. Prefer
22
+ it over repeatedly rewording a broad search.
23
+
24
+ ## Code graph
25
+
26
+ ```bash
27
+ codebase-index architecture --json
28
+ codebase-index refs "<symbol>" --json
29
+ codebase-index impact "<file-or-symbol>" --direction up --depth 2 --json
30
+ codebase-index diff-impact --base HEAD --direction up --depth 2 --json
31
+ codebase-index path "<source>" "<target>" --json
32
+ codebase-index describe "<file-or-symbol>" --json
33
+ ```
34
+
35
+ - `architecture` reads module analysis cached at index time.
36
+ - `refs` finds definitions, calls, and graph-backed references.
37
+ - `impact` walks dependents (`up`), dependencies (`down`), or both.
38
+ - `diff-impact` aggregates impact for tracked changes relative to a verified
39
+ Git commit; new or excluded files are reported as unresolved.
40
+ - `path` returns the shortest known dependency/call chain.
41
+ - `describe` returns a node card with callers, callees, module, and centrality.
42
+
43
+ Use `graph` only for a visualization intended for a person:
44
+
45
+ ```bash
46
+ codebase-index graph "<target>" --direction both --depth 2 --output graph.html
47
+ ```
48
+
49
+ For headless work, use `--output`; do not use `--open`. Exports also support
50
+ `--format graphml|dot|neo4j`.
51
+
52
+ ## Index health
53
+
54
+ ```bash
55
+ codebase-index stats --json
56
+ codebase-index doctor
57
+ codebase-index update
58
+ codebase-index index
59
+ ```
60
+
61
+ Run `stats` and `doctor` when several unrelated queries have low confidence.
62
+ Low symbol counts or partial graph coverage can explain weak results.
63
+
64
+ ## Query examples
65
+
66
+ ```bash
67
+ codebase-index search "auth token refresh" --json
68
+ codebase-index search "AuthService class" --mode symbol --json
69
+ codebase-index search "connection reset by peer" --mode fts --json
70
+ codebase-index explain "checkout flow" --json
71
+ codebase-index impact "User" --direction up --depth 2 --json
72
+ codebase-index path "ApiController" "Database" --json
73
+ ```
@@ -0,0 +1,82 @@
1
+ # Response Contract
2
+
3
+ Load this reference when interpreting a retrieval packet or handling a weak
4
+ result.
5
+
6
+ ## Ranked results
7
+
8
+ Each result can contain:
9
+
10
+ - `rank`
11
+ - `path`
12
+ - `line_start` / `line_end`
13
+ - `symbols`
14
+ - `score`
15
+ - `reason`
16
+ - `snippet`
17
+ - `skeletonized`
18
+ - `elided_lines`
19
+
20
+ `recommended_reads` is the read plan. Start with its first one to three entries
21
+ and use exact line ranges.
22
+
23
+ `pagination.has_more` and `pagination.next_offset` indicate additional results.
24
+ Prefer a more specific command or a larger token budget before paging.
25
+
26
+ ## Freshness
27
+
28
+ The `index` object is part of the evidence contract:
29
+
30
+ ```text
31
+ exists=false → index
32
+ stale=true, files_changed_since_build<20 → update
33
+ stale=true, files_changed_since_build≥20 → full index
34
+ stale=false → proceed
35
+ ```
36
+
37
+ Repeat the original query after rebuilding or updating.
38
+
39
+ ## Weak results
40
+
41
+ Fallback is allowed only when:
42
+
43
+ - results are empty;
44
+ - confidence is low;
45
+ - graph coverage is partial;
46
+ - the requested information is not represented by the index.
47
+
48
+ Use `fallback_suggestions.ripgrep` first. Otherwise construct one narrow Grep
49
+ pattern from the most distinctive symbol, error, or path in the question.
50
+ Avoid a full-repository scan unless targeted fallback also fails.
51
+
52
+ If several queries are weak:
53
+
54
+ ```bash
55
+ codebase-index stats --json
56
+ codebase-index doctor
57
+ ```
58
+
59
+ Report the limitation instead of inventing certainty.
60
+
61
+ ## Answer examples
62
+
63
+ High confidence:
64
+
65
+ ```text
66
+ Session validation is implemented in `src/auth/session.py:44`.
67
+ The request middleware calls it from `src/http/auth.py:18`.
68
+ ```
69
+
70
+ Partial graph:
71
+
72
+ ```text
73
+ The index found no graph-backed callers, but coverage for Lua is partial.
74
+ A targeted text search still finds two call sites in …
75
+ ```
76
+
77
+ Inferred chain:
78
+
79
+ ```text
80
+ The route-to-service link is parser-extracted; the service-to-model link is
81
+ heuristic, so the final hop should be verified before refactoring.
82
+ ```
@@ -4,7 +4,7 @@
4
4
  # - Whitelists subcommands so the skill can never invoke destructive ones (clean/init/watch).
5
5
  set -euo pipefail
6
6
 
7
- ALLOWED="search explain symbol refs impact graph stats doctor update index"
7
+ ALLOWED="search explain architecture symbol refs impact diff-impact path describe graph stats doctor update index"
8
8
 
9
9
  sub="${1:-}"
10
10
  case " $ALLOWED " in
@@ -8,7 +8,10 @@ param(
8
8
  )
9
9
 
10
10
  $ErrorActionPreference = "Stop"
11
- $allowed = @("search", "explain", "symbol", "refs", "impact", "graph", "stats", "doctor", "update", "index")
11
+ $allowed = @(
12
+ "search", "explain", "architecture", "symbol", "refs", "impact", "diff-impact",
13
+ "path", "describe", "graph", "stats", "doctor", "update", "index"
14
+ )
12
15
 
13
16
  if ($allowed -notcontains $Subcommand) {
14
17
  Write-Error "cbx: refusing subcommand '$Subcommand'. Allowed: $($allowed -join ', ')"
@@ -5,12 +5,14 @@ on:
5
5
  branches: [main]
6
6
  pull_request:
7
7
 
8
+ permissions: read-all
9
+
8
10
  jobs:
9
11
  lint:
10
12
  runs-on: ubuntu-latest
11
13
  steps:
12
- - uses: actions/checkout@v4
13
- - uses: actions/setup-python@v5
14
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
15
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
14
16
  with:
15
17
  python-version: "3.12"
16
18
  - run: python -m pip install --upgrade pip
@@ -31,8 +33,8 @@ jobs:
31
33
  python-version: ["3.11", "3.12", "3.13"]
32
34
  runs-on: ${{ matrix.os }}
33
35
  steps:
34
- - uses: actions/checkout@v4
35
- - uses: actions/setup-python@v5
36
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
37
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
36
38
  with:
37
39
  python-version: ${{ matrix.python-version }}
38
40
  - run: python -m pip install --upgrade pip
@@ -5,12 +5,14 @@ on:
5
5
  tags: ["v*"]
6
6
  workflow_dispatch: # manual (re)publish — e.g. push an already-tagged version to PyPI
7
7
 
8
+ permissions: read-all
9
+
8
10
  jobs:
9
11
  build:
10
12
  runs-on: ubuntu-latest
11
13
  steps:
12
- - uses: actions/checkout@v4
13
- - uses: actions/setup-python@v5
14
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
15
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
14
16
  with:
15
17
  python-version: "3.12"
16
18
  - run: pip install -e ".[dev,build]"
@@ -22,7 +24,7 @@ jobs:
22
24
  run: twine check dist/*
23
25
  - name: Clean-machine smoke
24
26
  run: python scripts/release_smoke.py
25
- - uses: actions/upload-artifact@v4
27
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
26
28
  with:
27
29
  name: dist
28
30
  path: dist/
@@ -36,13 +38,13 @@ jobs:
36
38
  permissions:
37
39
  contents: write # create the GitHub release
38
40
  steps:
39
- - uses: actions/checkout@v4
40
- - uses: actions/download-artifact@v4
41
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
42
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
41
43
  with:
42
44
  name: dist
43
45
  path: dist
44
46
  - name: Create GitHub release
45
- uses: softprops/action-gh-release@v2
47
+ uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2
46
48
  with:
47
49
  files: dist/*
48
50
  generate_release_notes: true
@@ -54,9 +56,9 @@ jobs:
54
56
  permissions:
55
57
  id-token: write # OIDC for PyPI Trusted Publishing — no token stored anywhere
56
58
  steps:
57
- - uses: actions/download-artifact@v4
59
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
58
60
  with:
59
61
  name: dist
60
62
  path: dist
61
63
  - name: Publish to PyPI
62
- uses: pypa/gh-action-pypi-publish@release/v1
64
+ uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # release/v1