@diegopetrucci/pi-contrarian 0.1.0

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.
@@ -0,0 +1 @@
1
+ 0.79.10
package/README.md ADDED
@@ -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.