pi-soly 2.2.2 → 2.2.4

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.
@@ -0,0 +1,68 @@
1
+ # `.assets/`
2
+
3
+ Visual assets used by the top-level `README.md` (and any other doc that
4
+ references `./packages/pi-soly/.assets/<file>`).
5
+
6
+ ## Files (PNGs only — no GIFs, no asciinema)
7
+
8
+ | File | Used in | Status |
9
+ |---|---|---|
10
+ | `banner.png` | Top of README (hero) | TODO — see spec below |
11
+ | `soly-picker.png` | "Quick start" section caption | TODO |
12
+ | `ask-pro.png` | "Rules & Docs" section | TODO |
13
+ | `decision-deck.png` | "Rules & Docs" section | TODO |
14
+ | `soly-settings.png` | "Settings" section | TODO |
15
+
16
+ ## Brand invariants (apply to all assets)
17
+
18
+ - **Palette**: dark theme. Background `#1a1a1a` · text `#e0e0e0` ·
19
+ accent (yellow-400) `#fbbf24` · dim `#666666`.
20
+ - **Typeface**: monospace. JetBrains Mono, Fira Code, or system mono.
21
+ - **Iconography**: ⚡ bolt, BMP glyphs only. No emoji / VS16
22
+ sequences (they mis-measure and ghost the panel).
23
+ - **No OS-specific paths** in screenshots — strip `/Users/...`,
24
+ `C:\...`, etc.
25
+
26
+ ## Specs (one per asset)
27
+
28
+ ### `banner.png`
29
+ - 1280×400 PNG, transparent or `#1a1a1a` background
30
+ - Center: ⚡ + "soly" wordmark + tagline "Plans · State · MANDATORY rules"
31
+ - Right side: schematic of `soly new → execute → done` arrows, or
32
+ stylized TUI fragment showing `/sly` modal
33
+ - Alt text for the README link: "pi-soly — workflow engine for pi"
34
+
35
+ ### `soly-picker.png`
36
+ - 1000×600 PNG
37
+ - Terminal screenshot showing the `/sly` modal with the three groups
38
+ (Status / Inspect / Manage) populated
39
+ - Cursor on an item, preview pane shows the live preview
40
+ - Header right: "X phases · Y% · /sly /s"
41
+
42
+ ### `ask-pro.png`
43
+ - 1000×400 PNG
44
+ - Terminal screenshot showing the `ask_pro` multi-question picker
45
+ - Tabs at the top (1/2/3), one question's options visible with the
46
+ ⭐ recommended row highlighted
47
+ - Preview pane empty or showing the current question's context
48
+
49
+ ### `decision-deck.png`
50
+ - 1000×600 PNG
51
+ - Terminal screenshot showing the `decision_deck` full-screen cards
52
+ - One card fully expanded with code preview; recommended ⭐ visible
53
+
54
+ ### `soly-settings.png`
55
+ - 1000×600 PNG
56
+ - Terminal screenshot showing the `/sly settings` interactive editor
57
+ - Cursor on a toggle, footer showing the +/- action keys
58
+ - One group expanded (e.g. "Agent") with the recommended option
59
+ marked ⭐
60
+
61
+ ## Workflow
62
+
63
+ 1. You (designer) make the assets in this directory
64
+ 2. `git add .assets/`
65
+ 3. The README references are already wired — no further changes
66
+ 4. Re-run `bun test` (the e2e install test checks the tarball
67
+ integrity — it should pass since `.assets/` is in
68
+ `package.json#files`)
Binary file
package/README.md CHANGED
@@ -2,414 +2,228 @@
2
2
 
3
3
  # ⚡ pi-soly
4
4
 
5
- **The project management + workflow engine for [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent).**
6
-
7
- Plans · State · Rules · Multi-question picker. One `npm install`. Zero config.
5
+ ### Project management + workflow engine for [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent)
8
6
 
