@leing2021/super-pi 0.23.6 → 0.23.8

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,13 +1,15 @@
1
1
  # Super Pi
2
2
 
3
- ![Super Pi Workflow](docs/assets/super-pi.png)
3
+ ![Super Pi Workflow](docs/assets/super-pi.webp)
4
4
 
5
- [中文](README-CN.md) | [English](README.md)
5
+ [中文](README_CN.md) | [English](README.md)
6
6
 
7
7
 
8
8
 
9
9
  **Turn your AI coding agent into a reliable engineer.**
10
10
 
11
+ Super Pi is a Pi-native engineering workflow layer: it adds stage discipline, durable artifacts, TDD gates, checkpoints, review, and learning loops on top of your coding agent. It is not a general-purpose multi-agent executor; subagents are optional helpers for bounded leaf tasks.
12
+
11
13
  Install, describe what you want to build, then keep saying "continue." Super Pi drives the full loop:
12
14
 
13
15
  **think → plan → build → review → compound learnings.**
@@ -23,7 +25,7 @@ pi install npm:@leing2021/super-pi
23
25
  - **Five-step loop** — brainstorm → plan → work → review → learn, with automatic skill routing
24
26
  - **Checkpoint resume** — interrupted? Resume from the exact unit you left off
25
27
  - **TDD enforcement** — every unit follows RED → GREEN → REFACTOR with hard gates
26
- - **Parallel execution** — independent units run concurrently via `ce_parallel_subagent`
28
+ - **Controlled subagents** — inline execution by default; subagents are limited to bounded, non-interactive leaf tasks
27
29
  - **Evidence-first review** — auto-assigned reviewers across five axes, autofix loop
28
30
  - **Knowledge compounding** — solved problems become searchable solution artifacts
29
31
  - **Token-efficient** — ~2,600 tokens new-conversation overhead; progressive loading
@@ -43,7 +45,7 @@ You: I want to build a CLI tool that helps indie devs find early users
43
45
 
44
46
  → 01-brainstorm: structured discovery → requirements artifact
45
47
  → 02-plan: TDD-gated implementation units → plan artifact
46
- → 03-work: parallel execution, checkpoint resume
48
+ → 03-work: inline-first execution, bounded subagents, checkpoint resume
47
49
  → 04-review: five-axis findings, autofix loop
48
50
  → 05-learn: knowledge compounding
49
51
 
@@ -71,7 +73,7 @@ You: /skill:03-work docs/plans/plan.md
71
73
  |-------|-------------|-----------|
72
74
  | **01-brainstorm** | Structured multi-round discovery | `brainstorm_dialog` |
73
75
  | **02-plan** | TDD-gated implementation units, optional CEO Review | `plan_diff` |
74
- | **03-work** | Parallel execution, checkpoint resume, strict TDD, stop-the-line | `ce_subagent`, `ce_parallel_subagent` |
76
+ | **03-work** | Inline-first execution, bounded subagents, checkpoint resume, strict TDD, stop-the-line | `ce_subagent`, `ce_parallel_subagent` |
75
77
  | **04-review** | Auto-assigned reviewers, five-axis findings, autofix loop | `review_router` |
76
78
  | **05-learn** | Pattern extraction → searchable solution artifacts | `pattern_extractor` |
77
79
  | **06-next** | Next-step recommendation + workflow status | `workflow_state` |
@@ -82,6 +84,8 @@ You: /skill:03-work docs/plans/plan.md
82
84
 
83
85
  Super Pi ships CE-specific tools named `ce_subagent` and `ce_parallel_subagent`. They are intentionally namespaced so they can coexist with the compatible third-party `pi-subagents` extension without tool-name collisions.
84
86
 
87
+ These tools are helpers, not the core workflow. Use inline execution by default. Use CE subagents only for bounded, non-interactive, easily verifiable leaf tasks. Do not use them to invoke pipeline-stage skills (`01-brainstorm` through `05-learn`); run those stages directly with `/skill:<stage>`.
88
+
85
89
  ### Model & Thinking Routing
86
90
 
87
91
  Configure in `.pi/settings.json`:
@@ -32,7 +32,7 @@ export function createAskUserQuestionTool() {
32
32
  : { answer, mode: "input" }
33
33
  }
34
34
 
35
- const allowCustom = input.allowCustom ?? false
35
+ const allowCustom = input.allowCustom ?? true
36
36
  const selectOptions = allowCustom ? [...options, CUSTOM_OPTION] : options
37
37
  const selected = await ui.select(input.question, selectOptions)
38
38
 
@@ -10,7 +10,7 @@ import {
10
10
  checkSubagentDepth,
11
11
  getChildDepthEnv,
12
12
  } from "./subagent-depth-guard"
