Skip to content

Fix live-state questions being reduced to command descriptions - #40

Merged
merefield merged 2 commits into
mainfrom
fix/live-state-question-routing
Sep 20, 2026
Merged

merefield merged 2 commits into
mainfrom
fix/live-state-question-routing

Conversation

@merefield

Copy link
Copy Markdown
Owner

Problem

clai what is the time? could display only "shows the current system date and time", while the same request without ? ran date and interpreted its output. The fallback router treated any question mark as answer-only mode, which discarded the generated command.

Changes

  • Remove punctuation-based fallback routing. Main-LLM guidance now distinguishes requests needing live data from general knowledge and how-to questions.
  • Clarify System One intent criteria so questions about time, disk space, processes, or git status use the execution workflow.
  • Add examples and README guidance. Commands still pass through risk auditing and configured confirmation rules; explicit answer-only routing is retained.

Validation

  • make check passed (Go vet/tests and all 18 Bats tests).
  • Regression tests cover both time-query spellings, with and without System One, command-result interpretation, confirmation at risk appetites 0 and 1, and direct answers without execution.
  • Local binary rebuilt successfully. Tests use simulated model responses; live model classification has not been evaluated. Custom query prompts can override the updated defaults.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Removing fallback routing makes the documented question_query setting unreachable without System One.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates question handling so live-state requests execute commands while general questions can be answered directly.

Changes:

  • Removes punctuation-based question routing.
  • Updates LLM and System One intent guidance.
  • Adds documentation and regression tests.
File Description
README.md Documents semantic routing behavior.
internal/​systemone/​client.go Clarifies live-state execution criteria.
internal/​app/​prompts.go Updates execution guidance and examples.
internal/​app/​app.go Removes question-mark fallback routing.
internal/​app/​app_test.go Adds routing and result-interpretation tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/app/prompts.go
@merefield
merefield merged commit 71ce5e0 into main Sep 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants