The Workflow at a Glance
Five steps
Read this page before installing to know what a Context task looks like. Installation happens once per machine beforehand (Installation); after that, every task — one document set or several repositories — follows the same five steps. You talk to the Agent; the Agent follows the workflow the CLI returns.
flowchart LR
s1["1 Initialize"] --> s2["2 Research and plan"]
s2 -->|"you confirm the<br/>work-start report"| s3["3 Produce"]
s3 --> s4["4 Review"]
s4 -->|revise| s3
s4 -->|you approve| s5["5 Build and commit"]| Step | What you do | What happens |
|---|---|---|
| 1 Initialize | Ask /c4a:context to create a Context knowledge workspace in a directory | The CLI creates the workspace and the guidance in AGENTS.md |
| 2 Research and plan | Describe the knowledge, its sources and its intended form, then answer the Agent's questions | The Agent registers sources, investigates them and presents a work-start report: confirmed configuration and scope, the planned content, and the expected package or site layout — your first decision |
| 3 Produce | Wait, or ask for a local preview at any time | The Agent writes articles bound to source evidence and reports progress against the task count |
| 4 Review | Read the review report and approve, reject or ask for revisions — your second decision | Approved pages become durable Markdown under knowledge/ |
| 5 Build and commit | Confirm the package and other outputs | Context verifies and builds; the Agent commits the knowledge workspace to Git |
Quick Start walks through each step with example requests.
You can stop and resume at any time
Each step is chosen from the knowledge workspace's actual state, not from the conversation. After every action the CLI observes the knowledge workspace again and returns the current step, its required reading and the exact commands. If you close the conversation and invoke /c4a:context later, it resumes where the work actually is. See Workflow Execution.
Expected time and token cost
Production is the longest step: on average each writing task takes about a minute. Ask for a preview whenever you want to see pages in a browser. The work-start report and the review report are the two moments where your judgment shapes the result most; the Guides section on review explains what to look for.
Token cost, from experience: a knowledge base of about 200 documents used roughly 600M input tokens (about 97% served from cache) and 6M output tokens. At Opus 5.5 API prices that averages $1–2 per document. This is the estimated cost of the first build; with a subscription quota (for example a Claude or GPT Max 20 plan) it drops to about 20%. In practice, you can do the first build locally and push the knowledge repository, then run later additions and iterations remotely. Once the knowledge base exists, updating a page costs about $0.1–0.2 each time, and answering a question averages $0.2–0.3; the Knowledge Retrieval benchmark shows how answering cost compares.
Production, updates and questions
The five steps describe a first production round. Two other paths reuse the same knowledge workspace:
- Updates. Building completes the currently approved state; it does not freeze the knowledge workspace. When sources change, a new round reopens only the affected knowledge. See Keeping Knowledge Current.
- Questions.
/c4a:context-inspect-searchanswers questions from knowledge packages or approved knowledge in the knowledge workspace and traces each answer back to its sources.
Next: Installation.
工作流概览
五个步骤
在安装之前,先读这一页,了解一个 Context 任务是什么样子。安装事先在每台机器上完成一次即可(见 安装);之后的每个任务——无论只涉及一套文档还是多个仓库——都遵循相同的五个步骤。你和 Agent 对话;Agent 按 CLI 返回的工作流执行。
flowchart LR
s1["1 初始化"] --> s2["2 调研与计划"]
s2 -->|"你确认<br/>开工报告"| s3["3 生产"]
s3 --> s4["4 审核"]
s4 -->|"修订"| s3
s4 -->|"你批准"| s5["5 构建与提交"]| 步骤 | 你要做的 | 发生了什么 |
|---|---|---|
| 1 初始化 | 让 /c4a:context 在某个目录创建 Context 知识工作区 | CLI 创建知识工作区,以及 AGENTS.md 中的指引 |
| 2 调研与计划 | 描述所需知识、来源和预期形态,并回答 Agent 的问题 | Agent 登记来源、展开调研,并给出开工报告:已确认的配置与范围、计划内容,以及预期的知识包或站点结构——你的第一个决定 |
| 3 生产 | 等待,或随时要求本地预览 | Agent 撰写绑定来源证据的文章,并按任务数汇报进度 |
| 4 审核 | 阅读审核报告,选择批准、拒绝或要求修订——你的第二个决定 | 已批准的页面成为 knowledge/ 下持久保存的 Markdown |
| 5 构建与提交 | 确认知识包及其他产物 | Context 验证并构建;Agent 把知识工作区提交到 Git |
快速开始 用示例请求逐步演示了每个步骤。
随时可以中断和恢复
每一步都根据知识工作区的实际状态选出,而不是根据对话内容。每次动作之后,CLI 都会重新观察知识工作区,返回当前步骤、必读内容和确切命令。即使关闭对话,之后再调用 /c4a:context,也会从工作实际所处的位置继续。参见 工作流运行。
预期耗时与 Token 消耗
生产是耗时最长的一步:平均每个写作任务约一分钟。想在浏览器里查看页面时,随时可以要求预览。开工报告和审核报告是两个最需要你拍板的环节;指南中关于审核的章节说明了需要关注什么。
Token 消耗的经验值:约 200 篇文档的知识库,输入约 600M tokens(缓存命中率约 97%),输出约 6M tokens。按 Opus 5.5 API 计费,平均每篇文档 1–2 美元。这是首次建立知识库的预估成本;如果使用订阅额度(例如 Claude 或 GPT 的 Max 20 档套餐),成本可降至约 20%。按实践经验,可以先在本地完成首次建立并推送知识仓库,后续的新增和迭代再在远程进行。知识库建立后,每次更新一个页面约 0.1–0.2 美元,回答一个问题平均约 0.2–0.3 美元;回答成本的对比见 知识检索测评。
生产、更新与提问
上述五个步骤描述的是首轮生产。另有两条路径复用同一个知识工作区:
- 更新。 构建只是完成当前已批准的状态,并不会冻结知识工作区。来源变化时,新一轮只重新打开受影响的知识。参见 知识的持续更新。
- 提问。
/c4a:context-inspect-search基于知识包或知识工作区中已批准的知识回答问题,并把每个答案追溯到来源。
下一步:安装。