LLMs are open-ended by nature. Development needs deterministic outcomes. plankit bridges that gap — plans commit to an approach before code is written, templates suppress the patterns that cause drift, and tests protect what works.
A plan-driven development toolkit for Claude Code (Anthropic's AI coding agent). The rules, testing discipline, and branch protection aren't extras — they're what make plans worth keeping. Designed for small teams and independent developers.
pk setup installs the pieces that make plan-driven development work with Claude Code:
- Installs rules and guidelines — CLAUDE.md with critical rules, plus detailed
.claude/rules/for model behavior, development standards, and git discipline - Adds Claude Code skills —
/init,/changelog,/release,/preserve - Preserves approved plans — saved as timestamped documentation in
docs/plans/, committed to git, and protected from accidental edits - Guards protected branches — git mutations blocked via hooks, locally, before the damage happens
After setup, /changelog and /release become your daily driver — each previews, confirms, then runs.
Requires Go (for go install) and Claude Code.
go install github.com/markwharton/plankit/cmd/pk@latestOr download a binary from the releases page (no Go required).
After installing, run pk setup in your project to configure hooks and skills. See Setup below or Getting Started for details.
cd your-project
pk setupThis configures .claude/settings.json with hooks and installs skills. Restart Claude Code to apply.
pk setup # Default: block guard, manual preserve
pk setup --guard ask # Prompt instead of blocking on protected branches
pk setup --preserve auto # Auto: preserve plans on ExitPlanModeRe-run setup anytime to switch.
| Command | Description |
|---|---|
pk setup |
Configure project hooks, skills, and CLAUDE.md — details |
pk status |
Report plankit configuration state — details |
pk teardown |
Remove plankit hooks, skills, and rules — details |
pk changelog |
Generate CHANGELOG.md and commit (tag is created by pk release) — details |
pk release |
Tag, merge to release branch, validate, and push — details |
pk guard |
Block git mutations on protected branches — details |
pk preserve |
Preserve approved plan — details |
pk protect |
Block edits to docs/plans/ — details |
pk pin |
Update pinned version in a script file — details |
pk version |
Print version and check for updates — details |
- Getting Started — install, setup, first run
- Methodology — plan-driven development, guidelines, testing loop
- Anti-Patterns — what to watch for
- Resources — Claude Code best practices, git references
- Ultraplan (preview): plankit hooks require
ExitPlanModeand a local plan file in~/.claude/plans/. Ultraplan runs remotely and delivers plans inline — no local file is written and noExitPlanModefires, so preservation won't trigger. Use standard/planmode for automatic preservation. (Provide feedback) - Claude Code on the web:
pk setupinstalls a SessionStart hook that fetches the matchingpkbinary into the cloud sandbox at session start. Protective hooks (pk guard,pk preserve,pk protect) then work normally. Mobile has no shell environment — hooks degrade to no-ops there. - Hook object fields in managed categories: Within the three categories pk manages (
PreToolUse,PostToolUse,SessionStart),pk setupandpk teardownround-trip hook objects through a typed struct that recognises onlytype,command,async,timeout, andstatusMessage. Any other fields on a hook object — whether from another tool, a user customisation, or a future Claude Code addition — will be dropped. Other hook categories (SessionEnd,Stop,UserPromptSubmit, and any not yet listed) pass through untouched. File an issue if you hit this.
pk is a single Go binary with zero external dependencies. Builds for macOS, Linux, and Windows. Windows support relies on Git Bash, which is required by Claude Code.
MIT