Skip to content

Hooks: coordinator picks up flow and model edits in agents.json (#753) - #754

Merged
contursofran merged 1 commit into
mainfrom
agent/753-flow-pickup
Nov 12, 2026
Merged

contursofran merged 1 commit into
mainfrom
agent/753-flow-pickup

Conversation

@contursofran

Copy link
Copy Markdown
Owner

Fixes #753

What changed

  • cmd/contr/hookflow.go: hash of the flow text and each profile's --model/--effort; last-seen hash per terminal in <state>/flow-seen/<terminal>.
  • contr hook prompt and post-tool: on a change, a terminal with label contr.orchestrating or role orchestrator gets additionalContext "contr: the owner changed the flow and models in agents.json; follow these from now on." + flow + one line per profile. hc is dialed only after a change. Workers (CONTR_COORDINATOR set) are skipped.
  • session-start (startup and compact) records the hash, so the first prompt says nothing. With no saved hash, the hook only saves one.
  • Errors are logged to stderr; the hooks still exit 0.
  • agents.Profile.Model() / Effort(); D293 in docs/DECISIONS.md.

Pre-check

  1. Tests: hookflow_test.go covers no change, a flow change, a model change, a non-coordinator terminal and a worker, and a bad file. With the change undone, these failed: ChangeReachesCoordinator and ModelChangeReachesPrompt (no context; startup record removed; label check removed), SkipsOtherTerminals (coordinator check forced true), NoChangeSaysNothing (hash compare broken), BadFileIsLogged (error swallowed).
  2. Plan: every point in the brief is done.
  3. Contract: the message text matches the brief word for word.
  4. Up to date: no new commits on main. No open PRs touch these files.
  5. Diff: I read it. No debug output or unrelated changes are left.
  6. Coverage: every point in the issue is done.
  7. Duties: no code was removed. The prompt hook still gives youContext, and only appends the flow text after it.
  8. Evidence: no UI change. scripts/check.sh passes.

@contursofran
contursofran merged commit 5534147 into main Nov 12, 2026
3 checks passed
@contursofran
contursofran deleted the agent/753-flow-pickup branch November 12, 2026 14:14
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.

Coordinator picks up flow and model edits in agents.json during a session

1 participant