HARNESS ENGINEERING · LESSON 170 OF 278

AI Coding Agent Workflow

Structure an agent-first engineering loop from specification to code, tests, review, pull request, deployment evidence, and rollback.

What you will learn

Structure an agent-first engineering loop from specification to code, tests, review, pull request, deployment evidence, and rollback.

In simple words

A dependable coding workflow asks the agent to inspect the repository, implement a bounded change, run lint/typecheck/tests/build, inspect failures, fix them, and produce a concise change report. Human review focuses on intent and edge cases rather than discovering basic breakage.

Visual explanation: AI Coding Agent Workflow

Trace how Specification becomes Reviewable change through implement + verify.

WATCH THE IDEA

AI Coding Agent Workflow

Playing
SpecificationImplement + verifyReviewable changeTrace the input as it becomes a useful output.
  1. 1Observe: Specification
  2. 2Transformation: Implement + verify
  3. 3Outcome: Reviewable change

Observe: Specification. Trace how Specification becomes Reviewable change through implement + verify.

The diagram highlights Specification, Implement + verify, Reviewable change. Use the labels to trace the main relationship from left to right.

Real-world example: Operational AI decision

A team applies ai coding agent workflow to a real business workflow.

What the team decides: Humans steer; the harness makes execution and verification repeatable.

Risk to avoid: A strong technical concept still needs measurement, safeguards, and ownership in production.

Technical explanation

A dependable coding workflow asks the agent to inspect the repository, implement a bounded change, run lint/typecheck/tests/build, inspect failures, fix them, and produce a concise change report. Human review focuses on intent and edge cases rather than discovering basic breakage.

Python and implementation examples

Use these examples to connect the concept to working code. Package-based examples assume the named library is installed in your own environment.

Represent a verification-first task contract

python
task = {
    "goal": "Add a public lesson route",
    "constraints": [
        "Preserve existing URLs",
        "Do not expose secrets",
    ],
    "verify": [
        "npm run lint",
        "npm run typecheck",
        "npm run test",
        "npm run build",
    ],
    "done_when": "All checks pass and changed files are reported",
}

A strong coding-agent task defines intent, boundaries, verification commands, and completion criteria before implementation starts.

Common misconception

This concept is not a guarantee of a correct outcome by itself. Its value depends on suitable evidence, careful implementation, and evaluation against the real task.

QUICK QUIZ

What should happen before a coding agent declares a repository task complete?

Practical application

Humans steer; the harness makes execution and verification repeatable.

Key takeaway

Humans steer; the harness makes execution and verification repeatable.

Next concept

Continue with From Failure to Harness Improvement.

Engineering view

Humans steer; the harness makes execution and verification repeatable.

Internals view

Structure an agent-first engineering loop from specification to code, tests, review, pull request, deployment evidence, and rollback. A dependable coding workflow asks the agent to inspect the repository, implement a bounded change, run lint/typecheck/tests/build, inspect failures, fix them, and produce a concise change report. Human review focuses on intent and edge cases rather than discovering basic breakage.

Architecture view

Consider the Specification → Implement + verify → Reviewable change flow, and make the system's inputs, checks, and outcomes explicit.

Was this lesson helpful?

Lesson discussion

Comments are reviewed before publication. Keep discussion focused on learning and do not post private information.

Loading discussion…

Your quiz answer and current lesson are saved on this device. Sign in to explore account-backed learning features.

Content version 1 · Last reviewed 2026-10-16