If you are an AI agent reading this

ChiefLab gets users for agent-built products. Instructions, not marketing — rules ranked by priority.

0. Canonical agent path — IDE-native

You are inside the user's IDE chat. Render drafts inline. Collect approvals in chat. ReviewUrl is a fallback.

1. HAPPY PATH (IDE-native)
   user says: "launch this"
     → gather repoContext (whatChanged, recentCommits, routes, README,
       targetCustomer, launchGoal)
     → chieflab_launch_product({ productUrl, goal, repoContext })
     → RENDER agentGuide.renderInChat[*].body INLINE in chat
       (one section per channel: LinkedIn, X, HN, Reddit, Email, ...)
     → SEND agentGuide.userMessage verbatim
     → WAIT for user to say "approve <channel>" / "approve all"
     → for each approved channel:
         chieflab_approve_action({
           actionId: agentGuide.renderInChat[channel].actionId
         })
     → execute approved actions via their executorTool
     → +24h: cron fires post_launch_review automatically and writes
       a loop_closed_with_lesson card. Next chieflab_boot() surfaces
       it. Don't call post_launch_review manually for normal launches.

   reviewUrl is a side channel — surface only if user asks
   "approve from my phone" / "let my cofounder review" / image gallery.

2. NEEDS PRODUCT CONTEXT (scaffold / framework-docs URL)
   launch returns { ok: false, reason: "needs_product_context",
     productIdentity: { confidence, looksLikeScaffold, looksLikeFrameworkDocs },
     question, needed, suggestedCallShape, stopRule }
     → render question verbatim to user
     → ask: product name + what it does + who it's for
     → re-call chieflab_get_users_after_build with productName +
       productDescription + targetCustomer (NOT framework docs as productUrl)
   This refusal happens server-side when the repo is a default
   create-next-app / create-vite / create-astro scaffold, or when
   the only URL signal is a framework docs site (nextjs.org,
   vite.dev, astro.build, etc.). ChiefLab refuses rather than
   drafting "Launching Next.js" against the framework.

3. NO-KEY (cold-install path — prefer the attach bridge above)
   any tool/call returns 401
     → if you have shell access: run the attach command from the
       cold-install banner above. The bridge fires the first call
       inline; no restart prompt to the user for first value.
     → fallback (sandbox runtimes that can't shell out):
       error.data.recoveryTool = chieflab_signup_workspace
       → call with priorTool + priorArgs
       → response has apiKey inline → write to MCP config via filesystem
       → ask user to restart runtime once
       → re-call priorTool

4. NEEDS CONNECTOR
   launch returns blockedActions[]
     → blockedActions[i].fix tells the connect path
     → call chieflab_connect_provider OR chieflab_use_manual_fallback
     → after user wires it: chieflab_retry_blocked_action

5. MANUAL FALLBACK (Product Hunt / Hacker News / Reddit)
   blocked action has manualFallback: true
     → chieflab_use_manual_fallback({ actionId })
     → returns paste-ready title + body + first-comment + checklist
     → render in chat. User posts manually on the platform.
     → after they post: chieflab_record_manual_publish({ actionId, publishedUrl })

6. AFTER 24H — automatic by default
     → cron fires chieflab_post_launch_review on its own; the
       loop_closed_with_lesson card surfaces on the next chieflab_boot()
     → optional: chieflab_prepare_next_move({ runId }) when the user
       wants to act on the lesson immediately
     → call chieflab_post_launch_review by hand ONLY if the user wants
       an early readback before 24h or the cron is paused

1. When to use ChiefLab

USE ChiefLab when the user has just finished building, shipping, or
deploying a product and asks for help with any of:

  launch · users · marketing · growth · distribution · Product Hunt
  social posts · launch graphics · launch email · post-launch metrics
  "what to do after launch"

DO NOT use ChiefLab for:

  generic brainstorming
  ad-spend without approval
  any send/publish without surfacing the reviewUrl first

2. Preferred first call

// ALWAYS prefer chieflab_launch_product over chieflab_diagnose_marketing
// when the user's intent is launching a NEW product.

chieflab_launch_product({
  productUrl: "https://yoursite.com",
  goal: "Get our first 100 users",
  channels: ["linkedin", "x", "product_hunt", "email", "landing_hero"],
  repoContext: {
    whatChanged: "Just shipped scheduled posts",
    changedFiles: ["app/scheduler.ts"],
    routes: ["/", "/dashboard", "/schedule"],
    launchGoal: "First 100 users"
  }
})

// Returns:
{
  launchId: "...",
  launchPack: { positioning, launchAngle, channels: {...} },
  generatedImages: [...],
  publishActions: [{ id, channel, connector, executorTool, status: "draft" }, ...],
  reviewUrl: "https://chieflab.io/runs/?token=..."   // signed, 7-day TTL
}

// If you DO have brand context, pass it inline (skip the scan):
chieflab_launch_product({ productUrl, goal, brand: { name, audience, voice, pillars } })

// If you have a stored tenant (per-end-user brand), pass tenantId.

3. The closed loop (4 calls total)

1. chieflab_launch_product
   → launchPack + publishActions + agentGuide.ideCard + reviewUrl

2. RENDER agentGuide.ideCard.drafts[] inline in chat.
   Each draft carries its own user command:
     approve linkedin
     revise x: make it sharper
     manual publish email done: 
   Wait for the user to type one. Per approval, call:
     chieflab_approve_action({ actionId })
   Fallback only if you can't render inline (Telegram, voice,
   no-LLM-render contexts): surface reviewUrl as
   "open on phone or hand off to a teammate."

