Personal memo/todo tracker with priority categories, due dates, staleness tracking, and daily morning briefing via cron. Supports add, done, list, move, and clean operations.
Track tasks with priority categories, due dates, and automatic staleness reminders.
Memo lives at /workspace/group/memo.json (persistent across restarts).
On first use of any /memo command, check if the file exists. If not, initialize it:
echo '{"items":[]}' > /workspace/group/memo.json
IMPORTANT: Always read the FULL file before any write. Never partially update — read, modify in memory, write the whole file back. Use python3 for all operations.
{
"items": [
{
"id": "m-<timestamp>",
"text": "Task description",
"category": "urgent|this_week|plan_for_it|maybe",
"added": "2026-03-11",
"due": "2026-03-15",
"completed": null
}
]
}
| Category | Meaning | Morning report | Staleness rule |
|---|---|---|---|
urgent | Today or tomorrow | Always shown, top of list | None — just do it |
this_week | Due this week | Always shown | None |
plan_for_it | Has a rough timeline, >1 week out | Always shown | >14 days without completion → ask user to downgrade to maybe |
maybe | No commitment, aspirational | Sundays only | >60 days → ask user to scratch it |
When reporting, check due dates. If a plan_for_it or this_week item's due date is today or tomorrow, mention it as urgent regardless of its stored category. Don't silently re-categorize — just flag it: "哥你那个 X 明天就到期了啊,还不动?"
/memo add <text>Add a new item. The user MUST provide either:
If the user gives neither, you MUST ask. Do NOT default-assign a category. Example:
/memo add review tax documentsWhen both are provided, generate the item:
python3 -c "
import json, time
with open('/workspace/group/memo.json') as f:
data = json.load(f)
data['items'].append({
'id': f'm-{int(time.time())}',
'text': 'THE_TASK_TEXT',
'category': 'THE_CATEGORY',
'added': 'YYYY-MM-DD',
'due': 'YYYY-MM-DD_OR_NULL',
'completed': None
})
with open('/workspace/group/memo.json', 'w') as f:
json.dump(data, f, ensure_ascii=False, indent=2)
print('done')
"
Replace placeholders with actual values. due can be None for maybe items.
/memo done <id or keyword>Mark an item as completed. Search by ID or text match:
python3 -c "
import json
from datetime import date
with open('/workspace/group/memo.json') as f:
data = json.load(f)
keyword = 'SEARCH_TERM'.lower()
matched = [i for i in data['items'] if not i['completed'] and (keyword in i['text'].lower() or keyword == i['id'])]
if len(matched) == 1:
matched[0]['completed'] = str(date.today())
with open('/workspace/group/memo.json', 'w') as f:
json.dump(data, f, ensure_ascii=False, indent=2)
print(f'Completed: {matched[0][\"text\"]}')
elif len(matched) == 0:
print('NO_MATCH')