@leing2021/super-pi 0.22.0 → 0.23.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.
Files changed (101) hide show
  1. package/README.md +38 -209
  2. package/extensions/ce-core/index.ts +190 -7
  3. package/extensions/ce-core/tools/parallel-subagent.ts +3 -3
  4. package/extensions/ce-core/tools/subagent.ts +2 -2
  5. package/package.json +4 -18
  6. package/rules/common/naming.md +154 -0
  7. package/skills/02-plan/SKILL.md +3 -2
  8. package/skills/03-work/SKILL.md +9 -6
  9. package/skills/04-review/SKILL.md +3 -2
  10. package/skills/06-next/SKILL.md +38 -10
  11. package/skills/06-next/references/recommendation-logic.md +2 -2
  12. package/skills/07-worktree/SKILL.md +9 -8
  13. package/skills/{09-help → 08-help}/SKILL.md +3 -3
  14. package/skills/{09-help → 08-help}/references/workflow-sequence.md +2 -1
  15. package/skills/references/language-detection.md +44 -0
  16. package/extensions/subagent/agent-management.ts +0 -595
  17. package/extensions/subagent/agent-manager-chain-detail.ts +0 -162
  18. package/extensions/subagent/agent-manager-detail.ts +0 -231
  19. package/extensions/subagent/agent-manager-edit.ts +0 -390
  20. package/extensions/subagent/agent-manager-list.ts +0 -278
  21. package/extensions/subagent/agent-manager-parallel.ts +0 -304
  22. package/extensions/subagent/agent-manager.ts +0 -705
  23. package/extensions/subagent/agent-scope.ts +0 -8
  24. package/extensions/subagent/agent-selection.ts +0 -25
  25. package/extensions/subagent/agent-serializer.ts +0 -123
  26. package/extensions/subagent/agent-templates.ts +0 -62
  27. package/extensions/subagent/agents/context-builder.md +0 -37
  28. package/extensions/subagent/agents/delegate.md +0 -9
  29. package/extensions/subagent/agents/oracle.md +0 -73
  30. package/extensions/subagent/agents/planner.md +0 -52
  31. package/extensions/subagent/agents/researcher.md +0 -50
  32. package/extensions/subagent/agents/reviewer.md +0 -38
  33. package/extensions/subagent/agents/scout.md +0 -48
  34. package/extensions/subagent/agents/worker.md +0 -52
  35. package/extensions/subagent/agents.ts +0 -761
  36. package/extensions/subagent/artifacts.ts +0 -100
  37. package/extensions/subagent/async-execution.ts +0 -520
  38. package/extensions/subagent/async-job-tracker.ts +0 -216
  39. package/extensions/subagent/async-status.ts +0 -241
  40. package/extensions/subagent/chain-clarify.ts +0 -1364
  41. package/extensions/subagent/chain-execution.ts +0 -853
  42. package/extensions/subagent/chain-serializer.ts +0 -126
  43. package/extensions/subagent/completion-dedupe.ts +0 -65
  44. package/extensions/subagent/doctor.ts +0 -200
  45. package/extensions/subagent/execution.ts +0 -738
  46. package/extensions/subagent/file-coalescer.ts +0 -42
  47. package/extensions/subagent/fork-context.ts +0 -63
  48. package/extensions/subagent/formatters.ts +0 -122
  49. package/extensions/subagent/frontmatter.ts +0 -31
  50. package/extensions/subagent/index.ts +0 -585
  51. package/extensions/subagent/intercom-bridge.ts +0 -240
  52. package/extensions/subagent/jsonl-writer.ts +0 -83
  53. package/extensions/subagent/model-fallback.ts +0 -108
  54. package/extensions/subagent/notify.ts +0 -110
  55. package/extensions/subagent/parallel-utils.ts +0 -108
  56. package/extensions/subagent/pi-args.ts +0 -138
  57. package/extensions/subagent/pi-spawn.ts +0 -100
  58. package/extensions/subagent/post-exit-stdio-guard.ts +0 -87
  59. package/extensions/subagent/prompt-template-bridge.ts +0 -399
  60. package/extensions/subagent/prompts/gather-context-and-clarify.md +0 -13
  61. package/extensions/subagent/prompts/parallel-cleanup.md +0 -42
  62. package/extensions/subagent/prompts/parallel-research.md +0 -50
  63. package/extensions/subagent/prompts/parallel-review.md +0 -40
  64. package/extensions/subagent/render-helpers.ts +0 -82
  65. package/extensions/subagent/render.ts +0 -836
  66. package/extensions/subagent/result-intercom.ts +0 -237
  67. package/extensions/subagent/result-watcher.ts +0 -171
  68. package/extensions/subagent/run-history.ts +0 -57
  69. package/extensions/subagent/run-status.ts +0 -136
  70. package/extensions/subagent/schemas.ts +0 -164
  71. package/extensions/subagent/session-tokens.ts +0 -50
  72. package/extensions/subagent/settings.ts +0 -367
  73. package/extensions/subagent/single-output.ts +0 -97
  74. package/extensions/subagent/skills.ts +0 -626
  75. package/extensions/subagent/slash-bridge.ts +0 -176
  76. package/extensions/subagent/slash-commands.ts +0 -303
  77. package/extensions/subagent/slash-live-state.ts +0 -294
  78. package/extensions/subagent/subagent-control.ts +0 -150
  79. package/extensions/subagent/subagent-executor.ts +0 -1899
  80. package/extensions/subagent/subagent-prompt-runtime.ts +0 -75
  81. package/extensions/subagent/subagent-runner.ts +0 -1470
  82. package/extensions/subagent/subagents-status.ts +0 -472
  83. package/extensions/subagent/text-editor.ts +0 -272
  84. package/extensions/subagent/top-level-async.ts +0 -15
  85. package/extensions/subagent/types.ts +0 -623
  86. package/extensions/subagent/utils.ts +0 -456
  87. package/extensions/subagent/worktree.ts +0 -579
  88. package/extensions/super-pi-extension/agents/ce-oracle.md +0 -109
  89. package/extensions/super-pi-extension/agents/ce-planner.md +0 -116
  90. package/extensions/super-pi-extension/agents/ce-reviewer.md +0 -99
  91. package/extensions/super-pi-extension/agents/ce-scout.md +0 -80
  92. package/extensions/super-pi-extension/agents/ce-worker.md +0 -78
  93. package/extensions/super-pi-extension/chains/ce-parallel-review.chain.md +0 -34
  94. package/extensions/super-pi-extension/chains/ce-review-only.chain.md +0 -12
  95. package/extensions/super-pi-extension/chains/ce-standard.chain.md +0 -28
  96. package/extensions/super-pi-extension/index.ts +0 -129
  97. package/extensions/super-pi-extension/model-sync.ts +0 -204
  98. package/skills/08-status/SKILL.md +0 -41
  99. package/skills/08-status/references/artifact-locations.md +0 -10
  100. package/skills/10-rules/SKILL.md +0 -76
  101. package/skills/pi-subagents/SKILL.md +0 -566
