@gtrabanco/pi-agentic-workflow 0.34.2 → 0.35.1

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
@@ -146,16 +146,27 @@ set of routes, and you can define as many as you like under `profiles`:
146
146
  The built-in `nan` profile is shown but not editable — create a profile to
147
147
  override it.
148
148
 
149
- ## Serena (ships by default)
149
+ ## Serena (native MCP registration)
150
150
 
151
- Installing this package also gives you **Serena's language-server tools** —
152
- `serena_find_symbol`, `serena_find_referencing_symbols`,
153
- `serena_get_symbols_overview`, `serena_find_declaration`, diagnostics and the
154
- rest. Two declarations make that work, and they ship together: the exact-pinned
155
- `@bacnh85/pi-serena` dependency, and a second `pi.extensions` entry pointing at
156
- that dependency's own extension. Pi installs a package's dependencies but
157
- activates only the package's own `pi.extensions` entries, so the pin alone would
158
- install a toolset nothing ever loaded.
151
+ Serena's language-server tools reach pi through Serena's own MCP server — the
152
+ interface Serena documents, tests and keeps version-stable — not through a
153
+ bundled bridge. This package ships no Serena dependency; provisioning is one
154
+ consented step:
155
+
156
+ ```sh
157
+ pi mcp add serena -- serena start-mcp-server --context claude-code
158
+ pi mcp list # verifies the connection
159
+ ```
160
+
161
+ That writes the user-level `~/.pi/agent/mcp.json` (add `--local` for a
162
+ project-level `.pi/mcp.json`, read only after project trust is granted). The
163
+ tools appear under the `mcp__serena__<tool>` namespace — `find_symbol`,
164
+ `find_referencing_symbols`, `get_symbols_overview`, `get_diagnostics` and the
165
+ rest — and pi's per-server `toolExposure` config narrows the surface if the
166
+ full toolset is more than a session needs. The machine half is the same local
167
+ tool as before: `uv tool install -p 3.13 serena-agent` (or `/init-workspace`,
168
+ which offers the install, the registration and the global trust append in one
169
+ consented question).
159
170
 
160
171
  **You must run `/init-workspace` once per project.** This package never writes or
161
172
  repairs `.serena/project.yml` — `init-workspace` is its only writer, so there is
@@ -165,27 +176,12 @@ missing, lists no `language_servers`, or was provisioned by an older bundled
165
176
  `/init-workspace`; the latch lives in this package's state file, so a restart does
166
177
  not re-nag.
167
178
 
168
- Serena itself is a local tool: install the machine half with `uv tool install -p
169
- 3.13 serena-agent` (or `/init-workspace`, which offers it). Nothing is uploaded
170
- and no key is configured.
171
-
172
- **Switching it off.** pi owns package resources, so the off switch is pi's, not a
173
- key of ours: `pi config` opens the resource picker (tab switches scope) and lets
174
- you disable the package's resources, and the same filter is expressible in
175
- settings under `packages`:
176
-
177
- ```json
178
- {
179
- "packages": [
180
- { "source": "npm:@gtrabanco/pi-agentic-workflow", "extensions": ["./dist/extension/index.js"] }
181
- ]
182
- }
183
- ```
179
+ Nothing is uploaded and no key is configured.
184
180
 
185
- That keeps the workflow's own extension and commands and drops the Serena
186
- extension entry, so the `serena_*` tools are never registered. There is no
187
- settings key inside this package for it: the entry is declared in the manifest,
188
- and a config key cannot gate a manifest-declared extension.
181
+ **Switching it off.** Serena is an MCP server now, so pi's own MCP controls are
182
+ the off switch: `pi mcp remove serena` unregisters it, `/mcp` inside a session
183
+ disables or re-enables it, or set `"enabled": false` on the entry in
184
+ `~/.pi/agent/mcp.json` to keep it listed but disconnected.
189
185
 
190
186
  ## Path protection (optional)
191
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtrabanco/pi-agentic-workflow",
3
- "version": "0.34.2",
3
+ "version": "0.35.1",
4
4
  "description": "Pi package: canonical agentic-workflow skills, friendly slash commands, and per-command model routing.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -21,8 +21,7 @@
21
21
  "type": "module",
