RAIA™ Specification

2.27 Andrew Ng's Three Loops — How RAIA (Real estate Artificial Intelligence Agent) Implements Them

Andrew Ng says every 0-to-1 product needs three feedback loops on different clocks: a fast inner loop (minutes), a steering loop (hours), and an external loop (days/weeks). RAIA (Real estate Artificial Intelligence Agent) is deliberately designed around all three - the Programmer tightens the inner loop, Eugin's spec queue drives the steering loop, and live client feedback (currently thin) will eventually power the external loop.

← Back to Developer Hub TEXTBOOK SPECIFICATION
In Plain English

Andrew Ng says every 0-to-1 product needs three feedback loops on different clocks: a fast inner loop (minutes), a steering loop (hours), and an external loop (days/weeks). RAIA (Real estate Artificial Intelligence Agent) is deliberately designed around all three - the Programmer tightens the inner loop, Eugin's spec queue drives the steering loop, and live client feedback (currently thin) will eventually power the external loop.

Andrew Ng's framework for 0-to-1 products maps directly onto RAIA's agentic pipeline. This page documents how each loop is implemented, what's working, and where the gaps are in July 2026.

Andrew Ng Three Loops Agentic Pipeline Feedback Loops 0-to-1
3
Feedback loops on different clocks (minutes / hours / weeks)
2
Loops fully active in RAIA (Real estate Artificial Intelligence Agent) today (inner + steering)
1
Loop currently thin — external loop needs live client volume
1h
Kanban dispatch cadence — deterministic, zero-LLM

Section A What Are Andrew Ng's Three Loops?

Andrew Ng (co-founder of Google Brain, Coursera, Landing.AI) describes every successful 0-to-1 AI product as needing three nested feedback loops running at very different speeds. Getting all three right — and not confusing which clock each operates on — is what separates shipping from spinning.

Loop 1 — Inner Loop (Minutes)

Agent writes code → tests → self-corrects → agent fixes → done. This is the automated tightening loop. The human sees only the end result, not the intermediate churn.

Loop 2 — Steering Loop (Hours)

You (Eugin) review output → redirect → new spec queued. This is the human-in-the-loop gate. You don't write code; you steer the agent's direction.

Loop 3 — External Loop (Days / Weeks)

Real users give feedback → priorities shift. This is the market signal. Without live users, this loop is thin and must be manually proxied by Eugin's intuition.

!
The Key Insight

Ng's point is not just that all three loops exist — it's that teams fail by mixing up the clocks. Treating a steering-loop decision (hours) as if it were an inner-loop concern (minutes) causes premature optimisation. Treating an external-loop signal (weeks) as if it were a steering-loop tweak causes over-pivoting on noise.

The Three Loops in RAIA (Real estate Artificial Intelligence Agent) Today (July 2026)

Loop Clock RAIA (Real estate Artificial Intelligence Agent) Implementation Status
Inner Minutes Programmer (Sonnet 4.6) runs tsc / SQL gate, self-corrects; PA verifies output Active
Steering Hours Eugin's evening spec queue + morning review of PA output; escalate to Eugin on blockers only Active
External Days / Weeks Live client feedback on Sovereign Pilot Agency / Beyond360 tenancy workflows Thin — pre-volume
External Loop Status: Currently Thin

Not enough live client feedback yet to drive this loop at speed. Until the client base is larger, Eugin proxies the external loop through market research, competitor watching, and direct agent feedback. This is expected at this stage — do not force the external loop before there is sufficient signal volume.

See Also: The Full-Stack Master Reference

This page (2.27) zooms in on the three feedback loops. For the full-stack view of every component, the PA decision table, the overnight loop, and the developer routing table, see § 2.28 RAIA (Real estate Artificial Intelligence Agent) Agent System Overview.

Mermaid: The Three Loops

