Skip to content

Graft documentation

Back to the project README

New to Graft? Start with the two-and-a-half-minute video: how it works, who is involved and what changes for reviewers and agents. Then What a reviewer sees shows the comment, the checks and the ratings on four simulated pull requests, and Enforce mode, step by step shows Phase 1: modes, counted approvals, break-glass, the post-merge guard and its revert pull requests, and the MCP server.

Use and run Graft

Page What is in it
getting-started.md Prerequisites, the offline quickstart in detail, tests, CI and every pnpm script.
github-app.md Registering a real GitHub App from the manifest, smee tunnel, the permissions and events table.
deploy/README.md Deploying Graft: the Docker image, its processes and secrets, pointing the App at it; guides for Fly.io and Coolify.
model-providers.md Choosing, installing and checking a model provider: the Claude API, gateways, OpenAI-compatible and local models, CLI subscriptions, Copilot.
configuration.md Every environment variable with its default and rule, and the configuration files.
observability.md OpenTelemetry: turning traces on with one endpoint variable, the preload, what is redacted.
troubleshooting.md Common errors and what they mean.

Features

Page What is in it
features/provenance.md Graft-* trailers, agent or human, precedence, the commit hook.
features/intent-cards.md How a card is written and verified, the risk floor, rating cards, feedback internals.
features/policy.md graft.yaml: how a verdict is decided, report and enforce mode, approvals, the CLI and the CI lint workflow.
graft-yaml.md The full graft.yaml v1 reference. Example: examples/graft.yaml.
features/evaluation.md pnpm eval: case sets, encryption, labeling, live runs, the synthetic CI baseline.
features/modes.md Report and enforce modes, pnpm graft mode, the ceiling, rollback, the mutation guard.
features/guard.md The post-merge guard: default-branch history, CI result classes, the culprit rule, confirmation, the report-mode comment, revert pull requests and opt-in auto-merge, guard.checks, pnpm graft guard list.
features/mcp.md The MCP server for agents: tokens, get_status, get_policy, report_provenance, open_change, verified commits.
features/pilots-and-gate.md Pilot CLI, the Phase 0 and Phase 1 gates, review-time baseline, rollup, incidents.
e2e.md The live end-to-end runner against a real sandbox repository.

Internals

Page What is in it
architecture.md Diagrams, modules, contracts (webhooks, LLM, managed comment, retention, replay, policy), source layout, data model.
decisions.md Library versions, library facts checked, and every deviation from the step specs, by step.

Runbooks and reference material

Page What is in it
pilots/onboarding.md Onboarding a pilot team: what Graft reads and stores, data sent to the model provider, shadow mode, weekly ritual, offboarding.
pilots/phase-1-runbook.md The Phase 1 rollout, per repository: report mode, the watch, enforcing the policy, the guard and MCP, each stage's go/no-go criteria from the Phase 1 gate report, and its rollback.
phase-1/reviews/step-7-security-review.md The Phase 1 security review of everything that writes, with its verdict for pilot enforcement.
pilots/ Starter policies: graft.service.yaml, graft.platform.yaml, graft.library.yaml.
e2e/runbook.md Running the live e2e suite step by step, and one section per failure code.
e2e/live-scenarios-spec.md Design of the live scenarios. Reviews: e2e/reviews/.
phase-0/labeling-guide.md How to label pull requests for the evaluation set.
phase-0/HUMAN-TODO.md Things only a person can do (App registration, keys, pilots, real-GitHub checks).
phase-1/HUMAN-TODO.md The Phase 1 equivalent: permissions to accept, labels, sandbox smoke tests, real-GitHub checks, pending product decisions.

Product and planning

Page What is in it
spec/mvp-spec.md The MVP spec: thesis, users, scope, core features, architecture, success metrics, risks.
plan/development-plan.md The 12-week plan: Phase 0 (shadow mode) and Phase 1 (enforce).
phase-0/README.md How each Phase 0 step is built (spec, build, review, fix) and the constraints for every step.
Step specs 1 Base setup · 2 Provenance · 3 Intent service · 4 Evaluation set · 5 Policy engine · 6 Pilots and gate
phase-0/reviews/ Review notes for every step.
phase-1/README.md The Phase 1 plan (enforce), with report mode as the default so it can be tried without changing outcomes.
Phase 1 step specs 1 Modes and safety rails · 2 Approvals Graft can enforce · 3 Break-glass and audit log · 4 Guard detection · 5 Revert PRs · 6 MCP server · 7 Security review, pilots and gate

Releases: see the changelog. Security reports: see SECURITY.md.