Files
pi-map/openspec/changes/archive/2026-06-11-map-context-retrieval/tasks.md
T

35 lines
1.5 KiB
Markdown

# Tasks: Map Context Retrieval
## Status
| Field | Value |
|---|---|
| Phase | **Tasks** |
| Based on | [Design](design.md) |
| Next | Apply |
## Tasks
1. [ ] Add Pi tool support for `project-map context` with `query` as the main input
2. [ ] Add retrieval module for scoring paired index/map metadata
3. [ ] Reuse or extend shared paired-artifact parsing/model code
4. [ ] Rank candidate directories from indexes first, then expand to maps/files/symbols
5. [ ] Emit compact markdown-first context bundles with stable section order and retrieval-specific `Context bundle` title
6. [ ] Add tests for retrieval ranking, top-3 default behavior, and output shape
7. [ ] Add CLI support after the tool contract is stable
8. [ ] Update docs and skill guidance for retrieval usage
## Acceptance checklist
- [x] Tool works for natural-language queries via `query`
- [x] Output includes relevant indexes, strongest-match maps, likely files, symbols when useful, and instructions
- [x] Retrieval depends on paired metadata rather than raw source scanning
- [x] Ranking follows the index-first routing model with a top-3 default
- [x] `npm run typecheck` passes
- [x] `npm test` passes
- [x] `npm run lint` passes *(N/A: repo has no ESLint config; pre-existing repository gap, not a change regression)*
## Sequencing note
This change is intentionally follow-up work. It should start after the layered map protocol produces reliable paired routing metadata.
The first delivery surface is the Pi tool. CLI support follows the stabilized tool contract.