2 build prompts · 4 checks · run them in order and your second brain gains its first automation
Every prompt from the closing demo lives here, consolidated and cleaned up. Each one says what it is for and what your repo should look like when it lands. Open a terminal in your second brain repo, type claude, and paste them in order. Rephrasing in your own words works just as well; both roads end at the same repo. If a result does not match, ask Claude what it did differently, fix that step, and keep going.
This is the loop's instruction file, and every guardrail from the chapter is in the wording: a checkable finish line (the incoming folder is empty), a log of every action, and a no guessing rule that routes undateable notes to a needs-review folder for a human. Automations earn trust with what they refuse to do alone.
i want mondays to run themselves. create an automation task called weekly-filing: take any notes sitting in the incoming folder, rename them to our date naming, move them into the research folder, and add one line for each to the summary index. it must stop when the incoming folder is empty, log every action to an automation log, and if it can't work out a note's date, move that note to a needs-review folder and flag it instead of guessing
What you should see: A task file spelling out the filing steps, the stop condition, the logging, and the needs-review escape hatch, plus an incoming folder ready to receive notes.
Headless mode (claude -p) runs the task with nobody watching, so the turn cap is the second guardrail: even a completely confused run stops at 20 turns. The schedule makes it Monday's problem instead of yours.
now write the small script the computer can run on a schedule: it should start claude in headless mode with that task and a hard cap of 20 turns
schedule that script for monday mornings at 7
What you should see: A small script that launches claude -p pointed at the task file with the 20 turn cap, and a scheduled entry for Monday at 7. Ask Claude to show you the schedule entry so you know where it lives.
Run these from a terminal in your repo, since you are testing the script the schedule will run, and read the automation log after every one. The log is the run's story.
Real input, full run, and the log tells you everything it did.
put two or three test notes in the incoming folder, then run the automation script and show me the log
What you should see: The notes leave incoming/, reappear in research/ wearing date names, the summary index gains one line each, and the log narrates every move. The incoming folder ends empty, which is the finish line being reached.
Monday will often arrive with nothing waiting. A loop that ends cleanly when there is no work is a loop you can leave alone.
run the automation again right now, with nothing waiting, and show me what it logged
What you should see: A short log entry saying nothing was waiting, then a clean stop. No invented work, no wandering.
The no guessing rule gets its test. The right answer is an escalation to you, never a guess.
drop a note with no date into the incoming folder, then run the automation
What you should see: The note lands in needs-review and the log flags it for a human. Your research folder never receives a guessed date.
More work than the cap allows, on purpose, so you can watch the ceiling hold.
put five notes in incoming, lower the cap to 2 turns just for this one run, and run it
What you should see: The run stops mid job at the cap, and the log shows exactly how far it got. An unfinished run you can read beats a runaway you cannot stop, and the next scheduled run picks up the rest.
Back to the Module 05 lesson, or straight to the quiz.