Skip to content
Agent Field Notes
Course contentsExpand a topic to choose a lesson.

SYSTEMATIC LEARNING / FOUR-LEVEL COURSE

Task contracts and independent acceptance checks

Make the execution environment, permissions, status, evidence and completion judgment of the model into a project contract.

Learning objectives: A harness turns goals into executable boundaries and verifiable artifacts. The model may change the solution, but cannot manufacture success by changing permissions or acceptance criteria. Recovery rebuilds the working view from facts rather than treating a progress summary as authoritative system state.

Content checked: 2026-10-30 · Each level has independent explanations, tasks and inspections

Choose a starting point based on your familiarity with this topic. Current level: Design · Explain the trade-offs. After completing the task, continue to the next level. Reading and self-checks alone do not establish mastery.

On this level

Review the prerequisites

Suitable for: Backend developers learning Agent applications.

Task contracts and independent acceptance checks
A harness turns goals into executable boundaries and verifiable artifacts. The model may change the solution, but cannot manufacture success by changing permissions or acceptance criteria. Recovery rebuilds the working view from facts rather than treating a progress summary as authoritative system state.

How does the mechanism work?

Step-by-step explanation
  1. How to prevent the Agent from modifying the acceptance criteria to pass itself?

    When the model controls the candidate implementation, check again whether it also controls the grader.

  2. A constraint is lost after context compression. How to find out the details at runtime?

    Summarization is lossy and hard limits cannot rely solely on model memory.

  3. What should I do if the recovery record is inconsistent with the current repository version?

    Persisted state may lag behind the actual environment, so reconcile facts before resuming.

Design · Explain the trade-offs

Design integration and release boundaries

Objectives of this level: Define ledger adapter authenticity and business-quality evaluation ownership.

Visual guide · Facts outrank a pass flag

Facts outrank a pass flag

The checker binds terminal state, tenant/task receipts and cost. Fixture labels are trusted inputs here; real receipt provenance needs an independent authority. Select the figure to open it at full size.

Assemble a production contract around the checker

Assign owners explicitly: the product owns goal/acceptance version; the identity service owns tenant and permission state; the business service owns effects and receipts; the harness owns execution, budgets and reconciliation; the evaluator owns the verdict and its evidence. Model output cannot supply these authorities.

On restart, recover durable events and reconcile external operations before building the next model context. On policy change, retain the old acceptance version for explaining historical runs and define how unfinished work is revalidated. An added test may detect an existing requirement; a new business requirement changes the contract and must not silently invalidate already committed effects.

Record a release tuple: application/source revision, model snapshot, harness/prompt version, tool schema, evidence policy and acceptance version. Compare old/new configurations on the same frozen tasks, including refused and unknown outcomes. A hosted harness may manage context and tool orchestration, while the application still owns business authorization and deduplication.

Continue with runtime architecture for session/harness/execution separation and production integration for an actual SDK/local-HTTP/telemetry route. The present checker proves a narrow local contract; the integration course states which additional boundaries it actually executes.

Continue the same implementation

Use the complete function contract and reproduction commands in the implementation layer. Public cases remain in cases/harness-contract.json inside the existing extended-agent-practice-v1.zip. These are local fixtures, not remote-model or production-load measurements.

code example

Design integration and release boundaries

Assemble a production contract around the checker

Assign owners explicitly: the product owns goal/acceptance version; the identity service owns tenant and permission state; the business service owns effects and receipts; the harness owns execution, budgets and reconciliation; the evaluator owns the verdict and its evidence. Model output cannot supply these authorities.

On restart, recover durable events and reconcile external operations before building the next model context. On policy change, retain the old acceptance version for explaining historical runs and define how unfinished work is revalidated. An added test may detect an existing requirement; a new business requirement changes the contract and must not silently invalidate already committed effects.

Record a release tuple: application/source revision, model snapshot, harness/prompt version, tool schema, evidence policy and acceptance version. Compare old/new configurations on the same frozen tasks, including refused and unknown outcomes. A hosted harness may manage context and tool orchestration, while the application still owns business authorization and deduplication.

Continue with runtime architecture for session/harness/execution separation and production integration for an actual SDK/local-HTTP/telemetry route. The present checker proves a narrow local contract; the integration course states which additional boundaries it actually executes.

Acceptance task for this level

Change the stated condition, predict the branch before running, and write a300-word ADR distinguishing implemented local behavior, missing integration proof and the owner of each production invariant.

Acceptance self-checks

Reading this browser’s record…

Hide the answer and check your understanding

Does the receipt valid flag prove authenticity here?

Further explanations and practice

When encountering unfamiliar principles, first read the implementation, continuous questioning and migration cases, and then independently explain the premise and boundaries. Answers and notes are saved to the original account record.

All linked explanations and exercises (1 )

Sources and verification scope

The principles are based on public information; the numbers, cases and tasks are the teaching design of this website. Offline experiments verify the range noted on this page, and the learning effect still needs to be judged through independent tasks and feedback.