Skip to content

docs: Phase 9b — README rewrite, CONTRIBUTING update#19

Merged
EtanHey merged 2 commits into
mainfrom
feature/phase-9b-readme-polish
Feb 21, 2026
Merged

docs: Phase 9b — README rewrite, CONTRIBUTING update#19
EtanHey merged 2 commits into
mainfrom
feature/phase-9b-readme-polish

Conversation

@EtanHey
Copy link
Copy Markdown
Owner

@EtanHey EtanHey commented Feb 21, 2026

Summary

Phase 9b of the Layers v2 Launch plan — README + docs polish for public release.

README.md (full rewrite)

  • Mermaid architecture diagram (pipeline → SQLite+vec → MCP server → editors)
  • All 14 MCP tools documented in two tables (Intelligence Layer + Search & Context)
  • Enrichment section: 10 metadata fields, MLX vs Ollama backends comparison
  • Configuration reference: all 12 BRAINLAYER_* env vars with defaults
  • Data sources table (6 sources: Claude Code, Desktop, WhatsApp, YouTube, Markdown, Manual)
  • Comparison matrix updated (14 tools, session analysis column added)
  • Multi-editor MCP setup (Claude Code, Cursor, Zed, VS Code)
  • Quick start simplified to 3 commands
  • Testing section with correct test count (268)
  • Optional extras with actual extras from pyproject.toml (removed phantom [style])

CONTRIBUTING.md (updated)

  • Project structure matches actual codebase layout
  • Key patterns: _error_result(), logging, env var conventions, schema constraints
  • How to add an MCP tool (6-step checklist)
  • Correct test counts and commands

pyproject.toml

  • Description: "Persistent memory for AI agents" (was "Like git for your AI conversations")
  • Added Python 3.13 classifier
  • Added AI topic classifier

Test plan

  • 266 tests pass, 2 skipped
  • ruff check clean
  • CodeRabbit review
  • Mermaid diagram renders correctly on GitHub

🤖 Generated with Claude Code


Note

Low Risk
Documentation and metadata-only changes; no runtime logic or security-sensitive code paths are modified.

Overview
Updates public docs for release readiness by rewriting README.md with clearer positioning, updated badges/test counts, multi-editor MCP setup, an architecture diagram, and expanded sections covering tool catalog (14 MCP tools), enrichment, configuration env vars, supported data sources, and testing commands.

Refreshes CONTRIBUTING.md with a modern dev setup (venv + .[dev]), accurate project structure, explicit test/lint workflows, PR process expectations, and checklists/patterns for adding MCP tools.

Updates pyproject.toml metadata by revising the project description and adding new trove classifiers (Python 3.13, AI topic).

Written by Cursor Bugbot for commit 9adeae6. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated contribution guidelines with expanded development setup, testing instructions, and MCP tool development guidance.
    • Enhanced README with updated badges, editor-specific setup instructions for Cursor, VS Code, and Zed, and expanded MCP tools list.
  • Chores

    • Added Python 3.13 compatibility and updated project metadata.

README.md: rewrite with mermaid architecture diagram, all 14 MCP tools documented,
enrichment details (10 fields, MLX/Ollama backends), full config reference
(12 env vars), data sources table, comparison matrix (updated for 14 tools +
session analysis), quick-start with multi-editor MCP setup, testing section.

CONTRIBUTING.md: updated project structure (matches actual codebase), key
patterns (error handling, logging, env vars), how to add an MCP tool,
correct test counts (268).

pyproject.toml: updated description, added Python 3.13 classifier and AI topic.

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

coderabbitai Bot commented Feb 21, 2026

Warning

Rate limit exceeded

@EtanHey has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fd253a3 and 9adeae6.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • README.md
📝 Walkthrough

Walkthrough

Documentation and configuration updates across three files: CONTRIBUTING.md is restructured with enhanced development setup, MCP tool development guidance, and code patterns; README.md updates badges (Python 3.11+, 14 MCP tools, 268 tests), tool descriptions, and architecture sections; pyproject.toml adds Python 3.13 support and AI topic classifier.

