pi-soly 1.3.0 → 1.4.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 +6 -30
- package/commands.ts +2 -2
- package/index.ts +1 -26
- package/package.json +1 -2
- package/skills/soly-framework/SKILL.md +24 -97
- package/switch/README.md +0 -104
- package/switch/core.ts +0 -229
- package/switch/index.ts +0 -365
- package/switch/package.json +0 -52
- package/switch/prompt.ts +0 -131
- package/switch/tests/core.test.ts +0 -210
- package/switch/tests/index.test.ts +0 -48
- package/switch/tests/prompt.test.ts +0 -108
- package/switch/tests/watcher.test.ts +0 -147
- package/switch/tsconfig.json +0 -28
- package/switch/watcher.ts +0 -112
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**The project management framework for [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent).**
|
|
6
6
|
|
|
7
|
-
Plans · State · Subagents · Multi-question picker ·
|
|
7
|
+
Plans · State · Subagents · Multi-question picker · Live task list.
|
|
8
8
|
|
|
9
9
|
One `npm install`. Zero config. Pure magic.
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ That's it. Restart pi, and you have:
|
|
|
30
30
|
|
|
31
31
|
- **A complete project management engine** — plans, state, subagent-driven execution
|
|
32
32
|
- **A multi-question picker** — `ask_pro` tool for the LLM
|
|
33
|
-
- **
|
|
33
|
+
- **Live task list + notifications** — see nudge + deprecation warnings as framed Box widgets
|
|
34
34
|
- **A live task list** — `todo_update` tool renders in the footer
|
|
35
35
|
- **7 soly agents** installed on first run
|
|
36
36
|
|
|
@@ -43,7 +43,7 @@ That's it. Restart pi, and you have:
|
|
|
43
43
|
| Write your own planning workflow | `/plan`, `/execute`, `/resume`, `/inspect` — ready |
|
|
44
44
|
| Manually dispatch subagents | `useSolyWorkerSubagents: true` — automatic routing |
|
|
45
45
|
| 3 different packages for pickers/tasks/agents | One package, one config, one install |
|
|
46
|
-
|
|
|
46
|
+
| Mode selection (oracle/scout/reviewer) | LLM picks via `subagent(...)` based on task brief |
|
|
47
47
|
| Re-invent the state machine | `.soly/STATE.md` + auto-managed phases |
|
|
48
48
|
|
|
49
49
|
---
|
|
@@ -94,30 +94,6 @@ ask_pro({
|
|
|
94
94
|
})
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
### 🎛 Rotor Switcher
|
|
98
|
-
|
|
99
|
-
Footer pill that's always there. `Ctrl+Tab` to cycle. No popup, no friction.
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
[model] · ⚡ worker · todos 2/5: write tests ← footer, always visible
|
|
103
|
-
[model] ▶ 🐢 oracle · todos 2/5: write tests ← after one Ctrl+Tab
|
|
104
|
-
[model] · 🔍 scout · todos 2/5: write tests ← after two
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Agents:
|
|
108
|
-
- `worker` — default, full read+write
|
|
109
|
-
- `oracle` — read-only decision advisor
|
|
110
|
-
- `scout` — codebase reconnaissance
|
|
111
|
-
- `researcher` — external docs, ecosystem
|
|
112
|
-
- `planner` — architecture and decomposition
|
|
113
|
-
- `context-builder` — hands off context to other agents
|
|
114
|
-
- `reviewer` — adversarial code review, read-only
|
|
115
|
-
- `delegate` — chains agents together
|
|
116
|
-
|
|
117
|
-
### 📝 Live Task List
|
|
118
|
-
|
|
119
|
-
`todo_update` tool — renders in the footer as `todos 2/5: current action`.
|
|
120
|
-
|
|
121
97
|
The LLM can update its own task list mid-turn. You watch progress without re-asking.
|
|
122
98
|
|
|
123
99
|
```ts
|
|
@@ -171,11 +147,11 @@ todo_update({
|
|
|
171
147
|
▼
|
|
172
148
|
┌──────────────────┐
|
|
173
149
|
│ switch/ │
|
|
174
|
-
│
|
|
150
|
+
│ (no rotors — │
|
|
175
151
|
│ │
|
|
176
152
|
│ Ctrl+Tab │
|
|
177
153
|
│ footer pill │
|
|
178
|
-
│
|
|
154
|
+
│ removed 1.4) │
|
|
179
155
|
└────────┬─────────┘
|
|
180
156
|
│
|
|
181
157
|
▼
|
|
@@ -196,7 +172,7 @@ todo_update({
|
|
|
196
172
|
|
|
197
173
|
## 📚 Documentation
|
|
198
174
|
|
|
199
|
-
- **Slash commands** — `/plan`, `/execute`, `/resume`, `/inspect`, `/discuss <N>`, `/quick <task
|
|
175
|
+
- **Slash commands** — `/plan`, `/execute`, `/resume`, `/inspect`, `/discuss <N>`, `/quick <task>`
|
|
200
176
|
- **Tools** — `ask_pro(question[])` and `todo_update(todo[])`
|
|
201
177
|
- **Events** — `session_start`, `before_agent_start`, `message_end`, `tool_call`, `tool_result`
|
|
202
178
|
- **State files** — `.soly/STATE.md`, `.soly/ROADMAP.md`, `.soly/phases/<N>-<slug>/<N>-PLAN.md`
|
package/commands.ts
CHANGED
|
@@ -418,8 +418,8 @@ What must the LLM do?
|
|
|
418
418
|
};
|
|
419
419
|
const subcommands: Record<string, SolySub> = {
|
|
420
420
|
// `agent` subcommand REMOVED — moved to the separate `pi-switch`
|
|
421
|
-
// extension
|
|
422
|
-
// Soly no longer owns
|
|
421
|
+
// extension (rotor switcher removed in 1.4.0).
|
|
422
|
+
// Soly no longer owns a rotor switcher.
|
|
423
423
|
config: {
|
|
424
424
|
description: "show merged config (per-project + global + defaults); edit .soly/config.json or ~/.soly/config.json",
|
|
425
425
|
run: () => {
|
package/index.ts
CHANGED
|
@@ -66,7 +66,7 @@ import { loadIntentDocs, buildIntentSection, loadInlineIntentBodies, type Intent
|
|
|
66
66
|
|
|
67
67
|
// Built-in sub-features (merged from former pi-asked, pi-agented packages):
|
|
68
68
|
import piAskExtension from "./ask/index.ts";
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
|
|
71
71
|
export default function solyExtension(pi: ExtensionAPI) {
|
|
72
72
|
// ============================================================================
|
|
@@ -82,19 +82,7 @@ export default function solyExtension(pi: ExtensionAPI) {
|
|
|
82
82
|
let sessionCwd = "";
|
|
83
83
|
|
|
84
84
|
// ============================================================================
|
|
85
|
-
// Rotor switcher (Shift+Tab cycles through available rotors)
|
|
86
|
-
// ============================================================================
|
|
87
|
-
|
|
88
85
|
// ============================================================================
|
|
89
|
-
// Rotor switcher: REMOVED. The rotor cycler is now owned by the
|
|
90
|
-
// separate `pi-switch` extension (footer pill + Ctrl+Tab + /rotor slash).
|
|
91
|
-
// Soly no longer ships a subagent (removed in 1.3.0). The LLM does plan
|
|
92
|
-
// execution directly using slash commands + the soly-framework skill.
|
|
93
|
-
// Workflows read the current rotor from globalThis.__PI_SWITCH_ROTOR__
|
|
94
|
-
// (set by pi-switch).
|
|
95
|
-
// ============================================================================
|
|
96
|
-
|
|
97
|
-
// Config (per-project + global + defaults). Refreshed on session_start
|
|
98
86
|
// and on each session_start (the LLM can call /soly config to view).
|
|
99
87
|
let activeConfig: SolyConfig = DEFAULT_CONFIG;
|
|
100
88
|
const getActiveConfig = (): SolyConfig => activeConfig;
|
|
@@ -262,7 +250,6 @@ export default function solyExtension(pi: ExtensionAPI) {
|
|
|
262
250
|
const hint = buildNextHint(state);
|
|
263
251
|
const hintGroup = hint ? `${"\x1b[2m"}${hint}${"\x1b[0m"}` : "";
|
|
264
252
|
|
|
265
|
-
// Agent badge — owned by pi-switch extension (header bar + status line).
|
|
266
253
|
// Soly doesn't render the agent badge itself.
|
|
267
254
|
const agentGroup = "";
|
|
268
255
|
|
|
@@ -325,18 +312,6 @@ export default function solyExtension(pi: ExtensionAPI) {
|
|
|
325
312
|
getConfig: getActiveConfig,
|
|
326
313
|
});
|
|
327
314
|
|
|
328
|
-
// ============================================================================
|
|
329
|
-
// Agent switcher: Ctrl+Shift+A cycles through available subagents.
|
|
330
|
-
// (Shift+Tab is taken by pi's thinking-level cycler; Ctrl+Shift+A is unused
|
|
331
|
-
// and mnemonic for "A"gent.)
|
|
332
|
-
// ============================================================================
|
|
333
|
-
// Agent switcher REMOVED — moved to the separate `pi-switch` extension.
|
|
334
|
-
// Soly no longer owns Ctrl+Tab, the footer pill, or /rotor slash.
|
|
335
|
-
// The current agent is read by soly workflows from
|
|
336
|
-
// globalThis.__PI_SWITCH_AGENT__ (set by pi-switch), with a fallback
|
|
337
|
-
// to "worker" if pi-switch isn't installed.
|
|
338
|
-
// ============================================================================
|
|
339
|
-
|
|
340
315
|
registerWorkflows(pi, {
|
|
341
316
|
getState: () => state,
|
|
342
317
|
getInteractiveRules: () =>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-soly",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Project management framework for pi-coding-agent. Workflows, planning, multi-question picker, agent switcher, live task list — one npm install, zero config.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"agents-install.ts",
|
|
41
41
|
"ask",
|
|
42
42
|
"skills",
|
|
43
|
-
"switch",
|
|
44
43
|
"workflows",
|
|
45
44
|
"workflows-data"
|
|
46
45
|
],
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: soly-framework
|
|
3
|
-
description: Use when the user asks how to do anything with the soly framework for pi — start a new project, plan or execute a phase, pause and resume sessions, add rules, add intent docs, write PLAN.md or SUMMARY.md, troubleshoot issues. Triggers on "how do I", "what's the command for", "soly help", "soly framework", and any practical question about using the soly extension. NOT loaded for generic code questions — only when the user is working with the soly workflow.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# soly framework
|
|
7
2
|
|
|
8
|
-
The **soly** extension adds project-management workflow to [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent): intent docs, ROADMAP/STATE/PHASE state machine, and
|
|
3
|
+
The **soly** extension adds project-management workflow to [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent): intent docs, ROADMAP/STATE/PHASE state machine, and LLM-driven plan execution. This skill is your complete reference for using it.
|
|
9
4
|
|
|
10
5
|
## Quick start (read first if new)
|
|
11
6
|
|
|
@@ -22,7 +17,7 @@ The **soly** extension adds project-management workflow to [pi-coding-agent](htt
|
|
|
22
17
|
- A **task** is the smallest unit. Has type, description, verify, accept.
|
|
23
18
|
- **Close-out**: production code commits → `SUMMARY.md` → `STATE.md` updated → ROADMAP check.
|
|
24
19
|
|
|
25
|
-
##
|
|
20
|
+
## Quick reference — slash commands
|
|
26
21
|
|
|
27
22
|
| Command | What it does |
|
|
28
23
|
|---|---|
|
|
@@ -35,10 +30,21 @@ The **soly** extension adds project-management workflow to [pi-coding-agent](htt
|
|
|
35
30
|
| `/quick <task>` | One-shot task that doesn't need a full plan — direct dispatch |
|
|
36
31
|
| `/soly` | Project state inspection (alias for `/inspect`) |
|
|
37
32
|
| `/why` | Show what context the LLM's last turn was based on |
|
|
38
|
-
| `/
|
|
33
|
+
| `/soly-init` | Scaffold a new soly project (interactive template picker) |
|
|
34
|
+
| `/soly-migrate` | Move legacy `.soly/` to `.agents/` (atomic) |
|
|
35
|
+
| `/soly-status` | Comprehensive one-screen report |
|
|
36
|
+
| `/soly-log [N]` | Show last N notifications from the log |
|
|
39
37
|
|
|
40
38
|
`/soly <verb>` plain-text aliases also work for some verbs (legacy compat).
|
|
41
39
|
|
|
40
|
+
## No rotors (removed in 1.4.0)
|
|
41
|
+
|
|
42
|
+
As of 1.4.0, soly no longer ships rotors. No `/rotor` command, no `Ctrl+Tab` cycle, no footer pill. The LLM picks the right subagent based on the task brief — use `subagent(...)` with `agent: "worker"` for implementation, `"oracle"` for decisions, `"scout"` for recon, `"reviewer"` for adversarial review.
|
|
43
|
+
|
|
44
|
+
**Why drop them?** Rotors were a UX shortcut (Ctrl+Tab) that pi itself doesn't support well. pi has its own subagent system (`worker`, `oracle`, `scout`, `reviewer`); wrapping it in a "cycle" was over-engineering. The LLM in the main session is the executor; pi's subagents are helpers, not cycle modes.
|
|
45
|
+
|
|
46
|
+
**For soly work**, the LLM does the work itself — it reads PLAN.md, runs commands, commits, writes SUMMARY.md. It does NOT spawn a soly subagent. Use `subagent(...)` only for read-only research (e.g. `agent: "scout"` for "find all files using X").
|
|
47
|
+
|
|
42
48
|
## File structure
|
|
43
49
|
|
|
44
50
|
```
|
|
@@ -69,26 +75,19 @@ The **soly** extension adds project-management workflow to [pi-coding-agent](htt
|
|
|
69
75
|
│ └── .continue-here.md # pause resume marker
|
|
70
76
|
├── .agents/ # vendor-neutral agent config (per project)
|
|
71
77
|
│ ├── rules/ # agent rules (loaded with priority 3, after .soly/rules/)
|
|
72
|
-
│ │ ├── code-style.md
|
|
73
|
-
│ │ └── testing.md
|
|
74
78
|
│ ├── skills/ # project-scoped skills (pi auto-discovers)
|
|
75
79
|
│ │ └── my-skill/
|
|
76
80
|
│ │ └── SKILL.md
|
|
77
81
|
│ ├── docs/ # agent-specific docs (intent-style)
|
|
78
|
-
│ │ └── architecture.md
|
|
79
82
|
│ └── agents/ # project-specific agent definitions
|
|
80
|
-
│ ├── project-reviewer.md
|
|
81
|
-
│ └── data-scientist.md
|
|
82
83
|
```
|
|
83
84
|
|
|
84
|
-
**Two parallel conventions
|
|
85
|
+
**Two parallel conventions:** `.soly/` is soly-specific state. `.agents/` is vendor-neutral agent config. The two coexist:
|
|
85
86
|
|
|
86
|
-
- **Use `.
|
|
87
|
-
- **Use `.
|
|
87
|
+
- **Use `.soly/`** for soly workflow artifacts (PLAN.md, SUMMARY.md, etc.)
|
|
88
|
+
- **Use `.agents/`** for things other AI tools should also see (rules, skills, agents)
|
|
88
89
|
- **Use `AGENTS.md`** for top-level project-wide agent conventions
|
|
89
90
|
|
|
90
|
-
To migrate: `mv .soly .agents` — soly picks up the new location automatically. No data loss.
|
|
91
|
-
|
|
92
91
|
## Frontmatter conventions
|
|
93
92
|
|
|
94
93
|
### PLAN.md frontmatter (required)
|
|
@@ -200,23 +199,6 @@ The only legal sequence for finishing a plan:
|
|
|
200
199
|
|
|
201
200
|
Once production commits exist, returning without a committed `SUMMARY.md` is an **illegal partial-plan state** — the next `/execute` will detect it and refuse to start.
|
|
202
201
|
|
|
203
|
-
## Cycle rotors (4 built-in)
|
|
204
|
-
|
|
205
|
-
| Rotor | Writes | Use for |
|
|
206
|
-
|---|---|---|
|
|
207
|
-
| `worker` | ✅ | Generic implementation, full tools |
|
|
208
|
-
| `oracle` | ❌ | Decision-consistency, no file edits |
|
|
209
|
-
| `scout` | ❌ | Codebase recon, read-only |
|
|
210
|
-
| `reviewer` | ❌ | Adversarial code review |
|
|
211
|
-
|
|
212
|
-
Switch with `/rotor <name>` or `Ctrl+Tab` (cycles through). Footer pill shows current: `· ⚡ worker` / `▶ 🐢 oracle`.
|
|
213
|
-
|
|
214
|
-
**Why "rotors"?** Because they *rotate* — `Ctrl+Tab` cycles through them. The word emphasizes the cycling behavior. As of 1.3.0 there are no soly subagents — only the cycle rotors.
|
|
215
|
-
|
|
216
|
-
## Subagent: none (as of 1.3.0)
|
|
217
|
-
|
|
218
|
-
**Soly no longer ships a subagent.** You (the LLM) execute plans directly in the main session using the slash commands above. If you need help, use pi's built-in cycle agents (\`worker\`, \`oracle\`, \`scout\`, \`reviewer\`) or the user's custom agents in \`~/.agents/\`. Don't spawn \`soly-manager\` / \`soly-worker\` / etc. — they don't exist.
|
|
219
|
-
|
|
220
202
|
## Tools the LLM can call
|
|
221
203
|
|
|
222
204
|
| Tool | Purpose |
|
|
@@ -234,51 +216,6 @@ Switch with `/rotor <name>` or `Ctrl+Tab` (cycles through). Footer pill shows cu
|
|
|
234
216
|
| `ask_pro(questions)` | Multi-question picker (tabbed, single/multi-select, ⭐, Other…) |
|
|
235
217
|
| `todo_update(todos)` | Update task list rendered in footer |
|
|
236
218
|
|
|
237
|
-
## Add a new rule (most common task)
|
|
238
|
-
|
|
239
|
-
Three places, in priority order:
|
|
240
|
-
|
|
241
|
-
1. **Project rule** — `~/.pi/agent/agents/soly/rules/<name>.md` (version-controlled, shared with team)
|
|
242
|
-
2. **User rule** — `~/.soly/rules/<name>.md` (per-user, not committed)
|
|
243
|
-
3. **Phase rule** — `<phase-dir>/<plan>.md.rules/<name>.md` (active only for that plan)
|
|
244
|
-
|
|
245
|
-
Use `/rulewizard` slash command to scaffold a new rule with the right frontmatter.
|
|
246
|
-
|
|
247
|
-
A rule file looks like:
|
|
248
|
-
|
|
249
|
-
```markdown
|
|
250
|
-
---
|
|
251
|
-
applyTo: "src/**/*.ts"
|
|
252
|
-
priority: 50
|
|
253
|
-
---
|
|
254
|
-
|
|
255
|
-
# TypeScript style
|
|
256
|
-
|
|
257
|
-
- Strict mode required
|
|
258
|
-
- Never use `any`
|
|
259
|
-
- Prefer `type` over `interface`
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## Add a new intent doc
|
|
263
|
-
|
|
264
|
-
Create a file in `.soly/docs/`:
|
|
265
|
-
|
|
266
|
-
```markdown
|
|
267
|
-
# Architecture
|
|
268
|
-
|
|
269
|
-
## Goal
|
|
270
|
-
|
|
271
|
-
Build a CLI tool that...
|
|
272
|
-
|
|
273
|
-
## Non-obvious constraints
|
|
274
|
-
|
|
275
|
-
- Must work offline (no network calls)
|
|
276
|
-
- Must be a single static binary
|
|
277
|
-
- Must integrate with the existing `~/.config/x` schema
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
Intent docs are 0-point — written BEFORE any plan, by humans. They define the "why", not the "how".
|
|
281
|
-
|
|
282
219
|
## Common workflows
|
|
283
220
|
|
|
284
221
|
### Start a new project
|
|
@@ -287,11 +224,11 @@ Intent docs are 0-point — written BEFORE any plan, by humans. They define the
|
|
|
287
224
|
2. Write 1-3 intent docs in `.soly/docs/`
|
|
288
225
|
3. Optionally write `AGENTS.md` (or `agents.md`) at project root with project conventions
|
|
289
226
|
4. Create `ROADMAP.md` with phase table
|
|
290
|
-
5. `/plan 1` to start phase
|
|
227
|
+
5. `/plan 1` to start the first phase
|
|
291
228
|
|
|
292
229
|
### Add project-specific agents
|
|
293
230
|
|
|
294
|
-
Drop a markdown file in `.agents/<name>.md` (project) or `~/.agents/<name>.md` (user):
|
|
231
|
+
Drop a markdown file in `.agents/agents/<name>.md` (project) or `~/.agents/agents/<name>.md` (user):
|
|
295
232
|
|
|
296
233
|
```markdown
|
|
297
234
|
---
|
|
@@ -310,7 +247,7 @@ You are a data scientist. ...
|
|
|
310
247
|
3. `~/.agents/` — user vendor-neutral (preferred)
|
|
311
248
|
4. `~/.pi/agent/agents/` — user pi native (legacy)
|
|
312
249
|
|
|
313
|
-
`Ctrl+Tab` to see them in the cycle.
|
|
250
|
+
`Ctrl+Tab` to see them in the cycle. (Removed in 1.4.0 — use `subagent(...)` directly.)
|
|
314
251
|
|
|
315
252
|
### Add a feature to an existing phase
|
|
316
253
|
|
|
@@ -332,24 +269,14 @@ If `/execute` complains about illegal partial state:
|
|
|
332
269
|
3. If yes, finish close-out: update `STATE.md` + `ROADMAP.md`
|
|
333
270
|
4. If no, either commit the SUMMARY or revert the production commits
|
|
334
271
|
|
|
335
|
-
##
|
|
272
|
+
## When in doubt
|
|
336
273
|
|
|
337
|
-
|
|
338
|
-
- **"What does PLAN.md look like"** → this skill, Frontmatter section
|
|
339
|
-
- **"How to add a rule"** → this skill, Add a new rule section
|
|
340
|
-
- **"Why did the LLM do Y"** → `/why`
|
|
341
|
-
- **"What context is loaded"** → `soly_read(artifact: "state")` + `soly_doc_search(...)`
|
|
342
|
-
- **"What was the recent conversation"** → `soly_scratchpad()`
|
|
274
|
+
Call `soly_read(artifact: "state")` and `soly_read(artifact: "roadmap")` first. The system prompt has the layers, but `soly_read` gives you full content. Then check `soly_doc_search` for any other relevant docs.
|
|
343
275
|
|
|
344
276
|
## Don'ts
|
|
345
277
|
|
|
346
278
|
- ❌ Edit `.soly/rules/` files you didn't write — those are project invariants
|
|
347
279
|
- ❌ Skip the SUMMARY — illegal partial state
|
|
348
|
-
- ❌ Spawn `soly-manager` / `soly-worker` / etc. — there are no soly subagents (removed in 1.3.0). Use pi's built-in subagents via the parent LLM's
|
|
349
|
-
- ❌ Write rules in code comments — use `.soly/rules/*.md` or `.agents/rules/*.md` files
|
|
280
|
+
- ❌ Spawn `soly-manager` / `soly-worker` / etc. — there are no soly subagents (removed in 1.3.0). Use pi's built-in subagents via the parent LLM's `subagent(...)` call.
|
|
350
281
|
- ❌ Edit `.soly/phases/*/PLAN.md` after `status: in_progress` — create a new plan
|
|
351
|
-
- ❌ Put intent docs anywhere other than `.soly/docs/`
|
|
352
|
-
|
|
353
|
-
## When in doubt
|
|
354
|
-
|
|
355
|
-
Call `soly_read(artifact: "state")` and `soly_read(artifact: "roadmap")` first. The system prompt has the layers, but `soly_read` gives you full content. Then check `soly_doc_search` for any other relevant docs.
|
|
282
|
+
- ❌ Put intent docs anywhere other than `.soly/docs/`
|
package/switch/README.md
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# pi-switch — generic subagent switcher for pi
|
|
2
|
-
|
|
3
|
-
A tiny pi extension that gives you a **persistent indicator of the current subagent** (footer pill) and lets you **cycle / set / create** agents. Generic — works with any agent in `~/.pi/agent/agents/`.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **Footer pill** — always shows current agent with emoji + description
|
|
8
|
-
- **Ctrl+Tab** to cycle to next agent (Shift+Tab is taken by pi's thinking-level cycler)
|
|
9
|
-
- **F2** as fallback for terminals that don't pass Ctrl+Tab through
|
|
10
|
-
- **`/agent`** slash command to show current + available
|
|
11
|
-
- **`/agent <name>`** to set explicitly
|
|
12
|
-
- **`/agent create <name>`** to scaffold a new user agent
|
|
13
|
-
- **`/agent doctor`** to diagnose
|
|
14
|
-
- **`/agent recommend <task>`** to suggest the right agent for a task
|
|
15
|
-
- **Task → agent heuristics** baked into the system prompt so the LLM picks the right agent for the task
|
|
16
|
-
- Persists to `.soly/agent` (if soly project) or `~/.pi-switch/agent` (standalone)
|
|
17
|
-
- Reads user agents from `~/.pi/agent/agents/*.md` on every cycle — drop a file and Ctrl+Tab to see it
|
|
18
|
-
- Silent switch — only the pill updates, chat stays clean
|
|
19
|
-
|
|
20
|
-
## How agents work
|
|
21
|
-
|
|
22
|
-
Agents are markdown files with YAML frontmatter. pi-subagents (and pi-switch) discover them from these locations:
|
|
23
|
-
|
|
24
|
-
| Path | Type | Editable |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| `~/.pi/agent/npm/node_modules/pi-subagents/agents/*.md` | built-in (worker, oracle, scout, reviewer) | ❌ |
|
|
27
|
-
| `~/.pi/agent/agents/*.md` | user-defined | ✅ |
|
|
28
|
-
| `~/.pi/agent/extensions/pi-soly/agents/*.md` (auto-installed if `useSolyWorkerSubagents: true` in `.soly/config.json`) | (removed in 1.3.0 — soly no longer ships a subagent) | — |
|
|
29
|
-
|
|
30
|
-
### Frontmatter schema
|
|
31
|
-
|
|
32
|
-
```markdown
|
|
33
|
-
---
|
|
34
|
-
name: my-reviewer # required, unique, [a-zA-Z0-9_-]{1,64}
|
|
35
|
-
description: One-liner shown in picker
|
|
36
|
-
thinking: medium # off | minimal | low | medium | high | xhigh
|
|
37
|
-
systemPromptMode: replace # replace | append
|
|
38
|
-
inheritProjectContext: true
|
|
39
|
-
inheritSkills: false
|
|
40
|
-
tools: read, grep, find, ls, bash, edit, write
|
|
41
|
-
defaultContext: fork # fresh | fork
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
You are `my-reviewer`. The system prompt goes here.
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Create a new agent
|
|
48
|
-
|
|
49
|
-
### Option A: manually
|
|
50
|
-
Drop a markdown file in `~/.pi/agent/agents/<name>.md` (see schema above). Press `Ctrl+Tab` in pi — it joins the cycle.
|
|
51
|
-
|
|
52
|
-
### Option B: via slash command
|
|
53
|
-
```
|
|
54
|
-
/agent create my-debugger
|
|
55
|
-
```
|
|
56
|
-
You'll be prompted for a one-liner description. Then edit the file to specialize the system prompt.
|
|
57
|
-
|
|
58
|
-
## Test agents
|
|
59
|
-
|
|
60
|
-
| Action | How |
|
|
61
|
-
|---|---|
|
|
62
|
-
| See current + available | `/agent` |
|
|
63
|
-
| Cycle | `Ctrl+Tab` (or `F2`) |
|
|
64
|
-
| Set explicitly | `(n/a — no soly subagent since 1.3.0)` |
|
|
65
|
-
| Diagnose | `/agent doctor` |
|
|
66
|
-
| Recommend for a task | `/agent recommend investigate React Server Components` |
|
|
67
|
-
|
|
68
|
-
The LLM can also auto-pick — see "Task → agent" below.
|
|
69
|
-
|
|
70
|
-
## Task → agent heuristics
|
|
71
|
-
|
|
72
|
-
The LLM's system prompt includes a table mapping task keywords to agents. When the user request matches, the LLM should call `/agent <name>` first, then `subagent({ agent: <name>, ... })`.
|
|
73
|
-
|
|
74
|
-
| Keywords | Agent | Why |
|
|
75
|
-
|---|---|---|
|
|
76
|
-
| scout, scan, map, where is, locate, skim | 🔍 scout | codebase recon |
|
|
77
|
-
| review, audit, check, adversarial, critique, qa | 👀 reviewer | adversarial review |
|
|
78
|
-
| oracle, decision, tradeoff, which approach, drift | 🔮 oracle | decision consistency |
|
|
79
|
-
| implement, build, write code, add feature, debug, fix, test, refactor, document, plan, validate | ⚡ worker | do it yourself using slash commands |
|
|
80
|
-
| (anything else) | ⚡ worker | generic implementation |
|
|
81
|
-
|
|
82
|
-
Same keywords in Russian work (изучи, баг, тест, etc.).
|
|
83
|
-
|
|
84
|
-
## Integration with other extensions
|
|
85
|
-
|
|
86
|
-
- **pi-soly** reads `globalThis.__PI_SWITCH_AGENT__` to know which cycle agent is active. Falls back to `"worker"` if pi-switch isn't loaded.
|
|
87
|
-
- **pi-soly no longer ships a subagent** (removed in 1.3.0). The LLM in the main session executes plans directly using the slash commands + the `soly-framework` skill.
|
|
88
|
-
|
|
89
|
-
## Files
|
|
90
|
-
|
|
91
|
-
- `core.ts` — agent metadata, discovery, cycling, persistence
|
|
92
|
-
- `prompt.ts` — system-prompt section + task→agent heuristics + `recommendAgent`
|
|
93
|
-
- `index.ts` — footer pill, Ctrl+Tab / F2, `/agent` slash command, `/agent create`/`/agent doctor`/`/agent recommend`
|
|
94
|
-
- `tests/core.test.ts` — tests for core logic
|
|
95
|
-
- `tests/prompt.test.ts` — tests for prompt + recommendAgent
|
|
96
|
-
- `tests/index.test.ts` — tests for slash command parsing
|
|
97
|
-
|
|
98
|
-
## Development
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
cd packages/pi-soly/switch
|
|
102
|
-
bun test # switch tests
|
|
103
|
-
bun run typecheck # tsc --noEmit
|
|
104
|
-
```
|