tech#github-copilot#loop-engineering#human-in-the-loop#coding-agent#development-workflow

Combining Human-in-the-loop and Loop Engineering in Memolog's AI Development

Published 👁
Combining Human-in-the-loop and Loop Engineering in Memolog's AI Development

When developing Memolog, I do not start by defining a detailed specification and completion criteria, then ask GitHub Copilot (Copilot) to implement them exactly.

Instead, I begin with a conversation: “This feature might be useful,” or “I want to make this experience a little better.” I ask Copilot to create something that feels about 80% of the way there, then I try it myself. If it feels wrong, I ask for changes. If it differs from what I imagined but works better, I adopt it.

I used to think of this entire process as Loop Engineering. But when I compared it with Addy Osmani’s explanation of Loop Engineering and the Japanese article “From Introduction to Practice: Loop Engineering,” I realized that I had conflated the conversational loop between people and AI with the system that lets AI operate autonomously.

This article reframes Memolog’s approach as a double loop: an outer Human-in-the-loop discovery loop and an inner Loop Engineering implementation and validation loop.

Table of Contents

Key Takeaways

Memolog’s development process does not rely on just one kind of loop.

This is the basic flow at Memolog:

People and AI discuss a loosely defined idea

AI turns it into something about 80% of the way there

Review it and try it firsthand

A person decides whether to adopt, revise, or set it aside

AI repeats implementation and validation until it reaches the adopted goal

A person reviews and releases it, then feeds observations into the next improvement

I do not lock down every completion criterion at the outset. I define non-negotiables such as security, data protection, and preserving existing functionality in advance. For the UI, copy, interaction design, and presentation, I leave room to decide after seeing a prototype.

In this model, Human-in-the-loop and Loop Engineering are not competing approaches. People define the purpose and retain responsibility, while AI autonomously performs verifiable work inside those boundaries.

Distinguishing the Three Terms

For this discussion, I distinguish Human-in-the-loop, Human-on-the-loop, and Loop Engineering as follows. I am not claiming that they share a single universal standard; this is simply a framework for describing how I work at Memolog.

TermHuman InvolvementExample at Memolog
Human-in-the-loopPeople participate during the workflow by providing input, evaluating results, and granting approvalTry a prototype, then decide whether to adopt, revise, or set it aside
Human-on-the-loopPeople supervise autonomous AI execution and intervene when necessaryMonitor automated checks and CI results, then stop the process when an exception occurs
Loop EngineeringRather than giving step-by-step instructions, people design a system in which AI discovers, executes, validates, and retries in pursuit of a goalRun tests after implementation, fix the cause of a failure, and run the tests again

I do not describe Memolog’s overall development process as Human-on-the-loop because I am not merely a supervisor who intervenes only when something goes wrong. I participate in the loop by examining prototypes, changing my mind, putting my preferences into words, and deciding what to build next. During the inner implementation loop, however, I supervise the results without issuing step-by-step instructions, which is closer to Human-on-the-loop.

The official Microsoft Agent Framework documentation also uses Human-in-the-loop to describe a pattern in which an agent requests human approval before taking an action, then proceeds after the person approves or rejects it.

Addy Osmani describes Loop Engineering as moving away from prompting an agent step by step and instead designing the system that runs the agent. After receiving a goal, AI iterates until it meets the completion criteria.

Under that definition, repeatedly conversing with Copilot is not Loop Engineering by itself. At Memolog, I treat conversational exploration as Human-in-the-loop and the autonomous implementation and validation system within it as Loop Engineering.

Memolog’s Double Loop

Two nested loops: a person and AI discover the right answer in an outer loop, while AI autonomously implements, validates, and retries in an inner loopOuter: Human-in-the-loopA person and AI discover what to build and how to judge itPerson expresses intentAI creates a prototypePerson evaluates itInner: Loop EngineeringThe system implements and validates until it reaches the adopted goalImplementRun automated checksFix and retryPerson reviews and releasesTwo nested loops: a person and AI discover the right answer in an outer loop, while AI autonomously implements, validates, and retries in an inner loopOuter: Human-in-the-loop
A person and AI discover what to build and how to judge it
Person expresses intentAI creates a prototypePerson evaluates itInner: Loop Engineering
The system implements and validates until it reaches the adopted goal
ImplementRun automated checksFix and retryPerson reviews and releases
At Memolog, a person and AI discover the right answer in the outer loop, while implementation and validation iterate toward the adopted answer in the inner loop

Different participants drive the outer and inner loops.

