codegraph-brain 0.7.1__tar.gz → 0.7.3__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.
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.github/workflows/ci.yml +5 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.github/workflows/guardian.yml +1 -1
- codegraph_brain-0.7.3/.github/workflows/release-please.yml +147 -0
- codegraph_brain-0.7.3/.release-please-manifest.json +3 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/CHANGELOG.md +22 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/PKG-INFO +1 -1
- codegraph_brain-0.7.3/docs/assets/.gitignore +1 -0
- codegraph_brain-0.7.3/docs/assets/cgis-app-avatar.png +0 -0
- codegraph_brain-0.7.3/docs/assets/cgis-app-avatar.svg +1 -0
- codegraph_brain-0.7.3/docs/assets/generate_avatar.py +123 -0
- codegraph_brain-0.7.3/docs/lab-notes/2026-06-11-chunked-review-negative-result.md +132 -0
- codegraph_brain-0.7.3/docs/ontology/tolerances.lock +27 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/pyproject.toml +2 -1
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/cli.py +116 -53
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/ontology_init.py +65 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_cli.py +121 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_ontology_init.py +70 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_patterns_yaml.py +79 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_triads.py +80 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/uv.lock +13 -2
- codegraph_brain-0.7.1/.github/workflows/release-please.yml +0 -76
- codegraph_brain-0.7.1/.release-please-manifest.json +0 -3
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.claude-plugin/marketplace.json +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.github/workflows/autodoc.yml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.gitignore +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.pre-commit-config.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/.python-version +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/CLAUDE.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/CONTRIBUTING.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/LICENSE +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/Makefile +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/PRIVACY.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/README.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/CURATION.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-122.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-140.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-141.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-142.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-143.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-144.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/pr-278.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/benchmarks/guardian/results.jsonl +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/data/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/AUDIT.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/CASE_STUDY.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/architecture/HOW_IT_WORKS.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/architecture/ONTOLOGY.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/architecture/PATTERNS_AND_TRIADS.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/architecture/SELF_PORTRAIT.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/architecture/diagrams/pipeline_flow.mermaid +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/architecture/health_badge.json +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/examples/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/how-to/AGENT_ONBOARDING.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/how-to/CLI_USAGE.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/how-to/MCP_REFERENCE.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/ontology/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/ontology/core.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/ontology/domains.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/ontology/patterns.yaml +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-09-domain-pattern-fingerprint-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-09-pattern-alphabet-motif-basis-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-10-guardian-sprint-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-11-fastapi-di-edges-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-11-guardian-chunked-review-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-11-guardian-chunker-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-11-mcp-drift-validate-fqn-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-11-resolver-split-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-11-symbol-import-edges-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-12-drift-empty-domains-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-12-gate-semantics-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-12-init-ontology-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-12-release-please-ci-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-13-suggest-packages-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-06-13-tangle-anti-pattern-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-29-guardian-skeptic-scoring-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-cgis-fractal-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-cgis-fractal-plan.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-chunk-source-filter-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-chunk-source-filter-plan.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-genai-client-close-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-genai-client-close-plan.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-guardian-precision-bench-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-guardian-precision-bench-plan.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-guardian-timeout-retry-design.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-30-guardian-timeout-retry-plan.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/2026-07-31-finder-bug-class-taxonomy.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/BLUEPRINT.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/PRD.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/TDD.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-09-fingerprint-drift.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-10-guardian-context-skeptic-inline.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-10-guardian-structured-findings-bench.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-10-motif-basis-part-b.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-10-unified-pattern-alphabet.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-11-fastapi-di-edges.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-11-guardian-chunked-review.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-11-guardian-chunker.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-11-mcp-drift-validate-fqn.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-11-resolver-split.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-12-drift-empty-domains.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-12-gate-semantics.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-12-init-ontology.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-12-release-please-ci.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-12-symbol-import-edges.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-06-13-suggest-packages.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/docs/specs/plans/2026-07-29-guardian-skeptic-scoring.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/main.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/plugin/.claude-plugin/plugin.json +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/plugin/.mcp.json +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/plugin/README.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/plugin/skills/cgis/SKILL.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/plugin/skills/ingest/SKILL.md +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/release-please-config.json +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/gen_ideal_graph.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/generate_health.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/generate_mcp_ref.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/generate_schema_docs.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/guardian_bench.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/guardian_review.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/inject_readme_graph.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/probe_closure_gap.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/scripts/probe_tier_ladder.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/__main__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/api/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/api/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/api/mcp_server.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/core/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/core/models.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/_python_ast.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/_python_classes.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/_python_functions.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/_python_imports.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/_python_types.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/base.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/python_extractor.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/extractors/typescript_extractor.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/bench.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/chunked.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/chunker.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/collector.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/core.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/diff_index.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/findings.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/github_poster.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/metrics.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/prompts.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/providers/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/providers/base.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/providers/gemini.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/providers/mistral.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/providers/ollama.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/recording.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/render.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/runner.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/guardian/skeptic.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/pipeline.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/py.typed +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/analysis/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/analysis/analyzer.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/analysis/anomaly.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/analysis/cohesion.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/analysis/health.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/analysis/suggest_service.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/context/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/context/audit.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/context/context_service.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/context/prompt.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/context/snippet.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/_scc.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/drift.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/drift_service.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/fingerprint.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/fractal.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/quotient.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/drift/triads.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/engine.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/fqn.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/render/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/render/graph_json.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/render/mermaid.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/query/render/metrics.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/resolver/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/resolver/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/resolver/engine.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/resolver/indices.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/resolver/symbols.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/resolver/uplift.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/storage/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/src/cgis/storage/sqlite_store.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/integration/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/__init__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/conftest.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_architecture.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_drift.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_fractal.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_init_ontology_roundtrip.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_self_parse.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_self_parse_ts.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/self_parsing/test_suggest.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/.gitkeep +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/conftest.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/guardian_stubs.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test___main__.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_analyzer.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_audit.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_cohesion.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_context_service.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_di_acceptance.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_drift.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_drift_service.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_fingerprint.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_fqn.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_fractal.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_gen_ideal_graph.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_generate_mcp_ref.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_graph_json.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_bench.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_chunked.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_chunker.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_collector.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_core.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_diff_index.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_findings.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_metrics.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_poster.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_providers.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_recording.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_render.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_runner.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_guardian_skeptic.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_health_scorer.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_import_acceptance.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_mcp_server.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_mermaid.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_metrics.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_models.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_ontology_compliance.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_pipeline.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_prompt.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_python_extractor.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_quotient.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_resolver.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_resolver_indices.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_resolver_symbols.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_snippet.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_sqlite_store.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_suggest_service.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_typescript_extractor.py +0 -0
- {codegraph_brain-0.7.1 → codegraph_brain-0.7.3}/tests/unit/test_uplift.py +0 -0
|
@@ -19,6 +19,11 @@ jobs:
|
|
|
19
19
|
with:
|
|
20
20
|
enable-cache: true
|
|
21
21
|
|
|
22
|
+
- name: Lockfile in step with pyproject
|
|
23
|
+
# MUST run before `uv sync`: sync silently re-resolves and rewrites
|
|
24
|
+
# uv.lock, so a check placed after it would always pass.
|
|
25
|
+
run: uv lock --check
|
|
26
|
+
|
|
22
27
|
- name: Install Dependencies
|
|
23
28
|
run: uv sync --group dev
|
|
24
29
|
|
|
@@ -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 --
|
|
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
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
name: Release Please
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release-please:
|
|
10
|
+
name: Release Please
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
# Scoped to this job only: the publish job below must never inherit
|
|
14
|
+
# write access to the repository.
|
|
15
|
+
contents: write
|
|
16
|
+
pull-requests: write
|
|
17
|
+
outputs:
|
|
18
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
19
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
20
|
+
release_pr: ${{ steps.release.outputs.pr }}
|
|
21
|
+
steps:
|
|
22
|
+
- name: Mint a GitHub App token
|
|
23
|
+
id: app-token
|
|
24
|
+
# A GITHUB_TOKEN-authored PR leaves its checks parked in
|
|
25
|
+
# `action_required` forever, so release-please needs an identity of its
|
|
26
|
+
# own. App tokens beat a PAT: one hour of life, auto-rotated, scoped to
|
|
27
|
+
# this repo, and not tied to anyone's personal account.
|
|
28
|
+
# continue-on-error: an unconfigured App must degrade, not break the release.
|
|
29
|
+
continue-on-error: true
|
|
30
|
+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
31
|
+
with:
|
|
32
|
+
# Accepted from either store: the App ID is not sensitive, so a repo
|
|
33
|
+
# variable is conventional, but it is commonly filed as a secret.
|
|
34
|
+
app-id: ${{ vars.CGIS_APP_ID || secrets.CGIS_APP_ID }}
|
|
35
|
+
private-key: ${{ secrets.CGIS_APP_PRIVATE_KEY }}
|
|
36
|
+
|
|
37
|
+
- name: Run release-please
|
|
38
|
+
id: release
|
|
39
|
+
uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
|
|
40
|
+
with:
|
|
41
|
+
# Falls back to GITHUB_TOKEN when the App is not configured — the
|
|
42
|
+
# release still opens, its checks just need a manual nudge.
|
|
43
|
+
token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
|
|
44
|
+
config-file: release-please-config.json
|
|
45
|
+
manifest-file: .release-please-manifest.json
|
|
46
|
+
|
|
47
|
+
relock:
|
|
48
|
+
name: Re-lock the release PR
|
|
49
|
+
needs: release-please
|
|
50
|
+
# Only when release-please actually has an open release PR to amend.
|
|
51
|
+
if: needs.release-please.outputs.release_pr != ''
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
permissions:
|
|
54
|
+
# Narrower than the release job: this one only pushes a lockfile.
|
|
55
|
+
contents: write
|
|
56
|
+
steps:
|
|
57
|
+
- name: Mint a GitHub App token
|
|
58
|
+
id: app-token
|
|
59
|
+
# A GITHUB_TOKEN-authored PR leaves its checks parked in
|
|
60
|
+
# `action_required` forever, so release-please needs an identity of its
|
|
61
|
+
# own. App tokens beat a PAT: one hour of life, auto-rotated, scoped to
|
|
62
|
+
# this repo, and not tied to anyone's personal account.
|
|
63
|
+
# continue-on-error: an unconfigured App must degrade, not break the release.
|
|
64
|
+
continue-on-error: true
|
|
65
|
+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
66
|
+
with:
|
|
67
|
+
# Accepted from either store: the App ID is not sensitive, so a repo
|
|
68
|
+
# variable is conventional, but it is commonly filed as a secret.
|
|
69
|
+
app-id: ${{ vars.CGIS_APP_ID || secrets.CGIS_APP_ID }}
|
|
70
|
+
private-key: ${{ secrets.CGIS_APP_PRIVATE_KEY }}
|
|
71
|
+
|
|
72
|
+
- name: Checkout the release branch
|
|
73
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
74
|
+
with:
|
|
75
|
+
ref: ${{ fromJSON(needs.release-please.outputs.release_pr).headBranchName }}
|
|
76
|
+
token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
|
|
77
|
+
|
|
78
|
+
- name: Setup uv
|
|
79
|
+
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
|
|
80
|
+
with:
|
|
81
|
+
enable-cache: true
|
|
82
|
+
|
|
83
|
+
- name: Re-lock and push if the version moved
|
|
84
|
+
run: |
|
|
85
|
+
set -euo pipefail
|
|
86
|
+
# release-please bumps pyproject.toml but never re-resolves uv.lock, so
|
|
87
|
+
# the lockfile's own version entry falls a release behind and the CI
|
|
88
|
+
# `uv lock --check` gate fails on every release PR (#303).
|
|
89
|
+
uv lock
|
|
90
|
+
if git diff --quiet -- uv.lock; then
|
|
91
|
+
echo "uv.lock already in step with pyproject.toml"
|
|
92
|
+
exit 0
|
|
93
|
+
fi
|
|
94
|
+
git config user.name "github-actions[bot]"
|
|
95
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
96
|
+
git add uv.lock
|
|
97
|
+
git commit -m "chore: re-lock uv.lock for the release"
|
|
98
|
+
git push
|
|
99
|
+
|
|
100
|
+
publish:
|
|
101
|
+
name: Publish to PyPI
|
|
102
|
+
needs: release-please
|
|
103
|
+
if: needs.release-please.outputs.release_created == 'true'
|
|
104
|
+
runs-on: ubuntu-latest
|
|
105
|
+
environment:
|
|
106
|
+
name: pypi
|
|
107
|
+
url: https://pypi.org/p/codegraph-brain
|
|
108
|
+
permissions:
|
|
109
|
+
# Mints the short-lived OIDC token PyPI exchanges for an upload token.
|
|
110
|
+
# This is the whole point of trusted publishing: no API token in secrets.
|
|
111
|
+
id-token: write
|
|
112
|
+
# Lets the publish action attach PEP 740 provenance attestations.
|
|
113
|
+
attestations: write
|
|
114
|
+
contents: read
|
|
115
|
+
steps:
|
|
116
|
+
- name: Checkout Code
|
|
117
|
+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
118
|
+
with:
|
|
119
|
+
ref: ${{ needs.release-please.outputs.tag_name }}
|
|
120
|
+
|
|
121
|
+
- name: Setup uv
|
|
122
|
+
uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
|
|
123
|
+
with:
|
|
124
|
+
enable-cache: true
|
|
125
|
+
|
|
126
|
+
- name: Build sdist and wheel
|
|
127
|
+
run: uv build
|
|
128
|
+
|
|
129
|
+
- name: Verify metadata
|
|
130
|
+
# Pinned and wheel-only: this job holds publish rights, so the tooling
|
|
131
|
+
# it pulls in must not be a floating version that can run setup scripts.
|
|
132
|
+
run: uvx --no-build --from "twine==7.0.0" twine check dist/*
|
|
133
|
+
|
|
134
|
+
- name: Verify version matches the tag
|
|
135
|
+
env:
|
|
136
|
+
TAG_NAME: ${{ needs.release-please.outputs.tag_name }}
|
|
137
|
+
run: |
|
|
138
|
+
set -euo pipefail
|
|
139
|
+
built=$(ls dist/*.whl | sed -E 's/.*-([0-9][^-]*)-py3.*/\1/')
|
|
140
|
+
echo "tag=$TAG_NAME built=$built"
|
|
141
|
+
case "$TAG_NAME" in
|
|
142
|
+
*"$built") ;;
|
|
143
|
+
*) echo "::error::tag $TAG_NAME does not match built version $built"; exit 1 ;;
|
|
144
|
+
esac
|
|
145
|
+
|
|
146
|
+
- name: Publish
|
|
147
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.3](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.7.2...codegraph-brain-v0.7.3) (2026-07-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **assets:** drop the argv-driven output path from the avatar generator ([#308](https://github.com/zaebee/codegraph-brain/issues/308)) ([d118074](https://github.com/zaebee/codegraph-brain/commit/d118074a6b2137f789b4978f870f5496ee1135b5))
|
|
9
|
+
* **ci:** read the App ID from a secret as well as a variable ([#306](https://github.com/zaebee/codegraph-brain/issues/306)) ([90513bc](https://github.com/zaebee/codegraph-brain/commit/90513bc3f588241848fd7404f9be5b6479a72293))
|
|
10
|
+
|
|
11
|
+
## [0.7.2](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.7.1...codegraph-brain-v0.7.2) (2026-07-31)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **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))
|
|
17
|
+
* **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))
|
|
18
|
+
* **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)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
|
|
23
|
+
* 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)
|
|
24
|
+
|
|
3
25
|
## [0.7.1](https://github.com/zaebee/codegraph-brain/compare/codegraph-brain-v0.7.0...codegraph-brain-v0.7.1) (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.
|
|
3
|
+
Version: 0.7.3
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_variants/
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="200" height="200"><rect width="200" height="200" rx="44" fill="#0d1526"/><line x1="113.2" y1="55.7" x2="142.8" y2="86.3" stroke="#64748b" stroke-width="8" stroke-linecap="round"/><line x1="142.8" y1="113.7" x2="113.2" y2="144.3" stroke="#64748b" stroke-width="8" stroke-linecap="round"/><line x1="86.8" y1="55.7" x2="57.2" y2="86.3" stroke="#fbbf24" stroke-width="9" stroke-linecap="round"/><line x1="57.2" y1="113.7" x2="86.8" y2="144.3" stroke="#fbbf24" stroke-width="9" stroke-linecap="round"/><circle cx="100" cy="42" r="18" fill="#22d3ee"/><circle cx="44" cy="100" r="18" fill="#fbbf24"/><circle cx="156" cy="100" r="18" fill="#a78bfa"/><circle cx="100" cy="158" r="18" fill="#22d3ee"/></svg>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""Generate the cgis GitHub App avatar.
|
|
2
|
+
|
|
3
|
+
Ships `v3-lit-path` as `cgis-app-avatar.png`; the other two are kept so the
|
|
4
|
+
alternatives are on the record rather than lost in a chat log.
|
|
5
|
+
|
|
6
|
+
The motif comes from the domain rather than decoration: cgis's drift alphabet is
|
|
7
|
+
built on directed triads (`_TRICODES` / `TRIAD_ORDER`), so the glyphs are actual
|
|
8
|
+
triad shapes — 021D (diverging) and the layered_dag ideal.
|
|
9
|
+
|
|
10
|
+
No arrowheads. SVG markers scale by stroke-width by default (a 4.5-unit head at
|
|
11
|
+
stroke 9 renders as a 40-unit blob), and even sized correctly an arrowhead is
|
|
12
|
+
mush at the 40px a bot avatar occupies in a PR thread. Hierarchy is carried by
|
|
13
|
+
node size and colour instead.
|
|
14
|
+
|
|
15
|
+
Rendered at 400px for upload and 40px to check legibility at comment size.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import pathlib
|
|
19
|
+
|
|
20
|
+
import cairosvg
|
|
21
|
+
|
|
22
|
+
BG = "#0d1526"
|
|
23
|
+
EDGE = "#64748b"
|
|
24
|
+
CYAN = "#22d3ee"
|
|
25
|
+
VIOLET = "#a78bfa"
|
|
26
|
+
AMBER = "#fbbf24"
|
|
27
|
+
|
|
28
|
+
HEAD = (
|
|
29
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="200" height="200">'
|
|
30
|
+
f'<rect width="200" height="200" rx="44" fill="{BG}"/>'
|
|
31
|
+
)
|
|
32
|
+
TAIL = "</svg>"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def edge(
|
|
36
|
+
p1: tuple[float, float], p2: tuple[float, float], *, colour: str = EDGE, w: float = 8
|
|
37
|
+
) -> str:
|
|
38
|
+
"""A graph edge, trimmed at both ends so it meets the node rims cleanly."""
|
|
39
|
+
(x1, y1), (x2, y2) = p1, p2
|
|
40
|
+
dx, dy = x2 - x1, y2 - y1
|
|
41
|
+
length = (dx * dx + dy * dy) ** 0.5
|
|
42
|
+
ux, uy = dx / length, dy / length
|
|
43
|
+
pad = 19
|
|
44
|
+
return (
|
|
45
|
+
f'<line x1="{x1 + ux * pad:.1f}" y1="{y1 + uy * pad:.1f}" '
|
|
46
|
+
f'x2="{x2 - ux * pad:.1f}" y2="{y2 - uy * pad:.1f}" '
|
|
47
|
+
f'stroke="{colour}" stroke-width="{w}" stroke-linecap="round"/>'
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def node(p: tuple[float, float], colour: str, r: float = 18) -> str:
|
|
52
|
+
"""A graph node."""
|
|
53
|
+
return f'<circle cx="{p[0]}" cy="{p[1]}" r="{r}" fill="{colour}"/>'
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
TOP, LEFT, RIGHT, BOTTOM = (100, 42), (44, 100), (156, 100), (100, 158)
|
|
57
|
+
|
|
58
|
+
# 1. layered_dag — diverge at the top, converge at the bottom.
|
|
59
|
+
v1 = (
|
|
60
|
+
HEAD
|
|
61
|
+
+ edge(TOP, LEFT)
|
|
62
|
+
+ edge(TOP, RIGHT)
|
|
63
|
+
+ edge(LEFT, BOTTOM)
|
|
64
|
+
+ edge(RIGHT, BOTTOM)
|
|
65
|
+
+ node(TOP, CYAN)
|
|
66
|
+
+ node(LEFT, VIOLET)
|
|
67
|
+
+ node(RIGHT, VIOLET)
|
|
68
|
+
+ node(BOTTOM, CYAN)
|
|
69
|
+
+ TAIL
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# 2. 021D on its own — fewest strokes, best legibility at 40px.
|
|
73
|
+
T2, BL2, BR2 = (100, 54), (48, 144), (152, 144)
|
|
74
|
+
v2 = (
|
|
75
|
+
HEAD
|
|
76
|
+
+ edge(T2, BL2, w=9)
|
|
77
|
+
+ edge(T2, BR2, w=9)
|
|
78
|
+
+ node(T2, CYAN, 21)
|
|
79
|
+
+ node(BL2, VIOLET, 21)
|
|
80
|
+
+ node(BR2, VIOLET, 21)
|
|
81
|
+
+ TAIL
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# 3. layered_dag with one path lit — structure, plus the analysis laid over it.
|
|
85
|
+
v3 = (
|
|
86
|
+
HEAD
|
|
87
|
+
+ edge(TOP, RIGHT)
|
|
88
|
+
+ edge(RIGHT, BOTTOM)
|
|
89
|
+
+ edge(TOP, LEFT, colour=AMBER, w=9)
|
|
90
|
+
+ edge(LEFT, BOTTOM, colour=AMBER, w=9)
|
|
91
|
+
+ node(TOP, CYAN)
|
|
92
|
+
+ node(LEFT, AMBER)
|
|
93
|
+
+ node(RIGHT, VIOLET)
|
|
94
|
+
+ node(BOTTOM, CYAN)
|
|
95
|
+
+ TAIL
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
HERE = pathlib.Path(__file__).parent
|
|
99
|
+
# Variants land in a gitignored scratch dir; only the chosen one is versioned,
|
|
100
|
+
# so re-running this never litters docs/assets.
|
|
101
|
+
VARIANTS = HERE / "_variants"
|
|
102
|
+
VARIANTS.mkdir(parents=True, exist_ok=True)
|
|
103
|
+
|
|
104
|
+
CHOSEN = "v3-lit-path"
|
|
105
|
+
|
|
106
|
+
for name, svg in (("v1-layered-dag", v1), ("v2-fanout", v2), ("v3-lit-path", v3)):
|
|
107
|
+
(VARIANTS / f"{name}.svg").write_text(svg)
|
|
108
|
+
for px in (400, 40):
|
|
109
|
+
cairosvg.svg2png(
|
|
110
|
+
bytestring=svg.encode(),
|
|
111
|
+
write_to=str(VARIANTS / f"{name}-{px}.png"),
|
|
112
|
+
output_width=px,
|
|
113
|
+
output_height=px,
|
|
114
|
+
)
|
|
115
|
+
if name == CHOSEN:
|
|
116
|
+
(HERE / "cgis-app-avatar.svg").write_text(svg)
|
|
117
|
+
cairosvg.svg2png(
|
|
118
|
+
bytestring=svg.encode(),
|
|
119
|
+
write_to=str(HERE / "cgis-app-avatar.png"),
|
|
120
|
+
output_width=400,
|
|
121
|
+
output_height=400,
|
|
122
|
+
)
|
|
123
|
+
print(f"rendered {name}" + (" <- shipped as cgis-app-avatar.*" if name == CHOSEN else ""))
|
|
@@ -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 @@ packages = ["src/cgis"]
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "codegraph-brain"
|
|
10
|
-
version = "0.7.
|
|
10
|
+
version = "0.7.3"
|
|
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",
|