The Initializer Agent: init.sh, a Progress File and the First Commit
The first minute of an unattended run decides how efficient the next several hours are. Today initialization becomes a phase of its own: a script that gets the environment running, a progress file written for whoever comes next, and a clean initial commit, so that any fresh window is productive within three minutes.
Today's Goals
- Can name the three artifacts the initialization phase must produce, and explain which failure mode each one kills
- Can explain why initialization is a separate phase instead of something the main loop does on its first pass, and name two concrete problems that follow from mixing them
- Can judge whether a workspace is good enough against a checkable standard: can any fresh window get it running and know where the work stands, inside three minutes
D2 moved progress out of the context window. Today moves a second kind of knowledge that the window boundary erases just as thoroughly: knowledge about the environment. When you finish, scroll back up and tick off the three goals.
Plain-Language Walkthrough
A new hire's first day: where the docs are, how to run it, where the last person left off
Think back to your first day at a company. Suppose nobody prepared anything for you, so you have to work out three things by yourself: where the code is, how to get it running, and where the last person left off.
On a good day those three things cost you half a day. On a bad day, when the README is two years old, the start command lives in somebody's chat history, and the last person has already left the company, they cost you two days.
Now change one thing about the scene: every new hire stays for three hours, and then the next one walks in.
That is the real shape of an unattended run. Eight hours overnight at one hour per context window is eight separate first days. If each new hire burns half an hour finding their footing, half your compute for the night went into working out the same thing over and over, and every time the answer came out identical.
The industry solved this a long time ago, in the ordinary world: an onboarding doc, one command that actually runs, and a handover note. Today's job is to make the harness produce all three before any work starts.
Interview questions
Before letting an agent develop a project unattended overnight, what do you have it do first?让一个 Agent 无人值守地开发一个项目,开工前你会先让它做哪几件事?
Common in ChinaCommon overseasIntermediate#initialization#failure-modes#long-horizon🔒 Unlock this chapter to see the answer keys.
What belongs in a progress file, and how does a human-readable log differ from a summary written for the next window?进度文件应该写什么?写成给人看的日志和给下一个窗口看的摘要有什么区别?
Common in ChinaCommon overseasIntermediate#progress-file#state-management#long-horizon🔒 Unlock this chapter to see the answer keys.
Why make initialization its own phase instead of letting the first pass of the main loop handle it?为什么初始化要独立成一个阶段,而不是让主循环第一轮顺手做掉?
Common in ChinaCommon overseasDeep dive#architecture#initialization#failure-handling🔒 Unlock this chapter to see the answer keys.
How do you judge whether a workspace is friendly enough for a newly arrived agent? Give an executable test.怎么判断一个工作区对新来的 Agent 足够友好?给一个可执行的检验方法。
Common in ChinaCommon overseasDeep dive#acceptance-criteria#verification#developer-experience🔒 Unlock this chapter to see the answer keys.
