pi-soly 0.5.9 → 0.6.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 CHANGED
@@ -1,372 +1,283 @@
1
- # soly — Project rules, intent, state, and project context for Pi
1
+ <div align="center">
2
2
 
3
- A single pi extension that loads project context into the agent's system
4
- prompt and exposes workflow verbs for a plan → execute → close-out loop
5
- on phases (and features/tasks). Replaces gsd.
3
+ # pi-soly
6
4
 
7
- > **Note.** This README describes the *current* source tree. If you came
8
- > here from an older install, the layout moved from a single `soly.ts`
9
- > file (and `.planning/` paths) to a modular `soly/` directory using
10
- > `.soly/`. Old `soly.ts`-based installs are no longer shipped.
5
+ **The project management framework for [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent).**
11
6
 
12
- ## What it shows
7
+ Plans · State · Subagents · Multi-question picker · Agent switcher · Live task list.
13
8
 
14
- Footer status line, set via `ctx.ui.setStatus("soly", ...)`:
9
+ One `npm install`. Zero config. Pure magic.
15
10
 
16
- ```
17
- soly · v1.6.1 p10 0/2 [░░░░░░░░░░] 0% rules 6 · 2.4k
18
- ───── ─────────────────────────── ────────────────
19
- prefix project state rules
20
- ```
11
+ [![npm version](https://img.shields.io/npm/v/pi-soly.svg)](https://www.npmjs.com/package/pi-soly)
12
+ [![npm downloads](https://img.shields.io/npm/dm/pi-soly.svg)](https://www.npmjs.com/package/pi-soly)
13
+ [![CI](https://img.shields.io/github/actions/workflow/status/lowern1ght/pi-soly/ci.yml)](https://github.com/lowern1ght/pi-soly/actions)
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/lowern1ght/pi-soly/blob/master/LICENSE)
15
+ [![Built with Bun](https://img.shields.io/badge/Built_with-Bun-f9f1e1?logo=bun)](https://bun.sh)
21
16
 
22
- The progress bar is the only white element (focal point). Everything else
23
- is dim gray. Segments that don't apply are omitted silently — no empty
24
- `p10` if there's no current phase, no `rules` if there are no rules, etc.
17
+ [Install](#-install) · [Features](#-features) · [Docs](#-documentation) · [Architecture](#-architecture) · [Releases](#-releases)
25
18
 
26
- | Segment | Example | Source |
27
- |---|---|---|
28
- | `soly ·` | (literal) | prefix |
29
- | `<milestone>` | `v1.6.1` | `.soly/STATE.md` frontmatter |
30
- | `p<N>` | `p10` | current phase number |
31
- | `<done>/<total>` | `0/2` | completed plans / total plans |
32
- | `[<bar>]` | `[█████░░░░░]` | progress bar (10 block chars) — **only white** |
33
- | `<pct>%` | `50%` | progress percent (dim) |
34
- | `rules <n>` | `rules 6` (or `rules 3/6`) | active rules / total rules |
35
- | `· <tok>` (rules) | `· 2.4k` | estimated tokens for the rules section |
36
- | `session <n>t <tok>` | `session 12t 18.4k` | assistant-turn count + rough token usage |
19
+ </div>
37
20
 
38
- Status is change-detected — `setStatus` is only called when the rendered
39
- line differs from the previous one (anti-flicker).
21
+ ---
40
22
 
41
- ## What it loads
23
+ ## Install
42
24
 
43
- ### Rules (priority order, higher wins on duplicate `relPath`)
25
+ ```bash
26
+ pi install npm:pi-soly
27
+ ```
44
28
 
45
- | Priority | Source | Path | Label |
46
- |---|---|---|---|
47
- | 5 (highest) | Project local | `<cwd>/.soly/rules.local/` | `[local]` |
48
- | 4 | Project soly | `<cwd>/.soly/rules/` | `[soly]` |
49
- | 3 | Phase-scoped | `<phase-dir>/rules/` | `[phase]` (loaded only when that phase is active) |
50
- | 2 (lowest) | Global soly | `~/.soly/rules/` | `[soly]` |
29
+ That's it. Restart pi, and you have:
51
30
 
52
- **Override rules**:
53
- - **Project always beats global** — same `relPath` in `.soly/rules/foo.md` overrides `~/.soly/rules/foo.md`.
54
- - **Local beats project** — `.soly/rules.local/foo.md` overrides `.soly/rules/foo.md` (gitignored personal overrides).
55
- - **Soly beats phase** within the same scope, **phase beats project** when active.
31
+ - **A complete project management engine** — plans, state, subagent-driven execution
32
+ - **A multi-question picker** — `ask_pro` tool for the LLM
33
+ - **An agent switcher** — `Ctrl+Tab` to cycle, footer pill always visible
34
+ - **A live task list** `todo_update` tool renders in the footer
35
+ - **7 soly agents** installed on first run
56
36
 
57
- When a rule is overridden, it is **not** loaded into the system prompt
58
- (no duplication) and appears in `/rules list` with a `⊘` marker.
37
+ ---
59
38
 
60
- Rules with `globs:` in frontmatter are only included when the active
61
- prompt or context files match. Rules with `always: true` always load.
39
+ ## 🎯 Why pi-soly?
62
40
 
63
- ### Intent docs (the "0-point")
41
+ | Without pi-soly | With pi-soly |
42
+ |---|---|
43
+ | Write your own planning workflow | `/plan`, `/execute`, `/resume`, `/inspect` — ready |
44
+ | Manually dispatch subagents | `useSolyWorkerSubagents: true` — automatic routing |
45
+ | 3 different packages for pickers/tasks/agents | One package, one config, one install |
46
+ | Agent name as free text in slash commands | Footer pill + `Ctrl+Tab` + `/agent` picker |
47
+ | Re-invent the state machine | `.soly/STATE.md` + auto-managed phases |
64
48
 
65
- `.soly/docs/` is loaded as project intent — the user's vision written
66
- *BEFORE* any soly plans. `.md` and `.html` are both supported (parsed
67
- for `<title>` / `<h1>` / `<meta name="description">`). Nested directories
68
- are scanned (e.g. `.soly/docs/api/auth.md`).
49
+ ---
69
50
 
70
- Per-phase intent (`.soly/phases/<NN>/docs/`) is loaded only when that
71
- phase is currently active. Phase intent is tagged separately in the
72
- system prompt.
51
+ ## 🔥 Features
73
52
 
74
- ### Project state
53
+ ### 📋 Project Management Engine
75
54
 
76
- `.soly/` layout (dual-mode phases AND features+tasks can coexist):
55
+ GSD-inspired planning and execution. State is the source of truth, not vibes.
77
56
 
57
+ ```bash
58
+ /plan # generate PLAN.md for the current phase
59
+ /execute # dispatch plan to soly-worker subagent
60
+ /resume # pick up a paused session
61
+ /inspect # show current state summary
62
+ /discuss 3 # talk through decisions before planning phase 3
78
63
  ```
79
- your-project/
80
- ├── .soly/
81
- │ ├── STATE.md ← current position, decisions log
82
- │ ├── ROADMAP.md ← phases / milestones
83
- │ ├── REQUIREMENTS.md ← requirement IDs
84
- │ ├── PROJECT.md ← project overview
85
- │ ├── docs/ ← 0-point intent (.md / .html)
86
- │ ├── rules/ ← project rules
87
- │ │ ├── code-style.md
88
- │ │ └── ...
89
- │ ├── rules.local/ ← gitignored personal overrides
90
- │ ├── phases/
91
- │ │ └── 10-foo/
92
- │ │ ├── 10-CONTEXT.md
93
- │ │ ├── 10-RESEARCH.md
94
- │ │ ├── 10-01-PLAN.md
95
- │ │ ├── 10-01-SUMMARY.md
96
- │ │ ├── 10-02-PLAN.md
97
- │ │ ├── rules/ ← phase-scoped rules (priority 3)
98
- │ │ └── docs/ ← phase-specific intent
99
- │ ├── features/ ← feature-mode (dual with phases)
100
- │ │ └── auth/
101
- │ │ ├── README.md
102
- │ │ └── tasks/
103
- │ │ ├── auth-be-login-a3f9/
104
- │ │ │ ├── PLAN.md
105
- │ │ │ └── SUMMARY.md
106
- │ │ └── ...
107
- │ ├── HANDOFF.json ← written by `soly pause`
108
- │ ├── .continue-here.md ← written by `soly pause`
109
- │ └── milestones/
110
- │ └── v1.6.1.md
111
- ```
112
-
113
- ## System prompt composition
114
-
115
- On `before_agent_start`, six sections are appended to the system prompt
116
- in this order (all optional — missing input just omits the section):
117
64
 
118
- 1. `## soly project rules` all applicable rules, filtered by `globs:` match against active prompt + pi context files
119
- 2. `## soly project state` — milestone, phase, plan, progress, current plan objective, working agreement
120
- 3. `## project intent (from .soly/docs/)` — always-on intent docs (titles + previews + token sizes)
121
- 4. `### intent: <relpath>` (per-doc) — full body of intent docs with `inline: true` frontmatter (with `@import` resolution)
122
- 5. `## current git state` — branch, working tree status, last 5 commits
123
- 6. `## project env` — package manager, runtimes, scripts, services, tooling flags
124
- 7. `## project layout` — top-level tree + key files + CI hint
125
- 8. `## soly behavioral nudge` — always-on; tells the LLM to ask clarifying questions for non-trivial prompts and to prefer background subagents for research
65
+ State lives in `.soly/`portable, git-friendly, human-readable.
126
66
 
127
- All sections chain — they combine with other extensions' system-prompt
128
- contributions without conflict.
67
+ ```
68
+ .soly/
69
+ ├── ROADMAP.md # phase table
70
+ ├── STATE.md # current position + decisions log
71
+ ├── docs/ # 0-point intent docs (your vision, locked)
72
+ └── phases/
73
+ └── 01-foundation/
74
+ ├── 01-CONTEXT.md # domain + decisions for this phase
75
+ ├── 01-RESEARCH.md # what we looked up
76
+ └── 01-PLAN.md # ordered steps to execute
77
+ ```
129
78
 
130
- ## Workflow verbs (plain text — NOT slash)
79
+ ### 🎤 Multi-Question Picker
80
+
81
+ Claude Code-style `ask_pro` for the LLM. Single-select, multi-select, recommended ⭐, free-text Other.
82
+
83
+ ```ts
84
+ ask_pro({
85
+ questions: [{
86
+ header: "Auth",
87
+ question: "How should we store the OAuth refresh token?",
88
+ options: [
89
+ { label: "Encrypted in SQLite", description: "Survives restart, single-device.", recommended: true },
90
+ { label: "OS keychain", description: "Native, multi-device via iCloud." },
91
+ { label: "Plain env var", description: "Simplest, dev only." }
92
+ ]
93
+ }]
94
+ })
95
+ ```
131
96
 
132
- Type them in interactive mode. The extension intercepts via the `input`
133
- event and either:
97
+ ### 🎛 Agent Switcher
134
98
 
135
- - **transforms** the input into a detailed LLM instruction (the LLM still sees it, but with full workflow context, and calls `subagent(...)` itself)
136
- - **handles** directly (no LLM round-trip; immediate UI notify)
99
+ Footer pill that's always there. `Ctrl+Tab` to cycle. No popup, no friction.
137
100
 
138
- | Verb | Mode | Purpose |
139
- |---|---|---|
140
- | `soly execute <N>` | transform | Execute all plans in phase N (wave-based parallel) |
141
- | `soly execute <N.MM>` | transform | Execute one plan in phase N |
142
- | `soly execute <task-id>` | transform | Execute one task (feature-mode) |
143
- | `soly execute --all` | transform | Execute all ready tasks (sequential in v0.1) |
144
- | `soly execute --feature <name>` | transform | Execute all tasks in a feature |
145
- | `soly plan <N>` | transform | Produce PLAN.md for phase N |
146
- | `soly plan <task-id>` | transform | Refine PLAN.md for existing task |
147
- | `soly plan --new-task <slug> --feature <n>` | transform | Create new task + PLAN.md |
148
- | `soly plan --feature <n>` | transform | Plan all ready tasks in a feature |
149
- | `soly discuss <N>` | transform | Scoping discussion for phase N |
150
- | `soly pause` | transform | Write HANDOFF.json + .continue-here.md (no compaction) |
151
- | `soly compact` | transform + auto-compact | Same as pause, then `ctx.compact()` at end of turn |
152
- | `soly resume [N]` | transform | Restore from handoff (optionally scoped to phase N) |
153
- | `soly status` | handled | One-screen position summary + recent iteration activity |
154
- | `soly log [N]` | handled | Last N rows from STATE.md Decisions table |
155
- | `soly diff` | handled | git status + uncommitted `.soly/` changes |
156
- | `soly diff iterations <a> <b>` | handled | Diff two iteration files (line-level) |
157
- | `soly iterations [N]` | handled | List N most recent `.soly/iterations/*.md` files (default 10) |
158
- | `soly doctor` | handled | Health check: missing files, broken refs, stale iterations |
159
- | `soly phase delete <N>` | handled | Soft-delete phase N (moves to `.soly/phases/.trash/<slug>-<ts>/`) |
160
- | `soly help` | handled | Show all available verbs |
161
-
162
- When transforming, the prompt template is built from `.md` files in
163
- `workflows-data/` (plan-phase, plan-task, execute-phase, execute-plan,
164
- execute-task, discuss-phase, pause-work). The LLM launches a `worker`
165
- subagent with `context: "fresh"` and `maxSubagentDepth: 1`.
166
-
167
- ## Slash commands
168
-
169
- | Command | Subcommands |
170
- |---|---|
171
- | `/rules` | `list`, `show <path>`, `analytics`, `reload`, `enable <path>`, `disable <path>`, `enable-all`, `disable-all`, `add <url>`, `new` |
172
- | `/soly` | `position` (default), `state`, `plan`, `context`, `research`, `roadmap`, `progress`, `phases`, `tasks`, `task <id>`, `features`, `milestone`, `config`, `reload`, `help` |
173
- | `/rulewizard` | (interactive guide, no subcommands) |
174
- | `/why` | (no subcommands — shows the basis for the last turn, incl. loaded rule files) |
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
+ ```
175
106
 
176
- ## Tools (LLM-callable)
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
+ The LLM can update its own task list mid-turn. You watch progress without re-asking.
122
+
123
+ ```ts
124
+ todo_update({
125
+ todos: [
126
+ { content: "Read existing config", status: "completed", priority: "high" },
127
+ { content: "Write new schema", status: "in_progress", priority: "high" },
128
+ { content: "Add migration", status: "pending", priority: "medium" },
129
+ { content: "Update tests", status: "pending", priority: "medium" },
130
+ { content: "Run typecheck", status: "pending", priority: "low" }
131
+ ]
132
+ })
133
+ ```
177
134
 
178
- The agent can call these directly without the user typing a command.
179
- The `soly_*` tools are the primary way the LLM explores project state
180
- without bloating the system prompt.
135
+ ---
181
136
 
182
- | Tool | Purpose |
183
- |---|---|
184
- | `soly_read` | Read any `.soly/` artifact (state / plan / context / research / roadmap / requirements / project / milestone / task) |
185
- | `soly_log_decision` | Append a row to STATE.md Decisions table |
186
- | `soly_list_phases` | List phases with C/R markers and current-position arrow |
187
- | `soly_list_tasks` | List tasks across all features with kind/status/priority/deps |
188
- | `soly_intent` | List the 0-point intent docs (always present, even when empty) |
189
- | `soly_doc_search` | Search `.md` / `.html` files with intent/phase-intent/project priority |
190
- | `soly_snippet` | Bounded file read with line numbers, HTML strip option |
191
- | `soly_env` | Detect package manager / scripts / services / tooling flags |
192
- | `soly_todos` | Scan for `TODO`/`FIXME`/`HACK`/`XXX`/`NOTE` comments (requires `rg`) |
193
- | `soly_scratchpad` | Compact summary of recent conversation turns |
194
-
195
- ## Interactive vs worker rules
196
-
197
- Rules with `interactive: true` in frontmatter load for the interactive
198
- LLM session (you typing in pi) but **NOT** for the `worker` subagent
199
- that runs in `soly execute` / `soly plan`. Use this for meta-rules like
200
- "ask before acting" or "use background subagents" that describe the
201
- **user-facing conversation**, not the execution work.
202
-
203
- The worker subagent task explicitly lists which rules are out of scope:
137
+ ## 🏗 Architecture
204
138
 
205
139
  ```
206
- - Interactive-only rules are NOT in scope for you:
207
- process/ask-first.md, process/use-subagents.md
140
+ ┌──────────────────────────────────────────────────────────────┐
141
+ │ pi-coding-agent (peer dep) │
142
+ └────────────────────────┬─────────────────────────────────────┘
143
+
144
+ ┌────────────────┴────────────────┐
145
+ │ │
146
+ ▼ ▼
147
+ ┌────────────┐ ┌─────────────┐
148
+ │ ask_pro │ │ todo_ │
149
+ │ picker │ │ update │
150
+ │ (tool) │ │ (tool) │
151
+ └────────────┘ └─────────────┘
152
+ │ │
153
+ └─────────────────┬───────────────┘
154
+
155
+
156
+ ┌──────────────────┐
157
+ │ Workflow engine │
158
+ │ │
159
+ │ /plan /execute │
160
+ │ /resume /inspect│
161
+ │ /discuss /quick │
162
+ └────────┬─────────┘
163
+
164
+ ┌────────────┼────────────┐
165
+ ▼ ▼ ▼
166
+ .soly/STATE phases/<N>/ iterations/
167
+ (current CONTEXT, (per-exec
168
+ position) PLAN, context
169
+ RESEARCH) bundle)
170
+
171
+
172
+ ┌──────────────────┐
173
+ │ switch/ │
174
+ │ agent switcher │
175
+ │ │
176
+ │ Ctrl+Tab │
177
+ │ footer pill │
178
+ │ /agent picker │
179
+ └────────┬─────────┘
180
+
181
+
182
+ ┌──────────────────┐
183
+ │ 7 soly agents │
184
+ │ │
185
+ │ soly-worker │
186
+ │ soly-debugger │
187
+ │ soly-tester │
188
+ │ soly-reviewer │
189
+ │ soly-refactor │
190
+ │ soly-documenter │
191
+ │ soly-oracle │
192
+ └──────────────────┘
208
193
  ```
209
194
 
210
- ## Display rules
211
-
212
- 1. **Footer status only** — `ctx.ui.setStatus("soly", ...)`. No chat
213
- popups for passive info (chat shows errors and explicit command output).
214
- 2. **No widget** — the multi-line widget above the editor was removed.
215
- 3. **No flicker** — the status line is change-detected.
216
- 4. **Static progress bar** — `█` / `░` block characters, no animation.
217
-
218
- ## Startup analytics
219
-
220
- On `session_start`, if rules are loaded, the extension shows a one-line
221
- breakdown (e.g. `soly rules: 6 (4 soly + 2 phase-10)`). If a rule is
222
- overridden, you also see `soly: 2 rule(s) overridden by project (...)`.
223
- If rules changed since the last session, you see `soly: rules changed
224
- since last session (+1 ~2)`. If rules use >5% of the context window,
225
- you see a budget warning. Run `/rules analytics` any time for the full
226
- breakdown (per-file sizes, %-of-context, missing descriptions, duplicates).
195
+ ---
227
196
 
228
- ## Cross-extension integrations (soly as a platform)
197
+ ## 📚 Documentation
229
198
 
230
- soly composes with sibling pi-soly.framework when they're loaded. The registry
231
- lives in `integrations.ts` add a new entry there to make soly aware of
232
- another extension's tool.
199
+ - **Slash commands** `/plan`, `/execute`, `/resume`, `/inspect`, `/discuss <N>`, `/quick <task>`, `/agent`
200
+ - **Tools** `ask_pro(question[])` and `todo_update(todo[])`
201
+ - **Events** — `session_start`, `before_agent_start`, `message_end`, `tool_call`, `tool_result`
202
+ - **State files** — `.soly/STATE.md`, `.soly/ROADMAP.md`, `.soly/phases/<N>-<slug>/<N>-PLAN.md`
203
+ - **Soly agents** — installed to `~/.pi/agent/agents/soly-*.md` on first run
233
204
 
234
- | Extension | Tool | What it adds | Auto-detected? |
235
- |---|---|---|---|
236
- | **`pi-ask`** | `ask_pro` | Tabbed multi-question picker (Claude Code style). `soly discuss` uses it as PREFERRED over the built-in `soly_ask_user` fallback. | yes (via `pi.getActiveTools()`) |
237
- | **`pi-todo`** | `todo_update` | Live, user-visible task list in the footer. `soly execute` workflow template seeds todos from `<task>` blocks. soly shows `todos N/M` in its own status line. | yes |
205
+ ---
238
206
 
239
- When any registered tool is loaded, soly injects a `## Cross-extension
240
- integrations (active in this session)` section into the system prompt
241
- explaining when to reach for it. When none are loaded, the section is
242
- omitted entirely (no noise about extensions the user hasn't installed).
207
+ ## 🛠 Development
243
208
 
244
- `soly doctor` also reports each known extension as a check — `(pass)` if
245
- loaded, `(info)` if not (it's optional, not a warn).
209
+ ### Requirements
246
210
 
247
- ## Opt-in: soly-aware subagents
211
+ - [Bun](https://bun.sh) ≥ 1.3
212
+ - [pi-coding-agent](https://github.com/nicobailon/pi-coding-agent) ≥ 0.78
248
213
 
249
- Soly ships two soly-specialized agent configs in `soly/agents/`:
214
+ ### Setup
250
215
 
251
- - **`soly-worker`** — implementation agent that knows soly path discipline
252
- (everything under `.soly/`), plan/task structure, close-out order, and
253
- auto-tracks plan sub-tasks via `todo_update` when pi-todo is installed.
254
- - **`soly-oracle`** — decision-consistency agent that validates plans
255
- against existing STATE.md commitments (catches drift, scope creep,
256
- hidden assumptions).
216
+ ```bash
217
+ git clone https://github.com/lowern1ght/pi-soly.git
218
+ cd pi-soly
219
+ bun install
220
+ ```
257
221
 
258
- By default, `soly execute` workflows use pi-subagents' generic `worker`
259
- (because the soly workflow template already contains all soly instructions
260
- in the task prompt). To switch to the soly-specialized agents:
222
+ ### Test + typecheck
261
223
 
262
- 1. Set `agent.useSolyWorkerSubagents: true` in `.soly/config.json`
263
- 2. Reload pi (or wait for next `session_start`)
264
- 3. Soly auto-installs `soly-worker.md` and `soly-oracle.md` to
265
- `~/.pi/agent/agents/` (idempotent won't overwrite user-customized copies)
266
- 4. `soly execute` now launches `agent: "soly-worker"` instead of `worker`
267
- 5. `soly doctor` shows `soly-aware subagents` as `(pass)`
224
+ ```bash
225
+ bun test # 288 tests
226
+ bun run typecheck # tsc --noEmit
227
+ bun run ci # both
228
+ ```
268
229
 
269
- `soly doctor` reports current state of these agents. The install is
270
- opt-in to keep the default install minimal — most users don't need them.
230
+ ### Live-reload in pi
271
231
 
272
- To add a new integration, append a `KnownIntegration` entry in
273
- `integrations.ts`. No other code changes needed.
232
+ ```bash
233
+ pi install ./packages/pi-soly
234
+ # edit files → /reload in pi to pick up changes
235
+ ```
274
236
 
275
- ## Agent switcher (Shift+Tab)
237
+ ---
276
238
 
277
- soly lets you pick which subagent `soly execute` launches, and you can
278
- cycle through the available ones with **Shift+Tab** (Claude Code-style
279
- shortcut, but for AGENTS not modes — pi handles plan/auto-accept itself).
239
+ ## 🚢 Releases
280
240
 
281
- The cycle order is deterministic and discoverable:
241
+ Tag-based, fully automated. Push a `pi-soly-v*` tag, get a publish.
282
242
 
283
- 1. **Built-in pi-subagents** (always available): `worker` → `oracle` →
284
- `scout` → `researcher` → `planner` → `context-builder` → `reviewer` →
285
- `delegate`
286
- 2. **Soly-augmented agents** (only if `useSolyWorkerSubagents: true`):
287
- `soly-worker` `soly-oracle`
288
- 3. **User-defined agents** (from `~/.pi/agent/agents/*.md`): anything you
289
- add yourself with a YAML `name:` frontmatter
243
+ ```bash
244
+ ./scripts/release.sh pi-soly 0.5.9
245
+ git push origin master
246
+ git push github master
247
+ git push github pi-soly-v0.5.9 --force
248
+ ```
290
249
 
291
- The active agent shows in the status line as `[agent: name]`, except for
292
- `worker` (the default — silent). Cycle or set explicitly:
250
+ CI runs on a self-hosted GitHub Actions runner:
293
251
 
294
- - **Shift+Tab** cycle to next agent
295
- - **`/soly agent`** — show current + available
296
- - **`/soly agent soly-worker`** set explicitly
297
- - **`.soly/agent` file** persisted across sessions (auto-managed)
252
+ | Trigger | Job | Action |
253
+ |---|---|---|
254
+ | Push to `master` | `test` | `bun install` + `bun test` + `bun run typecheck` |
255
+ | PR to `master` | `test` | same |
256
+ | Push tag `pi-soly-v*` | `test` → `publish` | tests + `npm publish` to npmjs |
298
257
 
299
- **Add your own agent.** Drop a markdown file with YAML frontmatter into
300
- `~/.pi/agent/agents/`:
258
+ The `publish` job uses GitHub Environment `npm-publish` so `NPM_TOKEN` is only exposed during the publish step. **Zero secrets in workflow YAML.**
301
259
 
302
- ```markdown
303
- ---
304
- name: my-reviewer
305
- description: Security-focused reviewer for auth code
306
- tools: read, grep, bash
307
260
  ---
308
261
 
309
- You are a security reviewer. Focus on auth, input validation, and secrets…
310
- ```
311
-
312
- Restart pi (or Shift+Tab) — `my-reviewer` shows up in the cycle. Soly
313
- discovers agents on every Shift+Tab, so no install step required.
314
-
315
- ## Setup
262
+ ## 🤝 Compatibility
316
263
 
317
- Drop the `soly/` directory in `~/.pi/agent/extensions/`. Both `.soly/`
318
- (or `~/.soly/`) and `.soly/rules/` are auto-discovered. The extension
319
- also depends on the `pi-subagents` package (already in
320
- `~/.pi/agent/settings.json` `packages` if you used the recommended
321
- install) — `soly execute` / `soly plan` workflows call `subagent(...)`.
264
+ - **pi-coding-agent** 0.78
265
+ - **Node** 20 (pre-installed on the runner)
266
+ - **Bun** 1.3 (pre-installed on the runner)
267
+ - **OS** Linux, macOS, Windows (anywhere Bun runs)
322
268
 
323
- ```bash
324
- ls ~/.pi/agent/extensions/soly/
325
- # codemap.ts commands.ts config.ts core.ts docs.ts env.ts git.ts hotreload.ts
326
- # html.ts index.ts integrations.ts intent.ts iteration.ts nudge.ts scratchpad.ts tools.ts
327
- # agents/ workflows/ workflows-data/ tests/ package.json tsconfig.json
328
- # agents/soly-worker.md, agents/soly-oracle.md (opt-in; installed on session_start if config flag set)
329
- ```
269
+ ---
330
270
 
331
- ## Configuration (soly)
271
+ ## 📜 License
332
272
 
333
- Two-layer config, merged with defaults:
273
+ MIT see [LICENSE](LICENSE).
334
274
 
335
- - **Per-project** `.soly/config.json` — version-controlled, project-specific
336
- - **Global** `~/.soly/config.json` — machine-specific, user-specific
275
+ ---
337
276
 
338
- Use `/soly config` to see the resolved (merged) config + schema. Key knobs:
277
+ <div align="center">
339
278
 
340
- | Path | Default | Purpose |
341
- |---|---|---|
342
- | `iteration.retentionDays` | `14` | Stale iteration files pruned on `session_start`. `0` = never. |
343
- | `iteration.includeResearch` | `true` | Bundle phase research in iteration context |
344
- | `iteration.includeAntiPatterns` | `true` | Bundle anti-patterns doc in iteration context |
345
- | `agent.preferAskPro` | `true` | If `pi-ask` is installed, use `ask_pro` picker for `soly discuss` |
346
- | `agent.autoCheckpointOnPause` | `true` | Write iteration context bundle on `soly pause` |
347
- | `agent.useSolyWorkerSubagents` | `false` | Opt-in: install soly-aware subagent configs (`soly-worker`, `soly-oracle`) to `~/.pi/agent/agents/` on `session_start` and use them in `soly execute` instead of the generic `worker`. Off by default because the soly workflow template already contains all soly instructions. Enable if you want a soly-specialized subagent system prompt. |
348
- | `display.maxPhasesInStatus` | `20` | Cap on phases shown in `soly status` |
349
- | `display.defaultRecommendedFirst` | `true` | Default first option is the ⭐ in pickers |
350
- | `paths.excludeGlobs` | `["**/node_modules/**","**/dist/**"]` | Extra globs to exclude from code map |
351
- | `hotReload.pollMs` | `2000` | Windows/network-mount polling fallback |
352
- | `notifyOnRuleChange` | `true` | Notify on rule hot-reload |
353
- | `editor.command` | `"code"` | Editor for `soly edit` (future) |
354
-
355
- ## How it works
356
-
357
- 1. **`session_start`** — builds rule source list (project-local → project → global), loads all rules, loads project state from `.soly/`, runs `detectEnv` + `buildCodeMap` + `readGitContext` (one-time, cached), starts the hot-reload watcher.
358
- 2. **`before_agent_start`** — composes the system-prompt sections (rules filtered by globs, project state, intent, inline-intent, git, env, code map, behavioral nudge) and computes per-section token estimates.
359
- 3. **`turn_end`** — re-reads rules and state; if either changed, refreshes the status line.
360
- 4. **Status update** — every render compares to the previous line and only calls `setStatus` on change.
361
- 5. **Hot reload** — `fs.watch` with 100 ms debounce + 2 s polling fallback (Windows / network mounts). The user-facing notify is coalesced over 500 ms to absorb editor save-bursts (`.tmp` → rename → touch).
362
- 6. **Workflow input** — the `input` event intercepts plain text matching `soly <verb> ...`, then either transforms the prompt (with a workflow markdown template + worker subagent task) or shows a direct result.
363
-
364
- ## Development
279
+ **Built by [@lowern1ght](https://github.com/lowern1ght) · Powered by [pi](https://github.com/nicobailon/pi-coding-agent) + [Bun](https://bun.sh)**
365
280
 
366
- ```bash
367
- cd ~/.pi/agent/extensions/soly
368
- bun test # runs tests/parser.test.ts, tests/nudge.test.ts, tests/html.test.ts
369
- bun run typecheck # tsc --noEmit
370
- ```
281
+ [⭐ 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)
371
282
 
372
- CI: `.github/workflows/ci.yml` runs both on push and PR.
283
+ </div>