META.yaml/frontmatter description values not indexed for BM25 search
META.yaml/frontmatter description values not indexed for BM25 search
Problem
When indexing YAML files (e.g., META.yaml with skill metadata), the description field value is stored as a Variable node with name: "description" — but the actual description text (e.g., "8-agent QA loop using Playwright MCP for browser testing") is not stored in any searchable property.
This means BM25 cannot find skills/modules by their description content.
Reproduction
Given .kiro/skills/qa-run/META.yaml:
name: qa-run
description: "8-agent QA loop: browser exploration via Playwright MCP, then analyze, plan, test, audit, heal, expand, snapshot. Quality gate score >= 85 to pass."
The graph creates:
- Module node:
name: ".kiro/skills/qa-run/META.yaml" - Variable node:
name: "description"(just the key name, not the value)
Searching:
search_graph(query="QA loop Playwright browser testing quality gate") → 0 results
search_graph(query="8-agent QA") → 0 results
The description text is never stored or indexed anywhere in the graph.
Expected Behaviour
BM25 search for "Playwright browser testing" should match the qa-run module because its META.yaml description contains those terms.
Proposed Solution
For YAML/JSON files with known metadata fields (description, summary, purpose), store the field value as a searchable property on the parent Module node — e.g., as a docstring or description property that FTS5 indexes.
Scope of change
src/pipeline/— When extracting Variable nodes from YAML/JSON, detectdescription/summaryfields and promote their values to a searchable property on the parent Module node.src/store/— Ensure the new property is included in the FTS5 full-text index.tests/test_pipeline.c— Add test verifying YAML description values are BM25-searchable.
Considerations
- Only promote specific well-known keys (
description,summary,purpose) — not all Variable values - Small storage overhead (~100-200 bytes per module with a description)
- No schema-breaking change — adds a property to existing Module nodes
Context
In projects with many YAML-configured modules (skills, agents, pipelines), the description field is the primary way users think about and search for components. Without indexing these values, BM25 search is limited to file paths and node names — missing the most semantically-rich metadata available.
Environment
- codebase-memory-mcp (latest, full index mode)
- Tested on a workspace with 12 skills, each with META.yaml containing
descriptionfields - 260 Variable nodes indexed, none with searchable values
Hey, thx for reporting, will check ASAP
Hi 👋 opened a PR for this (and its sibling #518 ): #617 .
What it does
Both issues trace back to the same gap: BM25 (search_graph with query) only indexed node names, so the prose under a markdown heading and a YAML/JSON description value were never searchable. The PR:
- Adds a
bodycolumn to thenodes_ftsFTS5 table, backfilled from each node'sdocstringproperty (guarded byjson_valid()), through a singlecbm_store_fts_rebuild()that both backfill paths now share. - Captures the markdown section body beneath each heading (#518 ) and promotes a top-level
description/summary/purposevalue onto the file'sModulenode (this one), both reuse the existingdocstringproperty, so they flow through serialization and every pipeline pass unchanged.
One thing worth flagging 🔍
Indexing the content alone wasn't enough, bm25_search in mcp.c was explicitly excluding Section and Module from results (label NOT IN (…'Section','Module'…)), so even an indexed body would never surface. The PR drops those two from the exclusion list. They carry no rank boost, so code symbols still sort first and ordering for code queries is unchanged.
Two decisions I'd appreciate your take on
- I reused
docstringrather than adding a newcontentfield (the issue noted "add acontentfield (or reusebt)") , it needed zero serialization changes and already survives every pass. Easy to switch to a dedicated field if you'd rather. - #518 and this issue share the FTS
bodyinfrastructure (this issue can't work without it), so I bundled them in one PR. Happy to split into two stacked PRs if that suits your workflow better.
Bonus: since body comes from docstring, function/method docstrings are now BM25-searchable too, at no extra cost. If you'd want function bodies searchable, indexing bt (body_tokens) the same way would be a small follow-up.
Tests: 7 extraction + 3 store FTS cases. Backward compatible, additive column, and legacy 4-column FTS DBs upgrade automatically on the next index. Thanks for the great project!
Hey Shaurya, thanks for the quick response.
- I don’t think a dedicated field is that important. Re-use of existing field gives the same result, so I am happy with your suggestion.
- One PR is fine for me. Keeps it simpler to track 😊
Loving this project btw.
Russell Gee Principle Solution Architect DataArthttps://www.dataart.com/
55 King William Street, 3rd floor, London, EC4R 9AD +44 (0) 20 7099 9464 @.@.> Linkedinhttps://www.linkedin.com/in/russellgee
From: Shaurya @.> Sent: 24 June 2026 23:09 To: DeusData/codebase-memory-mcp @.> Cc: Russell Gee @.>; Author @.> Subject: Re: [DeusData/codebase-memory-mcp] META.yaml/frontmatter description values not indexed for BM25 search (Issue #519)
[https://avatars.githubusercontent.com/u/196896785?s=20&v=4]ShauryaaSharma left a comment (DeusData/codebase-memory-mcp#519)https://github.com/DeusData/codebase-memory-mcp/issues/519#issuecomment-4794074449
Hi 👋 opened a PR for this (and its sibling #518https://github.com/DeusData/codebase-memory-mcp/issues/518 ): #617https://github.com/DeusData/codebase-memory-mcp/pull/617 .
What it does
Both issues trace back to the same gap: BM25 (search_graph with query) only indexed node names, so the prose under a markdown heading and a YAML/JSON description value were never searchable. The PR:
- Adds a body column to the nodes_fts FTS5 table, backfilled from each node's docstring property (guarded by json_valid()), through a single cbm_store_fts_rebuild() that both backfill paths now share.
- Captures the markdown section body beneath each heading (#518https://github.com/DeusData/codebase-memory-mcp/issues/518 ) and promotes a top-level description/summary/purpose value onto the file's Module node (this one), both reuse the existing docstring property, so they flow through serialization and every pipeline pass unchanged.
One thing worth flagging 🔍
Indexing the content alone wasn't enough, bm25_search in mcp.c was explicitly excluding Section and Module from results (label NOT IN (…'Section','Module'…)), so even an indexed body would never surface. The PR drops those two from the exclusion list. They carry no rank boost, so code symbols still sort first and ordering for code queries is unchanged.
Two decisions I'd appreciate your take on
- I reused docstring rather than adding a new content field (the issue noted "add a content field (or reuse bt)") , it needed zero serialization changes and already survives every pass. Easy to switch to a dedicated field if you'd rather.
- #518https://github.com/DeusData/codebase-memory-mcp/issues/518 and this issue share the FTS body infrastructure (this issue can't work without it), so I bundled them in one PR. Happy to split into two stacked PRs if that suits your workflow better.
Bonus: since body comes from docstring, function/method docstrings are now BM25-searchable too, at no extra cost. If you'd want function bodies searchable, indexing bt (body_tokens) the same way would be a small follow-up.
Tests: 7 extraction + 3 store FTS cases. Backward compatible, additive column, and legacy 4-column FTS DBs upgrade automatically on the next index. Thanks for the great project!
— Reply to this email directly, view it on GitHubhttps://github.com/DeusData/codebase-memory-mcp/issues/519?email_source=notifications&email_token=CGLYXECSA6G43C7VHVDKAND5BRGPTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZZGQYDONBUGQ42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4794074449, or unsubscribehttps://github.com/notifications/unsubscribe-auth/CGLYXEHZOAJ2P2ZAU4BROIT5BRGPTAVCNFSNUABGKJSXA33TNF2G64TZHMYTCNRWGEYDEMJUHA5US43TOVSTWNBXGAYTGNZVGA3THILWAI. Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOShttps://github.com/notifications/mobile/ios/CGLYXEDU3IBTK4TGM7SFWJT5BRGPTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZZGQYDONBUGQ42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG and Androidhttps://github.com/notifications/mobile/android/CGLYXEBEQHTETGXGL7ZXBJL5BRGPTA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINZZGQYDONBUGQ42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA. Download it today! You are receiving this because you authored the thread.Message ID: @.@.>>
Hey @DeusData , just wanted to bump this for visibility, Russell (the original reporter) has reviewed the approach and is happy with both design decisions (reusing docstring and keeping the two issues in one PR). Thanks @Russdataart for the kind words and for validating the approach! Would love to get your eyes on it when you get a chance @DeusData!
Hey @ShauryaaSharma, yeah thanks man for the contribution!. Sorry that I am not able to review as quick as you deserve. Right now the shop is full, trying to work my way through everything. Will give you feedback as soon as I can
No worries at all @DeusData, take your time, there's no rush on my end! Happy to wait and appreciate you acknowledging it. 🙂