13
- import type { SubagentExecOptions, SubagentRunner } from "./subagent"
13
+ import { assertNonPipelineStageSkill, type SubagentExecOptions, type SubagentRunner } from "./subagent"
14
14
 
15
15
  export interface ParallelSubagentTask {
16
16
  agent: string
@@ -52,6 +52,10 @@ export function createParallelSubagentTool() {
52
52
  throw new Error("ce_parallel_subagent requires at least one task")
53
53
  }
54
54
 
55
+ for (const task of input.tasks) {
56
+ assertNonPipelineStageSkill(task.agent, "ce_parallel_subagent")
57
+ }
58
+
55
59
  // Default: parallel workers get a slim context (no inherited skills)
56
60
  const inheritSkills = input.inheritSkills ?? false
57
61
  const execOptions = buildParallelExecOptions(inheritSkills)
@@ -41,6 +41,23 @@ export type SubagentRunner = (
41
41
  options?: SubagentExecOptions,
42
42
  ) => Promise<string>
43
43
 
44
+ const PIPELINE_STAGE_SKILLS = new Set([
45
+ "01-brainstorm",
46
+ "02-plan",
47
+ "03-work",
48
+ "04-review",
49
+ "05-learn",
50
+ ])
51
+
52
+ export function assertNonPipelineStageSkill(agent: string, toolName: string): void {
53
+ if (PIPELINE_STAGE_SKILLS.has(agent)) {
54
+ throw new Error(
55
+ `Pipeline-stage skill "${agent}" cannot run through ${toolName}. ` +
56
+ `Run it directly with /skill:${agent} instead.`,
57
+ )
58
+ }
59
+ }
60
+
44
61
  export function createSubagentTool() {
45
62
  return {
46
63
  name: "ce_subagent",
@@ -61,6 +78,7 @@ export function createSubagentTool() {
61
78
  const execOptions = buildExecOptions(input.inheritSkills)
62
79
 
63
80
  if (hasSingle) {
81
+ assertNonPipelineStageSkill(input.agent!, "ce_subagent")
64
82
  const prompt = buildPrompt(input.agent!, input.task!)
65
83
  const output = await runner(prompt, execOptions)
66
84
  return {
@@ -73,6 +91,7 @@ export function createSubagentTool() {
73
91
  let previous = ""
74
92
 
75
93
  for (const task of input.chain ?? []) {
94
+ assertNonPipelineStageSkill(task.agent, "ce_subagent")
76
95
  const prompt = buildPrompt(task.agent, task.task.replace(/\{previous\}/g, previous))
77
96
  const output = await runner(prompt, execOptions)
78
97
  outputs.push(output)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leing2021/super-pi",
3
- "version": "0.23.6",
3
+ "version": "0.23.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Pi-native Compound Engineering package for iterative development workflows",
@@ -20,9 +20,10 @@ See [shared pipeline instructions](../references/pipeline-config.md) for model r
20
20
  3. **Distinguish input:** plan path vs bare prompt
21
21
  4. Derive tasks from plan **implementation units**
22
22
  5. **Execution mode:**
23
- - **Inline mode** for small/scoped units
24
- - **`ce_parallel_subagent`** for independent CE skill units
25
- - **`ce_subagent`** only for dependent serial chains
23
+ - **Inline mode** is the default execution path
24
+ - **`ce_parallel_subagent`** only for bounded, non-interactive, easily verifiable leaf tasks
25
+ - **`ce_subagent`** only for rare dependent serial chains of leaf tasks
26
+ - Never use either tool to invoke pipeline-stage skills (`01-brainstorm through 05-learn`). Run those stages directly with `/skill:<stage>`.
26
27
  6. Use **`session_checkpoint`** to track progress and enable resume
27
28
  7. Use **`task_splitter`** to analyze dependencies before execution
28
29
  8. If in **worktree** (via `07-worktree`), execute inside it
@@ -64,7 +65,7 @@ This is a hard gate — do not push past a failing test or broken build to conti
64
65
  3. Read implementation units if plan path
65
66
  4. Load `session_checkpoint` to skip completed units
66
67
  5. Use `task_splitter` for dependency analysis
67
- 6. Execute: **inline mode** by default, `ce_parallel_subagent` for independent units
68
+ 6. Execute: **inline mode** by default; use subagents only for bounded, non-interactive, easily verifiable leaf tasks
68
69
  7. Follow TDD per unit: RED → minimal code → GREEN → refactor → unit-level **verification**
69
70
  8. **Source-driven gate:** Before implementing framework/library-specific code, verify the API or pattern against official documentation. Flag unverified patterns as UNVERIFIED in output.
70
71
  9. Record progress via `references/progress-update-format.md`