codegraph-brain 0.6.0__tar.gz → 0.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 (246) hide show
  1. codegraph_brain-0.7.0/.claude-plugin/marketplace.json +31 -0
  2. codegraph_brain-0.7.0/.release-please-manifest.json +3 -0
  3. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/CHANGELOG.md +13 -0
  4. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/PKG-INFO +14 -1
  5. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/README.md +13 -0
  6. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/CURATION.md +18 -1
  7. codegraph_brain-0.7.0/benchmarks/guardian/pr-278.yaml +22 -0
  8. codegraph_brain-0.7.0/docs/specs/2026-07-31-finder-bug-class-taxonomy.md +155 -0
  9. codegraph_brain-0.7.0/plugin/.claude-plugin/plugin.json +22 -0
  10. codegraph_brain-0.7.0/plugin/.mcp.json +8 -0
  11. codegraph_brain-0.7.0/plugin/README.md +44 -0
  12. codegraph_brain-0.7.0/plugin/commands/cgis-ingest.md +28 -0
  13. codegraph_brain-0.7.0/plugin/skills/cgis/SKILL.md +50 -0
  14. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/pyproject.toml +1 -1
  15. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_bench.py +15 -3
  16. codegraph_brain-0.6.0/.release-please-manifest.json +0 -3
  17. codegraph_brain-0.6.0/benchmarks/guardian/pr-278.yaml +0 -10
  18. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.github/workflows/autodoc.yml +0 -0
  19. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.github/workflows/ci.yml +0 -0
  20. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.github/workflows/guardian.yml +0 -0
  21. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.github/workflows/release-please.yml +0 -0
  22. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.gitignore +0 -0
  23. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.pre-commit-config.yaml +0 -0
  24. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/.python-version +0 -0
  25. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/CLAUDE.md +0 -0
  26. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/CONTRIBUTING.md +0 -0
  27. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/LICENSE +0 -0
  28. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/Makefile +0 -0
  29. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/pr-122.yaml +0 -0
  30. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/pr-140.yaml +0 -0
  31. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/pr-141.yaml +0 -0
  32. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/pr-142.yaml +0 -0
  33. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/pr-143.yaml +0 -0
  34. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/pr-144.yaml +0 -0
  35. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/benchmarks/guardian/results.jsonl +0 -0
  36. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/data/.gitkeep +0 -0
  37. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/CASE_STUDY.md +0 -0
  38. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/architecture/HOW_IT_WORKS.md +0 -0
  39. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/architecture/ONTOLOGY.md +0 -0
  40. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/architecture/PATTERNS_AND_TRIADS.md +0 -0
  41. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/architecture/SELF_PORTRAIT.md +0 -0
  42. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/architecture/diagrams/pipeline_flow.mermaid +0 -0
  43. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/architecture/health_badge.json +0 -0
  44. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/examples/.gitkeep +0 -0
  45. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/how-to/AGENT_ONBOARDING.md +0 -0
  46. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/how-to/CLI_USAGE.md +0 -0
  47. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/how-to/MCP_REFERENCE.md +0 -0
  48. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/ontology/.gitkeep +0 -0
  49. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/ontology/core.yaml +0 -0
  50. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/ontology/domains.yaml +0 -0
  51. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/ontology/patterns.yaml +0 -0
  52. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-09-domain-pattern-fingerprint-design.md +0 -0
  53. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-09-pattern-alphabet-motif-basis-design.md +0 -0
  54. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-10-guardian-sprint-design.md +0 -0
  55. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-11-fastapi-di-edges-design.md +0 -0
  56. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-11-guardian-chunked-review-design.md +0 -0
  57. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-11-guardian-chunker-design.md +0 -0
  58. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-11-mcp-drift-validate-fqn-design.md +0 -0
  59. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-11-resolver-split-design.md +0 -0
  60. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-11-symbol-import-edges-design.md +0 -0
  61. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-12-drift-empty-domains-design.md +0 -0
  62. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-12-gate-semantics-design.md +0 -0
  63. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-12-init-ontology-design.md +0 -0
  64. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-12-release-please-ci-design.md +0 -0
  65. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-13-suggest-packages-design.md +0 -0
  66. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-06-13-tangle-anti-pattern-design.md +0 -0
  67. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-29-guardian-skeptic-scoring-design.md +0 -0
  68. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-cgis-fractal-design.md +0 -0
  69. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-cgis-fractal-plan.md +0 -0
  70. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-chunk-source-filter-design.md +0 -0
  71. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-chunk-source-filter-plan.md +0 -0
  72. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-genai-client-close-design.md +0 -0
  73. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-genai-client-close-plan.md +0 -0
  74. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-guardian-precision-bench-design.md +0 -0
  75. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-guardian-precision-bench-plan.md +0 -0
  76. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-guardian-timeout-retry-design.md +0 -0
  77. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/2026-07-30-guardian-timeout-retry-plan.md +0 -0
  78. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/BLUEPRINT.md +0 -0
  79. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/PRD.md +0 -0
  80. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/TDD.md +0 -0
  81. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-09-fingerprint-drift.md +0 -0
  82. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-10-guardian-context-skeptic-inline.md +0 -0
  83. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-10-guardian-structured-findings-bench.md +0 -0
  84. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-10-motif-basis-part-b.md +0 -0
  85. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-10-unified-pattern-alphabet.md +0 -0
  86. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-11-fastapi-di-edges.md +0 -0
  87. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-11-guardian-chunked-review.md +0 -0
  88. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-11-guardian-chunker.md +0 -0
  89. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-11-mcp-drift-validate-fqn.md +0 -0
  90. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-11-resolver-split.md +0 -0
  91. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-12-drift-empty-domains.md +0 -0
  92. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-12-gate-semantics.md +0 -0
  93. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-12-init-ontology.md +0 -0
  94. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-12-release-please-ci.md +0 -0
  95. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-12-symbol-import-edges.md +0 -0
  96. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-06-13-suggest-packages.md +0 -0
  97. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/docs/specs/plans/2026-07-29-guardian-skeptic-scoring.md +0 -0
  98. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/main.py +0 -0
  99. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/release-please-config.json +0 -0
  100. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/gen_ideal_graph.py +0 -0
  101. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/generate_health.py +0 -0
  102. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/generate_mcp_ref.py +0 -0
  103. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/generate_schema_docs.py +0 -0
  104. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/guardian_bench.py +0 -0
  105. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/guardian_review.py +0 -0
  106. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/inject_readme_graph.py +0 -0
  107. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/probe_closure_gap.py +0 -0
  108. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/scripts/probe_tier_ladder.py +0 -0
  109. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/__init__.py +0 -0
  110. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/__main__.py +0 -0
  111. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/api/.gitkeep +0 -0
  112. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/api/__init__.py +0 -0
  113. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/api/mcp_server.py +0 -0
  114. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/cli.py +0 -0
  115. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/core/.gitkeep +0 -0
  116. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/core/models.py +0 -0
  117. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/.gitkeep +0 -0
  118. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/_python_ast.py +0 -0
  119. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/_python_classes.py +0 -0
  120. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/_python_functions.py +0 -0
  121. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/_python_imports.py +0 -0
  122. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/_python_types.py +0 -0
  123. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/base.py +0 -0
  124. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/python_extractor.py +0 -0
  125. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/extractors/typescript_extractor.py +0 -0
  126. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/__init__.py +0 -0
  127. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/bench.py +0 -0
  128. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/chunked.py +0 -0
  129. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/chunker.py +0 -0
  130. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/collector.py +0 -0
  131. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/core.py +0 -0
  132. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/diff_index.py +0 -0
  133. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/findings.py +0 -0
  134. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/github_poster.py +0 -0
  135. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/metrics.py +0 -0
  136. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/prompts.py +0 -0
  137. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/providers/__init__.py +0 -0
  138. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/providers/base.py +0 -0
  139. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/providers/gemini.py +0 -0
  140. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/providers/mistral.py +0 -0
  141. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/providers/ollama.py +0 -0
  142. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/recording.py +0 -0
  143. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/render.py +0 -0
  144. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/runner.py +0 -0
  145. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/guardian/skeptic.py +0 -0
  146. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/pipeline.py +0 -0
  147. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/py.typed +0 -0
  148. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/analysis/__init__.py +0 -0
  149. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/analysis/analyzer.py +0 -0
  150. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/analysis/anomaly.py +0 -0
  151. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/analysis/cohesion.py +0 -0
  152. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/analysis/health.py +0 -0
  153. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/analysis/suggest_service.py +0 -0
  154. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/context/__init__.py +0 -0
  155. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/context/audit.py +0 -0
  156. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/context/context_service.py +0 -0
  157. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/context/prompt.py +0 -0
  158. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/context/snippet.py +0 -0
  159. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/__init__.py +0 -0
  160. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/_scc.py +0 -0
  161. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/drift.py +0 -0
  162. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/drift_service.py +0 -0
  163. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/fingerprint.py +0 -0
  164. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/fractal.py +0 -0
  165. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/ontology_init.py +0 -0
  166. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/quotient.py +0 -0
  167. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/drift/triads.py +0 -0
  168. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/engine.py +0 -0
  169. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/fqn.py +0 -0
  170. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/render/__init__.py +0 -0
  171. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/render/graph_json.py +0 -0
  172. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/render/mermaid.py +0 -0
  173. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/query/render/metrics.py +0 -0
  174. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/resolver/.gitkeep +0 -0
  175. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/resolver/__init__.py +0 -0
  176. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/resolver/engine.py +0 -0
  177. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/resolver/indices.py +0 -0
  178. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/resolver/symbols.py +0 -0
  179. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/resolver/uplift.py +0 -0
  180. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/storage/.gitkeep +0 -0
  181. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/src/cgis/storage/sqlite_store.py +0 -0
  182. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/integration/.gitkeep +0 -0
  183. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/.gitkeep +0 -0
  184. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/__init__.py +0 -0
  185. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/conftest.py +0 -0
  186. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_architecture.py +0 -0
  187. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_drift.py +0 -0
  188. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_fractal.py +0 -0
  189. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_init_ontology_roundtrip.py +0 -0
  190. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_self_parse.py +0 -0
  191. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_self_parse_ts.py +0 -0
  192. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/self_parsing/test_suggest.py +0 -0
  193. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/.gitkeep +0 -0
  194. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/conftest.py +0 -0
  195. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/guardian_stubs.py +0 -0
  196. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test___main__.py +0 -0
  197. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_analyzer.py +0 -0
  198. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_audit.py +0 -0
  199. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_cli.py +0 -0
  200. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_cohesion.py +0 -0
  201. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_context_service.py +0 -0
  202. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_di_acceptance.py +0 -0
  203. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_drift.py +0 -0
  204. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_drift_service.py +0 -0
  205. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_fingerprint.py +0 -0
  206. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_fqn.py +0 -0
  207. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_fractal.py +0 -0
  208. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_gen_ideal_graph.py +0 -0
  209. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_generate_mcp_ref.py +0 -0
  210. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_graph_json.py +0 -0
  211. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_chunked.py +0 -0
  212. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_chunker.py +0 -0
  213. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_collector.py +0 -0
  214. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_core.py +0 -0
  215. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_diff_index.py +0 -0
  216. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_findings.py +0 -0
  217. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_metrics.py +0 -0
  218. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_poster.py +0 -0
  219. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_providers.py +0 -0
  220. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_recording.py +0 -0
  221. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_render.py +0 -0
  222. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_runner.py +0 -0
  223. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_guardian_skeptic.py +0 -0
  224. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_health_scorer.py +0 -0
  225. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_import_acceptance.py +0 -0
  226. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_mcp_server.py +0 -0
  227. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_mermaid.py +0 -0
  228. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_metrics.py +0 -0
  229. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_models.py +0 -0
  230. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_ontology_compliance.py +0 -0
  231. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_ontology_init.py +0 -0
  232. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_patterns_yaml.py +0 -0
  233. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_pipeline.py +0 -0
  234. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_prompt.py +0 -0
  235. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_python_extractor.py +0 -0
  236. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_quotient.py +0 -0
  237. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_resolver.py +0 -0
  238. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_resolver_indices.py +0 -0
  239. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_resolver_symbols.py +0 -0
  240. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_snippet.py +0 -0
  241. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_sqlite_store.py +0 -0
  242. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_suggest_service.py +0 -0
  243. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_triads.py +0 -0
  244. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_typescript_extractor.py +0 -0
  245. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/tests/unit/test_uplift.py +0 -0
  246. {codegraph_brain-0.6.0 → codegraph_brain-0.7.0}/uv.lock +0 -0
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "codegraph-brain",
4
+ "description": "Code Graph Intelligence for AI agents — a deterministic semantic graph of your codebase, exposed as MCP tools.",
5
+ "owner": {
6
+ "name": "Andrey G",
7
+ "url": "https://github.com/zaebee"
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "cgis",
12
+ "source": "./plugin",
13
+ "description": "Gives Claude a deterministic semantic graph of your codebase instead of flat text. Exact callers, real blast radius, and scoped context in a few hundred tokens rather than whole files.",
14
+ "version": "0.6.0",
15
+ "category": "development",
16
+ "author": {
17
+ "name": "Andrey G",
18
+ "url": "https://github.com/zaebee"
19
+ },
20
+ "homepage": "https://github.com/zaebee/codegraph-brain",
21
+ "tags": [
22
+ "code-graph",
23
+ "static-analysis",
24
+ "impact-analysis",
25
+ "architecture",
26
+ "python",
27
+ "typescript"
28
+ ]
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.7.0"
3
+ }
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.0](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.6.0...codegraph-brain-v0.7.0) (2026-07-31)
4
+
5
+
6
+ ### Features
7
+
8
+ * **plugin:** ship CGIS as a Claude Code plugin ([#290](https://github.com/zaebee/codegraph-brain/issues/290)) ([c93c7ed](https://github.com/zaebee/codegraph-brain/commit/c93c7ed377943081525c8965bc3a7ce5e5ccf7c1))
9
+
10
+
11
+ ### Documentation
12
+
13
+ * **plugin:** disclose the PyPI fetch and the local-only guarantee ([#291](https://github.com/zaebee/codegraph-brain/issues/291)) ([278560c](https://github.com/zaebee/codegraph-brain/commit/278560c74d7d9deae076511ce8659c233c41bcfc))
14
+ * **specs:** finder bug-class taxonomy + a real Resource Management fixture ([#258](https://github.com/zaebee/codegraph-brain/issues/258)) ([#288](https://github.com/zaebee/codegraph-brain/issues/288)) ([1e02d06](https://github.com/zaebee/codegraph-brain/commit/1e02d06a1599d87dbc4958cb6e6db6e0acaae605))
15
+
3
16
  ## [0.6.0](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.5.0...codegraph-brain-v0.6.0) (2026-07-31)
4
17
 
5
18
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraph-brain
3
- Version: 0.6.0
3
+ Version: 0.7.0
4
4
  Summary: Semantic code graph for AI agents — deterministic FQN resolution, impact analysis and architectural drift gates, exposed over MCP.
5
5
  Project-URL: Homepage, https://github.com/zaebee/codegraph-brain
6
6
  Project-URL: Repository, https://github.com/zaebee/codegraph-brain
@@ -124,6 +124,19 @@ cgis impact "my_module.core_function" --depth 5
124
124
 
125
125
  ---
126
126
 
127
+ ## 🔌 Install as a Claude Code plugin
128
+
129
+ The fastest path — no config files, no paths to wire up:
130
+
131
+ ```bash
132
+ /plugin marketplace add zaebee/codegraph-brain
133
+ /plugin install cgis@codegraph-brain
134
+ ```
135
+
136
+ That ships the MCP server, a skill that teaches the agent *when* to query the graph instead of reading files, and `/cgis-ingest` to build the graph on first use. The server is pulled from PyPI on demand via `uvx`, so there is nothing to clone or build.
137
+
138
+ ---
139
+
127
140
  ## 🤖 Agent Integration (MCP)
128
141
 
129
142
  CGIS is designed to be plugged into your AI workflow via the **Model Context Protocol (MCP)**. Once running, your agent gains "Superpowers":
@@ -74,6 +74,19 @@ cgis impact "my_module.core_function" --depth 5
74
74
 
75
75
  ---
76
76
 
77
+ ## 🔌 Install as a Claude Code plugin
78
+
79
+ The fastest path — no config files, no paths to wire up:
80
+
81
+ ```bash
82
+ /plugin marketplace add zaebee/codegraph-brain
83
+ /plugin install cgis@codegraph-brain
84
+ ```
85
+
86
+ That ships the MCP server, a skill that teaches the agent *when* to query the graph instead of reading files, and `/cgis-ingest` to build the graph on first use. The server is pulled from PyPI on demand via `uvx`, so there is nothing to clone or build.
87
+
88
+ ---
89
+
77
90
  ## 🤖 Agent Integration (MCP)
78
91
 
79
92
  CGIS is designed to be plugged into your AI workflow via the **Model Context Protocol (MCP)**. Once running, your agent gains "Superpowers":
@@ -172,7 +172,6 @@ Ambiguous (3 declined clips, gemini agreed with rationale):
172
172
  - **review_head = 6ee175e553c784a363c190e00021be5d365fb8dd** (later commits on
173
173
  the branch postdate the review)
174
174
 
175
- GT findings: NONE → recall vacuously 1.0; this PR measures precision only.
176
175
  Guardian returned 10 findings, all skeptic-confirmed, all refuted (#279):
177
176
 
178
177
  - `base.py:102` remove the "unreachable" `raise AssertionError` — **would break
@@ -189,3 +188,21 @@ Guardian returned 10 findings, all skeptic-confirmed, all refuted (#279):
189
188
  module has any; it is a plain dict → JSON
190
189
  - two test findings on brittle call counts — one's premise is false, the test
191
190
  already derives its expectation from `MAX_ATTEMPTS`
191
+
192
+ ### PR 278 — one GT finding added 2026-07-31 (#258)
193
+
194
+ Originally filed with `findings: []` as a pure precision entry. It now carries one:
195
+
196
+ - `gemini-client-never-closed` (`src/cgis/guardian/providers/gemini.py`, lines
197
+ 41-58, minor, contract, source `fix-commit`)
198
+
199
+ The diff **modified** the `client = genai.Client(...)` construction line and left
200
+ both httpx pools unclosed. Guardian reviewed that hunk and returned ten findings,
201
+ none about resource cleanup — Resource Management is a class absent from the
202
+ finder's focus areas (see `docs/specs/2026-07-31-finder-bug-class-taxonomy.md`).
203
+ Fixed later by human-directed review as #283 (`b2ae97b`), which is the
204
+ `fix-commit` provenance.
205
+
206
+ Precision is unaffected: `matched` stays 0, so the entry still scores `0/10`. The
207
+ addition supplies a recall signal — a real **0/1** where the empty ground truth
208
+ gave a vacuous 1.0.
@@ -0,0 +1,22 @@
1
+ # PR 278 — fix(guardian): explicit request timeout + bounded retry. See CURATION.md.
2
+ # Guardian produced 10 findings, skeptic-confirmed 10/10, ALL refuted (#279).
3
+ # head = review head (the snapshot guardian actually ran on); the two later
4
+ # commits on that branch postdate the review.
5
+ # One GT finding added 2026-07-31 (#258): the diff MODIFIED the genai.Client
6
+ # construction line and left both httpx pools unclosed. Guardian saw that hunk
7
+ # and returned 10 findings, none about resource cleanup — a class absent from
8
+ # the finder's focus areas. Fixed later in #283 (b2ae97b).
9
+ # Precision is unchanged by the addition (matched stays 0, so 0/10); what it adds
10
+ # is a recall signal: 0/1 instead of a vacuous 1.0.
11
+ pr: 278
12
+ base: 2e768cef585f10481970697657b0a9b40a411f47
13
+ head: 6ee175e553c784a363c190e00021be5d365fb8dd
14
+ findings:
15
+ - id: gemini-client-never-closed
16
+ file: src/cgis/guardian/providers/gemini.py
17
+ lines: [41, 58]
18
+ severity: minor
19
+ category: contract
20
+ summary: genai.Client opens a sync and an async httpx pool; neither is closed
21
+ source: fix-commit
22
+ ambiguous: []
@@ -0,0 +1,155 @@
1
+ # Finder bug-class taxonomy — gap analysis (#258)
2
+
3
+ **Status:** research input, **nothing shipped** (2026-07-31)
4
+ **Issue:** #258
5
+ **Lane:** guardian
6
+
7
+ ## What this is, and what it deliberately is not
8
+
9
+ #258 asks to broaden the finder's focus areas using
10
+ [alibaba/open-code-review](https://github.com/alibaba/open-code-review) (Apache-2.0)
11
+ as a source. This document does the mining and the gap analysis. It **does not
12
+ change the prompt**, and the reason is in the evidence below: a taxonomy checklist
13
+ is not a proven recall lever in this project, and the one adjacent experiment
14
+ regressed a class the finder was reliably catching.
15
+
16
+ What it produces instead is the two things that were missing before that decision
17
+ can be made: a grounded class list, and a benchmark fixture that contains a real
18
+ instance of the top gap.
19
+
20
+ ## The source
21
+
22
+ The taxonomy lives in `internal/config/rules/rule_docs/*.md` — per-language rule
23
+ documents, not a single ruleset file. Read `python.md` (language-specific) and
24
+ `default.md` (language-agnostic axes).
25
+
26
+ `default.md` gives five axes: **Correctness, Security, Performance,
27
+ Maintainability, Test Coverage.**
28
+
29
+ `python.md` names ten classes:
30
+
31
+ | # | class | representative rules |
32
+ |---|-------|----------------------|
33
+ | 1 | Obvious Typos or Spelling Errors | misspellings at declaration sites, in log/exception strings |
34
+ | 2 | Dead Code | unreachable branches, unread variables/imports, commented-out blocks |
35
+ | 3 | Mutable Default Arguments and Shared State | `def f(x=[])`, class-level mutables, loop-variable closures |
36
+ | 4 | Boundary and Edge-Case Handling | empty-collection indexing, off-by-one, `None` reaching non-optional code, **float `==`**, `d[k]` vs `d.get(k)` |
37
+ | 5 | Error Handling and Exceptions | bare `except:`, over-broad `except Exception`, silently discarded exceptions, lost traceback, over-wide `try`, `assert` for runtime validation |
38
+ | 6 | Identity and Equality Comparisons | `is` against literals, `== True`, `== None` |
39
+ | 7 | **Resource Management** | files/sockets/locks/connections without `with`; **"resources acquired in a `try` whose `finally` cleanup is missing or incomplete on the error path"** |
40
+ | 8 | Performance | `+=` string building, list membership tests, loop-invariant recomputation, eager f-strings in logging |
41
+ | 9 | Concurrency and Async | check-then-act races, blocking calls inside `async def`, **asyncio tasks created and never awaited**, unsynchronised shared state |
42
+ | 10 | Security-Sensitive Code | `eval`/`exec`, `subprocess(shell=True)`, `pickle`/`yaml.load` without SafeLoader, string-built SQL, secrets in logs, weak crypto, path traversal |
43
+
44
+ ## A framing incompatibility that must not be copied
45
+
46
+ `python.md` opens with:
47
+
48
+ > Favor precision over recall: only raise an issue when you are confident it is a
49
+ > real defect, and stay silent when the surrounding context is unclear.
50
+
51
+ That is the **opposite** of this project's finder, which was deliberately moved to
52
+ the max-recall end in #249 (cap removed, confidence gate dropped, "surface every
53
+ plausible finding") on the recall-then-filter architecture. Their rules also
54
+ repeatedly instruct the model to *confirm with a file read before flagging* —
55
+ an agentic capability our finder does not have.
56
+
57
+ **Borrow the class names. Do not borrow the framing.** Lifting their preamble
58
+ would undo #249.
59
+
60
+ ## Gap analysis against the current focus areas
61
+
62
+ `prompts.py` currently names seven: Logic bugs, Unvalidated external data,
63
+ Exact-equality on floats/money, Missing test coverage, Type safety, Library
64
+ boundary contracts, Ontology compliance.
65
+
66
+ Mapped against the source:
67
+
68
+ | source class | our coverage |
69
+ |---|---|
70
+ | Boundary and Edge-Case Handling | **covered** — split across "Logic bugs" and "Exact-equality on floats" |
71
+ | Test Coverage | **covered** — "Missing test coverage" |
72
+ | Security-Sensitive Code | **absent** |
73
+ | Concurrency and Async | **absent** |
74
+ | Resource Management | **absent** |
75
+ | Error Handling and Exceptions | **absent** |
76
+ | Mutable Default Arguments | absent |
77
+ | Identity and Equality Comparisons | absent |
78
+ | Dead Code | absent |
79
+ | Performance | absent |
80
+ | — | "Type safety" and "Ontology compliance" are ours alone (mypy-strict and the cgis graph contract); no counterpart, and correctly so |
81
+
82
+ ### Four gaps have evidence in this repository, not just in the abstract
83
+
84
+ - **Resource Management.** PR #278's diff *modified* the
85
+ `client = genai.Client(...)` line in `gemini.py` and left both httpx pools
86
+ unclosed. Guardian reviewed that hunk and returned 10 findings, none about
87
+ resource cleanup. Fixed later by human-directed review as #283. The source's
88
+ wording — cleanup "missing or incomplete on the error path" — even covers the
89
+ follow-on defect found in review of that fix, where a throwing `aclose()`
90
+ skipped `client.close()`.
91
+ - **Error Handling and Exceptions.** The recording guard added in #279 was written
92
+ as `except Exception` and was too broad: it swallowed the `ValueError` a
93
+ mistyped path raises. Caught by an independent reviewer, not by the finder.
94
+ - **Security-Sensitive Code.** This repo parses YAML (`load_ground_truth`,
95
+ `patterns.yaml`) and shells out to `git` and `gh` throughout `guardian_bench.py`
96
+ and `collector.py`. Two of the source's rules — `yaml.load` without `SafeLoader`,
97
+ `subprocess` with `shell=True` — target exactly those surfaces.
98
+ - **Concurrency and Async.** The whole guardian path is async: providers, chunked
99
+ review, `judge_all`'s concurrency. "asyncio tasks created and never awaited" and
100
+ "blocking calls inside `async def`" are live risks here.
101
+
102
+ The remaining four gaps (mutable defaults, identity comparisons, dead code,
103
+ performance) have no observed instance in this codebase. They are candidates, not
104
+ findings.
105
+
106
+ ## Why the prompt is not being changed here
107
+
108
+ Two independent pieces of evidence:
109
+
110
+ 1. **The lever is unproven.** The deep-research synthesis behind #249 ranked levers
111
+ by vote; "refined checklist raised recall 0.66→0.93" was **killed 0-3**, and
112
+ "few-shot beats taxonomy+CoT" was also killed. The defect checklist was
113
+ explicitly demoted to "a light scaffold, NOT the main bet" — the main bets being
114
+ cap removal, the max-recall instruction, and sampling.
115
+ 2. **The adjacent experiment regressed.** Expanding few-shot with a targeted float
116
+ example did not crack the float class *and* dropped pr-144 from a median 3/5 to
117
+ 1/5 — it pulled finder attention away from the yaml class it was catching
118
+ reliably. Reverted on no-evidence-no-ship (#247's over-anchoring lesson, which
119
+ #258 itself cites).
120
+
121
+ A compact named-class checklist is a weaker intervention than the few-shot that
122
+ burned us, so it may well be safe. But "may well be" is not a measurement, and
123
+ this system has swung on single-finding deltas before.
124
+
125
+ ## What would make the change decidable
126
+
127
+ #258 says to validate "once a suitable fixture exists". One now does:
128
+ `benchmarks/guardian/pr-278.yaml` carries a real Resource Management defect
129
+ (`gemini-client-never-closed`) that the current finder demonstrably missed, on a
130
+ diff whose review head is pinned.
131
+
132
+ Adding the ground truth does not disturb the precision baseline published in #279:
133
+ `precision = matched / (matched + noise)` and matched stays 0, so it remains
134
+ `0/10 = 0.0`. What it adds is a recall signal — a real **0/1** where an empty
135
+ ground truth gave a vacuous 1.0.
136
+
137
+ The experiment that decides #258:
138
+
139
+ 1. Freeze a finder set on pr-278 with `--record-finder` (no skeptic).
140
+ 2. Replay with the current prompt: expect recall 0.0 on that entry.
141
+ 3. Add the compact class checklist and re-run the frozen-set comparison across
142
+ pr-278 **and** the existing entries — the point is not only "does it catch the
143
+ leak" but "does it stop catching what it caught", which is how the float
144
+ experiment failed.
145
+ 4. Ship only if recall does not regress elsewhere.
146
+
147
+ Steps 2–4 need a provider key, which is why they are not done here.
148
+
149
+ ## Out of scope
150
+
151
+ - Any edit to `prompts.py`.
152
+ - Adopting the source's precision-over-recall framing, or its file-read-before-flag
153
+ instructions (we have no such capability in the finder).
154
+ - Copying rule text verbatim — the source is Apache-2.0 Go/agentic tooling for a
155
+ different stack; #258 asks for the taxonomy only.
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "cgis",
3
+ "displayName": "CGIS — Code Graph Intelligence",
4
+ "version": "0.6.0",
5
+ "description": "Gives Claude a deterministic semantic graph of your codebase instead of flat text — exact callers, real blast radius, and scoped context in a few hundred tokens rather than whole files. Runs fully locally: on first use it fetches the open-source codegraph-brain package from PyPI via uvx, then analyses your code on your machine. No hooks, no telemetry, nothing sent anywhere.",
6
+ "author": {
7
+ "name": "Andrey G",
8
+ "url": "https://github.com/zaebee"
9
+ },
10
+ "homepage": "https://github.com/zaebee/codegraph-brain",
11
+ "repository": "https://github.com/zaebee/codegraph-brain",
12
+ "license": "MIT",
13
+ "keywords": [
14
+ "code-graph",
15
+ "static-analysis",
16
+ "impact-analysis",
17
+ "call-graph",
18
+ "architecture",
19
+ "python",
20
+ "typescript"
21
+ ]
22
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "cgis": {
4
+ "command": "uvx",
5
+ "args": ["--from", "codegraph-brain>=0.6.0", "cgis-mcp"]
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,44 @@
1
+ # CGIS — Code Graph Intelligence
2
+
3
+ Gives Claude a deterministic semantic graph of your codebase instead of flat text. Exact callers, real blast radius, and scoped context in a few hundred tokens rather than whole files.
4
+
5
+ ```bash
6
+ /plugin marketplace add zaebee/codegraph-brain
7
+ /plugin install cgis@codegraph-brain
8
+ ```
9
+
10
+ Then, in any repository, run `/cgis-ingest` once to build the graph.
11
+
12
+ ## What it ships
13
+
14
+ | Component | What it does |
15
+ | :--- | :--- |
16
+ | MCP server `cgis` | 13 tools: impact analysis, flow tracing, structure, symbol search, metrics, architectural drift, authz reachability |
17
+ | Skill `cgis` | Teaches the agent *when* to query the graph instead of reading files |
18
+ | Command `/cgis-ingest` | Builds the graph on first use and reports what it found |
19
+
20
+ ## What it does on your machine
21
+
22
+ **On first use it downloads a package.** The MCP server is the open-source [`codegraph-brain`](https://pypi.org/project/codegraph-brain/) package (MIT), fetched from PyPI with `uvx --from "codegraph-brain>=0.6.0" cgis-mcp` and cached by `uv` afterwards. That download is the only thing this plugin fetches.
23
+
24
+ **Everything else is local.** Your source code is parsed on your machine with Tree-sitter, and the resulting graph is written to `graph.db` in your project root. No source, no graph, and no usage data leaves your machine.
25
+
26
+ - **No hooks.** The plugin registers none, so it observes nothing outside its own tool calls.
27
+ - **No telemetry.** No analytics, usage pings, crash reporting or feature-flag fetches.
28
+ - **No credential access.** It reads source files under the path you point it at; nothing else.
29
+
30
+ `graph.db` should go in your `.gitignore`.
31
+
32
+ ## Guardian is not part of this plugin
33
+
34
+ The repository also contains **Guardian**, a graph-aware LLM code reviewer that *does* call an external model provider (Gemini, Mistral, Cohere, or a local Ollama). It is a CI tool, it requires explicit configuration, and this plugin neither ships nor invokes it. See the [repository README](https://github.com/zaebee/codegraph-brain#-guardian-graph-aware-code-review) if you want it in your pipeline.
35
+
36
+ ## Coverage
37
+
38
+ Extractors exist for **Python** and **TypeScript** (`.py`, `.ts`, `.tsx`). Other languages are invisible to the graph — see the [case study](https://github.com/zaebee/codegraph-brain/blob/main/docs/CASE_STUDY.md) for measured coverage on a real twelve-repository codebase, including what it misses.
39
+
40
+ ## Links
41
+
42
+ - Source: [github.com/zaebee/codegraph-brain](https://github.com/zaebee/codegraph-brain)
43
+ - Package: [pypi.org/project/codegraph-brain](https://pypi.org/project/codegraph-brain/)
44
+ - Licence: MIT
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Build or refresh the CGIS code graph for this repository
3
+ argument-hint: "[source path — defaults to autodetected]"
4
+ ---
5
+
6
+ Build the CGIS semantic graph for this repository so the `cgis_*` tools can answer structural questions.
7
+
8
+ **Source path:** $ARGUMENTS
9
+
10
+ If no path was given above, work out the source root yourself rather than asking:
11
+
12
+ - a `src/` directory if one exists
13
+ - otherwise the package directory named in `pyproject.toml`, `package.json`, or `tsconfig.json`
14
+ - otherwise the repository root
15
+
16
+ Never point ingestion at `node_modules`, `.venv`, `venv`, `dist`, `build`, or `.git` — they add minutes and pollute the graph with code nobody will ask about.
17
+
18
+ Then:
19
+
20
+ 1. Call `cgis_ingest` with that path. Leave `db_path` at its default so the graph lands in `graph.db` at the project root, where every other tool looks for it.
21
+ 2. Call `cgis_validate` and read the resolution breakdown.
22
+ 3. Report back concisely: how many files, nodes and edges landed, and the share of unresolved edges.
23
+
24
+ On the unresolved share, interpret rather than just quoting the number. A residue in the low tens of percent is normal and consists mostly of runtime-dispatched calls — `logger.info`, `response.json`, injected clients. If it is unusually high, the likely cause is ingesting the wrong root or a codebase leaning heavily on dynamic dispatch; say which you think it is.
25
+
26
+ If the repository contains languages CGIS has no extractor for — anything other than Python and TypeScript — name them, so it is clear up front which parts of the codebase the graph will not be able to answer for.
27
+
28
+ Finally, mention that `graph.db` should be added to `.gitignore` if it is not already there, and that the graph goes stale as code changes: re-run this command after substantial edits.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: cgis
3
+ description: Use when a question is about how code connects rather than what a single file says — finding every caller of a symbol, judging whether a rename or signature change is safe, tracing an execution path, mapping an unfamiliar module, or checking architectural drift. Reach for it before grepping across files or reading whole modules for context.
4
+ ---
5
+
6
+ # CGIS — query the graph instead of guessing
7
+
8
+ Reading files to answer a structural question is the slow, lossy path: it burns context and still leaves you inferring connections. CGIS holds a deterministic graph of the codebase — every function, method, class and the resolved edges between them — and answers those questions exactly.
9
+
10
+ ## When to reach for it
11
+
12
+ | Question | Tool | Instead of |
13
+ | :--- | :--- | :--- |
14
+ | "What calls this?" | `cgis_analyze_impact` | grepping the name and hoping |
15
+ | "Is this rename safe?" | `cgis_analyze_impact` | reading every plausible caller |
16
+ | "What does this end up calling?" | `cgis_trace_flow` | following imports by hand |
17
+ | "How is this class laid out?" | `cgis_get_structure` | reading the whole file |
18
+ | "Give me context on this symbol" | `cgis_context` | pasting several files |
19
+ | "Where is the symbol named X?" | `cgis_find_symbol` | a broad grep |
20
+ | "What's coupled or god-classed?" | `cgis_metrics` | intuition |
21
+ | "Did this change drift the architecture?" | `cgis_drift` | nothing — there is no manual equivalent |
22
+ | "Does every handler reach its authz guard?" | `cgis_audit_reachability` | auditing routes one by one |
23
+
24
+ A subgraph at depth 2 costs a few hundred tokens. The equivalent in file chunks costs thousands and is less precise.
25
+
26
+ ## First run in a repository
27
+
28
+ The graph lives in `graph.db` in the project root, and every tool resolves that path relative to the working directory. If a tool answers `Database not found`, the graph has not been built yet:
29
+
30
+ ```
31
+ cgis_ingest(project_path="./src")
32
+ ```
33
+
34
+ Point it at the source root, not the repository root — ingesting `node_modules` or a virtualenv wastes time and pollutes the graph. `/cgis-ingest` does this for you and picks the right path.
35
+
36
+ Re-run `cgis_ingest` after any substantial change; it is incremental by default and skips unchanged files. A stale graph is worse than no graph, because it answers confidently and wrongly.
37
+
38
+ ## Reading the answers honestly
39
+
40
+ CGIS classifies each edge as **internal**, **stdlib**, **external**, or **unresolved**. Unresolved edges are not bugs — they are calls on objects whose type is decided at runtime (`response.json`, `logger.info`, an injected client). No static analyser resolves those without executing the code.
41
+
42
+ This matters when you act on the output: **an empty impact result means "no static callers found", not "safe to delete."** A symbol reached only through dynamic dispatch, a registry, or a framework decorator will not appear. Check `cgis_validate` if the unresolved share looks high for the area you are touching, and say so rather than asserting safety you cannot see.
43
+
44
+ ## Coverage
45
+
46
+ Extractors exist for **Python** (`.py`) and **TypeScript** (`.ts`, `.tsx`). Vue, Astro, Go, Rust and everything else are invisible to the graph — in a mixed repository, fall back to reading files for those parts and say which parts of the answer the graph could not cover.
47
+
48
+ ## Not covered here
49
+
50
+ Guardian, the graph-aware LLM reviewer, is a CI tool rather than an interactive one — it reviews pull requests where no agent is present. Inside a Claude Code session you are already the reviewer, and you now have the graph. See [Guardian in the README](https://github.com/zaebee/codegraph-brain#-guardian-graph-aware-code-review) to wire it into CI.
@@ -7,7 +7,7 @@ packages = ["src/cgis"]
7
7
 
8
8
  [project]
9
9
  name = "codegraph-brain"
10
- version = "0.6.0"
10
+ version = "0.7.0"
11
11
  description = "Semantic code graph for AI agents — deterministic FQN resolution, impact analysis and architectural drift gates, exposed over MCP."
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.12"
@@ -348,7 +348,7 @@ def test_killed_ids_are_reported_not_just_counted() -> None:
348
348
 
349
349
 
350
350
  def test_pr_278_entry_scores_every_prediction_as_noise() -> None:
351
- """The precision baseline: an entry with no ground truth measures noise only (#279)."""
351
+ """The precision baseline: predictions that hit no GT are all noise (#279)."""
352
352
  truth = load_ground_truth(Path("benchmarks/guardian/pr-278.yaml"))
353
353
  predictions = [
354
354
  _pred("src/cgis/guardian/providers/base.py", 102),
@@ -359,12 +359,24 @@ def test_pr_278_entry_scores_every_prediction_as_noise() -> None:
359
359
 
360
360
  assert result.precision == 0.0
361
361
  assert result.noise == 2
362
- assert result.recall == 1.0 # vacuous: no ground truth to miss
362
+ # The GT finding added in #258 is missed by these predictions, so recall is a
363
+ # real 0.0 rather than the vacuous 1.0 an empty ground truth would give.
364
+ assert result.recall == 0.0
365
+ assert result.missed == ["gemini-client-never-closed"]
363
366
 
364
367
 
365
368
  def test_pr_278_entry_files_nothing_as_ambiguous() -> None:
366
369
  """Ambiguous exempts per FILE, so one entry would blind the whole baseline."""
367
370
  truth = load_ground_truth(Path("benchmarks/guardian/pr-278.yaml"))
368
371
 
369
- assert truth.findings == []
370
372
  assert truth.ambiguous == []
373
+
374
+
375
+ def test_pr_278_gt_matches_a_finding_on_the_client_construction() -> None:
376
+ """The resource-leak class the finder lacks, anchored where the diff touched it (#258)."""
377
+ truth = load_ground_truth(Path("benchmarks/guardian/pr-278.yaml"))
378
+
379
+ hit = match_findings([_pred("src/cgis/guardian/providers/gemini.py", 41)], truth)
380
+
381
+ assert hit.matched == {"gemini-client-never-closed": 0}
382
+ assert hit.noise == []
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.6.0"
3
- }
@@ -1,10 +0,0 @@
1
- # PR 278 — fix(guardian): explicit request timeout + bounded retry. See CURATION.md.
2
- # Guardian produced 10 findings, skeptic-confirmed 10/10, ALL refuted (#279).
3
- # head = review head (the snapshot guardian actually ran on); the two later
4
- # commits on that branch postdate the review.
5
- # GT findings: NONE → recall vacuously 1.0; this PR measures precision only.
6
- pr: 278
7
- base: 2e768cef585f10481970697657b0a9b40a411f47
8
- head: 6ee175e553c784a363c190e00021be5d365fb8dd
9
- findings: []
10
- ambiguous: []
File without changes