Context Assembly
Bridge between code intelligence and inference. The harness knows the code (milestone 2) and can talk to the model (milestone 1). Now it needs to build prompts that fit in a 3B model's context window and actually contain the right information.
Scope:
- Token budget system: allocate fixed token counts per prompt section (system, code context, task, generation space) and enforce them
- Prompt templates for each pipeline stage (classify intent, generate edit, verify diff)
- RAG retrieval: given a task description, rank indexed symbols by relevance and pull the top N into context
- Embedding index via fastembed for semantic search (complements the AST-based symbol lookup from milestone 2)
- Few-shot example injection: find similar code in the project and include it as examples in the prompt
- Conversation compression: maintain a structured summary of the session that fits in a small token budget
Demo: given "add input validation to parse_config," the context manager builds a prompt containing the function body, its callers, a similar function that already has validation (as a few-shot example), and the task description — all within the token budget.
No due date
0% Completed