Curate an existing AGENT_GOAL.md from a research brief and optional chat context. Use when a workspace already has AGENT_GOAL.md and the user wants to refine or save an explicit research goal. Do not use it to scaffold AGENT files, rewrite AGENT.md or other agent files, or infer a final goal without interacting with the user.
AGENT_GOAL.md and the user wants to refine, clarify, or save a research goal.AGENT_GOAL.md does not exist, route to the appropriate scaffolder: agent-files for generic workspaces, or manuscript-revision-agent-files for LaTeX IEEE manuscript revision.AGENT.md, AGENT_HARNESS.md, or AGENT_PROGRESS.md.target_dir: workspace directory expected to contain AGENT_GOAL.mdresearch_brief: concise statement of the research intentchat_context: optional conversation excerpts, notes, or prior wordingdry_run: when true, return a structured preview without writingtarget_dir/AGENT_GOAL.md exists. If it does not, stop and tell the caller to scaffold the workspace first with the appropriate scaffolder (agent-files for generic workspaces, manuscript-revision-agent-files for LaTeX IEEE manuscript revision).AGENT_GOAL.md and identify its current sections: statement, scope, non-goals, success criteria, and constraints.research_brief and any chat_context, then interact with the user until the research intention is explicit enough to save.AGENT_GOAL.md so the sections are mutually consistent and reflect the same research intention.dry_run is true, return the proposed update summary without writing. Otherwise update AGENT_GOAL.md and return a concise report of what changed.goal_pathwrittensummaryupdated_sectionswarningsopen_questionsAGENT_GOAL.md is missing, fail cleanly and route to the appropriate scaffolder: agent-files for generic workspaces, manuscript-revision-agent-files for LaTeX IEEE manuscript revision.written=false and put the remaining blockers in open_questions.tool.json for the authoritative schema.target_dir and research_brief are required.chat_context is optional supporting input and should not override explicit user-approved wording.