todo-archive
Skill8 starsChanged 6 months agoMITView on GitHub
Low-level archive engine for completed tasks in TODO.md. Companion to todo-management; routine housekeeping should usually go through todo-maintenance.sh.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- PaulRBerg/dot-agentstheir own version, first seen Nov 6, 2026
- PaulRBerg/agent-skillstheir own version, first seen Oct 24, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- PaulRBerg/agent-skills★ 104same name
- PaulRBerg/dot-agents★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository129 other files it gives its agents.
- AGENTS.mdAGENTS.md
- guidance/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- guidance/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- blast-radius-checkSkill
- brainstormingSkill
- branch-flow-gateSkill
- branch-sync-gateSkill
- codebase-reconSkill
- codeowners-drift-auditSkill
- code-review-batterySkill
- cognitive-complexity-refactoringSkill
- debateSkill
- debug-conductorSkill
- dispatching-parallel-agentsSkill
- domain-buildSkill
- evidence-adjudicatorSkill
- executing-plansSkill
- external-cli-auditSkill
- feature-developmentSkill
- field-rename-verificationSkill
- finishing-a-development-branchSkill
- git-branch-conventionsSkill
- gitlab-cliSkill
- hotfix-charterSkill
- implementation-trackerSkill
- incident-revert-reviewSkill
- infra-config-investigatorSkill
- investigation-stateSkill
- kernel-splitSkill
- llm-behavior-investigatorSkill
- llm-skill-reviewSkill
- merge-authorization-gateSkill
- micro-harsh-reviewSkill
- output-verificationSkill
- pre-commit-gateSkill
- progressive-code-review-gateSkill
- progressive-harsh-reviewSkill
- providing-code-reviewSkill
- pr-triage-gateSkill
- push-authorization-gateSkill
- receiving-code-reviewSkill
- reproduction-experiment-investigatorSkill
- requesting-code-reviewSkill
- requirements-validation-pmSkill
- requirements-validationSkill
- scope-tripwireSkill
- session-handoffSkill
- skills-hierarchy-tuningSkill
- sp-bughuntSkill
- state-consistency-investigatorSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- timeline-trace-investigatorSkill
- token-estimationSkill
- unified-commit-gateSkill
- using-git-worktreesSkill
- using-superpowersSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 80
If file doesn't exist → create with header:
- Distinctive: line 89
Check for duplicate task IDs (idempotency guard) and skip re-appending blocks already present in the month file
- Distinctive: line 110
Remove only the archived entries from the HISTORY section.
- Distinctive: line 120
If mismatch → ABORT, restore from backup, report error.
- Distinctive: line 182
Recovery: If counts mismatch post-archive → restore from backup
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TODO Archive System
Companion to:
todo-management(from superpowers-plus) Archive location:$(dirname $TODO_FILE_PATH)/todo-archives/Index:todo-archives/INDEX.mdWrong skill? Managing active tasks →
todo-management. Task CRUD operations → usetodo-crud.shdirectly.
Companion Skills
- todo-management: Active task management (this skill handles archival)
When to Use
| Trigger | Action |
| User says "archive todos" | Run full archive of all HISTORY entries |
Routine housekeeping run via todo-maintenance.sh | Use this archive engine when maintenance thresholds trigger |
| TODO.md exceeds 400 lines | Auto-archive HISTORY entries ≥7 days old |
| HISTORY has entries >30 days old | Archive regardless of line count (staleness rule) |
| User says "search archived todos for X" | Search across archive files |
| User says "show archived todos from Month Year" | Display specific monthly archive |
Archive Workflow
Step 1: Resolve paths
EXPLICIT_TODO_FILE_PATH="${TODO_FILE_PATH:-}"
if command -v cb-env &>/dev/null; then
TODO_FILE_PATH=$(cb-env -- bash -c 'printf "%s" "$TODO_FILE_PATH"')
else
source ~/.codex/.env 2>/dev/null || true
fi
TODO_FILE_PATH="${EXPLICIT_TODO_FILE_PATH:-${TODO_FILE_PATH:-$HOME/.codex/TODO.md}}"
TODO_PATH="${TODO_FILE_PATH:-$HOME/.codex/TODO.md}"
ARCHIVE_DIR="$(dirname "$TODO_PATH")/todo-archives"Step 2: Determine what to archive
Parse the # HISTORY section of TODO.md. Identify completed ([x]) and cancelled ([-]) tasks.
Archival criteria (any match triggers archival):
- Manual trigger (
archive todos) → archive ALL HISTORY entries - TODO.md > 400 lines AND entry is ≥7 days old → archive
- Entry is >30 days old → archive (staleness rule)
Step 3: Partition by completion month
For each task, extract the Done: or Cancelled: date. Compute target file: YYYY-MM.md.
Step 4: Write to archive files
For each target month file:
If file doesn't exist → create with header:
# TODO Archive — {Month Name} {Year} > Tasks archived from TODO.md- Check for duplicate task IDs (idempotency guard) and skip re-appending blocks already present in the month file
- Append tasks under
## YYYY-MM-DDdate headers (reverse-chronological) - Compute and add metadata:
Duration:,Issue:(extract ticket IDs from tags/description)
Step 5: Update INDEX.md
Rebuild INDEX.md from all archive files:
# TODO Archive Index
> Total archived: {count} tasks across {n} months
| Month | Tasks | Top Tags | Related Issues |
|-------|-------|----------|---------------|
| 2026-03 | 42 | #engineering (18) | PROJ-$1, PROJ-$1 |
| 2026-02 | 38 | #recruiting (12) | PROJ-$1 |Step 6: Remove archived tasks from TODO.md
Remove only the archived entries from the HISTORY section. Keep any entries that didn't meet archival criteria.
Step 7: Integrity verification
pre_history_count = {N}
removed_from_history = {M}
post_history_count = {N - M}If mismatch → ABORT, restore from backup, report error.
Archive File Format
# TODO Archive — March 2026
> Tasks archived from TODO.md
## 2026-03-18
- [x] [20260315-01] Fix alarm tuning across repos #engineering-backend
- Added: 2026-03-15
- Done: 2026-03-18T14:30:00
- Duration: 3 days
- Progress: Tuned P1/P2 alarms, added runbook URLs
- Issue: PROJ-$1
## 2026-03-15
- [x] [20260314-02] Review config PR #engineering-backend
- Added: 2026-03-14
- Done: 2026-03-15T10:30:00
- Duration: 1 day
- Progress: Approved with minor suggestionsSearch Interface
By keyword
search archived todos for "alarm tuning"
→ grep -rn "alarm tuning" "$ARCHIVE_DIR"/*.mdBy issue ID
search archived todos for PROJ-$1
→ grep -rn "PROJ-$1" "$ARCHIVE_DIR"/*.mdBy month
show archived todos from March 2026
→ cat "$ARCHIVE_DIR/2026-03.md"By date range
show archived todos from 2026-02-01 to 2026-03-15
→ cat 2026-02.md 2026-03.md (then filter by date headers)Integrity & Safety
- Locking: Acquires the same advisory lock
todo-crud.shuses (viatodo-engine.py'sacquire_lock()) before snapshotting TODO.md, and holds it until the rebuild is committed or aborted. Declares a longer TTL than the default (archive rebuilds can run longer than a typical write) — see thetodo-managementskill's Failure Modes section for lock-recovery guidance (including how long a caller should expect to wait) rather than duplicating it here. - Backup: TODO.md backed up before any modification (existing mechanism)
- Idempotency: Task IDs checked before appending — duplicates skipped
- Dry-run: Report what would be archived without modifying files
- Recovery: If counts mismatch post-archive → restore from backup
Edge Cases
| Scenario | Resolution |
| Task completed then re-opened | Archive entry stays (immutable). New ACTIVE entry with Reopened from [ID] |
| Concurrent archive attempts | Guarded by the advisory lock — a concurrent todo-crud.sh write or second archive run aborts with "Could not acquire lock" rather than racing |
| Archive file already has entries for that day | Append under existing date header (no duplicate header) |
| HISTORY section is empty | No-op, report "No completed tasks to archive" |
| No HISTORY section exists | No-op, report "No HISTORY section found" |
Failure Modes
| Failure | Fix |
| Concurrent write with todo-crud.sh corrupts archive | Acquires the advisory lock — aborts if TODO.md is already locked |
| Losing task metadata (tags, issue links) during archival | Verify archived block matches source block character-for-character |
| Archive runs during active task operations — split-brain | Lock acquisition serializes against todo-crud.sh; a held lock aborts the archive run instead of racing it |
| Count mismatch after archive but error suppressed | Hard abort + restore from backup on ANY integrity mismatch |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

