codegraph-brain 0.7.0__tar.gz → 0.7.2__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 (249) hide show
  1. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.github/workflows/autodoc.yml +0 -1
  2. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.github/workflows/ci.yml +0 -1
  3. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.github/workflows/guardian.yml +1 -1
  4. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.github/workflows/release-please.yml +0 -1
  5. codegraph_brain-0.7.2/.release-please-manifest.json +3 -0
  6. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/CHANGELOG.md +22 -0
  7. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/PKG-INFO +16 -2
  8. codegraph_brain-0.7.2/PRIVACY.md +45 -0
  9. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/README.md +15 -1
  10. codegraph_brain-0.7.2/docs/AUDIT.md +88 -0
  11. codegraph_brain-0.7.2/docs/lab-notes/2026-06-11-chunked-review-negative-result.md +132 -0
  12. codegraph_brain-0.7.2/docs/ontology/tolerances.lock +27 -0
  13. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/plugin/README.md +3 -2
  14. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/plugin/skills/cgis/SKILL.md +1 -1
  15. codegraph_brain-0.7.0/plugin/commands/cgis-ingest.md → codegraph_brain-0.7.2/plugin/skills/ingest/SKILL.md +2 -0
  16. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/pyproject.toml +2 -1
  17. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/cli.py +116 -53
  18. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/ontology_init.py +65 -0
  19. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_cli.py +121 -0
  20. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_ontology_init.py +70 -0
  21. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_patterns_yaml.py +79 -0
  22. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_triads.py +80 -0
  23. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/uv.lock +12 -1
  24. codegraph_brain-0.7.0/.release-please-manifest.json +0 -3
  25. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.claude-plugin/marketplace.json +0 -0
  26. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.gitignore +0 -0
  27. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.pre-commit-config.yaml +0 -0
  28. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/.python-version +0 -0
  29. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/CLAUDE.md +0 -0
  30. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/CONTRIBUTING.md +0 -0
  31. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/LICENSE +0 -0
  32. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/Makefile +0 -0
  33. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/CURATION.md +0 -0
  34. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-122.yaml +0 -0
  35. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-140.yaml +0 -0
  36. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-141.yaml +0 -0
  37. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-142.yaml +0 -0
  38. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-143.yaml +0 -0
  39. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-144.yaml +0 -0
  40. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/pr-278.yaml +0 -0
  41. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/benchmarks/guardian/results.jsonl +0 -0
  42. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/data/.gitkeep +0 -0
  43. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/CASE_STUDY.md +0 -0
  44. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/architecture/HOW_IT_WORKS.md +0 -0
  45. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/architecture/ONTOLOGY.md +0 -0
  46. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/architecture/PATTERNS_AND_TRIADS.md +0 -0
  47. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/architecture/SELF_PORTRAIT.md +0 -0
  48. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/architecture/diagrams/pipeline_flow.mermaid +0 -0
  49. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/architecture/health_badge.json +0 -0
  50. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/examples/.gitkeep +0 -0
  51. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/how-to/AGENT_ONBOARDING.md +0 -0
  52. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/how-to/CLI_USAGE.md +0 -0
  53. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/how-to/MCP_REFERENCE.md +0 -0
  54. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/ontology/.gitkeep +0 -0
  55. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/ontology/core.yaml +0 -0
  56. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/ontology/domains.yaml +0 -0
  57. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/ontology/patterns.yaml +0 -0
  58. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-09-domain-pattern-fingerprint-design.md +0 -0
  59. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-09-pattern-alphabet-motif-basis-design.md +0 -0
  60. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-10-guardian-sprint-design.md +0 -0
  61. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-11-fastapi-di-edges-design.md +0 -0
  62. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-11-guardian-chunked-review-design.md +0 -0
  63. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-11-guardian-chunker-design.md +0 -0
  64. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-11-mcp-drift-validate-fqn-design.md +0 -0
  65. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-11-resolver-split-design.md +0 -0
  66. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-11-symbol-import-edges-design.md +0 -0
  67. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-12-drift-empty-domains-design.md +0 -0
  68. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-12-gate-semantics-design.md +0 -0
  69. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-12-init-ontology-design.md +0 -0
  70. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-12-release-please-ci-design.md +0 -0
  71. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-13-suggest-packages-design.md +0 -0
  72. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-06-13-tangle-anti-pattern-design.md +0 -0
  73. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-29-guardian-skeptic-scoring-design.md +0 -0
  74. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-cgis-fractal-design.md +0 -0
  75. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-cgis-fractal-plan.md +0 -0
  76. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-chunk-source-filter-design.md +0 -0
  77. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-chunk-source-filter-plan.md +0 -0
  78. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-genai-client-close-design.md +0 -0
  79. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-genai-client-close-plan.md +0 -0
  80. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-guardian-precision-bench-design.md +0 -0
  81. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-guardian-precision-bench-plan.md +0 -0
  82. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-guardian-timeout-retry-design.md +0 -0
  83. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-30-guardian-timeout-retry-plan.md +0 -0
  84. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/2026-07-31-finder-bug-class-taxonomy.md +0 -0
  85. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/BLUEPRINT.md +0 -0
  86. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/PRD.md +0 -0
  87. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/TDD.md +0 -0
  88. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-09-fingerprint-drift.md +0 -0
  89. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-10-guardian-context-skeptic-inline.md +0 -0
  90. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-10-guardian-structured-findings-bench.md +0 -0
  91. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-10-motif-basis-part-b.md +0 -0
  92. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-10-unified-pattern-alphabet.md +0 -0
  93. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-11-fastapi-di-edges.md +0 -0
  94. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-11-guardian-chunked-review.md +0 -0
  95. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-11-guardian-chunker.md +0 -0
  96. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-11-mcp-drift-validate-fqn.md +0 -0
  97. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-11-resolver-split.md +0 -0
  98. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-12-drift-empty-domains.md +0 -0
  99. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-12-gate-semantics.md +0 -0
  100. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-12-init-ontology.md +0 -0
  101. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-12-release-please-ci.md +0 -0
  102. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-12-symbol-import-edges.md +0 -0
  103. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-06-13-suggest-packages.md +0 -0
  104. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/docs/specs/plans/2026-07-29-guardian-skeptic-scoring.md +0 -0
  105. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/main.py +0 -0
  106. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/plugin/.claude-plugin/plugin.json +0 -0
  107. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/plugin/.mcp.json +0 -0
  108. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/release-please-config.json +0 -0
  109. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/gen_ideal_graph.py +0 -0
  110. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/generate_health.py +0 -0
  111. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/generate_mcp_ref.py +0 -0
  112. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/generate_schema_docs.py +0 -0
  113. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/guardian_bench.py +0 -0
  114. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/guardian_review.py +0 -0
  115. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/inject_readme_graph.py +0 -0
  116. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/probe_closure_gap.py +0 -0
  117. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/scripts/probe_tier_ladder.py +0 -0
  118. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/__init__.py +0 -0
  119. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/__main__.py +0 -0
  120. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/api/.gitkeep +0 -0
  121. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/api/__init__.py +0 -0
  122. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/api/mcp_server.py +0 -0
  123. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/core/.gitkeep +0 -0
  124. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/core/models.py +0 -0
  125. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/.gitkeep +0 -0
  126. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/_python_ast.py +0 -0
  127. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/_python_classes.py +0 -0
  128. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/_python_functions.py +0 -0
  129. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/_python_imports.py +0 -0
  130. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/_python_types.py +0 -0
  131. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/base.py +0 -0
  132. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/python_extractor.py +0 -0
  133. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/extractors/typescript_extractor.py +0 -0
  134. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/__init__.py +0 -0
  135. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/bench.py +0 -0
  136. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/chunked.py +0 -0
  137. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/chunker.py +0 -0
  138. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/collector.py +0 -0
  139. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/core.py +0 -0
  140. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/diff_index.py +0 -0
  141. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/findings.py +0 -0
  142. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/github_poster.py +0 -0
  143. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/metrics.py +0 -0
  144. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/prompts.py +0 -0
  145. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/providers/__init__.py +0 -0
  146. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/providers/base.py +0 -0
  147. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/providers/gemini.py +0 -0
  148. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/providers/mistral.py +0 -0
  149. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/providers/ollama.py +0 -0
  150. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/recording.py +0 -0
  151. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/render.py +0 -0
  152. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/runner.py +0 -0
  153. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/guardian/skeptic.py +0 -0
  154. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/pipeline.py +0 -0
  155. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/py.typed +0 -0
  156. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/analysis/__init__.py +0 -0
  157. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/analysis/analyzer.py +0 -0
  158. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/analysis/anomaly.py +0 -0
  159. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/analysis/cohesion.py +0 -0
  160. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/analysis/health.py +0 -0
  161. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/analysis/suggest_service.py +0 -0
  162. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/context/__init__.py +0 -0
  163. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/context/audit.py +0 -0
  164. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/context/context_service.py +0 -0
  165. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/context/prompt.py +0 -0
  166. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/context/snippet.py +0 -0
  167. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/__init__.py +0 -0
  168. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/_scc.py +0 -0
  169. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/drift.py +0 -0
  170. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/drift_service.py +0 -0
  171. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/fingerprint.py +0 -0
  172. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/fractal.py +0 -0
  173. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/quotient.py +0 -0
  174. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/drift/triads.py +0 -0
  175. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/engine.py +0 -0
  176. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/fqn.py +0 -0
  177. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/render/__init__.py +0 -0
  178. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/render/graph_json.py +0 -0
  179. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/render/mermaid.py +0 -0
  180. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/query/render/metrics.py +0 -0
  181. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/resolver/.gitkeep +0 -0
  182. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/resolver/__init__.py +0 -0
  183. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/resolver/engine.py +0 -0
  184. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/resolver/indices.py +0 -0
  185. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/resolver/symbols.py +0 -0
  186. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/resolver/uplift.py +0 -0
  187. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/storage/.gitkeep +0 -0
  188. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/src/cgis/storage/sqlite_store.py +0 -0
  189. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/integration/.gitkeep +0 -0
  190. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/.gitkeep +0 -0
  191. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/__init__.py +0 -0
  192. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/conftest.py +0 -0
  193. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_architecture.py +0 -0
  194. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_drift.py +0 -0
  195. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_fractal.py +0 -0
  196. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_init_ontology_roundtrip.py +0 -0
  197. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_self_parse.py +0 -0
  198. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_self_parse_ts.py +0 -0
  199. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/self_parsing/test_suggest.py +0 -0
  200. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/.gitkeep +0 -0
  201. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/conftest.py +0 -0
  202. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/guardian_stubs.py +0 -0
  203. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test___main__.py +0 -0
  204. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_analyzer.py +0 -0
  205. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_audit.py +0 -0
  206. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_cohesion.py +0 -0
  207. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_context_service.py +0 -0
  208. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_di_acceptance.py +0 -0
  209. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_drift.py +0 -0
  210. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_drift_service.py +0 -0
  211. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_fingerprint.py +0 -0
  212. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_fqn.py +0 -0
  213. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_fractal.py +0 -0
  214. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_gen_ideal_graph.py +0 -0
  215. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_generate_mcp_ref.py +0 -0
  216. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_graph_json.py +0 -0
  217. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_bench.py +0 -0
  218. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_chunked.py +0 -0
  219. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_chunker.py +0 -0
  220. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_collector.py +0 -0
  221. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_core.py +0 -0
  222. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_diff_index.py +0 -0
  223. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_findings.py +0 -0
  224. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_metrics.py +0 -0
  225. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_poster.py +0 -0
  226. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_providers.py +0 -0
  227. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_recording.py +0 -0
  228. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_render.py +0 -0
  229. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_runner.py +0 -0
  230. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_guardian_skeptic.py +0 -0
  231. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_health_scorer.py +0 -0
  232. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_import_acceptance.py +0 -0
  233. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_mcp_server.py +0 -0
  234. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_mermaid.py +0 -0
  235. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_metrics.py +0 -0
  236. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_models.py +0 -0
  237. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_ontology_compliance.py +0 -0
  238. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_pipeline.py +0 -0
  239. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_prompt.py +0 -0
  240. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_python_extractor.py +0 -0
  241. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_quotient.py +0 -0
  242. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_resolver.py +0 -0
  243. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_resolver_indices.py +0 -0
  244. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_resolver_symbols.py +0 -0
  245. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_snippet.py +0 -0
  246. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_sqlite_store.py +0 -0
  247. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_suggest_service.py +0 -0
  248. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_typescript_extractor.py +0 -0
  249. {codegraph_brain-0.7.0 → codegraph_brain-0.7.2}/tests/unit/test_uplift.py +0 -0
