@umgbhalla/pi-gigaplan 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.
- package/README.md +73 -0
- package/extensions/index.ts +847 -0
- package/package.json +53 -0
- package/skills/gigaplan/SKILL.md +60 -0
- package/src/core.ts +720 -0
- package/src/evaluation.ts +383 -0
- package/src/prompts.ts +367 -0
- package/src/schemas.ts +133 -0
- package/src/workers.ts +258 -0
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@umgbhalla/pi-gigaplan",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Structured AI planning with cross-model critique — gigaplan as a pi extension",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package",
|
|
7
|
+
"pi-extension",
|
|
8
|
+
"gigaplan",
|
|
9
|
+
"planning",
|
|
10
|
+
"orchestration"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "umgbhalla",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"homepage": "https://github.com/umgbhalla/pi-gigaplan#readme",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/umgbhalla/pi-gigaplan"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"extensions",
|
|
22
|
+
"skills",
|
|
23
|
+
"src",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@mariozechner/pi-coding-agent": "*",
|
|
29
|
+
"@mariozechner/pi-ai": "*",
|
|
30
|
+
"@mariozechner/pi-tui": "*",
|
|
31
|
+
"@sinclair/typebox": "*"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"vitest": "^3.0.0",
|
|
35
|
+
"typescript": "^5.0.0"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"test:watch": "vitest",
|
|
40
|
+
"lint": "tsc --noEmit"
|
|
41
|
+
},
|
|
42
|
+
"pi": {
|
|
43
|
+
"extensions": [
|
|
44
|
+
"./extensions"
|
|
45
|
+
],
|
|
46
|
+
"skills": [
|
|
47
|
+
"./skills"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gigaplan
|
|
3
|
+
description: Structured AI planning with cross-model critique. Use when the user says "/gigaplan", "make a plan", "structured plan", or wants rigorous planning with independent review.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Gigaplan Orchestration
|
|
7
|
+
|
|
8
|
+
You are orchestrating a gigaplan — a structured planning loop with cross-model critique.
|
|
9
|
+
|
|
10
|
+
## Available Tools
|
|
11
|
+
|
|
12
|
+
| Tool | Purpose |
|
|
13
|
+
|------|---------|
|
|
14
|
+
| `gigaplan_step` | Get subagent config for a step (task prompt, agent, output path) |
|
|
15
|
+
| `gigaplan_advance` | Process step output and advance the state machine |
|
|
16
|
+
| `gigaplan_status` | Check plan status |
|
|
17
|
+
| `gigaplan_override` | Manual intervention (add-note, abort, force-proceed, skip) |
|
|
18
|
+
|
|
19
|
+
## Orchestration Loop
|
|
20
|
+
|
|
21
|
+
For each step that needs an LLM:
|
|
22
|
+
|
|
23
|
+
1. Call `gigaplan_step` with `planDir` and `step` to get the subagent config
|
|
24
|
+
2. Spawn an **autonomous subagent** using the returned config:
|
|
25
|
+
```
|
|
26
|
+
subagent({
|
|
27
|
+
name: details.name,
|
|
28
|
+
agent: details.agent,
|
|
29
|
+
task: details.task,
|
|
30
|
+
interactive: false,
|
|
31
|
+
})
|
|
32
|
+
```
|
|
33
|
+
3. After the subagent completes, call `gigaplan_advance` with `planDir` and `step`
|
|
34
|
+
4. Read the result — it tells you the next step(s)
|
|
35
|
+
|
|
36
|
+
For **evaluate** and **gate** steps: skip the subagent, just call `gigaplan_advance` directly.
|
|
37
|
+
|
|
38
|
+
## Step Flow
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
clarify → plan → critique → evaluate
|
|
42
|
+
↓
|
|
43
|
+
CONTINUE → integrate → plan (loop)
|
|
44
|
+
SKIP → gate → execute → review → done
|
|
45
|
+
ESCALATE → ask user → override
|
|
46
|
+
ABORT → done
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Cross-Model Critique
|
|
50
|
+
|
|
51
|
+
The **critique** step SHOULD use a different model than the planning steps. This prevents self-bias — the planner never reviews its own work. The `gigaplan_step` tool handles agent routing automatically.
|
|
52
|
+
|
|
53
|
+
## Key Rules
|
|
54
|
+
|
|
55
|
+
- **Always advance** after each subagent completes — don't skip `gigaplan_advance`
|
|
56
|
+
- **Evaluate is pure logic** — no subagent needed, just call `gigaplan_advance`
|
|
57
|
+
- **Gate is pure logic** — same as evaluate
|
|
58
|
+
- **ESCALATE means ask the user** — show them the evaluation and ask for an override decision
|
|
59
|
+
- **Show progress** — after each step, summarize what happened and what's next
|
|
60
|
+
- **The plan lives in `.gigaplan/`** — all artifacts are there for auditability
|