pi-delegation-policy 0.16.0 → 0.17.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/CHANGELOG.md CHANGED
@@ -1,262 +1,285 @@
1
- # Changelog
2
-
3
- ## 0.16.0 - 2026-10-06
4
-
5
- ### Changed
6
-
7
- - Favor a brief consultation whenever the work presents a substantive choice, not only when the main agent notices doubt. With an advisor configured, step 1 of the `Decision order` and the `Advisor consultation:` section now cover an approach, a scope, the acceptance criteria, a comparison between options, or a decision. The policy no longer asks the main agent to recognize a doubt, a proposal or alternatives first, and no longer asks it to predict whether the second opinion would change the decision; its own confidence is not a reason to skip the call.
8
- - Remove the generic escape hatch "routine decisions need none" and replace it with one concrete limit: a local detail with no effect on an approach or a solution already fixed needs no call. The existing examples — viable approaches trading off explicit requirements, evidence supporting conflicting explanations that call for different actions, and changes with destructive data operations, difficult rollback or compatibility breaks — stay as examples, not a closed list.
9
- - Say how to brief and reuse the advisor. The brief puts the objective, the constraints, the facts and the open choice first and the proposal and reasons after, without hiding decisive data; a decisive local fact is verified instead of guessed; the agent asks for an approach, criteria or critical assumptions rather than approval or a forced list of defects, and a short reply can be enough. A follow-up continues the same thread through the host's resume mechanism on a material discrepancy or gap, the advice is reused while the decision and its assumptions hold, and it is reopened only on new relevant evidence rather than on every turn, phase or tool call.
10
- - Distinguish choosing a solution, executing a decision already fixed, checking a verifiable fact, and the preferences or authorizations reserved to the user. The advisor helps compare, recommend and decide; the decision and its responsibility stay with the main agent, and the user keeps their own preferences and authorizations.
11
-
12
- ### Compatibility
13
-
14
- No configuration, schema, model, thinking or permission change. The packaged profile, the exact references and the retention statements are unchanged.
15
-
16
- ## 0.15.1 - 2026-09-27
17
-
18
- ### Fixed
19
-
20
- - Re-apply the marked policy block in the final provider payload. Pi `0.87.1` projects a forced system prompt after `context_with_system`, so an extension that returns `systemPrompt` from `before_agent_start` could drop the block before the request left. The `before_provider_request` hook now rebuilds the current effective policy on every final invocation and rewrites only the owned block inside the instruction fields of the provider shapes the adapters use. A payload whose shape is not recognized is left untouched.
21
- - Read the effective policy on the final request instead of reusing the state loaded by the previous context hook, so a change to global defaults or to the session branch between requests applies without a new context hook.
22
- - Remove only the instruction containers this extension's own removal emptied. `off` no longer leaves an empty system block behind, a foreign empty container stays, and no instruction role is synthesized.
23
- - Restore the paragraph break the owned-block pattern consumes when the block sat after other text, so foreign instructions keep their layout.
24
-
25
- ### Changed
26
-
27
- - Refresh the effective state once per provider request. If that reload fails, the last loaded state is used so the repair is not lost.
28
-
29
- ## 0.15.0
30
-
31
- ### Changed
32
-
33
- - **Breaking:** Require Pi `0.87.1` or later. The extension refreshes its marked policy block through `context_with_system` before each LLM request, so changes made during a turn affect the next request. The former `before_agent_start` path is removed. Pi `0.84.3` and `0.85.1` are no longer supported, and there is no fallback for older hosts.
34
-
35
- ## 0.14.1 - 2026-09-21
36
-
37
- ### Changed
38
-
39
- - Say that the advisor consultation comes before investing effort, not after finding results. The step 1 added in `0.14.0` asked the main agent to evaluate a second opinion before committing to an approach, but the first real session after that release read it as permission to save the consultation for later: it decided to "keep the question for when I have findings" and used the advisor as a validator of finished work. By the time it consulted, the advisor corrected its main conclusion. The step now names that deferral as the mistake to avoid. No new obligation: a routine decision still needs no call.
40
-
41
- ## 0.14.0 - 2026-09-21
42
-
43
- ### Changed
44
-
45
- - Put the advisor consultation rule where the main agent reads procedure. It is now step 1 of the numbered `Decision order` and has its own `Advisor consultation:` section, instead of a paragraph inside the intensity rule that the decision steps never mentioned. Consulting is still a signal, not a quota.
46
- - Replace the advisor's self-assessed triggers with observable ones. "An ambiguous decision", "one that is hard to undo", "a risk the main agent cannot resolve alone" and "a substantial doubt about architecture, plan, tooling or approach" all asked the main agent to notice its own doubt, and the same paragraph offered "routine decisions need none" as the way out. The signals are now features of the work: viable approaches trade off explicit requirements; evidence supports conflicting explanations that call for different actions; or a proposed change involves destructive data operations, difficult rollback, or compatibility changes for existing consumers. Public delivery surface is deliberately not one of them, because ordinary public changes are routine.
47
- - Soften the rule for decisions that belong to the user. The main agent now considers the advisor before asking when its advice could improve the options, trade-offs or recommendation it presents, rather than consulting the advisor first.
48
-
49
- ## 0.13.0 - 2026-09-20
50
-
51
- ### Added
52
-
53
- - Add the Advisor as a full policy role, configured in `/delegate` like the others: one exact `provider/model` reference in global defaults, or `null` in a session override to turn it off, plus its own optional `thinking.advisor` policy. When `advisor` is configured and valid, the injected policy states when consulting it is worth it — an ambiguous decision, one that is hard to undo, a risk the main agent cannot resolve alone, or a substantial doubt about architecture, plan, tooling or approach — and, when a decision belongs to the user, to consult the advisor first for options, trade-offs and a recommendation to bring together with the question. Those are triggers with clear conditions, not a quota: routine decisions need no call, and nothing forces one.
54
- - Require a self-sufficient brief. The advisor cannot see the conversation, read files, or use tools, so every brief carries the objective and the decision, the constraints, the current state and the relevant evidence, the options and their consequences, what was tried or is proposed and why, and the open uncertainty. It is a conversation rather than a single ruling: the main agent continues the same thread through the host's resume mechanism to clarify, challenge or go deeper, and does not restart it for the same matter.
55
- - Ship that advisor as the packaged profile `pi-delegation-policy.advisor`, with no tools and no extensions. It cannot read files, run commands, delegate, or reach the network, and it returns plain text for the task the main agent writes. Pi's subagent mechanism discovers it and launches it as a normal subagent with the exact configured model and that role's thinking policy, so the advisor appears in the roster and fleet like any other subagent.
56
-
57
- ### Changed
58
-
59
- - **Breaking:** the Advisor is no longer a tool. `advisor_ask` and its automatic conversation window are removed, hours after `0.12.0` published them. `src/advisor-executor.ts`, `src/advisor-context.ts`, its six error codes, its 12288-byte aggregate cap, its exclusion rules, and its busy guard are gone with it. The reason: the advisor becomes a normal, visible and resumable subagent instead of a second private launch path with its own hermetic contract, and the extension goes back to launching exactly one thing, the ContextShunt reader.
60
- - The extension no longer sends conversation on its own initiative. What reaches the advisor's provider is what the main agent writes into the task, through the same host-authorized external executor, with the same retention statement and no promise of deletion. The bounded window, its 12288-byte cap, its exclusions, and `advisor-busy` no longer exist, and public documentation no longer describes them.
61
-
62
- ### Removed
63
-
64
- - Remove the `advisor_ask` tool registration, its authorization, counters, and lifecycle cleanup from `src/index.ts`, together with its tests and its package-content and boundary-scan entries. A configured advisor whose model is invalid still produces `D:ERR` and injects no policy, and that shared check still leaves the ContextShunt reader unauthorized.
65
-
66
- ## 0.12.0 - 2026-09-20
67
-
68
- ### Added
69
-
70
- - Add an optional `Advisor` role with its own model reference and thinking policy. It is off by default, does not count as an ordinary role, and configures like Visual Design: an exact reference in global defaults and `null` only as a session override. Configuring no advisor changes nothing: no extra policy text and no new requirement.
71
- - Add the explicit `advisor_ask` tool: a required `question`, optional `context`, and the `thinking` level for that call, answered with at most 8 KiB of plain-text advice plus the model and the level that produced it. Advice over the cap becomes a bounded error with no artifact or recovery surface. Failures use six bounded codes — `advisor-unavailable`, `advisor-invalid-request`, `advisor-busy`, `advisor-failed`, `advisor-timed-out`, and `advisor-cancelled` — that carry no paths, content, or secrets. One request per explicit tool may be in flight, so a busy advisor neither cancels nor disturbs an in-flight ContextShunt reader request.
72
- - Add the Advisor model and thinking rows at the end of the `/delegate` panel and the `advisor=` and `thinking-advisor=` tokens to `/delegate status`, without renaming or renumbering existing tokens.
73
-
74
- ### Changed
75
-
76
- - Raise the written schema to version 7 for the top-level `advisor` key. Defaults and session entries from schemas 2 through 6 are still read and normalized in memory without rewriting them, and a document that declares an older version is rejected if it carries `advisor` or `thinking.advisor`.
77
- - State what `advisor_ask` sends. The request is a bounded window of message text — your messages and the agent's own text, with images replaced by `[image omitted]` — one line per tool call, and the advisor thread rebuilt from the history, capped at 12288 UTF-8 bytes together with the question and extra context. A tool line names the declared path or pattern for `read`, `grep`, `find`, and `ls` only, capped at 256 bytes; every other tool contributes its name alone, never its arguments. Tool results, shell executions, extension-injected messages, compaction and branch summaries, non-message entries, and the agent's thinking are excluded.
78
- - Document that a configured advisor whose model is missing, out of scope, or unauthenticated produces `D:ERR` and injects no policy, and that the shared validation also leaves the ContextShunt reader unauthorized until the configuration is corrected. The coupling is a deliberate, documented consequence.
79
- - State the advisor's current evidence accurately: its plain-text path has been exercised end to end in a real session against a configured provider, including the conversation thread and the busy guard, but no packed matrix covers it, so its launch contract is otherwise checked against a simulated preflight.
80
- - Pin the external executor protocol version to `0.69.0`, the build actually exercised, and align the launch validator with that build's contract shape: contract version `3` and definition projection version `2`, taken from `src/api/preflight.ts` and `src/shared/launch-contract.ts`. The same build removed its `modelCandidates` field when it moved to one resolved model per launch, so the exact single `model` it reports replaces that equality: a substituted or downgraded model still fails, the remaining equalities are unchanged, and an older or newer contract is still rejected. Another executor build still fails closed.
81
-
82
- ### Security
83
-
84
- - Extend the privacy boundary to conversation extracts: the advisor request and its reply may persist in the executor's argv, temporary files, sessions, and lifecycle records, and at the model provider. No deletion or external TTL is promised.
85
- - An older package that cannot read schema 7 treats the document as invalid and falls back to `off` with a diagnostic. That is a fail-closed stop, not a smooth downgrade; the new role and tool simply do not exist there.
86
-
87
- ### Documentation
88
-
89
- - Document the ContextShunt reader in the README and the documentation site: its two tools, the settings that enable it, what one request sends, the bounded answer with citations, and its limits. The reader requires a compatible external executor; protocol version `0.69.0` is the verified one, and another build fails closed with `reader-unavailable`, with no answer and no fallback.
90
-
91
- ## 0.11.1 - 2026-09-16
92
-
93
- ### Changed
94
-
95
- - Show one row per setting in the `/delegate` panel instead of two, and move the focused row's description and provenance into a single hint block under the list, so the list no longer spends half its height repeating the same sentences. Values are aligned in one column, and thinking values show `unset`, a level, or `min..max` with the provenance in the hint.
96
- - Mark a truncated line in the effective policy preview with an ellipsis instead of cutting it silently.
97
- - Update the maintained development toolchain: the Pi packages to `0.85.1`, TypeScript to `6.0.3`, and the wiki to Astro 7.3.2, Starlight 0.42.0 and the patched `js-yaml` 4.3.2. The Pi peer range stays `>=0.84.3`, so `0.84.3` remains the minimum supported version; the explicitly checked baseline is now Pi `0.85.1`. Nothing in the published behaviour changes.
98
-
99
- ## 0.11.0 - 2026-09-16
100
-
101
- ### Added
102
-
103
- - Add an optional thinking policy per role in a top-level `thinking` object. `{ "level": "high" }` fixes one level for every launch of that role, and `{ "min": "low", "max": "high" }` lets the main agent choose inside an inclusive range; a role with no policy keeps the per-launch choice. The extension validates a configured level against the role's resolved model and reports a level the model does not support as a new `D:ERR` cause with no injection. The extension persists the configured policy, never the level chosen for an individual run. Configurations without `thinking` keep working unchanged.
104
- - Add four thinking rows to the `/delegate` panel and one `thinking-<role>` token per role to `/delegate status`, both reporting the policy and its source.
105
-
106
- ### Changed
107
-
108
- - Raise the written schema to version 6. Defaults and session entries from schemas 2 through 5 are still read and normalized in memory, keep no thinking policy, and are not rewritten; a package that cannot read schema 6 treats the document as invalid and falls back to `off` without injection.
109
- - Present the injected policy with an explicit decision order and labeled sections, so each rule's obligation and exception are stated together. Thresholds, precedence, exceptions, and role semantics are otherwise unchanged; the previous limits sentence is restated more precisely as non-enforcement at runtime.
110
-
111
- ## 0.10.0 - 2026-09-08
112
-
113
- ### Changed
114
-
115
- - When optional Visual Design is configured and a delegated visual portion meets all four existing eligibility conditions, select it before Small, Medium, or Large with its exact configured model and per-run thinking. Reevaluate eligibility for every task or phase; this priority does not make `normal` or `aggressive` delegate more work.
116
-
117
- ## 0.9.1 - 2026-09-08
118
-
119
- ### Fixed
120
-
121
- - Make ContextShunt declared-read limits line-based, measure known textual results with real UTF-8 bytes and shared newline handling, and keep rejected requests out of the admitted-request window.
122
- - Keep the one-time `allow TOKEN MAX_LINES MAX_BYTES` command while binding its authorization to one tool call and immutable input snapshot; enforce its byte maximum against the real result.
123
- - Continue accepting the deprecated schema-4 `readerOutputBytes` field for compatibility while ignoring it, omitting it from new saves, and removing its inert panel control.
124
-
125
- ## 0.9.0 - 2026-09-07
126
-
127
- ### Added
128
-
129
- - Add opt-in ContextShunt schema 4 settings, keyboard-first mode selection, recognized read and conservative PowerShell range enforcement, and bounded recovery of preserved known textual results.
130
- - Include the guided `pi-delegation-policy.bulk-reader` read-only profile with `read`, `grep`, `find`, and `ls`; compatible executors can discover it from the package, but it is not copied or launched automatically.
131
-
132
- ### Security
133
-
134
- - Keep ContextShunt off by default and preserve original results when a temporary artifact cannot be created. Temporary artifacts use opaque IDs, quotas, cancellation checks, an absolute 30-minute TTL from creation, scheduled cleanup while the process is active, and cleanup at session shutdown. Recovery does not renew the TTL; crashes and OS suspension can delay deletion.
135
-
136
- ## 0.8.0 - 2026-09-07
137
-
138
- ### Changed
139
-
140
- - Tighten `orchestrator` guidance to require delegation before all transferable execution, including detailed review and integration mechanics; require waiting for and consuming pending results, concrete gap-only reinspection, and a brief exception before minimum direct work. Size, triviality, convenience, economics, transfer cost, and final-review or integration labels are not bypasses. The published `0.7.0` policy remains unchanged.
141
-
142
- ## 0.7.0 - 2026-09-06
143
-
144
- ### Added
145
-
146
- - Add the `orchestrator` intensity with `/delegate orchestrator` and `D:ORCH`. It delegates transferable research, detailed planning, implementation, testing, writing, review, and integration mechanics while keeping objectives, critical decisions, coordination, evidence, and final acceptance with the main agent.
147
- - Add orchestrator guidance for batching small work, concise briefs and results with file references, and avoiding duplicate inspection without a concrete gap or risk.
148
-
149
- ## 0.6.0 - 2026-08-29
150
-
151
- ### Added
152
-
153
- - Allow Small, Medium, and Large to be explicitly disabled independently while requiring one enabled ordinary role for an active policy.
154
- - Add schema 3 defaults and session state, with in-memory schema 2 migration and guarded session writes for safer downgrade behavior. Downgrading after saving schema 3 defaults or manually editing them requires `/delegate off` in each active branch and manual conversion of ordinary `null` values.
155
-
156
- ### Changed
157
-
158
- - Select only enabled ordinary roles that can satisfy the task, leaving work with the main agent when none can; Small/Medium preferences are inactive when either role is disabled.
159
-
160
- ## 0.5.0 - 2026-08-28
161
-
162
- ### Added
163
-
164
- - Expanded the optional visual specialist to create assets and complete bounded presentation-layer changes when behavior and data contracts are already defined.
165
-
166
- ### Changed
167
-
168
- - Renamed the user-facing UI Design role to Visual Design while preserving the `uiDesign` configuration key and `ui-design` status token.
169
- - Clarified routing boundaries for application behavior, accessibility, checks, integration, and final acceptance.
170
-
171
- ## 0.4.1 - 2026-08-28
172
-
173
- ### Fixed
174
-
175
- - Restored per-launch thinking selection so delegation guidance transmits the chosen level with the exact configured model instead of falling through to an ambient subagent default.
176
-
177
- ## 0.4.0 - 2026-08-27
178
-
179
- ### Added
180
-
181
- - Added a compact effective-policy preview, selector guidance, and available public model metadata to the `/delegate` panel.
182
-
183
- ### Changed
184
-
185
- - Require exact `provider/model` references for delegation guidance instead of relying on a launcher default.
186
- - Clarified task-fit role selection, preference tie-breaks, dynamic advisory thinking, and current panel and status diagnostics.
187
- - Raised the Pi peer requirement and explicitly checked baseline to `0.84.3`.
188
-
189
- ## 0.3.2 - 2026-08-26
190
-
191
- ### Documentation
192
-
193
- - Refreshed the README and wiki with the current package status, safe first-use path, panel behavior, configuration hierarchy, and privacy boundaries.
194
-
195
- ## 0.3.1 - 2026-08-26
196
-
197
- ### Fixed
198
-
199
- - Matched model results to Pi's `/model` presentation: model ID first, `[provider]` last, with no more than ten visible model rows.
200
-
201
- ## 0.3.0 - 2026-08-26
202
-
203
- ### Added
204
-
205
- - Added live fuzzy model search by provider, model ID, and display name.
206
-
207
- ### Changed
208
-
209
- - Replaced the chain of unbounded selectors with one responsive, keyboard-first settings panel.
210
- - Made session edits explicit drafts with visible sources, bounded scrolling, and safe discard confirmation.
211
-
212
- ## 0.2.1 - 2026-08-26
213
-
214
- ### Fixed
215
-
216
- - Replaced `Ctrl+Alt+D` with the terminal-safe, conflict-free `Alt+G` shortcut.
217
-
218
- ## 0.2.0 - 2026-08-26
219
-
220
- ### Added
221
-
222
- - Added optional global intensity with session-branch overrides and a built-in `off` fallback.
223
- - Added **Use global default** to the intensity selector.
224
-
225
- ### Fixed
226
-
227
- - Replaced the terminal-ambiguous `Ctrl+Shift+D` shortcut with `Ctrl+Alt+D`.
228
-
229
- ## 0.1.2 - 2026-08-26
230
-
231
- ### Fixed
232
-
233
- - Restored the canonical role-selection guidance for bounded execution, planning and ambiguity, repetitive volume, and exceptional blockers.
234
- - Made the `normal` and `aggressive` thresholds and the three Small/Medium preference biases operational at their boundaries.
235
- - Corrected session-branch guidance: a session without policy state starts at `off`, while a fork inherits the latest valid entry in its active history.
236
-
237
- ## 0.1.1 - 2026-08-26
238
-
239
- ### Added
240
-
241
- - Added a public task-oriented documentation site on GitHub Pages.
242
-
243
- ### Fixed
244
-
245
- - Clarified that the selector reset action changes the draft until you apply it.
246
-
247
- ### Security
248
-
249
- - Restricted documentation deployments to `main`, isolated pull request cancellation, and pinned privileged workflow actions.
250
-
251
- ## 0.1.0 - 2026-08-25
252
-
253
- ### Added
254
-
255
- - A keyboard-first `/delegate` selector for delegation intensity, model preference, exact Small, Medium, Large, and optional UI Design roles.
256
- - Global defaults and session-branch state that begin at `off` and survive reload, resume, and tree navigation.
257
- - Fail-closed validation for missing, unavailable, out-of-scope, or unauthenticated model roles.
258
-
259
- ### Changed
260
-
261
- - Replaced the unpublished preset-based prototype with schema 2 global defaults and session-branch delegation state.
262
- - Removed project configuration, external skill loading, tool interception, enforcement, persisted per-run thinking, and model fallbacks.
1
+ # Changelog
2
+
3
+ ## 0.17.0 - 2026-10-07
4
+
5
+ ### Added
6
+
7
+ - Configure Advisor independently with `advisorMode: off|on|with-delegation`, the panel, or `/delegate advisor`. Explicit `on` permits consultation with delegation off (`D:OFF A:ON`) without ordinary roles. An omitted mode preserves the previous coupling; `off` keeps the saved model and thinking policy without validating or injecting consultation guidance.
8
+
9
+ ### Fixed
10
+
11
+ - Isolate errors by axis: an invalid enabled Advisor removes only consultation, and invalid delegation does not suppress a valid enabled Advisor. Status and the panel show `D:* A:OFF|ON|ERR`; unreported configuration diagnostics remain visible without becoming Advisor errors.
12
+ - Stop global saves before writing when either previous settings file cannot be read. If the companion write fails, attempt restoration and verify both files before reporting no changes; otherwise report a partial save and reload the observable state.
13
+ - Preserve Advisor model and thinking from readable, valid but mismatched companions while silencing consultation. Compare normalized delegation projections rather than raw-text digests, so reformatting does not invalidate the pair.
14
+ - Keep an older session's explicit removal of Advisor from inheriting a newly enabled global Advisor. Reset, invalid restoration, and interrupted session saves disable both axes.
15
+
16
+ ### Changed
17
+
18
+ - Rewrite the README and wiki around setup, modes, role thinking, commands, persistence, downgrade, and privacy.
19
+
20
+ ### Compatibility and limits
21
+
22
+ - Requires Pi `0.87.1` or later. Current state uses schema 8, but saved delegation remains schema 7, with Advisor in a companion. The actual `0.16.0` reader retains delegation after downgrade; earlier readers keep their existing limitations. Loading migrates only in memory.
23
+ - Global settings use two individually atomic replacements, not a transaction. A hard stop can leave a mismatched pair with Advisor off; concurrency checks are not locks, and another writer can change a file between a check and a replacement.
24
+ - ContextShunt remains suspended with delegation off. The extension does not launch Advisor from hooks, change the host executor, or alter the main model or thinking. Consultation still carries normal executor/provider retention, latency, and cost.
25
+
26
+ ## 0.16.0 - 2026-10-06
27
+
28
+ ### Changed
29
+
30
+ - Favor a brief consultation whenever the work presents a substantive choice, not only when the main agent notices doubt. With an advisor configured, step 1 of the `Decision order` and the `Advisor consultation:` section now cover an approach, a scope, the acceptance criteria, a comparison between options, or a decision. The policy no longer asks the main agent to recognize a doubt, a proposal or alternatives first, and no longer asks it to predict whether the second opinion would change the decision; its own confidence is not a reason to skip the call.
31
+ - Remove the generic escape hatch "routine decisions need none" and replace it with one concrete limit: a local detail with no effect on an approach or a solution already fixed needs no call. The existing examples — viable approaches trading off explicit requirements, evidence supporting conflicting explanations that call for different actions, and changes with destructive data operations, difficult rollback or compatibility breaks — stay as examples, not a closed list.
32
+ - Say how to brief and reuse the advisor. The brief puts the objective, the constraints, the facts and the open choice first and the proposal and reasons after, without hiding decisive data; a decisive local fact is verified instead of guessed; the agent asks for an approach, criteria or critical assumptions rather than approval or a forced list of defects, and a short reply can be enough. A follow-up continues the same thread through the host's resume mechanism on a material discrepancy or gap, the advice is reused while the decision and its assumptions hold, and it is reopened only on new relevant evidence rather than on every turn, phase or tool call.
33
+ - Distinguish choosing a solution, executing a decision already fixed, checking a verifiable fact, and the preferences or authorizations reserved to the user. The advisor helps compare, recommend and decide; the decision and its responsibility stay with the main agent, and the user keeps their own preferences and authorizations.
34
+
35
+ ### Compatibility
36
+
37
+ No configuration, schema, model, thinking or permission change. The packaged profile, the exact references and the retention statements are unchanged.
38
+
39
+ ## 0.15.1 - 2026-09-27
40
+
41
+ ### Fixed
42
+
43
+ - Re-apply the marked policy block in the final provider payload. Pi `0.87.1` projects a forced system prompt after `context_with_system`, so an extension that returns `systemPrompt` from `before_agent_start` could drop the block before the request left. The `before_provider_request` hook now rebuilds the current effective policy on every final invocation and rewrites only the owned block inside the instruction fields of the provider shapes the adapters use. A payload whose shape is not recognized is left untouched.
44
+ - Read the effective policy on the final request instead of reusing the state loaded by the previous context hook, so a change to global defaults or to the session branch between requests applies without a new context hook.
45
+ - Remove only the instruction containers this extension's own removal emptied. `off` no longer leaves an empty system block behind, a foreign empty container stays, and no instruction role is synthesized.
46
+ - Restore the paragraph break the owned-block pattern consumes when the block sat after other text, so foreign instructions keep their layout.
47
+
48
+ ### Changed
49
+
50
+ - Refresh the effective state once per provider request. If that reload fails, the last loaded state is used so the repair is not lost.
51
+
52
+ ## 0.15.0
53
+
54
+ ### Changed
55
+
56
+ - **Breaking:** Require Pi `0.87.1` or later. The extension refreshes its marked policy block through `context_with_system` before each LLM request, so changes made during a turn affect the next request. The former `before_agent_start` path is removed. Pi `0.84.3` and `0.85.1` are no longer supported, and there is no fallback for older hosts.
57
+
58
+ ## 0.14.1 - 2026-09-21
59
+
60
+ ### Changed
61
+
62
+ - Say that the advisor consultation comes before investing effort, not after finding results. The step 1 added in `0.14.0` asked the main agent to evaluate a second opinion before committing to an approach, but the first real session after that release read it as permission to save the consultation for later: it decided to "keep the question for when I have findings" and used the advisor as a validator of finished work. By the time it consulted, the advisor corrected its main conclusion. The step now names that deferral as the mistake to avoid. No new obligation: a routine decision still needs no call.
63
+
64
+ ## 0.14.0 - 2026-09-21
65
+
66
+ ### Changed
67
+
68
+ - Put the advisor consultation rule where the main agent reads procedure. It is now step 1 of the numbered `Decision order` and has its own `Advisor consultation:` section, instead of a paragraph inside the intensity rule that the decision steps never mentioned. Consulting is still a signal, not a quota.
69
+ - Replace the advisor's self-assessed triggers with observable ones. "An ambiguous decision", "one that is hard to undo", "a risk the main agent cannot resolve alone" and "a substantial doubt about architecture, plan, tooling or approach" all asked the main agent to notice its own doubt, and the same paragraph offered "routine decisions need none" as the way out. The signals are now features of the work: viable approaches trade off explicit requirements; evidence supports conflicting explanations that call for different actions; or a proposed change involves destructive data operations, difficult rollback, or compatibility changes for existing consumers. Public delivery surface is deliberately not one of them, because ordinary public changes are routine.
70
+ - Soften the rule for decisions that belong to the user. The main agent now considers the advisor before asking when its advice could improve the options, trade-offs or recommendation it presents, rather than consulting the advisor first.
71
+
72
+ ## 0.13.0 - 2026-09-20
73
+
74
+ ### Added
75
+
76
+ - Add the Advisor as a full policy role, configured in `/delegate` like the others: one exact `provider/model` reference in global defaults, or `null` in a session override to turn it off, plus its own optional `thinking.advisor` policy. When `advisor` is configured and valid, the injected policy states when consulting it is worth it — an ambiguous decision, one that is hard to undo, a risk the main agent cannot resolve alone, or a substantial doubt about architecture, plan, tooling or approach — and, when a decision belongs to the user, to consult the advisor first for options, trade-offs and a recommendation to bring together with the question. Those are triggers with clear conditions, not a quota: routine decisions need no call, and nothing forces one.
77
+ - Require a self-sufficient brief. The advisor cannot see the conversation, read files, or use tools, so every brief carries the objective and the decision, the constraints, the current state and the relevant evidence, the options and their consequences, what was tried or is proposed and why, and the open uncertainty. It is a conversation rather than a single ruling: the main agent continues the same thread through the host's resume mechanism to clarify, challenge or go deeper, and does not restart it for the same matter.
78
+ - Ship that advisor as the packaged profile `pi-delegation-policy.advisor`, with no tools and no extensions. It cannot read files, run commands, delegate, or reach the network, and it returns plain text for the task the main agent writes. Pi's subagent mechanism discovers it and launches it as a normal subagent with the exact configured model and that role's thinking policy, so the advisor appears in the roster and fleet like any other subagent.
79
+
80
+ ### Changed
81
+
82
+ - **Breaking:** the Advisor is no longer a tool. `advisor_ask` and its automatic conversation window are removed, hours after `0.12.0` published them. `src/advisor-executor.ts`, `src/advisor-context.ts`, its six error codes, its 12288-byte aggregate cap, its exclusion rules, and its busy guard are gone with it. The reason: the advisor becomes a normal, visible and resumable subagent instead of a second private launch path with its own hermetic contract, and the extension goes back to launching exactly one thing, the ContextShunt reader.
83
+ - The extension no longer sends conversation on its own initiative. What reaches the advisor's provider is what the main agent writes into the task, through the same host-authorized external executor, with the same retention statement and no promise of deletion. The bounded window, its 12288-byte cap, its exclusions, and `advisor-busy` no longer exist, and public documentation no longer describes them.
84
+
85
+ ### Removed
86
+
87
+ - Remove the `advisor_ask` tool registration, its authorization, counters, and lifecycle cleanup from `src/index.ts`, together with its tests and its package-content and boundary-scan entries. A configured advisor whose model is invalid still produces `D:ERR` and injects no policy, and that shared check still leaves the ContextShunt reader unauthorized.
88
+
89
+ ## 0.12.0 - 2026-09-20
90
+
91
+ ### Added
92
+
93
+ - Add an optional `Advisor` role with its own model reference and thinking policy. It is off by default, does not count as an ordinary role, and configures like Visual Design: an exact reference in global defaults and `null` only as a session override. Configuring no advisor changes nothing: no extra policy text and no new requirement.
94
+ - Add the explicit `advisor_ask` tool: a required `question`, optional `context`, and the `thinking` level for that call, answered with at most 8 KiB of plain-text advice plus the model and the level that produced it. Advice over the cap becomes a bounded error with no artifact or recovery surface. Failures use six bounded codes — `advisor-unavailable`, `advisor-invalid-request`, `advisor-busy`, `advisor-failed`, `advisor-timed-out`, and `advisor-cancelled` — that carry no paths, content, or secrets. One request per explicit tool may be in flight, so a busy advisor neither cancels nor disturbs an in-flight ContextShunt reader request.
95
+ - Add the Advisor model and thinking rows at the end of the `/delegate` panel and the `advisor=` and `thinking-advisor=` tokens to `/delegate status`, without renaming or renumbering existing tokens.
96
+
97
+ ### Changed
98
+
99
+ - Raise the written schema to version 7 for the top-level `advisor` key. Defaults and session entries from schemas 2 through 6 are still read and normalized in memory without rewriting them, and a document that declares an older version is rejected if it carries `advisor` or `thinking.advisor`.
100
+ - State what `advisor_ask` sends. The request is a bounded window of message text — your messages and the agent's own text, with images replaced by `[image omitted]` — one line per tool call, and the advisor thread rebuilt from the history, capped at 12288 UTF-8 bytes together with the question and extra context. A tool line names the declared path or pattern for `read`, `grep`, `find`, and `ls` only, capped at 256 bytes; every other tool contributes its name alone, never its arguments. Tool results, shell executions, extension-injected messages, compaction and branch summaries, non-message entries, and the agent's thinking are excluded.
101
+ - Document that a configured advisor whose model is missing, out of scope, or unauthenticated produces `D:ERR` and injects no policy, and that the shared validation also leaves the ContextShunt reader unauthorized until the configuration is corrected. The coupling is a deliberate, documented consequence.
102
+ - State the advisor's current evidence accurately: its plain-text path has been exercised end to end in a real session against a configured provider, including the conversation thread and the busy guard, but no packed matrix covers it, so its launch contract is otherwise checked against a simulated preflight.
103
+ - Pin the external executor protocol version to `0.69.0`, the build actually exercised, and align the launch validator with that build's contract shape: contract version `3` and definition projection version `2`, taken from `src/api/preflight.ts` and `src/shared/launch-contract.ts`. The same build removed its `modelCandidates` field when it moved to one resolved model per launch, so the exact single `model` it reports replaces that equality: a substituted or downgraded model still fails, the remaining equalities are unchanged, and an older or newer contract is still rejected. Another executor build still fails closed.
104
+
105
+ ### Security
106
+
107
+ - Extend the privacy boundary to conversation extracts: the advisor request and its reply may persist in the executor's argv, temporary files, sessions, and lifecycle records, and at the model provider. No deletion or external TTL is promised.
108
+ - An older package that cannot read schema 7 treats the document as invalid and falls back to `off` with a diagnostic. That is a fail-closed stop, not a smooth downgrade; the new role and tool simply do not exist there.
109
+
110
+ ### Documentation
111
+
112
+ - Document the ContextShunt reader in the README and the documentation site: its two tools, the settings that enable it, what one request sends, the bounded answer with citations, and its limits. The reader requires a compatible external executor; protocol version `0.69.0` is the verified one, and another build fails closed with `reader-unavailable`, with no answer and no fallback.
113
+
114
+ ## 0.11.1 - 2026-09-16
115
+
116
+ ### Changed
117
+
118
+ - Show one row per setting in the `/delegate` panel instead of two, and move the focused row's description and provenance into a single hint block under the list, so the list no longer spends half its height repeating the same sentences. Values are aligned in one column, and thinking values show `unset`, a level, or `min..max` with the provenance in the hint.
119
+ - Mark a truncated line in the effective policy preview with an ellipsis instead of cutting it silently.
120
+ - Update the maintained development toolchain: the Pi packages to `0.85.1`, TypeScript to `6.0.3`, and the wiki to Astro 7.3.2, Starlight 0.42.0 and the patched `js-yaml` 4.3.2. The Pi peer range stays `>=0.84.3`, so `0.84.3` remains the minimum supported version; the explicitly checked baseline is now Pi `0.85.1`. Nothing in the published behaviour changes.
121
+
122
+ ## 0.11.0 - 2026-09-16
123
+
124
+ ### Added
125
+
126
+ - Add an optional thinking policy per role in a top-level `thinking` object. `{ "level": "high" }` fixes one level for every launch of that role, and `{ "min": "low", "max": "high" }` lets the main agent choose inside an inclusive range; a role with no policy keeps the per-launch choice. The extension validates a configured level against the role's resolved model and reports a level the model does not support as a new `D:ERR` cause with no injection. The extension persists the configured policy, never the level chosen for an individual run. Configurations without `thinking` keep working unchanged.
127
+ - Add four thinking rows to the `/delegate` panel and one `thinking-<role>` token per role to `/delegate status`, both reporting the policy and its source.
128
+
129
+ ### Changed
130
+
131
+ - Raise the written schema to version 6. Defaults and session entries from schemas 2 through 5 are still read and normalized in memory, keep no thinking policy, and are not rewritten; a package that cannot read schema 6 treats the document as invalid and falls back to `off` without injection.
132
+ - Present the injected policy with an explicit decision order and labeled sections, so each rule's obligation and exception are stated together. Thresholds, precedence, exceptions, and role semantics are otherwise unchanged; the previous limits sentence is restated more precisely as non-enforcement at runtime.
133
+
134
+ ## 0.10.0 - 2026-09-08
135
+
136
+ ### Changed
137
+
138
+ - When optional Visual Design is configured and a delegated visual portion meets all four existing eligibility conditions, select it before Small, Medium, or Large with its exact configured model and per-run thinking. Reevaluate eligibility for every task or phase; this priority does not make `normal` or `aggressive` delegate more work.
139
+
140
+ ## 0.9.1 - 2026-09-08
141
+
142
+ ### Fixed
143
+
144
+ - Make ContextShunt declared-read limits line-based, measure known textual results with real UTF-8 bytes and shared newline handling, and keep rejected requests out of the admitted-request window.
145
+ - Keep the one-time `allow TOKEN MAX_LINES MAX_BYTES` command while binding its authorization to one tool call and immutable input snapshot; enforce its byte maximum against the real result.
146
+ - Continue accepting the deprecated schema-4 `readerOutputBytes` field for compatibility while ignoring it, omitting it from new saves, and removing its inert panel control.
147
+
148
+ ## 0.9.0 - 2026-09-07
149
+
150
+ ### Added
151
+
152
+ - Add opt-in ContextShunt schema 4 settings, keyboard-first mode selection, recognized read and conservative PowerShell range enforcement, and bounded recovery of preserved known textual results.
153
+ - Include the guided `pi-delegation-policy.bulk-reader` read-only profile with `read`, `grep`, `find`, and `ls`; compatible executors can discover it from the package, but it is not copied or launched automatically.
154
+
155
+ ### Security
156
+
157
+ - Keep ContextShunt off by default and preserve original results when a temporary artifact cannot be created. Temporary artifacts use opaque IDs, quotas, cancellation checks, an absolute 30-minute TTL from creation, scheduled cleanup while the process is active, and cleanup at session shutdown. Recovery does not renew the TTL; crashes and OS suspension can delay deletion.
158
+
159
+ ## 0.8.0 - 2026-09-07
160
+
161
+ ### Changed
162
+
163
+ - Tighten `orchestrator` guidance to require delegation before all transferable execution, including detailed review and integration mechanics; require waiting for and consuming pending results, concrete gap-only reinspection, and a brief exception before minimum direct work. Size, triviality, convenience, economics, transfer cost, and final-review or integration labels are not bypasses. The published `0.7.0` policy remains unchanged.
164
+
165
+ ## 0.7.0 - 2026-09-06
166
+
167
+ ### Added
168
+
169
+ - Add the `orchestrator` intensity with `/delegate orchestrator` and `D:ORCH`. It delegates transferable research, detailed planning, implementation, testing, writing, review, and integration mechanics while keeping objectives, critical decisions, coordination, evidence, and final acceptance with the main agent.
170
+ - Add orchestrator guidance for batching small work, concise briefs and results with file references, and avoiding duplicate inspection without a concrete gap or risk.
171
+
172
+ ## 0.6.0 - 2026-08-29
173
+
174
+ ### Added
175
+
176
+ - Allow Small, Medium, and Large to be explicitly disabled independently while requiring one enabled ordinary role for an active policy.
177
+ - Add schema 3 defaults and session state, with in-memory schema 2 migration and guarded session writes for safer downgrade behavior. Downgrading after saving schema 3 defaults or manually editing them requires `/delegate off` in each active branch and manual conversion of ordinary `null` values.
178
+
179
+ ### Changed
180
+
181
+ - Select only enabled ordinary roles that can satisfy the task, leaving work with the main agent when none can; Small/Medium preferences are inactive when either role is disabled.
182
+
183
+ ## 0.5.0 - 2026-08-28
184
+
185
+ ### Added
186
+
187
+ - Expanded the optional visual specialist to create assets and complete bounded presentation-layer changes when behavior and data contracts are already defined.
188
+
189
+ ### Changed
190
+
191
+ - Renamed the user-facing UI Design role to Visual Design while preserving the `uiDesign` configuration key and `ui-design` status token.
192
+ - Clarified routing boundaries for application behavior, accessibility, checks, integration, and final acceptance.
193
+
194
+ ## 0.4.1 - 2026-08-28
195
+
196
+ ### Fixed
197
+
198
+ - Restored per-launch thinking selection so delegation guidance transmits the chosen level with the exact configured model instead of falling through to an ambient subagent default.
199
+
200
+ ## 0.4.0 - 2026-08-27
201
+
202
+ ### Added
203
+
204
+ - Added a compact effective-policy preview, selector guidance, and available public model metadata to the `/delegate` panel.
205
+
206
+ ### Changed
207
+
208
+ - Require exact `provider/model` references for delegation guidance instead of relying on a launcher default.
209
+ - Clarified task-fit role selection, preference tie-breaks, dynamic advisory thinking, and current panel and status diagnostics.
210
+ - Raised the Pi peer requirement and explicitly checked baseline to `0.84.3`.
211
+
212
+ ## 0.3.2 - 2026-08-26
213
+
214
+ ### Documentation
215
+
216
+ - Refreshed the README and wiki with the current package status, safe first-use path, panel behavior, configuration hierarchy, and privacy boundaries.
217
+
218
+ ## 0.3.1 - 2026-08-26
219
+
220
+ ### Fixed
221
+
222
+ - Matched model results to Pi's `/model` presentation: model ID first, `[provider]` last, with no more than ten visible model rows.
223
+
224
+ ## 0.3.0 - 2026-08-26
225
+
226
+ ### Added
227
+
228
+ - Added live fuzzy model search by provider, model ID, and display name.
229
+
230
+ ### Changed
231
+
232
+ - Replaced the chain of unbounded selectors with one responsive, keyboard-first settings panel.
233
+ - Made session edits explicit drafts with visible sources, bounded scrolling, and safe discard confirmation.
234
+
235
+ ## 0.2.1 - 2026-08-26
236
+
237
+ ### Fixed
238
+
239
+ - Replaced `Ctrl+Alt+D` with the terminal-safe, conflict-free `Alt+G` shortcut.
240
+
241
+ ## 0.2.0 - 2026-08-26
242
+
243
+ ### Added
244
+
245
+ - Added optional global intensity with session-branch overrides and a built-in `off` fallback.
246
+ - Added **Use global default** to the intensity selector.
247
+
248
+ ### Fixed
249
+
250
+ - Replaced the terminal-ambiguous `Ctrl+Shift+D` shortcut with `Ctrl+Alt+D`.
251
+
252
+ ## 0.1.2 - 2026-08-26
253
+
254
+ ### Fixed
255
+
256
+ - Restored the canonical role-selection guidance for bounded execution, planning and ambiguity, repetitive volume, and exceptional blockers.
257
+ - Made the `normal` and `aggressive` thresholds and the three Small/Medium preference biases operational at their boundaries.
258
+ - Corrected session-branch guidance: a session without policy state starts at `off`, while a fork inherits the latest valid entry in its active history.
259
+
260
+ ## 0.1.1 - 2026-08-26
261
+
262
+ ### Added
263
+
264
+ - Added a public task-oriented documentation site on GitHub Pages.
265
+
266
+ ### Fixed
267
+
268
+ - Clarified that the selector reset action changes the draft until you apply it.
269
+
270
+ ### Security
271
+
272
+ - Restricted documentation deployments to `main`, isolated pull request cancellation, and pinned privileged workflow actions.
273
+
274
+ ## 0.1.0 - 2026-08-25
275
+
276
+ ### Added
277
+
278
+ - A keyboard-first `/delegate` selector for delegation intensity, model preference, exact Small, Medium, Large, and optional UI Design roles.
279
+ - Global defaults and session-branch state that begin at `off` and survive reload, resume, and tree navigation.
280
+ - Fail-closed validation for missing, unavailable, out-of-scope, or unauthenticated model roles.
281
+
282
+ ### Changed
283
+
284
+ - Replaced the unpublished preset-based prototype with schema 2 global defaults and session-branch delegation state.
285
+ - Removed project configuration, external skill loading, tool interception, enforcement, persisted per-run thinking, and model fallbacks.