plot
npx skills add https://github.com/eins78/skills --skill plot
Agent 安装分布
Skill 文档
Plot
Lean, git-native planning system. Plans are markdown files on branches, PRs are workflow metadata, git is the source of truth. Plans merge to main before implementation begins; one plan can spawn multiple parallel implementation branches. Works with any team composition â human, AI-assisted, or fully agentic.
Setup
Add a ## Plot Config section to the adopting project’s CLAUDE.md:
## Plot Config
- **Project board:** <your-project-name> (#<number>) <!-- optional, for `gh pr edit --add-project` -->
- **Branch prefixes:** idea/, feature/, bug/, docs/, infra/
- **Plan directory:** docs/plans/
- **Active index:** docs/plans/active/
- **Delivered index:** docs/plans/delivered/
- **Sprint directory:** docs/sprints/
Model Guidance
| Steps | Min. Tier | Notes |
|---|---|---|
| 1. Read State | Small | Git/gh commands, file listing |
| 2. Detect Context | Small | Branch name pattern matching |
| 3. Detect Issues | Small (most), Mid (overlap) | Overlapping plans (3+ shared words) needs mid-tier |
| 4. Status Summary | Small | Template formatting |
| Sprint listing | Small | File listing, date arithmetic |
| Sprint countdown | Small | Date comparison, checkbox counting |
All dispatcher steps are mechanical except the “Overlapping plans” heuristic in step 3, which requires comparing plan titles. A small model should skip title comparison and only flag exact slug duplicates.
Lifecycle
Feature / Bug (full lifecycle)
flowchart LR
subgraph Planning
A["/plot-idea"] -->|draft PR| B["Refine &<br/>slice branches"]
B -->|"â³ gh pr ready"| C["Review plan"]
end
subgraph Approval
C -->|"â³ /plot-approve<br/>(or PR already merged)"| D["Plan merged<br/>impl PRs created"]
end
subgraph Implementation
D -->|"â¡ create branches"| E["Work on<br/>impl branches"]
E -->|"⸠draft â review â merge<br/>(standard code review)"| F["All impls<br/>merged to main"]
end
subgraph Delivery
F -->|"â¡ /plot-deliver"| G["Plan delivered"]
end
subgraph Release
G -->|"â¡ /plot-release rc"| H["RC tag +<br/>checklist"]
H -->|"⸠endgame testing"| I{"All verified?"}
I -->|"no: fix â new RC"| H
I -->|"â³ sign-off"| J["â¡ /plot-release"]
end
Legend: ⡠automate ASAP · ⸠natural pause · Ⳡhuman-paced
Docs / Infra (live when merged)
flowchart LR
A["/plot-idea<br/>(optional)"] -->|draft PR| B["Refine plan"]
B -->|"/plot-approve<br/>(if planned)"| C["Impl branch"]
C -->|"code review<br/>& merge"| D["Merged to main<br/>LIVE"]
D -->|"/plot-deliver<br/>(if planned)"| E["Plan delivered"]
F["Direct branch<br/>(no plan)"] -->|"code review<br/>& merge"| D
Sprint Lifecycle
flowchart LR
A["/plot-sprint<br/><slug>: <goal>"] -->|"⸠drafting"| B["Planning"]
B -->|"â³ /plot-sprint commit"| C["Committed"]
C -->|"â¡ /plot-sprint start"| D["Active"]
D -->|"â³ /plot-sprint close"| E["Closed"]
Sprints are an optional temporal lens over plans. Sprint files live in docs/sprints/, committed directly to main. See /plot-sprint for full details.
Direct Work (no planning step)
Small features, bug fixes, docs, and infra tasks go directly to a PR:
feature/<slug> â PR â merge
bug/<slug> â PR â merge
docs/<slug> â PR â merge
infra/<slug> â PR â merge
Phases
Plan Phases
| Phase | Meaning | Trigger | Transition Pacing |
|---|---|---|---|
| Draft | Plan being written/refined | /plot-idea |
⸠natural pause (writing) |
| Approved | Plan merged, impl branches created | /plot-approve |
â³ human-paced (review) â â¡ automate (branch creation) |
| Delivered | All impl PRs merged, plan delivered | /plot-deliver |
⸠natural pause (implementation) â â¡ automate (delivery) |
| Released | Included in a versioned release | /plot-release |
â¡ automate (RC tag) â ⸠endgame â â³ sign-off â â³ human-paced (version bump, tag, push) |
The Release phase includes an RC verification loop. Individual plans don’t track a “Testing” phase â the release checklist does. See the Pacing section in the manifesto for details.
Sprint Phases
| Phase | Meaning | Trigger | Transition Pacing |
|---|---|---|---|
| Planning | Sprint being drafted, items selected | /plot-sprint <slug>: <goal> |
⸠natural pause (drafting) |
| Committed | Team agreed on sprint contents | /plot-sprint <slug> commit |
â³ human-paced (agreement) |
| Active | Sprint running, work in progress | /plot-sprint <slug> start |
â¡ automate ASAP |
| Closed | Timebox ended, retro captured | /plot-sprint <slug> close |
â³ human-paced (retrospective) |
Conventions
- Branch prefixes:
idea/(plans),feature/,bug/,docs/,infra/(implementation) - Plan files:
docs/plans/YYYY-MM-DD-<slug>.mdâ date-prefixed, never move once created - Active index:
docs/plans/active/<slug>.mdâ symlinks to Draft/Approved plans - Delivered index:
docs/plans/delivered/<slug>.mdâ symlinks to Delivered plans - Plan PR: starts as draft (being refined), marked ready with
gh pr ready, titledPlan: <title> - Impl PRs: draft, created by
/plot-approve, reference the plan on main - Sprint files:
docs/sprints/YYYY-Www-<slug>.mdâ ISO week-prefixed, committed directly to main - Sprint active index:
docs/sprints/active/<slug>.mdâ symlinks to active sprints
Guardrails
/plot-approverequires plan PR to be non-draft or already merged â no approving unreviewed plans/plot-deliverrequires all impl PRs merged â no premature delivery/plot-releaserequires delivered plans â cannot release undelivered work; verifies readiness but does not execute release steps without user confirmation/plotdetects orphan impl branches (no approved plan) â prevents coding without context- Phase field in plan files is machine-readable â every command checks current phase before acting
Dispatcher
The /plot command analyzes current git state and suggests the next action.
Decision Tree
flowchart TD
Start["/plot"] --> ReadState["Read: current branch,<br/>active plans, open PRs"]
ReadState --> OnIdea{On idea/* branch?}
OnIdea -->|yes| PlanDraft["Show plan status<br/>Suggest: refine, gh pr ready,<br/>or /plot-approve"]
OnIdea -->|no| OnImpl{On impl branch?}
OnImpl -->|yes| HasPlan{Has approved plan?}
HasPlan -->|yes| ImplStatus["Show impl PR status<br/>Suggest: keep working,<br/>mark ready, or /plot-deliver"]
HasPlan -->|no| Orphan["Orphan branch!<br/>Suggest: /plot-idea first"]
OnImpl -->|no| OnMain{On main?}
OnMain -->|yes| ListPlans["List active plans +<br/>delivered plans awaiting release<br/>Suggest next action"]
OnMain -->|no| Other["Show general status"]
1. Read State
Gather context in parallel:
# Current branch
BRANCH=$(git branch --show-current)
# Active plans on main
ls docs/plans/active/ 2>/dev/null
# Delivered plans
ls docs/plans/delivered/ 2>/dev/null
# Active sprints
ls docs/sprints/active/ 2>/dev/null
# Open PRs on idea/ branches
gh pr list --json number,title,headRefName,isDraft,state --jq '.[] | select(.headRefName | startswith("idea/"))'
# Open PRs on impl branches (feature/, bug/, docs/, infra/)
gh pr list --json number,title,headRefName,isDraft,state --jq '.[] | select(.headRefName | startswith("feature/") or startswith("bug/") or startswith("docs/") or startswith("infra/"))'
Also run the bash helpers if a specific slug is in context:
./scripts/plot-pr-state.sh <slug>â plan PR state./scripts/plot-impl-status.sh <slug>â impl PR states
2. Detect Current Context
If on an idea/* branch:
- Read the plan file from
docs/plans/<slug>.mdon this branch - Check plan PR state (draft / ready / merged)
- Suggest:
- If plan PR is draft: “Plan is still a draft. Refine it, then run
gh pr ready <number>when ready for review.” - If plan PR is non-draft (ready for review): “Plan is ready for review. Run
/plot-approve <slug>to merge and create impl branches.” - If plan PR is merged: “Plan is already approved. Run
/plot-approve <slug>to create impl branches (if not already created).”
- If plan PR is draft: “Plan is still a draft. Refine it, then run
If on an impl branch (feature/*, bug/*, docs/*, infra/*):
- Check if there’s a corresponding approved plan via
docs/plans/active/<slug>.mdon main - If plan exists: show impl PR status, suggest keep working / mark ready /
/plot-deliver - If no plan exists: warn “Orphan branch â no approved plan found. Consider running
/plot-ideafirst.”
If on main:
- List all active plans with their phases
- List any delivered plans awaiting release (from
docs/plans/delivered/) - List active sprints with countdown and progress:
week-1 â "Ship auth improvements" | 3 days remaining | Must: 2/4 done. Past end date: show “ended 2 days ago” factually â no warning tone, no nagging. - Show overall status summary
- Suggest next action based on what’s pending
Otherwise:
- Show general status: active plans, open PRs, recent deliveries
3. Detect Issues
Flag any problems found:
- Orphan impl branches: branches with
feature/,bug/,docs/,infra/prefix that have no corresponding plan indocs/plans/ - Phase mismatches: plan says Draft but PR is non-draft, or plan says Approved but PR is still open
- Stale drafts: impl PRs that have been in draft state for more than 7 days
- Overlapping plans: Draft/Approved plans with titles sharing 3+ significant words â flag in the status summary as informational (no blocking)
- Sprints past end date: active sprints where end date has passed â flag as informational
- Multiple active sprints: more than one active sprint â flag as informational
Smaller models: Skip title-similarity detection. Only report exact slug matches (identical filenames). Title overlap detection requires mid-tier reasoning.
4. Status Summary
Print a clear summary:
## Plot Status
### Active Plans
- `<slug>` â Phase: <phase> | Plan PR: #<n> (<state>) | Impl PRs: <count> merged / <count> total
### Active Sprints
- `<slug>` â "<goal>" | <N> days remaining | Must: <n>/<m> | Should: <n>/<m> | Could: <n>/<m>
### Issues
- <issue description>
### Suggested Next Step
> <specific command or action>