What the agent wrote
“All tests pass. The exporter is done. Only the docs are left.”
Confident, unchecked, and gone with the session.
v0.1.0 · Local-first · Apache-2.0
PCS is a local-first CLI and MCP server that hands work from one AI coding agent to the next. It rebuilds what actually happened from git and recorded evidence, and never takes an agent’s “done” on trust.
npm install -g @knihal/pcskitThe problem
That is exactly the part you cannot trust. It may say tests pass when they never ran, or forget the file it was halfway through editing.
“All tests pass. The exporter is done. Only the docs are left.”
Confident, unchecked, and gone with the session.
The evidence model
PCS records each fact with where it came from, so the next agent knows which lines are solid.
git state, file hashes, a test run PCS executed with its exit code
“task done”, “next step is X”
“the session was interrupted”
A task counts as verified only when a passing test run that PCS executed is linked to it, and only while the code still matches the state that run saw.
A handoff, step by step
Agents connect over MCP, or Claude Code hooks start and end sessions for you.
Sessions, snapshots from git, and test runs PCS executes itself, in a hash-chained log.
Token limit, new chat or a switch of tools. PCS writes the handoff, or rebuilds it from the log if the agent died first.
Resume checks the handoff against the evidence, warns if the code moved, and prints a brief where every line carries its level.
Tamper-evident history
Events are stored in an append-only SHA-256 hash chain. pcs verify detects edits, deletions and reordering. A signed anchor kept outside the project also detects truncation and a full rewrite.
What you get
Original task, completed work, work in progress, files touched, test results with the output of failing runs, open problems, next steps and do-not-touch notes.
pcs export writes the log as JSON or Markdown that can be checked without PCS.
Redaction runs before anything is stored. Files flagged sensitive, such as keys and .env, are listed by name and never read.
An MCP server for any MCP client, Claude Code hooks, and instruction blocks for CLAUDE.md, AGENTS.md and Cursor rules.
A background watcher snapshots the repo as files change and flags stalled sessions. pcs autostart starts it at login.
pcs workspace lists all your projects. Each keeps its own log, so one repo never affects another.
Sessions, tasks with their evidence, notes, test runs and the event timeline, served on 127.0.0.1 only.
Everything lives in a git-excluded, owner-only .pcs folder inside your project.
Works with your agents
pcs connect writes the PCS MCP server into the app's config. It keeps your other servers and never overwrites a file it cannot parse.
pcs connect claude-desktop
Quit the app fully and reopen it.
pcs connect cursor
Per project, or --global for all projects.
pcs connect claude-code
Add pcs hooks install so sessions start and end by themselves.
Security model
Repositories and agent output are untrusted input. PCS treats them that way.
Install PCS, run pcs init in your repo, and connect an agent.
npm install -g @knihal/pcskit