Skip to content
Greenware
Esc
↑↓navigate↵open⌘Jpreview
On this page

Onboarding a client

Add a client, sign it in to its Clay workspace, research the company, adopt its standards, and add the extras that make plays verifiable: decisions, golden records, holdouts and suppression lists.

Onboard a client once; every play for it reads what onboarding wrote. Ask Claude Code to “onboard acme.com”, run gw start, or do it by hand:

gw doctor --fix                          # checks everything; installs the Clay CLI if missing
gw init ~/factory                        # once; gw uses it from any folder afterwards
gw client add acme --domain acme.com
gw client login acme                     # one isolated Clay login per client; pins its workspace
gw client research acme                  # onboard from the domain (a few minutes)
gw client standards acme --accept        # after you've read the proposed standards
gw client status acme                    # what's done, what's missing, the next command

1. Add the client

gw client add acme --domain acme.com

The id (acme) becomes part of paths and Herdr names: lowercase letters, digits and dashes. Options:

  • --name "Acme Corp": display name (defaults to the id).
  • --domain acme.com: the primary web domain research starts from.
  • --workspace-id <id>: pin a Clay workspace id up front. In twin mode --workspace-id ws_demo is all a client needs.
  • --clay-config-home <path>: where this client’s isolated Clay login lives (default clients/<id>/.clay).

2. Sign in to Clay and pin the workspace

gw client login acme

Each client gets its own Clay login in its own CLAY_CONFIG_HOME, so two clients can never share a session. Login opens Clay’s device sign-in (the one link you click), then pins the workspace the login resolves to in client.yaml.

  • Several workspaces signed in? At a terminal you pick one by number. Without one, pass --workspace <id>. If the one you pick isn’t active, the client’s own login is switched to it.
  • Name doesn’t look like the client’s? A workspace whose name contains “personal” or shares no word with the client’s name, id or domain is in doubt. Login warns and asks [y/N]; without a terminal it refuses and tells you to add --yes. A yes is recorded as clayWorkspaceConfirmed: true, so you’re asked once.
  • gw client pin acme re-pins whatever workspace the client’s login now resolves to.

From then on clayx asserts that workspace on every non-read Clay call. A mismatch stops the call.

3. Research the company and its workspace

gw client research acme

This does the onboarding a GTM engineer would do on day one, in a few minutes:

  1. The engine reads the client’s Clay workspace (read-only): the Knowledge Hub business context, connected integrations, existing workflows and their graphs, budgets, saved audiences, record counts and field ids. That last part lands in workspace.json.
  2. One research agent with web access but no shell and no Clay access reads those facts, studies the company’s site, customers, pricing, competitors and news, and checks everything against the factory’s playbooks.
  3. The function shortlist: the engine reads every Clay function in the workspace; one files-only agent writes functions.md, naming which to reuse for which job (account resolution, employment checks, eligibility, enrollment), which to test first, which to avoid, and the gaps no function covers. The engine checks that every function is placed and no id is invented. Skip it with --skip-functions.

It writes:

  • clients/acme/CLAUDE.md: company, ICP, personas, systems, suppression rules, existing workflows agents must not touch, budget and sources. Every inference is marked (confirm). A CLAUDE.md you’ve edited is never overwritten; the result goes to CLAUDE.proposed.md for you to diff.
  • clients/acme/research/brief.md: positioning, a critique of the ICP against the evidence, ranked buying signals, competitors, 3–5 recommended plays (each with a paste-ready gw idea line), and kickoff questions with defaults.
  • clients/acme/functions.md: the shortlist. Plans must include a ## Function reuse table, and an id the catalog doesn’t have fails the Plan stage.
  • clients/acme/standards.proposed.json: the standards research proposes.

Options: --domain <company.com> if the client was added without one, --model <m> to pick the research model.

Refresh pieces later:

gw client refresh acme      # re-read workspace facts into workspace.json
gw client functions acme    # rewrite the function shortlist (--force rewrites it even when the catalog is unchanged)

4. Adopt the client’s standards

Standards are always-on rules every plan for this client must map: who counts as a customer, which companies and people never to reach, the default persona and ICP. The core keys are customer.definition, reach.company.exclude, reach.person.exclude, persona.default and icp.company.default.

gw client standards acme             # what's in force
gw client standards acme --accept    # adopt what research proposed (read it first)

