# Loop Engineering by Rafael Mendiola

> A code-first presentation by Rafael Mendiola, co-founder and product engineer at okthink.ai, about building reliable software with autonomous agents through perception, memory, evaluation, evidence, and explicit stop rules.

Loop Engineering follows a real migration of a complex production application from Vite to Expo while preserving behavior, appearance, test identifiers, and the product contract. The central argument is that repeatedly prompting an agent supplies momentum, but it does not supply judgment. Reliable loops need an environment that helps the agent perceive the product, remember prior work, evaluate evidence, and stop only when the result is trustworthy.

## Narrative

The presentation begins with Ralph loops, OpenClaw, and the skepticism surrounding long-running coding agents. It then shows why one-shot migration attempts and increasingly elaborate plans produced false finish lines: routes rendered and controls existed, but the resulting product was still wrong.

The successful process gave the agent a read-only reference product, an implementation target, a durable work ledger, executable parity checks, and explicit completion rules. Each lap could discover the next obstacle, retain what earlier laps learned, and replace subjective claims with stronger evidence. As the agent takes on more implementation work, the engineer moves up a level by designing guardrails, evaluators, evidence systems, and the conditions in which autonomous work can be trusted.

## Speaker and company

Rafael Mendiola is the co-founder and product engineer at [okthink.ai](https://okthink.ai/), which he is building with co-founder Margaret Pieczkowski. He is a product engineer and conference speaker working across AI, product design, React Native, and cross-platform software. This presentation documents work performed with Firehose, okthink.ai's agent manager. Rafael's canonical profile is [raf.dev](https://raf.dev/), and his contact links are available at [raf.dev/connect](https://raf.dev/connect/).

## Using the presentation

- [Open the interactive deck](https://loop-engineering.raf.dev/): Navigate with the arrow keys and use the footer for fullscreen presenting or export.
- [Open the export view](https://loop-engineering.raf.dev/export?presentation=loop-engineering): Render the deck in its print-oriented layout.
- [Read the agent index](https://loop-engineering.raf.dev/llms.txt): Find the canonical machine-readable resources for this site.
- [Inspect the OpenAPI contract](https://loop-engineering.raf.dev/openapi.json): Discover the public document endpoints and their response formats.
- [Inspect the sitemap](https://loop-engineering.raf.dev/sitemap.xml): Find the indexable human-facing pages.

Speaker notes, annotations, theme editing, slide inspection, and the developer drawer are authoring tools. They are available during local development and are not included in the public production presentation.
