cargo-context

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Cargo CLI — Context

Cargo CLI — Context

The 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:
  • 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.
  • graph — build/load the knowledge graph derived from every markdown/MDX file in the context repo.
The canonical example of a context repository is
getcargohq/cargo-workspaces
. Read its
README.md
to understand the domain layout and file conventions before writing new entries. For uploading runtime-independent files (CSVs, PDFs) used in batch runs, use
cargo-workspace-management
(
cargo-ai workspaceManagement file upload
) instead. For RAG file attachments to agents, use
cargo-ai
(
cargo-ai content file upload
).
See
references/conventions.md
for the full context repo structure and per-domain templates. See
references/response-shapes.md
for the JSON shapes returned by each
cargo-ai context
command. See
references/troubleshooting.md
for common errors and how to fix them. See
references/examples/authoring.md
for end-to-end add / edit / delete recipes. See
references/examples/lifecycle.md
for the bootstrap + refresh-from-calls playbook. See
references/examples/graph-queries.md
for inspecting the knowledge graph.
Context 是一个由git托管的仓库,存储类型化的markdown/MDX文件,用于记录工作区的GTM知识(公司叙事、理想客户画像ICPs、用户角色、策略方案、案例证明、异议处理等),支持人类和Agent共同读写。
cargo-ai context
包含两个你会用到的子模块:
  • runtime — 浏览、读取、写入、编辑工作区的运行时沙箱(即context仓库的检出副本),并在其中执行命令。
    write
    /
    edit
    操作会推送到默认分支;
    execute
    执行的操作不会推送。
  • graph — 构建/加载从context仓库中所有markdown/MDX文件衍生而来的知识图谱。
context仓库的标准示例为
getcargohq/cargo-workspaces
。在编写新条目之前,请阅读其
README.md
以了解领域布局和文件规范。 若要上传批量运行中使用的独立于运行时的文件(如CSV、PDF),请使用
cargo-workspace-management
cargo-ai workspaceManagement file upload
)。 若要为Agent上传RAG附件文件,请使用
cargo-ai
cargo-ai content file upload
)。
完整的context仓库结构和各领域模板请查看
references/conventions.md
。 每个
cargo-ai context
命令返回的JSON格式请查看
references/response-shapes.md
。 常见错误及修复方法请查看
references/troubleshooting.md
。 端到端的添加/编辑/删除操作示例请查看
references/examples/authoring.md
。 初始化+从通话记录刷新的操作指南请查看
references/examples/lifecycle.md
。 知识图谱查询示例请查看
references/examples/graph-queries.md

Prerequisites

前置条件

See
../cargo/references/prerequisites.md
for install, login (
--oauth
/
--token
), JSON output conventions, and error shapes. Verify the session with
cargo-ai whoami
before running any of the commands below —
runtime write
and
runtime edit
push commits to the workspace's context repo, so confirming
workspace.name
first is non-negotiable.
安装、登录(
--oauth
/
--token
)、JSON输出规范及错误格式请查看
../cargo/references/prerequisites.md
。在运行以下任何命令之前,请使用
cargo-ai whoami
验证会话 —
runtime write
runtime edit
会向工作区的context仓库推送提交,因此必须先确认
workspace.name

Discover the context first

先了解当前context内容

Before editing anything, see what's in the context repo:
bash
cargo-ai context runtime browse                 # list entries at the runtime sandbox root
cargo-ai context graph get                      # full knowledge graph derived from the repo's md/mdx files
在编辑任何内容之前,请先查看context仓库中的现有内容:
bash
cargo-ai context runtime browse                 # 列出运行时沙箱根目录下的条目
cargo-ai context graph get                      # 获取从仓库md/mdx文件衍生的完整知识图谱

Quick reference

快速参考

bash
undefined
bash
undefined

Runtime sandbox (checked-out copy of the context repo)

运行时沙箱(context仓库的检出副本)

cargo-ai context runtime browse [--path <path>] cargo-ai context runtime read --path <path> [--start-line <n>] [--end-line <n>] cargo-ai context runtime write --path <path> --content <content> [--commit-message <message>] cargo-ai context runtime edit --path <path> --old-string <old> --new-string <new> [--commit-message <message>] cargo-ai context runtime execute --command <command> [--args <json>]
cargo-ai context runtime browse [--path <path>] cargo-ai context runtime read --path <path> [--start-line <n>] [--end-line <n>] cargo-ai context runtime write --path <path> --content <content> [--commit-message <message>] cargo-ai context runtime edit --path <path> --old-string <old> --new-string <new> [--commit-message <message>] cargo-ai context runtime execute --command <command> [--args <json>]

