feat(flow): cadence-gate the auto-Act after a flow - #117
Merged
Conversation
`pdca flow` auto-ran the Act leaf after every COMPLETE — including single- and few-item flows. But Act is a cross-cycle cadence beat: it reviews FROZEN cycles across the index for recurring signals and only yields a real delta once enough cycles have accumulated. Auto-running it after one slice spends an interactive leaf on insufficient signal and conflates the per-contribution loop with the cross-cycle cadence. Gate the auto-run on a configurable cadence that PERSISTS across flow invocations: run Act only when `[driver].act_cadence` (default 5) cycles have frozen SINCE the last Act. The "since last Act" count is derived from a durable marker (the frozen-bundle count at the last review, in process/.act-reviewed) — so five separate one-bundle flows trip it on the fifth, and it works even when a command-mode Act writes no act-log entry (the review still happened). Below the threshold the flow skips with a hint; `pdca act log` runs Act on demand (and resets the cadence); `--no-act` still forces skip; cadence 1 restores run-after-every-flow. - config: [driver].act_cadence (floor 1). - act: mark_reviewed / cycles_since_review / act_due (frozen is monotonic, so current-minus-marker is the unreviewed count). - leaves.run_act resets the marker whenever Act runs (both modes); cli `act log --append` resets it too. - flow: _maybe_run_act gates both the single and batch auto-run. Tests: ActCadence — Act held below cadence then fires on the 3rd flow (persistence across invocations), and the marker resets after a run. Existing flow tests set act_cadence=1 to keep asserting Act-after-flow. Full suite: 171 OK. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Eduard Ralph <15236434+eduralph@users.noreply.github.com>
eduralph
force-pushed
the
feat/109-act-cadence-gate
branch
from
June 22, 2026 18:50
9b902a9 to
9c2b13a
Compare
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.
Summary
Closes #109.
pdca flowauto-ran Act after every COMPLETE — including single-item flows — spending an interactive leaf on insufficient cross-cycle signal. Gate the auto-run on a configurable cadence that persists across flow invocations: run Act only when[driver].act_cadence(default 5) cycles have frozen since the last Act.The "since last Act" count comes from a durable marker (the frozen-bundle count at the last review, in
process/.act-reviewed) — so five separate one-bundle flows trip it on the fifth, and it works even when a command-mode Act writes no act-log entry (the review still happened). Below the threshold the flow skips with a hint;pdca act logruns Act on demand (and resets the cadence);--no-actstill forces skip; cadence1restores run-after-every-flow.config:[driver].act_cadence.act:mark_reviewed/cycles_since_review/act_due.leaves.run_actresets the marker (both modes);act log --appendresets it too.flow:_maybe_run_actgates the single and batch auto-run.Verification
ActCadence: Act held below cadence then fires on the 3rd flow (persistence across invocations); marker resets after a run. Full suite: 171 OK.🤖 Generated with Claude Code