pipekit
CLAUDE.md6 starsChanged 2 months agoMITView on GitHub
v5.4.1 — Last updated: 2026-10-31 (v5.4.0 — the 2026-10-31 audit release* (#215–#218): a fresh pk init project works, pk doctor names a foreign binary, template placeholders and missing Linear states; MIT license and a README that gets a stranger to a green pk doctor; skill commands are /light-spec, /light-spec-revise, /roadmap-review, /strategy-sync (no numeric prefixes) and /work is the one executor again; no former consumer is named anywhere a sync can carry it. New config keys Merge method, Secrets reference file,…
In this repository32 other files it gives its agents.
- brainstorm-reviewSkill
- brainstormSkill
- conceptSkill
- defineSkill
- financial-reviewSkill
- light-spec-reviseSkill
- light-specSkill
- linear-hygieneSkill
- linearSkill
- phase-planSkill
- pipekit-helpSkill
- pipekit-updateSkill
- pk-bugSkill
- pk-exitSkill
- pk-expressSkill
- pr-fixSkill
- prod-readySkill
- pr-security-reviewSkill
- release-changelogSkill
- repo-security-reviewSkill
- review-planSkill
- roadmap-createSkill
- roadmap-reviewSkill
- security-gateSkill
- spec-preflightSkill
- startupSkill
- strategy-createSkill
- strategy-syncSkill
- sync-linearSkill
- tpmSkill
- verifySkill
- workSkill
The file
Files
CLAUDE.md
v5.4.1 — Last updated: 2026-10-31 (v5.4.0 — the 2026-10-31 audit release (#215–#218): a fresh pk init project works, pk doctor names a foreign binary, template placeholders and missing Linear states; MIT license and a README that gets a stranger to a green pk doctor; skill commands are /light-spec, /light-spec-revise, /roadmap-review, /strategy-sync (no numeric prefixes) and /work is the one executor again; no former consumer is named anywhere a sync can carry it. New config keys Merge method, Secrets reference file, Plan path: none; the financial-review issue key is Financial review issue.)
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What This Repo Is
This is Pipekit — a portable, structured AI-assisted software delivery system. It is NOT a software project itself. It contains methodology docs, SOPs, templates, and Claude Code skills that get synced into consuming projects via scripts/sync-method.sh.
Extracted from a production finance platform.
Core Principle
No stage may introduce guesswork into the next stage. Specs must be planning-safe. Plans must be execution-safe. When ambiguity is detected, work goes backward, not forward.
Pipeline
Stage 0: Foundation (a contract — see Entry Modes)
/concept → /define → /strategy-create → /startup → /roadmap-create → /phase-plan
Stages 1-5: Development — the v2 daily loop (repeats per issue)
pk next → pk branch → /work → /verify → pk ship (Draft) → pk ready → [PR review + preview UAT → merge] → pk done → [dev UAT] → pk promote <env> → (PR merges) → pk promote <env> --finish
pk done runs AFTER the merge and verifies it. --merge is the exception (pk runs gh pr merge for you) — never suggest it for an already-merged PR.
Per session (NOT part of the issue chain): /pk-exit — the last command of whatever session you're in.
pk done runs from the parent repo and deletes the worktree, so in a worktree session: /pk-exit first, THEN leave the worktree and run pk done from the parent.Stage 0 is a contract (a set of artifacts the dev pipeline requires), not a script. Three entry modes satisfy the contract: greenfield (full chain), brownfield (skip /concept and /define), inherited (verify and proceed). /startup auto-detects mode and confirms with the user. The v2 daily loop replaces v1's /branch → /launch → /verify → /launch --close chain — see RUNBOOK.md for the one-page flowchart. Full Entry Modes table in method.md.
How Consuming Projects Work
Projects pull from this repo using sync-method.sh. The sync copies skills/, sop/, templates/, and method.md into the project, and writes the How we run block of the project's one runbook (engineering/RUNBOOK.md, v5.0.0 — the former pipekit/RUNBOOK.md; the Now block is /tpm's one-line pointer at the weekly plan engineering/WEEKLY_PLAN.md, which the sync scaffolds and only /tpm writes (v5.1.0), the rest to the project). It never touches project-specific files (method.config.md, .claude/rules/, project-specific skills). Exception: the five pipekit-* canonical rule files in .claude/rules/ are sync-owned; a Skip rules key in method.config.md opts a project out of canonical rules that don't apply to it (v4.21.0+).
Sync-safe overrides: projects can override synced skills/SOPs/method.md without forking by writing to .claude/overrides/. The sync script applies overrides after the upstream copy and surfaces drift warnings when upstream changes a file you override. See method.md § Sync-Safe Overrides.
Initiative Surface Ownership
Native-on-Workflow is the sole executor and the initiative surface is Linear-native. Pipekit owns the whole surface:
- Pipekit owns Linear issues, the initiative surface (Linear Initiatives
i{N}.→ ProjectsI{N}.P{N}.→ Issues; v4.1.0, projectI{N}.prefix added v4.5.0), strategy docs, andmethod.config.md. "What's next?" is read live from Linear viapk next(derives the current initiative from the initiative/project hierarchy); v2 retired theNEXT.mdmirror, v4.1.0 retiredPHASES.md/linear-map.json. - The roadmap is authored directly into Linear, at
/roadmap-create— thei{N}./I{N}.P{N}.hierarchy is the roadmap. - Both levels are completable (v4.28.0, the lanes model): an initiative is a release phase, a project is a lane of ~3–8 issues, and uncut work rests with no project plus an
Area:label. The walk reads into a project but never inside one, so a project that keeps accepting work hides its contents frompk next/pk status. Completability lives at the project level; eternity lives at the theme/label level. /workis the only executor entry point. It plans inline (parallelAgentgrounding) and executes on the savedpk-executeworkflow (workflows/pk-execute.js, synced to consumers'.claude/workflows/) — the native-on-Workflow backend — keeping Linear and thepk *state in sync. There is no backend selection.
Full initiative model in method.md (§ Initiative Surface Ownership).
Editing Skills
Edit the source, then run scripts/dogfood-sync.sh. Claude Code loads skills and rules from .claude/, but in this repo those are generated mirrors of skills/, templates/rules/, agents/, and workflows/ — gitignored, and refreshed only by that script (consuming projects get theirs from sync-method.sh). Editing .claude/ directly changes nothing that ships and is silently reverted on the next refresh. A stale mirror means your own /verify, /work, etc. are running old code: measured 2026-07-31, every mirrored skill had drifted, six were missing, and .claude/skills/verify/SKILL.md still carried a gate bug the same release had fixed. tests/pk-smoke.sh fails on drift locally and skips on CI, where the mirrors don't exist.
Skills live in skills/{name}/SKILL.md with YAML frontmatter (name, description). Portable skills must read method.config.md for project-specific values — never hardcode Linear IDs, team names, paths, or model names: subagent model + effort comes from the method.config.md § Model Policy roles (v4.13.0+), cited as "role per § Model Policy, default X" so the skill still works when the section is absent. Skills that reference skill.json use it for metadata only.
Three-Layer Enforcement Model
| Layer | Purpose |
CLAUDE.md (in consuming project) | Conventions for the executor (native-on-Workflow) |
| CI / Hooks | Hard enforcement — blocks merges |
| Skills (this repo) | Interactive shortcuts for hands-on sessions |
The executor doesn't call skills — it reads the consuming project's CLAUDE.md directly during execution.
Key Skills
Stage 0 (Foundation): /concept → /define → /strategy-create → /startup (orchestrates the chain, auto-detects entry mode) → /roadmap-create (authors the roadmap into Linear) → /phase-plan (selects the next execution phase; --cut batches backlog issues into a new lane).
Development Pipeline (v2 daily loop):
| Command | Purpose |
pk next | What's next, read live from Linear — derives the current initiative, groups issues by status with per-group hints. Focus lanes first (v4.38.0: Linear project priority 1/2/3 → tier A/B/C, then Supporting blockers, then the rest of the board); --lane <TAG> pins one lane as tier A for the run. |
pk sessions | Every live Claude Code session on this machine, read from transcript tails — waiting / waiting? / working, waiting first, with what each is asking. pk next and pk status lead with a one-line count when another session is waiting. |
pk issue … · pk project list · pk gql | The Linear verbs skills use on the api route (v5.0.0: Linear transport, default api): issue show/search/create/update/set/relate/comment with name-resolved state, label and project flags; project list = lanes with focus tier; gql = guarded passthrough for the long tail. Every mutation passes the workspace guard. Verb table in sop/Linear_SOP.md § Linear transport. |
pk branch <ID> | Worktree + branch + Linear → In Progress (idempotent). |
/work <ID> | The sole executor: plans inline, materializes a task DAG to .pk-work/<ID>-PLAN.md, hands it to the saved pk-execute workflow as data — one agent per task, verify before commit, expected-HEAD threading, optional disjoint-file parallel waves with an integration step — and writes the SUMMARY from the structured results. |
/verify | Pre-deploy gate. |
/security-gate [<ID>] | Feature-scoped security gate, between /verify and pk ship. Hard gate on projects with a categories file: pk ship refuses without a sha-matched PASS sentinel (--force-secgate / PK_SECGATE_BYPASS=1 to waive; plain --force does NOT). |
pk ship [--review] [--ready] | Push, open Draft PR, Linear → UAT. Refuses to push an off-format commit subject (--force waives, logs a Linear comment). |
pk ready [<ID>] [--force] | Flip Draft PR to Ready; outside reviewers run. No Linear state change. Refuses if source or a migration changed after the /verify that vouches for the branch, or if the verified sha is unreachable after a rebase (pk ship's gate is point-in-time; post-ship commits went unchecked). --force flips anyway and logs a Linear comment. |
pk done <ID> [--merge] | Verify the merge happened, clean up worktree+branch, post commits to Linear, transition UAT → In <FirstEnv> (→ Done on 1-tier). Then prints any [tpm] on-merge: notes /tpm left on the issue and asks before running them (v5.1.0). |
/prod-ready [<ID>] | Production-readiness gate, run once before the final pk promote. Hard gate on projects with a checks file: the final promote refuses without its sentinel (--force / PK_PRODREADY_BYPASS=1 to waive). |
pk promote <env> | Opens the promote PR along Ship environments; refuses if a bundled issue is still in UAT (--confirmed after env-UAT signoff). After it merges, pk promote <env> --finish transitions issues → In <Env> / Done. |
/pk-exit | Narrative session log to Logs/Sessions/. Run manually as the last command of every session — never auto-chained. |
pk doctor · pk config [<key>] · pk deploy [<env>] | Setup diagnosis — deps, template placeholders, the running binary vs this project's bin/pk, missing Linear workflow states · read one config key (what skills call for Linear transport, Merge method, …) · run the configured Deploy command on script-deploy projects. |
Orthogonal:
| Skill | Purpose |
/light-spec, /light-spec-revise | Structured specs as AI-to-AI contracts; revise applies review feedback surgically. |
/spec-preflight | Read-only empirical checks of a spec against reality (paths, symbol/line refs, deps). |
/pr-fix | PR review with severity×confidence triage and targeted remediation. |
/pr-security-review | Antagonistic security review of a PR diff (migrations, RLS, auth). |
/repo-security-review | Periodic whole-repo security audit — area sweep, adversarial verification, score report. Portable framework; audit areas in resources/repo-security-areas.md. Renamed from /security-review in v4.31.0 (built-in collision). |
/pk-bug | Bug pipeline: reproduce → regression-test-first → fix → ship → postmortem. |
/pk-express | Idea→Draft-PR autopilot for Quick/Standard-tier issues; stops at attention gates. |
/linear-hygiene | Classifies unclassified/untriaged issues (placement, not disposition) and flags board-shape drift — pool smell, spent lanes, walk-skip hazards. Never creates a project. The backstop since v4.37.0: mid-flow filers place follow-ups at creation per sop/Linear_SOP.md § Filing a follow-up issue; --session checks this session's filings. |
/tpm | Technical program manager for the board (v5.0.0): a working session that reconciles what is really in flight across § Portfolio repos, runs /linear-hygiene when drift touches the candidates, drafts MUST / NEXT / WAIT with the capacity arithmetic, and argues from sop/TPM_SOP.md until agreed. Writes tiers (pk focus), Hard-dependency relations and [tpm] comments to Linear, proves the order with pk next, and writes the weekly plan (§ Plan path, engineering/WEEKLY_PLAN.md, v5.1.0): a task list by session with the commands to run and the merge days, titles beside every ID; the runbook's Now block points at it. Leaves [tpm] on-merge: notes that pk done reads back. User-typed only; --quick, --check. |
/pipekit-help | Recommends the next pipeline step from project state. |
/brainstorm, /brainstorm-review | A raw idea → a triaged Linear issue (feasibility, not a spec); batch Now/Later/Kill triage of the untriaged pool. |
/roadmap-review | Audits roadmap health before a new initiative is specced — dependency order, spec coverage, lanes. |
/sync-linear | Reconciles strategy-doc drift against the Linear i{N}./I{N}.P{N}. hierarchy; Linear wins. |
/linear | Issue-workflow helper for transitions and structured comments outside the loop (pk issue … underneath). |
/review-plan | Standalone plan-reviewer pass over a .pk-work/<ID>-PLAN.md in a fresh chat; /work --deep runs the same agent inline. |
/financial-review | Periodic DB ↔ server ↔ UI parity audit for calculation-heavy projects; checks live in a per-project file. |
/strategy-sync | Updates Strategy docs post-ship to match what shipped. |
/release-changelog | Draft CHANGELOG entry from commits between tags. |
/pipekit-update | Pull latest Pipekit into a consuming project. |
Full skill list + authoring conventions in sop/Skills_SOP.md; daily-loop flowchart in RUNBOOK.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