Knowledge graph

知识图谱

cargo-ai context graph get
undefined
cargo-ai context graph get
undefined

Runtime sandbox

运行时沙箱

The 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.
Two important behaviors to remember:
  • write
    and
    edit
    push to the default branch
    of the context repo. They are not local-only.
  • 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.
Uploaded content files are available read-only under
.files/
.
The workspace's
content file
uploads (PDFs, CSVs, text — see
cargo-content
) 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).
Because writes push immediately, confirm the target workspace before the first
write
/
edit
:
bash
cargo-ai whoami   # → workspace.uuid, workspace.name
Read 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).
Edits 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.
运行时沙箱是context仓库的一个已检出、可执行的副本。你可以通过它读取和修改context文件,并在其中运行命令。
请记住两个重要行为:
  • write
    edit
    会推送到context仓库的默认分支
    ,它们不是仅本地生效的操作。
  • execute
    操作不会推送
    。通过
    execute
    运行shell命令对文件做出的更改仅保留在沙箱中,最终会被丢弃 — 请将
    execute
    用于构建、测试或检查操作,而非提交编辑内容。
上传的内容文件在
.files/
目录下为只读状态
。工作区的
content file
上传文件(PDF、CSV、文本 — 详见
cargo-content
)会出现在沙箱的
.files/
目录中,因此通过
execute
(或
read
/
browse
)运行的命令可以读取这些文件 — 例如
cargo-ai context runtime execute --command ls --args '["-1",".files"]'
。该目录位于已提交的context树之外:沙箱的自动提交会跳过它,因此
.files/
下的任何内容都不会推送到context仓库,你也无法在此添加或修改内容文件(请改用
cargo-ai content file …
)。
由于写入操作会立即推送,在首次执行
write
/
edit
之前请确认目标工作区
bash
cargo-ai whoami   # → workspace.uuid, workspace.name
将工作区名称告知用户。如果会话针对特定客户,请确保
workspace.name
匹配后再编写任何内容 — 本工具没有试运行模式。如果
workspace.name
通用或模糊(例如"Main"、"Test"、人名、内部代号),请勿猜测 — 请询问用户公司名称和规范域名(如
example.com
),确认两者匹配后再执行首次写入。如果登录时未绑定工作区,请重新运行
cargo-ai login --oauth --workspace-uuid <uuid>
(非交互式使用请用
--token <workspace-scoped-token>
)。
从销售通话分析得出的编辑内容应分批提交并由人工逐一审核,而非批量处理。让Agent循环处理多个通话记录往往会过度放大最明显的信号,忽略细节 — 请查看
references/examples/lifecycle.md
中的通话记录刷新指南。

Browse and read

浏览与读取

bash
undefined
bash
undefined

List entries at the root of the runtime sandbox

列出运行时沙箱根目录下的条目

cargo-ai context runtime browse
cargo-ai context runtime browse

List entries under a subpath (e.g. a domain folder like persona/ or play/)

列出子路径下的条目(例如persona/或play/等领域文件夹)

cargo-ai context runtime browse --path persona
cargo-ai context runtime browse --path persona

Read a full file

读取完整文件

cargo-ai context runtime read --path persona/vp-sales-mid-market.md
cargo-ai context runtime read --path persona/vp-sales-mid-market.md

Read only a line range (1-indexed, inclusive on both ends)

仅读取指定行范围(从1开始计数,包含起止行)

cargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40
undefined
cargo-ai context runtime read --path play/inbound-trial-to-paid.md --start-line 1 --end-line 40
undefined

Write a new file

写入新文件

write
creates (or overwrites) a file and pushes a commit to the default branch.
Begin 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
.
bash
cargo-ai context runtime write \
  --path persona/vp-sales-mid-market.md \
  --content "$(cat <<'EOF'
---
title: VP of Sales, mid-market
description: Owns pipeline, quota, and rep productivity at a 200–2,000-person company.
---
write
用于创建(或覆盖)文件,并向默认分支推送提交。
每个
.md
/
.mdx
文件开头都应包含一个YAML前置块,设置
title
description
。前置块不做验证 — 缺少、为空或格式错误的前置块仍会被写入并提交,但会导致其在图谱中的索引效果不佳(缺少
title
会回退使用文件名,节点摘要会回退使用第一段内容)。
write
仍可能因其他原因失败:
repositoryNotFound
syncConflict
syncFailed
failedToWrite
deniedPath
(例如写入
.files/
目录下);详情请查看
references/response-shapes.md
bash
cargo-ai context runtime write \
  --path persona/vp-sales-mid-market.md \
  --content "$(cat <<'EOF'
