pi-soly 1.9.0 → 1.9.2
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 +162 -87
- package/index.ts +10 -10
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# ⚡ pi-soly
|
|
4
4
|
|
|
5
|
-
**The project management
|
|
5
|
+
**The project management + workflow engine for [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent).**
|
|
6
6
|
|
|
7
|
-
Plans · State ·
|
|
8
|
-
|
|
9
|
-
One `npm install`. Zero config. Pure magic.
|
|
7
|
+
Plans · State · Rules · Multi-question picker. One `npm install`. Zero config.
|
|
10
8
|
|
|
11
9
|
[](https://www.npmjs.com/package/pi-soly)
|
|
12
10
|
[](https://www.npmjs.com/package/pi-soly)
|
|
@@ -14,7 +12,7 @@ One `npm install`. Zero config. Pure magic.
|
|
|
14
12
|
[](https://github.com/lowern1ght/pi-soly/blob/master/LICENSE)
|
|
15
13
|
[](https://bun.sh)
|
|
16
14
|
|
|
17
|
-
[Install](#-install) · [
|
|
15
|
+
[Install](#-install) · [Commands](#-commands) · [Rules & Docs](#-rules--docs) · [Architecture](#-architecture) · [Releases](#-releases)
|
|
18
16
|
|
|
19
17
|
</div>
|
|
20
18
|
|
|
@@ -26,13 +24,15 @@ One `npm install`. Zero config. Pure magic.
|
|
|
26
24
|
pi install npm:pi-soly
|
|
27
25
|
```
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
Restart pi (`/reload`), and you have:
|
|
28
|
+
|
|
29
|
+
- **Project management** — plans, state, phases, decisions
|
|
30
|
+
- **Workflow engine** — `/plan`, `/execute`, `/resume`, `/inspect`, `/discuss`, `/quick`
|
|
31
|
+
- **Mandatory rules** — strict-mode directives injected every turn
|
|
32
|
+
- **Multi-question picker** — `ask_pro` tool for the LLM
|
|
33
|
+
- **Skill-based execution** — LLM reads the `soly-framework` skill on demand
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
- **A multi-question picker** — `ask_pro` tool for the LLM
|
|
33
|
-
- **Live task list + notifications** — see nudge + deprecation warnings as framed Box widgets
|
|
34
|
-
- **A live task list** — `todo_update` tool renders in the footer
|
|
35
|
-
- **7 soly agents** installed on first run
|
|
35
|
+
No agents, no rotors, no mode cycling. The LLM is the executor. You focus on the work.
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -40,45 +40,128 @@ That's it. Restart pi, and you have:
|
|
|
40
40
|
|
|
41
41
|
| Without pi-soly | With pi-soly |
|
|
42
42
|
|---|---|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
43
|
+
| Re-invent plan/state/resume from scratch | `/plan`, `/execute`, `/resume`, `/inspect` ready |
|
|
44
|
+
| Forget rules mid-session | `## ⚠️ MANDATORY` header in every system prompt |
|
|
45
|
+
| Wonder which rules eat context | `/rules stats` — Claude-memory-style breakdown |
|
|
46
|
+
| Wonder which docs eat context | `/docs stats` — same for intent docs |
|
|
47
|
+
| Ask the LLM the same clarifying question 5 times | `ask_pro` multi-question picker |
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## 📋 Commands
|
|
52
|
+
|
|
53
|
+
### Workflow
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
```bash
|
|
56
|
+
/plan # generate PLAN.md for the current phase
|
|
57
|
+
/execute # execute plan directly (LLM does the work)
|
|
58
|
+
/resume # pick up a paused session
|
|
59
|
+
/inspect # show current state summary
|
|
60
|
+
/discuss 3 # talk through decisions before planning phase 3
|
|
61
|
+
/quick "fix typo" # one-shot task with HANDOFF-style context
|
|
62
|
+
```
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
### State inspection (`/soly`)
|
|
56
65
|
|
|
57
66
|
```bash
|
|
58
|
-
/
|
|
59
|
-
/
|
|
60
|
-
/
|
|
61
|
-
/
|
|
62
|
-
/
|
|
67
|
+
/soly # interactive picker (📍📄📋💡🔬🗺️📊📁✅⭐🎯🔄⚙️)
|
|
68
|
+
/soly position # where am I in the plan
|
|
69
|
+
/soly state # current STATE.md content
|
|
70
|
+
/soly roadmap # all phases
|
|
71
|
+
/soly progress # phases/plans/tasks done vs total
|
|
72
|
+
/soly phases # list phases
|
|
73
|
+
/soly plan [N] # show plan for phase N
|
|
63
74
|
```
|
|
64
75
|
|
|
65
|
-
|
|
76
|
+
### Rules & Docs
|
|
66
77
|
|
|
78
|
+
```bash
|
|
79
|
+
/rules # interactive list
|
|
80
|
+
/rules stats # context breakdown (always-on vs glob-matched)
|
|
81
|
+
/rules analytics # token analytics + warnings + duplicates
|
|
82
|
+
/rules show <name> # show rule body
|
|
83
|
+
/rules reload # re-read all rules
|
|
84
|
+
/rules enable <name> / disable <name>
|
|
85
|
+
|
|
86
|
+
/docs stats # context breakdown (inline vs preview vs phase-specific)
|
|
67
87
|
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
└── 01-PLAN.md # ordered steps to execute
|
|
88
|
+
|
|
89
|
+
### Setup
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
/soly-init # scaffold .soly/ (templates: minimal|web-app|library|cli)
|
|
93
|
+
/soly-migrate # atomic .soly/ → .agents/ rename (vendor-neutral)
|
|
94
|
+
/soly-status # one-screen health report
|
|
95
|
+
/soly-log # recent notifications
|
|
77
96
|
```
|
|
78
97
|
|
|
79
|
-
###
|
|
98
|
+
### Debug
|
|
80
99
|
|
|
81
|
-
|
|
100
|
+
```bash
|
|
101
|
+
/why # rules + project state that grounded the last turn
|
|
102
|
+
/rulewizard # interactive guide: rule vs .editorconfig vs linter
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 🧠 Rules & Docs
|
|
108
|
+
|
|
109
|
+
Two system-prompt injections, both **opt-in** and **fully observable**.
|
|
110
|
+
|
|
111
|
+
### Rules — `.soly/rules/` or `~/.soly/rules/`
|
|
112
|
+
|
|
113
|
+
Markdown files with frontmatter. Three modes:
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
---
|
|
117
|
+
description: TypeScript code style
|
|
118
|
+
always: true # loaded every turn
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
Always use `strict` mode. Never use `any`...
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
---
|
|
126
|
+
description: React component rules
|
|
127
|
+
globs: ["**/*.tsx", "**/*.jsx"] # loaded only when prompt mentions matching file
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
Hooks only at top level. Use memo only for expensive renders...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
System prompt injection (every turn, after `before_agent_start`):
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
## ⚠️ MANDATORY: soly project rules
|
|
137
|
+
|
|
138
|
+
**These rules are NON-NEGOTIABLE. Before writing or editing ANY code,
|
|
139
|
+
re-read the rules above that apply to the file path you are about to
|
|
140
|
+
modify. If a rule contradicts your instinct, the rule wins.**
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
See context breakdown anytime: `/rules stats`.
|
|
144
|
+
|
|
145
|
+
### Docs — `.soly/docs/` or `~/.soly/docs/`
|
|
146
|
+
|
|
147
|
+
Zero-point intent docs (your vision, business context). Loaded as **preview only** (180 chars per doc) — cheap. Add `inline: true` to opt-in to full body injection.
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
---
|
|
151
|
+
title: Core principles
|
|
152
|
+
inline: true # full body loaded every turn (expensive!)
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
Our core principles are...
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
See context breakdown: `/docs stats`.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 🎤 Multi-Question Picker
|
|
163
|
+
|
|
164
|
+
`ask_pro` tool for the LLM. Tabbed UI: single-select, multi-select, recommended ⭐, free-text Other.
|
|
82
165
|
|
|
83
166
|
```ts
|
|
84
167
|
ask_pro({
|
|
@@ -94,19 +177,7 @@ ask_pro({
|
|
|
94
177
|
})
|
|
95
178
|
```
|
|
96
179
|
|
|
97
|
-
The LLM
|
|
98
|
-
|
|
99
|
-
```ts
|
|
100
|
-
todo_update({
|
|
101
|
-
todos: [
|
|
102
|
-
{ content: "Read existing config", status: "completed", priority: "high" },
|
|
103
|
-
{ content: "Write new schema", status: "in_progress", priority: "high" },
|
|
104
|
-
{ content: "Add migration", status: "pending", priority: "medium" },
|
|
105
|
-
{ content: "Update tests", status: "pending", priority: "medium" },
|
|
106
|
-
{ content: "Run typecheck", status: "pending", priority: "low" }
|
|
107
|
-
]
|
|
108
|
-
})
|
|
109
|
-
```
|
|
180
|
+
The LLM calls `ask_pro` when it needs structured input. Tab through questions, pick ⭐ options, confirm.
|
|
110
181
|
|
|
111
182
|
---
|
|
112
183
|
|
|
@@ -114,16 +185,15 @@ todo_update({
|
|
|
114
185
|
|
|
115
186
|
```
|
|
116
187
|
┌──────────────────────────────────────────────────────────────┐
|
|
117
|
-
│ pi-coding-agent (peer dep)
|
|
188
|
+
│ pi-coding-agent (peer dep) │
|
|
118
189
|
└────────────────────────┬─────────────────────────────────────┘
|
|
119
190
|
│
|
|
120
191
|
┌────────────────┴────────────────┐
|
|
121
|
-
│ │
|
|
122
192
|
▼ ▼
|
|
123
193
|
┌────────────┐ ┌─────────────┐
|
|
124
|
-
│ ask_pro │ │
|
|
125
|
-
│ picker │ │
|
|
126
|
-
│ (tool) │ │
|
|
194
|
+
│ ask_pro │ │ soly_read │
|
|
195
|
+
│ picker │ │ soly_log_ │
|
|
196
|
+
│ (tool) │ │ decision │
|
|
127
197
|
└────────────┘ └─────────────┘
|
|
128
198
|
│ │
|
|
129
199
|
└─────────────────┬───────────────┘
|
|
@@ -135,48 +205,54 @@ todo_update({
|
|
|
135
205
|
│ /plan /execute │
|
|
136
206
|
│ /resume /inspect│
|
|
137
207
|
│ /discuss /quick │
|
|
208
|
+
│ /soly /why │
|
|
209
|
+
│ /rules /docs │
|
|
138
210
|
└────────┬─────────┘
|
|
139
211
|
│
|
|
140
212
|
┌────────────┼────────────┐
|
|
141
213
|
▼ ▼ ▼
|
|
142
|
-
.soly/STATE phases/<N>/
|
|
143
|
-
(current CONTEXT,
|
|
144
|
-
position) PLAN,
|
|
145
|
-
RESEARCH)
|
|
214
|
+
.soly/STATE phases/<N>/ rules/
|
|
215
|
+
(current CONTEXT, docs/
|
|
216
|
+
position) PLAN, (system
|
|
217
|
+
RESEARCH) prompt)
|
|
146
218
|
│
|
|
147
219
|
▼
|
|
148
220
|
┌──────────────────┐
|
|
149
|
-
│
|
|
150
|
-
│
|
|
221
|
+
│ soly-framework │
|
|
222
|
+
│ SKILL.md │
|
|
151
223
|
│ │
|
|
152
|
-
│
|
|
153
|
-
│
|
|
154
|
-
│
|
|
155
|
-
└────────┬─────────┘
|
|
156
|
-
│
|
|
157
|
-
▼
|
|
158
|
-
┌──────────────────┐
|
|
159
|
-
│ 7 soly agents │
|
|
160
|
-
│ │
|
|
161
|
-
│ worker (cycle) │
|
|
162
|
-
│ soly-debugger │
|
|
163
|
-
│ soly-tester │
|
|
164
|
-
│ soly-reviewer │
|
|
165
|
-
│ soly-refactor │
|
|
166
|
-
│ soly-documenter │
|
|
167
|
-
│ soly-oracle │
|
|
224
|
+
│ LLM loads on │
|
|
225
|
+
│ demand \u2014 no │
|
|
226
|
+
│ subagent layer │
|
|
168
227
|
└──────────────────┘
|
|
169
228
|
```
|
|
170
229
|
|
|
230
|
+
State lives in `.soly/` — portable, git-friendly, human-readable. Migrate to vendor-neutral `.agents/` with `/soly-migrate` (both supported, `.soly/` shows deprecation warning).
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
.soly/
|
|
234
|
+
├── ROADMAP.md # phase table
|
|
235
|
+
├── STATE.md # current position + decisions log
|
|
236
|
+
├── docs/ # 0-point intent docs (preview-loaded)
|
|
237
|
+
├── rules/ # rules (glob-matched or always-on)
|
|
238
|
+
└── phases/
|
|
239
|
+
└── 01-foundation/
|
|
240
|
+
├── 01-CONTEXT.md # domain + decisions for this phase
|
|
241
|
+
├── 01-RESEARCH.md # what we looked up
|
|
242
|
+
└── 01-PLAN.md # ordered steps to execute
|
|
243
|
+
```
|
|
244
|
+
|
|
171
245
|
---
|
|
172
246
|
|
|
173
|
-
## 📚
|
|
247
|
+
## 📚 Events
|
|
174
248
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
249
|
+
| Event | When | What we do |
|
|
250
|
+
|---|---|---|
|
|
251
|
+
| `session_start` | session opens | Install `soly-framework` skill, build initial state |
|
|
252
|
+
| `before_agent_start` | every turn | Inject rules + docs sections into system prompt |
|
|
253
|
+
| `tool_call` (edit/write) | LLM edits file | Track edited files (silent — used by `/why`) |
|
|
254
|
+
| `turn_end` | turn finishes | Refresh rules/state, hot-reload changes |
|
|
255
|
+
| `session_shutdown` | session closes | Flush iterators, cleanup |
|
|
180
256
|
|
|
181
257
|
---
|
|
182
258
|
|
|
@@ -198,7 +274,7 @@ bun install
|
|
|
198
274
|
### Test + typecheck
|
|
199
275
|
|
|
200
276
|
```bash
|
|
201
|
-
bun test #
|
|
277
|
+
bun test # 366 tests across 24 files
|
|
202
278
|
bun run typecheck # tsc --noEmit
|
|
203
279
|
bun run ci # both
|
|
204
280
|
```
|
|
@@ -217,10 +293,9 @@ pi install ./packages/pi-soly
|
|
|
217
293
|
Tag-based, fully automated. Push a `pi-soly-v*` tag, get a publish.
|
|
218
294
|
|
|
219
295
|
```bash
|
|
220
|
-
./scripts/release.sh pi-soly
|
|
221
|
-
git push origin master
|
|
296
|
+
./scripts/release.sh pi-soly 1.9.1
|
|
222
297
|
git push github master
|
|
223
|
-
git push github pi-soly-
|
|
298
|
+
git push github pi-soly-v1.9.1 --force
|
|
224
299
|
```
|
|
225
300
|
|
|
226
301
|
CI runs on a self-hosted GitHub Actions runner:
|
|
@@ -256,4 +331,4 @@ MIT — see [LICENSE](LICENSE).
|
|
|
256
331
|
|
|
257
332
|
[⭐ Star on GitHub](https://github.com/lowern1ght/pi-soly) · [📦 View on npm](https://www.npmjs.com/package/pi-soly) · [🐛 Report a bug](https://github.com/lowern1ght/pi-soly/issues)
|
|
258
333
|
|
|
259
|
-
</div>
|
|
334
|
+
</div>
|
package/index.ts
CHANGED
|
@@ -128,6 +128,8 @@ export default function solyExtension(pi: ExtensionAPI) {
|
|
|
128
128
|
// Behavioral nudge state
|
|
129
129
|
let nudgeActiveForTask = false;
|
|
130
130
|
let editedFilesThisTurn = new Set<string>();
|
|
131
|
+
let lastEditedFiles: string[] = [];
|
|
132
|
+
let lastTurnApplicableRules: string[] = [];
|
|
131
133
|
let lastNudgePromptKey = "";
|
|
132
134
|
|
|
133
135
|
// Git context (cached, refreshed on hot reload + before_agent_start)
|
|
@@ -432,6 +434,9 @@ export default function solyExtension(pi: ExtensionAPI) {
|
|
|
432
434
|
nudgeActiveForTask = false;
|
|
433
435
|
lastNudgePromptKey = "";
|
|
434
436
|
sessionStats = { turns: 0, tokensEstimate: 0 };
|
|
437
|
+
editedFilesThisTurn = new Set();
|
|
438
|
+
lastEditedFiles = [];
|
|
439
|
+
lastTurnApplicableRules = [];
|
|
435
440
|
|
|
436
441
|
// Read git context (best-effort, silent on failure)
|
|
437
442
|
gitContext = await readGitContext(ctx.cwd);
|
|
@@ -715,19 +720,14 @@ export default function solyExtension(pi: ExtensionAPI) {
|
|
|
715
720
|
}
|
|
716
721
|
|
|
717
722
|
// Post-work rules check: surface applicable rules for files edited
|
|
718
|
-
// in this turn.
|
|
719
|
-
//
|
|
723
|
+
// in this turn. Tracking is kept silent (no chat notify — user feedback:
|
|
724
|
+
// "spammy") but data is preserved for /why to show last-turn rule context.
|
|
720
725
|
if (editedFilesThisTurn.size > 0) {
|
|
721
|
-
|
|
726
|
+
lastEditedFiles = [...editedFilesThisTurn];
|
|
727
|
+
lastTurnApplicableRules = rulesApplicableToFiles(
|
|
722
728
|
combinedRules(),
|
|
723
|
-
|
|
729
|
+
lastEditedFiles,
|
|
724
730
|
);
|
|
725
|
-
if (applicable.length > 0) {
|
|
726
|
-
ctx.ui.notify(
|
|
727
|
-
`📋 Rules check: edited ${editedFilesThisTurn.size} file(s), ${applicable.length} rule(s) applied:\n • ${applicable.join("\n • ")}`,
|
|
728
|
-
"info",
|
|
729
|
-
);
|
|
730
|
-
}
|
|
731
731
|
editedFilesThisTurn = new Set();
|
|
732
732
|
}
|
|
733
733
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-soly",
|
|
3
|
-
"version": "1.9.
|
|
4
|
-
"description": "Project management
|
|
3
|
+
"version": "1.9.2",
|
|
4
|
+
"description": "Project management + workflow engine for pi-coding-agent. Plans, state, MANDATORY rules, multi-question picker — one npm install, zero config. LLM is the executor (no subagent layer).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -49,11 +49,10 @@
|
|
|
49
49
|
"pi-package",
|
|
50
50
|
"project-management",
|
|
51
51
|
"planning",
|
|
52
|
-
"subagents",
|
|
53
52
|
"multi-question",
|
|
54
|
-
"agent-switcher",
|
|
55
|
-
"task-list",
|
|
56
53
|
"workflow-engine",
|
|
54
|
+
"rules-engine",
|
|
55
|
+
"intent-docs",
|
|
57
56
|
"ai-coding"
|
|
58
57
|
],
|
|
59
58
|
"license": "MIT",
|