package/README.md CHANGED
@@ -91,7 +91,7 @@ Breaks requirements into implementation units, each following strict **RED → G
91
91
 
92
92
  ### 03-work: Build Right
93
93
 
94
- **Parallel execution**: `task_splitter` uses a Union-Find algorithm to analyze file dependencies, feeds conflict-free units to `subagent` (parallel mode, via pi-subagents) for concurrent execution.
94
+ **Parallel execution**: `task_splitter` uses a Union-Find algorithm to analyze file dependencies, feeds conflict-free units to `ce_parallel_subagent` for concurrent execution.
95
95
 
96
96
  **Checkpoint resume**: After each unit, a checkpoint is saved. Interrupted? Next startup auto-loads, skips completed work, continues from the breakpoint. Failed? `fail` records the error → `retry` suggests a recovery strategy (timeout? extend timeout. Permission issue? check permissions first. Code error? fix then retry).
97
97
 
@@ -113,74 +113,30 @@ Next time `02-plan` or `04-review` runs, a grep-first search strategy automatica
113
113
 
114
114
  ---
115
115
 
116
- ## Built-in Subagent Capabilities
117
-
118
- Super Pi includes pi-subagents (by Nico Bailon) as a built-in extension — no separate install needed. The following capabilities are available out of the box:
119
-
120
- | Feature | How to Access | Description |
121
- |---------|--------------|-------------|
122
- | **Agent Manager TUI** | `/agents` or `Ctrl+Shift+A` | Visual agent browser, configure and launch agents/chains/parallel tasks |
123
- | **CE Agents** | Via subagent tool | Pre-configured agents aligned with CE stages (ce-scout, ce-planner, etc.) |
124
- | **CE Chains** | Via subagent tool | Scout → Planner → Worker → Reviewer |
125
- | **Parallel Review** | Via subagent tool | 3-way review: correctness + tests + complexity |
126
- | **Stage Model Sync** | Automatic | `modelStrategy` + `thinkingStrategy` synced to agent configs |
127
- | **Subagent Status** | `/subagents-status` | Show active and recent async subagent runs |
128
- | **Diagnostics** | `/subagents-doctor` | Show subagent diagnostics |
129
-
130
- ### How Model/Thinking Sync Works
131
-
132
- The extension reads `modelStrategy` and `thinkingStrategy` from `.pi/settings.json` and automatically syncs them to pi-subagents agent overrides:
133
-
134
- ```json
135
- {
136
- "modelStrategy": {
137
- "02-plan": "gpt-5.5",
138
- "03-work": "glm-5.1"
139
- },
140
- "thinkingStrategy": {
141
- "02-plan": "high",
142
- "03-work": "medium"
143
- }
144
- }
145
- ```
146
-
147
- This ensures your stage-specific models and thinking levels are used when CE Agents execute.
148
-
149
- ---
150
-
151
116
  ## Technical Architecture