---
title: VP of Sales, mid-market
description: Owns pipeline, quota, and rep productivity at a 200–2,000-person company.
---

Role

Role

  • Title: VP of Sales
  • Seniority: Executive
  • Function: Revenue
  • Reports to: CRO or CEO
  • Title: VP of Sales
  • Seniority: Executive
  • Function: Revenue
  • Reports to: CRO or CEO

KPIs

KPIs

  • New ARR, win rate, pipeline coverage, rep ramp time
  • New ARR, win rate, pipeline coverage, rep ramp time

Pains

Pains

  • Pipeline gaps, slow ramp, low rep activity, forecasting drift
  • Pipeline gaps, slow ramp, low rep activity, forecasting drift

Motivations

Motivations

  • Hit the number, build a repeatable motion, get visibility
  • Hit the number, build a repeatable motion, get visibility

Day-to-day

Day-to-day

Forecast calls, deal reviews, pipeline reviews, 1:1s with frontline managers.
Forecast calls, deal reviews, pipeline reviews, 1:1s with frontline managers.

Preferred channels

Preferred channels

  • medium/linkedin-outbound
  • medium/exec-warm-intro
  • medium/linkedin-outbound
  • medium/exec-warm-intro

Common objections

Common objections

  • objection/we-already-have-an-ai-sdr
  • objection/we-already-have-an-ai-sdr

How we land

How we land

Lead with pipeline-coverage math, not features. EOF )"
--commit-message "Add VP of Sales mid-market persona"
undefined
Lead with pipeline-coverage math, not features. EOF )"
--commit-message "Add VP of Sales mid-market persona"
undefined

Edit an existing file

编辑现有文件

edit
replaces a single exact substring.
--old-string
must occur exactly once in the file; pass an empty
--new-string
to delete the match.
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
.
bash
undefined
edit
用于替换单个精确子字符串。
--old-string
在文件中必须恰好出现一次;传入空的
--new-string
即可删除匹配内容。
edit
不验证前置块 — 若编辑操作删除或清空
title
/
description
,仍会生效,因此请保持前置块完整以确保节点可被发现。
edit
仍可能因其他原因失败:
stringNotFound
/
stringNotUnique
--old-string
匹配问题)、
fileNotFound
noOp
(新字符串与旧字符串相同)、
syncConflict
/
syncFailed
failedToEdit
deniedPath
bash
undefined

Replace one specific sentence

替换特定句子

cargo-ai context runtime edit
--path global/positioning.md
--old-string "We help RevOps automate workflows."
--new-string "We help RevOps run AI-native GTM motions."
--commit-message "Refresh positioning one-liner"
cargo-ai context runtime edit
--path global/positioning.md
--old-string "We help RevOps automate workflows."
--new-string "We help RevOps run AI-native GTM motions."
--commit-message "Refresh positioning one-liner"

Delete a line (pass empty --new-string)

删除一行(传入空的--new-string)

cargo-ai context runtime edit
--path persona/vp-sales-mid-market.md
--old-string "\n- Outdated stat: 4.2x pipeline\n"
--new-string ""

For larger restructures, prefer `write` (full-file overwrite) over many sequential `edit` calls.
cargo-ai context runtime edit
--path persona/vp-sales-mid-market.md
--old-string "\n- Outdated stat: 4.2x pipeline\n"
--new-string ""

对于较大规模的重构,建议使用`write`(全文件覆盖)而非多次连续的`edit`调用。

Execute a command in the sandbox

在沙箱中执行命令

execute
runs a shell command in the sandbox. Useful for inspecting structure or running checks; changes are not pushed.
bash
undefined
execute
用于在沙箱中运行shell命令。适用于检查结构或运行校验;更改不会被推送
bash
undefined

Find every file that cross-references a specific slug

查找所有引用特定slug的文件

cargo-ai context runtime execute
--command grep
--args '["-r","-l","persona/vp-sales-mid-market","."]'
cargo-ai context runtime execute
--command grep
--args '["-r","-l","persona/vp-sales-mid-market","."]'

Count entries per domain

统计各领域的条目数量

cargo-ai context runtime execute --command ls --args '["-1","persona"]'
cargo-ai context runtime execute --command ls --args '["-1","persona"]'

Run a one-shot script (no quotes/escaping needed inside --command beyond JSON for args)

运行单次脚本(--command内无需额外转义,args遵循JSON格式即可)

cargo-ai context runtime execute --command pwd

`--args` is a JSON array of string arguments. Omit it for a no-arg command.
cargo-ai context runtime execute --command pwd

