Set Up the Productivity Coach That Reads Your Week Back to You

Set Up the Productivity Coach That Reads Your Week Back to You

Step 2 of 4
You're here
1234

You have bought the Productivity Coach, so the agent is on your account and ready to run.

The Knowledge Work Coach got Claude Code working and let you keep things light: one Mac, no accounts, git kept quietly in the background. This one asks a little more of you. By the end of this guide your day writes itself down when you close a session and, if you want it, each day’s file is backed up to a private GitHub repository on its own.

The Coach’s setup has two halves. This guide is the first: progress tracking, which is required, and a GitHub backup, which is offered and which you can decline. The next one is the second, and it is required: reaching your Mac from your phone or iPad. The agent will tell you plainly if you try to stop before that one is done. It checks what already exists before each part, so anything you already have is a skip, not a reinstall.

About an hour, most of it the agent working while you answer the occasional question.

The problem this solves

You get to Friday knowing you were busy and unable to say what you did.

This is not a memory failure. The record exists — in your commits, in what your agents logged, in files you touched. It is just scattered across places that do not talk to each other, and reconstructing it by hand takes longer than the week deserves.

Meanwhile the more useful question goes unasked: not what did I do, but what kept happening. The thing you started three weeks running and abandoned three times. The work that quietly ate Tuesday. Those show up only when something reads several weeks at once.

That is what you are setting up.

What you are actually building

Two things, and it is worth knowing why each one exists before you start.

Two hooks. One opens every session with yesterday’s progress and your current strategy already in context. The other writes the day’s progress file when a session ends.

A private copy on GitHub, if you want one. Each day’s progress file is committed and pushed on its own. Your record stops living on one disk. The agent offers it once and takes no for an answer.

Before you start

You need the Knowledge Work Coach already set up. This agent reads what that one writes; without it there is no activity log, no hooks and no Homebrew to build on.

A free GitHub account is needed only if you say yes to the backup in Step 3. If you do not have one, the agent waits while you make it.

Then start the agent in your knowledge folder:

/secondbrainos:agent_productivity_claude_code_coach

It asks one question at a time. Let it.


Step 1 — Progress tracking, and what it asks you

The agent checks what already exists and installs only the gaps. If you did the Knowledge Work Coach, most of the base is already there and gets skipped. That is the expected outcome, not a failure.

Three questions worth thinking about before you answer:

Where the progress folder lives. Default is progress-reflections inside your knowledge folder. Fine unless you have a reason otherwise.

Weekly or monthly strategy. Weekly suits work that changes direction often. Monthly suits longer projects where a week is too short to judge anything. You can change it later.

Your shutdown time. Default 11:59pm. This is only used to mark whether the day ran late — nothing enforces it.

Then it builds the folder structure, registers your progress folder as a searchable collection with a watcher that keeps it indexed, and installs two hooks.

What needs your hands: answering those three questions, and approving a brew install if fswatch is missing.


Step 2 — The two hooks, and why they work the way they do

This is the part worth understanding rather than skimming, because it is where “it stopped working” usually comes from.

The reading hook. Every session now opens with yesterday’s progress file and your current strategy already in context. You do not have to remember where you were.

The writing hook. The daily recap fires when a session ends — not at a scheduled time.

That choice is deliberate and it is the opposite of what most tools do:

A nightly job at 11:59pm assumes the machine is awake at 11:59pm. Usually the lid is down. The job does not run, nothing tells you, and you find out weeks later when you go looking for files that were never written.

Session end is a moment that actually happens. You closed the session, so the machine is definitely on.

Two guards make this safe, and both are worth knowing because they protect your credits:

Empty sessions are skipped. Open Claude Code in the wrong folder, close it again — nothing is recapped. Without this, every accidental session would pay for a full run and overwrite a real day’s file with a recap of nothing.

The recap cannot recap itself. The recap runs in its own headless session, which also ends, which would fire the hook again. A guard stops that at depth one. Without it you get an unbounded chain, each link costing credits.

Checkpoint: the agent does a dry run and shows you two files in your progress folder. In .trigger-probe.log you want one start, one skipped (nested), one end. That middle line is the recursion guard working, not an error. In .daily-recap.log you will see backup: committed locally, no remote configured. That is a pass at this point: GitHub is the next step. Then test the empty-session guard yourself: start a session, type nothing, close it. You should see one skipped (empty session) and no new file.


Step 3 — GitHub, a private copy of your folder (your call)

The agent offers this once, and nothing else in the Coach depends on your answer. Recaps, strategy and tasks all work without it.