Changes

Cohort / File(s) Summary
Documentation Restructuring
CONTRIBUTING.md
Complete rewrite: reorganizes sections into Development Setup, Project Structure, and MCP tool development; replaces test guidance with pytest commands; expands code hygiene with linting, logging, error handling, and schema patterns.
Documentation Updates
README.md
Extensive updates: refreshes badges (Python 3.11+, 14 tools, 268 tests); rewrites MCP tools section with expanded descriptions; restructures Search & Context, Enrichment, and Architecture sections; updates feature comparisons and optional extras.
Metadata and Classifiers
pyproject.toml
Adds Python 3.13 compatibility classifier and Topic :: Scientific/Engineering :: Artificial Intelligence; updates project description emphasizing persistent memory.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through docs so bright,
With badges new and tools in light,
Python 3.13, tools now fourteen strong,
Each contribution guide set right—
The brainlayer bounces all night! 🌙✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: documentation updates to README and CONTRIBUTING files, with clear reference to the development phase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/phase-9b-readme-polish

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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
pyproject.toml (1)

27-27: ⚠️ Potential issue | 🟠 Major

mcp>=1.0.0 is severely under-constrained — tighten to >=1.26.0,<2

Two problems exposed by this PR's own documentation:

  1. Lower bound is ~26 minor versions behind what the README advertises. The architecture table added in this PR documents "MCP SDK v1.26+", yet the constraint permits any version back to 1.0.0 (released Nov 2024), which predates the tool annotation, structured-output, and elicitation APIs relied on by the 14 MCP tools.

  2. No upper bound against the upcoming v2 breaking release. mcp>=1.25,<2 is the vendor-recommended pin for code that must stay on v1.x, with an anticipated stable v2 release in Q1 2026. Without an upper bound, users who pip install brainlayer after v2 ships will get an incompatible SDK.

