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
feat(flow): cadence-gate the auto-Act after a flow (#109)
`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>
0 commit comments