@diegopetrucci/pi-extensions 0.1.51 → 0.1.52
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.
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# pi-extensions
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@diegopetrucci/pi-extensions)
|
|
4
|
+
|
|
3
5
|
A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions and skills I made.
|
|
4
6
|
|
|
5
7
|
- [`agent-workflow-audit`](./extensions/agent-workflow-audit): Adds `/agent-workflow-audit`, which runs an isolated repo workflow audit subagent and returns only the final distilled report to the main session.
|
|
@@ -8,13 +10,14 @@ A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions
|
|
|
8
10
|
- [`brrr`](./extensions/brrr): Sends brrr push notifications when pi finishes an agent turn and is ready for input, with optional macOS idle gating.
|
|
9
11
|
- [`claude-fast`](./extensions/claude-fast): Adds `/claude-fast` to enable Anthropic Claude Fast mode for supported Claude Opus models by injecting `speed: "fast"`.
|
|
10
12
|
- [`confirm-destructive`](./extensions/confirm-destructive): Confirms before destructive session actions like clear, switch, and fork.
|
|
13
|
+
- [`contrarian`](./extensions/contrarian): Adds a read-only contrarian tool that spins up an isolated subprocess to stress-test plans, designs, assumptions, bug hypotheses, and conclusions by steelmanning the strongest opposing case.
|
|
11
14
|
- [`context-cap`](./extensions/context-cap): Caps effective model context windows at 200k tokens by default so pi avoids the `dumb zone`; toggle temporarily with `/context-cap`.
|
|
12
15
|
- [`context-inspector`](./extensions/context-inspector): Adds `/context`, a local self-contained HTML dashboard that breaks down where the current session context is going, with category overview, top offenders, and drilldown search.
|
|
13
16
|
- [`dirty-repo-guard`](./extensions/dirty-repo-guard): Prompts before new sessions, session switches, or forks when the current git repo has uncommitted changes.
|
|
14
17
|
- [`git-footer`](./extensions/git-footer): Standalone extension that adds TLH-style git dirty counts, ahead/behind, and optional PR number to pi's built-in footer status area.
|
|
15
18
|
- [`gnosis`](./extensions/gnosis): Exposes the `gn` repo-local knowledge base CLI as an agent tool for searching and recording durable project decisions, constraints, and intent.
|
|
16
|
-
- [`inline-bash`](./extensions/inline-bash): Expands `!{command}` snippets in user prompts by running them through bash before the prompt reaches the agent.
|
|
17
19
|
- [`illustrations-to-explain-things`](./extensions/illustrations-to-explain-things): Adds a skill for generating clean, absurd Xiaohei-style article illustrations, shot lists, image edits, and visual metaphors.
|
|
20
|
+
- [`inline-bash`](./extensions/inline-bash): Expands `!{command}` snippets in user prompts by running them through bash before the prompt reaches the agent.
|
|
18
21
|
- [`librarian`](./extensions/librarian): Adds a GitHub research scout with a local repo checkout cache disabled by default under the OS user cache directory, toggleable with `/librarian-cache`, configurable subagent model/thinking defaults via `/librarian-config`, and cached repos expiring after 7 days of non-use.
|
|
19
22
|
- [`minimal-footer`](./extensions/minimal-footer): Replaces pi's built-in footer with a minimal configurable two-line layout: branch plus cached git dirty/ahead/PR status and repo on the first line, context/model on the second, optional `DUMB ZONE`, optional `xp` marker, plus OpenAI Codex 5-hour and 7-day usage when available.
|
|
20
23
|
- [`notify`](./extensions/notify): Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.79.10
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# contrarian
|
|
2
|
+
|
|
3
|
+
A read-only contrarian subagent for [pi](https://github.com/earendil-works/pi-mono).
|
|
4
|
+
|
|
5
|
+
It adds a `contrarian` tool that spins up a separate pi subprocess to stress-test plans, designs, assumptions, bug hypotheses, review conclusions, and product directions by steelmanning the strongest credible opposing case.
|
|
6
|
+
|
|
7
|
+
This is adapted from the TLH [`contrarian` subagent prompt](https://github.com/diegopetrucci/the-last-harness/blob/main/agents/subagents/contrarian.md) into a standalone pi extension.
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
- creates an isolated read-only subprocess
|
|
12
|
+
- prefers a strong model on the opposite model family/provider when available, then falls back to the best available model
|
|
13
|
+
- requests `high` reasoning by default for reasoning models, then clamps to the model-supported thinking level
|
|
14
|
+
- defaults to `read,grep,find,ls`, with optional non-mutating bash inspection
|
|
15
|
+
- renders the contrarian response with model, thinking level, timing, and usage info
|
|
16
|
+
- shows a live contrarian status line and widget while the subprocess is running
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
### Standalone npm package
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pi install npm:@diegopetrucci/pi-contrarian
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Collection package
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pi install npm:@diegopetrucci/pi-extensions
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### GitHub package
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pi install git:github.com/diegopetrucci/pi-extensions
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then reload pi:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
/reload
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Ask pi normally, for example:
|
|
47
|
+
|
|
48
|
+
- `Use the contrarian to stress-test this refactor plan.`
|
|
49
|
+
- `Ask contrarian for the strongest opposing case before we commit to this design.`
|
|
50
|
+
- `Have contrarian review my bug hypothesis and identify what evidence could disprove it.`
|
|
51
|
+
|
|
52
|
+
The main agent can call the tool directly.
|
|
53
|
+
|
|
54
|
+
## User defaults
|
|
55
|
+
|
|
56
|
+
Use `/contrarian` to set persisted defaults that apply to future contrarian tool calls, including calls the agent launches automatically without per-call overrides.
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
/contrarian status
|
|
60
|
+
/contrarian model anthropic/claude-opus-4-8
|
|
61
|
+
/contrarian thinking high
|
|
62
|
+
/contrarian thinking auto
|
|
63
|
+
/contrarian clear model
|
|
64
|
+
/contrarian clear thinking
|
|
65
|
+
/contrarian clear
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Use `/contrarian-model` inside pi to see what it would pick right now.
|
|
69
|
+
|
|
70
|
+
Tool-call parameters still win over these defaults. `auto` clears the configured default and restores the built-in selection behavior. Preferences are saved under pi's agent directory in `extensions/contrarian.json`.
|
|
71
|
+
|
|
72
|
+
## Tool parameters
|
|
73
|
+
|
|
74
|
+
- `task` - required prompt for the contrarian
|
|
75
|
+
- `includeBash` - optional, adds `bash` for non-mutating inspection
|
|
76
|
+
- `model` - optional explicit model override; falls back to the `/contrarian model` default, then auto-selection
|
|
77
|
+
- `thinkingLevel` - optional reasoning/thinking override; falls back to the `/contrarian thinking` default, then built-in defaults
|
|
78
|
+
- `cwd` - optional working directory override
|
|
79
|
+
|
|
80
|
+
## Notes
|
|
81
|
+
|
|
82
|
+
- The contrarian is intentionally **read-only**.
|
|
83
|
+
- It never implements fixes or produces patches.
|
|
84
|
+
- Its output separates confirmed objections, plausible concerns, and unresolved unknowns.
|
|
85
|
+
- It is best for adversarial review before committing to a plan, design, or conclusion.
|