LoopWho Drives ItGoalStop Condition
Outer discovery loopPeople and AIDiscover what to build and how to evaluate itA person decides whether to adopt, revise, or set it aside
Inner implementation loopAI and automated checksImplement the adopted goalCompletion criteria such as tests are met, or a stop condition is reached

Human preferences and a sense that something feels off matter in the outer loop. Machine-observable conditions such as builds, tests, lint, Playwright, and API responses matter in the inner loop.

The goal is not to automate everything. It is to explore work with people while the right answer is still unknown, then hand repeatable work to AI and automated systems once the answer has been chosen.

Discovering the Answer Outside, Converging on It Inside

The Outer Discovery Loop

This loop runs while I am still figuring out what I want.

Conversation → Prototype → Try it → Articulate what feels off and what I prefer → Prototype again

Success is not measured only by how closely the result matches my initial request. “This is different from what I expected, but it is better” is also a successful outcome. The result gives me something concrete that can reshape my thinking.

This is Human-in-the-loop. I am not there only to approve the final result. I use the deliverable to think and decide what direction to take next.

The Inner Implementation and Validation Loop

Once the outer loop establishes a direction, Copilot handles implementation and validation.

Implement → Test → Read the cause of the failure → Fix → Retest

I do not need to provide a new instruction after every test failure. AI reads the result, identifies the cause, fixes it, and runs the test again. I also define observable stop conditions in advance, such as all checks passing, reaching a retry limit, or repeating the same failure.

This is Loop Engineering at Memolog. Rather than locking down everything while I am still exploring, I keep discovery flexible in the outer loop, then harden only the necessary parts in the inner loop after I adopt a direction.

Why I Do Not Define 100% Up Front

I am not good at writing detailed completion criteria before implementation, and seeing a working result often changes my mind.

That is why I am comfortable starting with something that is about 80% of the way there.

This does not mean leaving everything vague. I divide conditions into two groups.

TypeWhat I Decide in Advance
Non-negotiable conditionsSecurity, prevention of data destruction, preservation of existing functionality, cost limits, and approval to release
Exploratory conditionsUI, copy, interaction design, presentation, and fine-grained specifications

For example, it is difficult to define a “natural and easy-to-use modal” precisely before building one. It is still possible to verify that the modal opens and closes, renders correctly on mobile, and lets someone continue interacting with the page after closing it.

I first have Copilot build something that works, then try it myself and describe my preferences or points of friction. Once I adopt an interaction, I preserve it in a Playwright test. That gives me room to explore without giving up regression protection.

Six Loops at Memolog

Looking back at how I work, I see several connected loops in Memolog.

LoopPositionPurposeExample at Memolog
DiscoveryOuterDiscover what I wantChoose the direction of a UI or article through conversation and prototypes
ImplementationInnerTurn an idea into something that worksCopilot updates code, configuration, or an article
ValidationInnerConfirm that nothing brokeCheck builds, Playwright tests, APIs, and structured data
QualityOuter and innerImprove what I have adoptedReview diffs, check mobile layouts, and obtain an independent English review
DeliveryInner loop to human judgmentMove the result into productionUse GitHub Actions, deploy to Azure, and verify the production site
OperationsBack to the next outer loopLearn after releaseUse Application Insights, GitHub Issues, and actual usage to guide improvements

These loops do not always move in one direction. A problem found during validation sends the work back to implementation. A new idea prompted by the production site sends it back to discovery.

In an earlier article, “How GitHub Copilot and I Divided the Work of Building Memolog,” I described how Copilot and I went back and forth through research, design, implementation, testing, production verification, and recordkeeping. This double-loop model reframes that division of responsibilities by identifying where people participate and where AI operates autonomously.

Why One-on-One Is My Default

One-on-one work and Loop Engineering are not in conflict. I use one-on-one conversations for the outer discovery loop, then let Copilot run only the inner loop autonomously after we settle on a goal. Loop Engineering does not require multiple AI agents, either. What matters is not the number of agents but whether the system lets AI iterate until it meets the completion criteria.

Memolog is a relatively small repository maintained by one person. My usual workflow is a one-on-one conversation with a single Copilot session.

In a small repository, otherwise separate tasks often converge on the same page, shared component, or workflow. Running multiple agents in parallel creates integration work: transferring context, resolving conflicting decisions, comparing diffs, filtering duplicate changes, and coordinating merge order. At Memolog, that cost often outweighs the benefit of parallel execution, which is another reason I default to one-on-one work.

I use an independent subagent for English translation because I cannot confidently judge its quality on my own.

