4.0 KiB
Tasks: Layered Map Protocol
Status
| Field | Value |
|---|---|
| Phase | Tasks |
| Based on | Design |
| Next | Apply |
Delivery slices
Slice 1: Shared model and paired rendering
Scope: shared intermediate directory model, universal paired artifacts, fixed section names/order, root Tier 0 entrypoint Review goal: establish the core paired architecture without retrieval-command work
Tasks:
- Add a shared intermediate directory model for paired map/index generation
- Extend render/parse support for paired
.pi-map.mdand.pi-map.index.mdoutputs with the agreed fixed section names/order - Add generation support for
.pi-map.index.mdin every non-ignored directory - Enrich root artifacts with explicit Tier 0 behavior and sibling links
- Add/update tests for map/index rendering, fixed order, and sibling identity
Slice 2: Routing metadata and workflow normalization
Scope: likely files, parent/child/sibling links, workflow schema, rich-map metadata density rules Review goal: make the navigation model operational on real output
Tasks:
- Add index-first routing metadata generation from AST/structure + LLM judgment
- Normalize workflow hints into a deterministic schema before rendering
- Add parent/child/sibling
index:/map:references - Implement rich-map density rules for slightly richer file lines, tag cap, and prioritized symbols
- Add/update tests for routing hints, leaf indexes, and workflow omission on low confidence
Slice 3: Patch sizing, cascade refresh, and repair
Scope: changed-directory pair refresh, ancestor-chain refresh rules, validation hard failures, validate --fix
Review goal: make freshness and repair trustworthy
Tasks:
- Make
project_map_patchalways regenerate both artifacts for the changed directory - Add auto-detected small vs structural patch sizing with explicit override in both CLI and tool surfaces
- Refresh ancestor indexes for small changes and ancestor map+index pairs for structural changes
- Expand validation for pair-aware checks, hard failures on missing/stale indexes, and concise structural-reason output
- Add/confirm
project-map validate --fixrepair flow for affected-chain regeneration - Add/update tests for patch classification, ancestor refresh, and repair behavior
Slice 4: Prompt guidance, config knobs, and docs
Scope: Project Map Protocol, Tier 0 runtime guidance, workflow/tag config, docs rewrite Review goal: align runtime behavior and documentation with the final operating model
Tasks:
- Update
pi-extension.tsprompt guidance to teach the layered paired protocol - Update
SKILL.mdto describe indexes as routing and maps as orientation - Update
README.mdanddesign-doc.mdconsumption guidance - Add config support for workflow-hint cap and rich-map tag cap
- Keep the paired-artifact model self-contained with no vector-store or Engram dependency
- Add/update tests for config-driven caps and root Tier 0 guidance
Acceptance checklist
- Every non-ignored directory has both
.pi-map.mdand.pi-map.index.md - Root Tier 0 behavior is emitted in generated root artifacts
- Indexes are routing-first, role-first, and include parent/child/sibling links
- Rich maps are orientation-first and include sibling index links
- Changed-directory patch always regenerates both artifacts
- Ancestor refresh follows small vs structural rules
- Validation hard-fails on missing/stale paired artifacts and supports
validate --fix - Workflow-hint count and tag cap are configurable
- No vector-store or Engram dependency is introduced
npm run typecheckpassesnpm testpassesnpm run lintpasses (N/A: repo has no ESLint config; pre-existing repository gap, not a change regression)
Review workload note
This change crosses format, generation, patching, validation, config, docs, and prompt guidance. Keep implementation in narrow, reviewable slices and avoid one oversized PR.