@dreki-gg/pi-plan-mode 0.7.2 → 0.13.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/CHANGELOG.md +99 -0
- package/extensions/plan-mode/__tests__/agent-end-safety.test.ts +125 -0
- package/extensions/plan-mode/__tests__/package-skills.test.ts +47 -0
- package/extensions/plan-mode/__tests__/prompts.test.ts +38 -0
- package/extensions/plan-mode/{utils.test.ts → __tests__/utils.test.ts} +1 -1
- package/extensions/plan-mode/constants.ts +34 -0
- package/extensions/plan-mode/context-filter.ts +32 -0
- package/extensions/plan-mode/index.ts +166 -411
- package/extensions/plan-mode/phase-transitions.ts +87 -0
- package/extensions/plan-mode/plan-storage.ts +80 -0
- package/extensions/plan-mode/prompts.ts +72 -0
- package/extensions/plan-mode/resume.ts +121 -0
- package/extensions/plan-mode/state.ts +47 -0
- package/extensions/plan-mode/tools/submit-plan.ts +10 -16
- package/extensions/plan-mode/tools/update-step.ts +3 -0
- package/extensions/plan-mode/types.ts +8 -2
- package/extensions/plan-mode/ui.ts +39 -0
- package/package.json +7 -2
- package/skills/technical-options/SKILL.md +89 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-options
|
|
3
|
+
description: Generate and rank competing options for a technical decision using parallel evaluators. Use when the user wants a structured comparison of implementation approaches, architecture alternatives, or engineering tradeoffs before choosing one. Not for binary yes/no or pure preference decisions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Technical Options
|
|
7
|
+
|
|
8
|
+
Generate competing proposals for a technical decision, challenge the framing, then fan out to parallel voting agents for ranking.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
### 1. Understand the problem
|
|
13
|
+
|
|
14
|
+
- Read relevant code and context
|
|
15
|
+
- Identify the core constraint or failure mode driving the decision
|
|
16
|
+
- Note available APIs, tools, and integration points
|
|
17
|
+
|
|
18
|
+
### 2. Research (optional)
|
|
19
|
+
|
|
20
|
+
Use `web_search` + `web_visit` if external patterns would help. Skip for purely internal decisions. If those tools are unavailable, proceed from repo context only.
|
|
21
|
+
|
|
22
|
+
### 3. Generate 3–5 proposals
|
|
23
|
+
|
|
24
|
+
Each proposal needs:
|
|
25
|
+
- **Letter** (A–E) and a short memorable name
|
|
26
|
+
- **One-paragraph description** with the key mechanism
|
|
27
|
+
- **Pros and cons** — honest tradeoffs, not sales pitches
|
|
28
|
+
|
|
29
|
+
Rules:
|
|
30
|
+
- Span the solution space — don't cluster around one idea
|
|
31
|
+
- Include a simplest-possible option and a most-robust option
|
|
32
|
+
- Include an unconventional or contrarian option when possible
|
|
33
|
+
- 3 proposals for small choices, 4–5 for architectural decisions
|
|
34
|
+
|
|
35
|
+
### 4. Challenge the framing
|
|
36
|
+
|
|
37
|
+
Before voting, spawn one `advisor` agent (or equivalent) with this task:
|
|
38
|
+
|
|
39
|
+
> "Here are N proposals for [problem]. What important constraint, framing assumption, or missing approach is absent? If you find a materially distinct option the proposals don't cover, describe it. If the slate is well-shaped, say so."
|
|
40
|
+
|
|
41
|
+
Only amend the proposal slate if the challenger surfaces a genuinely distinct option. Do not add variations of existing proposals.
|
|
42
|
+
|
|
43
|
+
### 5. Fan out to 3 voting agents
|
|
44
|
+
|
|
45
|
+
Use `subagent` in parallel mode with 3 tasks. Each voter gets identical proposals but a different evaluation preamble. The lenses are the contract; agent names are flexible — use `advisor`, `reviewer`, or whatever is available:
|
|
46
|
+
|
|
47
|
+
**Lens 1 — Pragmatic engineer:**
|
|
48
|
+
> "You value shipping speed and simplicity. You penalize over-engineering. A complex solution must justify its complexity with concrete failure modes the simple one can't handle."
|
|
49
|
+
|
|
50
|
+
**Lens 2 — Reliability engineer:**
|
|
51
|
+
> "You value robustness, crash recovery, and correctness over speed. You penalize approaches that work in happy paths but have edge-case blind spots. If two are equally correct, prefer the one that fails louder."
|
|
52
|
+
|
|
53
|
+
**Lens 3 — Maintainability reviewer:**
|
|
54
|
+
> "You value clean abstractions, testability, and long-term ownership cost. You penalize approaches that fight the framework or create implicit coupling. The best solution is one a new team member understands in 5 minutes."
|
|
55
|
+
|
|
56
|
+
Each voter must output a strict ranking:
|
|
57
|
+
```
|
|
58
|
+
1st: [Letter] — [reason]
|
|
59
|
+
2nd: [Letter] — [reason]
|
|
60
|
+
...
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Scale to 5 voters only for high-stakes decisions (new system boundaries, irreversible migrations, public API design).
|
|
64
|
+
|
|
65
|
+
### 6. Tally and present
|
|
66
|
+
|
|
67
|
+
**Scoring**: Borda count — 1st = N points, 2nd = N-1, ..., last = 1.
|
|
68
|
+
|
|
69
|
+
**Tiebreaker**: Most 1st-place votes. If still tied, present the split to the user honestly and let them decide — do NOT force a winner.
|
|
70
|
+
|
|
71
|
+
Present in this order:
|
|
72
|
+
1. **Problem framing** (one sentence)
|
|
73
|
+
2. **Proposals** (A–E with names)
|
|
74
|
+
3. **Vote table** with per-voter rankings and scores
|
|
75
|
+
4. **Winner** with consensus reasoning
|
|
76
|
+
5. **Dissent** — where voters disagreed and why
|
|
77
|
+
6. **Recommendation** — winner, plus any elements worth borrowing from runner-up
|
|
78
|
+
7. **Question to user** — proceed, combine, or reconsider?
|
|
79
|
+
|
|
80
|
+
### 7. Confirm with user
|
|
81
|
+
|
|
82
|
+
Do NOT auto-implement. Ask whether to proceed with the winner, combine elements, or reconsider.
|
|
83
|
+
|
|
84
|
+
## When NOT to use this
|
|
85
|
+
|
|
86
|
+
- Binary yes/no decisions — just discuss pros/cons
|
|
87
|
+
- Decisions with an obviously correct answer — just do it
|
|
88
|
+
- Pure preference decisions with no technical tradeoffs — ask the user
|
|
89
|
+
- Reversible decisions where trying the simplest option first is cheap
|