Context is a local knowledge assistant for Coding Agents. It helps turn code repositories, local documents, and Lark documents into reviewable, traceable, maintainable knowledge, then builds that knowledge into reusable packages for Agents.
You can start before you know the final taxonomy or package structure. Tell the Agent where the source material lives and what you hope to use it for. Context guides the conversation through source scope, extraction, classification, review, verification, and package output.
- Creates a project-local Context workspace instead of hiding state in a remote job.
- Captures document evidence and extracts structured information from code.
- Keeps generated knowledge tied to source evidence for review and later updates.
- Stops for user decisions at source scope, structure, review, and package output gates.
- Builds approved knowledge into an Agent knowledge-base package or another declared output.
Compared with one-shot or remote distillation, Context behaves more like a knowledge assistant working beside you. It is useful when you know where the knowledge is but still need help deciding how to extract, organize, and publish it.
Install the CLI and Agent plugin:
npm install -g @c4a/context-cli
context plugin installRestart the Agent after installation, then use:
/context:initto create a workspace./context:continueto load an existing workspace and continue from its current state.
The Agent will explain the next decision instead of asking you to operate the low-level CLI directly. For installation details and CLI behavior, read the Context CLI guide.
context/
|-- AGENTS.md
|-- README.md
|-- package.json
|-- src/ # project configuration and package templates
|-- sources/ # source registries and captured evidence
|-- knowledge/ # durable knowledge, structure, and rejected fingerprints
|-- dist/ # generated packages (ignored)
`-- .tmp/ # disposable lifecycle state (ignored)
The workspace is ordinary project state that can be inspected, reviewed, and
versioned. src/index.ts describes the knowledge build, while the other
directories record evidence and durable knowledge. Active candidates and staged
structures live only under the ignored .tmp/context-runtime/lifecycle/; a
successful close removes that completed runtime state. The CLI owns state changes;
the Agent owns explanation, configuration, and semantic judgment; the user owns
the important decisions.
packages/contextis the declarative SDK used bysrc/index.ts. Its guide covers sources, phases, knowledge collections, package declarations, templates, and custom processing.packages/context-cliprovides thecontextexecutable and Agent plugin installer. Its guide covers installation, workspace operations, command groups, and workflow rules.
The SDK manuals under packages/context/docs
contain the detailed project API and package-template references. The CLI also
ships a concise quickstart.
The Context plugin includes thin Agent entries backed by route-selected workflow resources and manuals. Once Context has loaded the workspace, ask the Agent about anything that is unclear or share any idea you want to explore. The Agent can use the current evidence and project state to turn that conversation into reviewable, usable knowledge.
For source, link, Agent plugin, and npm-mode development, see
DEVELOPMENT.md.
bun install
bun run build
bun run typecheck
bun run test
bun run lint
bun run verifyLink the local CLI:
./start.sh link