aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-11 15:33:20 -0500
committerCraig Jennings <c@cjennings.net>2026-05-11 15:33:20 -0500
commit9dadf33cab5061a27084a98a83fce38a28155c90 (patch)
treec905c34307db78d8b8085bbcd3c1818846a0b7e7
parentf7152b4ff33954ab8e77e1a1e97af9e11b1b82b6 (diff)
downloadrulesets-9dadf33cab5061a27084a98a83fce38a28155c90.tar.gz
rulesets-9dadf33cab5061a27084a98a83fce38a28155c90.zip
docs(workflows): run todo-cleanup --archive-done in wrap-up
The wrap-up flow already runs the hygiene pass on todo.org; it now also runs --archive-done, which relocates completed level-2 subtrees from "Open Work" to "Resolved". Both passes are idempotent and skip cleanly when the file lacks the named sections, and any moves land in the wrap-up commit's diff for review before push.
-rw-r--r--.ai/workflows/wrap-it-up.org24
1 files changed, 21 insertions, 3 deletions
diff --git a/.ai/workflows/wrap-it-up.org b/.ai/workflows/wrap-it-up.org
index 105a7e9..849950c 100644
--- a/.ai/workflows/wrap-it-up.org
+++ b/.ai/workflows/wrap-it-up.org
@@ -68,9 +68,13 @@ mv .ai/session-context.org .ai/sessions/${now}-DESCRIPTION.org
Replace =DESCRIPTION= with your picked slug.
-** Step 3: todo.org hygiene pass
+** Step 3: todo.org cleanup (hygiene + archive completed work)
-If the project has a =todo.org= at its root, run the cleanup script before committing. It catches a recurring pattern: org sometimes leaves noise lines like =- State "X" from "X" [date]= when a state-change log lands outside a =:LOGBOOK:= drawer and the state didn't actually change. These lines carry no information and they break org's planning-line parser by wedging between the heading and =DEADLINE:=/=SCHEDULED:=, which kicks the entry out of agenda views.
+If the project has a =todo.org= at its root, run the cleanup script before committing. Two passes, both fast and idempotent: a hygiene pass and an archive pass.
+
+*** Hygiene pass
+
+It catches a recurring pattern: org sometimes leaves noise lines like =- State "X" from "X" [date]= when a state-change log lands outside a =:LOGBOOK:= drawer and the state didn't actually change. These lines carry no information and they break org's planning-line parser by wedging between the heading and =DEADLINE:=/=SCHEDULED:=, which kicks the entry out of agenda views.
#+begin_src bash
[ -f todo.org ] && emacs --batch -q -l .ai/scripts/todo-cleanup.el todo.org
@@ -89,6 +93,20 @@ Run the report-only variant first if you want to see what would change without w
emacs --batch -q -l .ai/scripts/todo-cleanup.el --check todo.org
#+end_src
+*** Archive completed work
+
+#+begin_src bash
+[ -f todo.org ] && emacs --batch -q -l .ai/scripts/todo-cleanup.el --archive-done todo.org
+#+end_src
+
+=--archive-done= moves every level-2 subtree whose TODO state is DONE or CANCELLED out of the project's "Open Work" section and into its "Resolved" section, subtree intact. The two sections are matched by a unique level-1 heading containing "Open Work" (case-insensitive) and one containing "Resolved" — if either is missing or ambiguous, the file is skipped with a message, no crash. Only direct level-2 children move; a DONE entry nested under an open parent stays put. Idempotent; any moves show up in the wrap-up commit's diff for review before push.
+
+Preview the moves without writing:
+
+#+begin_src bash
+emacs --batch -q -l .ai/scripts/todo-cleanup.el --archive-done --check todo.org
+#+end_src
+
** Step 3.5: Linear ticket-state hygiene (skip if project doesn't use Linear)
If the project uses Linear and has any tickets currently in *Dev Review* assigned to Craig, sweep them before the wrap-up commit. The check is fast and keeps the board honest — tickets stuck in Dev Review after their PR merges hide actual work-in-progress.
@@ -272,7 +290,7 @@ Before considering wrap-up complete:
- [ ] =.ai/session-context.org= =* Summary= section populated
- [ ] File renamed to =.ai/sessions/YYYY-MM-DD-HH-MM-description.org=
- [ ] =.ai/session-context.org= no longer exists
-- [ ] =todo-cleanup.el= ran (if =todo.org= exists at project root)
+- [ ] =todo-cleanup.el= ran — hygiene pass + =--archive-done= (if =todo.org= exists at project root)
- [ ] Any orphan-planning-line warnings reviewed (fix or accept)
- [ ] Linear Dev-Review sweep ran; any merged-PR tickets moved to Done or PM Acceptance (skip if project doesn't use Linear)
- [ ] After wrap-up commit + push, =git status --short= is empty OR every remaining line has an explicit user-deferred decision logged in the valediction