22
22
  "pi": {
23
23
  "extensions": [
24
- "./dist/extension/index.js",
25
- "./node_modules/@bacnh85/pi-serena/extensions/index.ts"
24
+ "./dist/extension/index.js"
26
25
  ],
27
26
  "skills": [
28
27
  "./skills"
@@ -58,7 +57,6 @@
58
57
  "@earendil-works/pi-tui": "*"
59
58
  },
60
59
  "dependencies": {
61
- "@bacnh85/pi-serena": "0.10.0",
62
60
  "@gtrabanco/agentic-workflow": "0.4.0",
63
61
  "@gtrabanco/agentic-workflow-schema": "4.8.0"
64
62
  },
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: execute-phase
3
3
  user-invocable: true
4
- version: 6.2.2
4
+ version: 6.3.1
5
5
  argument-hint: <NN-slug> [P<k>|step] [--max-attempts N] [--force]
6
6
  allowed-tools: [Bash, Read, Edit, Write, MultiEdit]
7
7
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
@@ -182,7 +182,13 @@ lane hand-off is a defect; re-read the hand-off before looping. After each
182
182
  step: gates, execute, diff guard (if implement), evidence/progress update,
183
183
  commit. Skip intermediate review checkpoints; the mandatory end review covers
184
184
  the full accumulated diff. On gate red at any step: repair that step (up to
185
- `--max-attempts`), then continue the loop. Terminal:
185
+ `--max-attempts`), then continue the loop. The close-out is part of the last
186
+ step's completion: open the PR on `main` with `Closes #N`, write `- PR: <url>`
187
+ into References, and settle the index row with `agentic-workflow roadmap
188
+ <index> rowUpsert '<json>'` (`docs/features/ROADMAP.md`; a fix unit edits its
189
+ `docs/fix/README.md` status cell — no `NN` column, no `rowUpsert`).
190
+ `bun scripts/roadmap-settle.mjs` exits 0 (#316).
191
+ Terminal:
186
192
 
187
193
  ```text
188
194
  UNIT LOOP — <unit> COMPLETE
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: init-workspace
3
3
  user-invocable: true
4
- version: 4.2.0
4
+ version: 4.3.0
5
5
  argument-hint: <target-dir>
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -172,6 +172,29 @@ entry, never another line.
172
172
  | Cursor | `.cursor/mcp.json` → `mcpServers.serena` | `{"command":"serena","args":["start-mcp-server","--context=ide"]}` |
173
173
  | JetBrains Copilot | the global `mcp.json` Copilot opens | `{"type":"stdio","command":"serena","args":["start-mcp-server","--context=jb-copilot-plugin"]}` |
174
174
  | Codex | `~/.codex/config.toml` → `[mcp_servers.serena]` | `command = "serena"`, `args = ["start-mcp-server","--project-from-cwd","--context=codex"]` |
175
+ | **pi** (this agent harness) | `pi mcp add serena -- serena start-mcp-server --context claude-code` (user-level default → `~/.pi/agent/mcp.json`; project-level: add `--local` → `.pi/mcp.json`) | command `serena` |
176
+
177
+ **pi-specific notes:** the native MCP registration replaces the old `@bacnh85/pi-serena` bridge (removed by issue #321). Two options:
178
+
179
+ - **User-level (default)** — `pi mcp add serena -- serena start-mcp-server --context claude-code` writes `~/.pi/agent/mcp.json`; fresh clones are zero-config. Ask first, like every other global write.
180
+ - **Project-level** — `pi mcp add --local serena -- serena start-mcp-server --context claude-code` writes `.pi/mcp.json` (read only after project trust is granted), keeping the choice in git:
181
+ ```json
182
+ {
183
+ "mcpServers": {
184
+ "serena": {
185
+ "command": "serena",
186
+ "args": ["start-mcp-server", "--context", "claude-code"]
187
+ }
188
+ }
189
+ }
190
+ ```
191
+ Same consent rule as the other per-workspace files (`.vscode/mcp.json`, `.cursor/mcp.json`).
192
+
193
+ Verify either option with `pi mcp list` (it connects and exits 1 on a broken entry). Tools are namespaced `mcp__serena__<tool>` (e.g. `mcp__serena__find_symbol`), so generic native names cannot collide with other MCP servers. If the full tool surface is too wide for the session, pi's per-server `toolExposure` config narrows it — the same knob the bridge solved by shipping a curated 22.
194
+
195
+ The `--context claude-code` value resolves issue #321's open question: pi is a terminal agent harness like Claude Code, so it uses Serena's `claude-code` context (not the REPL `agent_interface`, which stays out of scope — the classic `tools` interface remains the default).
196
+
197
+ **Consent gating:** the registration is asked inside the same consented question as the tool install and trust append. A project-level `.pi/mcp.json` write additionally commits a file to the repo, so it needs the same explicit yes as any other write.
175
198
 
176
199
  ### Trust — the fresh clone (global config, consent-gated)
177
200
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: unit-lane
3
3
  user-invocable: true
4
- version: 2.4.3
4
+ version: 2.5.1
5
5
  argument-hint: <NN-slug | "<idea>"> [--retriage] | --fix <issue-number> | --from-issue <issue-number>
6
6
  description: >
7
7
  One-shot lane conductor for a delivery unit: triage, implement, evidence, and
@@ -100,6 +100,11 @@ P1 — <task description> (validator: <backticked command> <expected outcome>)
100
100
  P2 — <task description> (validator: <backticked command> <expected outcome>)
101
101
  …
102
102
  Pn — last task is verification when the unit has behavior
103
+ P<n+1> — release settle, when the unit opens a PR: after the PR exists, settle
104
+ the roadmap row via the crate's writer (`agentic-workflow roadmap rowUpsert`,
105
+ status `done · [#N](<pr-url>)`, every other cell preserved) — validator:
106
+ `bun scripts/roadmap-settle.mjs` exits 0 (#316: the settle is a task the
107
+ executor owns, never a missing courtesy)
103
108
  ```
104
109
 
105
110
  Both phase grammars are accepted (owner: `phase-contract`): these bullets, or
@@ -164,7 +169,8 @@ name those files instead.
164
169
  - [ ] Every AC maps to at least one task, and no task re-decides an AC
165
170
  - [ ] Tasks are ordered smallest first
166
171
  - [ ] Each task names its validator (a backticked command plus its expected outcome)
167
- - [ ] Final task is verification (proves the whole unit works)
172
+ - [ ] Final task is verification (proves the whole unit works); a unit that
173
+ opens a PR ends with the release-settle task (#316)
168
174
  - [ ] No task reaches into a future-phase concern (docs, release, migrations)
169
175
  - [ ] Phases labeled P1, P2, … — `#308`: `S#` is the requirement id (a spec),
170
176
  `P#` is the phase label (a task); the two vocabularies never swap roles
@@ -190,7 +196,8 @@ name those files instead.
190
196
  - Do not decide at the ask stage, and do not re-ask an answered question
191
197
  - Do not bundle across phase boundaries — one phase = one commit
192
198
  - Do not plan work beyond the unit's acceptance criteria
193
- - Do not include docs/release tasks here — those are separate catalog steps
199
+ - Do not include docs/release tasks here — those are separate catalog steps;
200
+ the release-settle task above is the sole exception (#316)
194
201
  - Do not invent tasks that the ACs do not demand
195
202
  - Do not turn the sweep into a gate, stage verdict or blocking check — it routes,
196
203
  it never blocks a miss, and it adds no authority
@@ -30,7 +30,13 @@ Write into the unit doc's **References** section:
30
30
  - [ ] Branch follows the project's Workflow conventions
31
31
  - [ ] Commit messages follow conventional format (`type(scope): description`)
32
32
  - [ ] PR body includes the Evidence section as verification record
33
- - [ ] Roadmap row updated to `done` (or `merged` per conventions)
33
+ - [ ] Index row settled via the crate's writer — feature: re-emit the row with
34
+ `agentic-workflow roadmap docs/features/ROADMAP.md rowUpsert
35
+ '{"nn":"<NN>","slug":"<slug>","status":"done · [#<pr>](<pr-url>)"}'`,
36
+ every other cell as it is; fix: the `docs/fix/README.md` status cell — that
37
+ index has no `NN` column, so `rowUpsert` (the roadmap's writer) does not
38
+ apply to it. `bun scripts/roadmap-settle.mjs` exits 0 afterwards (issue
39
+ #316: the settle is code, never prose)
34
40
  - [ ] `git status --porcelain` is empty
35
41
 
36
42
  ## Allowed