> ## Documentation Index
> Fetch the complete documentation index at: https://greenteagentic.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Built with Devin & Windsurf

> How Green Teagentic was architected using Cognition's Devin and the Windsurf agentic IDE — a behind-the-curtain look at the dual-agent workflow that shipped the matcha-dark workspace.

## The two-agent build pipeline

Green Teagentic was not written by a single human at a single keyboard. It was *brewed* — assembled through a tightly coupled pair of autonomous coding agents operating in a planner / executor split, with a human acting as taste-tester and merge gatekeeper.

The stack:

* **[Windsurf](https://windsurf.com/)** — the local agentic IDE, home of **Cascade** (the in-editor agent that reads the repo, edits files, and runs the dev loop) and **Tab** (the flow-state autocomplete that handles imports, refactors, and dependency stitching with a single keystroke).
* **[Devin](https://devin.ai/)** — Cognition's autonomous cloud engineer. Devin spins up its own VM, clones the repo, runs tests, opens PRs, and works asynchronously while the local IDE stays free. It is the same agent that Nubank used to refactor a multi-million-line ETL monolith with a reported **8–12× engineering efficiency gain** and **\~20× cost savings**.

In Windsurf 2.0, the two are fused: Cascade plans, Devin executes in the cloud, and the diff lands back in the local worktree without a context switch. Green Teagentic was built end-to-end on top of that handoff.

## The workflow we actually used

<Steps>
  <Step title="Steep — intent capture in Cascade">
    Every feature began as a natural-language brief inside Windsurf's Cascade panel. Cascade's deep codebase index resolved the brief against the existing TanStack Start route tree, the Lovable Cloud schema, and the `brew` pipeline primitives — producing a structured plan (files to touch, server functions to add, RLS policies to author) *before* a single line was written.
  </Step>

  <Step title="Pour — local execution via Cascade + Tab">
    For surface-level work — UI polish, component variants, design-token refactors against `src/styles.css`, route additions — Cascade edited in-place and Tab handled the long tail of import wiring. The matcha-dark theme, the `panel` glass treatment, and the terminal-style typography were all tuned in this tight inner loop.
  </Step>

  <Step title="Delegate — async heavy lifting to Devin">
    Anything that touched more than \~5 files, required long-running test cycles, or involved schema migrations was handed off to Devin with one click from Cascade. Devin booted a fresh sandbox, ran `bun install`, executed the migration plan against a scratch Supabase branch, ran the full Vitest suite, and opened a PR with a written rationale.

    This is where the *agentic* aspects of the product itself were built: the multi-stage brew pipeline, the MCP server surface, the recipe replay engine, and the Cellar's vector recall — all shipped as Devin PRs.
  </Step>

  <Step title="Critique — agent-on-agent review">
    Every Devin PR was first reviewed by Cascade locally (running a structured `critique-brew` against the diff) before a human ever opened it. Cascade flagged token drift, missing RLS grants, and untyped server-fn inputs against the project's own rule set. Only PRs that survived the agentic critique reached the human reviewer.
  </Step>

  <Step title="Pour back — merge, invalidate, redeploy">
    Merged PRs triggered a redeploy to the Lovable Cloud edge runtime. Cascade's awareness of the new commit propagated automatically, so the next planning turn began with a fresh index — no manual re-ingest, no stale embeddings.
  </Step>
</Steps>

## Why two agents instead of one

A single agent — even a strong one — collapses under the cognitive load of holding *plan*, *edit*, *test*, and *review* in the same context window. The split mirrors a senior/junior pairing:

| Concern                   | Owner               | Why                                                                                |
| ------------------------- | ------------------- | ---------------------------------------------------------------------------------- |
| Codebase intent & taste   | **Cascade** (local) | Real-time awareness of the developer's cursor, open files, and last-typed thought. |
| Long-horizon execution    | **Devin** (cloud)   | Owns its own machine, can run for hours, parallelizable across many tasks.         |
| Inline flow & boilerplate | **Windsurf Tab**    | Sub-second autocomplete that closes the gap between thought and keystroke.         |
| Final human judgment      | The brewer          | Merges, tastes, ships.                                                             |

The result is a workflow where the human is never the bottleneck on *typing* and never the bottleneck on *waiting*. Plans flow into Cascade, executions fan out to Devin, critiques flow back, and the matcha keeps steeping.

## What this means for the product

The same dual-agent pattern that *built* Green Teagentic is the pattern the app itself exposes to its users. A **brew** is a Devin-style long-running delegation; a **recipe** is a Cascade-style reusable plan; the **Cellar** is the shared memory both agents read from. We did not retrofit the metaphor — we lived it for the entire build, and then shipped the parts that worked.

<Card title="Try the workflow yourself" icon="mug-hot" href="/guides/your-first-brew">
  Start a brew and watch the planner / executor split run inside Green Teagentic. The same shape that built the app powers every pour.
</Card>
