Skip to content

feat: investigation prompt, plan/execute phases, and arc spinner#92

Merged
veeso merged 21 commits intomainfrom
feat/investigation-prompt-and-fix
Mar 14, 2026
Merged

feat: investigation prompt, plan/execute phases, and arc spinner#92
veeso merged 21 commits intomainfrom
feat/investigation-prompt-and-fix

Conversation

@veeso
Copy link
Copy Markdown
Collaborator

@veeso veeso commented Mar 14, 2026

Summary

  • Investigation prompt & HITL scoping: add HITL scoping questions during incident investigation, persist Q&A exchanges in context, and fix duplicate report messages
  • Plan & execute phases: add planning and execution phases to the incident investigation pipeline, with PlannerAgent, ExecutorAgent, SavePlanTool, and ResumeContext variants
  • Arc spinner: replace the text-based dots spinner with a smooth painted arc throbber drawn via egui's Painter API, avoiding font compatibility issues

Test plan

  • Run ENGINE_TYPE=mock cargo run and trigger an LLM query (? ...) — verify the rotating arc spinner appears while waiting
  • Verify the spinner is offset from the terminal margins and centered in the character cell
  • Run cargo test — all existing tests pass
  • Run cargo clippy -- -D warnings — no warnings

veeso added 21 commits March 12, 2026 16:17
…estions

Replace hardcoded string matching in IncidentConfirmation with a two-tier
classifier: fast text matching for common patterns (option index, y/n,
exact option text, Enter), falling back to a lightweight LLM call for
ambiguous answers. Also preserve question options in ResumeContext and
include them in the continuation prompt so the LLM can interpret answers
like "1" in regular Question flows.
…essage

Add ask_user support during investigation phase so the investigator
can ask scoping/clarification questions before running diagnostics.
Rework the investigator prompt with structured Phase 1 (scoping) and
Phase 2 (diagnosis) guidance. Fix duplicate "post-mortem saved to"
message by extracting only the file path from the reporter response
instead of emitting the full LLM echo. Demote keyboard key-event log
from debug to trace.
…ure command completion

- Fix ANSI stripping to handle DEC private mode sequences (e.g. \x1b[?2004h)
- Add 150ms debounce window so partial PTY chunks don't trigger false positives
- Replace overly broad prompt patterns (^.*[$#%]\s*$) with specific ones
Track operator question-answer pairs in IncidentContext so subsequent
agent turns retain the full conversation history. Also fix message
ordering in orchestrator resume flows to ensure history includes the
latest exchange before continuing.
Add planning entry points (start_planning, resume_planning_question,
run_planning_step, start_plan_review), execution entry points
(start_execution, resume_execution_command, resume_execution_with_output,
resume_execution_question, run_execution_step), modify
run_analysis_and_report to chain plan confirmation after report, and
add all orchestrator match arms for the new ResumeContext variants.
Replace fragile LLM text parsing with Arc<RwLock<Option<Result>>> slots
that tools deposit results into directly, so the pipeline reads the
saved file path reliably.
Each PlannerAgent turn creates a fresh agent with no conversation
history. Without recording planning Q&A into IncidentContext, the
agent would repeat earlier questions. Mirror what
resume_investigation_question already does.
The plan review question asked "Would you like to change anything?"
forcing users to say "no" to proceed, inconsistent with every other
HITL prompt. Reframed to "Are you happy with this plan?" so "yes"
means proceed to execution.
Replace the text-based dots spinner with a painted arc spinner
drawn using egui's Painter API. This avoids font compatibility
issues and provides a smooth, anti-aliased loading indicator.
@veeso veeso merged commit d1a5e73 into main Mar 14, 2026
5 checks passed
@veeso veeso deleted the feat/investigation-prompt-and-fix branch March 14, 2026 10:32
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.

1 participant