Skip to content

Add recurring-task manifest (recurring.txt)#9

Merged
TroyHernandez merged 2 commits into
mainfrom
recurring-manifest
Apr 27, 2026
Merged

Add recurring-task manifest (recurring.txt)#9
TroyHernandez merged 2 commits into
mainfrom
recurring-manifest

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

Summary

Recurring tasks now declare their frequency in a single recurring.txt at the repo root. run_monday() reads the manifest and materializes the recurring rows into each day section of Daily plus a flat list in Week/Month/Quarter. Day-by-day duplication in Daily stops being the source of truth — the manifest is.

Manifest format

# Comments and blanks ignored
M       Email                                # Mondays only
MR      wiki                                 # Mon + Thu
*       Exercise                             # every weekday (alias MTWRF)
1W:M    Bills                                # first Monday of the month
MTWR    cornball.ai > Lil Casey > Countdown  # nested path
  • Day codes M T W R F (R = Thursday); combine adjacently
  • Optional week-of-month prefix 1W:..5W:
  • Nested paths via > separator; ancestors auto-materialized as recurring containers

run_monday() behavior

After advance_period() carries last week forward, recurring rows are stripped from each cadence and re-materialized from the manifest in manifest order. Non-recurring one-off tasks survive verbatim. If recurring.txt is absent the behavior is unchanged from 0.1.7 — fully opt-in.

instantiate_todo() writes a starter recurring.txt so new repos start with a working manifest.

Test plan

  • 42 new tests in test_recurring.R covering frequency parser (M, MTWRF, *, 1W:M, nested paths), manifest reader (comments, blanks, paths), per-date filter (weekday + week-of-month), and end-to-end run_monday integration verifying day sections include only their applicable recurring rows
  • All 123 prior tests still pass (165 total green)
  • Smoke test on Troy's actual ~/todo/ with a hypothetical manifest produces correctly-filtered day sections (Email/todo M-only, wiki on MR, Exercise on *, Countdown on MTWR)
  • Version bumped to 0.1.8

Recurring tasks now declare their frequency in a single
recurring.txt at the repo root, and run_monday() materializes
the rows into each day section of Daily plus a flat list in
Week/Month/Quarter. Day-by-day duplication in Daily is no
longer the source of truth; the manifest is.

Manifest format:

  # Comments and blanks ignored
  M       Email                                # Mondays only
  MR      wiki                                 # Mon + Thu
  *       Exercise                             # every weekday (alias MTWRF)
  1W:M    Bills                                # first Monday of month
  MTWR    cornball.ai > Lil Casey > Countdown  # nested path

Day codes M T W R F (R = Thursday); combine adjacently. Optional
week-of-month prefix 1W..5W joined by colon. Paths use ` > ` as
separator; nested ancestors are auto-materialized as recurring
containers so the tree is well-formed.

Behavior in run_monday():

- After advance_period() carries last week forward, recurring
  rows are stripped from each cadence and re-materialized from
  the manifest in manifest order.
- Non-recurring user one-off tasks survive verbatim.
- If recurring.txt is absent, run_monday behaves exactly as
  before; this is opt-in.

instantiate_todo() now writes a starter recurring.txt with a few
sample entries so new repos start with a working manifest.

42 new tests: frequency parser (M, MTWRF, *, 1W:M, etc.),
manifest reader (comments, paths, nesting), per-date filter
(weekday + week-of-month), end-to-end run_monday integration
verifying day sections include only their applicable recurring
rows.

Bump version to 0.1.8.
README: add recurring.txt to the folder layout and a new
Recurring tasks section with the full syntax (day codes,
week-of-month prefix, nested paths) and an opt-in note.

CLAUDE.md: brief internals pointer to R/recurring.R and the
helper functions that drive materialization.
@TroyHernandez TroyHernandez merged commit ee9dced into main Apr 27, 2026
1 of 4 checks passed
@TroyHernandez TroyHernandez deleted the recurring-manifest branch April 27, 2026 22:47
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