`--args`是字符串参数的JSON数组。无参数命令可省略该选项。

Context repository structure and conventions

Context仓库结构与规范

The Cargo context repo is a typed knowledge base. The canonical example — and the source of the conventions below — is
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
.
Cargo context仓库是一个类型化知识库。以下规范的标准示例为
getcargohq/cargo-workspaces
;在编写新条目之前,请阅读其
README.md
和各领域下的
_template.md
文件。完整的领域参考请查看
references/conventions.md

Domains

领域分类

DomainPurpose
global/
Company-level context: mission, voice, positioning, narrative, pricing
icp/
Ideal Customer Profile segments
persona/
Buyer personas (roles inside an ICP)
jtbd/
Jobs-to-be-done framings
alternative/
Competitors, substitutes, status quo
client/
Customer profiles, case studies, reference accounts
insight/
Market insights and observations
medium/
Channel playbooks (email, LinkedIn, cold call, etc.)
objection/
Objections + responses + proof
play/
GTM plays (signal → audience → channel → sequence → outcome)
proof/
Atomic proof points (metrics, quotes, case data)
signal/
Buying signals and intent triggers
领域用途
global/
公司级上下文:使命、品牌调性、定位、叙事、定价
icp/
理想客户画像细分
persona/
购买者角色(ICP内的具体职位)
jtbd/
待完成工作框架
alternative/
竞争对手、替代方案、现状
client/
客户档案、案例研究、参考客户
insight/
市场洞察与观察
medium/
渠道操作手册(邮件、LinkedIn、冷呼叫等)
objection/
异议处理+回复+案例证明
play/
GTM策略方案(信号→受众→渠道→流程→结果)
proof/
原子化证明点(指标、引用、案例数据)
signal/
购买信号与意向触发因素

File conventions

文件规范

  • Filename:
    kebab-case.md
    (e.g.
    vp-sales-mid-market.md
    ).
  • 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.
  • 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.
  • 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.
  • 文件名: 使用
    kebab-case.md
    格式(例如
    vp-sales-mid-market.md
    )。
  • 前置块: 每个
    .md
    /
    .mdx
    文件开头都应包含YAML前置块,设置
    title
    description
    。这是一个强规范而非强制要求 — 缺少、为空或格式错误的前置块仍会被创建并提交,但会导致索引效果不佳。图谱会读取
    title
    (回退为文件名)和
    summary
    (回退为文件第一段);不会读取
    description
    ,因此若要控制节点摘要,请添加
    summary:
    字段。详见源引用与图谱边
  • 交叉引用: 使用
    domain/slug
    格式,无需
    .md
    扩展名
    (例如
    persona/vp-sales-mid-market
    )。若要将注册为图谱,引用必须使用以下三种链接形式之一 — 纯文本中的裸
    domain/slug
    (或文件路径)不会创建边。
  • 模板: 每个领域都提供
    _template.md
    文件。在编写新条目之前,请先读取该文件(
    cargo-ai context runtime read --path persona/_template.md
    )。
    _template.*
    文件会被排除在图谱之外 — 请勿引用它们。

Source references and graph edges

源引用与图谱边

The 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:
  1. Frontmatter
    references:
    list
    (preferred for source citations — keeps prose clean):
    yaml
    ---
    title: AgoraPulse expansion thesis
    description: Why AgoraPulse is ready for a multi-thread expansion play.
    references:
      - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md
    ---
  2. 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
    .
  3. Wikilinks in the body (extension optional):
    [[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes]]
    .
Key constraints:
  • 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.
  • 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.
  • Extensions are optional — the resolver auto-tries
    .md
    ,
    .mdx
    ,
    .yaml
    ,
    .yml
    in that order. Including the extension is fine.
  • The target must exist or the edge is broken (a dead link in the graph UI). Verify with
    runtime browse
    before citing.
  • 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
    .
知识图谱由仓库中所有
.md
.mdx
.yaml
.yml
文件构建(任何文件夹;仅
.git/
会被排除)。每个文件都是一个节点,但仅三种形式会创建边 — 其他形式对图谱不可见:
  1. 前置块
    references:
    列表
    (推荐用于源引用 — 保持文本简洁):
    yaml
    ---
    title: AgoraPulse expansion thesis
    description: Why AgoraPulse is ready for a multi-thread expansion play.
    references:
      - outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md
    ---
  2. 正文中的Markdown链接 — 标准
    [label]
    后紧跟
    (path)
    语法,其中目标为文件路径,例如链接到
    outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes.md
    的锚点。
  3. 正文中的维基链接(扩展名可选):
    [[outputs/sales-notes/2026-06-05-agorapulse-build-session-1-outcomes]]