flowchart TD
    subgraph Inner["Loop 1: Inner (Minutes)"]
        PA(["PA specifies"]) --> Prog(["Programmer executes"])
        Prog --> Gate{"tsc / SQL gate"}
        Gate -->|"fail"| Prog
        Gate -->|"pass"| PAVerify(["PA verifies"])
    end
    subgraph Steering["Loop 2: Steering (Hours)"]
        Eugin(["Eugin reviews"]) --> SpecQueue(["Spec queue (evening)"])
        SpecQueue --> Inner
        PAVerify -->|"output"| Eugin
    end
    subgraph External["Loop 3: External (Days / Weeks)"]
        Clients(["Live clients"]) -->|"feedback"| Priorities(["Priority shift"])
        Priorities --> Eugin
    end

Section B Eugin's Daily Rhythm

The three loops map directly onto a day-in-the-life operational rhythm for Eugin:

  1. 1
    Evening: Queue specs for the night

    Write or approve kanban tasks for the next overnight run. Specs should be atomic, clear, and include acceptance criteria. The deterministic dispatcher picks them up hourly from cron ea794b0e7fc7.

  2. 2
    Overnight: Dispatcher runs (zero-LLM)

    kanban-dispatch-tick.sh polls the board hourly, silently if nothing to dispatch, Telegram alert if action is taken. No human intervention needed unless something escalates.

  3. 3
    Morning: Review PA output

    PA has verified Programmer output. Eugin reviews the summary. Escalate only on blockers — not on every task. The PA should resolve non-blockers autonomously.

  4. 4
    Repeat: Adjust spec queue based on what shipped

    Update priorities in the kanban board. If the external loop produces a signal (client complaint, competitor move), pull it into the steering loop by queuing a new spec.

How to Trigger Scribe (Documentation)

Trigger Word: "document [topic]"

Say "document [topic]" to PA. PA checks if a docs page for that topic already exists:

  • If the page exists → PA dispatches Scribe to enrich the existing page with new content
  • If the page does not exist → PA dispatches Scribe to create a new page from template

Scribe never touches backend code. Docs-only. The Scribe seat runs Kimi K3 and writes to /root/projects/raia/docs/raw/.

How to Trigger Programmer (Code / SQL)

Trigger: PA writes spec → kanban task with assignee_profile=programmer

PA writes a precise implementation spec → creates a kanban task with assignee_profile=programmer → the deterministic dispatcher picks it up on the next hourly tick → Programmer executes → PA verifies.

  • Never assign directly to "Programmer" by name in informal chat — go through the kanban board for traceability
  • PA must write the spec before dispatching — Programmer should not self-spec
  • PA must verify the output — never skip the verify step

xurl Reminder

!
Posting to X Requires a One-Time Browser Auth

Posting to X (Twitter) via the xurl CLI requires OAuth2 setup to be run in a browser once: xurl auth oauth2 --app raia. This cannot be done from a headless terminal session. On a new VPS or after token expiry, a human must run this command in a browser-accessible environment before any X posting will work.


🔒 Developer-Only Section — Dispatch, Routing & Protocol

Section C Kanban Dispatch Flow

Source of Truth: ADR-271

The dispatch flow and the 3-seat roster documented on this page are governed by ADR-271 — Agent Roster Collapse to 3-Seat Pipeline + Deterministic Kanban Dispatch (Accepted, 2026-07-25). Read the full decision record at 03_technology/architecture/decisions/ADR-271-roster-collapse-deterministic-dispatch.md (commit 2272dc35).

Numbering note: the ADR was briefed as "ADR-267" but numbers 267–270 were already allocated on disk, so 271 was used. Older chat logs may still say ADR-267 — they refer to the same decision.

The dispatch pipeline is deliberately zero-LLM. Board state is read by code, not narrated by a model. This is the deterministic-first doctrine applied to orchestration.

kanban-dispatch-tick.sh
  |
  +-- hermes kanban dispatch --max 2 --json
        |
        +-- [Nothing to dispatch] --> silent exit (no output, no alert)
        |
        +-- [Task dispatched]     --> Telegram alert with task summary
              |
              +-- hermes -p <assignee_profile> "<spec>"
                    |
                    +-- Programmer executes
                    +-- PA verifies output
                    +-- STATE.md section 8 appended
