Skip to content

Guide agents to set closesCycle, show which choice a node waits for, and open the Pi panel on the timeline - #132

Merged
Epsirom merged 1 commit into
mainfrom
chrok/cycle-guidance
Oct 27, 2026
Merged

Epsirom merged 1 commit into
mainfrom
chrok/cycle-guidance

Conversation

@Epsirom

@Epsirom Epsirom commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Change

Part of RSI Mode (#118). Follows #131, from a second Pi run of the task-queue graph (impl, tests, docs → merge → review, with review -> impl [choice=again]). The cycle notice warned that impl would not run in the first round. The agent passed the warning on but did not set closesCycle, so impl@1 was skipped and merge wrote the implementation itself. Two status texts also misled the agent.

  • Guidance at submission. The Pi braid description and the DSH edges description now cover this pattern. When an outside edge enters the cycle at another node, rounds start there, and a node whose only input is a choice edge runs only after the decision chooses it. That is right for a fix step, but if the node should also run in the first round, write {"from":"review","to":"impl","choice":"again","closesCycle":true} and set it at submission. The round-start sentence Let an edge pick where a cycle's rounds start, and warn about nodes that wait for a choice #131 added read badly; it now lists the order: the closesCycle target, else the outside entry, else the node listed first. The closesCycle field descriptions say when to set it.
  • New WaitReason "choice". A pending instance whose non-closing inputs are all choice edges, while those inputs still wait, reports choice instead of predecessors, stale, or hold. Pi and DSH braid_status show it as waiting: runs only after review chooses again. Before, the agent saw "an input has not run yet" on a node it believed was a root.
  • Graph-timeout reminder. It said: It waits on suspended node "merge" execution merge@2 (its graphTimeoutMs limit); the job pause (by its graphTimeoutMs limit). The agent read "its" as a per-node limit. A job pause now names the executions it suspended, and limits are called "the job's": It waits on the job pause (by the job's graphTimeoutMs limit), which suspended node "merge" execution merge@2.
  • Pi panel opens on the timeline view. g switches to the live view, as before.

Docs: docs/execution-control.md (wait reasons, cycles), the Pi README (views, wait reasons), and docs/compatibility.md.

Compatibility: code that handles every WaitReason needs a case for choice; compatibility.md notes it. The panel views and the cycle features are unreleased since 0.5.

Validation

npm run verify:checks passes: core 313/313, Pi 197/197, DSH 71/71, plus type checks and examples.

  • Core: in the task-queue graph, impl@1 waits with choice, and with closesCycle it starts in the first round. In the existing check -> end [done] loop, end now reports choice instead of stale.

  • Pi and DSH: full status and focused status show "runs only after review chooses again". A reminder for a graph-timeout pause names the suspended execution once.

  • Pi panel tests now start from the timeline; the g round trip through the live view is still covered.

  • Relevant tests and type checks pass.

  • User-facing docs are updated where needed.

  • The title reads as a release-note line and the category label is correct
    (see release notes).

  • Breaking changes, if any, include migration guidance in the docs.

  • For release PRs: .github/upgrade-notes.md lists what users must do to upgrade.

…and open the Pi panel on the timeline

- Pi and DSH tool descriptions explain, with the impl/merge/review example,
  when a choice edge back needs closesCycle: true, and to set it at
  submission. The round-start sentence is reworded.
- New WaitReason "choice": a pending instance whose inputs are all choice
  edges waits for a decision to choose it. Pi and DSH status show it as
  "runs only after <decision> chooses <choice>".
- Waiting reminders name the executions a job pause suspended with that
  pause, so the cause appears once, and say "the job's <limit> limit".
- The Pi panel opens in the timeline view; g switches to the live view.
@Epsirom Epsirom added the enhancement New feature or request label Oct 27, 2026
@Epsirom
Epsirom enabled auto-merge (squash) October 27, 2026 14:13
@Epsirom
Epsirom merged commit e4d67ef into main Oct 27, 2026
18 checks passed
@Epsirom
Epsirom deleted the chrok/cycle-guidance branch October 27, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant