@leing2021/super-pi 0.22.0 → 0.22.1
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/LICENSE +21 -0
- package/README.md +148 -361
- package/THIRD-PARTY-NOTICES.md +35 -0
- package/extensions/subagent/__tests__/async-job-tracker.test.ts +21 -0
- package/extensions/subagent/__tests__/execution-activity.test.ts +15 -0
- package/extensions/subagent/__tests__/parallel-render-stress.test.ts +82 -0
- package/extensions/subagent/__tests__/render-dedup.test.ts +98 -0
- package/extensions/subagent/__tests__/render-widget.test.ts +28 -0
- package/extensions/subagent/__tests__/throttle.test.ts +90 -0
- package/extensions/subagent/agent-management.ts +3 -2
- package/extensions/subagent/agent-manager-chain-detail.ts +3 -2
- package/extensions/subagent/agent-manager-detail.ts +3 -2
- package/extensions/subagent/agent-manager-edit.ts +3 -2
- package/extensions/subagent/agent-manager-list.ts +3 -2
- package/extensions/subagent/agent-manager-parallel.ts +3 -2
- package/extensions/subagent/agent-manager.ts +3 -2
- package/extensions/subagent/agent-scope.ts +3 -2
- package/extensions/subagent/agent-selection.ts +3 -2
- package/extensions/subagent/agent-serializer.ts +3 -2
- package/extensions/subagent/agent-templates.ts +3 -2
- package/extensions/subagent/agents.ts +3 -2
- package/extensions/subagent/artifacts.ts +3 -2
- package/extensions/subagent/async-execution.ts +3 -2
- package/extensions/subagent/async-job-tracker.ts +28 -4
- package/extensions/subagent/async-status.ts +3 -2
- package/extensions/subagent/chain-clarify.ts +3 -2
- package/extensions/subagent/chain-execution.ts +3 -2
- package/extensions/subagent/chain-serializer.ts +3 -2
- package/extensions/subagent/completion-dedupe.ts +3 -2
- package/extensions/subagent/doctor.ts +3 -2
- package/extensions/subagent/execution.ts +13 -3
- package/extensions/subagent/file-coalescer.ts +3 -2
- package/extensions/subagent/fork-context.ts +3 -2
- package/extensions/subagent/formatters.ts +3 -2
- package/extensions/subagent/frontmatter.ts +3 -2
- package/extensions/subagent/index.ts +3 -2
- package/extensions/subagent/intercom-bridge.ts +3 -2
- package/extensions/subagent/jsonl-writer.ts +3 -2
- package/extensions/subagent/model-fallback.ts +3 -2
- package/extensions/subagent/notify.ts +3 -2
- package/extensions/subagent/parallel-utils.ts +3 -2
- package/extensions/subagent/pi-args.ts +3 -2
- package/extensions/subagent/pi-spawn.ts +3 -2
- package/extensions/subagent/post-exit-stdio-guard.ts +3 -2
- package/extensions/subagent/prompt-template-bridge.ts +3 -2
- package/extensions/subagent/render-helpers.ts +3 -2
- package/extensions/subagent/render.ts +81 -9
- package/extensions/subagent/result-intercom.ts +3 -2
- package/extensions/subagent/result-watcher.ts +3 -2
- package/extensions/subagent/run-history.ts +3 -2
- package/extensions/subagent/run-status.ts +3 -2
- package/extensions/subagent/schemas.ts +3 -2
- package/extensions/subagent/session-tokens.ts +3 -2
- package/extensions/subagent/settings.ts +3 -2
- package/extensions/subagent/single-output.ts +3 -2
- package/extensions/subagent/skills.ts +3 -2
- package/extensions/subagent/slash-bridge.ts +3 -2
- package/extensions/subagent/slash-commands.ts +3 -2
- package/extensions/subagent/slash-live-state.ts +3 -2
- package/extensions/subagent/subagent-control.ts +3 -2
- package/extensions/subagent/subagent-executor.ts +19 -3
- package/extensions/subagent/subagent-prompt-runtime.ts +3 -2
- package/extensions/subagent/subagent-runner.ts +3 -2
- package/extensions/subagent/subagents-status.ts +3 -2
- package/extensions/subagent/text-editor.ts +3 -2
- package/extensions/subagent/throttle.ts +77 -0
- package/extensions/subagent/top-level-async.ts +3 -2
- package/extensions/subagent/types.ts +3 -2
- package/extensions/subagent/utils.ts +3 -2
- package/extensions/subagent/worktree.ts +3 -2
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ Install it, tell Pi what you want to build, then keep saying "continue" — it w
|
|
|
8
8
|
pi install npm:@leing2021/super-pi
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
> **Upgrading from v0.21.0 or earlier?** Run `pi uninstall npm:pi-subagents` first, then `pi update`. Since v0.22.0, subagent capabilities are built-in — no separate package needed.
|
|
12
|
+
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
## Why Super Pi
|
|
@@ -26,116 +28,123 @@ Super Pi's answers:
|
|
|
26
28
|
|
|
27
29
|
---
|
|
28
30
|
|
|
29
|
-
##
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### New idea
|
|
30
34
|
|
|
31
35
|
```
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
You: I want to build a tool that helps indie devs find users
|
|
37
|
+
|
|
38
|
+
→ Auto-enters 01-brainstorm, YC-style interrogation
|
|
39
|
+
→ Generates docs/brainstorms/2026-04-18-find-users-requirements.md
|
|
40
|
+
→ Recommends next: 02-plan
|
|
41
|
+
|
|
42
|
+
You: continue
|
|
43
|
+
|
|
44
|
+
→ 02-plan breaks into units, optional CEO Review
|
|
45
|
+
→ 03-work parallel execution, checkpoint resume
|
|
46
|
+
→ 04-review code review + optional browser QA
|
|
47
|
+
→ 05-learn knowledge compounding
|
|
34
48
|
```
|
|
35
49
|
|
|
36
|
-
|
|
50
|
+
### Adding a feature
|
|
37
51
|
|
|
38
|
-
|
|
52
|
+
```
|
|
53
|
+
You: I want to add user authentication to the project
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
→ 01-brainstorm CE mode: OAuth2? JWT? MFA?
|
|
56
|
+
→ Requirements doc → 02-plan → 03-work → 04-review → 05-learn
|
|
57
|
+
```
|
|
41
58
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"04-review": "claude-sonnet-4-20250514",
|
|
49
|
-
"05-learn": "claude-haiku-4-20250414",
|
|
50
|
-
"default": "claude-sonnet-4-20250514"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
59
|
+
### Resume after interruption
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
You: /skill:03-work docs/plans/auth-plan.md
|
|
63
|
+
|
|
64
|
+
→ Auto-loads checkpoint, skips completed units, resumes from breakpoint
|
|
53
65
|
```
|
|
54
66
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- Every stage prints a `📊 Pipeline Status` block with `Current / Output / Next`.
|
|
60
|
-
- A `Switched model for <stage>: <provider>/<model>` notification appears when the model changes.
|
|
67
|
+
### Requirements changed
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
You: Requirements changed, need to add SSO support
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
2. Approve the design
|
|
65
|
-
3. Run `/skill:02-plan` — model auto-switches to the configured plan model
|
|
66
|
-
4. Continue through each stage — model switches automatically at each step
|
|
72
|
+
→ 02-plan uses plan_diff to detect changes, patches incrementally
|
|
73
|
+
```
|
|
67
74
|
|
|
68
75
|
---
|
|
69
76
|
|
|
70
|
-
##
|
|
77
|
+
## The Five-Step Loop
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
01-brainstorm → 02-plan → 03-work → 04-review → 05-learn
|
|
81
|
+
think plan build review learn
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Each step has a dedicated skill + tool pair. Not just prompts — structured toolchains.
|
|
71
85
|
|
|
72
86
|
### 01-brainstorm: Think First
|
|
73
87
|
|
|
74
|
-
|
|
88
|
+
Three modes for three scenarios:
|
|
75
89
|
|
|
76
90
|
| Mode | For | What it does |
|
|
77
91
|
|------|-----|-------------|
|
|
78
|
-
| **Startup Diagnostic** | Startup ideas, new products | Six YC-style forcing questions, pushed until you produce specific evidence
|
|
79
|
-
| **Builder Mode** | Side projects, hackathons |
|
|
80
|
-
| **CE Brainstorm** | Adding features to existing projects | Multi-round dialog to clarify scope
|
|
92
|
+
| **Startup Diagnostic** | Startup ideas, new products | Six YC-style forcing questions, pushed until you produce specific evidence |
|
|
93
|
+
| **Builder Mode** | Side projects, hackathons | Focused on building. Accidentally mention revenue? Auto-upgrades to Startup Diagnostic |
|
|
94
|
+
| **CE Brainstorm** | Adding features to existing projects | Multi-round dialog to clarify scope, generates structured requirements doc |
|
|
81
95
|
|
|
82
|
-
All three
|
|
96
|
+
All three run a **premise challenge** (are your assumptions valid?) and **alternatives generation** before you move on.
|
|
83
97
|
|
|
84
98
|
### 02-plan: Plan Well
|
|
85
99
|
|
|
86
|
-
Breaks requirements into implementation units
|
|
87
|
-
|
|
88
|
-
**Incremental updates**: Requirements changed? `plan_diff` detects added/removed/modified units and patches the plan instead of rewriting it.
|
|
100
|
+
Breaks requirements into implementation units with strict **RED → GREEN → REFACTOR**. Requirements changed? `plan_diff` patches incrementally instead of rewriting.
|
|
89
101
|
|
|
90
|
-
**CEO Review (optional)**:
|
|
102
|
+
**CEO Review (optional)**: Challenges your plan using Bezos reversible-decision frameworks, Munger inversion, Jobs subtraction. Like having a demanding CTO review for free.
|
|
91
103
|
|
|
92
104
|
### 03-work: Build Right
|
|
93
105
|
|
|
94
|
-
**Parallel execution**: `task_splitter`
|
|
95
|
-
|
|
96
|
-
**
|
|
97
|
-
|
|
98
|
-
**Strict TDD**: Run failing test → write minimal implementation → test passes → refactor. Every step requires command output as evidence. No skipping.
|
|
106
|
+
- **Parallel execution**: `task_splitter` analyzes file dependencies, feeds conflict-free units to `subagent` for concurrent execution
|
|
107
|
+
- **Checkpoint resume**: Interrupted? Next startup auto-loads, skips completed work, continues from breakpoint
|
|
108
|
+
- **Strict TDD**: Failing test → minimal implementation → test passes → refactor. Every step requires command output as evidence
|
|
99
109
|
|
|
100
110
|
### 04-review: Review Thoroughly
|
|
101
111
|
|
|
102
|
-
|
|
112
|
+
`review_router` auto-assigns reviewer personas based on diff metadata. Every finding must cite specific code — no performative agreement.
|
|
103
113
|
|
|
104
|
-
**Browser QA (optional)**:
|
|
114
|
+
**Browser QA (optional)**: Opens your app, clicks through pages, screenshots bugs, fixes by severity, up to 3 auto-fix iterations.
|
|
105
115
|
|
|
106
116
|
### 05-learn: Compound Learnings
|
|
107
117
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Two-level storage: project-specific → inside the project; cross-project → `~/.pi/agent/docs/solutions/` globally searchable.
|
|
118
|
+
Turns "the pitfall we hit this time" into a YAML-tagged solution card in `docs/solutions/`. Two-level storage: project-specific and global (`~/.pi/agent/docs/solutions/`).
|
|
111
119
|
|
|
112
|
-
Next time `02-plan` or `04-review` runs,
|
|
120
|
+
Next time `02-plan` or `04-review` runs, relevant past experience is automatically retrieved.
|
|
113
121
|
|
|
114
122
|
---
|
|
115
123
|
|
|
116
|
-
## Built-in
|
|
124
|
+
## Built-in Capabilities
|
|
117
125
|
|
|
118
|
-
|
|
126
|
+
One package includes everything:
|
|
119
127
|
|
|
120
|
-
|
|
|
121
|
-
|
|
122
|
-
| **Agent Manager TUI** | `/agents` or `Ctrl+Shift+A` |
|
|
123
|
-
| **CE Agents**
|
|
124
|
-
| **CE Chains**
|
|
125
|
-
| **Parallel
|
|
126
|
-
| **Stage Model Sync** | Automatic
|
|
127
|
-
| **
|
|
128
|
-
| **Diagnostics** | `/subagents-doctor` | Show subagent diagnostics |
|
|
128
|
+
| What | How to Access |
|
|
129
|
+
|------|--------------|
|
|
130
|
+
| **Agent Manager TUI** | `/agents` or `Ctrl+Shift+A` |
|
|
131
|
+
| **CE Agents** (ce-scout, ce-planner, etc.) | Via subagent tool |
|
|
132
|
+
| **CE Chains** (scout → planner → worker → reviewer) | Via subagent tool |
|
|
133
|
+
| **Parallel execution** | Via subagent tool |
|
|
134
|
+
| **Stage Model Sync** | Automatic — set `modelStrategy` / `thinkingStrategy` in `.pi/settings.json` |
|
|
135
|
+
| **Diagnostics** | `/subagents-status`, `/subagents-doctor` |
|
|
129
136
|
|
|
130
|
-
###
|
|
137
|
+
### Stage model routing
|
|
131
138
|
|
|
132
|
-
|
|
139
|
+
Configure once in `.pi/settings.json`:
|
|
133
140
|
|
|
134
141
|
```json
|
|
135
142
|
{
|
|
136
143
|
"modelStrategy": {
|
|
137
|
-
"
|
|
138
|
-
"
|
|
144
|
+
"01-brainstorm": "claude-sonnet-4-20250514",
|
|
145
|
+
"02-plan": "claude-opus-4-20250115",
|
|
146
|
+
"03-work": "claude-sonnet-4-20250514",
|
|
147
|
+
"default": "claude-sonnet-4-20250514"
|
|
139
148
|
},
|
|
140
149
|
"thinkingStrategy": {
|
|
141
150
|
"02-plan": "high",
|
|
@@ -144,148 +153,41 @@ The extension reads `modelStrategy` and `thinkingStrategy` from `.pi/settings.js
|
|
|
144
153
|
}
|
|
145
154
|
```
|
|
146
155
|
|
|
147
|
-
|
|
156
|
+
Model switching is handled automatically — no manual `/model` needed. When you run any CE skill, the extension reads the config and switches before the skill runs. Supported formats: full reference (`"anthropic/claude-opus-4-1"`) or bare model id (`"claude-opus-4-1"`).
|
|
148
157
|
|
|
149
158
|
---
|
|
150
159
|
|
|
151
160
|
## Technical Architecture
|
|
152
161
|
|
|
153
|
-
###
|
|
154
|
-
|
|
155
|
-
| Extension | Description |
|
|
156
|
-
|-----------|------------|
|
|
157
|
-
| `ce-core` | 15 CE tools (task_splitter, session_checkpoint, brainstorm_dialog, etc.) + hooks + filters |
|
|
158
|
-
| `super-pi-extension` | CE Agents/Chains + model strategy sync |
|
|
159
|
-
| `subagent` | Full subagent runtime (serial, parallel, chain, async, TUI, agent CRUD) — based on [pi-subagents](https://github.com/nicobailon/pi-subagents) |
|
|
160
|
-
|
|
161
|
-
### 10 Skills (workflow nodes)
|
|
162
|
-
|
|
163
|
-
| Skill | One-liner | Core Tool |
|
|
164
|
-
|-------|-----------|-----------|
|
|
165
|
-
| `01-brainstorm` | Deep requirements mining in three modes | `brainstorm_dialog` |
|
|
166
|
-
| `02-plan` | Break into units, TDD gates, incremental updates | `plan_diff` |
|
|
167
|
-
| `03-work` | Parallel execution, checkpoint resume, error recovery | `session_checkpoint`, `task_splitter`, `subagent` (pi-subagents) |
|
|
168
|
-
| `04-review` | Persona-routed review + live browser testing | `review_router` |
|
|
169
|
-
| `05-learn` | Pattern extraction → knowledge card compounding | `pattern_extractor` |
|
|
170
|
-
| `06-next` | Not sure what to do next? Ask this | `workflow_state`, `session_history` |
|
|
171
|
-
| `07-worktree` | Git worktree isolated development | `worktree_manager` |
|
|
172
|
-
| `08-status` | Scan artifacts, report progress | `workflow_state`, `session_history` |
|
|
173
|
-
| `09-help` | Usage guide | — |
|
|
174
|
-
| `10-rules` | Progressive rule loading for coding standards | — |
|
|
175
|
-
|
|
176
|
-
### 15 Tools (underlying capabilities)
|
|
177
|
-
|
|
178
|
-
| Tool | What it does |
|
|
179
|
-
|------|-------------|
|
|
180
|
-
| `task_splitter` | Union-Find algorithm analyzes file dependencies, auto-groups parallel-safe units |
|
|
181
|
-
| `session_checkpoint` | JSON-persisted checkpoints with save/load/fail/retry operations |
|
|
182
|
-
| `plan_diff` | Incremental plans: compare detects diffs, patch applies changes |
|
|
183
|
-
| `subagent` | Parallel & serial subagent execution (built-in, based on pi-subagents) |
|
|
184
|
-
| `review_router` | Auto-assign reviewer personas from diff metadata |
|
|
185
|
-
| `pattern_extractor` | Extract and categorize patterns from artifacts |
|
|
186
|
-
| `brainstorm_dialog` | Multi-round dialog state machine (start → refine × N → summarize) |
|
|
187
|
-
| `session_history` | Cross-session execution history recording and querying |
|
|
188
|
-
| `workflow_state` | Scan docs/ and .context/ to summarize workflow state |
|
|
189
|
-
| `worktree_manager` | Full git worktree lifecycle management |
|
|
190
|
-
| `artifact_helper` | Artifact path resolution and directory creation |
|
|
191
|
-
| `ask_user_question` | Structured user prompts (choices / free input) |
|
|
192
|
-
| `subagent` | Serial subagent chain with depth guard and context control |
|
|
193
|
-
| `subagent-depth-guard` | Env-based recursion depth tracking (prevents runaway nesting) |
|
|
194
|
-
| `async-mutex` | Serializes `process.env` mutation for concurrency-safe child process spawning |
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
## Token Cost
|
|
199
|
-
|
|
200
|
-
New conversation overhead: **~2,500 tokens** (1.26% of Claude Sonnet 4's 200K context).
|
|
201
|
-
|
|
202
|
-
| Component | Tokens | When loaded |
|
|
203
|
-
|-----------|--------|-------------|
|
|
204
|
-
| 10 skill registrations | ~615 | Every conversation (fixed) |
|
|
205
|
-
| 13 tool registrations | ~1,914 | Every conversation (fixed) |
|
|
206
|
-
| Hooks & filters | 0 | Runtime interception, zero prompt cost |
|
|
207
|
-
| Single skill trigger | ~1,000–4,000 | On-demand via `read` |
|
|
208
|
-
| Rules minimal (2 files) | ~900 | Before plan/work |
|
|
209
|
-
| Rules + language (7 files) | ~2,600 | Before work with specific language |
|
|
210
|
-
|
|
211
|
-
| vs bare Pi | vs global rules injection | vs super-pi |
|
|
212
|
-
|-----------|----------------------|------------|
|
|
213
|
-
| No rules | All rules loaded upfront | Progressive on-demand |
|
|
214
|
-
| No output filtering | No output filtering | Auto-compress (bash ~65–98%, read ~30–60%) |
|
|
215
|
-
| No TDD gate | No TDD gate | Hard gate prevents rework |
|
|
216
|
-
| 0 tokens | ~5,000–36,000 tokens | **~2,500 tokens** |
|
|
217
|
-
|
|
218
|
-
Single `npm install` output filtered once pays for the entire overhead. Full evaluation → [`docs/token-cost-evaluation.md`](docs/token-cost-evaluation.md)
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## Code Scale
|
|
223
|
-
|
|
224
|
-
~2800 lines of TypeScript implementing 16 tools, 22 Markdown reference files + 78 rule files driving 10 skills, 175 tests covering all tool logic.
|
|
225
|
-
|
|
226
|
-
Not a heavy framework. Each tool has a single responsibility, each skill works independently, and together they form a complete workflow.
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
## Quick Start
|
|
231
|
-
|
|
232
|
-
### New idea
|
|
233
|
-
|
|
234
|
-
```
|
|
235
|
-
You: I want to build a tool that helps indie devs find users
|
|
236
|
-
|
|
237
|
-
→ Auto-enters 01-brainstorm, YC-style interrogation
|
|
238
|
-
→ Generates docs/brainstorms/2026-04-18-find-users-requirements.md
|
|
239
|
-
→ Recommends next: 02-plan
|
|
162
|
+
### Core: Five-Step Loop
|
|
240
163
|
|
|
241
|
-
|
|
164
|
+
| Skill | What | Core Tool |
|
|
165
|
+
|-------|------|----------|
|
|
166
|
+
| `01-brainstorm` | Three-mode requirements mining (Startup Diagnostic / Builder / CE) | `brainstorm_dialog` |
|
|
167
|
+
| `02-plan` | Break into units with TDD gates, incremental `plan_diff` updates | `plan_diff` |
|
|
168
|
+
| `03-work` | Parallel execution, checkpoint resume, error recovery | `session_checkpoint`, `task_splitter`, `subagent` |
|
|
169
|
+
| `04-review` | Persona-routed review + live browser QA | `review_router` |
|
|
170
|
+
| `05-learn` | Pattern extraction → searchable knowledge cards | `pattern_extractor` |
|
|
242
171
|
|
|
243
|
-
|
|
244
|
-
→ Generates docs/plans/2026-04-18-find-users-plan.md
|
|
172
|
+
### Utilities
|
|
245
173
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
174
|
+
| Skill | One-liner |
|
|
175
|
+
|-------|-----------|
|
|
176
|
+
| `06-next` | Recommend the best next skill based on workflow state |
|
|
177
|
+
| `07-worktree` | Git worktree isolated development |
|
|
178
|
+
| `08-status` | Scan artifacts, report progress |
|
|
179
|
+
| `09-help` | Usage guide |
|
|
180
|
+
| `10-rules` | Progressive rule loading for coding standards |
|
|
252
181
|
|
|
253
|
-
###
|
|
182
|
+
### Progressive Rule Loading
|
|
254
183
|
|
|
255
|
-
|
|
256
|
-
You: I want to add user authentication to the project
|
|
184
|
+
Built-in `rules/` directory with 13 language layers (TypeScript, Python, Rust, Go, Java, Kotlin, C#, C++, Dart, PHP, Perl, Swift, Elixir) + common + web — 78 Markdown files total.
|
|
257
185
|
|
|
258
|
-
|
|
259
|
-
→ Requirements doc → 02-plan → 03-work → 04-review → 05-learn
|
|
260
|
-
```
|
|
186
|
+
Rules load **progressively** — never all at once, only what the current task needs. Zero waste.
|
|
261
187
|
|
|
262
|
-
|
|
188
|
+
Customize for your project: create a `rules/` directory in your project root. Project-level rules override package defaults. See `10-rules` skill for details.
|
|
263
189
|
|
|
264
|
-
|
|
265
|
-
You: /skill:03-work docs/plans/auth-plan.md
|
|
266
|
-
|
|
267
|
-
→ Auto-loads checkpoint, skips completed units, resumes from breakpoint
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### Requirements changed
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
You: Requirements changed, need to add SSO support
|
|
274
|
-
|
|
275
|
-
→ 02-plan uses plan_diff to detect changes, patches incrementally
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### Check progress anytime
|
|
279
|
-
|
|
280
|
-
```
|
|
281
|
-
You: /skill:08-status
|
|
282
|
-
|
|
283
|
-
→ Scans all artifacts, shows progress + recommends next step
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
---
|
|
287
|
-
|
|
288
|
-
## Generated File Structure
|
|
190
|
+
### Generated File Structure
|
|
289
191
|
|
|
290
192
|
```
|
|
291
193
|
your-project/
|
|
@@ -302,94 +204,6 @@ your-project/
|
|
|
302
204
|
|
|
303
205
|
**Recommendation: commit everything to git** — these files are the project's traceable memory.
|
|
304
206
|
|
|
305
|
-
### `10-rules`: Progressive Rule Loading
|
|
306
|
-
|
|
307
|
-
Built-in coding rules live under `rules/` in the package. The `10-rules` skill loads them **progressively** — never all at once, only what the current task needs.
|
|
308
|
-
|
|
309
|
-
**How it works:**
|
|
310
|
-
|
|
311
|
-
```
|
|
312
|
-
system prompt (30 tokens: skill name + description)
|
|
313
|
-
→ 10-rules SKILL.md (~200 tokens: loading decision tree)
|
|
314
|
-
→ specific rule files via read tool (on-demand, 900–2600 tokens)
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
Three CE skills auto-trigger rule loading at their entry points:
|
|
318
|
-
|
|
319
|
-
| Skill | Rules pre-loaded |
|
|
320
|
-
|-------|-----------------|
|
|
321
|
-
| `02-plan` | `common/` rules + language detection + matching language rules (e.g. `rules/typescript/`) |
|
|
322
|
-
| `03-work` | `common/` rules + language detection + matching language rules + `web/` if frontend |
|
|
323
|
-
| `04-review` | `common/code-review.md` + language detection + matching language rules + `web/` if frontend |
|
|
324
|
-
|
|
325
|
-
**Rule precedence** (when layers overlap on the same topic):
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
language-specific > web > common
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
No rules are loaded when you brainstorm, check status, or do non-code tasks. Zero waste.
|
|
332
|
-
|
|
333
|
-
#### Included rule layers
|
|
334
|
-
|
|
335
|
-
| Layer | Files | When loaded |
|
|
336
|
-
|-------|-------|------------|
|
|
337
|
-
| `common/` | 10 files | Always (baseline for all tasks) |
|
|
338
|
-
| `typescript/`, `python/`, `cpp/`, `csharp/`, `dart/`, `golang/`, `java/`, `kotlin/`, `perl/`, `php/`, `rust/`, `swift/` | 5 files each | When the task touches that language |
|
|
339
|
-
| `web/` | 7 files (includes `design-quality.md`, `performance.md`) | When frontend/browser is relevant |
|
|
340
|
-
|
|
341
|
-
#### Customizing rules for your project
|
|
342
|
-
|
|
343
|
-
Two rule sources exist, with project-level taking priority:
|
|
344
|
-
|
|
345
|
-
| Source | Location | Survives `pi update`? |
|
|
346
|
-
|--------|----------|----------------------|
|
|
347
|
-
| **Project-level** | `{your-project-root}/rules/` | ✅ Yes |
|
|
348
|
-
| Package-level | Inside `node_modules/@leing2021/super-pi/rules/` | ❌ No |
|
|
349
|
-
|
|
350
|
-
To customize, create a `rules/` directory in your project root. `10-rules` checks it first — if a file exists there, it overrides the package default for that topic.
|
|
351
|
-
|
|
352
|
-
**Add a language** — create a new directory with the 5 standard topics:
|
|
353
|
-
|
|
354
|
-
```bash
|
|
355
|
-
mkdir rules/elixir
|
|
356
|
-
touch rules/elixir/{coding-style,testing,patterns,security,hooks}.md
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
Each file should start with:
|
|
360
|
-
|
|
361
|
-
```markdown
|
|
362
|
-
> This file extends [common/xxx.md](../common/xxx.md) with Elixir-specific content.
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
**Remove unused languages** — just delete the directory:
|
|
366
|
-
|
|
367
|
-
```bash
|
|
368
|
-
rm -rf rules/perl rules/cpp # don't need these? remove them
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
**Tweak a rule** — edit the `.md` file directly:
|
|
372
|
-
|
|
373
|
-
```bash
|
|
374
|
-
# Override testing conventions for your team
|
|
375
|
-
vim rules/common/testing.md
|
|
376
|
-
|
|
377
|
-
# Override for a specific language
|
|
378
|
-
vim rules/typescript/testing.md
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
**Add a new topic** — create a new `.md` in the appropriate layer:
|
|
382
|
-
|
|
383
|
-
```bash
|
|
384
|
-
# Common topic
|
|
385
|
-
vim rules/common/api-design.md
|
|
386
|
-
|
|
387
|
-
# Language-specific override
|
|
388
|
-
vim rules/python/api-design.md
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
The `10-rules` skill will pick up any `.md` file in `rules/` — no configuration needed. If a language directory exists, it's available for loading. If it's gone, it's simply never loaded.
|
|
392
|
-
|
|
393
207
|
---
|
|
394
208
|
|
|
395
209
|
## Design Philosophy & Acknowledgements
|
|
@@ -400,7 +214,7 @@ The goal isn't making AI write code faster — it's making AI think before writi
|
|
|
400
214
|
|
|
401
215
|
The following projects directly inspired this work:
|
|
402
216
|
|
|
403
|
-
- **[pi-subagents](https://github.com/nicobailon/pi-subagents)** (by Nico Bailon) → Full subagent runtime integrated as built-in extension (serial, parallel, chain, async, TUI, agent CRUD)
|
|
217
|
+
- **[pi-subagents](https://github.com/nicobailon/pi-subagents)** (by Nico Bailon, MIT License) → Full subagent runtime integrated as built-in extension (serial, parallel, chain, async, TUI, agent CRUD)
|
|
404
218
|
- **[everything-claude-code](https://github.com/affaan-m/everything-claude-code)** (162K★) → Parallel subagent orchestration, checkpoint resume, continuous learning
|
|
405
219
|
- **[superpowers](https://github.com/obra/superpowers)** (161K★) → Strict TDD gates, design checklists, review discipline
|
|
406
220
|
- **[gstack](https://github.com/garrytan/gstack)** (78K★) → YC-style forcing questions, CEO Review frameworks, browser QA
|
|
@@ -414,7 +228,7 @@ Not a fork. Not a wrapper. Methodologies extracted and rebuilt with Pi's native
|
|
|
414
228
|
|
|
415
229
|
| Tip | Why |
|
|
416
230
|
|-----|-----|
|
|
417
|
-
| Start with 01-brainstorm |
|
|
231
|
+
| Start with 01-brainstorm | Thinking first never hurts |
|
|
418
232
|
| Use 07-worktree for big features | Isolated dev, no impact on main branch |
|
|
419
233
|
| Use CEO Review on plans | Like having a demanding CTO review for free |
|
|
420
234
|
| Use browser QA for acceptance | Code review can't catch layout breaks and blank screens |
|
|
@@ -425,6 +239,15 @@ Not a fork. Not a wrapper. Methodologies extracted and rebuilt with Pi's native
|
|
|
425
239
|
|
|
426
240
|
## Changelog
|
|
427
241
|
|
|
242
|
+
### 0.22.1 — Fix terminal freeze during parallel subagent execution
|
|
243
|
+
- Fixed terminal freeze and scroll lock when running 8+ parallel subagents.
|
|
244
|
+
- Added adaptive widget animation intervals: 250ms–1000ms based on running job count.
|
|
245
|
+
- Added `createThrottle()` for foreground parallel `onUpdate` with flush/dispose lifecycle.
|
|
246
|
+
- Added render dedup via content hash to skip unchanged `requestRender()` calls.
|
|
247
|
+
- Reduced activity timer and async poller frequencies with adaptive scaling.
|
|
248
|
+
- Extracted `stopAnimationTimer()` to prevent state loss during dynamic interval switching.
|
|
249
|
+
- 197 tests passing (28 new for render optimization).
|
|
250
|
+
|
|
428
251
|
### 0.22.0 — Source-integrated pi-subagents
|
|
429
252
|
- Integrated pi-subagents v0.20.1 source code into `extensions/subagent/` — single package install (`pi install npm:@leing2021/super-pi`).
|
|
430
253
|
- Moved `typebox` from peerDependencies to dependencies.
|
|
@@ -435,135 +258,99 @@ Not a fork. Not a wrapper. Methodologies extracted and rebuilt with Pi's native
|
|
|
435
258
|
- 169 tests passing.
|
|
436
259
|
|
|
437
260
|
### 0.21.0 — Delegate subagent tools to pi-subagents
|
|
261
|
+
- Subagent capabilities now provided by the `pi-subagents` package.
|
|
438
262
|
- Removed `subagent` and `parallel_subagent` tool registrations from `ce-core` extension.
|
|
439
|
-
- Subagent capabilities (serial, parallel, chain, async, TUI, agent CRUD) now provided by the `pi-subagents` package.
|
|
440
|
-
- Removed `AsyncMutex`, `subagent-depth-guard` exports — no longer needed in this package.
|
|
441
|
-
- Added `pi-subagents` as a peer dependency in `package.json`.
|
|
442
|
-
- Updated `03-work` skill, `ce-worker` agent, and all README references from `parallel_subagent` to `subagent` (pi-subagents).
|
|
443
|
-
- Renamed internal `path` variable to `filePath` in read-output-filter to avoid shadowing.
|
|
444
|
-
|
|
445
|
-
### 0.20.0 — Extension API migration + v0.19.7 rework
|
|
446
|
-
- Migrated `super-pi-extension` from legacy `export default { load() }` object format to Pi-native factory function `(pi: ExtensionAPI) => void`.
|
|
447
|
-
- Replaced hardcoded `ExtensionContext` import with `ExtensionAPI`-only — context now provided via event handler.
|
|
448
|
-
- Removed dead auto-install comment block and unused `ExtensionContext` type import.
|
|
449
|
-
- Restored v0.19.6 changelog entry that was accidentally overwritten by the v0.19.7 release commit.
|
|
450
263
|
|
|
451
|
-
### 0.
|
|
452
|
-
-
|
|
453
|
-
- New `thinkingStrategy` setting: per-stage thinking level sync (`modelStrategy` + `thinkingStrategy` → `subagents.agentOverrides`).
|
|
454
|
-
- Removed hardcoded `model` and `thinking` from CE Agent frontmatter — now fully driven by settings.
|
|
455
|
-
- Added graceful pi-subagents dependency detection with install instructions on extension load.
|
|
456
|
-
- Updated `03-work`, `04-review`, `06-next` skills with pi-subagents integration docs.
|
|
457
|
-
- Updated README with Optional: pi-subagents Integration section.
|
|
264
|
+
### 0.20.0 — Extension API migration
|
|
265
|
+
- Migrated `super-pi-extension` to Pi-native factory function format.
|
|
458
266
|
|
|
459
|
-
|
|
267
|
+
<details>
|
|
268
|
+
<summary>Older versions</summary>
|
|
460
269
|
|
|
461
|
-
|
|
270
|
+
### 0.19.6 — pi-subagents integration extension
|
|
271
|
+
- New `super-pi-extension`: pre-configured CE Agents and CE Chains.
|
|
272
|
+
- New `thinkingStrategy` setting: per-stage thinking level sync.
|
|
462
273
|
|
|
463
|
-
|
|
464
|
-
- Fixed `02-plan` not loading language-specific rules
|
|
465
|
-
-
|
|
466
|
-
- Fixed `04-review` Core rules missing explicit language detection method and `web/` conditional loading.
|
|
467
|
-
- Updated all three skills to use a consistent 4-step progressive loading strategy (common → language detect → language rules → web rules).
|
|
468
|
-
- Updated `10-rules` SKILL.md Pre-flight to include complete language detection mapping for all three phases.
|
|
469
|
-
- Synced `README.md` and `README_CN.md` skill tables to reflect the unified loading strategy.
|
|
274
|
+
### 0.19.5 — Plan/Work/Review skill rules loading alignment
|
|
275
|
+
- Fixed `02-plan` not loading language-specific rules during the planning phase.
|
|
276
|
+
- Updated all three skills to use a consistent 4-step progressive loading strategy.
|
|
470
277
|
|
|
471
278
|
### 0.19.4 — Read output filter markdown truncation fix
|
|
472
|
-
- Fixed `read-output-filter` over-truncating markdown files
|
|
473
|
-
-
|
|
474
|
-
- Filter notice now includes actual file path in actionable guidance (`bash cat <path>`).
|
|
475
|
-
- Added 5 new tests covering list preservation, markdown threshold gate, and path-in-notice.
|
|
476
|
-
- 175 tests passing.
|
|
279
|
+
- Fixed `read-output-filter` over-truncating markdown files.
|
|
280
|
+
- Added 5 new tests. 175 tests passing.
|
|
477
281
|
|
|
478
282
|
### 0.19.3 — Terminate fix + runtime model routing + autoContinue removal
|
|
479
|
-
- Fixed 6 ce-core tools
|
|
480
|
-
- Implemented runtime stage model routing via ce-core extension `input` hook
|
|
481
|
-
- Removed `pipeline.autoContinue` configuration (never had runtime implementation; Pi lacks `skill_end` event for auto-continue).
|
|
482
|
-
- Updated `skills/references/pipeline-config.md`, `README.md`, `README_CN.md` to reflect runtime model routing behavior.
|
|
483
|
-
- Added 4 new tests covering terminate regression, input hook model routing, and bare model id parsing.
|
|
283
|
+
- Fixed 6 ce-core tools incorrectly returning `terminate: true`.
|
|
284
|
+
- Implemented runtime stage model routing via ce-core extension `input` hook.
|
|
484
285
|
|
|
485
286
|
### 0.19.2 — Evidence-first handoff-lite + docs tracking rule
|
|
486
|
-
- Added `context_handoff` with evidence-first default handoff-lite generation
|
|
487
|
-
- Standardized the shared handoff-lite template across 01-05 workflow handoffs via `skills/references/pipeline-config.md`.
|
|
488
|
-
- Added tests protecting default handoff generation and the shared handoff docs contract.
|
|
489
|
-
- Updated docs tracking so Git only uploads `docs/token-cost-evaluation.md` while other `docs/` artifacts stay local.
|
|
287
|
+
- Added `context_handoff` with evidence-first default handoff-lite generation.
|
|
490
288
|
|
|
491
289
|
### 0.19.1 — Pipeline config + typecheck baseline fix
|
|
492
|
-
- Added shared pipeline config
|
|
493
|
-
- Added runtime stage model routing via ce-core extension `input` hook (reads `modelStrategy` from `.pi/settings.json`, auto-switches model before skill execution).
|
|
494
|
-
- Fixed TypeScript baseline issues so `bunx tsc --noEmit` passes.
|
|
290
|
+
- Added shared pipeline config for stage model routing.
|
|
495
291
|
|
|
496
292
|
### 0.19.0 — 0.69.0 alignment + learn rename
|
|
497
|
-
- TypeBox migration: `@sinclair/typebox` → `typebox
|
|
498
|
-
- Peer/dev dependency upgrade: pi-coding-agent `0.67.6` → `0.69.0
|
|
499
|
-
-
|
|
500
|
-
- Skill rename: `05-compound` → `05-learn` for clarity
|
|
293
|
+
- TypeBox migration: `@sinclair/typebox` → `typebox`.
|
|
294
|
+
- Peer/dev dependency upgrade: pi-coding-agent `0.67.6` → `0.69.0`.
|
|
295
|
+
- Skill rename: `05-compound` → `05-learn`.
|
|
501
296
|
|
|
502
297
|
### 0.18.0 — Progressive rules
|
|
503
|
-
- Built-in `rules/` directory with 13 language layers + common + web (78 Markdown files)
|
|
504
|
-
- New `10-rules` skill: progressive on-demand loading
|
|
505
|
-
- `02-plan`, `03-work`, `04-review` auto-trigger rule loading at entry points
|
|
506
|
-
- Users can add/remove languages and edit rules freely — plain Markdown, no config
|
|
507
|
-
- 10 skills, 15 tools, 162 tests passing
|
|
298
|
+
- Built-in `rules/` directory with 13 language layers + common + web (78 Markdown files).
|
|
299
|
+
- New `10-rules` skill: progressive on-demand loading.
|
|
508
300
|
|
|
509
301
|
### 0.17.0 — Subagent safety
|
|
510
|
-
- Recursion depth guard
|
|
511
|
-
- Async mutex for `process.env` concurrency safety
|
|
512
|
-
- Context slimming: `inheritSkills` parameter, parallel workers default to slim context (`--no-skills`)
|
|
513
|
-
- Shared `createSubagentRunner` factory (deduped runner closures)
|
|
514
|
-
- 162 tests passing
|
|
302
|
+
- Recursion depth guard prevents runaway nesting.
|
|
303
|
+
- Async mutex for `process.env` concurrency safety.
|
|
515
304
|
|
|
516
305
|
### 0.16.0 — Context optimization
|
|
517
|
-
- Read output filter: structural compression for large code files
|
|
518
|
-
- Compaction optimizer: focused summary instructions for session compaction
|
|
519
|
-
- Bash output filter improvements
|
|
306
|
+
- Read output filter: structural compression for large code files.
|
|
520
307
|
|
|
521
308
|
### 0.15.0 — Output filtering
|
|
522
|
-
- Bash output filter: smart truncation by command type
|
|
523
|
-
- Read output filter: preserves structure while cutting verbosity
|
|
309
|
+
- Bash output filter: smart truncation by command type.
|
|
524
310
|
|
|
525
311
|
### 0.14.0 — Structured solution retrieval
|
|
526
|
-
- YAML frontmatter tagging + grep-first two-level search
|
|
527
|
-
- 95 tests passing
|
|
312
|
+
- YAML frontmatter tagging + grep-first two-level search.
|
|
528
313
|
|
|
529
314
|
### 0.13.0 — Superpowers engineering discipline
|
|
530
|
-
- Strict TDD gates, design checklists, YAGNI checks
|
|
315
|
+
- Strict TDD gates, design checklists, YAGNI checks.
|
|
531
316
|
|
|
532
317
|
### 0.12.0 — Error recovery
|
|
533
|
-
- session_checkpoint fail/retry operations
|
|
318
|
+
- session_checkpoint fail/retry operations.
|
|
534
319
|
|
|
535
320
|
### 0.11.0 — Pattern extraction
|
|
536
|
-
- New pattern_extractor tool
|
|
321
|
+
- New pattern_extractor tool.
|
|
537
322
|
|
|
538
323
|
### 0.10.0 — Continuous learning
|
|
539
|
-
- New session_history tool
|
|
324
|
+
- New session_history tool.
|
|
540
325
|
|
|
541
326
|
### 0.9.0 — Incremental planning
|
|
542
|
-
- New plan_diff tool
|
|
327
|
+
- New plan_diff tool.
|
|
543
328
|
|
|
544
329
|
### 0.8.0 — Multi-round dialog
|
|
545
|
-
- New brainstorm_dialog tool
|
|
330
|
+
- New brainstorm_dialog tool.
|
|
546
331
|
|
|
547
332
|
### 0.7.0 — Parallel grouping
|
|
548
|
-
- Union-Find based task_splitter
|
|
333
|
+
- Union-Find based task_splitter.
|
|
549
334
|
|
|
550
335
|
### 0.6.0 — Checkpoint resume
|
|
551
|
-
- New session_checkpoint tool
|
|
336
|
+
- New session_checkpoint tool.
|
|
552
337
|
|
|
553
338
|
### 0.5.0 — Parallel execution
|
|
554
|
-
- New parallel_subagent tool
|
|
339
|
+
- New parallel_subagent tool.
|
|
555
340
|
|
|
556
341
|
### 0.4.0 — Smart review
|
|
557
|
-
- New review_router tool
|
|
342
|
+
- New review_router tool.
|
|
558
343
|
|
|
559
344
|
### 0.3.0 — Isolated development
|
|
560
|
-
- New worktree_manager + 07-worktree
|
|
345
|
+
- New worktree_manager + 07-worktree.
|
|
561
346
|
|
|
562
347
|
### 0.2.0 — State awareness
|
|
563
|
-
- New workflow_state + 06-next
|
|
348
|
+
- New workflow_state + 06-next.
|
|
564
349
|
|
|
565
350
|
### 0.1.0 — Initial release
|
|
566
|
-
- 7 skills, 3 tools
|
|
351
|
+
- 7 skills, 3 tools.
|
|
352
|
+
|
|
353
|
+
</details>
|
|
567
354
|
|
|
568
355
|
---
|
|
569
356
|
|