stacklok / stacklok/matlatl

Section self-containedness: chunk-quality signal for get-section consumers

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. 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.
  2. 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.)
  3. Surface as a context-dependent-section Info 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.