Important
AI AGENT NOTICE: If you are an AI agent, you MUST read AGENTS.md first to understand the workspace operating rules and context requirements before executing tasks.
PCA is a local-first CLI that keeps project context, decisions, and AI handoff notes close to your code. It solves context drift between Git changes and AI agents.
Builders using AI agents (Cursor, Claude, Codex, Gemini) lose project context between sessions. You repeat yourself. The agent forgets decisions. Prompts grow. PCA fixes that.
npm install -g @quantpartners/pcaRequires Node.js >= 20.
cd your-project
pca setup
pca init
pca bootstrap
pca contextpca setup configures mode and API key.
pca init initializes project memory.
pca bootstrap fills project context interactively.
pca context generates the current project context, copies it to your clipboard, and saves .pca/last-context.md.
| Command | Description |
|---|---|
pca init |
Initialize project memory |
pca bootstrap |
Fill project context interactively |
pca context |
Generate project context and copy to clipboard |
pca context --prompt |
Generate an LLM-optimized context prompt |
pca commit "<msg>" |
Record a context milestone |
pca close "<msg>" |
Automate closing active tasks and update roadmap |
If a user tells you to "use this repo" or "work on this task", follow this protocol:
- Read Context First: Run
pca context --prompt(or ask the user to run it) and read the output carefully. This gives you the system prompt and operational rules. - Follow
AGENTS.md: Do exactly what the agent rules say. Only modify code after understanding the architectural decisions. - Commit Context: When making significant changes or decisions, prompt the user to run
pca committo save the memory. - Close Tasks: When a task is fully complete and validated, instruct the user to run
pca close(or run it yourself if you have CLI execution tools) to automatically update the roadmap, changelog, and sync logs. |pca staged| Manage staged context commits | |pca logs| List context history | |pca status| Show project and context state |
Hooks run automatically on git commit, checkout, merge and rebase. No manual commands needed.
| Command | Description |
|---|---|
pca health |
Check context file sizes |
pca doctor |
Diagnose PCA setup |
pca forget |
Deprecate obsolete context |
pca diff |
Show context diff |
pca audit |
Audit context history |
pca recovery |
Restore a deprecated context commit |
pca sync |
Sync context to vector store |
pca query "<query>" |
Query project memory |
pca task "<task>" |
Generate agent-ready task context |
pca setup |
Configure mode and API key |
pca mcp |
Start MCP server |
| Command | Description |
|---|---|
pca login |
Sign in |
pca logout |
Sign out |
pca whoami |
Show active account |
pca config |
Manage configuration |
- Markdown files hold project memory and agent-facing context.
- SQLite in
.pca/pca.dbstores context commits, staged items, branches, and status. - Git hooks stage context from commits and track branch, merge, and rebase events.
pca contextbuilds a paste-ready Markdown snapshot for your AI agent.
pca init installs hooks for commit, checkout, merge, and rewrite/rebase events.
The hooks stage context automatically, switch branch-local context, and archive old branch context when confirmed.
Use pca staged list, pca staged commit, pca staged drop <index>, or pca staged clear to manage staged context.
MIT