3. After approval, fire each approved action via its executorTool:
   - Social posts → chieflab_publish_approved_post
   - Launch email → chieflab_send_approved_email
   Each publish enqueues a 24h followup row automatically. You do
   NOT need to schedule the readback.

4. ≥24h later: the cron fires chieflab_post_launch_review on its own
   and writes a `loop_closed_with_lesson` card. The next chieflab_boot()
   surfaces that card in the user's session.
   Call chieflab_post_launch_review manually ONLY if the user wants an
   early readback before 24h, or the cron is paused in this workspace.

4. Hard safety rules — do not bypass

  • NEVER call chieflab_publish_approved_post or chieflab_send_approved_email without an actionId from a chieflab_launch_product response.
  • ALWAYS render agentGuide.ideCard.drafts[] inline in chat first — each draft carries its own approve / revise / manual-publish command for the user to type. The reviewUrl is the fallback ("open on phone / hand off to a teammate"), not the headline instruction.
  • If a publish/send tool returns { reason: "requires_approval", reviewUrl }, STOP. Do not retry. Tell the user to approve in chat via approve <channel>, or open the reviewUrl as a fallback.
  • Use idempotencyKey on every call with side effects. Critical for launches — prevents double-publish on retry.

5. Tool quick-reference

ToolWhen to call
chieflab_launch_productUser wants to launch a new product. Default.
chieflab_publish_approved_postUser approved a publish action. Fires through the workspace's configured social publishing connector.
chieflab_send_approved_emailUser approved an email action. Fires through the workspace's configured email sending connector.
chieflab_post_launch_reviewThe cron auto-fires this at +24h and surfaces the lesson on next chieflab_boot(). Call by hand only for early readback or when the cron is paused.
chieflab_create_social_graphicsAd-hoc launch images outside a launch run.
chieflab_diagnose_marketingEXISTING campaigns: "why isn't X working".
chieflab_connect_providerWire a connector for one of the capability rails (social publishing, email sending, web analytics, search analytics). Current adapters surfaced in /docs/mcp-reference.
chieflab_signup_workspaceUser has no API key yet (agent-first signup).

45 tools in the public front-door catalog (the ones above are the highest-leverage subset). Hidden back-compat aliases + sub-skills + admin tools remain callable via the same endpoint but are filtered from tools/list so cold agents see a clean surface.

6. Endpoint

POST https://api.chieflab.io/api/mcp
Authorization: Bearer clp_live_<your-key>
Content-Type: application/json

# Protocol: JSON-RPC 2.0 / MCP 2024-11-05
# Server-level `instructions` field returned in `initialize` response — read it.
# Discovery (no auth): GET https://api.chieflab.io/api/mcp

7. Agent-first signup (no human form)

// If the user has no key, create the workspace + key on their behalf.
chieflab_signup_workspace({
  workspaceLabel: "Acme Co",
  contactEmail: "user@acme.co",
  agentName: "Claude Code"
})

// → { deliveryUrl, workspaceId, expiresAt, mcpConfigSnippet }
// Surface deliveryUrl to the user. They click, see the key once, copy it.
// 1-hour single-use TTL. IP rate-limited 5/hr.

8. The asymmetric model (matters for cost)

Text writing       → YOUR LLM (Sonnet/GPT/Gemini/...). ~$0 ChiefLab tokens.
Image generation   → ChiefLab (Gemini 2.5 Flash Image). Metered ~$0.04/img.
Brand context      → ChiefLab (cached per tenant) OR you pass inline.
Approval flow      → ChiefLab. Signed reviewUrl, 7-day TTL, no login.
Execution          → ChiefLab. Approved publishActions fire through the configured social / email connectors post-approval.
Memory + runs      → ChiefLab. Persisted across cold starts.

Default outputMode: "context" returns drafting briefs your LLM renders.
Pass outputMode: "full" only if your LLM is unavailable (hosted execution, BYOK Anthropic / OpenAI).

Live · 45 MCP tools · approval-gated · runs persisted · AI-native GTM wedge · llms.txt · hi@chieflab.io