The author and main Copilot create the Japanese article, an independent subagent reviews the English version, the main Copilot applies the findings, and the author decides whether to publishAuthor + main Copilot
Create the Japanese intent and article
Independent subagent
Review natural English and JA / EN meaning
Main Copilot
Apply findings against the Japanese intent
Author
Make the final publishing decision
The author and main Copilot create the Japanese article, an independent subagent reviews the English version, the main Copilot applies the findings, and the author decides whether to publishAuthor + main Copilot
Create the Japanese intent and article
Independent subagent
Review natural English and JA / EN meaning
Main Copilot
Apply findings against the Japanese intent
Author
Make the final publishing decision
Work one-on-one by default and add a subagent only when translation needs an independent perspective

Reviews of English drafts have also highlighted six points that help preserve my voice while reducing translation-like phrasing.

These are review perspectives, not mechanical replacement rules. The goal is to preserve my claims and voice while giving the prose a structure that English readers can follow more easily.

I explain this workflow in more detail in “How Memolog Translates Japanese into Natural English.”

Most work stays one-on-one between me and Copilot. I add a subagent only when I need an independent perspective. The subagent is not the final decision-maker; its role is to provide input that would be difficult to obtain from me and the main Copilot session alone.

Blog Writing Has Loops Too

Human-in-the-loop exploration is not limited to code. I did not begin this article with the entire structure already decided.

I started by discussing how I work with AI in chat and working through a series of questions and answers. That process helped me put the following ideas into words.

Article writing also divides into outer and inner loops.

PositionLoopWhat Happens
OuterDiscoveryUse questions and answers to surface experiences, emotions, and claims
OuterStructurePropose headings and an order, then add, remove, or rearrange them
OuterDraftingRead the draft and revise passages that do not sound like me or need more emphasis
InnerFact-checkingVerify dates, product names, links, and the actual implementation
OuterReader reviewCheck whether a first-time reader can follow the context and conclusion
Inner loop to human judgmentPublicationVerify the build, Japanese and English versions, rendering, links, and metadata

I do not begin with a finished answer in my head and ask AI to transcribe it. Dialogue and drafts also help me discover what I want to say.

Setting Observable Checkpoints

Checkpoints serve different purposes in the outer and inner loops. In the outer loop, I ask, What does a person need to see to make the next decision? In the inner loop, I decide, What conditions tell AI to continue iterating, and what conditions tell it to stop?

When I start a task, Copilot and I consider four questions together.

  1. What can I inspect along the way to correct the direction?
  2. If something breaks, what signal will reveal it?
  3. Which parts can automated checks verify repeatedly?
  4. Which parts should I try myself and judge at the end?

I often use checkpoints like these at Memolog.

TimingWhat I ObserveHow I Check It
After a prototypeUI, prose, structure, and interaction feelI inspect it and try it firsthand
After implementationBuilds, tests, lint, Playwright, and API responsesAutomated checks run, and Copilot reads the results
During reviewDiffs, regressions, security, and natural EnglishCopilot and I review the work; an independent subagent reviews the English
After deploymentGitHub Actions, the production URL, and representative interactionsCopilot checks the status, and I also try the production site
During operationsTelemetry, Issues, and friction during actual useCopilot and I review the automatically collected information

Here, automated checks include builds, tests, lint, Playwright, CI, telemetry, and other systems that return a result without requiring a person to repeat the same steps every time.

An independent subagent serves a different purpose. At Memolog, subagents mainly edit and review English translations whose naturalness I cannot assess confidently. Their feedback informs my decision; I decide whether to apply it and publish the article.

Observations in the outer loop do not produce only a pass or fail.

Each outcome is a useful checkpoint because it determines the next action.

Boundaries That Keep the Loops Safe

Faster iteration does not mean giving AI every decision and permission. I keep the following boundaries at Memolog.

An Issue is not only a place to lock down a complete specification at the beginning. It also records what I tried, where my thinking changed, and what I verified before adopting a result.

Loop Engineering autonomy does not mean allowing the system to run without limits. It is essential to design where the system stops automatically and where it hands control back to a person.

Summary

Memolog’s AI development process uses a double loop: Human-in-the-loop and Loop Engineering.

Even when I cannot define the right answer in advance, Human-in-the-loop lets me discover it by examining deliverables. Once I decide on the answer, Loop Engineering lets AI iterate on implementation and validation.

People do not need to perform every step themselves, nor should AI be entrusted with everything. People own the answer and the responsibility; AI owns the iterations that move the work toward that answer. That is the double-loop model that fits Memolog today.