@@ -26,7 +26,6 @@ jobs:
26
26
  uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
27
27
  with:
28
28
  enable-cache: true
29
- python-version: "3.12"
30
29
 
31
30
  - name: Install CGIS
32
31
  run: uv sync
@@ -18,7 +18,6 @@ jobs:
18
18
  uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
19
19
  with:
20
20
  enable-cache: true
21
- python-version: "3.12"
22
21
 
23
22
  - name: Install Dependencies
24
23
  run: uv sync --group dev
@@ -67,7 +67,7 @@ jobs:
67
67
  uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
68
68
 
69
69
  - name: Install dependencies
70
- run: uv sync --group guardian
70
+ run: uv sync --extra guardian
71
71
 
72
72
  - name: Build code graph
73
73
  run: uv run cgis ingest ./src --output graph.db
@@ -51,7 +51,6 @@ jobs:
51
51
  uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
52
52
  with:
53
53
  enable-cache: true
54
- python-version: "3.12"
55
54
 
56
55
  - name: Build sdist and wheel
57
56
  run: uv build
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.7.2"
3
+ }
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.2](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.7.1...codegraph-brain-v0.7.2) (2026-07-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ci:** install guardian deps with --extra, not --group ([#300](https://github.com/zaebee/codegraph-brain/issues/300)) ([1da003d](https://github.com/zaebee/codegraph-brain/commit/1da003d811db8e60201693905a6f83c2fccf48cf))
9
+ * **cli:** escape data interpolated into Rich console output ([#298](https://github.com/zaebee/codegraph-brain/issues/298)) ([dd4943d](https://github.com/zaebee/codegraph-brain/commit/dd4943d0fea1100b47130fcb0790e940da83276a))
10
+ * **drift:** pin measured depth when a domain is shallower than its gate ([#297](https://github.com/zaebee/codegraph-brain/issues/297)) ([1ebb93a](https://github.com/zaebee/codegraph-brain/commit/1ebb93a888037af5ad333ddffc7896af61f6eb5e)), closes [#229](https://github.com/zaebee/codegraph-brain/issues/229)
11
+
12
+
13
+ ### Documentation
14
+
15
+ * add the chunked-review lab note (a negative result worth keeping) ([#299](https://github.com/zaebee/codegraph-brain/issues/299)) ([265fefd](https://github.com/zaebee/codegraph-brain/commit/265fefda7ee30ece692d13ea0bb171d99ac18bd9)), closes [#160](https://github.com/zaebee/codegraph-brain/issues/160)
16
+
17
+ ## [0.7.1](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.7.0...codegraph-brain-v0.7.1) (2026-07-31)
18
+
19
+
20
+ ### Documentation
21
+
22
+ * add privacy policy ([#293](https://github.com/zaebee/codegraph-brain/issues/293)) ([33e45c2](https://github.com/zaebee/codegraph-brain/commit/33e45c2623d6d4a4c05106631fe2815ce1acf62e))
23
+ * add the architecture audit offering ([#296](https://github.com/zaebee/codegraph-brain/issues/296)) ([086396d](https://github.com/zaebee/codegraph-brain/commit/086396dbfa569a5091439811d6ec00e1b094386f))
24
+
3
25
  ## [0.7.0](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.6.0...codegraph-brain-v0.7.0) (2026-07-31)
4
26
 
5
27
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraph-brain
3
- Version: 0.7.0
3
+ Version: 0.7.2
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
@@ -133,7 +133,7 @@ The fastest path — no config files, no paths to wire up:
133
133
  /plugin install cgis@codegraph-brain
134
134
  ```
135
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.
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
137
 
138
138
  ---
139
139
 
@@ -235,6 +235,20 @@ classDef externalNode fill:#fff3e0,stroke:#e65100,stroke-width:1px,stroke-dashar
235
235
 
236
236
  ---
237
237
 
238
+ ## 💼 Architecture Audit
239
+
240
+ CGIS is free and you can run it yourself. If you would rather have the analysis than the tool, I run a fixed-price audit of your codebase's structure — authorisation coverage, blast radius, coupling, architectural drift — delivered in five working days.
241
+
242
+ **[Read what's included →](docs/AUDIT.md)** — $2,400 fixed, with an explicit list of what the analysis cannot see.
243
+
244
+ ---
245
+
246
+ ## 🔒 Privacy
247
+
248
+ CGIS collects nothing: no telemetry, no analytics, no account. Your code and the graph built from it stay on your machine. See [PRIVACY.md](PRIVACY.md).
249
+
250
+ ---
251
+
238
252
  ## 🛠️ Development
239
253
 
240
254
  ### Requirements
@@ -0,0 +1,45 @@
1
+ # Privacy Policy
2
+
3
+ **Last updated:** 31 July 2026
4
+
5
+ This policy covers the **CGIS Claude Code plugin** and the **`codegraph-brain`** package it installs.
6
+
7
+ ## The short version
8
+
9
+ CGIS collects nothing. There is no telemetry, no analytics, no usage reporting, no crash reporting, and no account. Your source code and the graph built from it stay on your machine. Nothing is sent to the author of this software, and there is no server to send it to.
10
+
11
+ ## What runs where
12
+
13
+ **On your machine.** CGIS parses your source files with Tree-sitter and writes the resulting graph to a SQLite file (`graph.db` by default) in your project directory. Parsing, storage and every query happen locally. The graph contains structural information derived from your code — file paths, symbol names, line numbers and the call relationships between them — and it never leaves your disk.
14
+
15
+ **Over the network, once.** On first use the plugin fetches the `codegraph-brain` package from the Python Package Index using `uvx`. This is an ordinary package download. PyPI is operated by the Python Software Foundation and applies its own logging and privacy practices to that request; see the [PSF Privacy Notice](https://www.python.org/privacy/). After the download is cached, the plugin makes no further network requests.
16
+
17
+ ## Data we collect
18
+
19
+ None.
20
+
21
+ We do not collect, transmit, store or have access to: your source code, the graphs built from it, file or repository names, prompts, tool calls, IP addresses, machine identifiers, usage counts, error reports, or anything else. This is not a matter of policy but of architecture — the software has no code that sends data anywhere, and no infrastructure to receive it.
22
+
23
+ ## Guardian, and when data does leave your machine
24
+
25
+ The `codegraph-brain` package also contains **Guardian**, a code reviewer that sends diffs and graph context to a large language model. **Guardian is not part of the Claude Code plugin**: the plugin neither ships nor invokes it, and it does nothing unless you configure it and run it deliberately, normally in CI.
26
+
27
+ If you choose to use Guardian, you select the model provider yourself — Google Gemini, Mistral, Cohere, or a local Ollama instance — and supply your own credentials. In that case the code being reviewed is sent to whichever provider you chose, under **that provider's** privacy policy and terms, not this one. Choosing Ollama keeps it local. We never see that traffic and never receive a copy.
28
+
29
+ Credentials for those providers are read from your environment and used only to call the provider they belong to. They are not logged, stored or transmitted anywhere else.
30
+
31
+ ## What CGIS never touches
32
+
33
+ CGIS reads source files under the path you point it at. It does not read your SSH keys, cloud credentials, browser data, keychain, clipboard, shell history, or files outside the directory you ingest. The plugin registers no Claude Code hooks, so it observes nothing about sessions, prompts or tool calls beyond its own tool invocations.
34
+
35
+ ## Children
36
+
37
+ This is a developer tool and is not directed at children.
38
+
39
+ ## Changes
40
+
41
+ Material changes to this policy will be recorded in this file, and its history is public in the repository's git log.
42
+
43
+ ## Contact
44
+
45
+ Questions about privacy: open an issue at [github.com/zaebee/codegraph-brain/issues](https://github.com/zaebee/codegraph-brain/issues), or email zaebuntu@gmail.com.
@@ -83,7 +83,7 @@ The fastest path — no config files, no paths to wire up:
83
83
  /plugin install cgis@codegraph-brain
84
84
  ```
85
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.
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
87
 
88
88
  ---
89
89
 
@@ -185,6 +185,20 @@ classDef externalNode fill:#fff3e0,stroke:#e65100,stroke-width:1px,stroke-dashar
185
185
 
186
186
  ---
187
187
 
188
+ ## 💼 Architecture Audit
189
+
190
+ CGIS is free and you can run it yourself. If you would rather have the analysis than the tool, I run a fixed-price audit of your codebase's structure — authorisation coverage, blast radius, coupling, architectural drift — delivered in five working days.
191
+
192
+ **[Read what's included →](docs/AUDIT.md)** — $2,400 fixed, with an explicit list of what the analysis cannot see.
193
+
194
+ ---
195
+
196
+ ## 🔒 Privacy
197
+
198
+ CGIS collects nothing: no telemetry, no analytics, no account. Your code and the graph built from it stay on your machine. See [PRIVACY.md](PRIVACY.md).
199
+
200
+ ---
201
+
188
202
  ## 🛠️ Development
189
203
 
190
204
  ### Requirements
@@ -0,0 +1,88 @@
1
+ # 🔎 Architecture Audit
2
+
3
+ **A measured read of your codebase's structure, delivered in five working days. $2,400 fixed.**
4
+
5
+ CGIS is free and you can run it yourself. This is for teams who want the analysis rather than the tool: someone who has read a lot of these graphs telling you what yours says.
6
+
7
+ ---
8
+
9
+ ## What you get
10
+
11
+ A written report, the graph itself, and ninety minutes on a call to walk through it.
12
+
13
+ | Section | Measured with | The question it answers |
14
+ | :--- | :--- | :--- |
15
+ | **Authorisation coverage** | `cgis_audit_reachability` | Does every route handler actually reach its authz guard? |
16
+ | **Blast radius** | `cgis_analyze_impact` | What breaks if we make the three changes we are planning? |
17
+ | **Coupling and god-classes** | `cgis_metrics` | Which parts will fight back hardest during a refactor? |
18
+ | **Architectural drift** | `cgis_drift` | How far has each domain moved from the pattern we said we follow? |
19
+ | **Graph integrity** | `cgis_validate` | How much of this codebase is even amenable to static analysis? |
20
+
21
+ The first row is the one that usually pays for the engagement. *"Is there a route in our API that reaches the database without passing a permission check?"* is a question with money attached, and nobody checks it by hand because on a few hundred endpoints it is a week of tedium. On the graph it is a traversal.
22
+
23
+ The report names specific handlers, files and line numbers. It is not a maturity score out of ten.
24
+
25
+ **You keep the graph.** The `graph.db` is handed over with the report, so your team can keep asking it questions after the engagement ends — including from Claude Code, via the plugin.
26
+
27
+ ---
28
+
29
+ ## How it runs
30
+
31
+ 1. **Access.** A read-only clone or a tarball. No production access, no credentials, no environment.
32
+ 2. **Ingest.** Your repositories go into a graph. If resolution comes out unusually low, you hear about it on day one, not in the report.
33
+ 3. **Analysis.** The five sections above, plus whatever the graph turns up that I did not expect. That last part is usually the interesting one.
34
+ 4. **Report.** Written, specific, with file and line references throughout.
35
+ 5. **Walkthrough.** Ninety minutes with whoever needs to act on it. Recorded if you want it.
36
+
37
+ Five working days from receiving the code.
38
+
39
+ ---
40
+
41
+ ## Price
42
+
43
+ **$2,400** for up to **three repositories** and **150,000 lines** of Python and TypeScript.
44
+
45
+ Larger estates are quoted after a look at the tree — the honest number depends on how many resolution edge cases the code has, not on line count alone. There is no hourly rate and no change-order mechanism: the scope above is the scope.
46
+
47
+ **Included:** the report, the graph, the walkthrough, and one round of follow-up questions by email within thirty days.
48
+
49
+ **Not included:** implementing the fixes. If you want the drift gates wired into CI or Guardian reviewing your pull requests, that is separate work and we can talk about it after you have read the report — not before.
50
+
51
+ ---
52
+
53
+ ## What this is not
54
+
55
+ The graph is static structure. That boundary is real, and it is better stated here than discovered halfway through.
56
+
57
+ - **Not a penetration test.** Authorisation *coverage* means every handler has a static path to a guard. It does not mean the guard is correct, that the logic behind it is sound, or that the endpoint is unexploitable.
58
+ - **Not a runtime analysis.** Nothing is executed. Behaviour that only appears under load, concurrency or real data is out of scope.
59
+ - **Not a business-logic review.** The report says how your code is wired, not whether the wiring implements the right rules.
60
+ - **Not language-complete.** Extractors cover Python and TypeScript. Vue, Astro, Go, Rust and everything else are invisible to the graph, and the report will say which parts of your codebase it could not see.
61
+ - **Not a substitute for judgement.** An empty impact result means *no static callers found*, not *safe to delete*. Dynamic dispatch, registries and framework decorators do not appear in any static graph. The report flags where this matters instead of asserting a safety it cannot see.
62
+
63
+ Roughly a tenth of call edges in a typical Python codebase cannot be resolved statically at all — they are calls on objects typed at runtime. That number is in the report too, because it tells you how much of the analysis to trust.
64
+
65
+ ---
66
+
67
+ ## Who this is for
68
+
69
+ **A good fit if:** you have a Python or TypeScript codebase large enough that no one holds it in their head, you are planning a migration or a significant refactor, you are onboarding AI agents onto the codebase and getting confident nonsense back, or someone has asked whether your authorisation is actually complete and nobody can answer.
70
+
71
+ **A poor fit if:** the codebase is small enough to read, the languages are outside the extractors, or what you actually need is a security assessment — in which case hire a security firm, and this is at best a first pass that tells them where to look.
72
+
73
+ ---
74
+
75
+ ## Evidence
76
+
77
+ Before commissioning anything, read the [case study](CASE_STUDY.md). It is CGIS run against a real twelve-repository estate — 8,146 commits, four languages — with every figure measured and a section on what the analysis could not cover.
78
+
79
+ If that page reads as honest to you, this engagement will run the same way. If it does not, we should not work together.
80
+
81
+ ---
82
+
83
+ ## Get in touch
84
+
85
+ - **Email:** zaebuntu@gmail.com
86
+ - **GitHub:** [open an issue](https://github.com/zaebee/codegraph-brain/issues) — fine for questions about scope, though most people prefer email for anything involving their own codebase
87
+
88
+ Tell me roughly how large the codebase is and what you are trying to decide. If the audit is not the right thing for your situation, I will say so.
@@ -0,0 +1,132 @@
1
+ # Lab note: the chunked-review experiment — a negative result worth keeping
2
+
3
+ **Date:** 2026-06-11
4
+ **Experiment:** #154 slices 1–2 · **Code:** PR #157 (`6178bae`), PR #159 (`2030eb8`)
5
+ **Verdict:** gate FAILED 3/4 — feature stays behind a flag, off in production
6
+ **Specs:** [`2026-06-11-guardian-chunker-design.md`](../specs/2026-06-11-guardian-chunker-design.md) ·
7
+ [`2026-06-11-guardian-chunked-review-design.md`](../specs/2026-06-11-guardian-chunked-review-design.md)
8
+
9
+ The headline: the hypothesis survived contact with reality only partially, and the
10
+ honest negative result is the most valuable artifact.
11
+
12
+ ## The problem
13
+
14
+ Guardian (our in-repo LLM reviewer, replacing gemini-code-assist before its
15
+ 2026-07-17 sunset) reliably LGTMs large PRs. Baseline bench (6 replayed PRs with
16
+ hand-curated ground truth, 3 runs each): mean recall 0.22, but **recall = 0 on all
17
+ three largest PRs** (36–62K prompt tokens). Plan-2 ablations proved more context
18
+ doesn't help: feeding 94K tokens of full files still produced LGTMs.
19
+
20
+ Diagnosis: **attention dilution** — the finder skims, it doesn't read.
21
+
22
+ ## The hypothesis (#154)
23
+
24
+ If the finder can't read a big diff, give it small ones: split changed files into
25
+ connected components over the code graph (IMPORTS/CALLS from `cgis ingest`), run a
26
+ finder pass per chunk with a per-chunk context budget, merge, dedup, run ONE
27
+ skeptic pass, post one report. Each chunk = a small, complete world.
28
+
29
+ ## What we built
30
+
31
+ - **Slice 1 (PR #157, `6178bae`)** — `chunker.py`, pure logic. Per-file diff
32
+ splitting (rename/deletion/binary/git-quoted-path handling), union-find over
33
+ graph edges, test-pairing heuristic, deterministic ordering, honest degradation
34
+ to isolated chunks when the graph DB is missing.
35
+ - **Slice 2 (PR #159, `2030eb8`)** — wiring behind `GUARDIAN_FEATURES=chunked`.
36
+ `run_review_routed` entry point, per-chunk finder passes with per-chunk
37
+ `full_files` (120K char budget) + impact graph, out-of-chunk hallucination
38
+ filter with LLM-path-artifact normalization (`a/x.py` → `x.py`),
39
+ `(file,line,category)` dedup, single skeptic over finding-bearing chunks only,
40
+ `MAX_CHUNKS=8` cap with overflow merge, `cumulative_usage` token accounting
41
+ (which incidentally fixed a latent retry-loses-tokens bug).
42
+
43
+ Both slices SDD-executed (subagent implementer + spec reviewer + quality
44
+ reviewer), bench-gated by spec §7 **before** enabling anything in prod.
45
+
46
+ ## The gate (pre-registered, spec §7)
47
+
48
+ 1. mean recall (6 PRs) ≥ 0.27 — baseline + 0.05
49
+ 2. mean recall over large PRs {140, 143, 144} > 0 — the hypothesis must show where it matters
50
+ 3. mean noise ≤ 1.5/PR
51
+ 4. no PR drops > 0.05 below its baseline
52
+
53
+ ## The result: FAIL 3/4
54
+
55
+ 18 runs (6 PRs × 3, finder `gemini-2.5-flash`, skeptic `gemini-3.5-flash`), data in
56
+ `benchmarks/guardian/results.jsonl`:
57
+
58
+ | PR | chunks | recall base → chunked | noise base → chunked |
59
+ |---|---|---|---|
60
+ | 122 | 8 (cap) | 0.152 → 0.152 | 1.0 → **6.0** |
61
+ | 140 | 5 | 0 → **0.067** ✨ | 3.3 → 3.3 |
62
+ | 141 (noise probe) | 5 | 1.0 → 1.0 | 0.7 → 2.7 |
63
+ | 142 | 1 (degenerate) | 0.167 → 0 | 0 → 0 |
64
+ | 143 | 7 | 0 → 0 | 0 → 2.7 |
65
+ | 144 | 5 | 0 → 0 | 0.7 → 1.3 |
66
+
67
+ Mean recall 0.203 (❌ vs 0.27), large-PR recall 0.022 (✅ — but only PR 140
68
+ contributed), noise 2.67/PR (❌ vs 1.5), PR 142 regression (❌, with a variance
69
+ caveat: its baseline rested on one lucky 0.5 run out of three).
70
+
71
+ ## What we learned
72
+
73
+ 1. **Attention dilution is real but not the whole story.** Chunking produced the
74
+ first-ever nonzero recall on a large PR (140). But 143/144 stayed at zero across
75
+ 21 small, focused finder calls. Those ground-truth bugs are invisible to this
76
+ finder *regardless of context size* — a model/prompt capability ceiling, not a
77
+ context problem.
78
+ 2. **Chunking multiplies noise superlinearly.** Every chunk invents its own false
79
+ positives (122: 8 chunks → noise 6.0/run). A single skeptic pass over
80
+ concatenated chunk contexts can't compensate.
81
+ 3. **Pre-registered gates work.** Writing pass/fail criteria into the spec before
82
+ spending money made the no-go decision mechanical instead of motivated. The flag
83
+ stays OFF in prod; the code sleeps behind it, fully tested, waiting for a better
84
+ noise story.
85
+ 4. **Honest degradation pays off.** Every failure mode (no graph DB, flaky chunk,
86
+ unparsable finder output, dead skeptic) degrades to something useful instead of
87
+ crashing — which also made the bench itself survivable.
88
+
89
+ ## Where this goes next (slice 3 candidates, not committed)
90
+
91
+ - Noise mitigation: stricter per-chunk finder prompt, per-chunk findings cap,
92
+ skeptic hardening for chunked volume.
93
+ - Ensemble finder (#155): union of N runs matched *different* GT findings
94
+ (122: 0.09/0.09/0.18 → union ~0.27) — possibly a cheaper recall lever than chunking.
95
+ - Eyeball the 143/144 ground truths: if they need cross-file reasoning the finder
96
+ can't do, no amount of context plumbing will fix it.
97
+ - Quotient-level "architectural chunk" (domain-graph drift as its own review unit).
98
+
99
+ Total experiment cost: ~5 PLN of gemini billing for the slice-2 bench (1.03M prompt
100
+ tokens), on top of Plan-2's bench budget. Money well burned.
101
+
102
+ ## Reproducing these numbers
103
+
104
+ `benchmarks/guardian/results.jsonl` is committed, so the chunked side of this
105
+ experiment is re-derivable. Group rows by `pr`, take the 3 rows whose `features`
106
+ field contains `chunked` (all share `guardian_sha` `a866a2ac`), and average per PR:
107
+
108
+ | Figure | Note | Recomputed |
109
+ |---|---|---|
110
+ | mean recall (6 PRs) | 0.203 | 0.203 |
111
+ | mean noise / PR | 2.67 | 2.667 |
112
+ | large-PR recall {140,143,144} | 0.022 | 0.022 |
113
+
114
+ Every cell of the table's **chunked** column reproduces exactly.
115
+
116
+ **The `base` column does not.** No single `guardian_sha` slice of the
117
+ `features == ""` rows reproduces it, and the baseline headline of 0.22 mean recall
118
+ does not fall out of any of them either — the two candidate slices with exactly 3
119
+ runs per PR give 0.191 and 0.167, and the earliest slice gives 0.271 on uneven run
120
+ counts. The file has also been appended to since (there are July 2026 rows from
121
+ later work), so the working set used to compute the baseline in June is no longer
122
+ recoverable from it.
123
+
124
+ This is recorded rather than corrected: a lab journal is a historical record, and
125
+ silently restating the baseline would be worse than flagging it. The gate
126
+ conclusions do not rest on it — gates 1 and 3 failed on absolute values (0.203 <
127
+ 0.27, 2.67 > 1.5), and both reproduce. Gate 4 (per-PR regression vs baseline) is
128
+ the one that cannot be independently re-checked today.
129
+
130
+ ## Refs
131
+
132
+ #154, #155, #160 · PR #157, PR #159
@@ -0,0 +1,27 @@
1
+ # Drift-tolerance ratchet lock (#151) — generated from patterns.yaml, edited by hand.
2
+ #
3
+ # Project convention since #140/#141: drift_tolerance is a RATCHET. Values may
4
+ # only go DOWN as domains get healthier, never up to mask a regression.
5
+ #
6
+ # test_tolerances_never_exceed_the_lock enforces it: lowering a tolerance means
7
+ # updating this file in the same PR, which puts the change in the diff where a
8
+ # reviewer sees it. Raising one fails the suite.
9
+ #
10
+ # Deliberate re-baselining (e.g. the Part B re-baseline in #144) is allowed —
11
+ # update the lock and justify it in the PR description.
12
+
13
+ project_domains:
14
+ extraction: 0.40
15
+ resolution: 0.40
16
+ pipeline: 0.25
17
+ storage: 0.20
18
+ query: 0.20
19
+ components: 0.20
20
+ layout: 0.50
21
+ hooks: 0.15
22
+ store: 0.15
23
+ providers: 0.15
24
+ utils: 0.15
25
+
26
+ project_level:
27
+ cgis-project: 0.15
@@ -7,7 +7,7 @@ Gives Claude a deterministic semantic graph of your codebase instead of flat tex
7
7
  /plugin install cgis@codegraph-brain
8
8
  ```
9
9
 
10
- Then, in any repository, run `/cgis-ingest` once to build the graph.
10
+ Then, in any repository, run `/cgis:ingest` once to build the graph.
11
11
 
12
12
  ## What it ships
13
13
 
@@ -15,7 +15,7 @@ Then, in any repository, run `/cgis-ingest` once to build the graph.
15
15
  | :--- | :--- |
16
16
  | MCP server `cgis` | 13 tools: impact analysis, flow tracing, structure, symbol search, metrics, architectural drift, authz reachability |
17
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 |
18
+ | Skill `/cgis:ingest` | Builds the graph on first use and reports what it found |
19
19
 
20
20
  ## What it does on your machine
21
21
 
@@ -42,3 +42,4 @@ Extractors exist for **Python** and **TypeScript** (`.py`, `.ts`, `.tsx`). Other
42
42
  - Source: [github.com/zaebee/codegraph-brain](https://github.com/zaebee/codegraph-brain)
43
43
  - Package: [pypi.org/project/codegraph-brain](https://pypi.org/project/codegraph-brain/)
44
44
  - Licence: MIT
45
+ - Privacy: [PRIVACY.md](https://github.com/zaebee/codegraph-brain/blob/main/PRIVACY.md) — nothing is collected
@@ -31,7 +31,7 @@ The graph lives in `graph.db` in the project root, and every tool resolves that
31
31
  cgis_ingest(project_path="./src")
32
32
  ```
33
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.
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
35
 
36
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
37
 
@@ -1,6 +1,8 @@
1
1
  ---
2
+ name: ingest
2
3
  description: Build or refresh the CGIS code graph for this repository
3
4
  argument-hint: "[source path — defaults to autodetected]"
5
+ disable-model-invocation: true
4
6
  ---
5
7
 
6
8
  Build the CGIS semantic graph for this repository so the `cgis_*` tools can answer structural questions.
@@ -7,7 +7,7 @@ packages = ["src/cgis"]
7
7
 
8
8
  [project]
9
9
  name = "codegraph-brain"
10
- version = "0.7.0"
10
+ version = "0.7.2"
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"
@@ -81,6 +81,7 @@ dev = [
81
81
  "interrogate>=1.7.0",
82
82
  "ipdb>=0.13.13",
83
83
  "mypy>=2.1.0",
84
+ "networkx>=3.3",
84
85
  "pre-commit>=4.6.0",
85
86
  "pytest>=9.0.3",
86
87
  "pytest-asyncio>=0.24.0",