{"id":51602721,"url":"https://github.com/shiva936/draft","last_synced_at":"2026-07-11T23:01:28.514Z","repository":{"id":369125990,"uuid":"1283234816","full_name":"Shiva936/draft","owner":"Shiva936","description":"Draft — the workspace before your commit.","archived":false,"fork":false,"pushed_at":"2026-07-03T17:17:46.000Z","size":8026,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-03T19:16:18.920Z","etag":null,"topics":["ai","ai-agents","ai-coding","change-management","cli","code-review","command-line-tool","developer-productivity","developer-tools","devtools","git","human-in-the-loop","local-first","provenance","rust","software-supply-chain","verification","version-control","workflow-automation"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shiva936.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-28T17:39:25.000Z","updated_at":"2026-07-03T17:17:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Shiva936/draft","commit_stats":null,"previous_names":["shiva936/draft"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Shiva936/draft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiva936%2Fdraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiva936%2Fdraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiva936%2Fdraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiva936%2Fdraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shiva936","download_url":"https://codeload.github.com/Shiva936/draft/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shiva936%2Fdraft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35377013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","ai-coding","change-management","cli","code-review","command-line-tool","developer-productivity","developer-tools","devtools","git","human-in-the-loop","local-first","provenance","rust","software-supply-chain","verification","version-control","workflow-automation"],"created_at":"2026-07-11T23:01:27.508Z","updated_at":"2026-07-11T23:01:28.506Z","avatar_url":"https://github.com/Shiva936.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n  Draft README\n\n  Repo-ready assets expected under ./assets:\n  - assets/draft-head-logo.png\n  - assets/draft-flow.svg\n  - assets/draft-cli-demo.gif\n  - assets/draft-compatability-layer.png\n  - assets/draft-noise-to-verified-packs.svg\n--\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/draft-head-logo.png\" alt=\"Draft — protect AI-generated changes before they enter the real workflow\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eDraft\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eLocal-first review, verification, approval, receipts, and rollback for human + AI-generated software changes.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e\n  ·\n  \u003ca href=\"#why-draft\"\u003eWhy Draft\u003c/a\u003e\n  ·\n  \u003ca href=\"#how-draft-works\"\u003eHow It Works\u003c/a\u003e\n  ·\n  \u003ca href=\"#commands\"\u003eCommands\u003c/a\u003e\n  ·\n  \u003ca href=\"/docs/README.md\"\u003eDocs\u003c/a\u003e\n  ·\n  \u003ca href=\"CONTRIBUTING.md\"\u003eContributing\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"version\" src=\"https://img.shields.io/badge/version-v0.3.3-7c3aed?style=flat-square\" /\u003e\n  \u003cimg alt=\"status\" src=\"https://img.shields.io/badge/status-pre--1.0-0ea5e9?style=flat-square\" /\u003e\n  \u003cimg alt=\"local-first\" src=\"https://img.shields.io/badge/local--first-yes-10b981?style=flat-square\" /\u003e\n  \u003cimg alt=\"offline capable\" src=\"https://img.shields.io/badge/offline--capable-yes-14b8a6?style=flat-square\" /\u003e\n  \u003cimg alt=\"daemonless cli\" src=\"https://img.shields.io/badge/daemonless-CLI-111827?style=flat-square\" /\u003e\n\u003c/p\u003e\n\n---\n\n## What Is Draft?\n\n**Draft** is a local-first compatibility layer for reviewing and controlling software changes before they become part of your real workflow.\n\nIt sits between your editor, AI agents, CLI tools, and external automation. Draft turns workspace changes into **ChangePacks** with evidence, verification results, review state, approval state, durable receipts, and safe rollback targets.\n\nDraft is built for the new workflow where humans and AI agents both create code, but the project still needs a trusted review boundary.\n\n```text\nEditor / Agent\n      ↓\nDraft CLI + Review Cockpit\n      ↓\nChangePacks + Evidence + Events + Receipts\n      ↓\n.draft/ local store\n      ↓\nOptional external tools via explicit hooks\n```\n\nDraft does **not** replace Git, editors, CI, agents, or deployment tools. It gives them a local, auditable compatibility layer.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/draft-compatability-layer.png\" alt=\"Draft compatibility layer stack\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n## Why Draft?\n\nAI agents can generate useful changes quickly, but fast generation creates a new problem: workspace noise.\n\nDraft helps you turn that noise into reviewed, accountable, rollback-safe ChangePacks.\n\n| Problem                            | What Draft Adds                                                        |\n| ---------------------------------- | ---------------------------------------------------------------------- |\n| AI changes are hard to trust       | Changes are captured as named ChangePacks with evidence and provenance.      |\n| Review happens too late            | Draft creates a local approval boundary before save/finalization.      |\n| Workspace state gets messy         | Draft separates working noise from reviewed ChangePacks.                     |\n| Hidden state can leak into changes | `.draft/` is hard-excluded everywhere.                                 |\n| Rollback is unclear                | Rollback can target checkpoints, ChangePacks, or receipts.                   |\n| External tools are too implicit    | Hooks are explicit, local, opaque, policy-checked, and receipt-backed. |\n| Teams need auditability            | Events and receipts make every meaningful action explainable.          |\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/draft-noise-to-verified-packs.svg\" alt=\"From workspace noise to verified ChangePacks\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n## Core Principles\n\nDraft is designed around a few strict rules:\n\n* **Local-first:** project state lives in the workspace under `.draft/`.\n* **Offline-capable:** core CLI flows do not require a network service.\n* **Daemonless by default:** the CLI can run directly without a background daemon.\n* **Tool-neutral:** Draft does not depend on a specific AI model, editor, code host, or agent runtime.\n* **Append-only provenance:** meaningful actions are recorded as hash-chained events.\n* **Review before save:** ChangePacks must pass the local review and approval boundary before finalization.\n* **Safe rollback:** checkpoints, ChangePacks, and receipts can be used as rollback targets.\n* **Hard `.draft/` exclusion:** Draft never includes its private state in ChangePacks, snapshots, saves, rollback plans, or hook candidate checks.\n\n## Quick Start\n\nInstall the latest Draft release on Linux, macOS, or WSL:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/Shiva936/draft/master/install.sh | sh\n```\n\nInstall the latest Draft release on native Windows PowerShell:\n\n```powershell\nirm https://raw.githubusercontent.com/Shiva936/draft/master/install.ps1 | iex\n```\n\nThen initialize Draft in a workspace:\n\n```bash\ndraft init\n```\n\nSet your local identity:\n\n```bash\ndraft config set identity.username \"Ada\"\ndraft config set identity.email \"ada@example.com\"\n```\n\nCreate a checkpoint, make changes, package them, review them, approve them, and save them:\n\n```bash\ndraft checkpoint \"before change\"\n\n# Edit the workspace with your editor, script, or AI agent.\n\ndraft status\ndraft create \"update app\"\n\ndraft list\ndraft pack\n\ndraft verify -p \u003cpck-id-or-name\u003e\ndraft risk -p \u003cpck-id-or-name\u003e\ndraft review -p \u003cpck-id-or-name\u003e\ndraft approve -p \u003cpck-id-or-name\u003e --reason \"reviewed\"\ndraft save -p \u003cpck-id-or-name\u003e\n\ndraft receipt list\n```\n\nDevelopers can also build from source:\n\n```bash\ncargo build --workspace\ncargo run -p draft-cli -- init\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/draft-cli-demo.gif\" alt=\"Animated terminal demo of Draft commands\" width=\"88%\" /\u003e\n\u003c/p\u003e\n\n## The ChangePack Flow\n\nDraft’s main object is a **ChangePack**.\n\nA ChangePack is a local, reviewable unit of change. It contains the change set, evidence, verification results, review decisions, approval state, and event references needed to understand what happened.\n\nTypical flow:\n\n```text\ndraft init\ndraft checkpoint \"before agent run\"\nagent/editor changes files\ndraft status\ndraft create \"feature name\"\ndraft verify -p \u003cChangePack\u003e\ndraft review -p \u003cChangePack\u003e\ndraft approve -p \u003cChangePack\u003e\ndraft save -p \u003cChangePack\u003e\ndraft rollback \u003ctarget\u003e   # when needed\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/draft-flow.svg\" alt=\"Draft workflow: scan, checkpoint, create, verify, approve, save, rollback\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n## IDs And Targets\n\nDraft uses stable ID prefixes:\n\n```text\nchk_\u003cid\u003e  checkpoint\npck_\u003cid\u003e  ChangePack\nrcp_\u003cid\u003e  receipt\n```\n\nRollback accepts any of these:\n\n```bash\ndraft rollback chk_\u003cid\u003e\ndraft rollback pck_\u003cid\u003e\ndraft rollback rcp_\u003cid\u003e\n```\n\nMost ChangePack commands accept either a ChangePack ID or a unique ChangePack name:\n\n```bash\ndraft verify -p pck_abc123\ndraft verify -p \"update app\"\n```\n\n## Commands\n\nThe v0.3.3 command surface is intentionally local and workspace-oriented.\n\n```text\ninit       doctor     identity   config     hook\nignore     status     event      checkpoint create\npack       list       candidate  task       verify\nrisk       review     approve    reject     compare\ncompose    disperse   save       receipt    storage\nrollback   close      gc         cockpit    mcp\nacp        a2a\n```\n\nNew in v0.3.3: the verified stable-base model — `draft init` creates a verified\nstable base and `stable_head`, `draft save` finalizes packs with configurable\ndisposal (`merge_and_dispose`/`dispose_only`) gated by project-state\nverification, save hooks run in before/after phases, saved packs are disposed\nleaving compact receipt provenance, and `draft close`/`draft gc` handle safe\nmetadata removal and maintenance. A top-level `proto/` directory defines the\nprotocol contracts. Draft treats each changepack as an independent, composable,\nportable, **signed**, locally verifiable unit of change — temporary until\nsaved. Event history is `draft event` — there is no `log` command; only\n`--page` and `--limit` apply. See [CHANGELOG.md](CHANGELOG.md).\n\n### ChangePack Commands\n\nCreate a new ChangePack:\n\n```bash\ndraft create \u003cname\u003e [-p \u003cbase-pck-id-or-name\u003e]\n```\n\nChangePack names must be unique.\n\nShow the current selected ChangePack:\n\n```bash\ndraft pack\n```\n\nSelect a ChangePack by ID or name:\n\n```bash\ndraft pack -s \u003cpck-id-or-name\u003e\n```\n\nDelete a ChangePack by ID or name:\n\n```bash\ndraft pack -d \u003cpck-id-or-name\u003e\n```\n\nDeleting a ChangePack preserves event history and receipts. Draft removes the pack directory, removes task/run records owned only by that pack, and garbage-collects unreachable objects.\n\nList generated ChangePacks:\n\n```bash\ndraft list\n```\n\n### Event Commands\n\nHuman-readable timeline:\n\n```bash\ndraft event\n```\n\nRaw event records:\n\n```bash\ndraft event --raw\n```\n\nVerify event, receipt, and transparency integrity:\n\n```bash\ndraft doctor\ndraft receipt verify --all\n```\n\nDraft stores provenance as append-only hash-chained event records linked to signed receipts and the local transparency chain. The normal `draft event` timeline is a readable view derived from that raw stream; there is no separate durable human log file outside the event model.\n\n### Candidate And Task Commands\n\nCandidates are named execution profiles. They do not represent roles in v0.3.3.\n\nRun a task with an explicit instruction boundary:\n\n```bash\ndraft task spawn \"\u003ctask-name\u003e\" -- \u003cinstruction\u003e\n```\n\nRoute a task through a candidate:\n\n```bash\ndraft task spawn \"\u003ctask-name\u003e\" -c \u003ccandidate-name\u003e -- \u003cinstruction\u003e\n```\n\nCandidates can be auto-registered through `draft task spawn`; users do not need to run a separate candidate registration command first.\n\n## Optional Save Hook\n\n`hooks.save` lets Draft call an explicit local command after approval.\n\nExample:\n\n```bash\ndraft config set hooks.save \"printf %s \\\"{{message}}\\\" \u003e .last-draft-save\"\n```\n\nWhen `draft save` runs, Draft:\n\n1. renders supported hook variables such as `{{message}}`;\n2. checks local policy;\n3. verifies canonical approval, workspace hash, receipt signatures, event chain, and transparency linkage;\n4. verifies that `.draft/` is not part of the save candidate;\n5. executes the command from the workspace root;\n6. captures stdout, stderr, exit code, and command hash;\n7. writes a durable receipt.\n\nDraft does not parse, detect, or model what the hook command does. Hooks are opaque by design.\n\n## Storage And Safety\n\nDraft stores local project state under `.draft/`:\n\n```text\n.draft/\n├─ config and policy\n├─ content-addressed objects\n├─ snapshots and checkpoints\n├─ tasks and runs\n├─ ChangePacks and evidence\n├─ reviews and approvals\n├─ receipts\n├─ rebuildable indexes\n└─ append-only hash-chained events\n```\n\n`.draft/` is always hard-excluded from:\n\n```text\nstatus\nsnapshots\nChangePacks\nsave candidates\nrollback plans\nhook candidate checks\n```\n\nIf a save candidate contains `.draft/`, Draft aborts the save, emits a failed `save.completed` event, records a failed receipt, and does not run `hooks.save`.\n\n## What Draft Is Not\n\nDraft is not:\n\n* a Git replacement;\n* a hosted code review system;\n* a hosted merge workflow;\n* a CI/CD platform;\n* an AI model service;\n* an agent framework;\n* a deployment tool.\n\nDraft is the local review layer that can sit in front of those tools.\n\n## Documentation\n\nStart with [docs/README.md](docs/README.md).\n\n| Topic              | Link                                                     |\n| ------------------ | -------------------------------------------------------- |\n| Installation       | [docs/installation.md](docs/installation.md)             |\n| Getting Started    | [docs/getting-started.md](docs/getting-started.md)       |\n| Concepts           | [docs/concepts.md](docs/concepts.md)                     |\n| Architecture       | [docs/architecture.md](docs/architecture.md)             |\n| Command Reference  | [docs/command-reference.md](docs/command-reference.md)   |\n| Configuration      | [docs/configuration.md](docs/configuration.md)           |\n| Storage Layout     | [docs/storage-layout.md](docs/storage-layout.md)         |\n| Event Model        | [docs/event-model.md](docs/event-model.md)               |\n| ChangePacks        | [docs/changepack.md](docs/changepack.md)                 |\n| Protocol Contracts | [docs/protocol.md](docs/protocol.md)                     |\n| Checkpoints        | [docs/checkpoints.md](docs/checkpoints.md)               |\n| Verification       | [docs/verification.md](docs/verification.md)             |\n| Review \u0026 Approval  | [docs/review-and-approval.md](docs/review-and-approval.md) |\n| Policy             | [docs/policy.md](docs/policy.md)                         |\n| Candidates \u0026 Tasks | [docs/candidates-and-tasks.md](docs/candidates-and-tasks.md) |\n| Safety Model       | [docs/safety-model.md](docs/safety-model.md)             |\n| Services           | [docs/services.md](docs/services.md)                     |\n| Security           | [docs/security.md](docs/security.md)                     |\n| Release Compliance | [docs/release-compliance.md](docs/release-compliance.md) |\n| FAQ                | [docs/faq.md](docs/faq.md)                               |\n\n## Development\n\nRun the standard checks:\n\n```bash\ncargo fmt --all -- --check\ncargo clippy --workspace --all-targets -- -D warnings\ncargo test --workspace\n```\n\nUseful local loop:\n\n```bash\ncargo run -p draft-cli -- init\ncargo run -p draft-cli -- status\ncargo run -p draft-cli -- create \"test changepack\"\ncargo run -p draft-cli -- list\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines, development workflow, and release expectations.\n\n## Project Status\n\nDraft is pre-1.0 software. The current focus is v0.3.3 production readiness:\n\n* CLI ergonomics;\n* verified, signed, portable changepacks;\n* AG-UI review cockpit flows;\n* event, receipt, and transparency integrity;\n* import/export and rollback safety;\n* documentation alignment;\n* security, performance, and release compliance.\n\nPublic APIs and storage details may still evolve before 1.0.\n\n## License\n\nLicensed under the terms in [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiva936%2Fdraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiva936%2Fdraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiva936%2Fdraft/lists"}