Add planner-visible intent commit grouping#53
Draft
KristjanPikhof wants to merge 42 commits into
Draft
Conversation
- Add a configurable settle window to gate bursty intent planning. - Parse zero and valid durations while falling back on invalid input. - Cover env loading, defaults, invalid values, and zero handling in tests.
- Add configurable settle delay once pending intents reach the threshold - Surface the new setting in daemon config and replay resolution - Keep negative test overrides clamped to zero/off
- Surface the intent settle window in strategy reporting. - Parse daemon metadata for non-negative durations. - Extend status tests to cover settle window metadata and reporting.
- Surface settle-window timing in intent strategy output - Keep status and diagnose assertions aligned with the new field
- Keep every durable same-path capture visible unless opted in. - Require explicit env values to re-enable destructive squash. - Align tests with the new default and accepted spellings.
- Add a helper to inspect offered capture seqs in planner requests. - Update the replay test to keep four same-path edits visible. - Assert the planner can select the full chain as one commit.
- Cover independent edits in the same file so planner still sees both captures. - Reuse the offered-seq helper in replay assertions to simplify checks.
- Treat recent rapid captures as settling before planning - Cover both the settle-window skip and the eventual 5-capture batch
- Record settle-window context in daemon traces. - Expose newest-pending and settle-trigger fields in CLI reports.
- Distinguish settle-window waits from generic batch waits in CLI output - Report the newest pending event age and settle trigger timing - Keep planner observability aligned with the pending window semantics
- Differentiate settle-window waiting from general batch waiting - Surface the correct countdown when intent is paused for settling - Add coverage for JSON and human status output in the settle case
- Distinguish intent settle-window waits from age-based waits in status. - Cover compact, verbose, and JSON list output for the new wait path.
- Distinguish settle-window waits from the older batch-wait display. - Add coverage for a rapid burst that should stay grouped as one commit.
- Keep planner-driven replays from auto-zeroing the settle window. - Make same-path coalescing opt-in so durable captures stay visible.
- Skip settle waiting once pending hits the window cap. - Disable the settle window in the singleton replay test.
- Allow intent replay to skip settle delay once the window is full. - Keep CLI observability aligned with the new full-window gate.
- Add structured commit groups to intent plans and validate them - Normalize grouped grouping reasons alongside legacy plan fields - Apply message-quality rewriting to each commit group independently
- Allow one planning response to represent multiple independent commits - Keep legacy top-level fields aligned with the first group for compatibility
- Pass commit-group data from the planner subprocess to the daemon. - Replay and validation now operate on grouped selections instead of a single flat selection, preserving commit boundaries during publishing.
- Add v11 state schema support for planner-window observability - Persist offered, hidden, selected, and deferred event breakdowns - Keep migration notes aligned with the new durable storage layout
- Store privacy-safe planner window summaries and per-event lookup rows. - Add schema coverage to ensure the new tables and indexes exist.
- Record planner window metadata end to end. - Persist and reload window fields so observability data survives storage. - Capture planner provider/model from replay config for window records.
- Persist planner window metadata for every replay path - Include short-circuits and validation failures in the record - Keep replay history aligned with what the planner saw and chose
- Load persisted intent planner windows for replayed events - Surface planner window metadata in event listings - Show offered and hidden seqs to make window output explainable
- Include the latest planner window in strategy reports for CLI users. - Show offered, selected, deferred, hidden, and validation details when available so planner behavior is easier to inspect.
- Keep CLI observability structs consistently aligned - No functional behavior changes; this is readability cleanup
- Update the state, CLI, and test files to use the planner windows name consistently. - Keep the rename aligned with the existing planner terminology exposed in recent commits.
- Keep the intent planner filenames consistent with the new singular naming. - Rename the CLI, state, and test files together so the suite stays in sync.
- Add JSON event coverage for planner-window details - Add status summary coverage for the last planner window
- Add integration coverage for planner-window partitioning - Assert independent intents stay separable in the daemon - Check the rapid-five path still reports one coalesced group
- Align test fixtures with the new bullet-list commit body format - Keep intent atomicity expectations consistent with generated output - Ensure the partitioning test covers the final rendered message shape
- Disable the settle window so the test uses immediate intent capture. - Enable path coalescing to make the two saves collapse into one path. - Keep the quiescence scenario deterministic under intent strategy.
- Give intent mode a burst settle delay so related edits can land together - Document grouped replay, planner-window diagnostics, and default env values
- Require commit groups to stay in non-overlapping seq ranges - Keep replay deterministic by falling back when planner output is invalid - Update docs and tests to match the tightened planner contract
- Document the new planner contract for multi-intent windows. - Explain that ordered `commit_groups` preserve atomic replay. - Clarify custom planners should follow the same selection behavior.
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.
Feature Description
Intent mode now waits briefly for related captures to settle, shows the planner
a lossless visible window, and lets the planner split that window into ordered
commit_groups. This keeps rapid related work visible to AI without forcingunrelated or independent same-file edits into one broad commit.
Type of Change
Implementation Details
ACD_INTENT_SETTLE_WINDOWso intent mode can wait briefly after thepending-count gate before planning.
ACD_INTENT_PATH_COALESCE=1available for the legacy folded behavior.commit_groupsplanner support so one window can publish several atomiccommits in order.
diagnose, and events output.
Key Files Changed
internal/daemon/replay.gointernal/ai/intent_planner.gointernal/state/intent_planner_window.gointernal/cli/intent_planner_window.gotest/integration/intent_atomicity_test.goDatabase Changes
How to Test
Verified locally:
git diff --checkcleanenv make lintcleanenv make testcleanenv go test ./test/integration/... -tags=integration -race -count=1 -timeout 5mcleanenv go test ./internal/daemon/... ./internal/git/... ./internal/state/... ./internal/pause/... ./internal/cli/... -race -count=3 -timeout 10mAfter the final docs-only commit,
git diff --check main..HEADalso passed.Edge Cases Considered
commit_groupsare rejected and fall back safely.Feature Flag
ACD_COMMIT_STRATEGY=intent