Skip to content

docs(orchestrator): enforce strict no-pause in lazy autopilot; fix workflow-creation loop bug - #274

Merged
hffmnnj merged 2 commits into
mainfrom
docs/orchestrator-strict-continuation
Aug 3, 2026
Merged

hffmnnj merged 2 commits into
mainfrom
docs/orchestrator-strict-continuation

Conversation

@hffmnnj

@hffmnnj hffmnnj commented Aug 3, 2026

Copy link
Copy Markdown
Owner

What

Documentation/prompt-consistency fixes to the orchestrator's own prompt and its reference graph. No application logic changed except one stale test label.

Why

  1. Stricter no-pause enforcement. The orchestrator's prompt didn't explicitly say "never pause between tasks/phases" as a standalone rule — that guidance was scattered and deviation-rule-specific. Added a dedicated ## Never Pause Between Tasks or Waves (Lazy Autopilot) section to agents/goop-orchestrator.md naming the only two valid hard stops (credentials/secrets; destructive/irreversible operations) and explicitly listing what does not qualify as a stopping point (deviations, phase transitions, checkpoints, PR creation, per-phase plan review). Mirrored in references/phase-gates.md and references/task-decomposition.md.

  2. Fixes a real observed bug. In a live session, the orchestrator repeatedly regenerated a workflowId and re-issued create-workflow + set-active-workflow calls that had already succeeded — looping ~7 times with zero forward progress before a human caught it. Root cause: references/core-protocol.md's worked example still described goop_state's activate: true flag as not-yet-landed ("once it lands...") even though it already exists and is already used correctly in tool-reference.md; and commands/goop-discuss.md still taught the stale two-call sequence — the exact pattern executed in the loop. No document anywhere said "a successful call is durable, don't retry it." Replaced the two-call pattern with the single-call activate: true form and added a new ### Trust Successful Tool Results rule to core-protocol.md naming the failure mode explicitly.

  3. Fixes drift found during the audit. commands/goop-execute.md claimed the lazy-autopilot nudge has nine suppression guards; the real count (in phase-gates.md and the implementation) is eleven (two were added later). Replaced the hardcoded count/list with a pointer to phase-gates.md as the single source of truth. Also corrected a matching stale "nine guards" label in guards.test.ts.

Files changed

  • agents/goop-orchestrator.md — new no-pause section
  • references/phase-gates.md — mirrored no-pause language in the lazy autopilot subsection
  • references/task-decomposition.md — plan review gate autopilot-skip subsection
  • commands/goop-discuss.md — single-call activate: true form + anti-pattern bullet
  • references/core-protocol.md — updated worked example + new Trust Successful Tool Results subsection
  • commands/goop-execute.md — guard count/list now points to phase-gates.md
  • src/hooks/lazy-autopilot-nudge/guards.test.ts — stale "nine guards" test label corrected (label-only, no behavior change)

Verification

  • Both commits independently verified via git log/git status/git show (not trusted on subagent response text alone).
  • Confirmed no remaining occurrences of the stale two-call pattern, the stale "once it lands" hedge, or "nine guards" anywhere in the repo.
  • Scoped test run for the one touched test file: guards.test.ts — 28 pass / 0 fail, no behavior change (label-only edit).
  • Bypass of full discovery/plan phases logged to the decision log: documentation-only change, no architecture, no new libraries, no domain unknowns.

hffmnnj added 2 commits August 2, 2026 18:23
… workflow-creation loop

Three related documentation fixes to the orchestrator prompt and its
reference graph:

1. Stricter no-pause enforcement: add a dedicated section to the
   orchestrator agent prompt making explicit that lazy autopilot must
   never pause between tasks, waves, or intra-phase checkpoints except
   for the two enumerated hard stops (credentials/secrets; destructive
   operations). Reinforce that the runtime nudge is a safety net, not a
   permitted rhythm. Mirror this in phase-gates.md (lazy autopilot
   subsection) and task-decomposition.md (post-wave review gate gets an
   autopilot-skip subsection).

2. Fix a real workflow-creation loop bug observed in production: the
   orchestrator repeatedly regenerated a workflowId and re-issued
   create-workflow + set-active-workflow calls that had already
   succeeded, looping ~7 times with zero forward progress. Root cause
   was stale docs teaching the two-call pattern and never telling the
   orchestrator to trust a successful result. Replace the two-call
   sequence with the single-call activate:true form across goop-discuss.md
   and core-protocol.md, add a Trust Successful Tool Results subsection
   to core-protocol.md, and add an explicit anti-pattern bullet.

3. Fix guard-count drift: goop-execute.md said nine suppression guards
   while the actual implementation has eleven. Replace the hardcoded
   count and inline list with a pointer to the authoritative table in
   phase-gates.md so the doc cannot drift out of sync again.

No source code changed; documentation and prompt files only.
… label

The guard set has grown past nine (see phase-gates.md §Suppression Guards), so the label was misleading. Don't hardcode a new number; phase-gates.md is the source of truth for the guard count.
@hffmnnj
hffmnnj merged commit aa6104b into main Aug 3, 2026
0 of 2 checks passed
@hffmnnj
hffmnnj deleted the docs/orchestrator-strict-continuation branch August 3, 2026 01:27
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.

1 participant