🔧 Proposed fix
-    "mcp>=1.0.0",
+    "mcp>=1.26.0,<2",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` at line 27, The pyproject dependency constraint "mcp>=1.0.0"
is too loose; update the requirement in pyproject.toml to pin to the supported
MCP v1 line by replacing "mcp>=1.0.0" with a tightened range "mcp>=1.26.0,<2" so
the package requires at least the v1.26 SDK features and prevents accidental
upgrades to a breaking v2 release.
README.md (1)

34-56: ⚠️ Potential issue | 🟡 Minor

MD031: fenced code blocks inside <details> need surrounding blank lines

Three blocks inside the collapsible section (lines 34, 48, 70) trigger MD031 because they open immediately after a heading or paragraph without a preceding blank line. This can cause rendering inconsistencies in some Markdown parsers.

🔧 Proposed fix (representative — apply same pattern to lines 48 and 70)
 **Claude Code** (`~/.claude.json`):
+
 ```json
 {
   "mcpServers": {
 **Cursor** (MCP settings):
+
 ```json
 {
 **VS Code** (`.vscode/mcp.json`):
+
 ```json
 {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 34 - 56, The MD031 errors are caused by fenced code
blocks opening immediately after text inside the collapsible section; fix by
inserting a single blank line immediately before each fenced code block that
contains the JSON snippet (the blocks starting with ```json and containing
"mcpServers": { ... } and "brainlayer": { "command": "brainlayer-mcp" }), i.e.,
add a blank line before each triple-backtick fence in the <details> collapsible
so each code block is separated from the preceding paragraph or heading.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 439f3a3 and fd253a3.

📒 Files selected for processing (3)
  • CONTRIBUTING.md
  • README.md
  • pyproject.toml
🧰 Additional context used
📓 Path-based instructions (1)
**/{setup.py,pyproject.toml,requirements*.txt,Pipfile,*.lock}

📄 CodeRabbit inference engine (CLAUDE.md)

Install and use uv for Python dependency management instead of pip

Files:

  • pyproject.toml
🧠 Learnings (2)
📚 Learning: 2026-02-20T18:33:59.833Z
Learnt from: CR
Repo: EtanHey/brainlayer PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-20T18:33:59.833Z
Learning: Applies to **/mcp/__init__.py : Implement MCP server with 14 tools for Claude integration (search, stats, context, file_timeline, operations, regression, plan_links, session_summary, etc.)

Applied to files:

  • README.md
📚 Learning: 2026-02-20T18:33:59.833Z
Learnt from: CR
Repo: EtanHey/brainlayer PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-20T18:33:59.833Z
Learning: Maintain separation between read-only source conversations in ~/.claude/projects/ and mutable indexed database in ~/.local/share/brainlayer/

Applied to files:

  • README.md
🪛 LanguageTool
README.md

[uncategorized] ~231-~231: The official name of this popular video platform is spelled with a capital “T”.
Context: ... | | YouTube | Transcripts via yt-dlp | brainlayer index --source youtube | | Markdown | Any .md files | `brai...

(YOUTUBE)

🪛 markdownlint-cli2 (0.21.0)
CONTRIBUTING.md

[warning] 16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

README.md

[warning] 16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 34-34: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 48-48: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 70-70: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Cursor Bugbot
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.13)
  • GitHub Check: test (3.12)
🔇 Additional comments (1)
README.md (1)

202-203: Default model size and hardware requirements should be documented in quick-start

The default quantization (glm-4.7-flash:latest) is 19 GB. This is a substantial implicit hardware requirement that is not surfaced anywhere in the README's quick-start or enrichment section.

Consider documenting these constraints explicitly, or defaulting to a smaller/widely-available model and recommending glm-4.7-flash as an upgrade.

Likely an incorrect or invalid review comment.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CONTRIBUTING.md`:
- Line 91: The test uses a hardcoded tool count in
test_think_recall_integration.py which breaks whenever tools change; update the
test to compute the expected count dynamically by calling the runtime tool
registry (e.g., use len(server.list_tools()) or equivalent API available in that
test) and assert against that value instead of a magic number; ensure the test
imports/accepts the same server/fixture used elsewhere in the suite and replace
the hardcoded literal with the dynamic len(...) call so the assertion stays
correct as tools are added/removed.
- Around line 16-37: Add a language specifier to the fenced directory-tree code
block in CONTRIBUTING.md (the triple-backtick block that lists src/brainlayer/
and its subfolders) by changing the opening fence to include "text" (e.g.,
```text) so the markdown linter MD040 is satisfied and the block is treated as
non-executable plain text.

In `@pyproject.toml`:
- Around line 48-50: Update the minimum dependency versions in pyproject.toml to
ones that ship cp313 wheels: set apsw to >=3.46.1, bump spacy to >=3.8, and
choose a sentence-transformers release that explicitly declares Python
3.13/wheels (or require a compatible PyTorch >=2.6.0 if you prefer not to pin);
modify the dependency entries in pyproject.toml accordingly so CI and users
install native cp313 wheels instead of building from source.

In `@README.md`:
- Line 8: Update the tests badge text in the README to accurately reflect the PR
description: modify the alt/label portion of the badge markup
"[![Tests](https://img.shields.io/badge/tests-268%20passing-brightgreen.svg)](`#testing`)"
so it either reads "266 passing" (to match 266 passing + 2 skipped) or "268
tests" (to indicate total tests); adjust the URL segment and escaped space %20
accordingly so the rendered badge matches the chosen text.

---

Outside diff comments:
In `@pyproject.toml`:
- Line 27: The pyproject dependency constraint "mcp>=1.0.0" is too loose; update
the requirement in pyproject.toml to pin to the supported MCP v1 line by
replacing "mcp>=1.0.0" with a tightened range "mcp>=1.26.0,<2" so the package
requires at least the v1.26 SDK features and prevents accidental upgrades to a
breaking v2 release.

In `@README.md`:
- Around line 34-56: The MD031 errors are caused by fenced code blocks opening
immediately after text inside the collapsible section; fix by inserting a single
blank line immediately before each fenced code block that contains the JSON
snippet (the blocks starting with ```json and containing "mcpServers": { ... }
and "brainlayer": { "command": "brainlayer-mcp" }), i.e., add a blank line
before each triple-backtick fence in the <details> collapsible so each code
block is separated from the preceding paragraph or heading.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md
2. Add the handler function (prefix with `_`)
3. Add the routing in `call_tool`
4. Add `ToolAnnotations` (readOnlyHint, etc.)
5. Update the tool count in `test_think_recall_integration.py`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Hardcoded tool count in integration test is a maintenance hazard

Every time a tool is added or removed, contributors must remember to update the assertion in test_think_recall_integration.py and re-read the checklist item. A test that introspects the tool list dynamically (e.g., len(server.list_tools())) would be more robust.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CONTRIBUTING.md` at line 91, The test uses a hardcoded tool count in
test_think_recall_integration.py which breaks whenever tools change; update the
test to compute the expected count dynamically by calling the runtime tool
registry (e.g., use len(server.list_tools()) or equivalent API available in that
test) and assert against that value instead of a magic number; ensure the test
imports/accepts the same server/fixture used elsewhere in the suite and replace
the hardcoded literal with the dynamic len(...) call so the assertion stays
correct as tools are added/removed.

Comment thread pyproject.toml
Comment on lines +48 to +50
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat pyproject.toml

Repository: EtanHey/brainlayer

Length of output: 3232


🏁 Script executed:

python3 - <<'EOF'
import json, urllib.request

packages = {
    "apsw": "3.45.0",
    "sqlite-vec": "0.1.3",
    "sentence-transformers": "2.2.0",
    "tree-sitter": "0.21.0",
    "spacy": "3.7.0",
    "numpy": "1.22.0",
    "scikit-learn": "1.0.0",
}

for pkg, min_ver in packages.items():
    url = f"https://pypi.org/pypi/{pkg}/{min_ver}/json"
    try:
        with urllib.request.urlopen(url, timeout=10) as r:
            data = json.loads(r.read())
        classifiers = data["info"].get("classifiers", [])
        py313 = any("3.13" in c for c in classifiers)
        wheels = [f["filename"] for f in data.get("urls", []) if "cp313" in f.get("filename","")]
        print(f"{pkg}=={min_ver}: py3.13 classifier={py313}, cp313 wheels={bool(wheels)}")
    except Exception as e:
        print(f"{pkg}=={min_ver}: ERROR {e}")
EOF

Repository: EtanHey/brainlayer

Length of output: 1133


🏁 Script executed:

find . -type f \( -name ".github" -o -name "*.yml" -o -name "*.yaml" \) | grep -E "(github|gitlab|travis|circleci)" | head -20

Repository: EtanHey/brainlayer

Length of output: 120


🏁 Script executed:

find .github/workflows -type f -name "*.yml" -o -name "*.yaml" 2>/dev/null | xargs cat 2>/dev/null | head -100

Repository: EtanHey/brainlayer

Length of output: 1821


🌐 Web query:

apsw 3.45.0 Python 3.13 support wheels

💡 Result:

APSW 3.45.0.0 (released Jan 16, 2024) does not ship Python 3.13 (cp313) wheels—its published wheels are only for cp38–cp312 (plus sdist). [1]

If you need Python 3.13 wheels, you must use a newer APSW release (for example 3.46.1.0 includes cp313 wheels such as cp313-win_amd64, cp313-win32, and cp313-musllinux_*). [2]

Sources: [1] [2]


🌐 Web query:

sentence-transformers 2.2.0 Python 3.13 compatibility

💡 Result:

sentence-transformers==2.2.0 (released Feb 10, 2022) predates Python 3.13 and does not declare any Requires-Python constraint on PyPI (it’s empty), so pip may try to install it on 3.13—but that doesn’t mean the dependency stack will work. [1], [2]

In practice, Python 3.13 compatibility is gated by PyTorch (a required dependency). PyTorch added Python 3.13 support in the PyTorch 2.6.0 release notes. [3] Historically, attempts to use sentence-transformers on Python 3.13 failed specifically because PyTorch didn’t support 3.13 yet (before those newer PyTorch releases). [4]

So the safe conclusions are:

  • No official/explicit Python 3.13 support signal exists for sentence-transformers==2.2.0 (it’s from 2022 and only lists old Python classifiers). [1]
  • Even if it installs, it will only work if you also install a PyTorch build that supports Python 3.13 (i.e., modern PyTorch). [3]
  • Mixing a 2022 sentence-transformers with modern PyTorch/Transformers may cause runtime/API incompatibilities; the recommended fix is typically upgrade sentence-transformers (instead of pinning to 2.2.0) or use Python 3.12. [4]

Sources:
[1] PyPI – sentence-transformers 2.2.0 project page (release date, recommended deps/classifiers) (pypi.org)
[2] PyPI JSON metadata – sentence-transformers 2.2.0 (requires_python empty) (pypi.org)
[3] PyTorch GitHub releases – PyTorch 2.6.0 notes (Python 3.13 support mentioned) (github.com)
[4] GitHub discussion (asreview) – notes that PyTorch dependency lacked Python 3.13 support (and suggests Python 3.12 / nightly PyTorch) (github.com)

Citations:


🌐 Web query:

spacy 3.7 Python 3.13 wheels

💡 Result:

spaCy 3.7.x does not ship Python 3.13 (cp313) wheels. On PyPI for spacy==3.7.2, the published wheels are for CPython 3.11 and 3.12 (plus the sdist), but no cp313 wheels are listed. [1]

If you need Python 3.13 wheels, you’ll need a newer spaCy release: the current PyPI project page shows cp313 wheels available (e.g., manylinux, macOS arm64, Windows arm64). [2]

What to do:

  • Stay on spaCy 3.7 → use Python 3.12 (or 3.11). [1]
  • Stay on Python 3.13 → upgrade spaCy to a version that provides cp313 wheels (e.g., 3.8.x). [2]

Sources:
[1] PyPI: spacy 3.7.2 files / supported Python versions (no cp313 wheels) (pypi.org)
[2] PyPI: spacy latest (shows cp313 wheels available) (pypi.org)

Citations:


CI is testing Python 3.13, but minimum dependency versions lack wheels—consider bumping to versions with cp313 builds

Python 3.13 CI coverage is confirmed (test matrix includes 3.13), so the critical question is addressed. However, your minimum versions still lack cp313 wheels:

  • apsw==3.45.0: No cp313 wheels (only cp38–cp312); cp313 wheels available in 3.46.1+
  • spacy==3.7.x: No cp313 wheels (only cp311–cp312); cp313 wheels available in 3.8+
  • sentence-transformers==2.2.0: No explicit Python 3.13 support (2022 release); only works if PyTorch ≥2.6.0 is installed

These packages install via source distributions on 3.13 (which explains CI passes), but true "first-class support" typically means shipping wheels. For optimal user experience and faster installs, consider bumping to versions with native cp313 wheels.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` around lines 48 - 50, Update the minimum dependency versions
in pyproject.toml to ones that ship cp313 wheels: set apsw to >=3.46.1, bump
spacy to >=3.8, and choose a sentence-transformers release that explicitly
declares Python 3.13/wheels (or require a compatible PyTorch >=2.6.0 if you
prefer not to pin); modify the dependency entries in pyproject.toml accordingly
so CI and users install native cp313 wheels instead of building from source.

Comment thread README.md Outdated
- Fix tests badge: 268 → 266 (2 are skipped, not passing)
- Add language specifier to CONTRIBUTING.md directory tree block (MD040)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EtanHey EtanHey merged commit da0eaa1 into main Feb 21, 2026
3 of 4 checks passed
@EtanHey EtanHey deleted the feature/phase-9b-readme-polish branch February 21, 2026 09:05
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