Reasons to say yes. The Coach’s value piles up in one folder: months of daily files are what the monthly recap reads your patterns from, and a dead disk takes all of it. GitHub keeps the full history somewhere that is not this Mac, receives each day’s file on its own, and lets you commit and push from the iPad.

Reasons to say no. These are your private reflections. A private repository is still a copy on someone else’s computers, and you may simply not want that. If your folder already lives in iCloud, you already have a copy off this Mac. Say “not now” and the agent moves on, commits each day’s file locally, and mentions it again exactly once, after your first monthly recap.

The one case where it stops being optional in practice: a second Mac. See the iCloud note below.

The rest of this step is what happens on a yes.

If you have never heard the word “commit”, that is fine. The agent runs the commands and explains each one in a sentence.

The login. The agent installs the GitHub CLI and logs you in. gh prints a one-time code and opens your browser; you paste the code and approve. That is the only part that needs your hands.

One detail matters more than it sounds. By default, macOS stores that login in the Keychain, and the Keychain cannot be reached from a remote session. The result is a push that works at your desk and fails from the iPad, with an error that makes no sense because “it works on my Mac”. The agent stores the login in a file in your home folder instead, readable only by you, where every session can find it.

The look before the push. The first push sends your whole folder to GitHub, so it gets a check and an explicit yes. The agent looks for files too large for GitHub, anything that looks like a key or a password file, and folders of downloaded dependencies, names what it finds, and asks before ignoring any of it. Then it tells you in two lines what is about to be uploaded.

The repository is private. The agent does not offer the alternative.

What is backed up automatically, exactly: each day’s progress file, when you close a session. That one file, and nothing else. Your notes and everything else you write go to GitHub when you ask the agent to commit them, or do it yourself. The agent never commits your other work behind your back, which is the point: a backup that sweeps up whatever happens to be in the folder is how half-finished drafts and stray files end up in your history.

If old GitHub logins on this Mac fight the new one, the agent has a separate cleanup step for that and will tell you when it is needed. Most people never see it.

iCloud and a second Mac. iCloud is sync, not history. With one Mac that is fine, and it stays fine for reading your notes on the phone. With two Macs it is not: syncing a live git folder between them can corrupt it. If you have, or buy, a second Mac, that is the moment to say yes here, and the second Mac gets its own copy from GitHub instead of sharing the folder.

Checkpoint: the agent shows you the repository’s address, confirms it is private, and confirms the login is stored in a file rather than (keyring).


Step 4 — Hand over to remote access

The agent does not consider itself set up yet, and it will say so. What is left is making the Mac reachable from your second device and, if you connected GitHub, proving the push you just made also works from there. That is a sitting of its own, with its own guide: Set up remote access to your Mac from an iPad Mini.

Stay in the same agent. When you are ready, tell it to continue with remote access.


Troubleshooting

Symptom Cause Fix
No daily file after closing a session Hook not registered, or it timed out Check .trigger-probe.log. A Hook cancelled line means the timeout and async settings are missing. The timeout should be 180 seconds: the recap now also commits and pushes
.trigger-probe.log fills with start lines Recursion guard missing The guard variable is not exported; re-run the setup prompt
Recap written for a session where you typed nothing Empty-session guard not firing The hook payload is not reaching the script; re-run setup
Collection registered but never updates The watcher has no PATH A background agent inherits no shell environment; the setup adds a PATH block for exactly this
backup: committed locally, no remote configured in .daily-recap.log No GitHub remote Normal if you declined GitHub: the day’s file is committed on this Mac and goes nowhere else. If you said yes and still see it, ask the agent to finish GitHub Setup
backup: push failed in .daily-recap.log The login, or the network The day’s file is still committed locally. Ask the agent to check the GitHub login; it never pulls, rebases or forces on its own
The Daily progress — commit never appears git has no name and email Ask the agent to set your git name and email. It does this whether or not you connected GitHub
gh auth status says (keyring) Login is in the macOS Keychain, and will fail from the iPad Ask the agent to move the GitHub login to a file

What you can do now

Close a session and find the day written down and committed without having asked, and on GitHub too if you connected it.

Open the next one and find Claude Code already knows where you were yesterday.

What this does not do

It does not capture notes — that is the Knowledge Work Coach, and this agent will point you there if you ask it to save something.

It does not back up your whole folder every night. With GitHub connected, daily progress files go up on their own and everything else goes up when you commit it. Without it, nothing leaves your Mac.

It does not set up GitHub Actions runners, PR workflows or anything else in the coding direction. Different problem, different product.

What is next

Post 3 in this series finishes the setup: a private tunnel to your Mac, a session that survives the wifi dropping, and the round trip that proves it. Then post 4 is what all of this was for: Todoist, your first daily file, the recaps, the strategy and the week’s tasks.

Ask me anything!