关键约束:
  • 请勿在纯文本中以裸路径形式引用源(例如
    Source:
    行仅提及
    outputs/sales-notes/foo.md
    文本) — 不会被解析,也不会创建边。
  • 优先使用根相对路径(先从仓库根目录解析,再相对于引用文件),这样无论文档位于何处,链接都能正常工作。
  • 扩展名可选 — 解析器会自动按
    .md
    .mdx
    .yaml
    .yml
    的顺序尝试。包含扩展名也可。
  • 目标必须存在,否则边会失效(图谱UI中的死链)。引用前请用
    runtime browse
    验证。
  • 对于包含Source/Evidence部分的文档,请在前块
    references:
    中引用文件;当引用需要上下文文本时,使用内联Markdown链接。完整规则请查看
    references/conventions.md

Workflow: add a new entry

工作流:添加新条目

  1. Confirm the target domain and copy its template:
    bash
    cargo-ai context runtime read --path persona/_template.md
  2. write
    a new file at
    <domain>/<slug>.md
    with
    title
    +
    description
    and the body sections filled in.
  3. Add cross-refs (
    domain/slug
    ) where useful — keep them bidirectional when it makes sense.
  4. Rebuild the knowledge graph to verify the new entry and its links:
    bash
    cargo-ai context graph get
For full per-domain templates and worked examples, see
references/conventions.md
and
references/examples/authoring.md
.
  1. 确认目标领域并复制其模板:
    bash
    cargo-ai context runtime read --path persona/_template.md
  2. 使用
    write
    <domain>/<slug>.md
    路径下创建新文件,填写
    title
    +
    description
    及正文部分。
  3. 在合适的位置添加交叉引用(
    domain/slug
    ) — 合理情况下请保持双向引用。
  4. 重建知识图谱以验证新条目及其链接:
    bash
    cargo-ai context graph get
完整的各领域模板和示例请查看
references/conventions.md
references/examples/authoring.md

Workflow: bootstrap and refresh

工作流:初始化与刷新

To 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
:
  1. 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
    .
  2. 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.
The repetition threshold (how many calls a claim must appear in before it lands in context) is documented in
references/conventions.md
.
若要从零开始搭建新工作区的context仓库,或定期刷新现有仓库,请遵循
references/examples/lifecycle.md
中的两阶段生命周期:
  1. 初始化(一次性): 从公共来源导入
    global/
    persona/
    client/
    proof/
    objection/
    signal/
    的内容,然后针对已导入的仓库启动新的Agent会话。如需可自动化的规范版本(输入领域→输出文件,幂等,包含信用预算),请使用
    references/examples/bootstrap-from-domain.md
  2. 刷新(每2-4周一次): 拉取过去约3个月的销售通话记录→逐一分析,人工参与循环→在将任何结论加入context之前应用重复阈值→通过生成序列排列验证→对比刷新前后的图谱并淘汰过时条目。
重复阈值(结论需出现在多少个通话记录中才能加入context)请查看
references/conventions.md

Knowledge graph

知识图谱

context graph get
builds (or loads from cache) the knowledge graph over every markdown/MDX file in the context repo. Use it to:
  • Audit cross-references between domains (e.g. find personas that link to plays with no proof attached).
  • Discover what already exists before writing a new entry (avoid duplicates).
  • Power downstream agents that need the typed structure of the workspace's context.
bash
cargo-ai context graph get
The 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.
context graph get
会构建(或从缓存加载)基于context仓库中所有markdown/MDX文件的知识图谱。可用于:
  • 审核各领域之间的交叉引用(例如查找链接到无证明方案的角色)。
  • 在编写新条目之前发现现有内容(避免重复)。
  • 为需要工作区上下文类型结构的下游Agent提供支持。
bash
cargo-ai context graph get
响应包含每个节点的解析前置块和出站
domain/slug
引用 — 可通过
jq
进行切片处理。现成的查询示例请查看
references/examples/graph-queries.md

Help

帮助

Every command supports
--help
:
bash
cargo-ai context --help
cargo-ai context runtime browse --help
cargo-ai context runtime read --help
cargo-ai context runtime write --help
cargo-ai context runtime edit --help
cargo-ai context runtime execute --help
cargo-ai context graph get --help
每个命令都支持
--help
选项:
bash
cargo-ai context --help
cargo-ai context runtime browse --help
cargo-ai context runtime read --help
cargo-ai context runtime write --help
cargo-ai context runtime edit --help
cargo-ai context runtime execute --help
cargo-ai context graph get --help