Repository navigation
feat: add adaptive context pack representations - #218
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR implements task-aware adaptive rendering for context packs. After node selection, the same retrieved nodes can be rendered in six deterministic modes (signature, behavior_sketch, call_chain, contract_view, implementation_excerpt, dependency_record) based on task kind (explain, review, impact), reducing tokens while preserving task-relevant evidence. ChangesAdaptive Context-Pack Representation Modes
Sequence Diagram(s)sequenceDiagram
participant Client as Client / Task Contract
participant Resolution as applyContextPackResolution<br/>(with task_kind)
participant SketchSelection as Representation Selection<br/>(signals + taskKind)
participant Render as renderSketchRepresentation
participant Output as Rendered Node<br/>(representation_type)
Client->>Resolution: nodes, options.task_kind=explain
Resolution->>SketchSelection: collect behavior/call/dependency signals
SketchSelection->>SketchSelection: select behavior_sketch or call_chain
SketchSelection->>Render: representation_type=call_chain
Render->>Output: detailed snippet with execution path
Output-->>Client: node with representation_reason
Client->>Resolution: nodes, options.task_kind=review
Resolution->>SketchSelection: collect behavior/dependency signals
SketchSelection->>SketchSelection: select contract_view or implementation_excerpt
SketchSelection->>Render: representation_type=contract_view
Render->>Output: minimal contract-only snippet
Output-->>Client: node with reduced token_count
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
Summary
Closes #176
Test Plan
Summary by CodeRabbit
New Features
Tests