Skip to content

fix: sweep cleanup — deps, docs, tool count, brain_expand, AIDEV-NOTEs#63

Merged
EtanHey merged 1 commit into
mainfrom
fix/sweep-cleanup
Feb 28, 2026
Merged

fix: sweep cleanup — deps, docs, tool count, brain_expand, AIDEV-NOTEs#63
EtanHey merged 1 commit into
mainfrom
fix/sweep-cleanup

Conversation

@EtanHey
Copy link
Copy Markdown
Owner

@EtanHey EtanHey commented Feb 28, 2026

Summary

  • pyproject.toml: Remove unused tree-sitter from core deps; add faiss-cpu to [brain]; add new [style] extra with chromadb; [kg] extra now documented in README
  • README.md: Tool count 7→8 everywhere (badge, tagline, mermaid, comparison table); test badge 698→715; add brain_expand to MCP Tools table; fix clustering name (HDBSCAN→Leiden); add [kg]/[style] to Optional Extras; add Groq backend to Configuration table
  • CLAUDE.md: Remove non-existent --http flag from brainlayer serve; expand MCP tools listing to all 8 tools
  • docs/mcp-tools.md: Update tool count 7→8; add full brain_expand documentation
  • CHANGELOG.md: Add [Unreleased] section documenting all recent changes
  • brain_graph.py: Add AIDEV-NOTE explaining the correlated subquery → literal optimization (PR Fix brain_search excluding brain_store chunks #62 fix)
  • kg/init.py: Add AIDEV-NOTE marking as canonical KG spec shared with 6PM Convex backend
  • greptile.json: Commit previously untracked Greptile config file

Test plan

  • pyproject.toml parses cleanly: pip install -e ".[brain,style,kg,ast,dev]" (or uv sync)
  • README renders correctly — check badge URLs, mermaid diagram, tables
  • docs/mcp-tools.md has brain_expand section with correct parameter table
  • CHANGELOG.md has [Unreleased] section at top
  • No functionality changed — only docs, deps, and uncommitted files

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a chunk expansion tool.
    • Introduced Groq enrichment backend with new environment variables.
    • Added optional extras for ChromaDB vector store and FAISS-based ANN.
  • Bug Fixes

    • Improved performance for large datasets by eliminating an N+1 query pattern.
    • Corrected CLI documentation by removing an invalid flag.
  • Documentation

    • Added an “Unreleased” changelog section.
    • Updated tool count, test count, and clustering description to Leiden + UMAP.
    • Documented new environment variables and optional installation extras.

pyproject.toml:
- Remove tree-sitter from core deps (unused; tree-sitter-languages in [ast] is what's used)
- Add faiss-cpu to [brain] optional extra
- Add new [style] optional extra with chromadb
- [kg] extra was already present, now documented in README

README.md:
- Tool count 7 → 8 everywhere (badge, tagline, mermaid, comparison table, bullet)
- Test count badge 698 → 715
- Add brain_expand to MCP Tools table
- Fix clustering: HDBSCAN + UMAP → Leiden + UMAP (line 116 and Optional Extras)
- Add [kg] and [style] to Optional Extras
- Add Groq backend rows to Configuration table

CLAUDE.md:
- Remove non-existent --http flag from `brainlayer serve` command
- Expand MCP tools listing to all 8 tools

docs/mcp-tools.md:
- Update header: 7 → 8 tools, 4 KG → 5 KG
- Add full brain_expand documentation

CHANGELOG.md:
- Add [Unreleased] section documenting brain_expand, Groq backend, brain_graph fix,
  tree-sitter removal, serve docs fix, and tool count update

brain_graph.py:
- Add AIDEV-NOTE explaining the correlated subquery → literal performance optimization

kg/__init__.py:
- Add AIDEV-NOTE marking this as canonical KG spec shared with 6PM Convex backend

greptile.json:
- Commit previously untracked file (Greptile code context config)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 28, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 800bc01 and 4895ab7.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • docs/mcp-tools.md
  • greptile.json
  • pyproject.toml
  • src/brainlayer/kg/__init__.py
  • src/brainlayer/pipeline/brain_graph.py
🔥 Files not summarized due to errors (4)
  • docs/mcp-tools.md: Error: Server error: no LLM provider could handle the message
  • CLAUDE.md: Error: Server error: no LLM provider could handle the message
  • greptile.json: Error: Server error: no LLM provider could handle the message
  • src/brainlayer/kg/init.py: Error: Server error: no LLM provider could handle the message

📝 Walkthrough

Walkthrough

This PR documents and implements feature additions and performance optimizations: introducing a new brain_expand MCP tool, Groq enrichment backend support, ChromaDB and FAISS vector store options, and an N+1 query performance fix in the brain graph module.

Changes

Cohort / File(s) Summary
Documentation Updates
CHANGELOG.md, README.md
Updated tool counts (7→8), test counts (698→715), clustering algorithm (HDBSCAN→Leiden), added Groq environment variables (GROQ_API_KEY, BRAINLAYER_GROQ_URL, BRAINLAYER_GROQ_MODEL), and documented new optional extras ([kg], [style]).
Dependency Configuration
pyproject.toml
Removed tree-sitter>=0.21.0 from core dependencies, added faiss-cpu>=1.7.0 to [brain] extras, and created new [style] extras group with chromadb>=0.4.0.
Performance Optimization
src/brainlayer/pipeline/brain_graph.py
Replaced correlated subquery in load_sessions() with hardcoded literal 'claude_code' to eliminate N+1 subqueries on large databases; includes explanatory comment on future multi-source CTE approach.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Eight tools now bound in our expanding brain,
Groq's whispers quicken the data chain,
FAISS hops swift where N+1 once crawled,
ChromaDB styles the vectors called,
Performance springs from optimization's art! 🌟

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/sweep-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@EtanHey EtanHey merged commit d10707f into main Feb 28, 2026
3 of 5 checks passed
@EtanHey EtanHey deleted the fix/sweep-cleanup branch February 28, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant