HyperAIHyperAI

Command Palette

Search for a command to run...

루프 엔지니어링: 에이전트에 프롬프트를 설계하기 위한 앤스로피의プレイ북

Peter Steinberger Boris Cherny Addy Osmani

초록

지난 2년 동안 ‘XX 엔지니어링’이라는 용어들이 모델 출시의 속도를 따라잡으며 지속적으로 등장해 왔다. 이번 고찰에서는 가장 최신의 개념인 루프 엔지니어링(Loop Engineering)을 다룬다. 이 용어는 2026년 6월 피터 슈타인버거(Peter Steinberger), 보리스 체니(Boris Cherny), 에디 오스마니(Addy Osmani)에 의해 독립적으로 등장했으며, 오스마니가 이를 글로 정립하였다. 프롬프트(Prompt), 컨텍스트(Context), 허니(Harness) 엔지니어링이 실무자가 작업을 더 잘 수행하는 방법을 가르친다면, 루프 엔지니어링은 오히려 실무자가 작업을 직접 수행하는 자리에서 벗어나게 한다.본고에서는 먼저 해당 용어를 정의하고, 허니를 기반으로 한 제4의 레이어로 위치짓는다. 또한 단일 루프 턴(turn)을 발견(Discovery), 인계(Handoff), 검증(Verification), 지속성(Persistence), 스케줄링(Scheduling)이라는 다섯 가지 단계로 분해하고, 이를 실현하는 여섯 가지 구성 요소로 분석한다. 특히 생성기(Generator)와 평가기(Evaluator)의 분리(separation)에 주목한다. 경험적으로 자출력 자체를 채점하도록 요청받은 에이전트(Agent)는 자신의_outputs_을 과도하게 칭찬하는 경향이 있으며, 생성기가 자신의 작업을 비판적으로 검토하게 만드는 것보다 독립적인 회의적인 평가기를 튜닝하는 것이 훨씬 다루기 쉽다.실제로 작동하는 세 가지 루프 사례를 조사한다. 이에는 한 엔지니어의 아침 긴급 분류 작업부터 스트라이프(Stripe)의 기업 규모 파이프라인에 이르기까지 다양하며, 이 파이프라인은 매주 1,300건이 넘는 머신 작성 풀 리퀘스트(Pull Request)를 병합한다. 또한 검증 부채(verification debt), 이해도 저하(comprehension rot), 인지적 양보(cognitive surrender), 토큰 과다 사용(token blowout)이라는 네 가지 비용이 어떻게 조용히 누적되는지를 katalogize한다. 마지막으로 첫 번째 루프를 구축하기 위한 구체적인 레시피를 제시한다. 본고의 핵심 주장은 다음과 같다. 루프는 생성(genration) 비용을 거의 제로에 가깝게 만드는 대신, 판단(judgment)을 희소 자원으로 남긴다. 동일한 구조의 루프라도 두 사람이 구축하면 전혀 상반된 결과를 낳을 수 있다.

One-sentence Summary

In this note, Peter Steinberger, Boris Cherny, and Addy Osmani introduce Loop Engineering as a fourth layer above harness engineering that removes practitioners from performing work by designing self-prompting agent loops, decomposing each turn into discovery, handoff, verification, persistence, and scheduling, crucially separating generator from evaluator because agents grading their own output tend to self-praise, and surveying real-world loops from a personal morning triage to Stripe’s pipeline merging over 1,300 machine-written pull requests per week, demonstrating that loops make generation nearly free while judgment becomes the scarce resource and the same loop can produce opposite outcomes in different hands.

Key Contributions

  • The note defines loop engineering as a fourth layer above harness engineering, decomposing a single loop turn into five moves (discovery, handoff, verification, persistence, scheduling) and six constituent parts.
  • It introduces a generator/evaluator separation, empirically showing that agents overpraise their own outputs and that an independently tuned skeptical evaluator is far more tractable than making a generator self-critical.
  • The note surveys three real-world loops, catalogs four hidden costs (verification debt, comprehension rot, cognitive surrender, token blowout), provides a concrete build recipe, and establishes that loops make generation nearly free, concentrating engineering value into judgment as the scarce resource.