Set or change one yourself. Each change makes a new version:

gw client standard acme customer.definition \
  --rule "A company with a Closed Won opportunity in the last 24 months" \
  --impl "Salesforce Opportunity.StageName = 'Closed Won'" \
  --golden "companies:123=excluded as customer;companies:456=kept"

--golden adds golden records: real records every play must handle right, as <entity>:<record id>=<expected> pairs separated by ;. Plans map each standard in ## Standards, and the contract needs an assertion tagged std:<key> that runs its golden records.

5. Optional extras

gw client status marks these optional, but each one makes plays better.

Decisions

Settled choices every stage should know: the sequencer, read-backs, a budget, the alert channel.

gw client decide acme outreach.sequencer "instantly" --note "AEs already use it"
gw client decisions acme
outreach.sequencer	instantly	(AEs already use it)	you 2026-11-28

The latest value per key wins. Every stage reads decisions.md; the history is in decisions.jsonl. Clarify also records your answers as precedent in answers.md, so the next play doesn’t ask again.

Holdouts for Verify

Labeled records Verify scores the build against, and that no other stage can read. Your CRM sync already lives in Clay Audiences, so save the cut as an audience and export it:

gw clay audiences create --entity-type companies --name "[GREENWARE] Closed-won: last 12 months" --filter won.json
gw client gold acme closed_won_12m --audience <audience-id>    # → clients/acme/gold/closed_won_12m.jsonl

On a plan without Audiences, export from your CRM instead:

gw client gold acme closed_won_12m --csv closed-won.csv

The export drops email and phone fields unless you pass --keep-contact. --limit <n> caps the records (default 1,000, at most 10,000). Plays name the holdout they need in their spec.

Suppression lists

On a workspace without Audiences, suppression lists come from the factory: see Workspaces without Audiences.

Check readiness

gw client status acme

An onboarded client with only the optional extras left looks like this:

✓ Client added with its domain: acme.com
✓ Clay login, workspace pinned: workspace ws_7f3 (Acme)
✓ Client context (CLAUDE.md): written
✓ Research brief (recommended plays, kickoff questions) (optional): 0 days old
✓ Workspace facts (audiences, record counts, field ids): 0 days old
✓ Function shortlist (which house functions to reuse): 0 days old
✓ Client standards (always-on rules: customers, who to exclude, personas, ICP): 5 set
✗ Golden test records (real companies every play must handle right) (optional): none for customer.definition, reach.company.exclude
    next: gw client standard acme customer.definition --rule "…" --golden "companies:<record id>=excluded as customer"
✗ Decisions (sequencer, read-backs, budget, alert channel) (optional): none
    next: gw client decide acme outreach.sequencer "<tool>"
✗ Holdouts for backtests (Verify only) (optional): none
    next: gw client gold acme <name> --audience <audience id>

acme is ready for plays: gw idea acme "<raw ask>"

✓ is done, ~ is waiting on you (a proposal to review, a workspace to confirm, facts older than 14 days), ✗ is missing. Each open item names the command that fixes it. A client is ready when every required item is ✓. Then run a play.

What lives where

CLAUDE.md is yours: Greenware writes it once at onboarding, then only proposes changes. Engine state has its own homes, all copied into every stage’s context:

File What Written by
clients/<id>/workspace.json saved audiences, record counts, field ids and types gw client refresh (also run by onboarding)
clients/<id>/resources.json everything Greenware created in the workspace (audiences, fields, workflows), with the play and stage clayx, at the moment Clay confirms it
clients/<id>/decisions.md decisions in force gw client decide; history in decisions.jsonl
clients/<id>/standards.json standards in force, versioned gw client standard, gw client standards --accept
plays/<client>/<play>/prereqs.json → setup.json the fields, audiences and records a play needs; created by the engine when you approve Gate A, with ids in the signed setup.json Plan, then the engine

MCP servers for research

Agents load your Claude Code MCP servers, but in dontAsk mode a tool only runs if factory.yaml allows it. The default is Firecrawl:

agents:
  mcpAllow: [mcp__firecrawl]     # add read-only research servers here; leave out ones that send or write

Only stages in agents.mcpStages (default: Research) get these tools, and never a stage that can build, spend or publish in Clay. See the security model.

Was this page helpful?