L39 FINAL PROJECT - BRIEF C
A bounded agent that files invoices
AI use: AI allowed — keep a record. Your specification, your bounds, your
stopping conditions and your evaluation set are your own work, written
before you ask an assistant for any code.

SITUATION
Halden Bike Workshop (invented) is two mechanics and a part-time
bookkeeper, Rosa. Every invoice the workshop writes is saved as a PDF in
one folder called inbox. At the end of each month Rosa moves each invoice
into a folder for the month it was written, named like filed/2026-04,
because the accountant asks for "all of April" at a time.

Rosa names each invoice with the date she wrote it and the customer, for
example invoice_03-04-2026_Kerr.pdf for an invoice written on 3 April
2026 for a customer called Kerr. Other files sometimes land in the inbox
too, like photos of damaged parts.

WHAT ROSA WANTS
An agent that does the monthly filing for her. She has heard that agents
can "just do things" and she is nervous. She says: "The accountant has
the filed folders already. If one of those invoices is lost or replaced,
we have a real problem with our books. I would rather it leave something
in the inbox for me than guess."

YOUR JOB
Build the agent as a loop (Lesson 29): observe the inbox, decide what to
do with one file, act through a tool, record the step, repeat. The decide
step is a plain rule in your code, standing in for a model (Lesson 31).
The agent works only on a sandbox your program builds in memory from
L39_C_inbox.txt. It never touches real files on your computer.
This is the first time you write the world, the tools and the loop
yourself. For the shape, read run_loop and check_bounds in Lesson 31's
L31_agentkit.py: a loop that asks the decider for one action, checks it
against the bounds, runs it and logs it.

You decide, in writing and before building:
- which tools the agent gets and exactly what each can reach (Lesson 30);
- its stopping conditions, including a step limit (Lesson 31);
- what it does when it is not sure.

WHAT YOU PRODUCE (details in the L39 lesson)
1. A specification with bounds, stopping conditions and acceptance
   criteria, checked against the self-approval checklist before you build.
2. An implementation: the sandbox, the tools, the loop.
3. An evaluation set: test cases written from your criteria before you
   read any generated code, including cases you expect to fail.
4. A verification record: a full step log of one run on the supplied
   inbox, each step marked correct or not, the first incorrect step of
   any failed run, and what you changed.
5. An AI-use record.
