---
title: "Greenware"
description: "From raw idea to verified Clay workflow. An open-source, local-first factory for GTM engineers."
sidebar:
  label: Overview
---

You drop in a raw ask, the way a client said it on a call:

```bash
gw idea acme "lookalikes off last 45 days of closed-won, routed to AEs in Salesforce"
```

Agents take it the rest of the way, the way a software factory works, except the output is a **Clay Workflow** instead of code. They break the idea down, ask you only what blocks the plan, research the workspace, write a spec and a pass/fail contract, and plan the graph and its credit cost. You approve. They build it through the official `clay` CLI, verify it independently on real records and holdouts, and audit it. You approve again. It publishes (never launching sequences) and writes the client deliverables.

```txt
Decompose → Clarify → Research → Spec + Contract → Plan
   ◆ Gate A: you approve the spec, the pass/fail contract, the plan and the budget
Build (official clay CLI) → Verify (an independent agent, on real records and holdouts) → Audit
   ◆ Gate B: you approve going live for one exact snapshot
Publish (never launches sequences) → Document
```

You make the decisions: answers to a play's questions, and the two approvals. Everything else is the agents' job.

**[Install and first run](/install)**

One command, then a one-minute demo on a simulated Clay. No account, no cost.

**[Concepts](/concepts)**

Factory, client, play, stages, gates, contract, twin, runners and the maestro.

**[Onboard a client](/guides/onboarding)**

Sign in to the client's Clay workspace, research the company, adopt its standards.

**[Run a play](/guides/running-plays)**

From a raw ask through both gates to a published, documented workflow.

## Why it works

- **Asks only what blocks the plan.** Clarify answers what it can from your client context and the Clay workspace. It asks you at most 5 questions, each with a recommended default you can accept with one key.
- **Agents propose, the engine verifies.** Deterministic code checks every stage's output. After Build, the engine validates the graph, enforces read-back after every node edit, and records the exact snapshot under review.
- **The verifier is independent.** It never sees the builder's reasoning, and only it can read your holdout ("gold") data. A failed check sends the play back to Build with a fix list, up to 3 loops. Anything it couldn't verify is shown to you at Gate B.
- **Safe by construction.** Every Clay call goes through `clayx`: permissions per stage, one client per login per workspace, a hard credit budget per play, a ledger of every call, and publish only with a Gate B approval of the current snapshot. See the [security model](/reference/security).
- **Herdr-native.** Each play is a tab and each stage is a live Claude Code pane you can watch or take over. See [Herdr](/guides/herdr).
- **Twin mode.** A stateful digital twin of the Clay Workflows CLI lets you run the whole pipeline with no Clay account and no credits. See [twin](/concepts#twin).

## What you need

- macOS or Linux.
- [Claude Code](https://code.claude.com), signed in. The agents run on it, under your own login.
- A Clay account for real workspaces. Twin mode needs none.
- [Herdr](https://herdr.dev) is optional and gives each play its own tab.

:::note[Status]
Early. Everything here runs end to end on the twin, and with real Claude Code agents in Herdr. Live Clay builds need your Clay CLI sign-in; `gw doctor` tells you what's missing.
:::

## How it's built

- **Engine** (`src/core/`): file-based. A play is a folder holding `state.json`, `events.jsonl` and its artifacts. Stage outputs are validated by code, never by an LLM.
- **Runners** (`src/runner/`): `headless` runs `claude -p`, `herdr` runs interactive panes, `scripted` replays recorded fixtures for tests and demos.
- **`clayx`** (`src/clay/`): classifies every command against Clay's real command tree, enforces stage permissions, budgets and the workspace check, and keeps the ledger. It contains the twin.
- **Knowledge** (`knowledge/synthesis/`): what the agents read: how Clay Workflows work, practitioner patterns, 16 workflow blueprints and the factory method.

The source is on [GitHub](https://github.com/orchidautomation/greenware), MIT licensed.
