aboutsummaryrefslogtreecommitdiff
path: root/claude-rules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-18 21:03:50 -0500
committerCraig Jennings <c@cjennings.net>2026-07-18 21:03:50 -0500
commitddbd47fbbea06e71456b7bc4228626d3a126bf28 (patch)
tree06211963ee5fbb85b8c9eb0d4f2b860e5c74dfa1 /claude-rules
parentd2b1bef686fd6c22a6303c13829f88bdd110fa7b (diff)
downloadrulesets-ddbd47fbbea06e71456b7bc4228626d3a126bf28.tar.gz
rulesets-ddbd47fbbea06e71456b7bc4228626d3a126bf28.zip
feat(todo-cleanup): dated-seal archiving and planning-line strip on convert
Two batched changes to the todo hygiene tooling. Dated-seal archiving: --archive-done aging now keeps one month in-file (retain default 7 → 31, named as tc-archive-retain-days-default) and a new --seal renames the working task-archive.org to resolved-YYYY-MM-DD.org beside it, letting the next aging start a fresh working file. Dating the sealed file by the seal run rather than the calendar quarter is what avoids mislabeling a task closed late in a quarter and archived after the boundary. The unparseable-CLOSED case is now explicit in the contract: a keyword-complete task with no readable close date ages out too. The sealed file inherits the todo file's gitignore status. Planning-line strip: --convert-subtasks now drops the whole planning line when it rewrites a done sub-task to a dated event-log entry, not just the CLOSED cookie. A dated-log heading carries its date in the heading, so an active SCHEDULED/DEADLINE left on it pins the finished entry to the agenda as weeks-overdue forever (org renders any active planning timestamp, keyword or not). New lint-org checker dated-log-heading-active-timestamp backstops any that predate this. todo-format.md's sub-task and VERIFY completion rules gain the strip step.
Diffstat (limited to 'claude-rules')
-rw-r--r--claude-rules/todo-format.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/claude-rules/todo-format.md b/claude-rules/todo-format.md
index 2cdc76c..09b39cf 100644
--- a/claude-rules/todo-format.md
+++ b/claude-rules/todo-format.md
@@ -217,6 +217,7 @@ A completed sub-task disappears as a task and becomes an in-place event-log entr
2. Generate the timestamp with `date "+%Y-%m-%d %a @ %H:%M:%S %z"`.
3. Reword the original imperative title into the past-tense action that landed. Trim or restate if the original wording doesn't fit the action.
4. Drop the `TODO`/`DOING` keyword, the priority cookie, and the tags. The body stays as the record of what was done (if useful).
+5. Remove any `SCHEDULED:`/`DEADLINE:` planning line. The completion time lives in the heading now, so `CLOSED:` is redundant and an active planning date on a historical log entry is always wrong. Org renders any headline carrying an active `<...>` `SCHEDULED`/`DEADLINE` on the agenda, keyword or not, so a stale one pins the finished entry there as weeks-overdue forever. An interactive close (`org-log-done`) stamps `CLOSED:` but never strips a pre-existing planning line, which is exactly how the stale dates survive.
**Example:**
@@ -226,7 +227,7 @@ becomes
*** 2026-05-15 Fri @ 12:58:08 -0500 Wired yasnippet for universal availability
-**Enforcement.** This is applied at close time by whoever closes the task, but an interactive org close (`org-log-done` flips the keyword to `DONE` and stamps `CLOSED:`) never applies the dated rewrite, so level-3+ closes accumulate as `DONE` keywords. `todo-cleanup.el --convert-subtasks` (run in the `clean-todo` and wrap-up cleanup passes) normalizes them mechanically: it rewrites any level-3+ `DONE`/`CANCELLED`/`FAILED` heading into the dated form above, pulling the timestamp from the `CLOSED` cookie and keeping the heading text verbatim (a batch tool can't reliably past-tense a title — polish wording by hand where it matters). `lint-org.el` flags any that slip through (checker `subtask-done-not-dated`). So the depth rule holds even when tasks are closed interactively rather than by an agent applying this section.
+**Enforcement.** This is applied at close time by whoever closes the task, but an interactive org close (`org-log-done` flips the keyword to `DONE` and stamps `CLOSED:`) never applies the dated rewrite, so level-3+ closes accumulate as `DONE` keywords. `todo-cleanup.el --convert-subtasks` (run in the `clean-todo` and wrap-up cleanup passes) normalizes them mechanically: it rewrites any level-3+ `DONE`/`CANCELLED`/`FAILED` heading into the dated form above, pulling the timestamp from the `CLOSED` cookie, dropping the whole planning line (`CLOSED`, `SCHEDULED`, and `DEADLINE` together — step 5), and keeping the heading text verbatim (a batch tool can't reliably past-tense a title — polish wording by hand where it matters). `lint-org.el` flags any that slip through: checker `subtask-done-not-dated` for a still-keyworded sub-task, and `dated-log-heading-active-timestamp` for a dated entry that kept an active `SCHEDULED`/`DEADLINE`. So the depth rule holds even when tasks are closed interactively rather than by an agent applying this section.
### Why depth-based
@@ -309,6 +310,10 @@ tasks — dated entries at `***` and deeper, terminal keyword at `**`.
*** 2026-05-15 Fri @ 14:00:00 -0500 <what was answered or done>
Generate the timestamp with `date "+%Y-%m-%d %a @ %H:%M:%S %z"`.
+ Remove any `SCHEDULED:`/`DEADLINE:` planning line too, same as the
+ sub-task rule above — a dated event-log entry carries its date in the
+ heading, and an active planning date left on it pins the finished entry
+ to the agenda forever.
- **At `**` — terminal keyword, like any top-level task.** Change
`VERIFY` to `DONE` (answered / check passed) or `CANCELLED` (abandoned),