152
117
 
153
- ### Extensions
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)
118
+ ### 8 Skills (workflow nodes)
162
119
 
163
120
  | Skill | One-liner | Core Tool |
164
121
  |-------|-----------|-----------|
165
122
  | `01-brainstorm` | Deep requirements mining in three modes | `brainstorm_dialog` |
166
123
  | `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) |
124
+ | `03-work` | Parallel execution, checkpoint resume, error recovery | `session_checkpoint`, `task_splitter`, `ce_parallel_subagent` |
168
125
  | `04-review` | Persona-routed review + live browser testing | `review_router` |
169
126
  | `05-learn` | Pattern extraction → knowledge card compounding | `pattern_extractor` |
170
- | `06-next` | Not sure what to do next? Ask this | `workflow_state`, `session_history` |
127
+ | `06-next` | What to do next + full status report | `workflow_state`, `session_history` |
171
128
  | `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 | — |
129
+ | `08-help` | Usage guide | |
175
130
 
176
- ### 15 Tools (underlying capabilities)
131
+
132
+ ### 14 Tools + 2 Helpers (underlying capabilities)
177
133
 
178
134
  | Tool | What it does |
179
135
  |------|-------------|
180
136
  | `task_splitter` | Union-Find algorithm analyzes file dependencies, auto-groups parallel-safe units |
181
137
  | `session_checkpoint` | JSON-persisted checkpoints with save/load/fail/retry operations |
182
138
  | `plan_diff` | Incremental plans: compare detects diffs, patch applies changes |
183
- | `subagent` | Parallel & serial subagent execution (built-in, based on pi-subagents) |
139
+ | `ce_parallel_subagent` | `Promise.allSettled`-style CE parallel skill-based subagent execution with context slimming |
184
140
  | `review_router` | Auto-assign reviewer personas from diff metadata |
185
141
  | `pattern_extractor` | Extract and categorize patterns from artifacts |
186
142
  | `brainstorm_dialog` | Multi-round dialog state machine (start → refine × N → summarize) |
@@ -189,20 +145,30 @@ This ensures your stage-specific models and thinking levels are used when CE Age
189
145
  | `worktree_manager` | Full git worktree lifecycle management |
190
146
  | `artifact_helper` | Artifact path resolution and directory creation |
