You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A deterministic Stop hook (shell-script-based, not LLM-based) that runs nous validate --execution after each tool burst and signals "stop, work complete" only when validation passes. More reliable and cheaper than the agent self-deciding when to stop.
Why this matters
Today the executor decides on its own when to stop ("I've written findings.json, I'm done"). Sometimes it keeps writing. Sometimes it stops too early. Stop hooks are deterministic — a shell script returning 0 = continue, non-zero with a reason = stop.
This issue wires it into the agent loop as a hook.
Proposed approach
Implement bin/nous-execute-stop — a small shell script that runs nous validate --dir <iter-dir> --execution and [ -f <iter-dir>/principle_updates.json ]. Exits 0 if both pass.
Register it as a Stop hook for the executor agent (in the per-campaign .claude/settings.json, depends on Test issue #15).
When the hook signals "stop", the agent terminates cleanly. When it doesn't, the agent gets the validation diff back as a structured message and continues.
Acceptance criteria
On the first pass that produces a valid findings.json + principle_updates.json, the executor exits within one turn of the hook firing.
If validation fails, the next executor turn includes the schema diff (not a re-run from scratch).
TL;DR
A deterministic Stop hook (shell-script-based, not LLM-based) that runs
nous validate --executionafter each tool burst and signals "stop, work complete" only when validation passes. More reliable and cheaper than the agent self-deciding when to stop.Why this matters
Today the executor decides on its own when to stop ("I've written findings.json, I'm done"). Sometimes it keeps writing. Sometimes it stops too early. Stop hooks are deterministic — a shell script returning 0 = continue, non-zero with a reason = stop.
What's already shipped
nous validatefrom feat: nous validate CLI + executor writes artifacts directly #54 already encapsulates the validation logic.Proposed approach
bin/nous-execute-stop— a small shell script that runsnous validate --dir <iter-dir> --executionand[ -f <iter-dir>/principle_updates.json ]. Exits 0 if both pass..claude/settings.json, depends on Test issue #15).Acceptance criteria
findings.json+principle_updates.json, the executor exits within one turn of the hook firing.Notes
/goalmode but is distinct: this is deterministic (validation pass/fail),/goalis probabilistic (Haiku evaluator). Use the deterministic one wherever possible.Part of #120.