Skip to content

markwharton/plankit

Repository files navigation

plankit

CI codecov Go License: MIT

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.

What it does

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.

Install

Requires Go (for go install) and Claude Code.

go install github.com/markwharton/plankit/cmd/pk@latest

Or 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.

Setup

cd your-project
pk setup

This configures .claude/settings.json with hooks and installs skills. Restart Claude Code to apply.

Modes

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 ExitPlanMode

Re-run setup anytime to switch.

Commands

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

Documentation

Known Limitations

  • Ultraplan (preview): plankit hooks require ExitPlanMode and a local plan file in ~/.claude/plans/. Ultraplan runs remotely and delivers plans inline — no local file is written and no ExitPlanMode fires, so preservation won't trigger. Use standard /plan mode for automatic preservation. (Provide feedback)
  • Claude Code on the web: pk setup installs a SessionStart hook that fetches the matching pk binary 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 setup and pk teardown round-trip hook objects through a typed struct that recognises only type, command, async, timeout, and statusMessage. 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.

Cross-platform

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.

License

MIT

About

Plan-driven development toolkit for Claude Code

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages