Scope Contracts and Task Boundaries

The model does not know where the work ends. A scope contract is a per-task file that says where the work begins, where it ends, and how to roll back if it spills. The contract turns "stay in scope" from a wish into a check.

Build 50 min Python (stdlib)

Prerequisites: Phase 14 · 32 (Minimal Workbench), Phase 14 · 33 (Rules as Constraints)

#Learning Objectives

  • Write a scope contract that an agent reads at task start and a verifier reads at task end.
  • Specify allowed files, forbidden files, acceptance criteria, rollback plan, and approval boundaries.
  • Implement a scope checker that compares a diff against the contract and flags violations.
  • Make scope creep visible, automatic, and reviewable.
Full Access lesson

Keep going. The rest of this lesson is one step away.

Unlock all 503 lessons, video, code, quizzes and every future update. Pay in your own currency with Paystack.

The text and code of this lesson are based on AI Engineering from Scratch by Rohit Ghumare, MIT licensed.