Skip to content

Repository files navigation

🧑‍💻 Pi Pair Programmer

Background code review for Pi and OMP.

CI Coverage: 100% npm version npm downloads Node TypeScript License

Why · Install · Use · How it works


Pi Pair Programmer workflow: coding agent writes code, focused reviewers filter findings, then the agent accepts or rejects feedback before continuing


🤔 Why

Coding with AI adds entropy to a codebase. Agents optimize for local correctness instead of thinking about the global system. They repeat code and reinvent the wheel.

Turn-by-turn static analysis is necessary but not sufficient. Code review happens too late in the code production pipeline.

Cost to fix rises from standards and static analysis to PR checks, AI PR review, and human PR review; Pi Pair Programmer reviews right after each write

This extension lets you run multiple highly specialized reviewers, each focused on a specific concern, to catch issues static analysis cannot detect, as soon as code is generated. Without bloating the context window, thanks to a Jev-based filter that removes inherited and duplicate findings.


📦 Install

Install the published npm package.

With Pi With OMP
pi install npm:pi-pair-programmer
omp install pi-pair-programmer

Restart Pi or OMP after installation to load the extension.

🔑 For the Jev filter, set your TypeSafe API key before starting Pi or OMP:

export TYPESAFE_API_KEY="your-api-key"

Note

Without it, reviews still run, but only exact duplicate findings are filtered.


🧭 Use

Reviews are on by default. After each successful write or edit, reviewers run in the background. The coding agent must accept or reject each finding with a reason before continuing with other tools. Only accepted findings appear in your transcript.

Command Action
/pair-programmer Toggle reviews.
/pair-clear Cancel reviews and clear all findings.
/pair-stats View review activity, findings, tokens, and estimated costs on demand; missing usage stays unknown.

The default reviewer uses your current model and asks: “Does it add entropy?” To change the prompt, model, or files reviewed, create pair-programmer.reviewers.json in your working directory:

{
  "reviewers": [
    {
      "model": "current",
      "prompt": "Does this code add entropy?",
      "include": ["**/*.dart"],
      "exclude": ["**/*.g.dart", "**/*_test.dart"]
    },
    {
      "model": "current",
      "prompt": "Does this code reinvent the wheel instead of reusing code or a library?",
      "include": ["**/*.dart"],
      "exclude": ["**/*.g.dart", "**/*_test.dart"]
    }
  ]
}

Use current or a provider/model identifier. File patterns are relative to your working directory; exclusions take precedence. Add entries for more reviewers.

Tip

Diagnostics stay in files, never the terminal: OMP uses its native logs; Pi uses ~/.pi/agent/logs/pair-programmer/ (or $PI_CODING_AGENT_DIR/logs/pair-programmer/).


🔍 How it works

Review workflow: background reviewers, Jev filters, and the accept/reject gate

About

Eradicate AI Slop, when it's generated

Resources

Contributing

Security policy

Stars

8 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages