A practical first course in working with your own AI agent. Start small, inspect the result, and ship with intention.
6 lessons24 small stepsYour own agent
LESSON 0430 min · AT YOUR PACE
Build a Real Tool
STEP 2 OF 4
Build the counter
Give the agent a precise contract and inspect the implementation.
Your task
Implement the approved count-tasks.mjs plan using Node.js built-ins. Use the bundled tasks.md fixture in my practice folder. Show the diff and explain how missing input is handled.
MAKE THIS
count-tasks.mjs and a fictional tasks.md fixture.
REVIEW BEFORE YOU ACT
Approve the implementation first. Do not change the fixture or checker to fit the implementation.
✓
How to check it
Run node count-tasks.mjs tasks.md. Require the output to be exactly 2 and the exit code to be 0.