# Loop Engineering from First Principles — Kyle Mistele, HumanLayer

Source: [AI Engineer](https://www.youtube.com/watch?v=xIt_mTQp6mY)  
Feed7 permalink: https://feed7.dev/p/loop-engineering-from-first-principles-kyle-mistele-humanlayer-1nuq7gf  
Published: 2026-07-25T20:41:40.000Z  
Trust: Source Linked (source_linked)

## Why Included

Replace unbounded coding-agent loops with measured, incremental changes: sense code state, choose one bounded task, open a reviewable PR, and pause until a human responds.

## Source Summary

HumanLayer frames coding automation as **sense → control → actuate**: detect a measurable code condition, select a bounded change, and give an agent a skill plus handwritten reference patterns. Their workflow schedules **one incremental PR per day**.

## Practical Implication

Build loops around deterministic scanners, small changes, CI, and human review. Keep **at most one open PR per loop**, then feed reviewer corrections back into the skill before the next run. Increase throughput only after the loop is reliable.

## Agent-Ready Context

HumanLayer frames coding automation as **sense → control → actuate**: detect a measurable code condition, select a bounded change, and give an agent a skill plus handwritten reference patterns. Their workflow schedules **one incremental PR per day**.

Build loops around deterministic scanners, small changes, CI, and human review. Keep **at most one open PR per loop**, then feed reviewer corrections back into the skill before the next run. Increase throughput only after the loop is reliable.

The worked example is an internal RPC migration, not evidence that the pattern fits every engineering task. Even bounded loops can produce duplicate or conflicting work, and batching **three or five procedures** trades reviewability for speed.

## Context Map

- Layer: agent
- Domains: coding
- Topics: harness-engineering, coding-agents, agent-reliability

## Uncertainty

- The worked example is an internal RPC migration, not evidence that the pattern fits every engineering task. Even bounded loops can produce duplicate or conflicting work, and batching **three or five procedures** trades reviewability for speed.

## Agent Instruction

Use this item as source-backed context. Do not invent claims beyond the linked source. If this item conflicts with another source, call out the conflict.
