Skip to main content

Module ctx_compose

Module ctx_compose 

Source
Expand description

ctx_compose — task composer (Phase 2 of the efficiency epic).

The biggest agent win is a single “rich per call” tool that returns ranked files with inline bodies, replacing the typical search → read → outline → read chain (3-5 calls) with one.

lean-ctx already has the building blocks as separate tools; this composes them into one response for a natural-language task:

  1. extracted keywords,
  2. semantically ranked files (BM25 / hybrid),
  3. exact match locations (index-backed ctx_search),
  4. the body of the most relevant symbol, inline.

Functions§

handle
Compose a single rich response for task.