Governance for AI-assisted engineering

Pi is not another code generator.

It does not replace your AI pair. It is the governance and context layer that makes Cursor, Claude Code, Codex CLI, Cline, and Windsurfsharper — and holds any coding agent to your team's standard.

The three categories

Code generator. Coding agent. Governance layer.

Most AI tools sit in the first two boxes. Pi lives in the third — deterministic boilerplate and standards that keep the first two honest. It governs what the LLM writes; it does not replace the AI pair.

Code generator ·

The AI typing in your IDE.

Writes code fast, inline, with a human in the loop. Great at the next 30 lines.

CursorClaude CodeCodex CLIGitHub Copilot

Coding agent ·

The AI running multi-step tasks in a loop.

Owns a mode, a chat, and an orchestrator. Great at autonomous multi-file work.

Kilo CodeClineRoo CodeAugment Intent

Governance layer ·

The governance + context layer under both.

Repo DNA, routines, deterministic rules, watch daemon, CI, hooks. Makes everything above trustworthy. Pi can emit deterministic boilerplate from routines — it governs what the LLM writes; it does not replace your AI pair.

Pi Hokage

Every dev team needs a code generator or a coding agent. Pi is what keeps them honest.

Integration, not competition

Pi makes the tools you already pay for smarter.

One command merges a marker-delimited block into every agent rules file you already use. No new IDE. No new subscription. No new chat box.

   pi learn  ──────────▶  .pi/system-style.json
                                 │
   pi routine ─────────▶  .pi/routines/<slug>/
                                 │
                                 ▼
                     agentic-ide-injector
                                 │
       ┌─────────────────────────┼─────────────────────────────┐
       ▼              ▼              ▼              ▼          ▼
   .cursorrules   CLAUDE.md   .clinerules   .windsurf/rules   AGENTS.md
       │              │              │              │          │
       ▼              ▼              ▼              ▼          ▼
    Cursor      Claude Code      Cline         Windsurf    Codex CLI

One command

pi routine --inject-ide cursor,claude,cline,windsurf

Merges only a marker-delimited block. Your existing rules are preserved.

Your team's DNA

Agents get pinned to your repo's actual imports, auth helper, and routing conventions — not a generic template.

// source: pi learn + .pi/system-style.json

Specific routines

When you're shipping Stripe, the agent only sees the Stripe routine — a deterministic spec, not a grab-bag of unrelated templates.

// source: lib/agentic-ide-injector.ts

Respectful contrast

How Pi differs from Augment Code and Kilo Code

Different categories, different value. Each block ends with where you'd actually use both together.

Pi vs Augment Code

category difference

Augment's pitch is a hosted Context Engine (semantic graph) + Intentmulti-agent workspace — “escape the IDE”. Pi sits a layer below.

  • Local-first repo DNA. pi learn writes .pi/system-style.json you own, audit, and redact.
  • Cited primitives. Every capability points at a real file under packages/pi-cli/src/lib/.
  • Deterministic & offline. Sharingan AST + ts-morph rules run on save without a cloud round-trip.
  • Not a new surface. Pi lives in your shell and your IDE. No separate workspace to adopt.

Use both. Augment's Intent for autonomous multi-repo orchestration on a 2M-LOC monolith; Pi as the governance layer underneath so Intent's agents stay pinned to your team's constitution.

Pi vs Kilo Code

category difference

Kilo is an open-source coding agent: 5 modes + Orchestrator, 500+ models via gateway, ROI dashboard. Pi is not a coding agent.

  • No mode. No chat loop. Pi orchestrates CLI subprocesses, not an agentic conversation.
  • Before and after, not during. pi learn before, pi routine to generate the spec, pi validate + pi watch after.
  • Resumable, not a second chat. Mastra workflow polling rejoins long runs — no second orchestrator window to babysit.
  • Universal VCS. Git, Perforce, GitLab, Bitbucket, Gerrit — out of the box.

Use both. Let Kilo write the code. Let Pi's constitution, pi watch, and pre-commit hooks hold Kilo's output to your team standard.

Five stories, no code required

What Pi actually does for a team on Monday morning

You don't have to be an engineer to follow these.

Stripe checkout, in a day, that passes review

A developer tells Pi what she wants. Pi picks the matching routine, lays out the four phases, and wires pre-commit validation. She focuses on the business logic; Pi checks that the webhook signature is verified and the idempotency key is real.

pi routine "add Stripe checkout + webhook"pi watch

Outcome. The PR lands before lunch, and review is about the pricing logic — not about missing webhook verification.

Upgrade auth across 80 files without a weekend panic

A staff engineer asks Pi to plan the migration. Pi reads the repo's DNA and writes a twelve-step plan with explicit dependencies. The team walks through it, saves continuously, and the watch daemon catches each regression the same second.

pi resonate "migrate Auth.js v4 to v5"pi watch --daemon

