Personal pi coding agent configuration.
pi install git:git@github.com:bitmonk8/pi-config- subagent — Delegate tasks to specialized subagents with isolated context windows. Supports single, parallel (up to 16, 8 concurrent), and chained execution.
- slack — Hybrid Slack integration: read tools route through Slack's MCP server (Claude Code OAuth token), write tools call the Slack Web API directly with a bot token from
~/.pi/slack-config.json. - freepik — Generate imagery from text prompts via the Freepik API. Supports Nano Banana Pro (default, Google Gemini 3 — best for technical diagrams/text-heavy compositions), Nano Banana Pro Flash (Gemini 3.1 Flash, faster/cheaper), Seedream 4.5 (typography & posters), Flux Kontext Pro (reference-image design), and Mystic (photorealistic). Set
FREEPIK_API_KEYin your environment. - work-profile — Switch between work/personal/custom profiles and model tiers. Profiles map each tier (
fast,balanced,smart) to an explicit provider/model; subagents resolveactive/<tier>aliases from the active profile. - package-location — Tells every session where this
pi-configpackage lives on disk. It resolves its own install path at load time (no hard-coded path) and appends it to the system prompt viabefore_agent_start, so agents stop hunting the filesystem for their own configuration. Disable withPI_PACKAGE_LOCATION_DISABLE=1.
profiles.json uses tier-level providers so the custom profile can mix providers:
{
"custom": {
"autoUpdate": false,
"tiers": {
"fast": { "provider": "openrouter", "id": "google/gemini-2.5-flash" },
"balanced": { "provider": "unity-pilot", "id": "claude-sonnet-4-6" },
"smart": { "provider": "openai", "id": "gpt-5.1" }
},
"default": "balanced"
}
}Use /custom-profile for an interactive provider/model picker for all three custom tiers, or /custom-profile fast to configure one tier. Use /profile custom to activate it. /tier fast|balanced|smart switches the main session model. Subagent definitions keep using model: active/fast, model: active/balanced, or model: active/smart; the subagent extension resolves those aliases to the active profile's tier provider/model before spawning child pi.
| Agent | Model | Purpose |
|---|---|---|
| worker | Sonnet | General-purpose, full tool access |
| implementer | Sonnet | Spec → code → docs → delete spec |
| fixer | Sonnet | Apply minimal fix for a review finding, verify compilation/tests |
| consolidator | Sonnet | Deduplicate and organize review findings (cross-shard dedup when sharded) |
| review-shard-planner | Sonnet | Phase-0 sharded-review planner: shard plan + extractive global index (see docs/reference/review-sharding.md, docs/reference/pipeline-machinery.md §Review sharding) |
| review-issue-introduction-analyst | Sonnet | Per-finding issue-introduction analyst: walks git history of cited corpus locations to record when/how a defect was introduced (durable ## Issue introduction section; see docs/reference/issue-introduction-analysis.md) |
| triage-assessor | Sonnet | Validate findings, filter false positives, assign cost/benefit metadata |
Model tier is set per lens by its **Tier:** tag, not fixed at Haiku — see the routing convention in docs/reference/pipeline-machinery.md §Lens model-tier routing (Tier 1 → smart, Tier 2/3 → balanced by default; no lens runs on fast/Haiku).
| Agent | Focus |
|---|---|
| review-lens-correctness | Logic errors, race conditions, broken invariants |
| review-lens-simplification | Unnecessary complexity, over-abstraction |
| review-lens-testing | Missing coverage, silently skipping tests |
| review-lens-cruft | Stale comments, dead code, outdated TODOs |
| review-lens-separation | Single-responsibility violations |
| review-lens-naming | Names that don't reflect behavior |
| review-lens-placement | Code in the wrong location/layer |
| review-lens-doc-mismatch | Docs that don't match implementation |
| review-lens-error-handling | Silent failures, swallowed errors |
| Agent | Focus |
|---|---|
| review-lens-correctness-broad | Interface contract violations across modules |
| review-lens-simplification-broad | Unnecessary abstraction layers |
| review-lens-separation-broad | Overlapping modules, circular dependencies |
| review-lens-naming-broad | Inconsistent naming across files |
| review-lens-placement-broad | Files in wrong part of project structure |
| review-lens-doc-mismatch-broad | Systemic doc-code divergence |
Run before /implement to catch problems in a spec while it is still cheap to fix.
| Agent | Focus |
|---|---|
| spec-lens-clarity | Ambiguity, weasel words, vague modals, multiple interpretations |
| spec-lens-completeness | Missing edge cases, undefined behaviors, gaps an agent would have to invent |
| spec-lens-testability | Acceptance criteria present, verifiable, free of untestable quality words |
| spec-lens-consistency | Internal contradictions, inconsistent terminology, conflicting requirements |
| spec-lens-scope | Missing non-goals, scope creep, multiple features bundled, unclear priority |
| spec-lens-assumptions | Unstated assumptions, hidden requirements, implicit dependencies |
| spec-lens-traceability | Uniquely identifiable requirements, structure that supports referencing |
| spec-lens-prescription | Right level of "what vs how" — over- or under-specification |
| spec-lens-cruft | TBDs, brainstorm leftovers, stale references, decision logs, mixed phases |
| spec-lens-naming | Concepts named multiple ways, names that don't reflect meaning |
| spec-lens-placement | NFRs in user stories, contracts in narrative prose, mixed abstraction levels |
| spec-lens-error-model | Failure modes, error responses, recovery, partial-failure semantics |
| spec-lens-implementability | Could a fresh agent implement this without inventing contracts or behavior? |
| Agent | Focus |
|---|---|
| spec-lens-codebase-grounding-broad | Spec references real files, symbols, APIs; current-state claims are accurate |
| spec-lens-cross-spec-consistency-broad | Target spec doesn't contradict or duplicate other in-flight specs |
| spec-lens-doc-alignment-broad | Spec respects existing project docs, conventions, and AGENTS.md rules |
Run after /spec-review is clean and before /implement. Each agent receives both the spec (as source of truth) and the plan (as artifact under review).
| Agent | Focus |
|---|---|
| plan-lens-spec-coverage | Every spec requirement and acceptance criterion is implemented by some plan step |
| plan-lens-spec-fidelity | No plan step does work the spec didn't request — no scope drift |
| plan-lens-step-atomicity | Each step is independently buildable, verifiable, reviewable |
| plan-lens-ordering | No step depends on what a later step builds; dependencies are honored |
| plan-lens-validation | Each step has a done-condition; each acceptance criterion is asserted |
| plan-lens-overclaim | No step claims more completeness/guarantee than its named API, tool, or check delivers |
| plan-lens-risk | Destructive / irreversible / risky steps declare rollback, flags, telemetry |
/plan-review also reuses these existing lenses against the plan: spec-lens-clarity, spec-lens-consistency, spec-lens-traceability, spec-lens-cruft, spec-lens-naming, spec-lens-placement, spec-lens-assumptions, spec-lens-implementability, spec-lens-codebase-grounding-broad, spec-lens-doc-alignment-broad.
| Command | Description |
|---|---|
/review [target] |
Run 9 review lenses in parallel on changes (default: uncommitted) |
/spec-review <spec> |
Run 13 narrow + 3 broad spec lenses in parallel on a spec, then enrich every finding into docs/spec-review.md |
/plan-review <plan> [<spec>] |
Run 6 plan lenses + 8 reusable spec lenses + 2 broad lenses on a plan, then enrich every finding into <plan-dir>/plan-review.md and triage it in an isolated subagent (importance tagging, option pruning, stable IDs, bottom-up addressing order) — mirrors /spec-review's end-to-end shape |
/spec-to-plan [project-root] |
Build (or update) the plan for the project's spec following docs/reference/plan-guide.md, then run /plan-review and fix blocker/high findings across up to 3 review→fix iterations (via plan-review-fixer), then commit + push and summarize what was done and which findings remain (left documented in plan-review.md). Spec is read-only; medium-and-below findings are left for /plan-fix-findings-loop. Paths/policies from .pi/project-config.md. |
/review-fix-loop <policy> |
Autonomous review → triage → fix loop until clean |
/implement <spec> |
Implement spec + automatic review/fix loop |
/spec-fix-findings-loop [project-root] |
Fast loop. Normalize spec-review.md up front (collapse Shape: multiple → single via spec-review-recommendation-applier, then reduce), then fix every finding last → first with the urgent fast pass (spec-review-fixer → spec-fix-urgent-review severity-floor guard → bounded 3-iteration spec-diff-fixer auto-fix → park), commit + push per finding, then clear the review + parked docs and re-run /spec-review, looping until it converges (or a 12 h wall-clock / context-pressure cap). No heavy inner loop. Paths/policies from .pi/project-config.md. |
/spec-fix-finding-urgent <FindingID> [project-root] |
Fast-track one spec-review finding by ID, bypassing the thorough pipeline. Applies the fix via spec-review-fixer, runs a single spec-fix-urgent-review pass that guards only against introducing an issue more important than the one being fixed (severity floor = the finding's own Importance/Score), then commits + pushes automatically on a clean result. On failure it stops and drives an interactive decision (fix the regression / commit anyway / abort). Never touches spec-diff-fix-loop/-pass-review/-classifier. |
/plan-fix-findings-loop [project-root] |
Plan-pipeline analogue of /spec-fix-findings-loop for plan-review.md (no reduced state, so Stage A only collapses; no co-resolve cluster). Re-reviews via /plan-review. Requires planPath etc. in project config. |
/plan-fix-finding-urgent <FindingID> [project-root] |
Plan-pipeline analogue of /spec-fix-finding-urgent. Fast-track one plan-review finding by ID via plan-review-fixer, runs a single plan-fix-urgent-review pass (severity floor = the finding's own Importance/Score), then commits + pushes automatically on a clean result; on failure drives the same interactive decision. Plan findings have no State: reduced gate. Never touches plan-diff-fix-loop/-classifier. |
/spec-plan-fix-findings-loop [project-root] |
Cross-tree loop. Reviews both the spec and the plan (/spec-review + /plan-review) and merges every finding into a single spec-plan-review.md (each tagged Tree: spec|plan), then fixes each finding last → first with a cross-boundary fast pass: a fix may edit the spec tree, the plan tree, or both (via spec-diff-fixer / plan-diff-fixer), and is gated against both document sets' criteria — spec-fix-urgent-review over the spec diff and plan-fix-urgent-review over the plan diff, blocking on the union of at-or-above-floor regressions; bounded 3-iteration auto-fix → park; commit + push per finding (spec co-resolve clusters are fixed/reviewed/parked as one unit; plan findings are processed singly); then clear + re-review both trees and loop until the merged review converges (or a 12 h wall-clock / context-pressure cap). The cross-tree union of /spec-fix-findings-loop and /plan-fix-findings-loop; requires both spec and plan paths in project config. No heavy inner loop. |
/plan-spec-fix-finding-urgent <FindingID> <Option> [project-root] |
Fast-track ONE cross-boundary finding (one whose chosen resolution edits BOTH trees) by ID + option. The cross-tree union of the two single-tree urgent commands: applies plan-side + spec-side edits via plan-diff-fixer / spec-diff-fixer, runs BOTH urgent reviewers, gates on their union, commits + pushes on clean; on failure drives an interactive decision. |
/impl-fix-findings-loop [project-root] |
Impl-pipeline analogue of /spec-fix-findings-loop for docs/impl-review.md. Operates on the code; severity floor = Importance band (no score); rolls back with git reset --hard + git clean; re-reviews via /impl-review-project. Impl has no bulk reducer, so Stage A only collapses and stray State: shaped findings are parked. |
/impl-fix-finding-urgent <FindingID> [project-root] |
Impl-pipeline analogue. Fast-track one docs/impl-review.md finding by ID via impl-review-fixer, runs a single impl-fix-urgent-review pass over the code diff (severity floor = the finding's Importance band; impl carries no per-finding score), then commits + pushes automatically on a clean result; on failure drives the same interactive decision. Rolls back with git reset --hard + git clean. Never touches impl-diff-fix-loop/-classifier. |
/project-audit |
Full project audit: narrow + broad lenses, triage, interactive fixes |
/decruft <target> |
Remove historical cruft from files |
/commit-push-check |
Lint (Rust: clippy/fmt), commit, push, verify CI green |
/doc-conv <document> |
Interactive conversation about a document |
/new-session |
Orient on project status and pick next work |
The /*-fix-findings-loop prompts and their helper agents
(spec-review-fixer, spec-review-shape-single-picker,
spec-review-recommendation-applier, plan-review-fixer,
plan-review-shape-single-picker, plan-review-recommendation-applier,
spec-diff-fixer, plan-diff-fixer) are project-agnostic. Each
project they run against keeps a small .pi/project-config.md at its
root declaring spec/plan paths, project name, topic-folder layout,
stable-ID allocation policy, and any extra do-not-touch paths.
See docs/reference/project-config.md in this package
for the full schema and two complete examples (a single-repo project
with flat topics and no stable IDs; a subproject of a larger worktree
with subfoldered topics and allocate-at-write IDs).
The spec/plan review pipelines (/spec-review, /plan-review) shape a
document into the right form by raising findings through review lenses
(agents/spec-lens-*.md, agents/plan-lens-*.md) and then fixing them
— a stick. The matching carrots describe the target shape up
front, so an author (often an agent) writes a good spec or plan the
first time and sails through review:
docs/reference/spec-guide.md— what a good spec looks like: structure, authoring principles (the positive form of each spec lens), anti-patterns, and a pre-flight self-check.docs/reference/plan-guide.md— what a good plan looks like: ordered atomic steps, spec coverage/fidelity, validation gates, risk handling, plus a pre-flight self-check.
Both guides are deliberately consistent with the review lenses and with
the binding rules in docs/reference/spec-principles.md
(SP-1 boundary discipline, SP-2 directional/advisory fields, SP-3
amplification traps) — following a guide will not steer you into a shape
a lens later rejects. Where a guide and spec-principles.md ever appear
to differ, the principles doc wins. The content-authoring agents
(spec-review-fixer, spec-diff-fixer, plan-review-fixer,
plan-diff-fixer) are pointed at these guides and read them before
writing spec/plan content.
pi update