9
7
  [![npm version](https://img.shields.io/npm/v/pi-soly.svg)](https://www.npmjs.com/package/pi-soly)
10
8
  [![npm downloads](https://img.shields.io/npm/dm/pi-soly.svg)](https://www.npmjs.com/package/pi-soly)
11
9
  [![CI](https://img.shields.io/github/actions/workflow/status/lowern1ght/pi-soly/ci.yml)](https://github.com/lowern1ght/pi-soly/actions)
12
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/lowern1ght/pi-soly/blob/master/LICENSE)
13
- [![Built with Bun](https://img.shields.io/badge/Built_with-Bun-f9f1e1?logo=bun)](https://bun.sh)
14
11
 
15
- [Install](#-install) · [Commands](#-commands) · [Rules & Docs](#-rules--docs) · [Architecture](#-architecture) · [Releases](#-releases)
12
+ [Install](#install) · [Commands](#commands) · [Rules & Docs](#rules--docs) · [Architecture](#architecture) · [Releases](#releases)
16
13
 
17
14
  </div>
18
15
 
19
- ---
20
-
21
- ## ⚡ Install
22
-
23
- ```bash
24
- pi install npm:pi-soly
25
- ```
26
-
27
- Restart pi (`/reload`), and you have:
28
-
29
- - **Project management** — plans, state, phases, decisions
30
- - **Workflow engine** — runs inline (no subagent plugin). The model proposes the next step and drives it via the `soly_workflow` tool on your plain-language intent; the verbs `soly discuss` · `plan` · `execute` · `verify` · `pause`/`resume` still work as text
31
- - **Self-review loop** — `soly verify` re-reviews the work until "No issues found."
32
- - **Goal-aware verification** — at the end of every `soly execute` (task / plan / phase plan-level), the worker reads PLAN.md's `## Goal` + `## Acceptance` and judges each item against `git diff`. A `## Status` section is appended to PLAN.md with a PASS / BLOCKED verdict. On `BLOCKED` the worker halts before calling `soly done` — so you can't ship a plan whose goal isn't actually met.
33
- - **Visual chrome** — native footer, equalizer working spinner with live telemetry, gradient welcome banner
34
- - **Rules & docs modal** — `/rules` and `/docs` open a fuzzy list + preview panel (no chat dumps)
35
- - **Mandatory rules** — strict-mode directives injected every turn
36
- - **Multi-question picker** — `ask_pro` tool for the LLM (single/multi-select, free-text, skip)
37
- - **Decision deck** — `decision_deck` tool: full-screen TUI cards for comparing design options by code shape
38
- - **HTML artifacts** — `html_artifact` tool serves self-contained HTML from a per-session browser gallery (live-updating, one stable URL)
39
- - **Skill-based execution** — LLM reads the `soly-framework` skill on demand
40
-
41
- The LLM drives execution **inline, in the main session** — no external subagent plugin. Say what you want in plain language ("let's plan this", "start executing") and the model calls the first-party `soly_workflow` tool for you; the `soly <verb>` text form still works as a fallback. You focus on the work.
42
-
43
- ### Known install issue (upstream `pi install`)
44
-
45
- `pi install` currently does **not** install transitive `peerDependencies` (it skips them the way `--omit=optional` would). pi-soly's MCP stack depends on `@modelcontextprotocol/ext-apps`, which in turn peer-requires `@modelcontextprotocol/sdk` (declared non-optional upstream). After `pi install npm:pi-soly` you may see:
46
-
47
- ```
48
- Error: Cannot find module '@modelcontextprotocol/sdk/types.js'
49
- Require stack:
50
- - ~/.pi/agent/npm/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js
51
- ```
52
-
53
- **Workaround** (one-time, after each `pi install` of pi-soly or any pi-soly-related upgrade):
54
-
55
- ```bash
56
- cd ~/.pi/agent/npm && npm install
57
- ```
58
-
59
- This makes plain npm resolve the transitive peer deps that `pi install` skipped. After this, restart pi (`/reload`) and the MCP features work.
16
+ ![banner](./packages/pi-soly/.assets/banner.png)
60
17
 
61
- Tracked upstream fix is expected on the pi side, not here.
18
+ > Plans · State · MANDATORY rules · Self-review · Multi-question picker.
19
+ > One `npm install`. Zero config. LLM drives the workflow inline.
62
20
 
63
21
  ---
64
22
 
65
- ## 🎯 Why pi-soly?
66
-
67
- | Without pi-soly | With pi-soly |
68
- |---|---|
69
- | Re-invent plan/state/resume from scratch | `/plan`, `/execute`, `/resume`, `/inspect` ready |
70
- | Forget rules mid-session | `## ⚠️ MANDATORY` header in every system prompt |
71
- | Wonder which rules eat context | `/rules stats` — Claude-memory-style breakdown |
72
- | Wonder which docs eat context | `/docs stats` — same for intent docs |
73
- | Ask the LLM the same clarifying question 5 times | `ask_pro` multi-question picker |
74
-
75
- ---
76
-
77
- ## 📋 Commands
78
-
79
- ### Workflow — plain-text verbs (type `soly <verb>`, not slash)
23
+ ## What it is
80
24
 
81
- ```bash
82
- # === Plan mode (recommended for new work — each plan is a git branch) ===
83
- soly new feat/auth-jwt # create branch + .agents/plans/<name>/ + stub PLAN.md
84
- soly discuss feat/auth-jwt # interactive discussion of the plan
85
- soly plan feat/auth-jwt # flesh out PLAN.md via ask_pro
86
- soly execute feat/auth-jwt # execute the plan inline in this session
87
- soly done feat/auth-jwt # commit, push, open draft PR via gh
88
- soly verify # self-review loop until "No issues found." (soly verify stop to exit)
89
- soly pause # save a handoff; soly resume to pick it back up
90
- soly status # current position + progress (no LLM round-trip)
91
-
92
- # === Phase mode (legacy — still works for existing projects) ===
93
- soly plan 3 # generate PLAN.md for phase 3 (numeric form)
94
- soly execute 3 # execute phase 3 (or `soly execute 3.02` for one plan)
95
- soly migrate phases-to-plans # one-shot: import each .agents/phases/<NN>-slug/plans/PLAN.md
96
- # as a `migrate/legacy-<NN>-slug` branch with .agents/plans/legacy-<NN>-slug/PLAN.md
97
- ```
25
+ pi-soly turns a plain pi-coding-agent session into a structured project:
26
+ **plans** become git branches, **state** lives in `.agents/STATE.md` (visible
27
+ to the LLM every turn), and **rules** load automatically into a
28
+ `## ⚠️ MANDATORY` block in the system prompt. Workflows (plan / execute /
29
+ verify / pause / resume) are first-class slash commands no LLM round-trip
30
+ needed, no external subagent plugin.
98
31
 
99
- > **Why plans instead of phases?** A global phase counter (1, 2, 3, ...) means two
100
- > developers each starting a "phase 11" write to the same path. With plans, each
101
- > is a git branch (`feat/auth-jwt`, `fix/login-redirect`, …) with its own
102
- > `.agents/plans/<name>/PLAN.md` — no collisions, clean isolation, and the branch
103
- > list itself is the registry of what's in flight.
32
+ The LLM doesn't drive the workflow *you* do, via `/sly` /
33
+ `soly new` / `soly execute`. The LLM is the executor inside that frame,
34
+ following the rules and writing to the agreed paths.
104
35
 
105
- ### State inspection (`/soly`)
36
+ ## Install
106
37
 
107
38
  ```bash
108
- /soly # interactive modal picker (live preview per item, ⏎ to open)
109
- /soly position # where am I in the plan
110
- /soly state # current STATE.md content
111
- /soly roadmap # all phases
112
- /soly progress # phases/plans/tasks done vs total
113
- /soly phases # list phases
114
- /soly plan [N] # show plan for phase N
115
- ```
116
-
117
- ### Rules & Docs
118
-
119
- ```bash
120
- /rules # interactive list
121
- /rules stats # context breakdown (always-on vs glob-matched)
122
- /rules analytics # token analytics + warnings + duplicates
123
- /rules show <name> # show rule body
124
- /rules reload # re-read all rules
125
- /rules enable <name> / disable <name>
126
-
127
- /docs stats # context breakdown (inline vs preview vs phase-specific)
39
+ pi install npm:pi-soly
128
40
  ```
129
41
 
130
- ### Setup
42
+ That registers the extension in your current pi session. Restart pi
43
+ (`/reload` won't work for a fresh install — you need a session restart
44
+ to pick up the new package's `session_start` event), then:
131
45
 
132
46
  ```bash
133
- /soly init # scaffold .agents/ (templates: minimal|web-app|library|cli)
134
- /soly-status # one-screen health report
135
- /soly-log # recent notifications
47
+ # inside a pi session:
48
+ /sly # open the project picker (aliases: /soly, /s)
49
+ /sly init # scaffold a new project (.agents/, docs/, rules/)
136
50
  ```
137
51
 
138
- ### Debug
52
+ ### Manual install (no `pi`)
139
53
 
140
54
  ```bash
141
- /why # rules + project state that grounded the last turn
142
- /rulewizard # interactive guide: rule vs .editorconfig vs linter
143
- ```
144
-
145
- ---
146
-
147
- ## 🧠 Rules & Docs
148
-
149
- Two system-prompt injections, both **opt-in** and **fully observable**.
150
-
151
- ### Rules — `.agents/rules/` or `~/.agents/rules/`
152
-
153
- Markdown files with frontmatter. Three modes:
154
-
155
- ```markdown
156
- ---
157
- description: TypeScript code style
158
- always: true # loaded every turn
159
- ---
160
-
161
- Always use `strict` mode. Never use `any`...
55
+ cd ~/.pi/agent/npm
56
+ npm install pi-soly
162
57
  ```
163
58
 
164
- ```markdown
165
- ---
166
- description: React component rules
167
- globs: ["**/*.tsx", "**/*.jsx"] # loaded only when prompt mentions matching file
168
- ---
59
+ Then add `"pi-soly"` to your project's `~/.pi/agent/extensions.json` (or
60
+ just to `.pi/extensions.json` for project-local).
169
61
 
170
- Hooks only at top level. Use memo only for expensive renders...
171
- ```
172
-
173
- System prompt injection (every turn, after `before_agent_start`):
174
-
175
- ```markdown
176
- ## ⚠️ MANDATORY: soly project rules
62
+ ## Quick start
177
63
 
178
- **These rules are NON-NEGOTIABLE. Before writing or editing ANY code,
179
- re-read the rules above that apply to the file path you are about to
180
- modify. If a rule contradicts your instinct, the rule wins.**
64
+ ```text
65
+ # 1. Start a project
66
+ /sly init
67
+ # 2. Scaffold a plan
68
+ soly new feat/auth-jwt
69
+ # 3. Discuss / flesh out the plan (interactive)
70
+ /sly
71
+ → click "plan" → /sly fills out PLAN.md via ask_pro
72
+ # 4. Execute (the LLM runs the plan, follows rules, writes SUMMARY.md)
73
+ soly execute feat/auth-jwt
74
+ # 5. Self-review until clean
75
+ soly verify
76
+ # 6. Commit + push + open draft PR
77
+ soly done feat/auth-jwt
181
78
  ```
182
79
 
183
- See context breakdown anytime: `/rules stats`.
184
-
185
- ### Docs — `.agents/docs/` or `~/.agents/docs/`
186
-
187
- 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.
80
+ ![sly picker](./packages/pi-soly/.assets/soly-picker.png)
188
81
 
189
- ```markdown
190
- ---
191
- title: Core principles
192
- inline: true # full body loaded every turn (expensive!)
193
- ---
82
+ ## Commands
194
83
 
195
- Our core principles are...
196
- ```
84
+ | Slash command | Plain-text verb | What it does |
85
+ |---|---|---|
86
+ | `/sly` · `/soly` · `/s` | `soly <sub>` | Project state inspection + picker (Status / Inspect / Manage groups) |
87
+ | `/rules` | — | Toggle / disable / reload rules; show token breakdown |
88
+ | `/docs` | — | Toggle / show intent docs |
89
+ | `/why` | — | What rules + state grounded the LLM's last turn |
90
+ | `/artifacts` | — | Browse this session's `html_artifact` gallery |
91
+ | `/rulewizard` | — | Decide whether a constraint should be a rule, .editorconfig, or linter |
92
+ | `/sly settings` | — | Interactive config editor (toggles, enums, numbers) |
93
+
94
+ | Text verb | What it does |
95
+ |---|---|
96
+ | `soly init` | Scaffold `.agents/` (templates: minimal / web-app / library / cli) |
97
+ | `soly new <slug>` | Create branch + `.agents/plans/<slug>/PLAN.md` |
98
+ | `soly discuss <slug>` | Interactive discussion of a plan (uses `ask_pro`) |
99
+ | `soly plan <slug>` | Fill out `PLAN.md` via `ask_pro` |
100
+ | `soly execute <slug>` | Run the plan (production commits → SUMMARY.md → `status: done`) |
101
+ | `soly verify [N]` | Self-review loop until "No issues found" (max N; `soly verify stop`) |
102
+ | `soly pause` · `soly resume` | Save / restore a HANDOFF.json snapshot |
103
+ | `soly status` · `soly log` | Read-only, no LLM round-trip |
104
+ | `soly done <slug>` | Commit + push + open draft PR via `gh` |
197
105
 
198
- See context breakdown: `/docs stats`.
106
+ ## Rules & Docs
199
107
 
200
- ---
108
+ **Rules** are markdown files with optional frontmatter. Two locations,
109
+ project wins over global:
201
110
 
202
- ## 🎤 Multi-Question Picker
203
-
204
- `ask_pro` tool for the LLM. Tabbed UI: single-select, multi-select, recommended ⭐, free-text Other.
205
-
206
- ```ts
207
- ask_pro({
208
- questions: [{
209
- header: "Auth",
210
- question: "How should we store the OAuth refresh token?",
211
- options: [
212
- { label: "Encrypted in SQLite", description: "Survives restart, single-device.", recommended: true },
213
- { label: "OS keychain", description: "Native, multi-device via iCloud." },
214
- { label: "Plain env var", description: "Simplest, dev only." }
215
- ]
216
- }]
217
- })
111
+ ```text
112
+ .agents/rules/ # project — version-controlled
113
+ ~/.agents/rules/ # global per-user
114
+ .agents/rules.local/ # project-local — gitignored
218
115
  ```
219
116
 
220
- The LLM calls `ask_pro` when it needs structured input. Tab through questions, pick ⭐ options, confirm.
221
- Per-option `preview` shows a side panel (fenced code is syntax-highlighted); `freeText: true` makes a typed-answer question; multi-select takes `minSelect`/`maxSelect`; press `s` to skip a question.
117
+ Glob-scoped rules load conditionally (only when the prompt mentions
118
+ matching file paths). `always: true` rules load every turn. See the
119
+ `.agents/rules/` directory in your soly project for live examples.
222
120
 
223
- ---
121
+ ![ask_pro picker](./packages/pi-soly/.assets/ask-pro.png)
224
122
 
225
- ## 🃏 Decision Deck
123
+ The `ask_pro` multi-question picker is built into the extension — the
124
+ LLM uses it (not the LLM-driven `soly_ask_user`) for `discuss` flow
125
+ when the config flag `agent.preferAskPro: true` is set. Single-pick
126
+ options get a ⭐ recommended default, multi-select supports
127
+ `min/max` bounds, every options question has a free-text "Other…"
128
+ escape hatch.
226
129
 
227
- `decision_deck` tool for the LLM. A full-screen TUI deck — one framed card per option, each with a syntax-highlighted code snippet and pros/cons — for design/architecture forks where the choice hinges on seeing the concrete shape, not a label.
130
+ ![decision deck](./packages/pi-soly/.assets/decision-deck.png)
228
131
 
229
- ```ts
230
- decision_deck({
231
- title: "State management",
232
- prompt: "How should modules communicate?",
233
- options: [
234
- { title: "Direct calls", summary: "Call modules directly.", pros: ["simple"], cons: ["coupling"] },
235
- { title: "Event bus", code: "const bus = new Bus()\nbus.emit('x')", lang: "ts",
236
- pros: ["decoupled"], cons: ["harder to trace"], recommended: true }
237
- ]
238
- })
239
- ```
132
+ The `decision_deck` is for architectural forks — when the LLM needs
133
+ to compare global-shape options by code, not by paragraph. Full-screen
134
+ cards, side-by-side previews, ⭐ marks the recommended.
240
135
 
241
- Flip cards with ←/→ (or 1-N), choose with Enter, Esc to cancel. Native TUI — no browser, no server.
136
+ ## The mandatory block
242
137
 
243
- ---
138
+ Every system prompt gets a `## ⚠️ MANDATORY: soly project rules`
139
+ section injected after the user's prompt. The LLM is told, in plain
140
+ text: these rules are non-negotiable; if a rule contradicts the
141
+ LLM's instinct, the rule wins.
244
142
 
245
- ## 🖼 HTML Artifacts
143
+ ```text
144
+ ## ⚠️ MANDATORY: soly project rules
246
145
 
247
- `html_artifact` tool for the LLM — soly's local "artifacts". Renders HTML (a full document or just body content, themed light/dark) and serves it from a **per-session gallery SPA** — a sidebar of every artifact this session, an iframe viewer, a filter box, a light/dark toggle, and live SSE updates — on one stable localhost URL, opened in your browser. Pass `id` to update an artifact in place; pass `assets` to write sibling files (images/css/json) the HTML references; restyle everything via `.agents/artifact-theme.css`. (Falls back to opening the file directly if the server is disabled.)
146
+ **These rules are NON-NEGOTIABLE. If a rule contradicts
147
+ your instinct, the rule wins.**
248
148
 
249
- ```ts
250
- html_artifact({
251
- title: "API examples",
252
- html: "<h2>Usage</h2><pre><code>client.send(msg)</code></pre>"
253
- })
149
+ ### [soly] {10} temp-files.md
150
+ # Temporary Files Rule
151
+ > **OS-aware temp paths.** Never hardcode `/tmp` — use `os.tmpdir()` …
254
152
  ```
255
153
 
256
- Use it when a visual, rendered result beats terminal text (example galleries, comparisons, diagrams). The gallery URL lives only while the pi session runs. **`/artifacts`** reopens the gallery anytime (modal: Enter opens an artifact, `g` the gallery, `x` delete, `/artifacts clear` clears); a `▦ N` footer indicator shows the live count. Config under `artifacts` (`open`, `dir`, `server`, `theme`, `retentionDays`).
257
-
258
- ---
259
-
260
- ## 🏗 Architecture
154
+ Built-in rules (the `soly` sourceLabel) ship with the extension and have
155
+ highest priority — user rules can't override them. `/sly settings` is
156
+ the interactive config editor that drives everything else.
261
157
 
262
- ```
263
- ┌──────────────────────────────────────────────────────────────┐
264
- │ pi-coding-agent (peer dep) │
265
- └────────────────────────┬─────────────────────────────────────┘
266
-
267
- ┌────────────────┴────────────────┐
268
- ▼ ▼
269
- ┌────────────┐ ┌─────────────┐
270
- │ ask_pro │ │ soly_read │
271
- │ picker │ │ soly_log_ │
272
- │ (tool) │ │ decision │
273
- └────────────┘ └─────────────┘
274
- │ │
275
- └─────────────────┬───────────────┘
276
-
277
-
278
- ┌──────────────────┐
279
- │ Workflow engine │
280
- │ │
281
- │ /plan /execute │
282
- │ /resume /inspect│
283
- │ /discuss /quick │
284
- │ /soly /why │
285
- │ /rules /docs │
286
- └────────┬─────────┘
287
-
288
- ┌────────────┼────────────┐
289
- ▼ ▼ ▼
290
- .agents/STATE phases/<N>/ rules/
291
- (current CONTEXT, docs/
292
- position) PLAN, (system
293
- RESEARCH) prompt)
294
-
295
-
296
- ┌──────────────────┐
297
- │ soly-framework │
298
- │ SKILL.md │
299
- │ │
300
- │ LLM loads on │
301
- │ demand \u2014 no │
302
- │ subagent layer │
303
- └──────────────────┘
304
- ```
158
+ ![settings panel](./packages/pi-soly/.assets/soly-settings.png)
305
159
 
306
- State lives in `.agents/` — portable, git-friendly, human-readable.
160
+ ## Architecture
307
161
 
308
- ```
309
- .agents/
310
- ├── ROADMAP.md # phase table
311
- ├── STATE.md # current position + decisions log
312
- ├── docs/ # 0-point intent docs (preview-loaded)
313
- ├── rules/ # rules (glob-matched or always-on)
314
- └── phases/
315
- └── 01-foundation/
316
- ├── 01-CONTEXT.md # domain + decisions for this phase
317
- ├── 01-RESEARCH.md # what we looked up
318
- └── tasks/ # unified model: one dir per task
319
- └── auth-login-a3f9/
320
- ├── PLAN.md # frontmatter: id, kind, status, depends-on
321
- └── SUMMARY.md
162
+ ```text
163
+ ┌─────────────────────────────────────────┐
164
+ │ pi-coding-agent │
165
+ │ ┌────────────────────────────────────┐ │
166
+ user input ─────► │ │ soly extension │ │ ───► LLM
167
+ │ │ • session_start → load state │ │
168
+ │ │ • agent_start → inject rules │ │
169
+ /sly ────────────►│ │ • slash commands /sly, /rules, ... │ │
170
+ soly new ────────► │ │ • soly_workflow tool (LLM-side) │ │
171
+ │ │ • built-in rules (soly/*) │ │
172
+ │ │ • visual chrome (top bar, footer) │ │
173
+ │ └────────────────────────────────────┘ │
174
+ │ ┌────────────────────────────────────┐ │
175
+ │ │ .agents/ (project state) │ │
176
+ │ │ STATE.md ROADMAP.md plans/ │ │
177
+ │ │ rules/ docs/ iterations/ │ │
178
+ │ └────────────────────────────────────┘ │
179
+ └─────────────────────────────────────────┘
322
180
  ```
323
181
 
324
- > Legacy projects (standalone `NN-MM-PLAN.md` files / a `features/` dir) still load and run alongside the unified `phases/<N>/tasks/` layout.
182
+ State lives in `.agents/`. Files are plain markdown, git-friendly,
183
+ human-readable. The LLM reads them, the extension writes them, the
184
+ chrome shows them. No external DB, no migrations, no lock file.
325
185
 
326
- ---
186
+ For event names and the full dependency list, see
187
+ [Architecture](packages/pi-soly/.docs/architecture.md).
327
188
 
328
- ## 📚 Events
189
+ ## Releases
329
190
 
330
- | Event | When | What we do |
331
- |---|---|---|
332
- | `session_start` | session opens | Install `soly-framework` skill, build initial state |
333
- | `before_agent_start` | every turn | Inject rules + docs sections into system prompt |
334
- | `tool_call` (edit/write) | LLM edits file | Track edited files (silent used by `/why`) |
335
- | `turn_end` | turn finishes | Refresh rules/state, hot-reload changes |
336
- | `session_shutdown` | session closes | Flush iterators, cleanup |
337
-
338
- ---
191
+ | Version | Highlights |
192
+ |---|---|
193
+ | **2.2.2** | `.soly/` legacy removed; `.agents/` is the only path |
194
+ | **2.2.1** | `commands.ts` split into per-command modules; `release-discipline.md` built-in rule |
195
+ | **2.2.0** | Grouped `/sly` picker (Status / Inspect / Manage); interactive `/sly settings`; aliases `/sly` / `/s` |
196
+ | **2.1.5** | Dedicated `## 🔒 Built-in rules (shipped with soly)` system-prompt block |
197
+ | **2.1.4** | Built-in rules system (first rule: `temp-files.md` — never hardcode `/tmp`) |
198
+ | **2.1.3** | `ask_pro` read-only summary view before submit |
199
+ | **2.1.2** | Info / warning notifications silenced — only errors fire |
200
+ | **2.1.1** | Goal-aware verification at end of execute |
201
+ | **2.0.x → 2.1.0** | `soly_workflow` first-party tool; `soly migrate` verb; `~/.agents/` global config |
339
202
 
340
- ## 🛠 Development
203
+ Full history: [CHANGELOG.md](./CHANGELOG.md).
341
204
 
342
- ### Requirements
205
+ ## Compatibility
343
206
 
344
- - [Bun](https://bun.sh) 1.3
345
- - [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent) 0.78
207
+ - **pi-coding-agent** `>= 0.78`
208
+ - **Node** `>= 20` (we test on 24)
209
+ - **Bun** `>= 1.3` for dev — `bun test`, `bun run typecheck`
210
+ - **npm** `>= 8` for the published package
211
+ - **No OS-specific code** — works on macOS / Linux / Windows (uses
212
+ `os.tmpdir()` etc., never hardcodes `/tmp`)
346
213
 
347
- ### Setup
214
+ ## Development
348
215
 
349
216
  ```bash
350
217
  git clone https://github.com/lowern1ght/pi-soly.git
351
218
  cd pi-soly
352
219
  bun install
220
+ bun test # all 600+ tests
221
+ bun run typecheck # tsc --noEmit, both packages
353
222
  ```
354
223
 
355
- ### Test + typecheck
356
-
357
- ```bash
358
- bun test # run the test suite
359
- bun run typecheck # tsc --noEmit
360
- bun run ci # both
361
- ```
362
-
363
- ### Live-reload in pi
364
-
365
- ```bash
366
- pi install ./packages/pi-soly
367
- # edit files → /reload in pi to pick up changes
368
- ```
369
-
370
- ---
371
-
372
- ## 🚢 Releases
373
-
374
- Tag-based, fully automated. Push a `pi-soly-v*` tag, get a publish.
375
-
376
- ```bash
377
- ./scripts/release.sh pi-soly 1.9.1
378
- git push github master
379
- git push github pi-soly-v1.9.1 --force
380
- ```
381
-
382
- CI runs on a self-hosted GitHub Actions runner:
383
-
384
- | Trigger | Job | Action |
385
- |---|---|---|
386
- | Push to `master` | `test` | `bun install` + `bun test` + `bun run typecheck` |
387
- | PR to `master` | `test` | same |
388
- | Push tag `pi-soly-v*` | `test` → `publish` | tests + `npm publish` to npmjs |
389
-
390
- The `publish` job uses GitHub Environment `npm-publish` so `NPM_TOKEN` is only exposed during the publish step. **Zero secrets in workflow YAML.**
391
-
392
- ---
393
-
394
- ## 🤝 Compatibility
395
-
396
- - **pi-coding-agent** ≥ 0.78
397
- - **Node** ≥ 20 (pre-installed on the runner)
398
- - **Bun** ≥ 1.3 (pre-installed on the runner)
399
- - **OS** — Linux, macOS, Windows (anywhere Bun runs)
400
-
401
- ---
402
-
403
- ## 📜 License
404
-
405
- MIT — see [LICENSE](LICENSE).
406
-
407
- ---
408
-
409
- <div align="center">
410
-
411
- **Built by [@lowern1ght](https://github.com/lowern1ght) · Powered by [pi](https://github.com/nicobailon/pi-coding-agent) + [Bun](https://bun.sh)**
224
+ Edit a file, then in pi: `/reload` to pick up changes. Live-reload
225
+ handles the chrome, rules, and intent-doc watchers.
412
226
 
413
- [⭐ 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)
227
+ ## License
414
228
 
415
- </div>
229
+ MIT — see [LICENSE](./LICENSE).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-soly",
3
- "version": "2.2.2",
4
- "description": "Project management + workflow framework for pi-coding-agent. Plans, state, MANDATORY rules, self-review, multi-question picker, native footer + welcome chrome — one npm install, zero config. The LLM drives the workflow inline via the soly_workflow tool — no external subagent plugin.",
3
+ "version": "2.2.4",
4
+ "description": "Workflow + project management for pi-coding-agent. Plans, state, MANDATORY rules, self-review, multi-question picker. One npm install, zero config. LLM drives the workflow inline via the soly_workflow tool — no external subagent plugin.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
7
7
  "scripts": {
@@ -62,7 +62,8 @@
62
62
  "codemap.ts",
63
63
  "state.ts",
64
64
  "hotreload.ts",
65
- "built-in-rules"
65
+ "built-in-rules",
66
+ ".assets"
66
67
  ],
67
68
  "keywords": [
68
69
  "pi",