AI made code generation fast. Team alignment didn't keep up.
SCE treats the why behind your code, architecture, decisions, constraints, as a versioned, shared artifact that both your team and your AI agents work from.
- a repo-owned
context/directory holding the architecture, decisions, and constraints AI agents otherwise re-derive every session - generated configs that make OpenCode, Claude Code, and Pi actually read it
- a Bash policy that keeps agents inside your repo's rules
- hooks that capture agent activity at the commit boundary
- a local Agent Trace SQLite database linking each commit to the session that produced it
Install the sce CLI through whichever channel fits your environment:
# npm
npm install -g @crocoder-dev/sce
# cargo
cargo install shared-context-engineering --locked
# nix
nix profile install github:crocoder-dev/shared-context-engineeringThen, from inside a git repository:
sce setup # install generated assistant config, hooks, and bash policy
sce doctor # verify the install is healthysce setup writes OpenCode, Claude Code, and/or Pi config into your repo, installs the required git hooks, and initializes the per-repo Agent Trace database. Use sce setup --pi for Pi only, or sce setup --all for OpenCode + Claude Code + Pi. sce doctor is read-only by default; sce doctor --fix will repair the issues it knows how to repair (missing or stale hooks, missing canonical DB parent directories) and report the rest for manual follow-up.
Stop agents from running commands your repo does not allow.
Configure policies.bash in .sce/config.json with built-in presets and/or your own deny rules. Examples of what teams use it for:
- block direct
git commitso agents go through the SCE commit flow - prevent package-manager drift (e.g. block
npm/pnpmin a Bun repo) - enforce any custom repo rule expressible as a command-prefix match
SCE writes a local, per-repo audit trail conforming to the Agent Trace spec. Each commit links back to the agent conversation, tool calls, and diff that produced it, all stored on your machine.
| Feature | OpenCode | Claude Code | Pi |
|---|---|---|---|
| Generated config | ✓ | ✓ | ✓ |
| Hooks + Bash policy | ✓ | ✓ | ✓ |
| Conversation + diff trace | ✓ | ✓ | ✓ |
| Model / session attribution | full | full | full |
Shared context/ |
✓ | ✓ | ✓ |
AI sped up code generation, not team alignment. Without shared, durable context, every agent session starts cold and every reviewer re-derives the why from scratch, what we call cognitive debt. SCE is the infrastructure to pay it down.
Read the full argument → Motivation
Built by CroCoder.