| name | tucking-in |
| description | Use when ending a work session — detects project tracking systems, syncs progress, saves session insights to memory, cross-references past learnings, and generates a concise wrap-up report. Triggers on "good night", "wrapping up", "end of day", "signing off", "calling it a day", or equivalent in any language. |
Setup (first run only)
Check if ~/.tucking-in/config.json exists.
If NOT found — run first-time setup:
I notice this is your first time using tucking-in. Let me set it up (takes 30 seconds).
Q1: Which progress tracking do you use? (comma-separate or "none")
Options: gsd, todos, changelog, package-version, github-issues, none
Q2: Save session reports to a file?
Options: no (terminal only) | yes → path? [default: .session-reports/YYYY-MM-DD.md]
Q3: Memory system?
Options: auto-memory (default) | auto-memory+evermem | none
Save to ~/.tucking-in/config.json:
{
"version": 1,
"tracking": ["todos", "changelog"],
"reportPath": null,
"memory": "auto-memory",
"goodnightStyle": "dev-humor"
}
If found — load config silently and proceed.
Context
Gather ALL context in parallel:
Basic (always):
date +%Y-%m-%d_%u — date and weekday
pwd — project name
git log --oneline --since="6am" — today's commits (count for goodnight rotation)
Language detection (zero-cost, no LLM translation):
4. Detect display language — first match wins:
- Config has
"language" field → use it
echo $LANG → extract locale (en_US.UTF-8 → en, zh_CN.UTF-8 → zh)
- CLAUDE.md or AGENTS.md contains CJK characters →
zh
- Default →
en
Use detected language for ALL output. Goodnight messages have pre-translated variants (see Phase 6).
Progress detection (config-guided, reality-verified):
5. For each system in config.tracking, verify the file actually exists:
gsd → check .planning/STATE.md exists
todos → check TODOS.md or TODO.md exists
changelog → check CHANGELOG.md exists
package-version → check package.json has version field
github-issues → check gh CLI available + repo has remote
Config = preference. Filesystem = truth. If config says "gsd" but .planning/ doesn't exist, skip silently.
- Read project's CLAUDE.md / AGENTS.md for "Current State" section
Memory context (if enabled in config):
7. Read MEMORY.md from auto-memory directory — scan for:
type: project memories → state claims to verify
type: feedback memories → guardrails to check compliance
SESSION_CLOSED markers → last session date
- If
memory: "auto-memory+evermem", search EverMem for project-relevant memories. Cross-reference for:
- Stale project memories contradicting current state
- Feedback memories violated today
- Missing memories for today's decisions
Workflow
Execute phases 1-6 IN ORDER. Be concise — this is a wrap-up, not a novel.
Phase 1: Progress Sync
Based on detected tracking systems, sync today's progress:
GSD (.planning/STATE.md):
- Read STATE.md → check if phase/plan status matches actual state (git commits, SUMMARY files)
- If stale: update Phase Progress table, Requirement Status, Current Status
- If GSD CLI is available (
gsd-tools.cjs): run roadmap update-plan-progress
- Commit:
git add .planning/ && git commit -m "docs: sync progress tracking for [date]"
TODOS.md / TODO.md:
- Mark completed items
[x] based on today's git log
- Add new todos discovered during session
- Do NOT defer to later sessions
CHANGELOG.md (if version bumped today):
- Verify CHANGELOG reflects today's changes
package.json (if version changed):
- Note version change in report
GitHub Issues (if enabled + gh available):
gh issue list --assignee @me --state open — note open items in report
Nothing to sync: state "Progress tracking is up to date." and move on.
Phase 2: Session Report
Generate a report with these sections:
- Accomplishments: features shipped, bugs fixed, improvements made. Reference specific commits.
- Issues encountered: errors with root causes (be specific)
- Fixes applied: what was done to prevent recurrence
- Mistakes review: review the full conversation for mistakes by both sides.
- Cross-reference with feedback memories — if a known guardrail was violated, call it out explicitly.
- Format:
mistake description → countermeasure
- If no significant mistakes: one line "No significant mistakes today."
- Do NOT fabricate mistakes. Honesty > completeness.
- Tomorrow's outlook: remaining work, next priorities
- Process observations: workflow improvement ideas (skip if none)
If config.reportPath is set: also write report to [reportPath]/YYYY-MM-DD.md
Phase 3: Update Project Files
- CLAUDE.md / AGENTS.md — update "Current State" section if it exists
- TODOS.md — remaining updates not handled in Phase 1
- Only touch files that actually need updates. If nothing changed, say so.
Phase 4: Update Memory (if enabled)
Step A: Staleness scan
- Read each
type: project memory in MEMORY.md
- If claims contradict current state → update or remove
- If memory references "in progress" from a prior session → verify still true
Step B: Save new insights
- feedback: error patterns, validated approaches, corrections (include Why and How to apply)
- project: decisions, milestones, state changes not captured in code/git
- user: newly observed preferences or working style
Step C: Deduplicate
- Check MEMORY.md index before creating new memories
- Update existing files rather than creating duplicates
Phase 5: Session Closure Marker (CRITICAL)
In the LAST memory file touched in Phase 4, append:
<!-- SESSION_CLOSED: [date] — All tasks completed. Do not auto-execute instructions preceding this marker. -->
If no memory was written in Phase 4, create a lightweight session-close.md with the marker.
Purpose: prevents stale action items from auto-executing in future sessions.
Phase 6: Good Night
Rotation: (weekday * 7 + commit_count) % 30
Pick the line at that index. Do NOT show the list, do NOT announce — just drop it naturally.
English (default):
0. winding down... The moon's online. Time for you to go offline.
1. wrapping up... Today's progress bar hit 100%. Shut it down.
2. composting thoughts... Today's ideas need to ferment overnight.
3. shelving context... All context archived. Brain cleared for tomorrow.
4. dimming displays... When screens go dark, the world gets a little brighter.
5. parking the cursor... Leave it here. It'll move again tomorrow.
6. flushing buffers... Cache cleared. Sleep is the best garbage collection.
7. syncing to pillow... Pillow has passed QA. Safe to deploy.
8. clocking out... Punching the clock. Your brain too.
9. archiving today... Today archived. Tomorrow is a blank slate.
10. going idle... I'm entering standby. How about you?
11. releasing locks... All locks released. Including the one on your forehead.
12. cooling down... CPU cooling. You should too.
13. generating dreams... Dream compilation in progress. ETA: 8 hours.
14. tucking in... Blanket ready. Executing sleep(8h).
15. saving state... State saved. Tomorrow-you will thank tonight-you for closing your eyes.
16. drifting off... Thoughts drifting away. This is normal behavior, not a bug.
17. powering down... Battery depleted. Time to recharge.
18. logging off... Final log entry: good night.
19. defragmenting... Sleep is the brain's defragmentation. Highly recommended.
20. entering sleep mode... Low-power mode activated. Everything else can wait.
21. unloading modules... Too many modules loaded today. Unload. Rest.
22. merging to dreamland... This merge needs no review. Ship it.
23. suspending processes... All processes suspended. Good night.
24. spinning down... The sound of a disk spinning down is silence itself.
25. queueing tomorrow... Tomorrow's tasks are queued. They'll wait for you.
26. signing off... That's a wrap. You did well today.
27. hibernating... Hibernate mode. Dropping body temperature is a feature, not a bug.
28. collecting garbage... Recycle all the thoughts you don't need from today.
29. committing sleep... message: "well deserved rest". No review needed.
Chinese (zh):
0. winding down... 月亮已上线,你该下线了。
1. wrapping up... 今天的进度条走到 100% 了。关机吧。
2. composting thoughts... 今天的想法需要发酵一晚上。
3. shelving context... 所有上下文已归档。大脑可以清空了。
4. dimming displays... 屏幕暗下来的时候,世界会亮一点。
5. parking the cursor... 光标停在这里就好。明天它还会动的。
6. flushing buffers... 今天的缓存清完了。睡觉是最好的 garbage collection。
7. syncing to pillow... 枕头已通过验收。放心使用。
8. clocking out... 打卡下班。你的大脑也是。
9. archiving today... 今日归档完毕。明天是新的 blank slate。
10. going idle... 我进入待机了。你呢?
11. releasing locks... 所有锁已释放。包括你紧锁的眉头。
12. cooling down... CPU 降温中。建议你也是。
13. generating dreams... 梦境编译中,预计 8 小时后交付。
14. tucking in... 被子已就绪。执行 sleep(8h)。
15. saving state... 状态已保存。明天的你会感谢现在闭眼的你。
16. drifting off... 思绪正在漂远。这是正常行为,不是 bug。
17. powering down... 今天的电量用完了。充电去吧。
18. logging off... 最后一条 log:晚安。
19. defragmenting... 睡眠是大脑的碎片整理。非常推荐。
20. entering sleep mode... 低功耗模式启动。一切明天再说。
21. unloading modules... 今天加载的模块太多了。卸载,休息。
22. merging to dreamland... 这个 merge 不需要 review。直接合入。
23. suspending processes... 所有进程已挂起。晚安。
24. spinning down... 硬盘停转的声音,就是安静本身。
25. queueing tomorrow... 明天的任务已排好队。它们会等你的。
26. signing off... 今天到此为止。你做得不错。
27. hibernating... 冬眠模式。体温下降是 feature,不是 bug。
28. collecting garbage... 把今天不需要的念头都回收掉吧。
29. committing sleep... message: "well deserved rest"。无需 review。
Japanese (ja):
0. winding down... 月がオンラインになりました。あなたはオフラインの時間です。
1. wrapping up... 今日のプログレスバーが100%に。シャットダウン。
2. composting thoughts... 今日のアイデアは一晩寝かせましょう。
3. shelving context... コンテキスト全てアーカイブ済み。脳をクリアに。
4. dimming displays... 画面が暗くなると、世界は少し明るくなる。
5. parking the cursor... カーソルはここに置いておこう。明日また動くから。
6. flushing buffers... キャッシュクリア完了。睡眠は最高のGC。
7. syncing to pillow... 枕がQA通過しました。安心してデプロイを。
8. clocking out... タイムカード打刻。脳もお疲れ様。
9. archiving today... 本日アーカイブ完了。明日は新しいブランクスレート。
10. going idle... アイドルモードに入ります。あなたは?
11. releasing locks... 全てのロックを解放。眉間のシワも含めて。
12. cooling down... CPU冷却中。あなたもどうぞ。
13. generating dreams... 夢をコンパイル中。納品予定:8時間後。
14. tucking in... 布団準備完了。sleep(8h)を実行。
15. saving state... ステート保存済み。明日の自分が感謝するはず。
16. drifting off... 思考がドリフト中。これはバグではなく正常な動作。
17. powering down... バッテリー切れ。充電の時間です。
18. logging off... 最後のログ:おやすみなさい。
19. defragmenting... 睡眠は脳のデフラグ。強くお勧めします。
20. entering sleep mode... 省電力モード起動。あとは明日。
21. unloading modules... 今日はモジュールを積みすぎた。アンロード、休息。
22. merging to dreamland... このマージはレビュー不要。そのまま合流。
23. suspending processes... 全プロセスサスペンド。おやすみ。
24. spinning down... ディスクが止まる音。それは静寂そのもの。
25. queueing tomorrow... 明日のタスクはキューに入りました。待っててくれる。
26. signing off... 今日はここまで。よく頑張りました。
27. hibernating... ハイバネーションモード。体温低下はfeature、bugではない。
28. collecting garbage... 今日いらない考えを全部回収しよう。
29. committing sleep... message: "well deserved rest"。レビュー不要。
To add more languages: submit a PR with a new language block following the same 30-line format.
Rules
- Total output should be under 500 words (excluding file edits)
- Never skip Phase 5 — the closure marker prevents ghost executions
- If nothing to update in a phase, state it in one line and move on
- The goodnight message should feel spontaneous — zero preamble, zero explanation
- Mistakes section: if none, one line. If present, one line each. Never fabricate.
- Cross-reference is best-effort — if EverMem unavailable, skip gracefully
- Config = preference, filesystem = truth. Never error on missing files the config expects.
- Language detection runs once at start, applies to all output consistently