Introduction

The authors examine a new paradigm called Loop Engineering, which shifts the practitioner from directly prompting AI coding agents to designing autonomous systems that prompt themselves. This matters because earlier approaches—prompt, context, and harness engineering—all kept a human in the loop, limiting scalability and requiring constant attention. The key limitation of prior work is that the human must act as the clock and decision-maker, unable to step away. The authors’ main contribution is a formal definition of loop engineering, a decomposition of a loop’s turn into five moves (discovery, handoff, verification, persistence, and scheduling), and an emphasis on the generator/evaluator split to maintain judgment while automating generation.

Method

Theauthors propose a hierarchical framework for engineering AI agents, culminating in a self-running loop architecture. This framework stacks four distinct layers, each expanding the scope of concern. As shown in the figure below, the stack progresses from Prompt Engineering at the base, through Context and Harness Engineering, to Loop Engineering at the top.

Prompt Engineering manages the wording for a single exchange. Context Engineering curates the model's field of view. Harness Engineering equips a single run with tools and actions. Loop Engineering automates the entire process, allowing the system to wake on a schedule, spawn sub-agents, and feed its own output back as input for subsequent rounds.

A functional loop executes a concrete cycle of five moves rather than spinning idly. As illustrated in the diagram below, these moves form a continuous turn that feeds the next iteration.

First, Discovery identifies work worth doing, such as reading CI failures, allowing the agent to find its own tasks. Second, Handoff moves the task to an isolated environment, like a git worktree, to prevent collisions during parallel execution. Third, Verification checks the result, serving as the critical mechanism to reject poor output. Fourth, Persistence saves state to disk so the loop survives context window clearing. Finally, Scheduling triggers the next turn automatically.

To enable these moves, the architecture relies on six structural parts. Automations trigger the loop based on time or events. Worktrees provide isolation for parallel agents. Skills store permanent project knowledge to reduce intent debt. Connectors link the loop to external tools via protocols like MCP. Sub-agents split the writer from the judge. Memory ensures state persists across days outside the conversation window.

The most critical architectural decision involves the verification module. The authors note that agents tend to praise their own work, leading to a nodding loop where errors accumulate. To solve this, the framework leverages a Maker-Checker principle. As shown in the figure below, the architecture structurally splits the agent into a Generator and an Evaluator.

The Generator writes the code. The Evaluator, often a different model instructed to assume the code is broken, reviews it. Crucially, the Evaluator acts by running tests or inspecting the DOM rather than just reading code.

The stop condition is managed by a fresh model checking if a specific goal is met. The code snippet below demonstrates this logic, where a small fast model checks the condition after each turn.

For large-scale reliability, the authors describe the Stripe Minions pipeline. This architecture interleaves deterministic gates with probabilistic LLM steps. As depicted in the pipeline diagram, the process begins with a human trigger, followed by a deterministic orchestrator assembling context.

The LLM agent writes code, but a hard-coded gate runs immediately after; the agent cannot skip this step. If the lint fails, the agent fixes it. Finally, a hard-coded step commits the code, followed by human review. This structure ensures reliability comes from the quality of constraints rather than just model size.

Experiment

The evaluation contrasts local loop/desktop scheduled tasks with cloud routines and GitHub Actions schedule triggers for running background work while the user sleeps. Local scheduling demands that the machine remain powered on but enables frequent execution and direct access to local files, whereas cloud scheduling runs untethered from local state at the cost of a one-hour minimum interval and a clean clone each time. The comparison shows that no single scheduler meets all requirements, and it warns that widely circulated secondhand metrics should be treated as rough references, highlighting the greater reliability of firsthand sources.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp
루프 엔지니어링: 에이전트에 프롬프트를 설계하기 위한 앤스로피의プレイ북 | 문서 | HyperAI초신경