Outcome. Five days, not three weeks. Nobody loses a weekend.

A new hire ships on day one

New engineer. pi syncpulls the team's system-style. pi routine --show …shows them the exact pattern this team uses for Supabase Realtime. They skip two weeks of “figuring out how we do things here”.

pi syncpi routine --show supabase-realtime-subscription

Outcome. First PR merged on day one. Onboarding cost cut from weeks to hours.

Keep the AI from drifting

Pi injects your repo's DNA into Cursor, Claude Code, Cline, and Windsurf rules files. Now the AI pair doesn't invent a new auth helper — it reuses the one in src/lib/auth.ts that pi learn already found.

pi learnpi routine --inject-ide cursor,claude

Outcome. Every agent you use stays on your team's rails — without a new subscription.

Catch the security bug before CI screams

A junior pastes a raw SQL interpolation into a route. Before the save animation even finishes, Pi's watch daemon flags it with a plain English reason and a link to the rule.

pi watch --daemonpi validate

Outcome. The issue is fixed in 30 seconds at the IDE, not 11 minutes later in CI.

Govern without adding process

A tech lead writes .pi/constitution.md once: rate-limit every public route, use the shared error envelope, never import fetch in a server action. Pi turns it into pre-commit + CI checks automatically.

pi init --with-hooks --ci githubpi validate

Outcome. The standard is enforced on every commit. No more design reviews that rediscover the same five rules.

~12 engineer-hours per week

Not a slogan. A formula you can audit.

Lead with a number a CFO can defend: the same four review failures recur until deterministic checks catch them before review. Below is a conservative model — swap in your own rework rate.

Step-by-step

  1. 01Team pushes 40 PRs/week.
  2. 0225% bounce on review for the same four classes of mistake: hallucinated helpers, missing webhook verification, N+1 queries, drifted patterns.
  3. 03That is ~10 avoidable reworks/week × 1.5h each = 15h/week.
  4. 04pi validate + pi watch + constitution.md catch three of the four classes deterministically — ~80% eliminated.
  5. 05~12h/week recovered, with no IDE change and no new model bill.

Per team, per quarter

12 h/wk × 13 wk = ~150 h

Roughly four engineer-weeks reclaimed per team per quarter.

What wins the budget conversation

~12 hours per team per week of avoidable rework pushed left — before it becomes a review comment or a CI failure. That is a concrete, auditable story; it is not a magic productivity multiplier.

Numbers are a math model, not a claim we've benchmarked for your team. Swap in your own rework rate to audit.

Error catching

What Pi catches that your AI won't

Three layers, each one a before/after story in plain English.

Deterministic rules

Before

An agent invents a new auth helper; the PR review spots it two days later.

With Pi

Pi's Sharingan + ts-morph rules run on your exact code and flag the duplicate at save, with a reason in plain English.

// source: packages/pi-cli/src/lib/ast/sharingan.ts, lib/rules/ts-morph-rules.ts

Watch daemon

Before

A `any` slips into a public export and nobody notices until TypeScript in CI takes 11 minutes to tell you.

With Pi

`pi watch --daemon` validates only the file you just saved. The mistake is red in your terminal the same second.

// source: packages/pi-cli/src/commands/watch.ts, lib/watch-observability.ts

Constitution + hooks

Before

Someone ships a new route with no rate limit; it goes live on Monday and takes the DB down on Tuesday.

With Pi

The pre-commit hook refuses the commit because your team's constitution requires rate-limit middleware on every public route.

// source: packages/pi-cli/src/lib/git-hooks-installer.ts, lib/rules/custom-rules.ts

Code generators write. Pi refuses.

Why teams love it

Six reasons, every one already true

All cited against a real file. No roadmap slides.

No new IDE. No new model bill.

Pi injects your team's DNA into .cursorrules, CLAUDE.md, .clinerules, and .windsurf/rules. You keep what you pay for; it just gets sharper.

// packages/pi-cli/src/lib/agentic-ide-injector.ts

Works with Git, Perforce, GitLab, Bitbucket, Gerrit.

Adapters, not assumptions. Pi runs the same way in your enterprise monorepo and your side project.

// packages/pi-cli/src/lib/vcs/

Resumable by design.

Long tasks survive dropped connections. Task trees, workflow polling, and session stores rejoin where you left off.

// packages/pi-cli/src/lib/task-store.ts, lib/workflow-poller.ts

Secret-redacted before anything leaves the machine.

Pi learn + pi prompt apply redaction for Stripe, Pi, and generic secrets. You can ship it in regulated environments.

// packages/pi-cli/src/lib/privacy/redactor.ts

Speaks your language.

The NL router takes any-language prompts and falls back to offline heuristics when the API is unreachable.

// packages/pi-cli/src/lib/polyglot-router.ts, lib/nlp-router.ts

Everything is cited.

Every capability on this site points at the real file that implements it. No invisible magic.

// packages/pi-cli/src/lib/