191
147
  | `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 |
148
+ | `ce_subagent` | CE serial skill-based subagent chain with depth guard and context control |
149
+ | `context_handoff` | Cross-stage context handoffs with evidence-first templates (save/load/latest/status) |
150
+ | `subagent-depth-guard` | Helper: env-based recursion depth tracking (prevents runaway nesting) |
151
+ | `async-mutex` | Helper: serializes `process.env` mutation for concurrency-safe child process spawning |
152
+
153
+ ### Compatibility with pi-subagents
154
+
155
+ super-pi's CE skill-router tools use a dedicated namespace to avoid runtime tool-name conflicts:
156
+
157
+ - **CE tools**: `ce_subagent` and `ce_parallel_subagent` — for CE pipeline skill execution
158
+ - **Generic `subagent`**: reserved for third-party agent extensions like [pi-subagents](https://www.npmjs.com/package/pi-subagents)
159
+
160
+ Both extensions can be installed simultaneously without tool collision. super-pi manages the CE pipeline (brainstorm → plan → work → review → learn); pi-subagents provides general-purpose multi-agent execution. No configuration needed — install both and each keeps its own tool namespace.
195
161
 
196
162
  ---
197
163
 
198
164
  ## Token Cost
199
165
 
200
- New conversation overhead: **~2,500 tokens** (1.26% of Claude Sonnet 4's 200K context).
166
+ New conversation overhead: **~2,600 tokens** (1.3% of Claude Sonnet 4's 200K context).
201
167
 
202
168
  | Component | Tokens | When loaded |
203
169
  |-----------|--------|-------------|
204
- | 10 skill registrations | ~615 | Every conversation (fixed) |
205
- | 13 tool registrations | ~1,914 | Every conversation (fixed) |
170
+ | 8 skill registrations | ~490 | Every conversation (fixed) |
171
+ | 14 tool registrations | ~2,055 | Every conversation (fixed) |
206
172
  | Hooks & filters | 0 | Runtime interception, zero prompt cost |
207
173
  | Single skill trigger | ~1,000–4,000 | On-demand via `read` |
208
174
  | Rules minimal (2 files) | ~900 | Before plan/work |
@@ -213,7 +179,7 @@ New conversation overhead: **~2,500 tokens** (1.26% of Claude Sonnet 4's 200K co
213
179
  | No rules | All rules loaded upfront | Progressive on-demand |
214
180
  | No output filtering | No output filtering | Auto-compress (bash ~65–98%, read ~30–60%) |
215
181
  | No TDD gate | No TDD gate | Hard gate prevents rework |
216
- | 0 tokens | ~5,000–36,000 tokens | **~2,500 tokens** |
182
+ | 0 tokens | ~5,000–36,000 tokens | **~2,600 tokens** |
217
183
 
218
184
  Single `npm install` output filtered once pays for the entire overhead. Full evaluation → [`docs/token-cost-evaluation.md`](docs/token-cost-evaluation.md)
219
185
 
@@ -221,7 +187,7 @@ Single `npm install` output filtered once pays for the entire overhead. Full eva
221
187
 
222
188
  ## Code Scale
223
189
 
224
- ~2800 lines of TypeScript implementing 16 tools, 22 Markdown reference files + 78 rule files driving 10 skills, 175 tests covering all tool logic.
190
+ ~2800 lines of TypeScript implementing 14 registered tools + 2 helpers, 23 Markdown reference files + 79 rule files driving 8 skills, 175 tests covering all tool logic.
225
191
 
226
192
  Not a heavy framework. Each tool has a single responsibility, each skill works independently, and together they form a complete workflow.
227
193
 
@@ -278,7 +244,7 @@ You: Requirements changed, need to add SSO support
278
244
  ### Check progress anytime
279
245
 
280
246
  ```
281
- You: /skill:08-status
247
+ You: /skill:06-next
282
248
 
283
249
  → Scans all artifacts, shows progress + recommends next step
284
250
  ```
@@ -302,19 +268,19 @@ your-project/
302
268
 
303
269
  **Recommendation: commit everything to git** — these files are the project's traceable memory.
304
270
 
305
- ### `10-rules`: Progressive Rule Loading
271
+ ### Progressive Rule Loading
306
272
 
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.
273
+ Built-in coding rules live under `rules/` in the package. Rules are loaded **progressively** by each skill — never all at once, only what the current task needs.
308
274
 
309
275
  **How it works:**
310
276
 
311
277
  ```
312
278
  system prompt (30 tokens: skill name + description)
313
- 10-rules SKILL.md (~200 tokens: loading decision tree)
279
+ skill SKILL.md (~200 tokens: loading decision tree)
314
280
  → specific rule files via read tool (on-demand, 900–2600 tokens)
315
281
  ```
316
282
 
317
- Three CE skills auto-trigger rule loading at their entry points:
283
+ Three skills auto-trigger rule loading at their entry points:
318
284
 
319
285
  | Skill | Rules pre-loaded |
320
286
  |-------|-----------------|
@@ -322,6 +288,8 @@ Three CE skills auto-trigger rule loading at their entry points:
322
288
  | `03-work` | `common/` rules + language detection + matching language rules + `web/` if frontend |
323
289
  | `04-review` | `common/code-review.md` + language detection + matching language rules + `web/` if frontend |
324
290
 
291
+ Language detection uses file heuristics (see `skills/references/language-detection.md`): `tsconfig.json` → TypeScript, `Cargo.toml` → Rust, `go.mod` → Go, etc.
292
+
325
293
  **Rule precedence** (when layers overlap on the same topic):
326
294
 
327
295
  ```
@@ -334,7 +302,7 @@ No rules are loaded when you brainstorm, check status, or do non-code tasks. Zer
334
302
 
