Skip to content

[codex] Add automatic habit completion - #7

Draft
colonelpanic8 wants to merge 1 commit into
masterfrom
codex/auto-completion
Draft

[codex] Add automatic habit completion#7
colonelpanic8 wants to merge 1 commit into
masterfrom
codex/auto-completion

Conversation

@colonelpanic8

Copy link
Copy Markdown
Owner

Summary

Adds an opt-in automatic completion subsystem for org-window-habit entries.

  • supports :auto-complete-fn in OWH_CONFIG
  • adds manual and timer-driven scan entrypoints
  • suppresses duplicate completions within the current assessment interval
  • adds conservative git fast-forward prefetch support for git-synchronized agenda files
  • documents scheduling, predicate shape, and safety behavior

Correctness notes

The timer mode schedules one one-shot timer at a time. Each run scans the current org-agenda-files, then schedules the next run with fresh jitter. New habits added after startup are discovered on the next scan as long as they are in an agenda file.

Safety checks added here:

  • refuses to run when any agenda file buffer has unsaved edits
  • skips headings already in a done state
  • skips habits that already have a completion in the current assessment interval
  • re-checks for an existing completion immediately before mutating the buffer
  • git prefetch infers the single agenda-file repository, refuses dirty worktrees, and only fast-forwards

Validation

  • just check
  • 269/269 ERT tests
  • byte-compile
  • checkdoc
  • package-lint

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