aboutsummaryrefslogtreecommitdiff
path: root/.ai/workflows/open-tasks.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-01 21:35:16 -0400
committerCraig Jennings <c@cjennings.net>2026-07-01 21:35:16 -0400
commit19ba7cb40c5a448bb28f0217d8cc4718dd450f91 (patch)
tree6eeeaf8e10f701c8daa96d2853f1043d3960f3c2 /.ai/workflows/open-tasks.org
parentc976f5b6166b0596daefa6c6dcfc2b684563e13c (diff)
downloadrulesets-19ba7cb40c5a448bb28f0217d8cc4718dd450f91.tar.gz
rulesets-19ba7cb40c5a448bb28f0217d8cc4718dd450f91.zip
feat(todo-cleanup): add --convert-subtasks dated-rewrite mode
Rewrites every level-3+ DONE/CANCELLED/FAILED heading into a dated event-log entry from its CLOSED cookie, enforcing the todo-format depth rule that interactive closes and --archive-done (level-2 only) leave unapplied. A new lint-org checker (subtask-done-not-dated) flags stragglers, and the clean-todo, wrap-up, open-tasks, and task-review workflows now run the converter before archiving. Removing the CLOSED cookie keeps a DEADLINE or SCHEDULED cookie that shares its planning line, rather than dropping the whole line. From the .emacs.d handoff (2026-07-01 convert-subtasks bundle).
Diffstat (limited to '.ai/workflows/open-tasks.org')
-rw-r--r--.ai/workflows/open-tasks.org7
1 files changed, 4 insertions, 3 deletions
diff --git a/.ai/workflows/open-tasks.org b/.ai/workflows/open-tasks.org
index 4ba29dd..02a0847 100644
--- a/.ai/workflows/open-tasks.org
+++ b/.ai/workflows/open-tasks.org
@@ -23,15 +23,16 @@ Don't route "task review" / "review tasks" here — those trigger the hygiene ha
* Phase A: Data Gathering (both modes)
-** Phase A pre-step — archive any freshly-DONE tasks
+** Phase A pre-step — normalize freshly-closed tasks
-Before reading =todo.org=, run the cleanup script's archive-done sweep so completed level-2 subtrees move from =* $Project Open Work= to =* $Project Resolved=:
+Before reading =todo.org=, run two cleanup sweeps so the read reflects current state. First convert any done sub-tasks to dated entries, then archive completed level-2 subtrees from =* $Project Open Work= to =* $Project Resolved=:
#+begin_src bash
+emacs --batch -q -l .ai/scripts/todo-cleanup.el --convert-subtasks todo.org
emacs --batch -q -l .ai/scripts/todo-cleanup.el --archive-done todo.org
#+end_src
-Costs a few hundred milliseconds. Without it, a task that completed earlier in the session sits as =** DONE= under Open Work until the next =clean-todo= or wrap-up pass, and Next Mode would surface it as a "what's next" candidate. The sweep makes Phase A's read of =todo.org= reflect current state.
+Costs a few hundred milliseconds. Without the archive sweep, a task that completed earlier in the session sits as =** DONE= under Open Work until the next =clean-todo= or wrap-up pass, and Next Mode would surface it as a "what's next" candidate. The convert sweep runs first so a completed parent's sub-tasks are already dated when it archives; it also keeps interactive level-3 closes from lingering as DONE keywords. Together they make Phase A's read of =todo.org= reflect current state.
Skip the sweep if the workflow is invoked in an explicit read-only or dry-run context. Default is to run it.