{"id":"c962cbb0-5602-4976-bf18-bf625d0de3e8","entityType":"agent","slug":"clawhub-cargo-ai-cargo-context","name":"cargo-context","canonicalUrl":"https://www.xpersona.co/agent/clawhub-cargo-ai-cargo-context","canonicalPath":"/agent/clawhub-cargo-ai-cargo-context","generatedAt":"2026-10-10T17:34:50.581Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":null},"description":"Read and write the workspace GTM knowledge base — the git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals — plus its runtime sandbox and typed knowledge graph. Triggers: \"document our ICP\", \"write up this persona\", \"what is our positioning\", \"add a battlecard\", \"capture this objection\", \"what do we know about <segment>\", \"update our context\", \"what is in the context repo\", \"who do we sell to\". Skip when: discovering who actually buys from you by analyzing won/lost data — that is cargo-gtm (this skill writes the conclusion down, it does not derive it); storing structured records rather than prose — use cargo-storage; attaching documents to an agent for RAG — use cargo-content.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s178dcd9wkfn0a2fqrygmt3jzn87j9e1:cargo-context","sourceUrl":"https://clawhub.ai/cargo-ai/cargo-context","homepage":"https://clawhub.ai/cargo-ai/skills/cargo-context","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/cargo-ai/cargo-context","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/cargo-ai/skills/cargo-context","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":63,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"cargo-context technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":null},"stars":null,"forks":null,"downloads":1390,"packageName":null,"latestVersion":"1.3.0","tractionLabel":"1.4K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T14:19:58.602Z","lastCrawledAt":"2026-10-10T14:19:58.602Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T14:19:58.602Z","lastVerifiedAt":null,"highlights":[{"version":"1.3.0","createdAt":"2026-09-02T23:41:14.742Z","changelog":"cargo-context v1.3.0 - Updated documentation and examples in SKILL.md and related files. - Removed deprecated skill-card.md file. - Refreshed lifecycle and bootstrap example guides. - No changes to runtime behavior or API; documentation and sample improvements only.","fileCount":11,"zipByteSize":31629},{"version":"1.2.2","createdAt":"2026-08-27T23:43:39.208Z","changelog":"cargo-context v1.2.2 - Updated skill summary and description to clearly define use cases, triggers, and when to use alternative skills. - Improved SKILL.md with a simplified \"Bootstrap\" section outlining setup and sign-in for new users. - Clarified prerequisites and added reference to the full CLI setup bundle. - Enhanced guidance on when and how to use cargo-context versus related skills. - Removed redundant documentation (skill-card.md) for better maintainability.","fileCount":11,"zipByteSize":31627},{"version":"1.2.1","createdAt":"2026-08-11T21:44:03.630Z","changelog":"cargo-context 1.2.1 - Added skill-metadata.json for improved metadata handling. - Updated login prerequisites: users can now sign in using `cargo-ai login --email` (emailed code), `--oauth`, or API token, reflecting changes in authentication options. - Removed obsolete skill-card.md file. - Minor documentation improvements and prerequisite clarifications in SKILL.md.","fileCount":11,"zipByteSize":31059},{"version":"1.2.0","createdAt":"2026-06-12T06:20:17.858Z","changelog":"cargo-context 1.2.0 - Now requires all `.md`/`.mdx` files to begin with YAML frontmatter, including `title` and `description`, for correct graph indexing. - Clarifies that frontmatter is not validated at write-time; malformed or missing fields can still result in poorly indexed nodes. - Documents additional write failure modes such as `repositoryNotFound`, `syncConflict`, `syncFailed`, `failedToWrite`, and `deniedPath`. - Updates and expands documentation for write/edit operations and their error handling. - Removes outdated file: `skill-card.md`.","fileCount":10,"zipByteSize":30545},{"version":"1.1.0","createdAt":"2026-06-08T07:44:04.842Z","changelog":"cargo-context 1.1.0 - Added support for exposing workspace content file uploads (e.g., PDFs, CSVs, other text) as read-only files under a new `.files/` directory within the runtime sandbox. - Clarified that content files in `.files/` are never pushed to the context repo and must be managed via `cargo-ai content file` commands. - Updated documentation to reflect the above changes, including correct references to `cargo-ai content file upload`. - Removed obsolete skill-card.md file.","fileCount":10,"zipByteSize":26366},{"version":"1.0.1","createdAt":"2026-05-28T22:13:11.458Z","changelog":"- Updated dependency installation to use \"@cargo-ai/cli@latest\" in SKILL.md. - Simplified and centralized prerequisites section by linking to a shared prerequisites document. - Removed redundant step-by-step install and login instructions from SKILL.md. - No changes to commands, usage, or functionality.","fileCount":10,"zipByteSize":26321},{"version":"1.0.0","createdAt":"2026-05-28T19:28:20.284Z","changelog":"Initial release of cargo-context. - Introduces a Cargo CLI skill for inspecting and editing a workspace's git-backed context repository and runtime sandbox. - Supports browsing, reading, writing, and editing markdown/MDX files, as well as running commands in the context sandbox. - Provides access to the context-derived knowledge graph for workspace insights. - Requires @cargo-ai/cli and Cargo account to use. - Includes clear usage references, prerequisites, and safety recommendations for editing and executing commands.","fileCount":10,"zipByteSize":26096}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s178dcd9wkfn0a2fqrygmt3jzn87j9e1:cargo-context","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s178dcd9wkfn0a2fqrygmt3jzn87j9e1:cargo-context` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/cargo-ai/cargo-context before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T17:34:50.578Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-cargo-ai-cargo-context/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":null},"readme":"Skill: cargo-context\n\nOwner: cargo-ai\n\nSummary: Read and write the workspace GTM knowledge base — the git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals — plus its runtime sandbox and typed knowledge graph. Triggers: \"document our ICP\", \"write up this persona\", \"what is our positioning\", \"add a battlecard\", \"capture this objection\", \"what do we know about <segment>\", \"update our context\", \"what is in the context repo\", \"who do we sell to\". Skip when: discovering who actually buys from you by analyzing won/lost data — that is cargo-gtm (this skill writes the conclusion down, it does not derive it); storing structured records rather than prose — use cargo-storage; attaching documents to an agent for RAG — use cargo-content.\n\nTags: latest:1.3.0\n\nVersion history:\n\nv1.3.0 | 2026-09-02T23:41:14.742Z | auto\n\ncargo-context v1.3.0\n\n- Updated documentation and examples in SKILL.md and related files.\n- Removed deprecated skill-card.md file.\n- Refreshed lifecycle and bootstrap example guides.\n- No changes to runtime behavior or API; documentation and sample improvements only.\n\nv1.2.2 | 2026-08-27T23:43:39.208Z | auto\n\ncargo-context v1.2.2\n\n- Updated skill summary and description to clearly define use cases, triggers, and when to use alternative skills.\n- Improved SKILL.md with a simplified \"Bootstrap\" section outlining setup and sign-in for new users.\n- Clarified prerequisites and added reference to the full CLI setup bundle.\n- Enhanced guidance on when and how to use cargo-context versus related skills.\n- Removed redundant documentation (skill-card.md) for better maintainability.\n\nv1.2.1 | 2026-08-11T21:44:03.630Z | auto\n\ncargo-context 1.2.1\n\n- Added skill-metadata.json for improved metadata handling.\n- Updated login prerequisites: users can now sign in using `cargo-ai login --email` (emailed code), `--oauth`, or API token, reflecting changes in authentication options.\n- Removed obsolete skill-card.md file.\n- Minor documentation improvements and prerequisite clarifications in SKILL.md.\n\nv1.2.0 | 2026-06-12T06:20:17.858Z | auto\n\ncargo-context 1.2.0\n\n- Now requires all `.md`/`.mdx` files to begin with YAML frontmatter, including `title` and `description`, for correct graph indexing.\n- Clarifies that frontmatter is not validated at write-time; malformed or missing fields can still result in poorly indexed nodes.\n- Documents additional write failure modes such as `repositoryNotFound`, `syncConflict`, `syncFailed`, `failedToWrite`, and `deniedPath`.\n- Updates and expands documentation for write/edit operations and their error handling.\n- Removes outdated file: `skill-card.md`.\n\nv1.1.0 | 2026-06-08T07:44:04.842Z | auto\n\ncargo-context 1.1.0\n\n- Added support for exposing workspace content file uploads (e.g., PDFs, CSVs, other text) as read-only files under a new `.files/` directory within the runtime sandbox.\n- Clarified that content files in `.files/` are never pushed to the context repo and must be managed via `cargo-ai content file` commands.\n- Updated documentation to reflect the above changes, including correct references to `cargo-ai content file upload`.\n- Removed obsolete skill-card.md file.\n\nv1.0.1 | 2026-05-28T22:13:11.458Z | auto\n\n- Updated dependency installation to use \"@cargo-ai/cli@latest\" in SKILL.md.\n- Simplified and centralized prerequisites section by linking to a shared prerequisites document.\n- Removed redundant step-by-step install and login instructions from SKILL.md.\n- No changes to commands, usage, or functionality.\n\nv1.0.0 | 2026-05-28T19:28:20.284Z | auto\n\nInitial release of cargo-context.  \n- Introduces a Cargo CLI skill for inspecting and editing a workspace's git-backed context repository and runtime sandbox.\n- Supports browsing, reading, writing, and editing markdown/MDX files, as well as running commands in the context sandbox.\n- Provides access to the context-derived knowledge graph for workspace insights.\n- Requires @cargo-ai/cli and Cargo account to use.\n- Includes clear usage references, prerequisites, and safety recommendations for editing and executing commands.\n\nArchive index:\n\nArchive v1.3.0: 11 files, 31629 bytes\n\nFiles: references/conventions.md (9247b), references/examples/authoring.md (8476b), references/examples/bootstrap-from-domain.md (12025b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6120b), references/response-shapes.md (4898b), references/troubleshooting.md (5786b), skill-card.md (2779b), skill-metadata.json (1329b), SKILL.md (17588b), _meta.json (132b)\n\nFile v1.3.0:SKILL.md\n\n---\nname: cargo-context\ndescription: \"Read and write the workspace GTM knowledge base — the git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals — plus its runtime sandbox and typed knowledge graph. Triggers: \\\"document our ICP\\\", \\\"write up this persona\\\", \\\"what is our positioning\\\", \\\"add a battlecard\\\", \\\"capture this objection\\\", \\\"what do we know about <segment>\\\", \\\"update our context\\\", \\\"what is in the context repo\\\", \\\"who do we sell to\\\". Skip when: discovering who actually buys from you by analyzing won/lost data — that is cargo-gtm (this skill writes the conclusion down, it does not derive it); storing structured records rather than prose — use cargo-storage; attaching documents to an agent for RAG — use cargo-content.\"\nversion: \"1.3.0\"\ncompatibility: Requires @cargo-ai/cli (npm). Sign in or create an account with `cargo-ai login --email` (emailed code, no browser), `--oauth`, or an API token\nhomepage: https://github.com/getcargohq/cargo-skills\nmetadata:\n  author: getcargo\n  openclaw:\n    requires:\n      bins:\n        - cargo-ai\n    install:\n      - kind: node\n        package: \"@cargo-ai/cli@latest\"\n        bins:\n          - cargo-ai\n    homepage: https://github.com/getcargohq/cargo-skills\n---\n\n# Cargo CLI — Context\n\nThe **context** is a git-backed repository of typed markdown/MDX files that captures a workspace's GTM knowledge (company narrative, ICPs, personas, plays, proof, objections, etc.) and is read/written by both humans and agents. The `cargo-ai context` domain has two subdomains you'll use:\n\n- **runtime** — browse, read, write, edit, and execute against the workspace's runtime sandbox (a checked-out copy of the context repo). `write`/`edit` are pushed to the default branch; `execute` runs are **not** pushed.\n- **graph** — build/load the knowledge graph derived from every markdown/MDX file in the context repo.\n\n> The canonical example of a context repository is [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces). Read its `README.md` to understand the domain layout and file conventions before writing new entries.\n> For uploading runtime-independent files (CSVs, PDFs) used in batch runs, use [`cargo-workspace-management`](../cargo-workspace-management/SKILL.md) (`cargo-ai workspaceManagement file upload`) instead.\n> For RAG file attachments to agents, use [`cargo-ai`](../cargo-ai/SKILL.md) (`cargo-ai content file upload`).\n\n> See `references/conventions.md` for the full context repo structure and per-domain templates.\n> See `references/response-shapes.md` for the JSON shapes returned by each `cargo-ai context` command.\n> See `references/troubleshooting.md` for common errors and how to fix them.\n> See `references/examples/authoring.md` for end-to-end add / edit / delete recipes.\n> See `references/examples/lifecycle.md` for the bootstrap + refresh-from-calls playbook.\n> See `references/examples/graph-queries.md` for inspecting the knowledge graph.\n\n## Bootstrap\n\nAlready signed in (`cargo-ai whoami` returns a workspace)? Skip to the next section.\n\n```bash\nnpm install -g @cargo-ai/cli            # no global install? prefix every command with `npx @cargo-ai/cli`\ncargo-ai login --email you@company.com  # emailed code, no browser; creates the account on first use\n                                        # alternatives: --oauth (browser) · --token <api-token> (CI)\ncargo-ai whoami                         # confirm the active workspace before any write\n```\n\nEvery command prints JSON to stdout; failures exit non-zero with `{\"errorMessage\": \"...\"}`. Anything that creates a run or a batch is async — pass `--wait-until-finished` or poll the matching `get`. `runtime write` and `runtime edit` commit and push to the workspace's context repo, so confirming `workspace.name` first is non-negotiable. When the full skill bundle is installed, [`../cargo/references/prerequisites.md`](../cargo/references/prerequisites.md) adds the CLI version pin, token scopes, and the admin-only surface.\n\n## Discover the context first\n\nBefore editing anything, see what's in the context repo:\n\n```bash\ncargo-ai context runtime browse                 # list entries at the runtime sandbox root\ncargo-ai context graph get                      # full knowledge graph derived from the repo's md/mdx files\n```\n\n## Quick reference\n\n```bash\n# Runtime sandbox (checked-out copy of the context repo)\ncargo-ai context runtime browse [--path <path>]\ncargo-ai context runtime read --path <path> [--start-line <n>] [--end-line <n>]\ncargo-ai context runtime write --path <path> --content <content> [--commit-message <message>]\ncargo-ai context runtime edit --path <path> --old-string <old> --new-string <new> [--commit-message <message>]\ncargo-ai context runtime execute --command <command> [--args <json>]\n\n# Knowledge graph\ncargo-ai context graph get\n```\n\n## Runtime sandbox\n\nThe **runtime sandbox** is a checked-out, executable copy of the context repository. It's the surface you use to read and modify context files, and to run commands against them.\n\nTwo important behaviors to remember:\n\n- **`write` and `edit` push to the default branch** of the context repo. They are not local-only.\n- **`execute` does *not* push.** Changes made to files by a shell command run via `execute` stay in the sandbox and are discarded — use `execute` for builds, tests, or inspection, not for committing edits.\n\n**Uploaded content files are available read-only under `.files/`.** The workspace's `content file` uploads (PDFs, CSVs, text — see [`cargo-content`](../cargo-content/SKILL.md)) appear in the sandbox under a `.files/` directory, so a command run via `execute` (or `read`/`browse`) can consume them — e.g. `cargo-ai context runtime execute --command ls --args '[\"-1\",\".files\"]'`. It sits **outside the committed context tree**: the sandbox's auto-commit skips it, so nothing under `.files/` is ever pushed to the context repo, and you can't add or change content files from here (use `cargo-ai content file …` instead).\n\nBecause writes push immediately, **confirm the target workspace before the first `write`/`edit`**:\n\n```bash\ncargo-ai whoami   # → workspace.uuid, workspace.name\n```\n\nRead the workspace name back to the user. If the session is for a specific client, make sure `workspace.name` matches before authoring anything — there is no dry-run mode. If `workspace.name` is generic or ambiguous (e.g. \"Main\", \"Test\", a person's name, an internal codename), don't guess — ask the user for the company name and canonical domain (`example.com`) and confirm both before the first write. If you logged in without pinning a workspace, re-run `cargo-ai login --oauth --workspace-uuid <uuid>` (or `--token <workspace-scoped-token>` for non-interactive use).\n\nEdits derived from sales-call analysis should be applied **one at a time with human review**, not batched. Looping an agent over many calls tends to overweight the loudest signal and miss nuance — see `references/examples/lifecycle.md` for the call-refresh playbook.\n\n### Browse and read\n\n```bash\n# List entries at the root of the runtime sandbox\ncargo-ai context runtime browse\n\n# List entries under a subpath (e.g. a domain folder like persona/ or play/)\ncargo-ai context runtime browse --path persona\n\n# Read a full file\ncargo-ai context runtime read --path persona/vp-sales-mid-market.md\n\n# Read only a line range (1-indexed, inclusive on both ends)\ncargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40\n```\n\n### Write a new file\n\n`write` creates (or overwrites) a file and pushes a commit to the default branch.\n\nBegin every `.md`/`.mdx` file with a YAML frontmatter block setting `title` and `description`. Frontmatter is **not validated** — a file with missing, empty, or malformed frontmatter is still written and committed; it just indexes poorly in the graph (a missing `title` falls back to the filename, the node summary to the first paragraph). `write` can still fail for other reasons — `repositoryNotFound`, `syncConflict`, `syncFailed`, `failedToWrite`, or `deniedPath` (e.g. writing under `.files/`); see `references/response-shapes.md`.\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/vp-sales-mid-market.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: VP of Sales, mid-market\ndescription: Owns pipeline, quota, and rep productivity at a 200–2,000-person company.\n---\n\n## Role\n- Title: VP of Sales\n- Seniority: Executive\n- Function: Revenue\n- Reports to: CRO or CEO\n\n## KPIs\n- New ARR, win rate, pipeline coverage, rep ramp time\n\n## Pains\n- Pipeline gaps, slow ramp, low rep activity, forecasting drift\n\n## Motivations\n- Hit the number, build a repeatable motion, get visibility\n\n## Day-to-day\nForecast calls, deal reviews, pipeline reviews, 1:1s with frontline managers.\n\n## Preferred channels\n- medium/linkedin-outbound\n- medium/exec-warm-intro\n\n## Common objections\n- objection/we-already-have-an-ai-sdr\n\n## How we land\nLead with pipeline-coverage math, not features.\nEOF\n)\" \\\n  --commit-message \"Add VP of Sales mid-market persona\"\n```\n\n### Edit an existing file\n\n`edit` replaces a single exact substring. `--old-string` must occur **exactly once** in the file; pass an empty `--new-string` to delete the match.\n\n`edit` does not validate frontmatter — an edit that strips or empties `title`/`description` still applies, so keep the block intact to keep the node discoverable. `edit` can fail for other reasons, though: `stringNotFound` / `stringNotUnique` (the `--old-string` match), `fileNotFound`, `noOp` (new string equals old), `syncConflict` / `syncFailed`, `failedToEdit`, or `deniedPath`.\n\n```bash\n# Replace one specific sentence\ncargo-ai context runtime edit \\\n  --path global/positioning.md \\\n  --old-string \"We help RevOps automate workflows.\" \\\n  --new-string \"We help RevOps run AI-native GTM motions.\" \\\n  --commit-message \"Refresh positioning one-liner\"\n\n# Delete a line (pass empty --new-string)\ncargo-ai context runtime edit \\\n  --path persona/vp-sales-mid-market.md \\\n  --old-string \"\\n- Outdated stat: 4.2x pipeline\\n\" \\\n  --new-string \"\"\n```\n\nFor larger restructures, prefer `write` (full-file overwrite) over many sequential `edit` calls.\n\n### Execute a command in the sandbox\n\n`execute` runs a shell command in the sandbox. Useful for inspecting structure or running checks; **changes are not pushed**.\n\n```bash\n# Find every file that cross-references a specific slug\ncargo-ai context runtime execute \\\n  --command grep \\\n  --args '[\"-r\",\"-l\",\"persona/vp-sales-mid-market\",\".\"]'\n\n# Count entries per domain\ncargo-ai context runtime execute --command ls --args '[\"-1\",\"persona\"]'\n\n# Run a one-shot script (no quotes/escaping needed inside --command beyond JSON for args)\ncargo-ai context runtime execute --command pwd\n```\n\n`--args` is a JSON array of string arguments. Omit it for a no-arg command.\n\n## Context repository structure and conventions\n\nThe Cargo context repo is a typed knowledge base. The canonical example — and the source of the conventions below — is [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces); read its `README.md` and `_template.md` files in each domain before writing new entries. For the full domain reference, see `references/conventions.md`.\n\n### Domains\n\n| Domain | Purpose |\n|---|---|\n| `global/` | Company-level context: mission, voice, positioning, narrative, pricing |\n| `icp/` | Ideal Customer Profile segments |\n| `persona/` | Buyer personas (roles inside an ICP) |\n| `jtbd/` | Jobs-to-be-done framings |\n| `alternative/` | Competitors, substitutes, status quo |\n| `client/` | Customer profiles, case studies, reference accounts |\n| `insight/` | Market insights and observations |\n| `medium/` | Channel playbooks (email, LinkedIn, cold call, etc.) |\n| `objection/` | Objections + responses + proof |\n| `play/` | GTM plays (signal → audience → channel → sequence → outcome) |\n| `proof/` | Atomic proof points (metrics, quotes, case data) |\n| `signal/` | Buying signals and intent triggers |\n\n### File conventions\n\n- **Filename:** `kebab-case.md` (e.g. `vp-sales-mid-market.md`).\n- **Frontmatter:** start every `.md`/`.mdx` file with YAML frontmatter setting `title` and `description`. This is a **strong convention, not enforced** — a write with missing, empty, or malformed frontmatter is still created and committed; it just indexes poorly. The graph reads `title` (fallback: filename) and `summary` (fallback: the file's first paragraph); it does **not** read `description`, so add a `summary:` if you want to control the node summary. See [Source references and graph edges](#source-references-and-graph-edges).\n- **Cross-references:** use the `domain/slug` form, **no `.md` extension** (e.g. `persona/vp-sales-mid-market`). To register as a graph **edge** a reference must use one of the three link forms below — a bare `domain/slug` (or file path) in plain prose creates no edge.\n- **Templates:** each domain ships an `_template.md`. Read it (`cargo-ai context runtime read --path persona/_template.md`) before authoring a new entry. `_template.*` files are excluded from the graph — never reference them.\n\n### Source references and graph edges\n\nThe knowledge graph is built from every `.md`, `.mdx`, `.yaml`, and `.yml` file in the repo (any folder; only `.git/` is excluded). Each file is a node, but **edges are created only from three forms** — anything else is invisible to the graph:\n\n1. **Frontmatter `references:` list** (preferred for source citations — keeps prose clean):\n   ```yaml\n   ---\n   title: AgoraPulse expansion thesis\n   description: Why AgoraPulse is ready for a multi-thread expansion play.\n   references:\n     - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n   ---\n   ```\n2. **A Markdown link** in the body — standard `[label]` followed immediately by `(path)` syntax, where the target is the file path, e.g. an anchor linking to `outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md`.\n3. **Wikilinks** in the body (extension optional): `[[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes]]`.\n\nKey constraints:\n\n- **Never cite a source as a bare path in prose** (e.g. a `Source:` line that just mentions `outputs/sales-notes/foo.md` as text) — it is not parsed and creates **no** edge.\n- **Prefer root-relative paths** (resolved from the repo root first, then relative to the citing file) so links work regardless of where the document lives.\n- **Extensions are optional** — the resolver auto-tries `.md`, `.mdx`, `.yaml`, `.yml` in that order. Including the extension is fine.\n- **The target must exist** or the edge is **broken** (a dead link in the graph UI). Verify with `runtime browse` before citing.\n- For docs with a **Source**/**Evidence** section, cite the files in frontmatter `references:`; use inline markdown links when the citation needs surrounding prose. Full rules: `references/conventions.md`.\n\n### Workflow: add a new entry\n\n1. Confirm the target domain and copy its template:\n   ```bash\n   cargo-ai context runtime read --path persona/_template.md\n   ```\n2. `write` a new file at `<domain>/<slug>.md` with `title` + `description` and the body sections filled in.\n3. Add cross-refs (`domain/slug`) where useful — keep them bidirectional when it makes sense.\n4. Rebuild the knowledge graph to verify the new entry and its links:\n   ```bash\n   cargo-ai context graph get\n   ```\n\nFor full per-domain templates and worked examples, see `references/conventions.md` and `references/examples/authoring.md`.\n\n### Workflow: bootstrap and refresh\n\nTo stand up a new workspace's context repo from scratch, or to refresh an existing one on a cadence, follow the two-phase lifecycle in `references/examples/lifecycle.md`:\n\n1. **Bootstrap (one-time):** seed `global/`, `persona/`, `client/`, `proof/`, `objection/`, `signal/` from public sources, then open a fresh agent session against the seeded repo. For the prescriptive, automatable version (domain in → files out, idempotent, with credit budget), use `references/examples/bootstrap-from-domain.md`.\n2. **Refresh (every 2–4 weeks):** pull the last ~3 months of sales-call transcripts → analyze one at a time, human-in-the-loop → apply a repetition threshold before promoting any claim to context → validate by generating sequence permutations → diff the graph before/after and retire stale entries.\n\nThe repetition threshold (how many calls a claim must appear in before it lands in context) is documented in `references/conventions.md`.\n\n## Knowledge graph\n\n`context graph get` builds (or loads from cache) the knowledge graph over every markdown/MDX file in the context repo. Use it to:\n\n- Audit cross-references between domains (e.g. find personas that link to plays with no proof attached).\n- Discover what already exists before writing a new entry (avoid duplicates).\n- Power downstream agents that need the typed structure of the workspace's context.\n\n```bash\ncargo-ai context graph get\n```\n\nThe response includes the parsed frontmatter and outbound `domain/slug` references for each node — pipe it through `jq` to slice it. See `references/examples/graph-queries.md` for ready-to-run queries.\n\n## Help\n\nEvery command supports `--help`:\n\n```bash\ncargo-ai context --help\ncargo-ai context runtime browse --help\ncargo-ai context runtime read --help\ncargo-ai context runtime write --help\ncargo-ai context runtime edit --help\ncargo-ai context runtime execute --help\ncargo-ai context graph get --help\n```\n\nFile v1.3.0:_meta.json\n\n{\n  \"ownerId\": \"kn7by8t6yt9yghbxtxz6hv0bts87k6bq\",\n  \"slug\": \"cargo-context\",\n  \"version\": \"1.3.0\",\n  \"publishedAt\": 1788392474742\n}\n\nFile v1.3.0:references/conventions.md\n\n# Context repo conventions\n\nThe conventions below are inherited from the canonical context repository [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces). When in doubt, read its `README.md` and the `_template.md` file in the relevant domain.\n\n## Domains\n\n| Domain | Purpose |\n|---|---|\n| `global/` | Company-level context: mission, voice, positioning, narrative, pricing |\n| `icp/` | Ideal Customer Profile segments |\n| `persona/` | Buyer personas (roles inside an ICP) |\n| `jtbd/` | Jobs-to-be-done framings |\n| `alternative/` | Competitors, substitutes, status quo |\n| `client/` | Customer profiles, case studies, reference accounts |\n| `insight/` | Market insights and observations |\n| `medium/` | Channel playbooks (email, LinkedIn, cold call, etc.) |\n| `objection/` | Objections + responses + proof |\n| `play/` | GTM plays (signal → audience → channel → sequence → outcome) |\n| `proof/` | Atomic proof points (metrics, quotes, case data) |\n| `signal/` | Buying signals and intent triggers |\n\n## File conventions\n\n- **Filename:** `kebab-case.md` (e.g. `vp-sales-mid-market.md`). Use ASCII letters, digits, and hyphens only.\n- **Frontmatter:** YAML with `title` and `description` on every `.md`/`.mdx` file. This is a **strong convention, not enforced** — a write with missing, empty, or malformed frontmatter is still committed; it just indexes poorly. The graph reads `title` (fallback: filename) and `summary` (fallback: first paragraph), **not** `description`. See [Source references and the knowledge graph](#source-references-and-the-knowledge-graph).\n- **Cross-references:** `domain/slug` form, **no `.md` extension** (e.g. `persona/vp-sales-mid-market`). To register as a graph **edge**, a reference must appear as a wikilink, a markdown link, or a frontmatter `references:` entry (see below) — a bare `domain/slug` or file path in plain prose is not parsed.\n- **Templates:** each domain ships an `_template.md`. Read it (`cargo-ai context runtime read --path <domain>/_template.md`) before authoring a new entry. `_template.*` files are excluded from the graph — never reference them.\n- **Bidirectional links:** keep cross-refs symmetric when it makes sense — a `play` that targets a `persona` should appear in the persona's `Preferred channels` or `How we land` sections when relevant.\n\n## Source references and the knowledge graph\n\nThe graph is built from **every `.md`, `.mdx`, `.yaml`, and `.yml` file** in the repo (any folder; only `.git/` is excluded). Each file becomes a node. **Edges are created only from these three forms** — everything else is invisible to the graph:\n\n1. **Frontmatter `references:` list** (preferred for source citations — keeps prose clean, and the edge carries a `frontmatter` origin):\n\n   ```yaml\n   ---\n   title: AgoraPulse expansion thesis\n   description: Why the AgoraPulse account is ready for a multi-thread expansion play.\n   references:\n     - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n   ---\n   ```\n\n2. **A Markdown link in the body** — use when the citation needs surrounding prose. Write standard `[label]` immediately followed by `(path)` link syntax pointing at the source file, e.g. an \"AgoraPulse session outcomes\" anchor linking to `outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md`.\n\n3. **Wikilinks in the body** (extension optional):\n\n   ```markdown\n   [[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes]]\n   ```\n\n### Linking rules\n\n- **Never cite a source as a bare path in prose.** A `Source:` line that just mentions `outputs/sales-notes/foo.md` as plain text is **not** parsed and creates **no** edge. Always use one of the three forms above.\n- **Prefer root-relative paths.** Paths resolve root-relative first (from the repo root), then relative to the citing file's directory. Root-relative paths work regardless of where the citing document lives.\n- **Extensions are optional.** The resolver auto-tries `.md`, `.mdx`, `.yaml`, `.yml` (in that preference order). Including the extension is fine too.\n- **The target must exist.** A reference only resolves if the target file is actually in the repo — nonexistent targets become **broken** edges (dead links in the graph UI). Verify the path before citing it (`cargo-ai context runtime browse --path <dir>`).\n- **`_template.*` files are excluded** from the graph — don't reference `_template.md` / `.mdx` / `.yaml` / `.yml`.\n- **YAML data files:** `title`, `summary`, and `references` are read from top-level keys; YAML bodies produce no link edges.\n- **Node title/summary:** titles come from frontmatter `title:` (fallback: filename); summaries from frontmatter `summary:` (fallback: the body's first paragraph, truncated to 280 chars). The graph does **not** read `description` — set a `summary:` if you want the node summary to differ from the first paragraph. Always set `title` so the node is discoverable.\n\n### Citing sources in insight / learning documents\n\nWhen a document has a **Source** or **Evidence** section, cite the source files in **frontmatter `references:`** — this keeps the prose clean and gives the edges a `frontmatter` origin. Use inline markdown links when the citation needs surrounding prose.\n\n## How to read the context\n\nStart at `global/` for company context. Walk `icp/` → `persona/` → `jtbd/` to understand the buyer. Use `play/` for outbound motions and `objection/` + `proof/` for live conversations.\n\n## Domain templates\n\nThe most commonly authored domains. For domains not shown here (`icp/`, `jtbd/`, `alternative/`, `client/`, `insight/`, `medium/`, `signal/`), read the in-repo `_template.md` directly:\n\n```bash\ncargo-ai context runtime read --path icp/_template.md\ncargo-ai context runtime read --path signal/_template.md\n# ...\n```\n\n### `global/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Summary\n\n_One-line version._\n\n## Detail\n\n_Full version. Mission, voice, positioning, narrative, pricing — whatever this entry is._\n\n## Source\n\n_Where this comes from. Founder note, brand doc, board deck, prior conversation._\n```\n\n### `persona/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Role\n\n- Title:\n- Seniority:\n- Function:\n- Reports to:\n\n## KPIs\n\n-\n\n## Pains\n\n-\n\n## Motivations\n\n-\n\n## Day-to-day\n\n_What this person actually does on a Tuesday._\n\n## Preferred channels\n\n_Cross-ref `medium/...`._\n\n-\n\n## Common objections\n\n_Cross-ref `objection/...`._\n\n-\n\n## How we land\n\n_The angle, the pitch, the moment they get it._\n```\n\n### `play/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Hypothesis\n\n_Why this play should work. The bet._\n\n## Trigger\n\n_Cross-ref `signal/...`._\n\n-\n\n## Audience\n\n_Cross-ref `icp/...` or `persona/...`._\n\n-\n\n## Channel\n\n_Cross-ref `medium/...`._\n\n-\n\n## Sequence\n\n1.\n2.\n3.\n\n## Proof\n\n_Cross-ref `proof/...`._\n\n-\n\n## Success metric\n\n_What we measure. Target._\n\n## Owner\n\n_Role accountable for running this._\n\n## Variants\n\n-\n```\n\n### `proof/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Type\n\n_metric | quote | case | benchmark | screenshot_\n\n## Content\n\n_The actual proof point. Number, quote, fact._\n\n## Source\n\n_Where it comes from. Customer, study, internal data._\n\n## Client\n\n_Optional. Cross-ref `client/...`._\n\n## Context\n\n_What claim this supports. Why we cite it._\n\n## Use cases\n\n_Where this shows up: objections, plays, posts, decks._\n\n-\n```\n\n### `objection/_template.md`\n\nObjections pair a stated buyer concern with the response and the proof that backs it up:\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Objection\n\n_The buyer's stated concern, in their own words._\n\n## Response\n\n_Our reframe. Short, calm, specific._\n\n## Proof\n\n_Cross-ref `proof/...`._\n\n-\n\n## Personas\n\n_Cross-ref `persona/...` — who raises this most._\n\n-\n```\n\n## Authoring rules of thumb\n\n- **One concept per file.** If you're tempted to add a second `## Persona` or a second `## Play` heading inside one file, you actually want two files.\n- **Title is a label, description is a hook.** `title` shows up in lists; `description` is the one-line that explains why this entry exists.\n- **Cross-refs over duplication.** If a fact already lives in `proof/...`, link to it from the play or objection rather than re-stating it.\n- **Atomic proof.** Each `proof/` entry is one fact / quote / metric. Bundled proof points break filtering in the knowledge graph.\n- **Repetition threshold for call-derived claims.** A single sales call is anecdote, not evidence. Before promoting an objection / pain / missed-proof claim from call analysis into the context repo, require it to surface across multiple calls. Suggested defaults:\n  - Call-rich workspaces (≥ 50 transcripts / quarter): **3 occurrences**.\n  - Medium volume: **2 occurrences**.\n  - New / call-poor workspaces (< 10 transcripts): **1 occurrence**, and cite the source via frontmatter `references:` (or a markdown link) so the citation registers as a graph edge — see [Source references and the knowledge graph](#source-references-and-the-knowledge-graph).\n  The threshold applies to claims, not to facts a call directly confirms (a named customer, a verbatim quote, a competitor explicitly mentioned). See `examples/lifecycle.md` for the full refresh loop.\n\nFile v1.3.0:references/examples/authoring.md\n\n# Authoring examples\n\nEnd-to-end recipes for adding, editing, and removing entries in the context repo. All examples assume you're authenticated (`cargo-ai whoami` works) and that the workspace already has a context repository configured.\n\n> **Lead with frontmatter.** Every `.md`/`.mdx` write below starts with a YAML block carrying `title` and `description`. This is a strong convention, **not enforced** — a file with missing or malformed frontmatter is still committed, it just indexes poorly (the graph falls back to the filename for `title` and the first paragraph for the summary). To cite a source file so it shows up as a **graph edge**, list it in frontmatter `references:` (or use a markdown link / wikilink) — a bare path in prose creates no edge. See `../conventions.md` for the full linking rules.\n\n## Discover before writing\n\n```bash\n# 1. What domains exist?\ncargo-ai context runtime browse\n\n# 2. What's already in the target domain? (avoid duplicates)\ncargo-ai context runtime browse --path persona\n\n# 3. What's the shape of an entry in this domain?\ncargo-ai context runtime read --path persona/_template.md\n```\n\n## Add a persona\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/head-of-revops.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: Head of RevOps\ndescription: Owns the GTM tech stack, data quality, and pipeline reporting at a 200–2,000-person B2B SaaS.\n---\n\n## Role\n\n- Title: Head of RevOps / Director of RevOps\n- Seniority: Director / VP\n- Function: Revenue Operations\n- Reports to: CRO or COO\n\n## KPIs\n\n- Pipeline velocity, forecast accuracy, data freshness, CRM hygiene, lead-to-opp conversion\n\n## Pains\n\n- Stale enrichment, broken CRM workflows, slow rep ramp because the data model is brittle\n- Stitching together 6 point tools that don't talk to each other\n- Manual segment refreshes for plays\n\n## Motivations\n\n- One source of truth across SDR, AE, CS\n- Replace fragile Zapier chains with durable workflows\n- Get out of the way of the frontline\n\n## Day-to-day\n\nOps standup, reviewing failed syncs, building a new segment for an outbound play, fielding rep requests, and weekly forecast prep with the CRO.\n\n## Preferred channels\n\n_Cross-ref `medium/...`._\n\n- medium/peer-community-slack\n- medium/founder-led-linkedin\n\n## Common objections\n\n_Cross-ref `objection/...`._\n\n- objection/we-already-have-clay\n- objection/we-built-this-in-house\n\n## How we land\n\nLead with the stack-replacement angle: \"one durable workflow runtime that replaces enrichment + scoring + sync.\" Show, don't tell — run a workflow live against their domain on the demo call.\nEOF\n)\" \\\n  --commit-message \"Add Head of RevOps persona\"\n```\n\n## Add a play with cross-refs\n\n```bash\ncargo-ai context runtime write \\\n  --path play/funding-triggered-outbound.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: Funding-triggered outbound\ndescription: Reach out to companies within 14 days of a Series A–C raise with a hiring-and-stack angle.\n---\n\n## Hypothesis\n\nCompanies hit a stack-and-headcount inflection right after a raise. If we land in the first two weeks with a stack-replacement angle, we beat the procurement freeze that sets in by week 4.\n\n## Trigger\n\n_Cross-ref `signal/...`._\n\n- signal/series-a-funding-announcement\n- signal/series-b-funding-announcement\n\n## Audience\n\n_Cross-ref `icp/...` or `persona/...`._\n\n- icp/post-series-a-b2b-saas\n- persona/head-of-revops\n\n## Channel\n\n_Cross-ref `medium/...`._\n\n- medium/founder-led-linkedin\n- medium/cold-email-personalized\n\n## Sequence\n\n1. Day 0: LinkedIn connect + congratulations note (no pitch).\n2. Day 3: Personalized email referencing the raise + a single relevant stack-replacement angle.\n3. Day 7: Follow-up with one proof point (cross-ref `proof/customer-x-replaced-three-tools`).\n4. Day 14: Break-up message.\n\n## Proof\n\n_Cross-ref `proof/...`._\n\n- proof/customer-x-replaced-three-tools\n- proof/14-day-time-to-first-workflow\n\n## Success metric\n\nReply rate ≥ 12% on Day 3 email; meetings booked / 100 contacted ≥ 4.\n\n## Owner\n\nOutbound AE pod lead.\n\n## Variants\n\n- Same play, swap LinkedIn for warm intro when one exists (cross-ref `medium/exec-warm-intro`).\nEOF\n)\" \\\n  --commit-message \"Add funding-triggered outbound play\"\n```\n\n## Add a proof point\n\nKeep `proof/` atomic — one metric or quote per file:\n\n```bash\ncargo-ai context runtime write \\\n  --path proof/14-day-time-to-first-workflow.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: 14-day time to first workflow\ndescription: New customers ship their first production workflow within 14 days of signing.\n---\n\n## Type\n\nmetric\n\n## Content\n\nAcross the last 24 customers (Q1–Q3), median time from contract signature to first production workflow run was 14 days; P90 was 27 days.\n\n## Source\n\nInternal customer success tracker, pulled 2025-10-15.\n\n## Client\n\n_Aggregate across customers — no single cross-ref._\n\n## Context\n\nUsed to counter the \"another tool we'll never deploy\" objection. Pairs well with `objection/we-already-have-clay`.\n\n## Use cases\n\n- objection/we-already-have-clay\n- play/funding-triggered-outbound\n- Sales decks, slide 9 (\"Time to value\")\nEOF\n)\" \\\n  --commit-message \"Add 14-day time-to-first-workflow proof point\"\n```\n\n## Cite a source in an insight / learning doc\n\nWhen an entry is derived from a specific source file in the repo (a sales-note, a call summary, a research output), cite it in frontmatter `references:` so the citation registers as a **graph edge** with a `frontmatter` origin. Prefer root-relative paths, and confirm the target exists first (`cargo-ai context runtime browse --path outputs/sales-notes`).\n\n```bash\ncargo-ai context runtime write \\\n  --path insight/agorapulse-expansion-readiness.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: AgoraPulse expansion readiness\ndescription: Why the AgoraPulse account is ready for a multi-thread expansion play.\nreferences:\n  - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n---\n\n## Summary\n\nAgoraPulse surfaced three net-new buying centers in the last build session — strong signal for a multi-thread expansion.\n\n## Evidence\n\nDrawn from the [[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes|June 5 build-session outcomes]]: the champion named two adjacent teams already evaluating workflow tooling.\nEOF\n)\" \\\n  --commit-message \"Add AgoraPulse expansion readiness insight\"\n```\n\nBoth the frontmatter `references:` entry and the body wikilink (the `|` sets the display text) resolve to the same node — a bare `Source: outputs/sales-notes/...` line in prose would not. A standard Markdown link to the same file works too.\n\n## Edit a single line\n\n```bash\ncargo-ai context runtime edit \\\n  --path global/positioning.md \\\n  --old-string \"We help RevOps automate workflows.\" \\\n  --new-string \"We help RevOps run AI-native GTM motions.\" \\\n  --commit-message \"Refresh positioning one-liner\"\n```\n\n## Delete a line from a file\n\n```bash\n# Read first to copy the exact line (whitespace must match!)\ncargo-ai context runtime read --path persona/head-of-revops.md --start-line 18 --end-line 22\n\ncargo-ai context runtime edit \\\n  --path persona/head-of-revops.md \\\n  --old-string \"- Stitching together 6 point tools that don't talk to each other\\n\" \\\n  --new-string \"\" \\\n  --commit-message \"Drop outdated pain point on Head of RevOps\"\n```\n\n## Rename / move an entry\n\nThere's no `rename` command. Use `write` at the new path, then delete the old file with `execute` + push by overwriting it with `write` after removing — easier path: write the new file, then leave the old one in place until you're ready to remove it (a follow-up `write` with empty content is not supported; deletes happen via the GitHub UI or via `execute` followed by a manual commit step in the Cargo app).\n\nFor most renames, the cleanest sequence is:\n\n1. `write` the new file at the new path.\n2. Update every file that cross-refs the old slug — find them with `execute` + `grep`:\n   ```bash\n   cargo-ai context runtime execute --command grep --args '[\"-r\",\"-l\",\"persona/old-slug\",\".\"]'\n   ```\n3. For each match, `edit` the cross-ref `persona/old-slug` → `persona/new-slug`.\n4. Delete the stale file via the GitHub UI (file the rename in a single PR if your context repo uses PR review).\n\n## Verify your work\n\n```bash\n# Confirm the file is in place\ncargo-ai context runtime read --path persona/head-of-revops.md\n\n# Confirm it lights up in the graph and its cross-refs resolve\ncargo-ai context graph get | jq '.nodes[] | select(.slug == \"persona/head-of-revops\")'\n```\n\nFile v1.3.0:references/examples/bootstrap-from-domain.md\n\n# Bootstrap workspace context from a domain\n\nThe prescriptive, automatable version of Phase 1 of [`lifecycle.md`](lifecycle.md). Use this when the user wants to **seed an empty (or thin) context repo from public data**, starting from nothing more than their company's domain. The recipe enriches the company via aiArk + builtwith + enrichCrm + theirStack, scrapes public sources in parallel sub-agents, and writes one file per atomic concept through `cargo-ai context runtime write` — skipping any domain that already has content.\n\nOutput: a populated `global/`, `icp/`, `persona/`, `client/`, `proof/`, `signal/` (and where evidence supports it, `alternative/`, `objection/`, `insight/`) — enough that a fresh agent session can hold a coherent conversation about the company. Phase 2 (call-driven refinement) is deliberately out of scope here — see the \"What this recipe does NOT do\" section.\n\n**Trigger phrases:**\n- *\"Set up my workspace context from acme.com.\"*\n- *\"Bootstrap the context repo — my domain is acme.com.\"*\n- *\"Fill in the ICP and personas from our website.\"*\n- *\"My workspace is empty, just use our domain to populate everything.\"*\n\n## What this recipe exercises\n\n- `cargo-ai context runtime browse` / `graph get` for the idempotency check.\n- Domain-keyed enrichments (`aiArk.enrichCompany`, `builtwith.getDomainSummary`, `enrichCrm.getFunding`) for the factual spine.\n- Parallel sub-agents for public-source scraping (website, careers, blog, news, review sites).\n- The driving agent's native LLM to synthesize each digest into typed markdown matching the per-domain template (no `cargo-ai orchestration action execute` double-hop — that pattern is for workflow node graphs, not for an agent already in the loop).\n- `cargo-ai context runtime write` to commit one file per concept.\n\n## Required inputs\n\nBefore executing, the agent needs:\n1. **`domain`** (required) — canonical domain (`acme.com`), no protocol, no path.\n2. **`companyName`** (optional) — falls back to whatever `aiArk.enrichCompany` returns for the domain.\n3. **`depth`** (optional, default `standard`) — `minimal` (global + 1 icp + 2 personas), `standard` (full domain coverage), `deep` (also scrapes G2/Capterra/Reddit/HN for objections + alternatives).\n\nIf `domain` is missing, ask **once** and stop. Don't guess from the user's email — workspace domain and user email often diverge.\n\n## Recipe\n\n### Step 1 — Confirm the target workspace\n\nEach Cargo workspace maps to one company. `runtime write` pushes immediately. Wrong workspace = polluted repo for someone else.\n\n```bash\ncargo-ai whoami\n# → user.email, workspace.uuid, workspace.name\n```\n\nRead back `workspace.name` to the user and confirm it matches the company the `domain` belongs to. **Stop and ask** if the name is generic (`\"Main\"`, `\"Test\"`, a person's name, an internal codename) — workspace names are user-set and frequently don't match the customer-facing brand.\n\n**Non-interactive mode** (server-side trigger from signup, scheduled job, etc.): skip the read-back if `domain` was passed in at session start *and* `workspace.uuid` was pinned at login. The capture point at signup is the authority — don't add a blocking question that breaks the automation.\n\n### Step 2 — Idempotency check (the \"if not exists\" part)\n\nInventory what's already in the repo so we only fill gaps, never overwrite:\n\n```bash\ncargo-ai context runtime browse > /tmp/ctx-browse.json\ncargo-ai context graph get > /tmp/ctx-graph.json\n\n# Count entries per domain (excluding _template.md)\njq -r '.files[] | select(.path | test(\"^[^/]+/[^_].*\\\\.md$\")) | (.path | split(\"/\")[0])' /tmp/ctx-browse.json \\\n  | sort | uniq -c\n```\n\nBuild a skip-list: any domain (`global/`, `icp/`, etc.) with ≥ 2 non-template entries is considered \"already seeded\" — leave it alone. **Print the skip-list to the user** before any writes so they see what wasn't touched and can override.\n\nFor domains that exist but are thin (1 entry), still write *new* files into them, but never `runtime edit` an existing file in bootstrap mode. Edits are for the refresh phase (see [Phase 2](lifecycle.md#phase-2--refresh-from-real-calls)), not bootstrap.\n\n### Step 3 — Enrich the seed (factual spine)\n\nRun these in parallel — they give you the factual scaffolding (industry, headcount, tech stack, funding) every downstream synthesis step will cite. All three key on the **domain**, so there is no id-resolution step:\n\n```bash\nDOMAIN=acme.com\n\n# Parallel enrichments — same domain, three different signal families\nfor pair in \"aiArk:enrichCompany\" \"builtwith:getDomainSummary\" \"enrichCrm:getFunding\"; do\n  slug=\"${pair%%:*}\"; action=\"${pair##*:}\"\n  cargo-ai orchestration action execute \\\n    --action \"$(jq -nc --arg i \"$slug\" --arg a \"$action\" \\\n                  '{kind:\"connector\",integrationSlug:$i,actionSlug:$a}')\" \\\n    --data \"{\\\"domain\\\":\\\"$DOMAIN\\\"}\" \\\n    --wait-until-finished > /tmp/enrich-$action.json &\ndone\nwait\n```\n\nTotal: ~1.01 credits (`aiArk.enrichCompany` 0.01, `builtwith.getDomainSummary` free, `enrichCrm.getFunding` 1). Drop the funding call and the whole spine costs a hundredth of a credit.\n\nIf every call comes back empty, fall back to website scraping only (Step 4) — note in every written file's `## Source` section that firmographics were unavailable.\n\n### Step 4 — Scrape public sources in parallel sub-agents\n\nSpawn one sub-agent per source. Each returns a **structured digest** (key claims + source URL), never raw HTML. Suggested fan-out:\n\n| Sub-agent | Source URLs | Lands in |\n|---|---|---|\n| Website core | `https://<domain>`, `/about`, `/product`, `/pricing`, `/customers` | `global/positioning`, `global/narrative`, `global/mission`, `global/pricing`, `client/...` |\n| Careers | `/careers`, `/jobs`, LinkedIn jobs | `persona/...`, `signal/hiring-intent-...` |\n| Blog & launches | `/blog`, `/changelog`, `/news` | `insight/...`, `proof/...` |\n| News & funding | Google News, Crunchbase summary | `signal/funding-...`, `proof/...` |\n| Reviews *(depth=deep only)* | G2, Capterra | `objection/...`, `alternative/...` |\n| Communities *(depth=deep only)* | Reddit, HN search | `objection/...`, `insight/...` |\n\nFor each digest, require a `source_url` per claim. **Skip anything you cannot source** — a thin context beats a fabricated one.\n\n### Step 5 — Synthesize and write per domain\n\nFor each domain you intend to populate, read the template first so frontmatter (`title`, `description`) and section structure are valid. Missing `title` or `description` **breaks the knowledge graph**.\n\n```bash\n# Always read the template first\ncargo-ai context runtime read --path global/_template.md\ncargo-ai context runtime read --path persona/_template.md\ncargo-ai context runtime read --path icp/_template.md\ncargo-ai context runtime read --path client/_template.md\ncargo-ai context runtime read --path proof/_template.md\ncargo-ai context runtime read --path signal/_template.md\n```\n\nThen synthesize one markdown file per atomic concept **directly** — the agent running this recipe is already an LLM, so don't double-hop through `cargo-ai orchestration action execute` to call Anthropic / OpenAI. That pattern is for batch synthesis inside a workflow node graph (Play/Tool); here, the agent has the digest in context and can produce the file body itself.\n\nFor each domain, the agent should:\n\n1. Read the template (already done above) and the relevant digest from Step 4.\n2. Produce one complete markdown body per concept, including frontmatter (`title` + `description`, both required), section structure from the template, and source URLs cited in `## Source` or `## Day-to-day`.\n3. Write each file with `cargo-ai context runtime write`. **One concept per file** — if you're tempted to write two `## Persona` headings into one file, split into two files instead.\n\nExample for `persona/` (after the agent has drafted `vp-engineering.md` from the careers digest):\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/vp-engineering.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: VP of Engineering\ndescription: Senior engineering leader at 50-500 person SaaS companies, owns platform reliability and developer productivity.\n---\n\n## Role\n- Title: VP of Engineering\n- Seniority: Executive\n- Function: Engineering\n- Reports to: CTO or CEO\n\n## KPIs\n- ...\n\n## Source\n- https://acme.com/careers/vp-engineering\nEOF\n)\"\n```\n\n### Step 6 — Verify and report\n\nRe-run the graph to confirm the writes landed and surface any orphan cross-refs:\n\n```bash\ncargo-ai context graph get > /tmp/ctx-graph-after.json\n\n# Node delta\necho \"Before: $(jq '.nodes | length' /tmp/ctx-graph.json)\"\necho \"After:  $(jq '.nodes | length' /tmp/ctx-graph-after.json)\"\n\n# Orphans (nodes referenced but not authored)\njq -r '.edges[] | select(.target.exists == false) | \"\\(.source.path) → \\(.target.path)\"' /tmp/ctx-graph-after.json\n```\n\nReport to the user:\n- Files written, grouped by domain.\n- Domains skipped (from Step 2).\n- Orphan cross-refs (these usually mean the synthesis referenced a `persona/x` that wasn't actually written — either author the missing file or rewrite the reference).\n\n## Credit budget\n\n| Step | Cost per call | Calls (depth=standard) | Subtotal |\n|---|---|---|---|\n| aiArk.enrichCompany | 0.01 | 1 | 0.01 |\n| builtwith.getDomainSummary | 0 | 1 | 0 |\n| enrichCrm.getFunding | 1 | 1 | 1 |\n| Public-source scrapes (sub-agents) | 0 (agent LLM tokens, not Cargo credits) | 4–6 | 0 |\n| Synthesis (agent native) | 0 (agent LLM tokens, not Cargo credits) | 6–8 | 0 |\n| context runtime write | 0 | 15–30 files | 0 |\n| **Total (standard)** | | | **~1 Cargo credit** |\n| **Total (deep)** adds review-site + community sub-agents | | | **~1 Cargo credit** |\n\nBootstrap is one-shot per workspace. Re-running is a no-op for already-seeded domains thanks to Step 2's skip-list.\n\n## Action shape\n\n`{\"kind\":\"connector\",\"integrationSlug\":\"<slug>\",\"actionSlug\":\"<slug>\"}`. **No `connectorUuid` in `config`.**\n\n## Output deliverable\n\nA summary the agent presents to the user:\n\n```\nContext repo bootstrapped from acme.com:\n\nWritten (24 files):\n  global/         3 files  (positioning, narrative, pricing)\n  icp/            2 files  (mid-market-saas, enterprise-fintech)\n  persona/        4 files  (vp-eng, head-of-data, cto, vp-product)\n  client/         5 files  (3 enterprise, 2 mid-market)\n  proof/          7 files  (4 metrics, 3 quotes)\n  signal/         3 files  (hiring-intent-data-eng, series-c-funding, snowflake-adoption)\n\nSkipped (already had content):\n  alternative/, objection/, insight/\n\nOrphan refs: none.\n\nNext steps:\n  - Open a fresh agent session so the seeded files load clean.\n  - Refine from real sales calls — see Phase 2 of lifecycle.md.\n```\n\n## What this recipe does NOT do\n\n- **No refinement from sales calls.** That's [Phase 2 of `lifecycle.md`](lifecycle.md#phase-2--refresh-from-real-calls) — deliberately human-in-the-loop. Auto-promoting call-derived claims into context produces plausible-sounding but shallow ICPs.\n- **No `runtime edit` on existing files.** Bootstrap is additive only. Edits belong to the refresh phase.\n- **No invention.** If a claim has no `source_url`, drop it. Thin context is recoverable; fabricated context erodes trust in everything downstream.\n- **No promotion past the repetition threshold.** See [authoring rules of thumb](../conventions.md#authoring-rules-of-thumb). Bootstrap claims come from public sources, which count as one source — note the URL in the file body, don't promote to a confident assertion.\n\n## When stuck — file a workspace report\n\nIf `context runtime write` fails repeatedly, the workspace has no context repo configured, or a template has changed shape and the writes no longer match, file via:\n\n```bash\ncargo-ai workspaceManagement report create \\\n  --title \"bootstrap-from-domain: <one-line summary>\" \\\n  --description \"<exact command(s) tried, errorMessage, domain attempted, workspace.uuid>\"\n```\n\nSee [`../../../cargo-workspace-management/SKILL.md`](../../../cargo-workspace-management/SKILL.md).\n\nFile v1.3.0:references/examples/graph-queries.md\n\n# Knowledge-graph queries\n\n`cargo-ai context graph get` returns the typed knowledge graph derived from every markdown/MDX file in the context repo. Pipe it through `jq` to slice it.\n\n> Field names below (`nodes`, `slug`, `frontmatter`, `links`, etc.) are illustrative — run `cargo-ai context graph get | jq '. | keys'` once at the top of your session to confirm the exact shape for your workspace before scripting against it.\n\n## List every node\n\n```bash\ncargo-ai context graph get | jq -r '.nodes[].slug' | sort\n```\n\n## Count entries per domain\n\n```bash\ncargo-ai context graph get \\\n  | jq -r '.nodes[].slug' \\\n  | awk -F/ '{print $1}' \\\n  | sort | uniq -c | sort -rn\n```\n\n## Find every persona\n\n```bash\ncargo-ai context graph get \\\n  | jq '.nodes[] | select(.slug | startswith(\"persona/\")) | {slug, title: .frontmatter.title}'\n```\n\n## Find personas that link to a specific play\n\n```bash\ncargo-ai context graph get \\\n  | jq --arg target \"play/funding-triggered-outbound\" '\n      .nodes[]\n      | select(.slug | startswith(\"persona/\"))\n      | select((.links // []) | index($target))\n      | .slug'\n```\n\n## Find dangling cross-references\n\nNodes referencing a `domain/slug` that doesn't exist in the graph:\n\n```bash\ncargo-ai context graph get | jq '\n  . as $g\n  | ($g.nodes | map(.slug)) as $slugs\n  | $g.nodes[]\n  | .slug as $from\n  | (.links // [])[]\n  | select(. as $t | ($slugs | index($t)) | not)\n  | {from: $from, missing: .}\n'\n```\n\n## Find plays with no proof attached\n\n```bash\ncargo-ai context graph get | jq '\n  .nodes[]\n  | select(.slug | startswith(\"play/\"))\n  | select(\n      ((.links // []) | map(select(startswith(\"proof/\"))) | length) == 0\n    )\n  | .slug\n'\n```\n\n## Find objections with no proof point\n\nSame pattern as plays, scoped to objections:\n\n```bash\ncargo-ai context graph get | jq '\n  .nodes[]\n  | select(.slug | startswith(\"objection/\"))\n  | select(\n      ((.links // []) | map(select(startswith(\"proof/\"))) | length) == 0\n    )\n  | {slug, title: .frontmatter.title}\n'\n```\n\n## Show inbound references to a node\n\nWhich files cross-ref `proof/14-day-time-to-first-workflow`?\n\n```bash\ncargo-ai context graph get | jq --arg target \"proof/14-day-time-to-first-workflow\" '\n  .nodes[]\n  | select((.links // []) | index($target))\n  | .slug\n'\n```\n\n## Audit frontmatter completeness\n\nFiles missing `title` or `description`:\n\n```bash\ncargo-ai context graph get | jq '\n  .nodes[]\n  | select((.frontmatter.title // \"\") == \"\" or (.frontmatter.description // \"\") == \"\")\n  | .slug\n'\n```\n\n## Snapshot the graph to disk\n\nUseful before a bulk edit so you can diff before/after:\n\n```bash\ncargo-ai context graph get > /tmp/graph.before.json\n# ...make edits via context runtime write/edit...\ncargo-ai context graph get > /tmp/graph.after.json\ndiff <(jq -r '.nodes[].slug' /tmp/graph.before.json | sort) \\\n     <(jq -r '.nodes[].slug' /tmp/graph.after.json | sort)\n```\n\nFile v1.3.0:references/examples/lifecycle.md\n\n# Context repo lifecycle\n\nThe repeatable playbook for keeping a workspace's context repo healthy over time. Two phases: a one-time **bootstrap** from public sources (delegated to the [`bootstrap-from-domain.md`](bootstrap-from-domain.md) recipe), then a **refresh loop** driven by sales-call analysis (this doc's focus). Use this when standing up a new workspace, or as a periodic rehydration. Recommended cadence: every 2–4 weeks.\n\nThe phases are deliberately separated. Bootstrapping from public data gets you to a baseline fast; call-driven refinement is where the quality lives. Step 2 (turning a single call into context edits) cannot be safely automated end-to-end — keep a human in the loop on every edit.\n\n## Before you start — confirm the target workspace\n\nEach Cargo workspace maps to one company. `runtime write` and `runtime edit` push to **that workspace's** context repo immediately, so the first thing to do is confirm you're pointed at the right one. This matters most for consultants and operators managing several client workspaces.\n\n```bash\ncargo-ai whoami\n# → user.email, workspace.uuid, workspace.name\n```\n\nRead back the `workspace.name` to the human and confirm it matches the company you intend to harden context for. **If the name is generic or ambiguous** — `\"Main\"`, `\"Test\"`, a person's name, an internal codename, anything that doesn't unambiguously identify the company — stop and ask: \"What's the company name and canonical domain (e.g. `acme.com`)?\" Workspace names are user-set and frequently don't match the customer-facing brand; the domain is the disambiguator. If you logged in without pinning a workspace, re-login with the right one:\n\n```bash\ncargo-ai login --oauth --workspace-uuid <uuid>\n# or, non-interactive:\ncargo-ai login --token <workspace-scoped-token>\n```\n\nIf you're working across multiple clients in one session, prefix the workspace name in your notes for every claim you record — it's easy to attribute a Phase 2 insight to the wrong company otherwise.\n\n## Phase 1 — Bootstrap from public sources\n\nFor the automatable seed step, use [`bootstrap-from-domain.md`](bootstrap-from-domain.md). It takes a domain, inventories existing files via `runtime browse` + `graph get` so it only fills gaps, enriches via aiArk + builtwith + enrichCrm, scrapes public sources in parallel sub-agents, and writes one file per atomic concept through `context runtime write`.\n\nOnce the bootstrap commit lands, open a new agent session so the seeded files load clean (rather than mixed with scratch context from the bootstrap run), then continue with Phase 2.\n\n## Phase 2 — Refresh from real calls\n\nGoal: replace assumptions with evidence. Public sources tell you what the company *says*; calls tell you what prospects *do*.\n\n### 1. Pull the last ~3 months of sales calls\n\nExport transcripts from Gong / Chorus / Fathom / etc. Three months is a good default — long enough to see patterns, short enough that the language is current. For low-volume workspaces, take what you have.\n\nWhile you're there, capture a **call volume estimate** (transcripts / quarter). It drives the repetition threshold in step 2b.\n\n### 2. Analyze one call at a time, human in the loop\n\nFor each call:\n\n1. Have an agent summarize the call against the existing context: which personas were on the call, which objections came up, which proof points were referenced or missed, which signals would have flagged this account.\n2. The agent proposes edits — new `objection/...`, updated `persona/...` pains, additional `proof/...` quotes, etc.\n3. A human approves each edit before it lands via `runtime write` or `runtime edit`.\n\nDo **not** batch this. An agent processing 30 calls in a loop overweights the loudest objection and underweights nuance.\n\n### 2b. Apply a repetition threshold\n\nA single call's claim is anecdote. Before promoting a claim into context, require it to surface across multiple calls:\n\n| Workspace volume | Threshold |\n|---|---|\n| Call-rich (≥ 50 transcripts / quarter) | **3 occurrences** before commit |\n| Medium volume | **2 occurrences** |\n| New / call-poor (< 10 transcripts) | **1 occurrence** — note the source in the file body |\n\nTrack candidates in a scratch doc (or draft `insight/` entries) until they cross the threshold. The threshold applies to *claims* — objections, pains, missed proof points. It does not apply to direct facts a call confirms (a customer name, a quote attributable to one named person, a competitor explicitly mentioned).\n\n### 3. Validate by generating sequences\n\nBefore treating the context as production-ready, run permutations through the workspace's sequence-generating play or agent and read the outputs. Useful permutations:\n\n- A persona + a play + an objection\n- Two different personas with the same play\n- A play with and without a specific proof point\n\nIf the generated sequences read like a different company between permutations, the context has internal contradictions. Find them by walking the knowledge graph for orphans and conflicting cross-refs — see `graph-queries.md` for queries that catch the common cases.\n\n### 4. Push to production\n\n`runtime write` and `runtime edit` already push to the default branch — there is no separate deploy step. \"Push to production\" here means flipping downstream agents and plays to read from the refreshed context. If your workspace pins a specific branch or commit, update the pin now.\n\n### 5. Repeat every 2–4 weeks\n\nRe-run Phase 2 on a cadence. Re-run Phase 1 only when something changes materially in public sources (rebrand, new pricing, new persona launch). On each refresh:\n\n- Snapshot `cargo-ai context graph get` before and after, then diff to see what moved.\n- Retire context not referenced in the last two cycles — staleness is the failure mode, not coverage gaps.\n\n## What not to automate\n\nFull automation of steps 2 / 2b does not reach acceptable quality in practice. The nuance lives in three decisions: which claim is worth committing, which file it belongs in, and whether an existing file should be edited or a new one created. Keep a human on each of those.\n\nFile v1.3.0:references/response-shapes.md\n\n# Response shapes\n\nJSON response structures returned by Cargo CLI commands used in the `cargo-context` skill.\n\n> Unlike the workspace storage / orchestration skills, the context CLI commands return shapes that depend on the underlying file content and on the graph derived from it. Field names below are the ones used throughout this skill's examples (`nodes`, `slug`, `frontmatter`, `links`, etc.); for a given workspace, confirm the exact shape with `--help` and a one-shot invocation before scripting against it.\n\n## Error shape (every command)\n\nFailed commands exit non-zero and return:\n\n```json\n{\n  \"errorMessage\": \"...\"\n}\n```\n\n`cargo-ai context runtime edit` fails with this shape when `--old-string` matches zero or multiple times in the target file. See `references/troubleshooting.md`.\n\n## cargo-ai context runtime browse\n\nLists entries at the sandbox root (or under `--path`). Returns the directory listing — file and folder names under the requested path. Combine with `cargo-ai context runtime read --path <file>` to inspect any entry.\n\n```bash\ncargo-ai context runtime browse\ncargo-ai context runtime browse --path persona\n```\n\nRun once at the top of a session to confirm the exact JSON shape for your workspace.\n\n## cargo-ai context runtime read\n\nReturns the file content at `--path`, optionally restricted to `--start-line`/`--end-line` (1-indexed, inclusive). Use this to read frontmatter + body before editing.\n\n```bash\ncargo-ai context runtime read --path persona/vp-sales-mid-market.md\ncargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40\n```\n\n## cargo-ai context runtime write\n\nCreates (or overwrites) the file at `--path` and pushes a commit to the default branch. Returns the commit metadata. The `--commit-message` flag controls the commit subject.\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/vp-sales-mid-market.md \\\n  --content \"<file body with frontmatter>\" \\\n  --commit-message \"Add VP of Sales mid-market persona\"\n```\n\nOn failure it returns the generic error shape (see [Error shape](#error-shape-every-command)); the context-specific case to know is a denied write under `.files/` (update those via Content instead). Frontmatter is **not** validated — a file missing `title`/`description` or with malformed frontmatter is written, not rejected. Failure reasons are enumerated in `references/troubleshooting.md`.\n\n## cargo-ai context runtime edit\n\nReplaces a single exact substring in the file at `--path` and pushes a commit. `--old-string` must match **exactly once** — read the file with `runtime read` first and copy the substring verbatim, whitespace included. Pass an empty `--new-string` to delete the match. Returns the commit metadata on success.\n\n```bash\ncargo-ai context runtime edit \\\n  --path global/positioning.md \\\n  --old-string \"We help RevOps automate workflows.\" \\\n  --new-string \"We help RevOps run AI-native GTM motions.\" \\\n  --commit-message \"Refresh positioning one-liner\"\n```\n\nOn failure it returns the generic error shape — most often because `--old-string` matched zero or multiple times. Frontmatter is not validated, so an edit that strips `title`/`description` still applies. Failure reasons are enumerated in `references/troubleshooting.md`.\n\n## cargo-ai context runtime execute\n\nRuns a shell command in the sandbox and returns its stdout / stderr / exit code. **Does not push** any file changes — use only for inspection (`grep`, `ls`, `pwd`, `find`). `--args` is a JSON array of string arguments; omit for a no-arg command.\n\n```bash\ncargo-ai context runtime execute --command grep --args '[\"-r\",\"-l\",\"persona/vp-sales-mid-market\",\".\"]'\ncargo-ai context runtime execute --command ls --args '[\"-1\",\"persona\"]'\ncargo-ai context runtime execute --command pwd\n```\n\n## cargo-ai context graph get\n\nReturns the typed knowledge graph derived from every markdown/MDX file in the context repo. Shape used throughout `references/examples/graph-queries.md`:\n\n```json\n{\n  \"nodes\": [\n    {\n      \"slug\": \"persona/vp-sales-mid-market\",\n      \"frontmatter\": {\n        \"title\": \"VP of Sales, mid-market\",\n        \"description\": \"Owns pipeline, quota, and rep productivity at a 200–2,000-person company.\"\n      },\n      \"links\": [\n        \"medium/linkedin-outbound\",\n        \"medium/exec-warm-intro\",\n        \"objection/we-already-have-an-ai-sdr\"\n      ]\n    }\n  ]\n}\n```\n\n**Key fields:**\n\n- `nodes[].slug` — `domain/slug` (no `.md` extension), the canonical identifier used in cross-references.\n- `nodes[].frontmatter` — parsed YAML frontmatter. `title` and `description` are required on every file.\n- `nodes[].links` — outbound `domain/slug` references found in the body. Missing or empty when the file links nowhere.\n\nFor ready-to-run queries (count per domain, dangling references, plays missing proof, inbound references to a node), see `references/examples/graph-queries.md`.\n\nFile v1.3.0:references/troubleshooting.md\n\n# Troubleshooting\n\nCommon errors and solutions for `cargo-ai context` commands.\n\n## General\n\n**`{\"errorMessage\": \"...\"}`**\nAll failed commands exit non-zero and return an error JSON. Read the `errorMessage` for the specific issue.\n\n**`Unauthorized` / `403`**\nYour API token may lack the required permissions, or the workspace's context repository isn't configured. Verify with `cargo-ai whoami`; if a context repo hasn't been set up for the workspace, ask an admin (or do it via the Cargo app under workspace settings).\n\n## Runtime — browse / read\n\n**Path not found**\nThe path does not exist in the runtime sandbox. Use `cargo-ai context runtime browse --path <parent>` to confirm the file layout before reading. Paths are relative to the repo root, no leading slash (`persona/vp-sales.md`, not `/persona/vp-sales.md`).\n\n**Out-of-range lines**\n`--start-line` and `--end-line` are 1-indexed and inclusive on both ends. If they fall outside the file's line count the read fails. Read the file without a range first to confirm length, or omit one end (e.g. only `--start-line`) to read to EOF.\n\n## Runtime — write\n\n**Push fails / commit not appearing**\n`write` pushes to the context repo's default branch. Pushes fail if the configured GitHub connector lost permissions or the branch was deleted/renamed. Verify the connector via `cargo-ai connection connector list` and check the default-branch setting in the Cargo app under workspace settings.\n\n**No `_template.md` for the domain**\nSome workspaces customize their context repo. If a domain doesn't ship a template, browse the domain (`cargo-ai context runtime browse --path <domain>`) and model the new file after an existing entry.\n\n**Missing / empty / malformed frontmatter (not an error)**\nFrontmatter is a strong convention but **not validated** — `write` never rejects a file for a missing `title`/`description` or malformed YAML; the file is committed as-is. The graph fails soft: a missing `title` falls back to the filename, the node summary falls back to the body's first paragraph, and a malformed frontmatter block is stripped so it doesn't leak into the summary. Nothing dangles, but the node indexes poorly — set `title` (and a `summary:` if you want a specific summary) on every file. Note the graph reads `summary`, not `description`.\n\n**Other `notWritten` reasons**\n`write` can fail with `repositoryNotFound`, `syncConflict`, `syncFailed`, `failedToWrite`, or `deniedPath` (writing under `.files/` — update those via Content instead). `syncFailed` / `failedToWrite` / `deniedPath` carry an `errorMessage`. See `references/response-shapes.md`.\n\n## Runtime — edit\n\n**`--old-string` not found**\n`--old-string` did not match any substring in the file. Whitespace must match exactly — escape newlines (`\\n`) where present, and watch for trailing spaces. Read the file first and copy the substring verbatim.\n\n**`--old-string` matches more than once**\n`edit` requires the match to be unique. Add enough surrounding context to make the match unique (extend with the line before or after), or do multiple targeted edits in sequence.\n\n**Other `notEdited` reasons**\nBesides the `--old-string` cases above, `edit` can return `fileNotFound`, `noOp` (the new string equals the old), `syncConflict` / `syncFailed` (push race), `failedToEdit`, or `deniedPath` (editing under `.files/`). Frontmatter is **not** validated, so an edit that removes or empties `title`/`description` still applies — keep the block intact so the node stays discoverable.\n\n**Edits not appearing in GitHub**\n`edit` commits and pushes; `execute` does **not** push. If you ran a shell command that modified files (e.g. `sed -i`, redirecting into a file), the change stays in the ephemeral sandbox and is discarded. Use `write` or `edit` for any change that should land in git.\n\n## Runtime — execute\n\n**Command output is empty / unexpected**\nThe runtime sandbox starts clean for each call; mutations from prior `execute` calls are not preserved between invocations. Don't rely on state across `execute` runs — chain operations in a single `--command` (e.g. via `sh -c`) instead.\n\n**Side effects not pushed**\nBy design, `execute` does not commit. Use `execute` for inspection (`grep`, `ls`, `find`, counting, validation); use `write`/`edit` for any persistent change.\n\n**Argument escaping**\n`--args` is a **JSON array** of strings, not a shell-quoted list. Wrap the whole thing in single quotes so the shell doesn't mangle the JSON:\n\n```bash\n# Correct\ncargo-ai context runtime execute --command grep --args '[\"-r\",\"vp-sales\",\".\"]'\n\n# Wrong — shell will eat the inner double quotes\ncargo-ai context runtime execute --command grep --args [\"-r\",\"vp-sales\",\".\"]\n```\n\n## Graph\n\n**Stale results after writes**\n`graph get` is cached. After a series of writes, expect a short delay before the graph reflects them. Re-run after a few seconds, or restructure logic so it does not depend on immediately-fresh graph data.\n\n**Broken cross-references**\nIf a file references `domain/slug` and that target doesn't exist, the link won't resolve in the graph. Use `cargo-ai context runtime browse --path <domain>` to verify the target exists before writing the reference, or pipe `graph get` through `jq` to enumerate dangling refs (see `references/examples/graph-queries.md`).\n\n## When to escalate\n\nIf the CLI errors and `--help` plus the notes above don't get you unstuck — **file a workspace management report** rather than retrying silently. See [`cargo-workspace-management/SKILL.md`](../../cargo-workspace-management/SKILL.md) (Reports section).\n\n```bash\ncargo-ai workspaceManagement report create \\\n  --title \"context <subcommand> fails with <errorMessage>\" \\\n  --description \"Ran: cargo-ai context ...   Got: {...errorMessage...}   Expected: ...\"\n```\n\nFile v1.3.0:skill-card.md\n\n## Description:\n\nRead and write the workspace GTM knowledge base, a git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals, plus its runtime sandbox and typed knowledge graph.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[cargo-ai](https://clawhub.ai/user/cargo-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and GTM operators use this skill to inspect, author, edit, and maintain a Cargo workspace context repository for company positioning, ICPs, personas, plays, proof points, objections, competitors, and signals. The skill also guides agents through runtime sandbox commands and knowledge-graph queries before making changes.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The release depends on an unpinned @cargo-ai/cli package installed as @cargo-ai/cli@latest.\n\nMitigation: Use a pinned, reviewed @cargo-ai/cli version before installing or running the skill.\n\nRisk: Runtime write and edit commands push changes to the workspace context repository default branch.\n\nMitigation: Confirm the active workspace with cargo-ai whoami and review each write or edit before execution.\n\nRisk: Runtime execute is a privileged sandbox command surface.\n\nMitigation: Treat execute as privileged, limit commands to the intended inspection or validation task, and avoid broad automatic invocations.\n\n## Reference(s):\n\n- [Cargo skills repository](https://github.com/getcargohq/cargo-skills)\n- [Canonical Cargo workspace context repository](https://github.com/getcargohq/cargo-workspaces)\n- [Context repo conventions](references/conventions.md)\n- [Response shapes](references/response-shapes.md)\n- [Troubleshooting](references/troubleshooting.md)\n- [Authoring examples](references/examples/authoring.md)\n- [Bootstrap workspace context from a domain](references/examples/bootstrap-from-domain.md)\n- [Knowledge-graph queries](references/examples/graph-queries.md)\n- [Context repo lifecycle](references/examples/lifecycle.md)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, markdown, configuration]\n\n**Output Format:** [Markdown with inline bash commands and JSON response shapes]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Uses Cargo CLI commands that return JSON to stdout and may write or edit markdown files in the active workspace context repository.]\n\n## Skill Version(s):\n\n1.3.0 (source: frontmatter and server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.3.0:skill-metadata.json\n\n{\n  \"$comment\": \"Generated by .github/scripts/skills-metadata.mjs — do not hand-edit. Regenerate with: node .github/scripts/skills-metadata.mjs --write .\",\n  \"name\": \"cargo-context\",\n  \"version\": \"1.3.0\",\n  \"documents\": [\n    {\n      \"path\": \"SKILL.md\",\n      \"kind\": \"entrypoint\",\n      \"title\": \"Cargo CLI — Context\"\n    },\n    {\n      \"path\": \"references/conventions.md\",\n      \"kind\": \"reference\",\n      \"title\": \"Context repo conventions\"\n    },\n    {\n      \"path\": \"references/examples/authoring.md\",\n      \"kind\": \"example\",\n      \"title\": \"Authoring examples\"\n    },\n    {\n      \"path\": \"references/examples/bootstrap-from-domain.md\",\n      \"kind\": \"example\",\n      \"title\": \"Bootstrap workspace context from a domain\"\n    },\n    {\n      \"path\": \"references/examples/graph-queries.md\",\n      \"kind\": \"example\",\n      \"title\": \"Knowledge-graph queries\"\n    },\n    {\n      \"path\": \"references/examples/lifecycle.md\",\n      \"kind\": \"example\",\n      \"title\": \"Context repo lifecycle\"\n    },\n    {\n      \"path\": \"references/response-shapes.md\",\n      \"kind\": \"reference\",\n      \"title\": \"Response shapes\"\n    },\n    {\n      \"path\": \"references/troubleshooting.md\",\n      \"kind\": \"reference\",\n      \"title\": \"Troubleshooting\"\n    }\n  ],\n  \"contentHash\": \"acb6e5b489d3f9d992a99e64f1751295a1ade188bf82dd9adc607ba81ed71c96\"\n}\n\nArchive v1.2.2: 11 files, 31627 bytes\n\nFiles: references/conventions.md (9247b), references/examples/authoring.md (8476b), references/examples/bootstrap-from-domain.md (12239b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6103b), references/response-shapes.md (4898b), references/troubleshooting.md (5786b), skill-card.md (2803b), skill-metadata.json (1329b), SKILL.md (17588b), _meta.json (132b)\n\nFile v1.2.2:SKILL.md\n\n---\nname: cargo-context\ndescription: \"Read and write the workspace GTM knowledge base — the git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals — plus its runtime sandbox and typed knowledge graph. Triggers: \\\"document our ICP\\\", \\\"write up this persona\\\", \\\"what is our positioning\\\", \\\"add a battlecard\\\", \\\"capture this objection\\\", \\\"what do we know about <segment>\\\", \\\"update our context\\\", \\\"what is in the context repo\\\", \\\"who do we sell to\\\". Skip when: discovering who actually buys from you by analyzing won/lost data — that is cargo-gtm (this skill writes the conclusion down, it does not derive it); storing structured records rather than prose — use cargo-storage; attaching documents to an agent for RAG — use cargo-content.\"\nversion: \"1.2.2\"\ncompatibility: Requires @cargo-ai/cli (npm). Sign in or create an account with `cargo-ai login --email` (emailed code, no browser), `--oauth`, or an API token\nhomepage: https://github.com/getcargohq/cargo-skills\nmetadata:\n  author: getcargo\n  openclaw:\n    requires:\n      bins:\n        - cargo-ai\n    install:\n      - kind: node\n        package: \"@cargo-ai/cli@latest\"\n        bins:\n          - cargo-ai\n    homepage: https://github.com/getcargohq/cargo-skills\n---\n\n# Cargo CLI — Context\n\nThe **context** is a git-backed repository of typed markdown/MDX files that captures a workspace's GTM knowledge (company narrative, ICPs, personas, plays, proof, objections, etc.) and is read/written by both humans and agents. The `cargo-ai context` domain has two subdomains you'll use:\n\n- **runtime** — browse, read, write, edit, and execute against the workspace's runtime sandbox (a checked-out copy of the context repo). `write`/`edit` are pushed to the default branch; `execute` runs are **not** pushed.\n- **graph** — build/load the knowledge graph derived from every markdown/MDX file in the context repo.\n\n> The canonical example of a context repository is [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces). Read its `README.md` to understand the domain layout and file conventions before writing new entries.\n> For uploading runtime-independent files (CSVs, PDFs) used in batch runs, use [`cargo-workspace-management`](../cargo-workspace-management/SKILL.md) (`cargo-ai workspaceManagement file upload`) instead.\n> For RAG file attachments to agents, use [`cargo-ai`](../cargo-ai/SKILL.md) (`cargo-ai content file upload`).\n\n> See `references/conventions.md` for the full context repo structure and per-domain templates.\n> See `references/response-shapes.md` for the JSON shapes returned by each `cargo-ai context` command.\n> See `references/troubleshooting.md` for common errors and how to fix them.\n> See `references/examples/authoring.md` for end-to-end add / edit / delete recipes.\n> See `references/examples/lifecycle.md` for the bootstrap + refresh-from-calls playbook.\n> See `references/examples/graph-queries.md` for inspecting the knowledge graph.\n\n## Bootstrap\n\nAlready signed in (`cargo-ai whoami` returns a workspace)? Skip to the next section.\n\n```bash\nnpm install -g @cargo-ai/cli            # no global install? prefix every command with `npx @cargo-ai/cli`\ncargo-ai login --email you@company.com  # emailed code, no browser; creates the account on first use\n                                        # alternatives: --oauth (browser) · --token <api-token> (CI)\ncargo-ai whoami                         # confirm the active workspace before any write\n```\n\nEvery command prints JSON to stdout; failures exit non-zero with `{\"errorMessage\": \"...\"}`. Anything that creates a run or a batch is async — pass `--wait-until-finished` or poll the matching `get`. `runtime write` and `runtime edit` commit and push to the workspace's context repo, so confirming `workspace.name` first is non-negotiable. When the full skill bundle is installed, [`../cargo/references/prerequisites.md`](../cargo/references/prerequisites.md) adds the CLI version pin, token scopes, and the admin-only surface.\n\n## Discover the context first\n\nBefore editing anything, see what's in the context repo:\n\n```bash\ncargo-ai context runtime browse                 # list entries at the runtime sandbox root\ncargo-ai context graph get                      # full knowledge graph derived from the repo's md/mdx files\n```\n\n## Quick reference\n\n```bash\n# Runtime sandbox (checked-out copy of the context repo)\ncargo-ai context runtime browse [--path <path>]\ncargo-ai context runtime read --path <path> [--start-line <n>] [--end-line <n>]\ncargo-ai context runtime write --path <path> --content <content> [--commit-message <message>]\ncargo-ai context runtime edit --path <path> --old-string <old> --new-string <new> [--commit-message <message>]\ncargo-ai context runtime execute --command <command> [--args <json>]\n\n# Knowledge graph\ncargo-ai context graph get\n```\n\n## Runtime sandbox\n\nThe **runtime sandbox** is a checked-out, executable copy of the context repository. It's the surface you use to read and modify context files, and to run commands against them.\n\nTwo important behaviors to remember:\n\n- **`write` and `edit` push to the default branch** of the context repo. They are not local-only.\n- **`execute` does *not* push.** Changes made to files by a shell command run via `execute` stay in the sandbox and are discarded — use `execute` for builds, tests, or inspection, not for committing edits.\n\n**Uploaded content files are available read-only under `.files/`.** The workspace's `content file` uploads (PDFs, CSVs, text — see [`cargo-content`](../cargo-content/SKILL.md)) appear in the sandbox under a `.files/` directory, so a command run via `execute` (or `read`/`browse`) can consume them — e.g. `cargo-ai context runtime execute --command ls --args '[\"-1\",\".files\"]'`. It sits **outside the committed context tree**: the sandbox's auto-commit skips it, so nothing under `.files/` is ever pushed to the context repo, and you can't add or change content files from here (use `cargo-ai content file …` instead).\n\nBecause writes push immediately, **confirm the target workspace before the first `write`/`edit`**:\n\n```bash\ncargo-ai whoami   # → workspace.uuid, workspace.name\n```\n\nRead the workspace name back to the user. If the session is for a specific client, make sure `workspace.name` matches before authoring anything — there is no dry-run mode. If `workspace.name` is generic or ambiguous (e.g. \"Main\", \"Test\", a person's name, an internal codename), don't guess — ask the user for the company name and canonical domain (`example.com`) and confirm both before the first write. If you logged in without pinning a workspace, re-run `cargo-ai login --oauth --workspace-uuid <uuid>` (or `--token <workspace-scoped-token>` for non-interactive use).\n\nEdits derived from sales-call analysis should be applied **one at a time with human review**, not batched. Looping an agent over many calls tends to overweight the loudest signal and miss nuance — see `references/examples/lifecycle.md` for the call-refresh playbook.\n\n### Browse and read\n\n```bash\n# List entries at the root of the runtime sandbox\ncargo-ai context runtime browse\n\n# List entries under a subpath (e.g. a domain folder like persona/ or play/)\ncargo-ai context runtime browse --path persona\n\n# Read a full file\ncargo-ai context runtime read --path persona/vp-sales-mid-market.md\n\n# Read only a line range (1-indexed, inclusive on both ends)\ncargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40\n```\n\n### Write a new file\n\n`write` creates (or overwrites) a file and pushes a commit to the default branch.\n\nBegin every `.md`/`.mdx` file with a YAML frontmatter block setting `title` and `description`. Frontmatter is **not validated** — a file with missing, empty, or malformed frontmatter is still written and committed; it just indexes poorly in the graph (a missing `title` falls back to the filename, the node summary to the first paragraph). `write` can still fail for other reasons — `repositoryNotFound`, `syncConflict`, `syncFailed`, `failedToWrite`, or `deniedPath` (e.g. writing under `.files/`); see `references/response-shapes.md`.\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/vp-sales-mid-market.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: VP of Sales, mid-market\ndescription: Owns pipeline, quota, and rep productivity at a 200–2,000-person company.\n---\n\n## Role\n- Title: VP of Sales\n- Seniority: Executive\n- Function: Revenue\n- Reports to: CRO or CEO\n\n## KPIs\n- New ARR, win rate, pipeline coverage, rep ramp time\n\n## Pains\n- Pipeline gaps, slow ramp, low rep activity, forecasting drift\n\n## Motivations\n- Hit the number, build a repeatable motion, get visibility\n\n## Day-to-day\nForecast calls, deal reviews, pipeline reviews, 1:1s with frontline managers.\n\n## Preferred channels\n- medium/linkedin-outbound\n- medium/exec-warm-intro\n\n## Common objections\n- objection/we-already-have-an-ai-sdr\n\n## How we land\nLead with pipeline-coverage math, not features.\nEOF\n)\" \\\n  --commit-message \"Add VP of Sales mid-market persona\"\n```\n\n### Edit an existing file\n\n`edit` replaces a single exact substring. `--old-string` must occur **exactly once** in the file; pass an empty `--new-string` to delete the match.\n\n`edit` does not validate frontmatter — an edit that strips or empties `title`/`description` still applies, so keep the block intact to keep the node discoverable. `edit` can fail for other reasons, though: `stringNotFound` / `stringNotUnique` (the `--old-string` match), `fileNotFound`, `noOp` (new string equals old), `syncConflict` / `syncFailed`, `failedToEdit`, or `deniedPath`.\n\n```bash\n# Replace one specific sentence\ncargo-ai context runtime edit \\\n  --path global/positioning.md \\\n  --old-string \"We help RevOps automate workflows.\" \\\n  --new-string \"We help RevOps run AI-native GTM motions.\" \\\n  --commit-message \"Refresh positioning one-liner\"\n\n# Delete a line (pass empty --new-string)\ncargo-ai context runtime edit \\\n  --path persona/vp-sales-mid-market.md \\\n  --old-string \"\\n- Outdated stat: 4.2x pipeline\\n\" \\\n  --new-string \"\"\n```\n\nFor larger restructures, prefer `write` (full-file overwrite) over many sequential `edit` calls.\n\n### Execute a command in the sandbox\n\n`execute` runs a shell command in the sandbox. Useful for inspecting structure or running checks; **changes are not pushed**.\n\n```bash\n# Find every file that cross-references a specific slug\ncargo-ai context runtime execute \\\n  --command grep \\\n  --args '[\"-r\",\"-l\",\"persona/vp-sales-mid-market\",\".\"]'\n\n# Count entries per domain\ncargo-ai context runtime execute --command ls --args '[\"-1\",\"persona\"]'\n\n# Run a one-shot script (no quotes/escaping needed inside --command beyond JSON for args)\ncargo-ai context runtime execute --command pwd\n```\n\n`--args` is a JSON array of string arguments. Omit it for a no-arg command.\n\n## Context repository structure and conventions\n\nThe Cargo context repo is a typed knowledge base. The canonical example — and the source of the conventions below — is [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces); read its `README.md` and `_template.md` files in each domain before writing new entries. For the full domain reference, see `references/conventions.md`.\n\n### Domains\n\n| Domain | Purpose |\n|---|---|\n| `global/` | Company-level context: mission, voice, positioning, narrative, pricing |\n| `icp/` | Ideal Customer Profile segments |\n| `persona/` | Buyer personas (roles inside an ICP) |\n| `jtbd/` | Jobs-to-be-done framings |\n| `alternative/` | Competitors, substitutes, status quo |\n| `client/` | Customer profiles, case studies, reference accounts |\n| `insight/` | Market insights and observations |\n| `medium/` | Channel playbooks (email, LinkedIn, cold call, etc.) |\n| `objection/` | Objections + responses + proof |\n| `play/` | GTM plays (signal → audience → channel → sequence → outcome) |\n| `proof/` | Atomic proof points (metrics, quotes, case data) |\n| `signal/` | Buying signals and intent triggers |\n\n### File conventions\n\n- **Filename:** `kebab-case.md` (e.g. `vp-sales-mid-market.md`).\n- **Frontmatter:** start every `.md`/`.mdx` file with YAML frontmatter setting `title` and `description`. This is a **strong convention, not enforced** — a write with missing, empty, or malformed frontmatter is still created and committed; it just indexes poorly. The graph reads `title` (fallback: filename) and `summary` (fallback: the file's first paragraph); it does **not** read `description`, so add a `summary:` if you want to control the node summary. See [Source references and graph edges](#source-references-and-graph-edges).\n- **Cross-references:** use the `domain/slug` form, **no `.md` extension** (e.g. `persona/vp-sales-mid-market`). To register as a graph **edge** a reference must use one of the three link forms below — a bare `domain/slug` (or file path) in plain prose creates no edge.\n- **Templates:** each domain ships an `_template.md`. Read it (`cargo-ai context runtime read --path persona/_template.md`) before authoring a new entry. `_template.*` files are excluded from the graph — never reference them.\n\n### Source references and graph edges\n\nThe knowledge graph is built from every `.md`, `.mdx`, `.yaml`, and `.yml` file in the repo (any folder; only `.git/` is excluded). Each file is a node, but **edges are created only from three forms** — anything else is invisible to the graph:\n\n1. **Frontmatter `references:` list** (preferred for source citations — keeps prose clean):\n   ```yaml\n   ---\n   title: AgoraPulse expansion thesis\n   description: Why AgoraPulse is ready for a multi-thread expansion play.\n   references:\n     - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n   ---\n   ```\n2. **A Markdown link** in the body — standard `[label]` followed immediately by `(path)` syntax, where the target is the file path, e.g. an anchor linking to `outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md`.\n3. **Wikilinks** in the body (extension optional): `[[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes]]`.\n\nKey constraints:\n\n- **Never cite a source as a bare path in prose** (e.g. a `Source:` line that just mentions `outputs/sales-notes/foo.md` as text) — it is not parsed and creates **no** edge.\n- **Prefer root-relative paths** (resolved from the repo root first, then relative to the citing file) so links work regardless of where the document lives.\n- **Extensions are optional** — the resolver auto-tries `.md`, `.mdx`, `.yaml`, `.yml` in that order. Including the extension is fine.\n- **The target must exist** or the edge is **broken** (a dead link in the graph UI). Verify with `runtime browse` before citing.\n- For docs with a **Source**/**Evidence** section, cite the files in frontmatter `references:`; use inline markdown links when the citation needs surrounding prose. Full rules: `references/conventions.md`.\n\n### Workflow: add a new entry\n\n1. Confirm the target domain and copy its template:\n   ```bash\n   cargo-ai context runtime read --path persona/_template.md\n   ```\n2. `write` a new file at `<domain>/<slug>.md` with `title` + `description` and the body sections filled in.\n3. Add cross-refs (`domain/slug`) where useful — keep them bidirectional when it makes sense.\n4. Rebuild the knowledge graph to verify the new entry and its links:\n   ```bash\n   cargo-ai context graph get\n   ```\n\nFor full per-domain templates and worked examples, see `references/conventions.md` and `references/examples/authoring.md`.\n\n### Workflow: bootstrap and refresh\n\nTo stand up a new workspace's context repo from scratch, or to refresh an existing one on a cadence, follow the two-phase lifecycle in `references/examples/lifecycle.md`:\n\n1. **Bootstrap (one-time):** seed `global/`, `persona/`, `client/`, `proof/`, `objection/`, `signal/` from public sources, then open a fresh agent session against the seeded repo. For the prescriptive, automatable version (domain in → files out, idempotent, with credit budget), use `references/examples/bootstrap-from-domain.md`.\n2. **Refresh (every 2–4 weeks):** pull the last ~3 months of sales-call transcripts → analyze one at a time, human-in-the-loop → apply a repetition threshold before promoting any claim to context → validate by generating sequence permutations → diff the graph before/after and retire stale entries.\n\nThe repetition threshold (how many calls a claim must appear in before it lands in context) is documented in `references/conventions.md`.\n\n## Knowledge graph\n\n`context graph get` builds (or loads from cache) the knowledge graph over every markdown/MDX file in the context repo. Use it to:\n\n- Audit cross-references between domains (e.g. find personas that link to plays with no proof attached).\n- Discover what already exists before writing a new entry (avoid duplicates).\n- Power downstream agents that need the typed structure of the workspace's context.\n\n```bash\ncargo-ai context graph get\n```\n\nThe response includes the parsed frontmatter and outbound `domain/slug` references for each node — pipe it through `jq` to slice it. See `references/examples/graph-queries.md` for ready-to-run queries.\n\n## Help\n\nEvery command supports `--help`:\n\n```bash\ncargo-ai context --help\ncargo-ai context runtime browse --help\ncargo-ai context runtime read --help\ncargo-ai context runtime write --help\ncargo-ai context runtime edit --help\ncargo-ai context runtime execute --help\ncargo-ai context graph get --help\n```\n\nFile v1.2.2:_meta.json\n\n{\n  \"ownerId\": \"kn7by8t6yt9yghbxtxz6hv0bts87k6bq\",\n  \"slug\": \"cargo-context\",\n  \"version\": \"1.2.2\",\n  \"publishedAt\": 1787874219208\n}\n\nFile v1.2.2:references/conventions.md\n\n# Context repo conventions\n\nThe conventions below are inherited from the canonical context repository [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces). When in doubt, read its `README.md` and the `_template.md` file in the relevant domain.\n\n## Domains\n\n| Domain | Purpose |\n|---|---|\n| `global/` | Company-level context: mission, voice, positioning, narrative, pricing |\n| `icp/` | Ideal Customer Profile segments |\n| `persona/` | Buyer personas (roles inside an ICP) |\n| `jtbd/` | Jobs-to-be-done framings |\n| `alternative/` | Competitors, substitutes, status quo |\n| `client/` | Customer profiles, case studies, reference accounts |\n| `insight/` | Market insights and observations |\n| `medium/` | Channel playbooks (email, LinkedIn, cold call, etc.) |\n| `objection/` | Objections + responses + proof |\n| `play/` | GTM plays (signal → audience → channel → sequence → outcome) |\n| `proof/` | Atomic proof points (metrics, quotes, case data) |\n| `signal/` | Buying signals and intent triggers |\n\n## File conventions\n\n- **Filename:** `kebab-case.md` (e.g. `vp-sales-mid-market.md`). Use ASCII letters, digits, and hyphens only.\n- **Frontmatter:** YAML with `title` and `description` on every `.md`/`.mdx` file. This is a **strong convention, not enforced** — a write with missing, empty, or malformed frontmatter is still committed; it just indexes poorly. The graph reads `title` (fallback: filename) and `summary` (fallback: first paragraph), **not** `description`. See [Source references and the knowledge graph](#source-references-and-the-knowledge-graph).\n- **Cross-references:** `domain/slug` form, **no `.md` extension** (e.g. `persona/vp-sales-mid-market`). To register as a graph **edge**, a reference must appear as a wikilink, a markdown link, or a frontmatter `references:` entry (see below) — a bare `domain/slug` or file path in plain prose is not parsed.\n- **Templates:** each domain ships an `_template.md`. Read it (`cargo-ai context runtime read --path <domain>/_template.md`) before authoring a new entry. `_template.*` files are excluded from the graph — never reference them.\n- **Bidirectional links:** keep cross-refs symmetric when it makes sense — a `play` that targets a `persona` should appear in the persona's `Preferred channels` or `How we land` sections when relevant.\n\n## Source references and the knowledge graph\n\nThe graph is built from **every `.md`, `.mdx`, `.yaml`, and `.yml` file** in the repo (any folder; only `.git/` is excluded). Each file becomes a node. **Edges are created only from these three forms** — everything else is invisible to the graph:\n\n1. **Frontmatter `references:` list** (preferred for source citations — keeps prose clean, and the edge carries a `frontmatter` origin):\n\n   ```yaml\n   ---\n   title: AgoraPulse expansion thesis\n   description: Why the AgoraPulse account is ready for a multi-thread expansion play.\n   references:\n     - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n   ---\n   ```\n\n2. **A Markdown link in the body** — use when the citation needs surrounding prose. Write standard `[label]` immediately followed by `(path)` link syntax pointing at the source file, e.g. an \"AgoraPulse session outcomes\" anchor linking to `outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md`.\n\n3. **Wikilinks in the body** (extension optional):\n\n   ```markdown\n   [[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes]]\n   ```\n\n### Linking rules\n\n- **Never cite a source as a bare path in prose.** A `Source:` line that just mentions `outputs/sales-notes/foo.md` as plain text is **not** parsed and creates **no** edge. Always use one of the three forms above.\n- **Prefer root-relative paths.** Paths resolve root-relative first (from the repo root), then relative to the citing file's directory. Root-relative paths work regardless of where the citing document lives.\n- **Extensions are optional.** The resolver auto-tries `.md`, `.mdx`, `.yaml`, `.yml` (in that preference order). Including the extension is fine too.\n- **The target must exist.** A reference only resolves if the target file is actually in the repo — nonexistent targets become **broken** edges (dead links in the graph UI). Verify the path before citing it (`cargo-ai context runtime browse --path <dir>`).\n- **`_template.*` files are excluded** from the graph — don't reference `_template.md` / `.mdx` / `.yaml` / `.yml`.\n- **YAML data files:** `title`, `summary`, and `references` are read from top-level keys; YAML bodies produce no link edges.\n- **Node title/summary:** titles come from frontmatter `title:` (fallback: filename); summaries from frontmatter `summary:` (fallback: the body's first paragraph, truncated to 280 chars). The graph does **not** read `description` — set a `summary:` if you want the node summary to differ from the first paragraph. Always set `title` so the node is discoverable.\n\n### Citing sources in insight / learning documents\n\nWhen a document has a **Source** or **Evidence** section, cite the source files in **frontmatter `references:`** — this keeps the prose clean and gives the edges a `frontmatter` origin. Use inline markdown links when the citation needs surrounding prose.\n\n## How to read the context\n\nStart at `global/` for company context. Walk `icp/` → `persona/` → `jtbd/` to understand the buyer. Use `play/` for outbound motions and `objection/` + `proof/` for live conversations.\n\n## Domain templates\n\nThe most commonly authored domains. For domains not shown here (`icp/`, `jtbd/`, `alternative/`, `client/`, `insight/`, `medium/`, `signal/`), read the in-repo `_template.md` directly:\n\n```bash\ncargo-ai context runtime read --path icp/_template.md\ncargo-ai context runtime read --path signal/_template.md\n# ...\n```\n\n### `global/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Summary\n\n_One-line version._\n\n## Detail\n\n_Full version. Mission, voice, positioning, narrative, pricing — whatever this entry is._\n\n## Source\n\n_Where this comes from. Founder note, brand doc, board deck, prior conversation._\n```\n\n### `persona/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Role\n\n- Title:\n- Seniority:\n- Function:\n- Reports to:\n\n## KPIs\n\n-\n\n## Pains\n\n-\n\n## Motivations\n\n-\n\n## Day-to-day\n\n_What this person actually does on a Tuesday._\n\n## Preferred channels\n\n_Cross-ref `medium/...`._\n\n-\n\n## Common objections\n\n_Cross-ref `objection/...`._\n\n-\n\n## How we land\n\n_The angle, the pitch, the moment they get it._\n```\n\n### `play/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Hypothesis\n\n_Why this play should work. The bet._\n\n## Trigger\n\n_Cross-ref `signal/...`._\n\n-\n\n## Audience\n\n_Cross-ref `icp/...` or `persona/...`._\n\n-\n\n## Channel\n\n_Cross-ref `medium/...`._\n\n-\n\n## Sequence\n\n1.\n2.\n3.\n\n## Proof\n\n_Cross-ref `proof/...`._\n\n-\n\n## Success metric\n\n_What we measure. Target._\n\n## Owner\n\n_Role accountable for running this._\n\n## Variants\n\n-\n```\n\n### `proof/_template.md`\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Type\n\n_metric | quote | case | benchmark | screenshot_\n\n## Content\n\n_The actual proof point. Number, quote, fact._\n\n## Source\n\n_Where it comes from. Customer, study, internal data._\n\n## Client\n\n_Optional. Cross-ref `client/...`._\n\n## Context\n\n_What claim this supports. Why we cite it._\n\n## Use cases\n\n_Where this shows up: objections, plays, posts, decks._\n\n-\n```\n\n### `objection/_template.md`\n\nObjections pair a stated buyer concern with the response and the proof that backs it up:\n\n```markdown\n---\ntitle:\ndescription:\n---\n\n## Objection\n\n_The buyer's stated concern, in their own words._\n\n## Response\n\n_Our reframe. Short, calm, specific._\n\n## Proof\n\n_Cross-ref `proof/...`._\n\n-\n\n## Personas\n\n_Cross-ref `persona/...` — who raises this most._\n\n-\n```\n\n## Authoring rules of thumb\n\n- **One concept per file.** If you're tempted to add a second `## Persona` or a second `## Play` heading inside one file, you actually want two files.\n- **Title is a label, description is a hook.** `title` shows up in lists; `description` is the one-line that explains why this entry exists.\n- **Cross-refs over duplication.** If a fact already lives in `proof/...`, link to it from the play or objection rather than re-stating it.\n- **Atomic proof.** Each `proof/` entry is one fact / quote / metric. Bundled proof points break filtering in the knowledge graph.\n- **Repetition threshold for call-derived claims.** A single sales call is anecdote, not evidence. Before promoting an objection / pain / missed-proof claim from call analysis into the context repo, require it to surface across multiple calls. Suggested defaults:\n  - Call-rich workspaces (≥ 50 transcripts / quarter): **3 occurrences**.\n  - Medium volume: **2 occurrences**.\n  - New / call-poor workspaces (< 10 transcripts): **1 occurrence**, and cite the source via frontmatter `references:` (or a markdown link) so the citation registers as a graph edge — see [Source references and the knowledge graph](#source-references-and-the-knowledge-graph).\n  The threshold applies to claims, not to facts a call directly confirms (a named customer, a verbatim quote, a competitor explicitly mentioned). See `examples/lifecycle.md` for the full refresh loop.\n\nFile v1.2.2:references/examples/authoring.md\n\n# Authoring examples\n\nEnd-to-end recipes for adding, editing, and removing entries in the context repo. All examples assume you're authenticated (`cargo-ai whoami` works) and that the workspace already has a context repository configured.\n\n> **Lead with frontmatter.** Every `.md`/`.mdx` write below starts with a YAML block carrying `title` and `description`. This is a strong convention, **not enforced** — a file with missing or malformed frontmatter is still committed, it just indexes poorly (the graph falls back to the filename for `title` and the first paragraph for the summary). To cite a source file so it shows up as a **graph edge**, list it in frontmatter `references:` (or use a markdown link / wikilink) — a bare path in prose creates no edge. See `../conventions.md` for the full linking rules.\n\n## Discover before writing\n\n```bash\n# 1. What domains exist?\ncargo-ai context runtime browse\n\n# 2. What's already in the target domain? (avoid duplicates)\ncargo-ai context runtime browse --path persona\n\n# 3. What's the shape of an entry in this domain?\ncargo-ai context runtime read --path persona/_template.md\n```\n\n## Add a persona\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/head-of-revops.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: Head of RevOps\ndescription: Owns the GTM tech stack, data quality, and pipeline reporting at a 200–2,000-person B2B SaaS.\n---\n\n## Role\n\n- Title: Head of RevOps / Director of RevOps\n- Seniority: Director / VP\n- Function: Revenue Operations\n- Reports to: CRO or COO\n\n## KPIs\n\n- Pipeline velocity, forecast accuracy, data freshness, CRM hygiene, lead-to-opp conversion\n\n## Pains\n\n- Stale enrichment, broken CRM workflows, slow rep ramp because the data model is brittle\n- Stitching together 6 point tools that don't talk to each other\n- Manual segment refreshes for plays\n\n## Motivations\n\n- One source of truth across SDR, AE, CS\n- Replace fragile Zapier chains with durable workflows\n- Get out of the way of the frontline\n\n## Day-to-day\n\nOps standup, reviewing failed syncs, building a new segment for an outbound play, fielding rep requests, and weekly forecast prep with the CRO.\n\n## Preferred channels\n\n_Cross-ref `medium/...`._\n\n- medium/peer-community-slack\n- medium/founder-led-linkedin\n\n## Common objections\n\n_Cross-ref `objection/...`._\n\n- objection/we-already-have-clay\n- objection/we-built-this-in-house\n\n## How we land\n\nLead with the stack-replacement angle: \"one durable workflow runtime that replaces enrichment + scoring + sync.\" Show, don't tell — run a workflow live against their domain on the demo call.\nEOF\n)\" \\\n  --commit-message \"Add Head of RevOps persona\"\n```\n\n## Add a play with cross-refs\n\n```bash\ncargo-ai context runtime write \\\n  --path play/funding-triggered-outbound.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: Funding-triggered outbound\ndescription: Reach out to companies within 14 days of a Series A–C raise with a hiring-and-stack angle.\n---\n\n## Hypothesis\n\nCompanies hit a stack-and-headcount inflection right after a raise. If we land in the first two weeks with a stack-replacement angle, we beat the procurement freeze that sets in by week 4.\n\n## Trigger\n\n_Cross-ref `signal/...`._\n\n- signal/series-a-funding-announcement\n- signal/series-b-funding-announcement\n\n## Audience\n\n_Cross-ref `icp/...` or `persona/...`._\n\n- icp/post-series-a-b2b-saas\n- persona/head-of-revops\n\n## Channel\n\n_Cross-ref `medium/...`._\n\n- medium/founder-led-linkedin\n- medium/cold-email-personalized\n\n## Sequence\n\n1. Day 0: LinkedIn connect + congratulations note (no pitch).\n2. Day 3: Personalized email referencing the raise + a single relevant stack-replacement angle.\n3. Day 7: Follow-up with one proof point (cross-ref `proof/customer-x-replaced-three-tools`).\n4. Day 14: Break-up message.\n\n## Proof\n\n_Cross-ref `proof/...`._\n\n- proof/customer-x-replaced-three-tools\n- proof/14-day-time-to-first-workflow\n\n## Success metric\n\nReply rate ≥ 12% on Day 3 email; meetings booked / 100 contacted ≥ 4.\n\n## Owner\n\nOutbound AE pod lead.\n\n## Variants\n\n- Same play, swap LinkedIn for warm intro when one exists (cross-ref `medium/exec-warm-intro`).\nEOF\n)\" \\\n  --commit-message \"Add funding-triggered outbound play\"\n```\n\n## Add a proof point\n\nKeep `proof/` atomic — one metric or quote per file:\n\n```bash\ncargo-ai context runtime write \\\n  --path proof/14-day-time-to-first-workflow.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: 14-day time to first workflow\ndescription: New customers ship their first production workflow within 14 days of signing.\n---\n\n## Type\n\nmetric\n\n## Content\n\nAcross the last 24 customers (Q1–Q3), median time from contract signature to first production workflow run was 14 days; P90 was 27 days.\n\n## Source\n\nInternal customer success tracker, pulled 2025-10-15.\n\n## Client\n\n_Aggregate across customers — no single cross-ref._\n\n## Context\n\nUsed to counter the \"another tool we'll never deploy\" objection. Pairs well with `objection/we-already-have-clay`.\n\n## Use cases\n\n- objection/we-already-have-clay\n- play/funding-triggered-outbound\n- Sales decks, slide 9 (\"Time to value\")\nEOF\n)\" \\\n  --commit-message \"Add 14-day time-to-first-workflow proof point\"\n```\n\n## Cite a source in an insight / learning doc\n\nWhen an entry is derived from a specific source file in the repo (a sales-note, a call summary, a research output), cite it in frontmatter `references:` so the citation registers as a **graph edge** with a `frontmatter` origin. Prefer root-relative paths, and confirm the target exists first (`cargo-ai context runtime browse --path outputs/sales-notes`).\n\n```bash\ncargo-ai context runtime write \\\n  --path insight/agorapulse-expansion-readiness.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: AgoraPulse expansion readiness\ndescription: Why the AgoraPulse account is ready for a multi-thread expansion play.\nreferences:\n  - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n---\n\n## Summary\n\nAgoraPulse surfaced three net-new buying centers in the last build session — strong signal for a multi-thread expansion.\n\n## Evidence\n\nDrawn from the [[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes|June 5 build-session outcomes]]: the champion named two adjacent teams already evaluating workflow tooling.\nEOF\n)\" \\\n  --commit-message \"Add AgoraPulse expansion readiness insight\"\n```\n\nBoth the frontmatter `references:` entry and the body wikilink (the `|` sets the display text) resolve to the same node — a bare `Source: outputs/sales-notes/...` line in prose would not. A standard Markdown link to the same file works too.\n\n## Edit a single line\n\n```bash\ncargo-ai context runtime edit \\\n  --path global/positioning.md \\\n  --old-string \"We help RevOps automate workflows.\" \\\n  --new-string \"We help RevOps run AI-native GTM motions.\" \\\n  --commit-message \"Refresh positioning one-liner\"\n```\n\n## Delete a line from a file\n\n```bash\n# Read first to copy the exact line (whitespace must match!)\ncargo-ai context runtime read --path persona/head-of-revops.md --start-line 18 --end-line 22\n\ncargo-ai context runtime edit \\\n  --path persona/head-of-revops.md \\\n  --old-string \"- Stitching together 6 point tools that don't talk to each other\\n\" \\\n  --new-string \"\" \\\n  --commit-message \"Drop outdated pain point on Head of RevOps\"\n```\n\n## Rename / move an entry\n\nThere's no `rename` command. Use `write` at the new path, then delete the old file with `execute` + push by overwriting it with `write` after removing — easier path: write the new file, then leave the old one in place until you're ready to remove it (a follow-up `write` with empty content is not supported; deletes happen via the GitHub UI or via `execute` followed by a manual commit step in the Cargo app).\n\nFor most renames, the cleanest sequence is:\n\n1. `write` the new file at the new path.\n2. Update every file that cross-refs the old slug — find them with `execute` + `grep`:\n   ```bash\n   cargo-ai context runtime execute --command grep --args '[\"-r\",\"-l\",\"persona/old-slug\",\".\"]'\n   ```\n3. For each match, `edit` the cross-ref `persona/old-slug` → `persona/new-slug`.\n4. Delete the stale file via the GitHub UI (file the rename in a single PR if your context repo uses PR review).\n\n## Verify your work\n\n```bash\n# Confirm the file is in place\ncargo-ai context runtime read --path persona/head-of-revops.md\n\n# Confirm it lights up in the graph and its cross-refs resolve\ncargo-ai context graph get | jq '.nodes[] | select(.slug == \"persona/head-of-revops\")'\n```\n\nFile v1.2.2:references/examples/bootstrap-from-domain.md\n\n# Bootstrap workspace context from a domain\n\nThe prescriptive, automatable version of Phase 1 of [`lifecycle.md`](lifecycle.md). Use this when the user wants to **seed an empty (or thin) context repo from public data**, starting from nothing more than their company's domain. The recipe enriches the company via cargo native + waterfall + theirStack, scrapes public sources in parallel sub-agents, and writes one file per atomic concept through `cargo-ai context runtime write` — skipping any domain that already has content.\n\nOutput: a populated `global/`, `icp/`, `persona/`, `client/`, `proof/`, `signal/` (and where evidence supports it, `alternative/`, `objection/`, `insight/`) — enough that a fresh agent session can hold a coherent conversation about the company. Phase 2 (call-driven refinement) is deliberately out of scope here — see the \"What this recipe does NOT do\" section.\n\n**Trigger phrases:**\n- *\"Set up my workspace context from acme.com.\"*\n- *\"Bootstrap the context repo — my domain is acme.com.\"*\n- *\"Fill in the ICP and personas from our website.\"*\n- *\"My workspace is empty, just use our domain to populate everything.\"*\n\n## What this recipe exercises\n\n- `cargo-ai context runtime browse` / `graph get` for the idempotency check.\n- Cargo native enrichments (`matchBusiness`, `enrichBusinessFirmographics`, `enrichBusinessTechnographics`, `enrichBusinessFundingAndAcquisitions`) for the factual spine.\n- Parallel sub-agents for public-source scraping (website, careers, blog, news, review sites).\n- The driving agent's native LLM to synthesize each digest into typed markdown matching the per-domain template (no `cargo-ai orchestration action execute` double-hop — that pattern is for workflow node graphs, not for an agent already in the loop).\n- `cargo-ai context runtime write` to commit one file per concept.\n\n## Required inputs\n\nBefore executing, the agent needs:\n1. **`domain`** (required) — canonical domain (`acme.com`), no protocol, no path.\n2. **`companyName`** (optional) — falls back to whatever cargo native returns from `matchBusiness`.\n3. **`depth`** (optional, default `standard`) — `minimal` (global + 1 icp + 2 personas), `standard` (full domain coverage), `deep` (also scrapes G2/Capterra/Reddit/HN for objections + alternatives).\n\nIf `domain` is missing, ask **once** and stop. Don't guess from the user's email — workspace domain and user email often diverge.\n\n## Recipe\n\n### Step 1 — Confirm the target workspace\n\nEach Cargo workspace maps to one company. `runtime write` pushes immediately. Wrong workspace = polluted repo for someone else.\n\n```bash\ncargo-ai whoami\n# → user.email, workspace.uuid, workspace.name\n```\n\nRead back `workspace.name` to the user and confirm it matches the company the `domain` belongs to. **Stop and ask** if the name is generic (`\"Main\"`, `\"Test\"`, a person's name, an internal codename) — workspace names are user-set and frequently don't match the customer-facing brand.\n\n**Non-interactive mode** (server-side trigger from signup, scheduled job, etc.): skip the read-back if `domain` was passed in at session start *and* `workspace.uuid` was pinned at login. The capture point at signup is the authority — don't add a blocking question that breaks the automation.\n\n### Step 2 — Idempotency check (the \"if not exists\" part)\n\nInventory what's already in the repo so we only fill gaps, never overwrite:\n\n```bash\ncargo-ai context runtime browse > /tmp/ctx-browse.json\ncargo-ai context graph get > /tmp/ctx-graph.json\n\n# Count entries per domain (excluding _template.md)\njq -r '.files[] | select(.path | test(\"^[^/]+/[^_].*\\\\.md$\")) | (.path | split(\"/\")[0])' /tmp/ctx-browse.json \\\n  | sort | uniq -c\n```\n\nBuild a skip-list: any domain (`global/`, `icp/`, etc.) with ≥ 2 non-template entries is considered \"already seeded\" — leave it alone. **Print the skip-list to the user** before any writes so they see what wasn't touched and can override.\n\nFor domains that exist but are thin (1 entry), still write *new* files into them, but never `runtime edit` an existing file in bootstrap mode. Edits are for the refresh phase (see [Phase 2](lifecycle.md#phase-2--refresh-from-real-calls)), not bootstrap.\n\n### Step 3 — Enrich the seed with cargo native (factual spine)\n\nRun these in parallel — they give you the factual scaffolding (industry, headcount, tech stack, funding) every downstream synthesis step will cite:\n\n```bash\n# Match the domain to a cargo business_id\ncargo-ai orchestration action execute \\\n  --action '{\"kind\":\"connector\",\"integrationSlug\":\"cargo\",\"actionSlug\":\"matchBusiness\"}' \\\n  --data '{\"domain\":\"acme.com\"}' \\\n  --wait-until-finished > /tmp/match.json\n\nBUSINESS_ID=$(jq -r '.output.business_id' /tmp/match.json)\n\n# Parallel enrichments — same business_id, four different signal families\nfor action in enrichBusinessFirmographics enrichBusinessTechnographics enrichBusinessFundingAndAcquisitions enrichBusinessFinancialMetrics; do\n  cargo-ai orchestration action execute \\\n    --action \"$(jq -nc --arg a \"$action\" '{kind:\"connector\",integrationSlug:\"cargo\",actionSlug:$a}')\" \\\n    --data \"{\\\"business_id\\\":\\\"$BUSINESS_ID\\\"}\" \\\n    --wait-until-finished > /tmp/enrich-$action.json &\ndone\nwait\n```\n\nIf `matchBusiness` returns no `business_id`, fall back to website scraping only (Step 4) — note in every written file's `## Source` section that firmographics were unavailable.\n\n### Step 4 — Scrape public sources in parallel sub-agents\n\nSpawn one sub-agent per source. Each returns a **structured digest** (key claims + source URL), never raw HTML. Suggested fan-out:\n\n| Sub-agent | Source URLs | Lands in |\n|---|---|---|\n| Website core | `https://<domain>`, `/about`, `/product`, `/pricing`, `/customers` | `global/positioning`, `global/narrative`, `global/mission`, `global/pricing`, `client/...` |\n| Careers | `/careers`, `/jobs`, LinkedIn jobs | `persona/...`, `signal/hiring-intent-...` |\n| Blog & launches | `/blog`, `/changelog`, `/news` | `insight/...`, `proof/...` |\n| News & funding | Google News, Crunchbase summary | `signal/funding-...`, `proof/...` |\n| Reviews *(depth=deep only)* | G2, Capterra | `objection/...`, `alternative/...` |\n| Communities *(depth=deep only)* | Reddit, HN search | `objection/...`, `insight/...` |\n\nFor each digest, require a `source_url` per claim. **Skip anything you cannot source** — a thin context beats a fabricated one.\n\n### Step 5 — Synthesize and write per domain\n\nFor each domain you intend to populate, read the template first so frontmatter (`title`, `description`) and section structure are valid. Missing `title` or `description` **breaks the knowledge graph**.\n\n```bash\n# Always read the template first\ncargo-ai context runtime read --path global/_template.md\ncargo-ai context runtime read --path persona/_template.md\ncargo-ai context runtime read --path icp/_template.md\ncargo-ai context runtime read --path client/_template.md\ncargo-ai context runtime read --path proof/_template.md\ncargo-ai context runtime read --path signal/_template.md\n```\n\nThen synthesize one markdown file per atomic concept **directly** — the agent running this recipe is already an LLM, so don't double-hop through `cargo-ai orchestration action execute` to call Anthropic / OpenAI. That pattern is for batch synthesis inside a workflow node graph (Play/Tool); here, the agent has the digest in context and can produce the file body itself.\n\nFor each domain, the agent should:\n\n1. Read the template (already done above) and the relevant digest from Step 4.\n2. Produce one complete markdown body per concept, including frontmatter (`title` + `description`, both required), section structure from the template, and source URLs cited in `## Source` or `## Day-to-day`.\n3. Write each file with `cargo-ai context runtime write`. **One concept per file** — if you're tempted to write two `## Persona` headings into one file, split into two files instead.\n\nExample for `persona/` (after the agent has drafted `vp-engineering.md` from the careers digest):\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/vp-engineering.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: VP of Engineering\ndescription: Senior engineering leader at 50-500 person SaaS companies, owns platform reliability and developer productivity.\n---\n\n## Role\n- Title: VP of Engineering\n- Seniority: Executive\n- Function: Engineering\n- Reports to: CTO or CEO\n\n## KPIs\n- ...\n\n## Source\n- https://acme.com/careers/vp-engineering\nEOF\n)\"\n```\n\n### Step 6 — Verify and report\n\nRe-run the graph to confirm the writes landed and surface any orphan cross-refs:\n\n```bash\ncargo-ai context graph get > /tmp/ctx-graph-after.json\n\n# Node delta\necho \"Before: $(jq '.nodes | length' /tmp/ctx-graph.json)\"\necho \"After:  $(jq '.nodes | length' /tmp/ctx-graph-after.json)\"\n\n# Orphans (nodes referenced but not authored)\njq -r '.edges[] | select(.target.exists == false) | \"\\(.source.path) → \\(.target.path)\"' /tmp/ctx-graph-after.json\n```\n\nReport to the user:\n- Files written, grouped by domain.\n- Domains skipped (from Step 2).\n- Orphan cross-refs (these usually mean the synthesis referenced a `persona/x` that wasn't actually written — either author the missing file or rewrite the reference).\n\n## Credit budget\n\n| Step | Cost per call | Calls (depth=standard) | Subtotal |\n|---|---|---|---|\n| matchBusiness | 0.5 | 1 | 0.5 |\n| enrichBusinessFirmographics | 0.5 | 1 | 0.5 |\n| enrichBusinessTechnographics | 1 | 1 | 1 |\n| enrichBusinessFundingAndAcquisitions | 0.5 | 1 | 0.5 |\n| enrichBusinessFinancialMetrics | 0.5 | 1 | 0.5 |\n| Public-source scrapes (sub-agents) | 0 (agent LLM tokens, not Cargo credits) | 4–6 | 0 |\n| Synthesis (agent native) | 0 (agent LLM tokens, not Cargo credits) | 6–8 | 0 |\n| context runtime write | 0 | 15–30 files | 0 |\n| **Total (standard)** | | | **~3 Cargo credits** |\n| **Total (deep)** adds review-site + community sub-agents | | | **~3 Cargo credits** |\n\nBootstrap is one-shot per workspace. Re-running is a no-op for already-seeded domains thanks to Step 2's skip-list.\n\n## Action shape\n\n`{\"kind\":\"connector\",\"integrationSlug\":\"<slug>\",\"actionSlug\":\"<slug>\"}`. **No `connectorUuid` in `config`.**\n\n## Output deliverable\n\nA summary the agent presents to the user:\n\n```\nContext repo bootstrapped from acme.com:\n\nWritten (24 files):\n  global/         3 files  (positioning, narrative, pricing)\n  icp/            2 files  (mid-market-saas, enterprise-fintech)\n  persona/        4 files  (vp-eng, head-of-data, cto, vp-product)\n  client/         5 files  (3 enterprise, 2 mid-market)\n  proof/          7 files  (4 metrics, 3 quotes)\n  signal/         3 files  (hiring-intent-data-eng, series-c-funding, snowflake-adoption)\n\nSkipped (already had content):\n  alternative/, objection/, insight/\n\nOrphan refs: none.\n\nNext steps:\n  - Open a fresh agent session so the seeded files load clean.\n  - Refine from real sales calls — see Phase 2 of lifecycle.md.\n```\n\n## What this recipe does NOT do\n\n- **No refinement from sales calls.** That's [Phase 2 of `lifecycle.md`](lifecycle.md#phase-2--refresh-from-real-calls) — deliberately human-in-the-loop. Auto-promoting call-derived claims into context produces plausible-sounding but shallow ICPs.\n- **No `runtime edit` on existing files.** Bootstrap is additive only. Edits belong to the refresh phase.\n- **No invention.** If a claim has no `source_url`, drop it. Thin context is recoverable; fabricated context erodes trust in everything downstream.\n- **No promotion past the repetition threshold.** See [authoring rules of thumb](../conventions.md#authoring-rules-of-thumb). Bootstrap claims come from public sources, which count as one source — note the URL in the file body, don't promote to a confident assertion.\n\n## When stuck — file a workspace report\n\nIf `context runtime write` fails repeatedly, the workspace has no context repo configured, or a template has changed shape and the writes no longer match, file via:\n\n```bash\ncargo-ai workspaceManagement report create \\\n  --title \"bootstrap-from-domain: <one-line summary>\" \\\n  --description \"<exact command(s) tried, errorMessage, domain attempted, workspace.uuid>\"\n```\n\nSee [`../../../cargo-workspace-management/SKILL.md`](../../../cargo-workspace-management/SKILL.md).\n\nFile v1.2.2:references/examples/graph-queries.md\n\n# Knowledge-graph queries\n\n`cargo-ai context graph get` returns the typed knowledge graph derived from every markdown/MDX file in the context repo. Pipe it through `jq` to slice it.\n\n> Field names below (`nodes`, `slug`, `frontmatter`, `links`, etc.) are illustrative — run `cargo-ai context graph get | jq '. | keys'` once at the top of your session to confirm the exact shape for your workspace before scripting against it.\n\n## List every node\n\n```bash\ncargo-ai context graph get | jq -r '.nodes[].slug' | sort\n```\n\n## Count entries per domain\n\n```bash\ncargo-ai context graph get \\\n  | jq -r '.nodes[].slug' \\\n  | awk -F/ '{print $1}' \\\n  | sort | uniq -c | sort -rn\n```\n\n## Find every persona\n\n```bash\ncargo-ai context graph get \\\n  | jq '.nodes[] | select(.slug | startswith(\"persona/\")) | {slug, title: .frontmatter.title}'\n```\n\n## Find personas that link to a specific play\n\n```bash\ncargo-ai context graph get \\\n  | jq --arg target \"play/funding-triggered-outbound\" '\n      .nodes[]\n      | select(.slug | startswith(\"persona/\"))\n      | select((.links // []) | index($target))\n      | .slug'\n```\n\n## Find dangling cross-references\n\nNodes referencing a `domain/slug` that doesn't exist in the graph:\n\n```bash\ncargo-ai context graph get | jq '\n  . as $g\n  | ($g.nodes | map(.slug)) as $slugs\n  | $g.nodes[]\n  | .slug as $from\n  | (.links // [])[]\n  | select(. as $t | ($slugs | index($t)) | not)\n  | {from: $from, missing: .}\n'\n```\n\n## Find plays with no proof attached\n\n```bash\ncargo-ai context graph get | jq '\n  .nodes[]\n  | select(.slug | startswith(\"play/\"))\n  | select(\n      ((.links // []) | map(select(startswith(\"proof/\"))) | length) == 0\n    )\n  | .slug\n'\n```\n\n## Find objections with no proof point\n\nSame pattern as plays, scoped to objections:\n\n```bash\ncargo-ai context graph get | jq '\n  .nodes[]\n  | select(.slug | startswith(\"objection/\"))\n  | select(\n      ((.links // []) | map(select(startswith(\"proof/\"))) | length) == 0\n    )\n  | {slug, title: .frontmatter.title}\n'\n```\n\n## Show inbound references to a node\n\nWhich files cross-ref `proof/14-day-time-to-first-workflow`?\n\n```bash\ncargo-ai context graph get | jq --arg target \"proof/14-day-time-to-first-workflow\" '\n  .nodes[]\n  | select((.links // []) | index($target))\n  | .slug\n'\n```\n\n## Audit frontmatter completeness\n\nFiles missing `title` or `description`:\n\n```bash\ncargo-ai context graph get | jq '\n  .nodes[]\n  | select((.frontmatter.title // \"\") == \"\" or (.frontmatter.description // \"\") == \"\")\n  | .slug\n'\n```\n\n## Snapshot the graph to disk\n\nUseful before a bulk edit so you can diff before/after:\n\n```bash\ncargo-ai context graph get > /tmp/graph.before.json\n# ...make edits via context runtime write/edit...\ncargo-ai context graph get > /tmp/graph.after.json\ndiff <(jq -r '.nodes[].slug' /tmp/graph.before.json | sort) \\\n     <(jq -r '.nodes[].slug' /tmp/graph.after.json | sort)\n```\n\nFile v1.2.2:references/examples/lifecycle.md\n\n# Context repo lifecycle\n\nThe repeatable playbook for keeping a workspace's context repo healthy over time. Two phases: a one-time **bootstrap** from public sources (delegated to the [`bootstrap-from-domain.md`](bootstrap-from-domain.md) recipe), then a **refresh loop** driven by sales-call analysis (this doc's focus). Use this when standing up a new workspace, or as a periodic rehydration. Recommended cadence: every 2–4 weeks.\n\nThe phases are deliberately separated. Bootstrapping from public data gets you to a baseline fast; call-driven refinement is where the quality lives. Step 2 (turning a single call into context edits) cannot be safely automated end-to-end — keep a human in the loop on every edit.\n\n## Before you start — confirm the target workspace\n\nEach Cargo workspace maps to one company. `runtime write` and `runtime edit` push to **that workspace's** context repo immediately, so the first thing to do is confirm you're pointed at the right one. This matters most for consultants and operators managing several client workspaces.\n\n```bash\ncargo-ai whoami\n# → user.email, workspace.uuid, workspace.name\n```\n\nRead back the `workspace.name` to the human and confirm it matches the company you intend to harden context for. **If the name is generic or ambiguous** — `\"Main\"`, `\"Test\"`, a person's name, an internal codename, anything that doesn't unambiguously identify the company — stop and ask: \"What's the company name and canonical domain (e.g. `acme.com`)?\" Workspace names are user-set and frequently don't match the customer-facing brand; the domain is the disambiguator. If you logged in without pinning a workspace, re-login with the right one:\n\n```bash\ncargo-ai login --oauth --workspace-uuid <uuid>\n# or, non-interactive:\ncargo-ai login --token <workspace-scoped-token>\n```\n\nIf you're working across multiple clients in one session, prefix the workspace name in your notes for every claim you record — it's easy to attribute a Phase 2 insight to the wrong company otherwise.\n\n## Phase 1 — Bootstrap from public sources\n\nFor the automatable seed step, use [`bootstrap-from-domain.md`](bootstrap-from-domain.md). It takes a domain, inventories existing files via `runtime browse` + `graph get` so it only fills gaps, enriches via cargo native, scrapes public sources in parallel sub-agents, and writes one file per atomic concept through `context runtime write`.\n\nOnce the bootstrap commit lands, open a new agent session so the seeded files load clean (rather than mixed with scratch context from the bootstrap run), then continue with Phase 2.\n\n## Phase 2 — Refresh from real calls\n\nGoal: replace assumptions with evidence. Public sources tell you what the company *says*; calls tell you what prospects *do*.\n\n### 1. Pull the last ~3 months of sales calls\n\nExport transcripts from Gong / Chorus / Fathom / etc. Three months is a good default — long enough to see patterns, short enough that the language is current. For low-volume workspaces, take what you have.\n\nWhile you're there, capture a **call volume estimate** (transcripts / quarter). It drives the repetition threshold in step 2b.\n\n### 2. Analyze one call at a time, human in the loop\n\nFor each call:\n\n1. Have an agent summarize the call against the existing context: which personas were on the call, which objections came up, which proof points were referenced or missed, which signals would have flagged this account.\n2. The agent proposes edits — new `objection/...`, updated `persona/...` pains, additional `proof/...` quotes, etc.\n3. A human approves each edit before it lands via `runtime write` or `runtime edit`.\n\nDo **not** batch this. An agent processing 30 calls in a loop overweights the loudest objection and underweights nuance.\n\n### 2b. Apply a repetition threshold\n\nA single call's claim is anecdote. Before promoting a claim into context, require it to surface across multiple calls:\n\n| Workspace volume | Threshold |\n|---|---|\n| Call-rich (≥ 50 transcripts / quarter) | **3 occurrences** before commit |\n| Medium volume | **2 occurrences** |\n| New / call-poor (< 10 transcripts) | **1 occurrence** — note the source in the file body |\n\nTrack candidates in a scratch doc (or draft `insight/` entries) until they cross the threshold. The threshold applies to *claims* — objections, pains, missed proof points. It does not apply to direct facts a call confirms (a customer name, a quote attributable to one named person, a competitor explicitly mentioned).\n\n### 3. Validate by generating sequences\n\nBefore treating the context as production-ready, run permutations through the workspace's sequence-generating play or agent and read the outputs. Useful permutations:\n\n- A persona + a play + an objection\n- Two different personas with the same play\n- A play with and without a specific proof point\n\nIf the generated sequences read like a different company between permutations, the context has internal contradictions. Find them by walking the knowledge graph for orphans and conflicting cross-refs — see `graph-queries.md` for queries that catch the common cases.\n\n### 4. Push to production\n\n`runtime write` and `runtime edit` already push to the default branch — there is no separate deploy step. \"Push to production\" here means flipping downstream agents and plays to read from the refreshed context. If your workspace pins a specific branch or commit, update the pin now.\n\n### 5. Repeat every 2–4 weeks\n\nRe-run Phase 2 on a cadence. Re-run Phase 1 only when something changes materially in public sources (rebrand, new pricing, new persona launch). On each refresh:\n\n- Snapshot `cargo-ai context graph get` before and after, then diff to see what moved.\n- Retire context not referenced in the last two cycles — staleness is the failure mode, not coverage gaps.\n\n## What not to automate\n\nFull automation of steps 2 / 2b does not reach acceptable quality in practice. The nuance lives in three decisions: which claim is worth committing, which file it belongs in, and whether an existing file should be edited or a new one created. Keep a human on each of those.\n\nFile v1.2.2:references/response-shapes.md\n\n# Response shapes\n\nJSON response structures returned by Cargo CLI commands used in the `cargo-context` skill.\n\n> Unlike the workspace storage / orchestration skills, the context CLI commands return shapes that depend on the underlying file content and on the graph derived from it. Field names below are the ones used throughout this skill's examples (`nodes`, `slug`, `frontmatter`, `links`, etc.); for a given workspace, confirm the exact shape with `--help` and a one-shot invocation before scripting against it.\n\n## Error shape (every command)\n\nFailed commands exit non-zero and return:\n\n```json\n{\n  \"errorMessage\": \"...\"\n}\n```\n\n`cargo-ai context runtime edit` fails with this shape when `--old-string` matches zero or multiple times in the target file. See `references/troubleshooting.md`.\n\n## cargo-ai context runtime browse\n\nLists entries at the sandbox root (or under `--path`). Returns the directory listing — file and folder names under the requested path. Combine with `cargo-ai context runtime read --path <file>` to inspect any entry.\n\n```bash\ncargo-ai context runtime browse\ncargo-ai context runtime browse --path persona\n```\n\nRun once at the top of a session to confirm the exact JSON shape for your workspace.\n\n## cargo-ai context runtime read\n\nReturns the file content at `--path`, optionally restricted to `--start-line`/`--end-line` (1-indexed, inclusive). Use this to read frontmatter + body before editing.\n\n```bash\ncargo-ai context runtime read --path persona/vp-sales-mid-market.md\ncargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40\n```\n\n## cargo-ai context runtime write\n\nCreates (or overwrites) the file at `--path` and pushes a commit to the default branch. Returns the commit metadata. The `--commit-message` flag controls the commit subject.\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/vp-sales-mid-market.md \\\n  --content \"<file body with frontmatter>\" \\\n  --commit-message \"Add VP of Sales mid-market persona\"\n```\n\nOn failure it returns the generic error shape (see [Error shape](#error-shape-every-command)); the context-specific case to know is a denied write under `.files/` (update those via Content instead). Frontmatter is **not** validated — a file missing `title`/`description` or with malformed frontmatter is written, not rejected. Failure reasons are enumerated in `references/troubleshooting.md`.\n\n## cargo-ai context runtime edit\n\nReplaces a single exact substring in the file at `--path` and pushes a commit. `--old-string` must match **exactly once** — read the file with `runtime read` first and copy the substring verbatim, whitespace included. Pass an empty `--new-string` to delete the match. Returns the commit metadata on success.\n\n```bash\ncargo-ai context runtime edit \\\n  --path global/positioning.md \\\n  --old-string \"We help RevOps automate workflows.\" \\\n  --new-string \"We help RevOps run AI-native GTM motions.\" \\\n  --commit-message \"Refresh positioning one-liner\"\n```\n\nOn failure it returns the generic error shape — most often because `--old-string` matched zero or multiple times. Frontmatter is not validated, so an edit that strips `title`/`description` still applies. Failure reasons are enumerated in `references/troubleshooting.md`.\n\n## cargo-ai context runtime execute\n\nRuns a shell command in the sandbox and returns its stdout / stderr / exit code. **Does not push** any file changes — use only for inspection (`grep`, `ls`, `pwd`, `find`). `--args` is a JSON array of string arguments; omit for a no-arg command.\n\n```bash\ncargo-ai context runtime execute --command grep --args '[\"-r\",\"-l\",\"persona/vp-sales-mid-market\",\".\"]'\ncargo-ai context runtime execute --command ls --args '[\"-1\",\"persona\"]'\ncargo-ai context runtime execute --command pwd\n```\n\n## cargo-ai context graph get\n\nReturns the typed knowledge graph derived from every markdown/MDX file in the context repo. Shape used throughout `references/examples/graph-queries.md`:\n\n```json\n{\n  \"nodes\": [\n    {\n      \"slug\": \"persona/vp-sales-mid-market\",\n      \"frontmatter\": {\n        \"title\": \"VP of Sales, mid-market\",\n        \"description\": \"Owns pipeline, quota, and rep productivity at a 200–2,000-person company.\"\n      },\n      \"links\": [\n        \"medium/linkedin-outbound\",\n        \"medium/exec-warm-intro\",\n        \"objection/we-already-have-an-ai-sdr\"\n      ]\n    }\n  ]\n}\n```\n\n**Key fields:**\n\n- `nodes[].slug` — `domain/slug` (no `.md` extension), the canonical identifier used in cross-references.\n- `nodes[].frontmatter` — parsed YAML frontmatter. `title` and `description` are required on every file.\n- `nodes[].links` — outbound `domain/slug` references found in the body. Missing or empty when the file links nowhere.\n\nFor ready-to-run queries (count per domain, dangling references, plays missing proof, inbound references to a node), see `references/examples/graph-queries.md`.\n\nFile v1.2.2:references/troubleshooting.md\n\n# Troubleshooting\n\nCommon errors and solutions for `cargo-ai context` commands.\n\n## General\n\n**`{\"errorMessage\": \"...\"}`**\nAll failed commands exit non-zero and return an error JSON. Read the `errorMessage` for the specific issue.\n\n**`Unauthorized` / `403`**\nYour API token may lack the required permissions, or the workspace's context repository isn't configured. Verify with `cargo-ai whoami`; if a context repo hasn't been set up for the workspace, ask an admin (or do it via the Cargo app under workspace settings).\n\n## Runtime — browse / read\n\n**Path not found**\nThe path does not exist in the runtime sandbox. Use `cargo-ai context runtime browse --path <parent>` to confirm the file layout before reading. Paths are relative to the repo root, no leading slash (`persona/vp-sales.md`, not `/persona/vp-sales.md`).\n\n**Out-of-range lines**\n`--start-line` and `--end-line` are 1-indexed and inclusive on both ends. If they fall outside the file's line count the read fails. Read the file without a range first to confirm length, or omit one end (e.g. only `--start-line`) to read to EOF.\n\n## Runtime — write\n\n**Push fails / commit not appearing**\n`write` pushes to the context repo's default branch. Pushes fail if the configured GitHub connector lost permissions or the branch was deleted/renamed. Verify the connector via `cargo-ai connection connector list` and check the default-branch setting in the Cargo app under workspace settings.\n\n**No `_template.md` for the domain**\nSome workspaces customize their context repo. If a domain doesn't ship a template, browse the domain (`cargo-ai context runtime browse --path <domain>`) and model the new file after an existing entry.\n\n**Missing / empty / malformed frontmatter (not an error)**\nFrontmatter is a strong convention but **not validated** — `write` never rejects a file for a missing `title`/`description` or malformed YAML; the file is committed as-is. The graph fails soft: a missing `title` falls back to the filename, the node summary falls back to the body's first paragraph, and a malformed frontmatter block is stripped so it doesn't leak into the summary. Nothing dangles, but the node indexes poorly — set `title` (and a `summary:` if you want a specific summary) on every file. Note the graph reads `summary`, not `description`.\n\n**Other `notWritten` reasons**\n`write` can fail with `repositoryNotFound`, `syncConflict`, `syncFailed`, `failedToWrite`, or `deniedPath` (writing under `.files/` — update those via Content instead). `syncFailed` / `failedToWrite` / `deniedPath` carry an `errorMessage`. See `references/response-shapes.md`.\n\n## Runtime — edit\n\n**`--old-string` not found**\n`--old-string` did not match any substring in the file. Whitespace must match exactly — escape newlines (`\\n`) where present, and watch for trailing spaces. Read the file first and copy the substring verbatim.\n\n**`--old-string` matches more than once**\n`edit` requires the match to be unique. Add enough surrounding context to make the match unique (extend with the line before or after), or do multiple targeted edits in sequence.\n\n**Other `notEdited` reasons**\nBesides the `--old-string` cases above, `edit` can return `fileNotFound`, `noOp` (the new string equals the old), `syncConflict` / `syncFailed` (push race), `failedToEdit`, or `deniedPath` (editing under `.files/`). Frontmatter is **not** validated, so an edit that removes or empties `title`/`description` still applies — keep the block intact so the node stays discoverable.\n\n**Edits not appearing in GitHub**\n`edit` commits and pushes; `execute` does **not** push. If you ran a shell command that modified files (e.g. `sed -i`, redirecting into a file), the change stays in the ephemeral sandbox and is discarded. Use `write` or `edit` for any change that should land in git.\n\n## Runtime — execute\n\n**Command output is empty / unexpected**\nThe runtime sandbox starts clean for each call; mutations from prior `execute` calls are not preserved between invocations. Don't rely on state across `execute` runs — chain operations in a single `--command` (e.g. via `sh -c`) instead.\n\n**Side effects not pushed**\nBy design, `execute` does not commit. Use `execute` for inspection (`grep`, `ls`, `find`, counting, validation); use `write`/`edit` for any persistent change.\n\n**Argument escaping**\n`--args` is a **JSON array** of strings, not a shell-quoted list. Wrap the whole thing in single quotes so the shell doesn't mangle the JSON:\n\n```bash\n# Correct\ncargo-ai context runtime execute --command grep --args '[\"-r\",\"vp-sales\",\".\"]'\n\n# Wrong — shell will eat the inner double quotes\ncargo-ai context runtime execute --command grep --args [\"-r\",\"vp-sales\",\".\"]\n```\n\n## Graph\n\n**Stale results after writes**\n`graph get` is cached. After a series of writes, expect a short delay before the graph reflects them. Re-run after a few seconds, or restructure logic so it does not depend on immediately-fresh graph data.\n\n**Broken cross-references**\nIf a file references `domain/slug` and that target doesn't exist, the link won't resolve in the graph. Use `cargo-ai context runtime browse --path <domain>` to verify the target exists before writing the reference, or pipe `graph get` through `jq` to enumerate dangling refs (see `references/examples/graph-queries.md`).\n\n## When to escalate\n\nIf the CLI errors and `--help` plus the notes above don't get you unstuck — **file a workspace management report** rather than retrying silently. See [`cargo-workspace-management/SKILL.md`](../../cargo-workspace-management/SKILL.md) (Reports section).\n\n```bash\ncargo-ai workspaceManagement report create \\\n  --title \"context <subcommand> fails with <errorMessage>\" \\\n  --description \"Ran: cargo-ai context ...   Got: {...errorMessage...}   Expected: ...\"\n```\n\nFile v1.2.2:skill-card.md\n\n## Description:\n\nHelps an agent read and write a Cargo workspace's git-backed GTM knowledge base, use its runtime sandbox, and inspect its typed knowledge graph.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[cargo-ai](https://clawhub.ai/user/cargo-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nGTM operators, revenue teams, and their agents use this skill to inspect, author, update, and validate workspace context such as ICPs, personas, plays, proof points, objections, competitors, and buying signals.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Persistent writes or edits can update the wrong workspace context repository if the active workspace is not confirmed.\n\nMitigation: Run cargo-ai whoami and confirm the workspace name before using runtime write or runtime edit.\n\nRisk: Generated or edited GTM knowledge may be misleading, stale, or over-weighted from limited sales-call evidence.\n\nMitigation: Review generated bootstrap content and keep human approval in the loop for call-derived edits before committing them.\n\nRisk: runtime execute can run commands in the workspace sandbox and should not be treated as a place for arbitrary unreviewed commands.\n\nMitigation: Use runtime execute for inspection, builds, tests, or validation, and review commands before running them.\n\n## Reference(s):\n\n- [ClawHub cargo-context Skill Page](https://clawhub.ai/cargo-ai/skills/cargo-context)\n- [Cargo Skills Homepage](https://github.com/getcargohq/cargo-skills)\n- [Canonical Context Repository](https://github.com/getcargohq/cargo-workspaces)\n- [Context repo conventions](references/conventions.md)\n- [Response shapes](references/response-shapes.md)\n- [Troubleshooting](references/troubleshooting.md)\n- [Authoring examples](references/examples/authoring.md)\n- [Bootstrap workspace context from a domain](references/examples/bootstrap-from-domain.md)\n- [Knowledge-graph queries](references/examples/graph-queries.md)\n- [Context repo lifecycle](references/examples/lifecycle.md)\n\n##\n\nArchive v1.2.1: 11 files, 31059 bytes\n\nFiles: references/conventions.md (9247b), references/examples/authoring.md (8476b), references/examples/bootstrap-from-domain.md (12273b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6103b), references/response-shapes.md (4898b), references/troubleshooting.md (5786b), skill-card.md (2474b), skill-metadata.json (1329b), SKILL.md (16468b), _meta.json (132b)\n\nArchive v1.2.0: 10 files, 30545 bytes\n\nFiles: references/conventions.md (9247b), references/examples/authoring.md (8476b), references/examples/bootstrap-from-domain.md (12273b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6103b), references/response-shapes.md (4898b), references/troubleshooting.md (5786b), skill-card.md (2871b), SKILL.md (16420b), _meta.json (132b)\n\nArchive v1.1.0: 10 files, 26366 bytes\n\nFiles: references/conventions.md (5578b), references/examples/authoring.md (6494b), references/examples/bootstrap-from-domain.md (12273b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6103b), references/response-shapes.md (4227b), references/troubleshooting.md (4687b), skill-card.md (2907b), SKILL.md (13005b), _meta.json (132b)\n\nArchive v1.0.1: 10 files, 26321 bytes\n\nFiles: references/conventions.md (5578b), references/examples/authoring.md (6494b), references/examples/bootstrap-from-domain.md (12273b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6103b), references/response-shapes.md (4227b), references/troubleshooting.md (4687b), skill-card.md (3315b), SKILL.md (12375b), _meta.json (132b)\n\nArchive v1.0.0: 10 files, 26096 bytes\n\nFiles: references/conventions.md (5578b), references/examples/authoring.md (6494b), references/examples/bootstrap-from-domain.md (12273b), references/examples/graph-queries.md (2871b), references/examples/lifecycle.md (6103b), references/response-shapes.md (4227b), references/troubleshooting.md (4687b), skill-card.md (2750b), SKILL.md (12535b), _meta.json (132b)","readmeExcerpt":"Skill: cargo-context Owner: cargo-ai Summary: Read and write the workspace GTM knowledge base — the git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals — plus its runtime sandbox and typed knowledge graph. Triggers: \"document our ICP\", \"write up this persona\", \"what is our positioning\", \"add a battlecard\", \"capture this objection\", \"what do we know ab","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"npm install -g @cargo-ai/cli            # no global install? prefix every command with `npx @cargo-ai/cli`\ncargo-ai login --email you@company.com  # emailed code, no browser; creates the account on first use\n                                        # alternatives: --oauth (browser) · --token <api-token> (CI)\ncargo-ai whoami                         # confirm the active workspace before any write"},{"language":"bash","snippet":"cargo-ai context runtime browse                 # list entries at the runtime sandbox root\ncargo-ai context graph get                      # full knowledge graph derived from the repo's md/mdx files"},{"language":"bash","snippet":"# Runtime sandbox (checked-out copy of the context repo)\ncargo-ai context runtime browse [--path <path>]\ncargo-ai context runtime read --path <path> [--start-line <n>] [--end-line <n>]\ncargo-ai context runtime write --path <path> --content <content> [--commit-message <message>]\ncargo-ai context runtime edit --path <path> --old-string <old> --new-string <new> [--commit-message <message>]\ncargo-ai context runtime execute --command <command> [--args <json>]\n\n# Knowledge graph\ncargo-ai context graph get"},{"language":"bash","snippet":"cargo-ai whoami   # → workspace.uuid, workspace.name"},{"language":"bash","snippet":"# List entries at the root of the runtime sandbox\ncargo-ai context runtime browse\n\n# List entries under a subpath (e.g. a domain folder like persona/ or play/)\ncargo-ai context runtime browse --path persona\n\n# Read a full file\ncargo-ai context runtime read --path persona/vp-sales-mid-market.md\n\n# Read only a line range (1-indexed, inclusive on both ends)\ncargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40"},{"language":"bash","snippet":"cargo-ai context runtime write \\\n  --path persona/vp-sales-mid-market.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: VP of Sales, mid-market\ndescription: Owns pipeline, quota, and rep productivity at a 200–2,000-person company.\n---\n\n## Role\n- Title: VP of Sales\n- Seniority: Executive\n- Function: Revenue\n- Reports to: CRO or CEO\n\n## KPIs\n- New ARR, win rate, pipeline coverage, rep ramp time\n\n## Pains\n- Pipeline gaps, slow ramp, low rep activity, forecasting drift\n\n## Motivations\n- Hit the number, build a repeatable motion, get visibility\n\n## Day-to-day\nForecast calls, deal reviews, pipeline reviews, 1:1s with frontline managers.\n\n## Preferred channels\n- medium/linkedin-outbound\n- medium/exec-warm-intro\n\n## Common objections\n- objection/we-already-have-an-ai-sdr\n\n## How we land\nLead with pipeline-coverage math, not features.\nEOF\n)\" \\\n  --commit-message \"Add VP of Sales mid-market persona\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: cargo-context\ndescription: \"Read and write the workspace GTM knowledge base — the git-backed repository of markdown describing ICPs, personas, plays, proof points, objections, competitors, and signals — plus its runtime sandbox and typed knowledge graph. Triggers: \\\"document our ICP\\\", \\\"write up this persona\\\", \\\"what is our positioning\\\", \\\"add a battlecard\\\", \\\"capture this objection\\\", \\\"what do we know about <segment>\\\", \\\"update our context\\\", \\\"what is in the context repo\\\", \\\"who do we sell to\\\". Skip when: discovering who actually buys from you by analyzing won/lost data — that is cargo-gtm (this skill writes the conclusion down, it does not derive it); storing structured records rather than prose — use cargo-storage; attaching documents to an agent for RAG — use cargo-content.\"\nversion: \"1.3.0\"\ncompatibility: Requires @cargo-ai/cli (npm). Sign in or create an account with `cargo-ai login --email` (emailed code, no browser), `--oauth`, or an API token\nhomepage: https://github.com/getcargohq/cargo-skills\nmetadata:\n  author: getcargo\n  openclaw:\n    requires:\n      bins:\n        - cargo-ai\n    install:\n      - kind: node\n        package: \"@cargo-ai/cli@latest\"\n        bins:\n          - cargo-ai\n    homepage: https://github.com/getcargohq/cargo-skills\n---\n\n# Cargo CLI — Context\n\nThe **context** is a git-backed repository of typed markdown/MDX files that captures a workspace's GTM knowledge (company narrative, ICPs, personas, plays, proof, objections, etc.) and is read/written by both humans and agents. The `cargo-ai context` domain has two subdomains you'll use:\n\n- **runtime** — browse, read, write, edit, and execute against the workspace's runtime sandbox (a checked-out copy of the context repo). `write`/`edit` are pushed to the default branch; `execute` runs are **not** pushed.\n- **graph** — build/load the knowledge graph derived from every markdown/MDX file in the context repo.\n\n> The canonical example of a context repository is [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces). Read its `README.md` to understand the domain layout and file conventions before writing new entries.\n> For uploading runtime-independent files (CSVs, PDFs) used in batch runs, use [`cargo-workspace-management`](../cargo-workspace-management/SKILL.md) (`cargo-ai workspaceManagement file upload`) instead.\n> For RAG file attachments to agents, use [`cargo-ai`](../cargo-ai/SKILL.md) (`cargo-ai content file upload`).\n\n> See `references/conventions.md` for the full context repo structure and per-domain templates.\n> See `references/response-shapes.md` for the JSON shapes returned by each `cargo-ai context` command.\n> See `references/troubleshooting.md` for common errors and how to fix them.\n> See `references/examples/authoring.md` for end-to-end add / edit / delete recipes.\n> See `references/examples/lifecycle.md` for the bootstrap + refresh-from-calls playbook.\n> See `references/examples/graph-queries.md` for inspecting the know"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7by8t6yt9yghbxtxz6hv0bts87k6bq\",\n  \"slug\": \"cargo-context\",\n  \"version\": \"1.3.0\",\n  \"publishedAt\": 1788392474742\n}"},{"path":"references/conventions.md","content":"# Context repo conventions\n\nThe conventions below are inherited from the canonical context repository [`getcargohq/cargo-workspaces`](https://github.com/getcargohq/cargo-workspaces). When in doubt, read its `README.md` and the `_template.md` file in the relevant domain.\n\n## Domains\n\n| Domain | Purpose |\n|---|---|\n| `global/` | Company-level context: mission, voice, positioning, narrative, pricing |\n| `icp/` | Ideal Customer Profile segments |\n| `persona/` | Buyer personas (roles inside an ICP) |\n| `jtbd/` | Jobs-to-be-done framings |\n| `alternative/` | Competitors, substitutes, status quo |\n| `client/` | Customer profiles, case studies, reference accounts |\n| `insight/` | Market insights and observations |\n| `medium/` | Channel playbooks (email, LinkedIn, cold call, etc.) |\n| `objection/` | Objections + responses + proof |\n| `play/` | GTM plays (signal → audience → channel → sequence → outcome) |\n| `proof/` | Atomic proof points (metrics, quotes, case data) |\n| `signal/` | Buying signals and intent triggers |\n\n## File conventions\n\n- **Filename:** `kebab-case.md` (e.g. `vp-sales-mid-market.md`). Use ASCII letters, digits, and hyphens only.\n- **Frontmatter:** YAML with `title` and `description` on every `.md`/`.mdx` file. This is a **strong convention, not enforced** — a write with missing, empty, or malformed frontmatter is still committed; it just indexes poorly. The graph reads `title` (fallback: filename) and `summary` (fallback: first paragraph), **not** `description`. See [Source references and the knowledge graph](#source-references-and-the-knowledge-graph).\n- **Cross-references:** `domain/slug` form, **no `.md` extension** (e.g. `persona/vp-sales-mid-market`). To register as a graph **edge**, a reference must appear as a wikilink, a markdown link, or a frontmatter `references:` entry (see below) — a bare `domain/slug` or file path in plain prose is not parsed.\n- **Templates:** each domain ships an `_template.md`. Read it (`cargo-ai context runtime read --path <domain>/_template.md`) before authoring a new entry. `_template.*` files are excluded from the graph — never reference them.\n- **Bidirectional links:** keep cross-refs symmetric when it makes sense — a `play` that targets a `persona` should appear in the persona's `Preferred channels` or `How we land` sections when relevant.\n\n## Source references and the knowledge graph\n\nThe graph is built from **every `.md`, `.mdx`, `.yaml`, and `.yml` file** in the repo (any folder; only `.git/` is excluded). Each file becomes a node. **Edges are created only from these three forms** — everything else is invisible to the graph:\n\n1. **Frontmatter `references:` list** (preferred for source citations — keeps prose clean, and the edge carries a `frontmatter` origin):\n\n   ```yaml\n   ---\n   title: AgoraPulse expansion thesis\n   description: Why the AgoraPulse account is ready for a multi-thread expansion play.\n   references:\n     - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md\n   -"},{"path":"references/examples/authoring.md","content":"# Authoring examples\n\nEnd-to-end recipes for adding, editing, and removing entries in the context repo. All examples assume you're authenticated (`cargo-ai whoami` works) and that the workspace already has a context repository configured.\n\n> **Lead with frontmatter.** Every `.md`/`.mdx` write below starts with a YAML block carrying `title` and `description`. This is a strong convention, **not enforced** — a file with missing or malformed frontmatter is still committed, it just indexes poorly (the graph falls back to the filename for `title` and the first paragraph for the summary). To cite a source file so it shows up as a **graph edge**, list it in frontmatter `references:` (or use a markdown link / wikilink) — a bare path in prose creates no edge. See `../conventions.md` for the full linking rules.\n\n## Discover before writing\n\n```bash\n# 1. What domains exist?\ncargo-ai context runtime browse\n\n# 2. What's already in the target domain? (avoid duplicates)\ncargo-ai context runtime browse --path persona\n\n# 3. What's the shape of an entry in this domain?\ncargo-ai context runtime read --path persona/_template.md\n```\n\n## Add a persona\n\n```bash\ncargo-ai context runtime write \\\n  --path persona/head-of-revops.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: Head of RevOps\ndescription: Owns the GTM tech stack, data quality, and pipeline reporting at a 200–2,000-person B2B SaaS.\n---\n\n## Role\n\n- Title: Head of RevOps / Director of RevOps\n- Seniority: Director / VP\n- Function: Revenue Operations\n- Reports to: CRO or COO\n\n## KPIs\n\n- Pipeline velocity, forecast accuracy, data freshness, CRM hygiene, lead-to-opp conversion\n\n## Pains\n\n- Stale enrichment, broken CRM workflows, slow rep ramp because the data model is brittle\n- Stitching together 6 point tools that don't talk to each other\n- Manual segment refreshes for plays\n\n## Motivations\n\n- One source of truth across SDR, AE, CS\n- Replace fragile Zapier chains with durable workflows\n- Get out of the way of the frontline\n\n## Day-to-day\n\nOps standup, reviewing failed syncs, building a new segment for an outbound play, fielding rep requests, and weekly forecast prep with the CRO.\n\n## Preferred channels\n\n_Cross-ref `medium/...`._\n\n- medium/peer-community-slack\n- medium/founder-led-linkedin\n\n## Common objections\n\n_Cross-ref `objection/...`._\n\n- objection/we-already-have-clay\n- objection/we-built-this-in-house\n\n## How we land\n\nLead with the stack-replacement angle: \"one durable workflow runtime that replaces enrichment + scoring + sync.\" Show, don't tell — run a workflow live against their domain on the demo call.\nEOF\n)\" \\\n  --commit-message \"Add Head of RevOps persona\"\n```\n\n## Add a play with cross-refs\n\n```bash\ncargo-ai context runtime write \\\n  --path play/funding-triggered-outbound.md \\\n  --content \"$(cat <<'EOF'\n---\ntitle: Funding-triggered outbound\ndescription: Reach out to companies within 14 days of a Series A–C raise with a hiring-and-stack angle.\n---\n\n## Hypothesis\n\nCompanies hit a stack-and-headcount inflection r"},{"path":"references/examples/bootstrap-from-domain.md","content":"# Bootstrap workspace context from a domain\n\nThe prescriptive, automatable version of Phase 1 of [`lifecycle.md`](lifecycle.md). Use this when the user wants to **seed an empty (or thin) context repo from public data**, starting from nothing more than their company's domain. The recipe enriches the company via aiArk + builtwith + enrichCrm + theirStack, scrapes public sources in parallel sub-agents, and writes one file per atomic concept through `cargo-ai context runtime write` — skipping any domain that already has content.\n\nOutput: a populated `global/`, `icp/`, `persona/`, `client/`, `proof/`, `signal/` (and where evidence supports it, `alternative/`, `objection/`, `insight/`) — enough that a fresh agent session can hold a coherent conversation about the company. Phase 2 (call-driven refinement) is deliberately out of scope here — see the \"What this recipe does NOT do\" section.\n\n**Trigger phrases:**\n- *\"Set up my workspace context from acme.com.\"*\n- *\"Bootstrap the context repo — my domain is acme.com.\"*\n- *\"Fill in the ICP and personas from our website.\"*\n- *\"My workspace is empty, just use our domain to populate everything.\"*\n\n## What this recipe exercises\n\n- `cargo-ai context runtime browse` / `graph get` for the idempotency check.\n- Domain-keyed enrichments (`aiArk.enrichCompany`, `builtwith.getDomainSummary`, `enrichCrm.getFunding`) for the factual spine.\n- Parallel sub-agents for public-source scraping (website, careers, blog, news, review sites).\n- The driving agent's native LLM to synthesize each digest into typed markdown matching the per-domain template (no `cargo-ai orchestration action execute` double-hop — that pattern is for workflow node graphs, not for an agent already in the loop).\n- `cargo-ai context runtime write` to commit one file per concept.\n\n## Required inputs\n\nBefore executing, the agent needs:\n1. **`domain`** (required) — canonical domain (`acme.com`), no protocol, no path.\n2. **`companyName`** (optional) — falls back to whatever `aiArk.enrichCompany` returns for the domain.\n3. **`depth`** (optional, default `standard`) — `minimal` (global + 1 icp + 2 personas), `standard` (full domain coverage), `deep` (also scrapes G2/Capterra/Reddit/HN for objections + alternatives).\n\nIf `domain` is missing, ask **once** and stop. Don't guess from the user's email — workspace domain and user email often diverge.\n\n## Recipe\n\n### Step 1 — Confirm the target workspace\n\nEach Cargo workspace maps to one company. `runtime write` pushes immediately. Wrong workspace = polluted repo for someone else.\n\n```bash\ncargo-ai whoami\n# → user.email, workspace.uuid, workspace.name\n```\n\nRead back `workspace.name` to the user and confirm it matches the company the `domain` belongs to. **Stop and ask** if the name is generic (`\"Main\"`, `\"Test\"`, a person's name, an internal codename) — workspace names are user-set and frequently don't match the customer-facing brand.\n\n**Non-interactive mode** (server-side trigger from signup, scheduled job, etc.): skip "}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":2374,"uniquenessScore":42,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T14:19:58.602Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T17:34:50.581Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}