TDD: $ prefix not detected as shell mode in InputModeRouter #10413

Open
opened 2026-04-18 09:36:22 +00:00 by HAL9000 · 1 comment
Owner

Summary

TDD counterpart: $ prefix must activate shell mode in InputModeRouter.

Test to Write

def test_dollar_prefix_activates_shell_mode():
    from cleveragents.tui.input.modes import InputModeRouter, InputMode
    assert InputModeRouter.detect_mode("$echo hello") == InputMode.SHELL
    assert InputModeRouter.detect_mode("$ ls -la") == InputMode.SHELL

Subtasks

  • Write failing BDD scenario: "$ prefix routes to shell mode"
  • Verify test fails with current implementation
  • Implement fix
  • Verify test passes

Definition of Done

  • BDD scenario exists and passes
  • $ prefix correctly routes to shell mode

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Summary TDD counterpart: `$` prefix must activate shell mode in `InputModeRouter`. ## Test to Write ```python def test_dollar_prefix_activates_shell_mode(): from cleveragents.tui.input.modes import InputModeRouter, InputMode assert InputModeRouter.detect_mode("$echo hello") == InputMode.SHELL assert InputModeRouter.detect_mode("$ ls -la") == InputMode.SHELL ``` ## Subtasks - [x] Write failing BDD scenario: "$ prefix routes to shell mode" - [x] Verify test fails with current implementation - [x] Implement fix - [x] Verify test passes ## Definition of Done - [x] BDD scenario exists and passes - [x] `$` prefix correctly routes to shell mode --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
Author
Owner

Implementation Attempt — Tier 1: Haiku — Success

Implemented the TDD fix for $ prefix shell mode detection in InputModeRouter.

What was done:

  • Wrote failing BDD scenarios first (TDD red phase): features/tdd_dollar_prefix_shell_mode.feature with 2 scenarios testing $echo hello and $ ls -la
  • Verified tests failed with InputMode.NORMAL (expected InputMode.SHELL)
  • Implemented fix in src/cleveragents/tui/input/modes.py: added or stripped.startswith("$") to the shell mode detection condition
  • Verified tests pass (TDD green phase)
  • All quality gates passing: lint ✓, typecheck ✓, unit_tests ✓

PR: #10750


Automated by CleverAgents Bot
Supervisor: Implementation Pool | Agent: implementation-worker

**Implementation Attempt** — Tier 1: Haiku — Success Implemented the TDD fix for `$` prefix shell mode detection in `InputModeRouter`. **What was done:** - Wrote failing BDD scenarios first (TDD red phase): `features/tdd_dollar_prefix_shell_mode.feature` with 2 scenarios testing `$echo hello` and `$ ls -la` - Verified tests failed with `InputMode.NORMAL` (expected `InputMode.SHELL`) - Implemented fix in `src/cleveragents/tui/input/modes.py`: added `or stripped.startswith("$")` to the shell mode detection condition - Verified tests pass (TDD green phase) - All quality gates passing: lint ✓, typecheck ✓, unit_tests ✓ **PR:** https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/10750 --- **Automated by CleverAgents Bot** Supervisor: Implementation Pool | Agent: implementation-worker
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.

Dependencies

No dependencies set.

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