docs(conductor): replace manual pruner with advanced interactive AST and Slice tracks
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Track: Manual Context Pruner / Intercept Modal
|
||||
# Track: Interactive AST Tree Masking
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "interactive_ast_tree_masking_20260510",
|
||||
"title": "Interactive AST Tree Masking",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Implementation Plan: Interactive AST Tree Masking
|
||||
|
||||
## Phase 1: AST Mask Model & Inspector UI
|
||||
- [ ] Update `FileItem` in `src/models.py` with an `ast_mask: dict[str, str]` field (mapping symbol paths to 'def', 'sig', or 'hide').
|
||||
- [ ] In `src/gui_2.py`, add an `[Inspect]` button to the Context Panel table.
|
||||
- [ ] Implement `_render_ast_inspector_modal` in `src/gui_2.py`, fetching the outline via `ts_cpp_get_code_outline` and rendering it as an `imgui.tree_node` hierarchy with radio buttons.
|
||||
|
||||
## Phase 2: Dynamic Aggregation
|
||||
- [ ] Update `src/aggregate.py`. When an `ast_mask` is present, it must parse the file, extract the requested definitions and signatures by their symbol names, and stitch them into a single coherent markdown block.
|
||||
@@ -0,0 +1,11 @@
|
||||
# Specification: Interactive AST Tree Masking
|
||||
|
||||
## Overview
|
||||
Transform the Context Panel by allowing users to inspect the AST of C/C++ files and selectively mask individual symbols (classes, methods, functions). Instead of treating a file as a single unit, users can define an `ASTMask` to expose only what is relevant.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] An `[Inspect]` button in the Context Panel opens an AST Outline window for the selected file.
|
||||
- [ ] The Outline window renders a hierarchical tree of symbols using `tree-sitter`.
|
||||
- [ ] Users can toggle individual nodes as `[Def]` (Definition), `[Sig]` (Signature), or `[Hide]`.
|
||||
- [ ] `FileItem` model is updated to persist this `ASTMask` dictionary.
|
||||
- [ ] `aggregate.py` dynamically stitches the file content based on the `ASTMask`, automatically resolving line numbers by symbol name to survive agent modifications.
|
||||
@@ -0,0 +1,4 @@
|
||||
# Track: Interactive Text Slice Highlighting
|
||||
|
||||
- [Specification](./spec.md)
|
||||
- [Plan](./plan.md)
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "interactive_text_slice_highlighting_20260510",
|
||||
"title": "Interactive Text Slice Highlighting",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# Implementation Plan: Interactive Text Slice Highlighting
|
||||
|
||||
## Phase 1: Slice Model & Fuzzy Anchors
|
||||
- [ ] Update `FileItem` in `src/models.py` with a `custom_slices: list[dict]` field.
|
||||
- [ ] Implement a `FuzzyAnchor` utility to generate and re-resolve slices based on contextual text hashing.
|
||||
|
||||
## Phase 2: Editor UI Integration
|
||||
- [ ] In `src/gui_2.py`, add `[Edit Slices]` to the Context Panel.
|
||||
- [ ] Enhance the `TextEditor` wrapper to support visual highlighting and a context menu for adding/removing slices.
|
||||
|
||||
## Phase 3: Aggregation Execution
|
||||
- [ ] Update `src/aggregate.py` to respect `custom_slices` when building the final markdown text for a file.
|
||||
@@ -0,0 +1,10 @@
|
||||
# Specification: Interactive Text Slice Highlighting
|
||||
|
||||
## Overview
|
||||
Allow users to define custom text slices in any file (not just C/C++) by highlighting code in a text editor and tagging it. Slices use a 'Fuzzy Anchor' heuristic to survive file modifications.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] An `[Edit Slices]` button in the Context Panel opens the file in the `TextEditor` widget.
|
||||
- [ ] Users can highlight text and use a context menu/button to tag the slice (e.g., Include, Exclude, Summarize).
|
||||
- [ ] `FileItem` model is updated to persist `CustomSlices` with fuzzy anchors (hashed start/end context).
|
||||
- [ ] `aggregate.py` dynamically resolves these slices during payload generation, falling back gracefully if anchors are lost.
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"id": "manual_context_pruner_20260510",
|
||||
"title": "Manual Context Pruner / Intercept Modal",
|
||||
"status": "planned"
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
# Implementation Plan: Manual Context Pruner
|
||||
|
||||
## Phase 1: Aggregation Intercept
|
||||
- [ ] Add `review_context_before_send` boolean flag to `AppController`.
|
||||
- [ ] Update the `generate` workflow in `src/app_controller.py` to pause and trigger the UI modal if the flag is true.
|
||||
|
||||
## Phase 2: UI Modal
|
||||
- [ ] Add `_render_context_pruner_modal` in `src/gui_2.py`.
|
||||
- [ ] The modal must use a large `imgui.input_text_multiline` (or similar editor) to allow manual redaction.
|
||||
- [ ] Handle the callback to resume the `generate` workflow with the modified string.
|
||||
@@ -1,9 +0,0 @@
|
||||
# Specification: Manual Context Pruner / Intercept Modal
|
||||
|
||||
## Overview
|
||||
Introduce a "Review Context Before Send" toggle. When enabled, hitting "Send" opens a modal displaying the final, aggregated Markdown string. The user can manually delete lines, redact symbols, or prune irrelevant RAG chunks before giving the final approval to send the payload to the API.
|
||||
|
||||
## Acceptance Criteria
|
||||
- [ ] A UI toggle exists for "Review Context Before Send".
|
||||
- [ ] When enabled, sending a prompt opens a modal with a large text editor containing the fully aggregated markdown string (files + RAG chunks + prompt).
|
||||
- [ ] User can edit the text and click "Approve and Send" or "Cancel".
|
||||
Reference in New Issue
Block a user