xp-plugin
Extreme Programming for coding agents, Claude Code and Codex.
xp-plugin gives a coding agent an XP process with a light touch. A card describes the
outcome, an agent implements it in its own worktree, and Git holds the work. Fresh-context
agents review the plan before code and the diff after it. The project's own git hooks run
its tests, and the plugin runs only a card's Acceptance command and the release suite.
Everything else is the agent's judgment, guided by VALUES,
JUDGMENT and the project's constraints.
Install
Requires Python 3.11+ and git. Release PRs use an authenticated gh CLI
(gh auth login). Issue features require gh and
gitleaks only with github_issues: on;
otherwise bug/debt records stay local. Scaffolded secret-scanning git hooks require gitleaks independently.
lefthook is optional; without it, setup
writes plain .githooks/. Install the plugin for the harness you lead from; a
harness that only runs agents needs its binary on PATH.
# Claude Code
claude plugin marketplace add paulingalls/xp-plugin
claude plugin install xp-plugin@xp-plugin --scope user
# Codex
codex plugin marketplace add paulingalls/xp-plugin
codex plugin add xp-plugin@xp-plugin
Set up a repository
Run /xp-setup, or xp.py setup directly. The session banner prints the absolute path
to xp.py. Setup writes .xp/config.yml, .xp/constraints.md, .xp/system.md, .xp/milestones.md, the git
hooks and an empty plan, and refuses if .xp/ already exists. Then fill in:
- Every
EDIT-ME in the hooks. pre-commit runs lint and quick tests in under a minute.
pre-push runs the broader tests. The sprint hook is the release suite. nightly is
optional and wired to your own scheduler. Test commands live only here.
.xp/milestones.md. Fill goals in the user's words and runnable Measures.
For an existing .xp/, copy the plugin's templates/milestones.md there first.
.xp/config.yml. Set versioning, version_files if it is on or notes, and roles (below).
Set github_issues: on to share bug/debt records and publish cards as issues.
.xp/system.md. Describe the product, especially Surfaces & acceptance.
.xp/constraints.md. Keep the project's rules, which reviewers cite. Cap the entire
UTF-8 file at 4,000 bytes to fit Codex's 10,000-byte SessionStart hook limit.
Upgrading from 0.x
-
Finish in-flight work on 0.36.x before installing v1; no state migrates. Edit the
existing .xp/ in place: setup is for fresh repositories and refuses an existing one.
-
Update each installed harness:
# Claude Code
claude plugin marketplace update xp-plugin
claude plugin update xp-plugin@xp-plugin
# Codex
codex plugin marketplace upgrade xp-plugin
codex plugin add xp-plugin@xp-plugin
Restart to load the update. In Codex, re-approve plugin hooks with /hooks.
-
Edit .xp/config.yml against Configuration and the
config template. Explicitly choose
versioning: on, off or notes; with on or notes, set version_files and
add a CHANGELOG.md
whose first ## heading names the current version if the project has none. Remove tests, sprint_cap,
release, preflight, constraints_chars_cap, profile_target,
teardown_timeout and review: unused keys are silently ignored. Remove the finder,
verifier and closer seats; angle-reviewer replaces the sprint review seats and
falls back to reviewer. Keep the required seats; Configuration lists the optional ones.
Keep lifecycle_command as a shell line (v0.36 ran an argv). Move .xp/system.md's
Worktree bootstrap and teardown commands into worktree_setup and worktree_teardown;
remove those labelled lines from system.md.
-
Move test commands into the project's existing hooks: quick checks at pre-commit,
broader checks at pre-push, the release suite at sprint, optional expensive checks at
nightly. Move the old preflight command to the start of the sprint hook. Add lefthook sprint: or an executable .githooks/sprint, according to the
existing routing. Adapt the lefthook template
or plain sprint hook; preserve existing hooks.
Delete hook steps that read a removed key (tests, constraints_chars_cap) or call a
0.x plugin script: with the key gone they refuse every commit.
If the hooks scan no secrets, adopt the template's gitleaks jobs (pre-commit,
pre-merge-commit, pre-push); setup adds them only to new repositories.
-
Convert open cards from Verify: to Acceptance:; retire cards about removed 0.x