335
303
  | Layer | Files | When loaded |
336
304
  |-------|-------|------------|
337
- | `common/` | 10 files | Always (baseline for all tasks) |
305
+ | `common/` | 11 files (includes `naming.md`) | Always (baseline for all tasks) |
338
306
  | `typescript/`, `python/`, `cpp/`, `csharp/`, `dart/`, `golang/`, `java/`, `kotlin/`, `perl/`, `php/`, `rust/`, `swift/` | 5 files each | When the task touches that language |
339
307
  | `web/` | 7 files (includes `design-quality.md`, `performance.md`) | When frontend/browser is relevant |
340
308
 
@@ -347,7 +315,7 @@ Two rule sources exist, with project-level taking priority:
347
315
  | **Project-level** | `{your-project-root}/rules/` | ✅ Yes |
348
316
  | Package-level | Inside `node_modules/@leing2021/super-pi/rules/` | ❌ No |
349
317
 
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.
318
+ To customize, create a `rules/` directory in your project root. Skills check it first — if a file exists there, it overrides the package default for that topic.
351
319
 
352
320
  **Add a language** — create a new directory with the 5 standard topics:
353
321
 
@@ -388,7 +356,7 @@ vim rules/common/api-design.md
388
356
  vim rules/python/api-design.md
389
357
  ```
390
358
 
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.
359
+ Skills 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
360
 
393
361
  ---
394
362
 
@@ -400,7 +368,6 @@ The goal isn't making AI write code faster — it's making AI think before writi
400
368
 
401
369
  The following projects directly inspired this work:
402
370
 
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)
404
371
  - **[everything-claude-code](https://github.com/affaan-m/everything-claude-code)** (162K★) → Parallel subagent orchestration, checkpoint resume, continuous learning
405
372
  - **[superpowers](https://github.com/obra/superpowers)** (161K★) → Strict TDD gates, design checklists, review discipline
406
373
  - **[gstack](https://github.com/garrytan/gstack)** (78K★) → YC-style forcing questions, CEO Review frameworks, browser QA
@@ -419,151 +386,13 @@ Not a fork. Not a wrapper. Methodologies extracted and rebuilt with Pi's native
419
386
  | Use CEO Review on plans | Like having a demanding CTO review for free |
420
387
  | Use browser QA for acceptance | Code review can't catch layout breaks and blank screens |
421
388
  | Don't panic on interruption | Next 03-work auto-resumes from checkpoint |
422
- | Use 08-status when lost | One glance shows where you are |
389
+ | Use 06-next when lost | One glance shows where you are and what to do next |
423
390
 
424
391
  ---
425
392
 
426
393
  ## Changelog
427
394
 
428
- ### 0.22.0 Source-integrated pi-subagents
429
- - Integrated pi-subagents v0.20.1 source code into `extensions/subagent/` — single package install (`pi install npm:@leing2021/super-pi`).
430
- - Moved `typebox` from peerDependencies to dependencies.
431
- - Removed `pi-subagents` peer dependency — no longer needed.
432
- - Simplified `super-pi-extension/index.ts`: removed faulty installation detection and auto-install logic.
433
- - Pruned slash commands: removed `/run`, `/chain`, `/run-chain`, `/parallel`; kept `/agents` (TUI), `/subagents-status`, `/subagents-doctor`, and `Ctrl+Shift+A` shortcut.
434
- - Added 8 new tests covering subagent extension structure, agent counts, and integration integrity.
435
- - 169 tests passing.
436
-
437
- ### 0.21.0 — Delegate subagent tools to pi-subagents
438
- - 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
-
451
- ### 0.19.6 — pi-subagents integration extension
452
- - New `super-pi-extension`: pre-configured CE Agents (ce-scout, ce-planner, ce-worker, ce-reviewer, ce-oracle) and CE Chains (ce-standard, ce-review-only, ce-parallel-review).
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.
458
-
459
- ### 0.19.5 — Plan/Work/Review skill rules loading alignment
460
-
461
- ---
462
-
463
- > **Note:** v0.19.7 was a broken release — version bump with no code change, changelog entry for v0.19.6 overwritten. v0.20.0 supersedes it.
464
- - Fixed `02-plan` not loading language-specific rules (e.g. `rules/typescript/`) during the planning phase — only `common/` rules were loaded.
465
- - Fixed `03-work` Core rules missing explicit `common/` loading and `web/` conditional loading (10-rules defined them but the skill's own instructions didn't).
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.
470
-
471
- ### 0.19.4 — Read output filter markdown truncation fix
472
- - Fixed `read-output-filter` over-truncating markdown files: raised markdown threshold from 2KB → 8KB.
473
- - Improved `filterMarkdown()` to fully preserve list items (`-`, `*`, numbered) and keep first 3 lines of paragraphs (was 1).
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.
477
-
478
- ### 0.19.3 — Terminate fix + runtime model routing + autoContinue removal
479
- - Fixed 6 ce-core tools (`brainstorm_dialog`, `workflow_state`, `review_router`, `session_checkpoint`, `session_history`, `pattern_extractor`) incorrectly returning `terminate: true`, which caused agent turns to end prematurely (brainstorm questions not shown, "type continue to proceed" interruptions).
480
- - Implemented runtime stage model routing via ce-core extension `input` hook: reads `.pi/settings.json` `modelStrategy`, auto-switches model before skill execution. Supports full reference (`anthropic/claude-opus-4-1`) and bare model id (`claude-opus-4-1`).
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.
484
-
485
- ### 0.19.2 — Evidence-first handoff-lite + docs tracking rule
486
- - Added `context_handoff` with evidence-first default handoff-lite generation when markdown is omitted.
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.
490
-
491
- ### 0.19.1 — Pipeline config + typecheck baseline fix
492
- - Added shared pipeline config (`skills/references/pipeline-config.md`) for stage model routing via `.pi/settings.json`.
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.
495
-
496
- ### 0.19.0 — 0.69.0 alignment + learn rename
497
- - TypeBox migration: `@sinclair/typebox` → `typebox` (zero old-path imports)
498
- - Peer/dev dependency upgrade: pi-coding-agent `0.67.6` → `0.69.0`
499
- - Tool termination: 6 pure-query tools now return `terminate: true` to reduce unnecessary LLM rounds
500
- - Skill rename: `05-compound` → `05-learn` for clarity
501
-
502
- ### 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, zero waste
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
508
-
509
- ### 0.17.0 — Subagent safety
510
- - Recursion depth guard (`PI_SUBAGENT_DEPTH` / `PI_SUBAGENT_MAX_DEPTH`) prevents runaway nesting
511
- - Async mutex for `process.env` concurrency safety during parallel subagent execution
512
- - Context slimming: `inheritSkills` parameter, parallel workers default to slim context (`--no-skills`)
513
- - Shared `createSubagentRunner` factory (deduped runner closures)
514
- - 162 tests passing
515
-
516
- ### 0.16.0 — Context optimization
517
- - Read output filter: structural compression for large code files, lock files, markdown
518
- - Compaction optimizer: focused summary instructions for session compaction
519
- - Bash output filter improvements
520
-
521
- ### 0.15.0 — Output filtering
522
- - Bash output filter: smart truncation by command type (install, test, build)
523
- - Read output filter: preserves structure while cutting verbosity
524
-
525
- ### 0.14.0 — Structured solution retrieval
526
- - YAML frontmatter tagging + grep-first two-level search
527
- - 95 tests passing
528
-
529
- ### 0.13.0 — Superpowers engineering discipline
530
- - Strict TDD gates, design checklists, YAGNI checks
531
-
532
- ### 0.12.0 — Error recovery
533
- - session_checkpoint fail/retry operations
534
-
535
- ### 0.11.0 — Pattern extraction
536
- - New pattern_extractor tool
537
-
538
- ### 0.10.0 — Continuous learning
539
- - New session_history tool
540
-
541
- ### 0.9.0 — Incremental planning
542
- - New plan_diff tool
543
-
544
- ### 0.8.0 — Multi-round dialog
545
- - New brainstorm_dialog tool
546
-
547
- ### 0.7.0 — Parallel grouping
548
- - Union-Find based task_splitter
549
-
550
- ### 0.6.0 — Checkpoint resume
551
- - New session_checkpoint tool
552
-
553
- ### 0.5.0 — Parallel execution
554
- - New parallel_subagent tool (now delegated to pi-subagents)
555
-
556
- ### 0.4.0 — Smart review
557
- - New review_router tool
558
-
559
- ### 0.3.0 — Isolated development
560
- - New worktree_manager + 07-worktree
561
-
562
- ### 0.2.0 — State awareness
563
- - New workflow_state + 06-next
564
-
565
- ### 0.1.0 — Initial release
566
- - 7 skills, 3 tools
395
+ See [CHANGELOG.md](./CHANGELOG.md) for full version history.
567
396
 
568
397
  ---
569
398