Feat/goal consumer - #166
Merged
Merged
Conversation
…n domain code-assistant becomes the second consumer of agent_orchestration: a GoalController drives session-owned Running goals one bounded turn at a time through start_turn_if_idle (claim precedes dispatch, Busy abandons without spending budget, failed turns and evaluator errors are ledgered as controller-error attempts), evaluates the typed TurnOutcome evidence, and folds verdicts back through the store's revision/claim semantics. Clock waits (until/timeout) resolve in the same pass; other barriers park until timeout or a deliberate resume. Continuation is host-driven only — the loop lives and dies with the process, no unattended auto-resume after exit (that stronger contract stays with pal).
…lock The generic subset of pal's goal tool (create/show/list/pause/resume/ cancel — no lane, wait-adoption or child semantics): the owner is the session the tool runs in, every action is scoped to that owner, and the store's revision/claim-token semantics keep a user pause/cancel from clobbering an in-flight controller turn (pinned by a test). The system prompt surfaces the session's active goals, so a reloaded session knows what it is still committed to.
/goal <objective> expands Claude-Code-style into a prompt that has the agent derive the completion contract through the goal tool; bare /goal lists the session's goals. Alongside the wakeup scheduler the app spawns the goal controller (30s passes, LlmGoalEvaluator on the configured model) — host-driven continuation that lives and dies with the app.
ROADMAP: the 'Now: converge goals' section gets a dated status note and the goal-migration acceptance criteria are marked met (both consumers). agent_orchestration grows the vocabulary-only RunSpec/RunBudget/ RunRecord/RunAttempt/RunStatus skeleton from 'Next: unify runs' — the run/attempt split pinned as types + serde roundtrips, no behavior.
Same host-driven continuation as the terminal frontend: alongside the wakeup scheduler, the backend runtime drives the sessions' durable goals (30s passes, LlmGoalEvaluator on the configured model) while the app is open.
…al tool The model-facing goal tool is gone: it competed with update_plan for the agent's attention, and no reference implementation lets the model commit itself to a goal (hermes' /goal is gateway-side, codex prompt-gates create_goal to explicit user requests, Claude Code has no tool at all). /goal <condition> now writes the goal directly through the new goal_commands layer: the user's condition, verbatim, is the whole completion contract (default budget 10 turns); bare /goal lists, and show/pause/resume/cancel [id] manage the lifecycle (id optional while a single goal is open). The terminal UI passes the raw argument text through and shows the outcome as an info message — no agent round-trip.
A goal reaches the model only as the framed goal-turn message (goal_turn_text), which arrives like any user message and carries the full contract — the same shape as hermes' continuation prompt and Claude Code's stop-hook feedback; codex likewise steers via hidden user-role context fragments, never the system prompt. The ambient block was redundant with that, and stale by construction.
A message the user sends during a goal turn takes natural priority — the goal continues after their turn; /goal pause|cancel is the deliberate stop. Only an explicit run cancel still parks the session's goals: the user actively stopped the autonomous work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.