UAT: TUI @ reference picker does not translate to CRP directives — references shown as text only, not sent to ACMS #5345

Open
opened 2026-04-09 05:55:56 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: TUI — Reference and Command Input System (v3.7.0)
Severity: Medium — @ references are parsed but not integrated with ACMS
Discovered by: UAT Testing (uat-pool-1, worker: tui-implementation)


What Was Tested

Code analysis of src/cleveragents/tui/input/reference_parser.py and src/cleveragents/tui/app.py against the TUI specification (§29314-29340).

Expected Behavior (from spec §29314-29340)

Resolved @ references are translated into CRP (Context Request Protocol) directives before the prompt reaches the actor — they semantically direct the ACMS to prioritize referenced resources in context assembly.

The reference picker should:

  1. Parse @ tokens from the prompt
  2. Resolve them to canonical form (e.g., @project:local/api-service:src/auth/handler.py)
  3. Translate resolved references into CRP directives before sending to the actor via A2A
  4. The ACMS uses these CRP directives to prioritize referenced resources in context assembly

Actual Behavior

The parse_references() function in reference_parser.py correctly parses and expands @ tokens to canonical form. However, the resolved references are never translated into CRP directives — they are only used for display purposes:

# app.py:203-209 — references are only shown in the reference picker overlay
preview = result.expanded_text
if "@" in text:
    ref_picker = self.query_one("#reference-picker", ReferencePickerOverlay)
    ref_picker.set_suggestions(
        text, suggestions(text.replace("@", "").strip())
    )
conversation.update(preview)  # ← just shows expanded text, no CRP translation

The ModeResult.references field (a list of canonical reference strings) is computed by InputModeRouter.process() but is never used — it is discarded after mode_router.process(text) returns.

Additionally, since there is no A2A integration (see issue #5329), even if CRP directives were generated, they would have nowhere to go.

Steps to Reproduce

  1. Open app.py:185-209result.references is computed but never used
  2. Search: grep -r "CRP\|crp\|context.*request.*protocol" src/cleveragents/tui/ → no results
  3. Note: ModeResult.references field exists but is discarded in on_input_submitted

Impact

  • @ references are visually expanded in the prompt but have no semantic effect
  • The ACMS does not receive context prioritization hints from user references
  • Referenced files/projects are not prioritized in context assembly

This is a medium-severity gap — the reference parsing infrastructure exists, but the ACMS integration is missing.

Code Location

  • src/cleveragents/tui/app.py:185-209result.references discarded
  • src/cleveragents/tui/input/modes.pyModeResult.references computed but unused
  • Missing: CRP directive translation layer

Definition of Done

  • result.references used when sending prompt via A2A
  • Resolved references translated to CRP directives in A2A message payload
  • ACMS receives CRP directives and prioritizes referenced resources
  • (Depends on #5329 — TuiMaterializer A2A integration)

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** TUI — Reference and Command Input System (v3.7.0) **Severity:** Medium — @ references are parsed but not integrated with ACMS **Discovered by:** UAT Testing (uat-pool-1, worker: tui-implementation) --- ## What Was Tested Code analysis of `src/cleveragents/tui/input/reference_parser.py` and `src/cleveragents/tui/app.py` against the TUI specification (§29314-29340). ## Expected Behavior (from spec §29314-29340) > Resolved `@` references are translated into CRP (Context Request Protocol) directives before the prompt reaches the actor — they semantically direct the ACMS to prioritize referenced resources in context assembly. The reference picker should: 1. Parse `@` tokens from the prompt 2. Resolve them to canonical form (e.g., `@project:local/api-service:src/auth/handler.py`) 3. **Translate resolved references into CRP directives** before sending to the actor via A2A 4. The ACMS uses these CRP directives to prioritize referenced resources in context assembly ## Actual Behavior The `parse_references()` function in `reference_parser.py` correctly parses and expands `@` tokens to canonical form. However, the resolved references are **never translated into CRP directives** — they are only used for display purposes: ```python # app.py:203-209 — references are only shown in the reference picker overlay preview = result.expanded_text if "@" in text: ref_picker = self.query_one("#reference-picker", ReferencePickerOverlay) ref_picker.set_suggestions( text, suggestions(text.replace("@", "").strip()) ) conversation.update(preview) # ← just shows expanded text, no CRP translation ``` The `ModeResult.references` field (a list of canonical reference strings) is computed by `InputModeRouter.process()` but is **never used** — it is discarded after `mode_router.process(text)` returns. Additionally, since there is no A2A integration (see issue #5329), even if CRP directives were generated, they would have nowhere to go. ## Steps to Reproduce 1. Open `app.py:185-209` — `result.references` is computed but never used 2. Search: `grep -r "CRP\|crp\|context.*request.*protocol" src/cleveragents/tui/` → no results 3. Note: `ModeResult.references` field exists but is discarded in `on_input_submitted` ## Impact - `@` references are visually expanded in the prompt but have no semantic effect - The ACMS does not receive context prioritization hints from user references - Referenced files/projects are not prioritized in context assembly This is a medium-severity gap — the reference parsing infrastructure exists, but the ACMS integration is missing. ## Code Location - `src/cleveragents/tui/app.py:185-209` — `result.references` discarded - `src/cleveragents/tui/input/modes.py` — `ModeResult.references` computed but unused - Missing: CRP directive translation layer ## Definition of Done - [ ] `result.references` used when sending prompt via A2A - [ ] Resolved references translated to CRP directives in A2A message payload - [ ] ACMS receives CRP directives and prioritizes referenced resources - [ ] (Depends on #5329 — TuiMaterializer A2A integration) --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.7.0 milestone 2026-04-09 06:01:06 +00:00
Author
Owner

Label compliance fix applied:

  • Assigned milestone based on issue scope
  • Reason: Issue was missing a milestone assignment per CONTRIBUTING.md requirements.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Assigned milestone based on issue scope - Reason: Issue was missing a milestone assignment per CONTRIBUTING.md requirements. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
Author
Owner

Hierarchical Compliance Fix: Linked to Epic #5305 (TUI Reference & Command Input System) — the @ reference picker is part of the reference/command input system.


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

**Hierarchical Compliance Fix**: Linked to Epic #5305 (TUI Reference & Command Input System) — the @ reference picker is part of the reference/command input system. --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5345
No description provided.