@narumitw/pi-plan-mode 0.51.0 → 0.52.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
@@ -15,6 +15,7 @@ This independently installable extension adds a Codex-like `/plan` collaboration
15
15
  - Starts implementation in the planning session or a fresh linked session with the exact approved plan.
16
16
  - Persists Plan state and one saved plan across resume and compaction.
17
17
  - Exposes statusline state and configurable tool visibility, export destination, handoff behavior, shortcut, and thinking level.
18
+ - Cooperates anonymously with Workflow Mutex Protocol v1 participants so only one agent workflow starts in a session.
18
19
 
19
20
  ## 📦 Install
20
21
 
@@ -122,11 +123,14 @@ Tests and builds may still write ignored caches or build artifacts and may execu
122
123
  This is extension-level risk reduction, not an OS sandbox.
123
124
 
124
125
  `plan_mode_question` follows Codex's `request_user_input` pattern: the agent can ask 1-3 concise questions, each with meaningful options and a free-form Other path.
125
- In TUI mode, one question appears at a time with question tabs and a final Review tab.
126
+ In TUI mode, a single question shows its header as plain muted text, submits as soon as its preset or custom answer is confirmed, and does not show tabs, Review, or question-navigation controls.
127
+ Add an optional note with `n` before confirming a single preset answer.
128
+ With two or three questions, one question appears at a time with question tabs and a final Review tab.
126
129
  Use Tab, Shift+Tab, left, or right to visit any question or Review, including unanswered future questions.
127
- Use up and down to choose an option, Enter to record it and advance, or `n` to record the highlighted option and open its optional note editor. Press `n` again on an answered item to edit or clear its note.
130
+ Use up and down to choose an option, Enter to record it and advance, or `n` to record the highlighted option and open its optional note editor.
131
+ Press `n` again on an answered item to edit or clear its note.
128
132
  Revisit a question to replace its answer; changing the chosen option clears its prior note.
129
- Review lists every answer and note, lets up and down select an answer for note editing, and submits the ordered payload only after every question is answered.
133
+ Review lists every answer and note, blocks incomplete submission, and requires returning to a question to edit its answer or note.
130
134
  Custom answers and notes retain their raw submitted text in the tool result, while terminal rendering is sanitized.
131
135
  The TUI rejects either field above 4,000 characters instead of truncating it.
132
136
  RPC keeps the existing sequential `select` and `editor` dialogs because Pi RPC cannot render custom TUI components.
@@ -218,9 +222,38 @@ During implementation, it removes both the original implementation handoff and t
218
222
  /plan exit
219
223
  ```
220
224
 
225
+ ## 🤝 Workflow coexistence
226
+
227
+ Plan mode is independently installable and keeps its standalone behavior when no other protocol participant is present.
228
+ On the characterized Pi `0.84.2` runtime, it participates in the anonymous `workflow:mutex:v1` `agent-workflow` group.
229
+ It holds the group while Planning is active, while a completed plan awaits review, and while revision is underway.
230
+ Saved plans and ordinary implementation after Plan handoff do not hold the group.
231
+
232
+ Every inactive start performs one final synchronous admission after asynchronous preflight and before changing Plan state, persistence, prompts, tools, thinking level, queues, or status.
233
+ If another participant is active, TUI and RPC show an anonymous warning that another workflow is active.
234
+ Print and JSON direct routes throw the same anonymous error before mutation.
235
+ Launch-menu, selected-tool, shortcut, startup-flag, active-implementation **Start a new plan**, and restored activation use the same admission boundary.
236
+ A rejected selected-tool launch does not save its draft choices.
237
+
238
+ Restored active Plan state acquires before restoring restrictive tools, thinking, status, or model hooks.
239
+ If restoration is busy, Plan mode stays non-running, leaves persisted history untouched, does not alter active tools, and requires a later reload or explicit new start after the other workflow ends.
240
+ Planning-session cancellation during a fresh implementation preflight keeps the source Plan and its ownership.
241
+ Successful session replacement relies on source-session shutdown to clean up and release; the destination's ordinary active implementation does not acquire the Plan mutex.
242
+
243
+ The coexistence guarantee is cooperative and applies only when every contender implements v1 on the characterized Pi runtime and shares its event bus and session-manager identity.
244
+ A pre-v1, mixed-version, non-participating, forked, or otherwise uncharacterized counterpart remains unsupported for mutual exclusion.
245
+ Plan mode does not identify, inspect, configure, start, stop, or depend on another extension.
246
+ Guaranteed coexistence with Goal requires `@narumitw/pi-goal` `0.53.0` or newer and this package at `0.52.0` or newer on the characterized Pi `0.84.2` runtime.
247
+
248
+ | Installation | Support |
249
+ | --- | --- |
250
+ | Plan mode without another workflow participant | Supported standalone behavior |
251
+ | Plan mode `>=0.52.0` with Goal `>=0.53.0` on Pi `0.84.2` | Workflow Mutex v1 coexistence guarantee |
252
+ | Either package below its floor, or another Pi runtime | Standalone behavior only; mutual exclusion unsupported |
253
+
221
254
  ## 🛠️ Tools
222
255
 
223
- - `plan_mode_question` asks up to three structured questions, supports optional answer notes, and reviews the ordered result before TUI submission.
256
+ - `plan_mode_question` asks up to three structured questions, supports optional answer notes, submits one answer directly, and reviews multiple answers before TUI submission.
224
257
  - `plan_mode_complete` records the complete approved Markdown plan and terminates the planning turn when called alone.
225
258
 
226
259
  ## ⚙️ Settings