Cron Details
Cron IDea794b0e7fc7
ScheduleHourly (every 60 minutes)
Max dispatches per tick2 (configurable via --max)
Output formatJSON (--json flag)
LLM involvementNone in dispatch path

STATE.md Section 8 Protocol

Every agent session (PA, Programmer, Scribe, Architect, RedTeam) must follow this two-step protocol:

Step 1: Read STATE.md First

Before executing any task, read STATE.md in full. Section 8 contains the chronological session log — it tells you what happened in prior sessions so you don't repeat work or contradict decisions already made.

Step 2: Append to Section 8 Last

After completing the session, append 1-3 lines to STATE.md section 8. Format: date, agent, what was done. Be terse. This is an operational log, not a narrative. Do not edit prior entries.

# Example STATE.md section 8 entry format:
# 2026-07-25 | Scribe | Created andrew-ng-three-loops-raia.html; enriched hermes-agent-profiles.html with ADR-271 section

Profile Routing Table

Profile Slug Model Dispatchable? Role
default (PA) Kimi K3 / DeepSeek V4 Flash Yes Spec, intake, verification gate — the only profile that talks to Eugin
programmer Sonnet 4.6 Yes All code and SQL — executes specs, never self-specs
scribe Kimi K3 Yes Documentation only — docs.estateaigents.com pages and ADRs
architect On-demand On-demand only ADR-class decisions only — no standing queue
redteam On-demand On-demand only Security / ADR-class decisions only — no standing queue

What "Non-Spawnable Assignee" Means

!
Non-Spawnable Assignee in Dispatch Output

If the dispatch output shows non-spawnable assignee for a task, it means the task is assigned to a human name (e.g., "Fook", "Eugin") or a name that doesn't map to a Hermes profile slug. These tasks cannot be auto-dispatched. Two options:

  • Human pickup: The named human must pick up the task manually from the kanban board
  • Re-assign: Edit the task to set assignee_profile to a valid profile slug (programmer, scribe, etc.) and the dispatcher will pick it up on the next tick

This is intentional by design — the dispatcher never guesses who to dispatch to. It requires an explicit, machine-readable profile slug.

!
Debugging Dispatch Issues

If the cron runs but nothing is dispatched when tasks exist: (1) check hermes kanban list to confirm tasks are in ready state, not blocked; (2) confirm assignee_profile is set (not just assignee); (3) check cron ea794b0e7fc7 logs for error output from kanban-dispatch-tick.sh.


Reference: @AnatoliKopadze on Workflow Graphs

External Validation — Workflow Graphs as Agentic Architecture

Post: x.com/AnatoliKopadze/status/2080668775796314331

Anatoli Kopadze's article “Graph Engineering explained: what it is, when to use it and when not to” frames workflow graphs as the natural successor to single-agent loops in agentic systems — nodes (bounded jobs with typed contracts), edges (real data dependencies), fan-out/reduce/synthesize (the “diamond” pattern), and independent verifier nodes on clean contexts. This is the external signal that validated RAIA's dual-graph approach in ADR-270: a knowledge graph (structured world state) running alongside a workflow graph (task execution topology).

“What everyone moved to is not a better loop. It is a graph of loops, a network where cycles watch and correct each other instead of one agent chasing one number alone.” — @AnatoliKopadze

RAIA (Real estate Artificial Intelligence Agent) Connection — ADR-270

This post directly influenced ADR-270's dual-paradigm decision — @kingwilliam_ for knowledge graph, @AnatoliKopadze for workflow graph, implemented in RAIA (Real estate Artificial Intelligence Agent) July 2026.

ADR source: 03_technology/architecture/decisions/ADR-270-completion-verifier-plugin.md

Graph Type Purpose in RAIA External Reference
Knowledge Graph Structured world state — properties, tenancies, entities and their relationships @kingwilliam_ (ADR-270)
Workflow Graph Task execution topology — nodes (agents), edges (data dependencies), fan-out/reduce pattern @AnatoliKopadze

Repository Code

The live codebase implementation for this textbook logic sits within the following repository folder: