026.07 Agent Open/Close
Description¶
As an AI Agent, I want to open and close QualCoder projects so that I can autonomously manage the project lifecycle during automated workflows (e.g., batch analysis, CI pipelines, headless operation).
Currently the agent can query project context (get_project_context) and navigate within an open project, but cannot open or close projects programmatically. This blocks headless/automated agent workflows.
Trust Level: T2 (Notify) — Agent acts, researcher informed post-action. Opening/closing projects is a safe, reversible operation. The researcher is notified but no approval is required.
Bounded Context: Projects Layer: Interface (MCP tools)
Acceptance Criteria¶
- [x] #1 MCP tool
open_projectis registered withpathas required parameter - [x] #2 Agent can open a
.qdaproject file by providing its absolute path - [x] #3 Invalid or non-existent paths return clear failure messages matching
ProjectNotOpenedfailure events - [x] #4
ProjectOpeneddomain event is published on success - [x] #5 MCP tool
close_projectis registered (no parameters required) - [x] #6 Agent can close the currently open project
- [x] #7 Closing when no project is open returns an informative message (not an error)
- [x] #8
ProjectCloseddomain event is published on close - [x] #9 E2E test exists with
@allure.story("QC-026.07 Agent Open/Close Project")decorator
Notes¶
- When opening a project, any currently open project is closed first (matching UI behavior)
- The
close_projecttool is idempotent — calling it with no project open is safe