TeamContext is a Git-native context collaboration CLI for vibe coding teams.
TeamContext is using itself for context collaboration.
When multiple developers use LLM coding tools on the same project, context drifts fast:
- Architecture assumptions split across chat sessions
- Decisions made by the founder are lost for later-joined members
- Parallel branches evolve with different "truths"
TeamContext treats context like code:
- Versioned in Git
- Reviewable in pull requests
- Synced across members with
git pull+tc sync
This makes founder-to-new-member handoff and parallel collaboration reproducible instead of chat-history dependent.
As vibe coding becomes a default way to build software, context sharing becomes core engineering infrastructure. Without shared context, team velocity collapses into re-explaining decisions and fixing integration mismatches. With TeamContext, teams can keep a consistent project memory across people, branches, and LLM tools.
- Multiple members working on the same vibe coding project in parallel
- Passing founder context to members who join later
- Keeping context synchronized between Codex/Claude sessions across the team
- Reducing regressions caused by missing architectural constraints
TeamContext uses OpenViking as its context engine:
- OpenViking repo: https://github.com/volcengine/OpenViking
- TeamContext vendors and pins OpenViking under
.tc/vendor/openviking - OpenViking powers indexing/integration while TeamContext manages the Git-native workflow and shared file layout
TeamContext is designed to be called directly by vibe coding agents.
Operating rule: humans should run only tc init; all other TeamContext operations should be executed by the LLM agent.
TeamContext (this repo) is a CLI tool. Your application repo (for example projectA) stays separate.
- Pull this repo to install TeamContext CLI (preferred for PATH availability):
Development option:
pipx install .If you use the development option, activate the same Python environment before runningpip install -e .tc. - Move to your target project repo:
cd /path/to/projectA - Initialize TeamContext inside that project:
Fallback if
tc init
tcis not on PATH:python -m teamcontext.cli init
After tc init, TeamContext creates:
.tc/agent/bootstrap_prompt.md.tc/agent/workflow.md.tc/agent/intents.jsonTEAMCONTEXT_AGENT_RULES.md(project-root persistent guardrails to reduce memory drift across long sessions)
These files tell your coding tool how to map user intents to TeamContext commands.
After init, the default operating mode is Agent mode (tool runs tc commands). Use manual commands only as fallback.
Execution rule: when an intent matches, execute the mapped tc command immediately (do not only print command text).
For strict execution without tool-side rewriting, you can run intents via:
tc agent run "sync latest context"Alias intents are also supported:
save context->save recent context to tcsync context->sync latest contextAfter execution, require the tool to report:tc_command: <exact command>exit_code: <code>result: <key output>
- In the project root, run:
tc init
tc initnow runs an initial sync by default (equivalent totc sync --json) and writes the latest sync snapshot into.tc/agent/bootstrap_prompt.md. - Open your coding tool and paste this file as the first system/session instruction:
.tc/agent/bootstrap_prompt.md
- Save initial context through TeamContext:
- Agent mode: tell your tool:
(tool should runsave initial context to tc
tc agent savewith semantic fields from the discussion, for example:)The tool must auto-generate these fields from THIS project discussion. User should not be asked to fill them manually. TeamContext will auto-writetc agent save --changes-source uncommitted --auto-bootstrap-if-empty --intent "<intent-delta>" --decisions "<decisions>" --rationale "<why>" --impact-scope "<scope>" --next-step "<owner+command>"
.tc/state/session_context.mdfrom those fields.- Manual fallback:
tc save --intent "<intent-delta>" --decisions "<decisions>"
- For an existing project with prior progress, run a one-time baseline capture:
tc agent save --changes-source uncommitted --bootstrap --intent "<intent-delta>" --decisions "<decisions>" --rationale "<why>"
tc saverequires semantic context (at least--intentand--decisions, or equivalent context file content). If baseline capture is very large, TeamContext blocks it by default. To proceed intentionally:tc agent save --changes-source uncommitted --bootstrap --force-large-save --intent "<intent-delta>" --decisions "<decisions>"
- Commit and push to your Git remote:
git add .tc .viking/agfs/shared git commit -m "teamcontext: initialize shared context" git push
- Clone or pull the latest repository state:
git pull
- Run one-time local TeamContext setup:
tc init
- Open your coding tool and paste this file as the first system/session instruction:
.tc/agent/bootstrap_prompt.md
- Sync latest shared context:
- Agent mode: tell your tool:
(tool should runsync latest context
tc agent run "sync latest context")- Manual fallback (only if needed):
In manual fallback, paste the JSON output into your coding tool so it can ingest the latest context deltas.tc sync --json
- Run the preflight confirmation prompt (below) before coding.
- Each member codes with their preferred LLM tool, using the bootstrap prompt at session start.
- Before push, publish recent context:
- Agent mode: tell your tool:
(tool should runsave recent context to tc
tc agent savewith semantic fields from the current discussion):The tool must auto-generate these fields from THIS project discussion. User should not be asked to fill them manually.tc agent save --changes-source uncommitted --auto-bootstrap-if-empty --intent "<intent-delta>" --decisions "<decisions>" --rationale "<why>" --impact-scope "<scope>" --next-step "<owner+command>"
- Manual fallback (only if needed):
tc save --intent "<intent-delta>" --decisions "<decisions>"
- Each member pushes their updates:
git add .viking/agfs/shared .tc git commit -m "<topic>" git push - Everyone periodically syncs others' context:
git pull
- Agent mode: tell your tool:
(tool should runsync latest context
tc agent run "sync latest context")- Manual fallback (only if needed):
In manual fallback, paste the JSON output into your coding tool.tc sync --json
Use this before coding to verify context is loaded correctly:
Before coding, list:
1) the constraints/decisions you will follow from TeamContext,
2) the exact files you read (full paths).
If anything is missing or conflicting, ask questions first.
pip install -e .tc init
tc agent run "sync latest context"
tc verify-context --latest 1
tc sync
tc sync --json
tc agent save --changes-source uncommitted --auto-bootstrap-if-empty --intent "<intent-delta>" --decisions "<decisions>"
tc status
tc commit --topic "auth-refactor" --summary "Refined auth service boundaries"
tc doctor
tc vendor upgrade --ref v0.2.0tc sync also prints a bootstrap prompt in human mode, and tc sync --json returns structured data for agent mode.
tc sync also writes machine-readable output to .tc/state/last_sync.json every time (with or without --json).
Use tc verify-context before push to ensure recent changelog entries contain non-n/a semantic context fields.
First-run note:
- In a brand-new project,
decisions/,patterns/, andrunbooks/may be empty. This is expected. - In that case, the tool should report "no approved team context yet" and continue with repository code context.
PYTHONPATH=src python -m unittest discover -s tests -v