Plan: Purge Notion from all of Forge (decommission -> CreatorTrack/LifeOS)¶
URL: https://mkdocs.justinsforge.com/memory/plans/notion-decommission-2026-07-02/
Directive (Justin, 2026-07-02): "purge Notion from all of forge." Everything the bots/pipelines read or write in Notion moves to CreatorTrack (the pinned justin workspace, id 67). Aligns with [[feedback_suite_clean_slate_rebuild]] (build fresh on lifeos, don't drag history).
Guiding decision: clean-slate, migrate only definitions¶
Per the clean-slate preference: do NOT migrate Notion history (habit logs, old food entries, past tasks). Migrate only the small set of definitions that make the bot usable day-1: active habit defs (names/icons/goals/aliases) and any active goals. Everything else starts fresh in CreatorTrack. If Justin later wants history, that's a separate opt-in export.
Notion footprint (what has to move)¶
~30 scripts. Grouped by subsystem:
- Bot brains (forge_telegram_inbox_brain.py 118 refs, forge_telegram_brain.py): read tools query_notion, search_notion, habits_checkin, tasks_form/habits_form/today_form, food_today, workout reads; NOTION_DBS; _notion_api. Writes already cut over to spine.
- Checklist/forms forge_telegram_checklist.py, forge_tasks_checklist_app.py (read+write Notion tasks/habits).
- Habits pipeline forge_habits_instantiate.py (04:00 cron pre-creates Notion day rows), forge_habits_streaks.py, forge_habits_callbacks.py, forge_habits_alias_backfill.py.
- Time tracking forge_time_blocks_tools.py, forge_time_daily_aggregator.py, forge_time_blocks_provision.py, forge_time_categories.py.
- Wellness/fitness forge_wellness_daily_summary.py, forge_fitness_weekly_retro.py, forge_workout_recovery_stamp.py, forge_morning_report.py, forge_orient.py.
- Hevy forge_hevy_health.py, forge_hevy_poll.py, forge_hevy_backfill.py, forge_hevy_notion_setup.py (Hevy->Notion mirror; CreatorTrack Fitness already reads the wellness-PG pipeline, so the Notion mirror is redundant).
- Food forge_food_log.py (already spine-first via the bot; the script still Notion).
- Client + infra forge_notion_api.py, forge_n8n.py notion-* verbs, n8n notion-create-page/notion-query-database/notion-update-page workflows.
Phases (each = a commit boundary; ordered so the bot is never left blind)¶
Phase 1 - Migrate definitions (unblocks daily use). Read active habit defs from Notion (names, icons, cadence, goal qty/unit, aliases) and recreate them in CreatorTrack habits (create_habit + goal fields). One-shot script forge_notion_to_creatortrack_habits.py, idempotent on name. Verify the bot's load_active_habits_block now lists the real habits and log_habit matches them. THIS is the piece that makes habit logging work end-to-end.
Phase 2 - Repoint bot READ tools to CreatorTrack. habits_checkin, food_today, food_summary, today_form, tasks_form, habits_form, and the goals/tasks reads: swap the n8n("notion-query-database", ...) bodies for the documented ctk_ reads (/api/apps/habits, /api/apps/meals, /api/tasks, /api/apps/goals). Retire query_notion/search_notion (or repoint to a CreatorTrack search). Delete the hardcoded Notion habit examples. Verify each tool on prod.
Phase 3 - Repoint pipelines/crons. Habits instantiate (04:00) -> CreatorTrack rows (or delete: CreatorTrack habits don't need pre-created rows, upsert_log creates on write). Time-blocks, wellness summary, fitness retro, morning report, orient: point their reads/writes at CreatorTrack. Decommission the Hevy->Notion mirror (Fitness already reads wellness-PG). Each cron validated on one run.
Phase 4 - Kill the Notion client + n8n workflows. Remove NOTION_DBS, _notion_api, forge_notion_api.py, the notion-* n8n verbs, and any Notion creds from ~/.forge-secrets. Grep must return zero live Notion refs (archive/comments OK). Retire the Notion API integration hub entry.
Phase 5 - Docs/memory sweep. Update MEMORY.md + reference files that name Notion as a live surface (habits, food log, tasks checklist, wellness, time-tracking, second-brain-stack) to CreatorTrack. Mark Notion decommissioned in [[project_second_brain_stack]].
Risks / watch-items¶
- Don't cut a read before its data + write path exist in CreatorTrack (Phase 1 before Phase 2). Otherwise the bot goes blind mid-day.
- Owner-gated reads (meals/fitness/goals) need the ctk_ owner token, already minted (
creatortrack-bot.env). - Rollback per surface: keep each repoint a small commit;
WORKSPACE_WRITE_TARGET=notionstill reverts writes if a phase misbehaves, until Phase 4 removes the Notion path entirely. - n8n: some non-bot automations may hit the same
notion-*verbs; grep n8n before deleting the workflows.
Already done (this session, the write half)¶
Pinned justin workspace + all apps; ctk_ token; /api/capture with task/habit/inbox/note/meal/goal verbs; WORKSPACE_WRITE_TARGET=postgres on all capture bots; food/knowledge/goal writes on CreatorTrack; habit-context loader reads CreatorTrack. See [[reference_creatortrack_bot_api]] + lifeos-bots-creatortrack-capstone-2026-07-02.
[Claude Code]