@leing2021/super-pi 0.19.0 → 0.19.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/README.md +32 -0
- package/extensions/ce-core/index.ts +7 -6
- package/package.json +1 -1
- package/skills/01-brainstorm/SKILL.md +4 -0
- package/skills/02-plan/SKILL.md +4 -0
- package/skills/03-work/SKILL.md +4 -0
- package/skills/04-review/SKILL.md +4 -0
- package/skills/05-learn/SKILL.md +4 -0
- package/skills/references/pipeline-config.md +49 -0
package/README.md
CHANGED
|
@@ -35,6 +35,38 @@ Super Pi's answers:
|
|
|
35
35
|
|
|
36
36
|
Each step has a dedicated skill + tool pair. Not just prompts — structured toolchains.
|
|
37
37
|
|
|
38
|
+
### New: Stage model routing + optional auto-continue
|
|
39
|
+
|
|
40
|
+
Configure once in `.pi/settings.json`:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"modelStrategy": {
|
|
45
|
+
"01-brainstorm": "claude-sonnet-4-20250514",
|
|
46
|
+
"02-plan": "claude-opus-4-20250115",
|
|
47
|
+
"03-work": "claude-sonnet-4-20250514",
|
|
48
|
+
"04-review": "claude-sonnet-4-20250514",
|
|
49
|
+
"05-learn": "claude-haiku-4-20250414",
|
|
50
|
+
"default": "claude-sonnet-4-20250514"
|
|
51
|
+
},
|
|
52
|
+
"pipeline": {
|
|
53
|
+
"autoContinue": false
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
How it works:
|
|
59
|
+
- Each stage picks `modelStrategy[stage]`, or `modelStrategy.default` as fallback.
|
|
60
|
+
- Every stage prints a `📊 Pipeline Status` block with `Current / Output / Next`.
|
|
61
|
+
- If `pipeline.autoContinue=true`, super-pi can trigger the next stage automatically.
|
|
62
|
+
- Auto-continue is gate-aware: it will NOT skip required approvals (brainstorm approval, plan/review A/B/C choices).
|
|
63
|
+
|
|
64
|
+
Quick example:
|
|
65
|
+
1. Run `/skill:01-brainstorm`
|
|
66
|
+
2. Approve the design
|
|
67
|
+
3. If `autoContinue=true`, it moves to `/skill:02-plan` automatically
|
|
68
|
+
4. If `autoContinue=false`, it stops after status output and waits for your command
|
|
69
|
+
|
|
38
70
|
---
|
|
39
71
|
|
|
40
72
|
## What Each Step Does
|
|
@@ -282,8 +282,8 @@ export default function ceCoreExtension(pi: ExtensionAPI) {
|
|
|
282
282
|
allowCustom: params.allowCustom,
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
|
-
input: async (question) => ctx.ui.input(question),
|
|
286
|
-
select: async (question, options) => ctx.ui.select(question, options),
|
|
285
|
+
input: async (question) => (await ctx.ui.input(question)) ?? null,
|
|
286
|
+
select: async (question, options) => (await ctx.ui.select(question, options)) ?? null,
|
|
287
287
|
},
|
|
288
288
|
)
|
|
289
289
|
|
|
@@ -586,7 +586,7 @@ export default function ceCoreExtension(pi: ExtensionAPI) {
|
|
|
586
586
|
return {
|
|
587
587
|
content: [{ type: "text", text: result.output }],
|
|
588
588
|
details: {
|
|
589
|
-
...event.details,
|
|
589
|
+
...(event.details && typeof event.details === "object" ? event.details : {}),
|
|
590
590
|
bashFilter: {
|
|
591
591
|
strategy: result.strategy,
|
|
592
592
|
originalBytes: result.originalBytes,
|
|
@@ -623,7 +623,7 @@ export default function ceCoreExtension(pi: ExtensionAPI) {
|
|
|
623
623
|
return {
|
|
624
624
|
content: [{ type: "text", text: result.output }],
|
|
625
625
|
details: {
|
|
626
|
-
...event.details,
|
|
626
|
+
...(event.details && typeof event.details === "object" ? event.details : {}),
|
|
627
627
|
readFilter: {
|
|
628
628
|
strategy: result.strategy,
|
|
629
629
|
originalBytes: result.originalBytes,
|
|
@@ -633,10 +633,11 @@ export default function ceCoreExtension(pi: ExtensionAPI) {
|
|
|
633
633
|
}
|
|
634
634
|
})
|
|
635
635
|
|
|
636
|
-
//
|
|
637
|
-
pi.on("
|
|
636
|
+
// Tree summary prompt optimizer — keeps branch summaries focused
|
|
637
|
+
pi.on("session_before_tree", async (_event, _ctx) => {
|
|
638
638
|
return {
|
|
639
639
|
customInstructions: COMPACTION_FOCUS_INSTRUCTIONS,
|
|
640
|
+
replaceInstructions: false,
|
|
640
641
|
}
|
|
641
642
|
})
|
|
642
643
|
}
|
package/package.json
CHANGED
|
@@ -7,6 +7,8 @@ description: "Brainstorm requirements with three modes: CE discovery, Startup Di
|
|
|
7
7
|
|
|
8
8
|
Use this skill when the request is ambiguous, needs requirements discovery before planning, or the user describes a new idea/product.
|
|
9
9
|
|
|
10
|
+
See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
|
|
11
|
+
|
|
10
12
|
## Core rules
|
|
11
13
|
|
|
12
14
|
- Use **`brainstorm_dialog`** to manage multi-round conversations.
|
|
@@ -118,3 +120,5 @@ Before handing off to `02-plan`:
|
|
|
118
120
|
## Artifact contract
|
|
119
121
|
|
|
120
122
|
Use `references/requirements-template.md` to structure the requirements document. Keep implementation details out unless the brainstorm is specifically about architecture or technical direction.
|
|
123
|
+
|
|
124
|
+
Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
|
package/skills/02-plan/SKILL.md
CHANGED
|
@@ -7,6 +7,8 @@ description: "Turn requirements into a plan. Optional CEO-style strategic review
|
|
|
7
7
|
|
|
8
8
|
Use this skill when requirements are ready to become an execution-ready plan.
|
|
9
9
|
|
|
10
|
+
See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
|
|
11
|
+
|
|
10
12
|
## Core rules
|
|
11
13
|
|
|
12
14
|
- Before planning, read the `10-rules` skill and load `rules/common/development-workflow.md` and `rules/common/testing.md` for coding standards context.
|
|
@@ -76,3 +78,5 @@ Every unit must include:
|
|
|
76
78
|
6. Run unit-level verification
|
|
77
79
|
- **Verification commands**: exact commands to run
|
|
78
80
|
- **Expected results**: what success looks like
|
|
81
|
+
|
|
82
|
+
Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
|
package/skills/03-work/SKILL.md
CHANGED
|
@@ -7,6 +7,8 @@ description: Execute plan-driven work in a controlled Phase 1 workflow.
|
|
|
7
7
|
|
|
8
8
|
Use this skill when there is a plan path or a tightly scoped bare prompt ready for execution.
|
|
9
9
|
|
|
10
|
+
See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
|
|
11
|
+
|
|
10
12
|
## Core rules
|
|
11
13
|
|
|
12
14
|
- Before execution, read the `10-rules` skill and load language-specific rules matching the active codebase (e.g. `rules/typescript/` for TS work).
|
|
@@ -64,3 +66,5 @@ When all units are done, provide:
|
|
|
64
66
|
- **Commands run**: all verification commands executed
|
|
65
67
|
- **Verification results**: pass/fail status for each
|
|
66
68
|
- **Follow-up work**: any remaining risks or open questions
|
|
69
|
+
|
|
70
|
+
Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
|
|
@@ -7,6 +7,8 @@ description: "Review code with structured findings. Optional browser QA and regr
|
|
|
7
7
|
|
|
8
8
|
Use this skill after implementation to review changes against the diff, the relevant plan, and prior learnings.
|
|
9
9
|
|
|
10
|
+
See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
|
|
11
|
+
|
|
10
12
|
## Core rules
|
|
11
13
|
|
|
12
14
|
- Before reviewing, read the `10-rules` skill and load `rules/common/code-review.md` plus language-specific rules matching the changed files.
|
|
@@ -71,3 +73,5 @@ After review (and optional QA) is complete, hand off using `references/handoff.m
|
|
|
71
73
|
2. Note fix commits if any were applied.
|
|
72
74
|
3. Recommend `05-learn` if learnings are worth capturing.
|
|
73
75
|
4. Recommend `03-work` if fixes need further implementation.
|
|
76
|
+
|
|
77
|
+
Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
|
package/skills/05-learn/SKILL.md
CHANGED
|
@@ -7,6 +7,8 @@ description: Capture solved problems as reusable solution artifacts.
|
|
|
7
7
|
|
|
8
8
|
Use this skill after solving a problem so the repository gains a reusable learning in `docs/solutions/`.
|
|
9
9
|
|
|
10
|
+
See [shared pipeline instructions](../references/pipeline-config.md) for model routing and pipeline behavior.
|
|
11
|
+
|
|
10
12
|
## Core rules
|
|
11
13
|
|
|
12
14
|
- Every solution MUST include YAML frontmatter per `references/solution-schema.yaml` (title, category, severity, tags, applies_when).
|
|
@@ -30,3 +32,5 @@ Use this skill after solving a problem so the repository gains a reusable learni
|
|
|
30
32
|
5. Choose the correct category using `references/category-map.md`.
|
|
31
33
|
6. Write or update the solution artifact under `docs/solutions/<category>/`.
|
|
32
34
|
7. Mention how future `02-plan` and `04-review` runs should benefit from the new learning.
|
|
35
|
+
|
|
36
|
+
Before finishing this skill, apply the completion checklist in [shared pipeline instructions](../references/pipeline-config.md).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Shared pipeline instructions
|
|
2
|
+
|
|
3
|
+
Use these rules in all Phase 1 skills: `01-brainstorm` → `02-plan` → `03-work` → `04-review` → `05-learn`.
|
|
4
|
+
|
|
5
|
+
## Start of skill: model routing
|
|
6
|
+
|
|
7
|
+
Run this checklist before normal skill workflow:
|
|
8
|
+
|
|
9
|
+
1. Read `.pi/settings.json` from the project root.
|
|
10
|
+
2. Parse `modelStrategy` (if missing, skip switching).
|
|
11
|
+
3. Resolve current stage key:
|
|
12
|
+
- `01-brainstorm`
|
|
13
|
+
- `02-plan`
|
|
14
|
+
- `03-work`
|
|
15
|
+
- `04-review`
|
|
16
|
+
- `05-learn`
|
|
17
|
+
4. Pick `targetModel = modelStrategy[stageKey] ?? modelStrategy.default`.
|
|
18
|
+
5. If `targetModel` exists and differs from the current model, run `/model <targetModel>`.
|
|
19
|
+
6. If switching fails, continue with current model and mention the failure once.
|
|
20
|
+
|
|
21
|
+
## End of skill: status + optional auto-continue
|
|
22
|
+
|
|
23
|
+
Before final completion, always output this block (replace placeholders with real values, never output angle-bracket placeholders literally):
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
---
|
|
27
|
+
📊 Pipeline Status
|
|
28
|
+
- Current: <stageKey>
|
|
29
|
+
- Output: <main artifact path or N/A>
|
|
30
|
+
- Next: <next skill command or Completed>
|
|
31
|
+
---
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Next step mapping:
|
|
35
|
+
- `01-brainstorm` → `/skill:02-plan`
|
|
36
|
+
- `02-plan` → `/skill:03-work`
|
|
37
|
+
- `03-work` → `/skill:04-review`
|
|
38
|
+
- `04-review` → `/skill:05-learn`
|
|
39
|
+
- `05-learn` → `Completed`
|
|
40
|
+
|
|
41
|
+
Then read `.pi/settings.json` → `pipeline.autoContinue`:
|
|
42
|
+
- If `false` or missing, stop after the status block and wait for user input.
|
|
43
|
+
- If current stage is `05-learn`, stop after status block.
|
|
44
|
+
- If `true` and current stage is not `05-learn`, auto-continue is allowed only after stage-specific gates are satisfied:
|
|
45
|
+
- `01-brainstorm`: user has explicitly approved the design handoff.
|
|
46
|
+
- `02-plan`: review choice is resolved (A/B/C flow completed) and user confirmed to proceed.
|
|
47
|
+
- `04-review`: optional QA choice is resolved (A/B/C flow completed) and user confirmed to proceed.
|
|
48
|
+
- Any unclear/ambiguous state: do not auto-continue; stop and ask.
|
|
49
|
+
- When gates are satisfied, automatically trigger the mapped next skill command.
|