pi-pair-programmer 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +83 -23
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,63 +1,111 @@
1
- # Pi Pair Programmer
1
+ <a id="top"></a>
2
2
 
3
- Background code review for [Pi](https://pi.dev/docs/extensions) and [OMP](https://omp.sh/docs/extension-authoring).
3
+ <div align="center">
4
+
5
+ # 🧑‍💻 Pi Pair Programmer
6
+
7
+ **Background code review for [Pi](https://pi.dev/docs/extensions) and [OMP](https://omp.sh/docs/extension-authoring).**
8
+
9
+ [![CI](https://github.com/T-moz/pi-pair-programmer/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/T-moz/pi-pair-programmer/actions/workflows/ci.yml)
10
+ [![Coverage: 100%](https://img.shields.io/badge/coverage-100%25-brightgreen)](vitest.config.ts)
11
+ [![npm version](https://img.shields.io/npm/v/pi-pair-programmer)](https://www.npmjs.com/package/pi-pair-programmer)
12
+ [![npm downloads](https://img.shields.io/npm/dm/pi-pair-programmer)](https://www.npmjs.com/package/pi-pair-programmer)
13
+ [![Node](https://img.shields.io/node/v/pi-pair-programmer)](package.json)
14
+ [![TypeScript](https://img.shields.io/badge/types-TypeScript-3178c6)](tsconfig.json)
15
+ [![License](https://img.shields.io/npm/l/pi-pair-programmer)](LICENSE)
16
+
17
+ [**Why**](#-why) · [**Install**](#-install) · [**Use**](#-use) · [**How it works**](#-how-it-works)
18
+
19
+ <br />
4
20
 
5
21
  ![Pi Pair Programmer workflow: coding agent writes code, focused reviewers filter findings, then the agent accepts or rejects feedback before continuing](assets/pair-programmer-overview.png)
6
22
 
7
- ## Why
23
+ </div>
8
24
 
9
- Coding with AI adds entropy to a codebase.
10
- Agents optimize for local correctness instead of thinking about the global system. They repeat code and reinvent the wheel.
25
+ ---
26
+
27
+ ## 🤔 Why
28
+
29
+ > **Coding with AI adds entropy to a codebase.**
30
+ > Agents optimize for local correctness instead of thinking about the global system. They repeat code and reinvent the wheel.
11
31
 
12
32
  Turn-by-turn static analysis is necessary but not sufficient.
13
33
  Code review happens too late in the code production pipeline.
14
34
 
15
- 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.
35
+ <p align="center">
36
+ <img src="assets/cost-to-fix.svg" alt="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" />
37
+ </p>
38
+
39
+ 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.
16
40
 
17
- ## Install
41
+ ---
42
+
43
+ ## 📦 Install
18
44
 
19
45
  Install the published [npm package](https://www.npmjs.com/package/pi-pair-programmer).
20
46
 
21
- With Pi:
47
+ <table>
48
+ <tr>
49
+ <th>With Pi</th>
50
+ <th>With OMP</th>
51
+ </tr>
52
+ <tr>
53
+ <td>
22
54
 
23
55
  ```sh
24
56
  pi install npm:pi-pair-programmer
25
57
  ```
26
58
 
27
- With OMP:
59
+ </td>
60
+ <td>
28
61
 
29
62
  ```sh
30
63
  omp install pi-pair-programmer
31
64
  ```
32
65
 
66
+ </td>
67
+ </tr>
68
+ </table>
69
+
33
70
  Restart Pi or OMP after installation to load the extension.
34
71
 
35
- For the Jev filter, set your TypeSafe API key before starting Pi or OMP:
72
+ 🔑 For the Jev filter, set your TypeSafe API key before starting Pi or OMP:
36
73
 
37
74
  ```sh
38
75
  export TYPESAFE_API_KEY="your-api-key"
39
76
  ```
40
77
 
41
- Without it, reviews still run, but only exact duplicate findings are filtered.
78
+ > [!NOTE]
79
+ > Without it, reviews still run, but only exact duplicate findings are filtered.
42
80
 
43
- ## Use
81
+ ---
44
82
 
45
- 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.
83
+ ## 🧭 Use
46
84
 
47
- Run `/pair-programmer` to toggle reviews.
85
+ 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.
48
86
 
49
- Run `/pair-clear` to cancel reviews and clear all findings.
87
+ | Command | Action |
88
+ | ------------------ | --------------------------------------------------------------------------------------------------- |
89
+ | `/pair-programmer` | Toggle reviews. |
90
+ | `/pair-clear` | Cancel reviews and clear all findings. |
91
+ | `/pair-stats` | View review activity, findings, tokens, and estimated costs on demand; missing usage stays unknown. |
50
92
 
51
- 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:
93
+ 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:
52
94
 
53
95
  ```json
54
96
  {
55
97
  "reviewers": [
56
98
  {
57
99
  "model": "current",
58
- "prompt": "Does it add entropy?",
59
- "include": ["src/**/*.ts"],
60
- "exclude": ["**/*.test.ts"]
100
+ "prompt": "Does this code add entropy?",
101
+ "include": ["**/*.dart"],
102
+ "exclude": ["**/*.g.dart", "**/*_test.dart"]
103
+ },
104
+ {
105
+ "model": "current",
106
+ "prompt": "Does this code reinvent the wheel instead of reusing code or a library?",
107
+ "include": ["**/*.dart"],
108
+ "exclude": ["**/*.g.dart", "**/*_test.dart"]
61
109
  }
62
110
  ]
63
111
  }
@@ -65,9 +113,21 @@ The default reviewer uses your current model and asks: “Does it add entropy?
65
113
 
66
114
  Use `current` or a `provider/model` identifier. File patterns are relative to your working directory; exclusions take precedence. Add entries for more reviewers.
67
115
 
68
- - `/pair-stats`: view review activity, findings, tokens, and estimated costs on demand; missing usage stays unknown.
69
- - 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/`).
116
+ > [!TIP]
117
+ > 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/`).
118
+
119
+ ---
120
+
121
+ ## 🔍 How it works
122
+
123
+ <p align="center">
124
+ <img src="assets/pair-programmer-workflow.svg" alt="Review workflow: background reviewers, Jev filters, and the accept/reject gate" />
125
+ </p>
126
+
127
+ <div align="center">
128
+
129
+ <sub>Released under the [MIT License](LICENSE) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md)</sub>
70
130
 
71
- ## How it works
131
+ <a href="#top">⬆ Back to top</a>
72
132
 
73
- ![Review workflow: background reviewers, Jev filters, and the accept/reject gate](assets/pair-programmer-workflow.svg)
133
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-pair-programmer",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "A TypeScript extension for Pi and OMP",
5
5
  "repository": {
6
6
  "type": "git",