Package the failure. Leave the branch alone.
BugParcel captures a backend failure with its Git state, request/fixtures, environment constraints, and failure contract so humans and coding agents can replay and independently verify a fix — without mutating the source branch.
What a parcel is
A parcel is a versioned, portable description of a failure. The local store is content-addressed (SHA-256) and append-only for status transitions. Today's vertical slice covers exact Git snapshot capture, generic process reproduction with a stable exit-code assertion, and CLI/MCP workflows for capture → reproduce → verify.
- HEAD, branch hint, staged and unstaged diffs
- Reproduction command + expected exit code / output contract
- Optional fixtures restored at repository-relative paths
- Allowlisted environment values and optional Docker image
CLI workflow
The bugparcel CLI is the local source of truth. Store path defaults to .bugparcel in the current directory, or whatever you set in BUGPARCEL_HOME.
$ bugparcel capture --name failing-auth -- npm test -- auth
$ bugparcel show <parcel-id>
$ bugparcel reproduce <parcel-id>
$ bugparcel verify <parcel-id> --patch ./fix.diff
$ bugparcel reduce <parcel-id> --output minimized-request.jsonIsolation model
Reproduce, reduce, diagnose, propose, and verify all run in detached BugParcel worktrees. Source repositories are never changed by replay or verification. Cleanup removes only those worktrees.
MCP tools for coding agents
bugparcel-mcp is a local stdio MCP server. Agents get the same ground truth humans capture — parcels, contracts, reproduction, diagnosis, proposed diffs, and cleanup.
bugparcel_list_parcelsList local manifestsbugparcel_get_parcelRead a full append-only manifestbugparcel_get_contractCommand, expected failure, state, fixtures, envbugparcel_captureCapture from a local Git repositorybugparcel_reproduceReplay in a fresh detached worktreebugparcel_diagnoseContract + replay result + worktree pathbugparcel_propose_fixApply a unified diff only in a new worktreebugparcel_verifyConfirm a patch clears the original failurebugparcel_reduceMinimize JSON state while preserving the contractbugparcel_cleanup_worktreesRemove BugParcel worktrees onlyFastAPI adapter
The Python adapter writes a sanitized request/error event and invokes the local CLI on unhandled exceptions. Replay sets BUGPARCEL_REPLAY=1 so capture stays off during isolated runs. Captured contracts can require both the expected exit code and the original exception type in command output.
For coding agents
Machine-readable guidance lives at /llms.txt. Install with Homebrew, then attach bugparcel-mcp — see the agent guide.
