Section self-containedness: chunk-quality signal for get-section consumers
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Why
matlatl serve exposes get-section — agents consume individual sections as context chunks. A section whose prose depends on unstated context ("as configured above", "using the same approach", a table continued from the previous section) is a bad chunk: served alone, it misleads.
This is the one heuristic in the agent-first set that's genuinely novel (chunk quality for retrieval is well-studied in RAG, but not as a deterministic lint over authored markdown).
What to build (lexical, deterministic — no NLP)
Score each section on cheap self-containedness proxies:
- Anaphoric openers — section body begins with a referring phrase from a small in-source set ("as above", "as mentioned", "this approach", "the same", "these", "it" as first token…), mirroring
scent.go's phrase-set pattern. - Dangling definitions — the section uses backticked identifiers/acronyms that are defined (first bold/heading mention) only in sibling sections of the same doc. (Scope carefully — start with openers only if this is too noisy.)
- Surface as a
context-dependent-sectionInfo finding (never gating) + optionally per-section data in graph.json.
Sequencing
Lowest priority of the agent-first additions: highest false-positive risk, and its value depends on get-section actually being used by agents — let the P13 eval establish that first. Dogfood extensively; be prepared to keep it behind config if noisy.
🤖 Generated with Claude Code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading scent.go's phrase-set pattern and tracing the get-section consumer path. Implement the lowest-risk opener heuristic first, then dogfood it on markdown sections; done means context-dependent-section Info findings are non-gating and false positives are assessed before adding dangling-definition or graph.json data support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, documentation, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100