ytdb-slate 0.18.0 → 0.20.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 +15 -0
- package/README.md +1 -1
- package/docs/configuration.md +37 -5
- package/docs/context-budget.md +187 -152
- package/docs/model-routing.md +96 -37
- package/docs/safety-and-trust.md +1 -1
- package/extension/episodes.ts +5 -1
- package/extension/handoff.ts +14 -18
- package/extension/index.ts +1 -1
- package/extension/logical-model-definitions.ts +50 -17
- package/extension/logical-model-resolver.ts +2 -1
- package/extension/mode.ts +1 -1
- package/extension/model-default.ts +3 -3
- package/extension/notification-native.ts +8 -2
- package/extension/state.ts +1 -1
- package/extension/tools.ts +167 -48
- package/extension/worker.ts +20 -14
- package/package.json +5 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Approved update notes for Slate releases appear here.
|
|
4
|
+
|
|
5
|
+
## [0.20.0]
|
|
6
|
+
|
|
7
|
+
Slate now uses a default `contextBudget` of 400,000 tokens for every provider. Sessions with a provider other than Anthropic can run longer before a handoff to a new session. The `threads` tool now returns short pages and uses less context. Native notifications on Windows now find Windows PowerShell under a different Start menu name. Use pi 1.6.0 or later.
|
|
8
|
+
|
|
9
|
+
https://github.com/JetBrains/ytdb-slate/releases/tag/v0.20.0
|
|
10
|
+
|
|
11
|
+
## [0.19.0]
|
|
12
|
+
|
|
13
|
+
Slate now recommends Sol 6.2 for most worker tasks, Astra 6.2 for design reviews, and Fable 5.2 to diagnose repeated implementation failures. Use pi 1.5.2 or later. Check your model list before updating. Slate now sends worker output to OpenAI for summaries by default. You can keep Anthropic Sonnet 5.5 in `router.compressor.models`.
|
|
14
|
+
|
|
15
|
+
https://github.com/JetBrains/ytdb-slate/releases/tag/v0.19.0
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Slate comes from the [YouTrackDB](https://github.com/JetBrains/youtrackdb) team,
|
|
|
17
17
|
|
|
18
18
|
## Quick start
|
|
19
19
|
|
|
20
|
-
Use pi 1.
|
|
20
|
+
Use pi 1.6.0 or later. Older pi can load Slate but is unsupported. Slate has no runtime version warning. Install and authenticate [pi](https://pi.dev/docs/latest/quickstart), then pin Slate in your project:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
pi install -l npm:ytdb-slate@<version>
|
package/docs/configuration.md
CHANGED
|
@@ -67,7 +67,7 @@ The project must be trusted before Slate reads this file. Start a new session af
|
|
|
67
67
|
| `requestThrottle.baseWaitMs` | number | `1000` | Base delay before a blocked request rechecks capacity. The value must be a whole number from 1 through 60000. A positive minimum prevents a repeated zero-delay loop. |
|
|
68
68
|
| `requestThrottle.jitterMs` | number | `1000` | Uniform random extra delay from zero through this inclusive bound before a blocked request rechecks. The value must be a whole number from 0 through 60000. Admission is approximately fair. It is not first-in-first-out and does not promise a bounded wait. |
|
|
69
69
|
| `maxConcurrent` | number | `8` | Maximum concurrent worker actions per manager. Accepts positive safe integers only. Invalid input warns and selects 8. Excess actions wait for a slot. Every action has its own thread. See the worker-limit guidance below and `docs/design-principles.md` §5. |
|
|
70
|
-
| `contextBudget` | number \| object | `
|
|
70
|
+
| `contextBudget` | number \| object | `400000` | Sets the orchestrator's pause threshold in tokens. Slate lowers the threshold when the model's context window requires it. See [Orchestrator context budget](context-budget.md) for the handoff and per-model overrides. |
|
|
71
71
|
| `orchestratorPromptDocs` | string[] | `[]` | Markdown files whose paths follow the source rules above and whose **contents** are appended to the orchestrator system prompt. |
|
|
72
72
|
| `workerPromptDocs` | string[] | `[]` | Markdown files whose **contents** are appended to every worker-thread system prompt. |
|
|
73
73
|
| `workflow.draftPRs` | boolean | `false` | Enable one draft pull request for the whole change on one branch. See [pr-publishing.md](pr-publishing.md) § One draft pull request and § Creation. |
|
|
@@ -84,8 +84,8 @@ The project must be trusted before Slate reads this file. Start a new session af
|
|
|
84
84
|
| `writing.findings` | boolean | `true` | Include the latest model-visible writing findings in the hidden reminder. An invalid value warns and falls back to `true`. Measurement continues when this value is `false`. The status line follows `writing.showStatus`. |
|
|
85
85
|
| `doctrineExtraPath` | string | — | Markdown whose **content** is appended to the orchestrator doctrine (project-specific workflow additions). |
|
|
86
86
|
| `reviewPerspectivesPath` | string | — | Review charters, each declaring its own finding-ID prefix. The doctrine references this **path**; the orchestrator reads the file alongside the shipped review rules. |
|
|
87
|
-
| `router.models` | object | shipped
|
|
88
|
-
| `router.compressor.models` | array of `{ model, effort }` | `[{"model":"
|
|
87
|
+
| `router.models` | object | shipped four-model default pool | Ordinary membership and definitions. `include` replaces the starting membership, including with an empty list. `add` accepts complete new definitions. `replace` changes selected fields. `exclude` applies last. Within each model definition, lists and provider maps replace shipped fields. The home and project configuration files merge first. |
|
|
88
|
+
| `router.compressor.models` | array of `{ model, effort }` | `[{"model":"sol-6.2","effort":"low"}]` | Independent ordered compressor list. An explicit empty list blocks work. |
|
|
89
89
|
|
|
90
90
|
Notification settings define permissions and text policy. Slate validates these settings at session start. Slate registers terminal, bell, native and push delivery channels. A channel is one delivery route. Slate registers no notification tool. See [Notifications](#notifications) for automatic delivery and setup.
|
|
91
91
|
|
|
@@ -381,9 +381,13 @@ A native failure does not stop other channels.
|
|
|
381
381
|
| --- | --- | --- |
|
|
382
382
|
| Linux | `notify-send` from an absolute search-path directory outside the project and `node_modules`. A desktop display and a user notification service must be available in pi's environment. | 5,000 milliseconds |
|
|
383
383
|
| macOS | `/usr/bin/osascript` uses the user's notification service. Check the notification permission for the sender on your machine. | 5,000 milliseconds |
|
|
384
|
-
| Windows | Windows PowerShell 5.1 at the system path. Slate
|
|
384
|
+
| Windows | Windows PowerShell 5.1 at the system path. Slate needs a registered entry in the Start applications folder. | 10,000 milliseconds |
|
|
385
385
|
|
|
386
|
-
|
|
386
|
+
Slate selects the first entry named `Windows PowerShell`, ignoring case.
|
|
387
|
+
If no entry has that name, Slate compares each entry's registered application identity with one fixed value.
|
|
388
|
+
That value is the identity Windows registers for the system Windows PowerShell executable.
|
|
389
|
+
Slate selects the first match.
|
|
390
|
+
Slate does not inspect shortcut targets.
|
|
387
391
|
The Start applications folder is the application list that `Get-StartApps` enumerates.
|
|
388
392
|
The production helper reads that folder directly and disables PowerShell module auto-loading.
|
|
389
393
|
|
|
@@ -549,6 +553,34 @@ Repeat from an inactive tmux window with the documented passthrough permission.
|
|
|
549
553
|
Record the host, client, versions, settings and observed result.
|
|
550
554
|
Do not report unavailable checks as successful delivery.
|
|
551
555
|
|
|
556
|
+
## Default routing and compression
|
|
557
|
+
|
|
558
|
+
The default ordinary pool is `luna-6`, `sol-6.2`, `astra-6.2`, and `fable-5-2`, in that order.
|
|
559
|
+
A dispatch naming `gemini-3.8-flash` or `claude-sonnet-5.5` is refused unless `router.models.include` names it.
|
|
560
|
+
A main session on a Sonnet or Gemini route has no logical model by default.
|
|
561
|
+
The same applies to older Sol, Astra, and Opus routes.
|
|
562
|
+
Main recovery stops and asks for a model choice. Handoff adoption pauses.
|
|
563
|
+
|
|
564
|
+
The default compressor is `sol-6.2` at `low`.
|
|
565
|
+
Ordinary Sol 6.2 keeps effort `high`.
|
|
566
|
+
Compression sends completed worker content to provider `openai` by default.
|
|
567
|
+
Without the `openai/gpt-6.2-sol` route or OpenAI credentials, every episode
|
|
568
|
+
keeps the bounded uncompressed result with the existing compression-failure notice.
|
|
569
|
+
Compression requests on OpenAI GPT-6-or-later routes use a context window of at least 1,050,000 tokens.
|
|
570
|
+
A larger registered window is kept. Only the compression request model changes.
|
|
571
|
+
Worker sessions, the main session, registry entries, prices, cost tiers and route identity stay unchanged.
|
|
572
|
+
|
|
573
|
+
Above 272,000 input tokens, the provider bills long-context rates for the full request.
|
|
574
|
+
The provider accepts at most 922,000 input tokens.
|
|
575
|
+
It rejects larger input, which produces the existing compression-failure notice.
|
|
576
|
+
|
|
577
|
+
The 300,000-character transcript limit and 4,096-token output limit still apply.
|
|
578
|
+
The task and diagnostics add input beyond the transcript limit.
|
|
579
|
+
Compression requests stay outside worker pacing.
|
|
580
|
+
|
|
581
|
+
`claude-sonnet-5.5` is unused by default.
|
|
582
|
+
It can be named in `router.models.include` or `router.compressor.models`.
|
|
583
|
+
|
|
552
584
|
## Extended example
|
|
553
585
|
|
|
554
586
|
The `docs/agents/...` values below are placeholders. Point them at Markdown files that exist in your project.
|
package/docs/context-budget.md
CHANGED
|
@@ -7,37 +7,39 @@ This document is reference documentation, not workflow doctrine.
|
|
|
7
7
|
|
|
8
8
|
## Why absolute tokens, not a percentage
|
|
9
9
|
|
|
10
|
-
pi
|
|
11
|
-
|
|
12
|
-
`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
cannot express a consistent
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
10
|
+
pi registers `anthropic/claude-sonnet-5-5` and `anthropic/claude-opus-5-5`
|
|
11
|
+
with 1,000,000-token context windows. It registers `openai/gpt-6.1-sol`,
|
|
12
|
+
`openai/gpt-6-luna` and `openai/gpt-6-astra` with 272,000-token windows.
|
|
13
|
+
It registers `google-vertex/gemini-3.8-flash` with 1,048,576 tokens.
|
|
14
|
+
|
|
15
|
+
One percentage cannot express a consistent budget across these windows.
|
|
16
|
+
For example, 40% of the `anthropic/claude-sonnet-5-5` window is 400,000 tokens.
|
|
17
|
+
For `openai/gpt-6.1-sol`, 40% is 108,800 tokens.
|
|
18
|
+
An absolute budget states the token count directly.
|
|
19
|
+
|
|
20
|
+
## OpenAI long-context pricing
|
|
21
|
+
|
|
22
|
+
For `openai/gpt-6.1-sol`, a request above 272,000 input tokens uses long-context
|
|
23
|
+
rates for the full request. The input and cache rates double.
|
|
24
|
+
The output rate rises by a factor of 1.5.
|
|
25
|
+
The registered rates in dollars per million tokens are:
|
|
26
|
+
|
|
27
|
+
| Token type | Up to 272,000 input tokens | Above 272,000 input tokens |
|
|
28
|
+
| --- | ---: | ---: |
|
|
29
|
+
| Input | 2 | 4 |
|
|
30
|
+
| Output | 10 | 15 |
|
|
31
|
+
| Cache read | 0.10 | 0.20 |
|
|
32
|
+
| Cache write | 2.50 | 5 |
|
|
33
|
+
|
|
34
|
+
An agent loop resends the conversation on each turn.
|
|
35
|
+
A prompt cache hit can lower the cost of reused input tokens.
|
|
36
|
+
Cached tokens still count toward the pricing boundary and the context window.
|
|
37
|
+
|
|
38
|
+
## Default
|
|
39
|
+
|
|
40
|
+
The built-in budget is **400,000 tokens** for every provider.
|
|
41
|
+
The [clamp](#the-clamp) can lower the effective budget for smaller windows.
|
|
42
|
+
The budget is a pause threshold, not a price limit.
|
|
41
43
|
|
|
42
44
|
## Configuration
|
|
43
45
|
|
|
@@ -54,38 +56,32 @@ or an object:
|
|
|
54
56
|
```json
|
|
55
57
|
{
|
|
56
58
|
"contextBudget": {
|
|
57
|
-
"tokens":
|
|
59
|
+
"tokens": 350000,
|
|
58
60
|
"overrides": [
|
|
59
|
-
{ "match": "openai/gpt-
|
|
60
|
-
{ "match": "anthropic/.*", "tokens": 400000 }
|
|
61
|
+
{ "match": "openai/gpt-6\\.1-sol", "tokens": 240000 }
|
|
61
62
|
]
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
Each override's `match` is
|
|
67
|
-
`provider/id`
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
warned about and never silently changes behavior; what applies
|
|
71
|
-
afterwards depends on where the damage is:
|
|
67
|
+
Each override's `match` is a regular expression that matches the full
|
|
68
|
+
`provider/id` value. Slate uses the first matching override in file order.
|
|
69
|
+
Without a match, Slate uses `tokens` if set, or the built-in default.
|
|
70
|
+
Slate warns about invalid input:
|
|
72
71
|
|
|
73
72
|
- An invalid WHOLE value (bad number, wrong type) is treated as if
|
|
74
73
|
`contextBudget` were unset: legacy percent mode if
|
|
75
|
-
`pauseThresholdPercent` is configured, built-in budget
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
fill the scalar layer.
|
|
80
|
-
- An invalid override entry is skipped — the next layer of the
|
|
81
|
-
precedence chain applies.
|
|
74
|
+
`pauseThresholdPercent` is configured, or the built-in budget otherwise.
|
|
75
|
+
- Slate drops an invalid `tokens` value from an otherwise valid object.
|
|
76
|
+
The object still selects budget mode.
|
|
77
|
+
- Slate skips an invalid override entry.
|
|
82
78
|
|
|
83
79
|
Legacy note: `pauseThresholdPercent` is deprecated; it keeps its
|
|
84
80
|
exact old semantics only when it is set AND `contextBudget` is
|
|
85
81
|
absent or entirely invalid — an invalid budget sanitizes to absent
|
|
86
82
|
and never disables the percent. A PARTIALLY invalid object (e.g.
|
|
87
83
|
`{"tokens": -1}`) remains a valid budget object: budget mode with
|
|
88
|
-
built-in
|
|
84
|
+
the built-in budget, percent ignored.
|
|
89
85
|
|
|
90
86
|
## The clamp
|
|
91
87
|
|
|
@@ -107,16 +103,20 @@ immediately but mid-session settings-file edits do not. If the settings reader
|
|
|
107
103
|
fails, Slate keeps its fallback of 16,384. The formula and half-window floor
|
|
108
104
|
above remain unchanged.
|
|
109
105
|
|
|
110
|
-
|
|
106
|
+
With the built-in budget and the default compaction reserve:
|
|
107
|
+
|
|
108
|
+
| Context window (tokens) | Effective budget (tokens) |
|
|
111
109
|
| --- | --- |
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
110
|
+
| 200,000 | 150,848 |
|
|
111
|
+
| 272,000 | 222,848 |
|
|
112
|
+
| 400,000 | 350,848 |
|
|
113
|
+
| 1,000,000 | 400,000 |
|
|
116
114
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
The clamp subtracts a 32,768-token margin from Pi's compaction threshold
|
|
116
|
+
(the context window minus the reserve). The half-window floor can reduce
|
|
117
|
+
this margin. With a large reserve, the floor can put the pause threshold
|
|
118
|
+
above Pi's compaction threshold. Slate can cancel the first threshold
|
|
119
|
+
compaction and pause instead. This does not guarantee room for the brief.
|
|
120
120
|
|
|
121
121
|
## Writing-reminder cadence
|
|
122
122
|
|
|
@@ -197,28 +197,28 @@ characters. Tool names use 64 characters. Descriptions use 140 characters.
|
|
|
197
197
|
|
|
198
198
|
| fixture | paths | portable characters | lines |
|
|
199
199
|
| --- | ---: | ---: | ---: |
|
|
200
|
-
| shipped logical section | 0 |
|
|
201
|
-
| trusted shipped-default doctrine | 5 |
|
|
200
|
+
| shipped logical section | 0 | 4,528 | 9 |
|
|
201
|
+
| trusted shipped-default doctrine | 5 | 9,336 | 72 |
|
|
202
202
|
| untrusted doctrine without a home configuration file | 4 | 2,711 | 33 |
|
|
203
|
-
| draft pull requests, shipped policy | 6 |
|
|
204
|
-
| capped workers, shipped policy | 5 |
|
|
205
|
-
| draft plus capped workers | 6 |
|
|
206
|
-
| deferred issues plus capped workers | 5 |
|
|
207
|
-
| routing recommendations plus capped workers | 5 |
|
|
208
|
-
| draft plus deferred issues and capped workers | 6 |
|
|
209
|
-
| draft plus routing recommendations and capped workers | 6 |
|
|
210
|
-
| deferred issues plus routing recommendations and capped workers | 5 |
|
|
211
|
-
| canonical maximal baseline with all workflow options | 6 |
|
|
212
|
-
| maximal baseline with an open change | 6 |
|
|
213
|
-
| maximal baseline with source and legacy root log | 6 |
|
|
214
|
-
| dogfood `.pi/slate.json` and its two extension units | 6 |
|
|
215
|
-
| runtime boundary plus draft and capped workers, source and legacy log | 6 | 26,053 |
|
|
216
|
-
| runtime boundary plus draft and deferred issues, source and legacy log | 6 | 26,127 |
|
|
217
|
-
| runtime boundary plus routing recommendations, source and legacy log | 5 | 26,036 |
|
|
218
|
-
| runtime boundary plus deferred issues and routing recommendations, source and legacy log | 5 | 26,110 |
|
|
219
|
-
| runtime boundary plus draft and routing recommendations, source and legacy log | 6 | 26,102 |
|
|
220
|
-
| same boundary composition plus deferred issues | 6 | 26,176 |
|
|
221
|
-
| valid shipped policy plus 88 capped worker tools, source and legacy log | 6 | 28,
|
|
203
|
+
| draft pull requests, shipped policy | 6 | 9,406 | 73 |
|
|
204
|
+
| capped workers, shipped policy | 5 | 10,683 | 82 |
|
|
205
|
+
| draft plus capped workers | 6 | 10,753 | 83 |
|
|
206
|
+
| deferred issues plus capped workers | 5 | 10,757 | 83 |
|
|
207
|
+
| routing recommendations plus capped workers | 5 | 10,736 | 83 |
|
|
208
|
+
| draft plus deferred issues and capped workers | 6 | 10,827 | 84 |
|
|
209
|
+
| draft plus routing recommendations and capped workers | 6 | 10,802 | 84 |
|
|
210
|
+
| deferred issues plus routing recommendations and capped workers | 5 | 10,810 | 84 |
|
|
211
|
+
| canonical maximal baseline with all workflow options | 6 | 10,876 | 85 |
|
|
212
|
+
| maximal baseline with an open change | 6 | 11,074 | 86 |
|
|
213
|
+
| maximal baseline with source and legacy root log | 6 | 11,304 | 88 |
|
|
214
|
+
| dogfood `.pi/slate.json` and its two extension units | 6 | 10,001 | 84 |
|
|
215
|
+
| runtime boundary plus draft and capped workers, source and legacy log | 6 | 26,053 | 86 |
|
|
216
|
+
| runtime boundary plus draft and deferred issues, source and legacy log | 6 | 26,127 | 87 |
|
|
217
|
+
| runtime boundary plus routing recommendations, source and legacy log | 5 | 26,036 | 86 |
|
|
218
|
+
| runtime boundary plus deferred issues and routing recommendations, source and legacy log | 5 | 26,110 | 87 |
|
|
219
|
+
| runtime boundary plus draft and routing recommendations, source and legacy log | 6 | 26,102 | 87 |
|
|
220
|
+
| same boundary composition plus deferred issues | 6 | 26,176 | 88 |
|
|
221
|
+
| valid shipped policy plus 88 capped worker tools, source and legacy log | 6 | 28,978 | 171 |
|
|
222
222
|
|
|
223
223
|
An untrusted session with an empty home `slate.json` receives the same doctrine
|
|
224
224
|
as the trusted shipped-default fixture above. It includes routing and writing
|
|
@@ -226,10 +226,10 @@ rules. `test/config-loading.test.ts` renders both through the real entry hooks
|
|
|
226
226
|
and checks that equality. Home preferences can change this size, just as trusted
|
|
227
227
|
project preferences can.
|
|
228
228
|
|
|
229
|
-
The canonical maximal baseline uses all
|
|
229
|
+
The canonical maximal baseline uses all four default logical models, all
|
|
230
230
|
three workflow options, and the fixed capped worker roster. Its largest variant
|
|
231
231
|
has an open change, one direct source folder, and a legacy root log. Its
|
|
232
|
-
five-percent requirement is `ceil(
|
|
232
|
+
five-percent requirement is `ceil(11,304 × 1.05) = 11,870`.
|
|
233
233
|
The 26,300 whole-doctrine ceiling exceeds it. The table pins all eight
|
|
234
234
|
combinations of the three workflow options with the capped worker roster. The
|
|
235
235
|
dogfood row reads the actual project configuration. A change to `.pi/slate.json` requires a fresh render.
|
|
@@ -246,18 +246,38 @@ the first value beyond the ceiling.
|
|
|
246
246
|
|
|
247
247
|
The over-cap counterfactual uses a valid shipped logical policy and one supported
|
|
248
248
|
worker-extension unit with 88 capped tools. It also includes an open change,
|
|
249
|
-
its source, and the legacy root log. Its 28,
|
|
250
|
-
the whole-doctrine ceiling by
|
|
249
|
+
its source, and the legacy root log. Its 28,978 portable characters exceed
|
|
250
|
+
the whole-doctrine ceiling by 2,678. The check therefore detects whole-doctrine
|
|
251
251
|
growth without using a retired model-row shape or an assumed per-tool increment.
|
|
252
252
|
Worker-extension doctrine has no runtime size cap, so the fixture reaches the
|
|
253
253
|
whole-doctrine guard rather than failing logical-policy validation first.
|
|
254
254
|
|
|
255
255
|
Exact literals fail on any fixture size change. Coarse ceilings stop cumulative
|
|
256
|
-
growth. A changed fixture requires fresh production
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
growth. A changed fixture requires a fresh production render.
|
|
257
|
+
Update matching copies in `docs/context-budget.md` (including the phase-row table),
|
|
258
|
+
`verification/README.md`, `verification/resolver-checks.mjs`,
|
|
259
|
+
`test/doctrine-contract.test.ts`, `test/config-loading.test.ts`,
|
|
260
|
+
`test/logical-model-policy.test.ts`, and `test/focused-decisions-contract.test.ts`.
|
|
261
|
+
Check the phase-row table with `test/workflow-context-budget.test.ts`.
|
|
262
|
+
The logical-section limits remain 19,400 characters and 105 lines. The
|
|
259
263
|
all-tail limit remains 24,600 characters. The whole-doctrine ceiling is 26,300 characters.
|
|
260
264
|
|
|
265
|
+
The shipped model policy section has a separate limit of 4,755 portable
|
|
266
|
+
characters and 9 lines. The character limit is the measured 4,528 characters
|
|
267
|
+
plus five percent reserve, rounded up. The line limit has no reserve.
|
|
268
|
+
A fifth default model needs a new user approval. A higher limit requires a new user
|
|
269
|
+
approval.
|
|
270
|
+
|
|
271
|
+
For the comparison with the fixed earlier commit, both sides receive the same
|
|
272
|
+
candidate shipped policy input. The earlier code uses explicit default membership and adds candidate definitions
|
|
273
|
+
that it does not define. Trusted project configuration supplies these rows. A check requires equal resolved ordinary policy rows in the same order.
|
|
274
|
+
The check compares model names, both ratings, effort, preferred providers,
|
|
275
|
+
permitted provider routes, guidelines and cautions. It excludes source metadata.
|
|
276
|
+
This comparison does not measure growth of the shipped policy text.
|
|
277
|
+
It still rejects growth of all other doctrine text and growth caused by the
|
|
278
|
+
policy rendering code. Separate controls reject added text per caution row
|
|
279
|
+
and text added only with several rows.
|
|
280
|
+
|
|
261
281
|
### Worker writing preamble
|
|
262
282
|
|
|
263
283
|
The doctrine table does not include the worker preamble. It belongs
|
|
@@ -435,66 +455,75 @@ The separate principle-table row contains 145 bytes without its final line feed.
|
|
|
435
455
|
A blank separator before § 5 of design-principles.md adds one byte outside the 457-byte figure.
|
|
436
456
|
The complete design-principles.md document adds 604 bytes for P14.
|
|
437
457
|
|
|
438
|
-
## Using GPT-
|
|
458
|
+
## Using GPT-6.1 Sol's full 1.05M window
|
|
439
459
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
460
|
+
OpenAI documents a 1,050,000-token context window for `gpt-6.1-sol`.
|
|
461
|
+
Pi registers `openai/gpt-6.1-sol` with a 272,000-token window and a maximum
|
|
462
|
+
output of 128,000 tokens.
|
|
463
|
+
The registered window equals the long-context pricing boundary.
|
|
464
|
+
To use the larger window, first set `modelOverrides` in pi's custom-models
|
|
465
|
+
file, `~/.pi/agent/models.json`. Pi ignores this block in `settings.json`
|
|
466
|
+
without a message.
|
|
443
467
|
|
|
444
468
|
```json
|
|
445
469
|
{
|
|
446
470
|
"providers": {
|
|
447
471
|
"openai": {
|
|
448
472
|
"modelOverrides": {
|
|
449
|
-
"gpt-
|
|
473
|
+
"gpt-6.1-sol": { "contextWindow": 1050000 }
|
|
450
474
|
}
|
|
451
475
|
}
|
|
452
476
|
}
|
|
453
477
|
}
|
|
454
478
|
```
|
|
455
479
|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
480
|
+
Second, raise the Slate budget with an override in `.pi/slate.json`.
|
|
481
|
+
Keep the full nested form shown below.
|
|
482
|
+
A bare `{"match": …, "tokens": …}` used as the `contextBudget` value sets
|
|
483
|
+
a global token budget. Slate drops its `match`.
|
|
484
|
+
Slate reports a warning about the unknown key.
|
|
461
485
|
|
|
462
486
|
```json
|
|
463
487
|
{
|
|
464
488
|
"contextBudget": {
|
|
465
489
|
"overrides": [
|
|
466
|
-
{ "match": "openai/gpt-
|
|
490
|
+
{ "match": "openai/gpt-6\\.1-sol", "tokens": 900000 }
|
|
467
491
|
]
|
|
468
492
|
}
|
|
469
493
|
}
|
|
470
494
|
```
|
|
471
495
|
|
|
472
|
-
|
|
473
|
-
|
|
496
|
+
With the default 16,384-token compaction reserve, the clamp allows
|
|
497
|
+
1,000,848 tokens for this window. The configured 900,000-token budget binds.
|
|
498
|
+
That budget is about 85.7% of the 1,050,000-token window.
|
|
499
|
+
|
|
500
|
+
WARNING: every request above 272,000 input tokens uses the long-context
|
|
501
|
+
rates listed above for the full request.
|
|
474
502
|
|
|
475
503
|
Logical-model routing does not change this context-window setting. Pi's registry
|
|
476
504
|
remains the runtime source for context capacity. Slate validates permitted routes
|
|
477
505
|
against that registry but does not compare it with a second profile window.
|
|
478
506
|
|
|
507
|
+
Compression requests are the one exception. On an OpenAI GPT-6-or-later route, a
|
|
508
|
+
compression request uses a context window of at least 1,050,000 tokens, as
|
|
509
|
+
[model-routing.md](model-routing.md) § Shipped definitions describes.
|
|
510
|
+
|
|
479
511
|
## Accepted limitations
|
|
480
512
|
|
|
481
|
-
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
the
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
compaction can land in the same cycle and the handoff brief is
|
|
496
|
-
written from compacted context — episodes and thread state survive
|
|
497
|
-
on disk, so handoff still functions.
|
|
513
|
+
- If the effective pause threshold exceeds the active model's pricing
|
|
514
|
+
boundary, a request can use the higher rates before Slate pauses.
|
|
515
|
+
This can happen with an expanded window or a larger registered window.
|
|
516
|
+
For example, Pi registers `openai-codex/gpt-6.1-sol` with a 500,000-token
|
|
517
|
+
window. With the default reserve, the built-in pause threshold is 400,000
|
|
518
|
+
tokens, above the pricing boundary of 272,000 input tokens.
|
|
519
|
+
To leave more room before the boundary, set a lower budget, such as
|
|
520
|
+
240,000 tokens. Match the override to the active `provider/id`.
|
|
521
|
+
The example override matches only `openai/gpt-6.1-sol`.
|
|
522
|
+
One large turn can still cross the pricing boundary before the pause.
|
|
523
|
+
- A large turn can cross both the pause and compaction thresholds.
|
|
524
|
+
If Slate has already paused, Pi can compact the context before the
|
|
525
|
+
orchestrator writes the handoff brief. Episodes and thread state remain
|
|
526
|
+
on disk.
|
|
498
527
|
- The doctrine sizes above cover the stated fixtures only. A project that
|
|
499
528
|
injects `doctrineExtraPath` or `orchestratorPromptDocs` pays for those on top.
|
|
500
529
|
A larger worker-extension roster also adds context beyond the representative
|
|
@@ -526,50 +555,56 @@ The excluded installed path cost is 5 times the prefix byte length with
|
|
|
526
555
|
publishing off and 6 times that length with publishing on. Tests measure
|
|
527
556
|
this cost separately. It depends on the installation path.
|
|
528
557
|
|
|
529
|
-
The user approved
|
|
530
|
-
is ceil(baseline bytes * 1.05).
|
|
558
|
+
The user approved the limits for the other 35 rows on 2026-10-16.
|
|
559
|
+
Each of those byte limits is ceil(baseline bytes * 1.05).
|
|
560
|
+
The user approved the two limits for Research, publishing off, ordinary plan
|
|
561
|
+
on 2026-11-12. These limits are 76,835 and 145,471 bytes.
|
|
562
|
+
They equal the limits approved on 2026-10-16 plus 979 bytes of approved
|
|
563
|
+
shipped model policy growth. They carry no five percent reserve.
|
|
564
|
+
A higher limit requires a new user approval.
|
|
565
|
+
Tests enforce total <= stored literal limit.
|
|
531
566
|
The token limit is ceil(byte limit / 4). Reserve is checked at approval,
|
|
532
567
|
not recalculated as text grows. A maximum includes all applicable optional
|
|
533
568
|
reads. Any subset fits because removing ranges cannot increase union size.
|
|
534
569
|
|
|
535
570
|
| Phase | Publishing | Plan | Required bytes | Estimated tokens | Byte limit | Token limit | Conditional maximum bytes | Estimated tokens | Byte limit | Token limit |
|
|
536
571
|
| --- | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
537
|
-
| 1. Research | off | ordinary |
|
|
538
|
-
| 1. Research | off | nested |
|
|
539
|
-
| 1. Research | on | ordinary |
|
|
540
|
-
| 1. Research | on | nested |
|
|
541
|
-
| 2. Risk assessment | off | ordinary |
|
|
542
|
-
| 2. Risk assessment | off | nested |
|
|
543
|
-
| 2. Risk assessment | on | ordinary |
|
|
544
|
-
| 2. Risk assessment | on | nested |
|
|
545
|
-
| 3. Design validation | off | ordinary |
|
|
546
|
-
| 3. Design validation | off | nested |
|
|
547
|
-
| 3. Design validation | on | ordinary |
|
|
548
|
-
| 3. Design validation | on | nested |
|
|
549
|
-
| 4. Focus reconfirmation | off | ordinary |
|
|
550
|
-
| 4. Focus reconfirmation | off | nested |
|
|
551
|
-
| 4. Focus reconfirmation | on | ordinary |
|
|
552
|
-
| 4. Focus reconfirmation | on | nested |
|
|
553
|
-
| 5. Adversarial design review | off | ordinary |
|
|
554
|
-
| 5. Adversarial design review | off | nested |
|
|
555
|
-
| 5. Adversarial design review | on | ordinary |
|
|
556
|
-
| 5. Adversarial design review | on | nested |
|
|
557
|
-
| 6. Final design approval | off | ordinary |
|
|
558
|
-
| 6. Final design approval | off | nested |
|
|
559
|
-
| 6. Final design approval | on | ordinary |
|
|
560
|
-
| 6. Final design approval | on | nested |
|
|
561
|
-
| 7. Track loop | off | ordinary |
|
|
562
|
-
| 7. Track loop | off | nested |
|
|
563
|
-
| 7. Track loop | on | ordinary |
|
|
564
|
-
| 7. Track loop | on | nested |
|
|
565
|
-
| 8. Final acceptance | off | ordinary |
|
|
566
|
-
| 8. Final acceptance | off | nested |
|
|
567
|
-
| 8. Final acceptance | on | ordinary |
|
|
568
|
-
| 8. Final acceptance | on | nested |
|
|
569
|
-
| 9. Delivery | off | ordinary |
|
|
570
|
-
| 9. Delivery | off | nested |
|
|
571
|
-
| 9. Delivery | on | ordinary |
|
|
572
|
-
| 9. Delivery | on | nested |
|
|
572
|
+
| 1. Research | off | ordinary | 76439 | 19110 | 76835 | 19209 | 145422 | 36356 | 145471 | 36368 |
|
|
573
|
+
| 1. Research | off | nested | 91724 | 22931 | 129137 | 32285 | 160707 | 40177 | 197773 | 49444 |
|
|
574
|
+
| 1. Research | on | ordinary | 87951 | 21988 | 92700 | 23175 | 156934 | 39234 | 161336 | 40334 |
|
|
575
|
+
| 1. Research | on | nested | 103236 | 25809 | 145981 | 36496 | 172219 | 43055 | 214617 | 53655 |
|
|
576
|
+
| 2. Risk assessment | off | ordinary | 112832 | 28208 | 114401 | 28601 | 181815 | 45454 | 183038 | 45760 |
|
|
577
|
+
| 2. Risk assessment | off | nested | 128117 | 32030 | 167682 | 41921 | 197100 | 49275 | 236319 | 59080 |
|
|
578
|
+
| 2. Risk assessment | on | ordinary | 124344 | 31086 | 131245 | 32812 | 193327 | 48332 | 199882 | 49971 |
|
|
579
|
+
| 2. Risk assessment | on | nested | 139629 | 34908 | 184526 | 46132 | 208612 | 52153 | 253163 | 63291 |
|
|
580
|
+
| 3. Design validation | off | ordinary | 112832 | 28208 | 114401 | 28601 | 181815 | 45454 | 183038 | 45760 |
|
|
581
|
+
| 3. Design validation | off | nested | 128117 | 32030 | 167682 | 41921 | 197100 | 49275 | 236319 | 59080 |
|
|
582
|
+
| 3. Design validation | on | ordinary | 124344 | 31086 | 131245 | 32812 | 193327 | 48332 | 199882 | 49971 |
|
|
583
|
+
| 3. Design validation | on | nested | 139629 | 34908 | 184526 | 46132 | 208612 | 52153 | 253163 | 63291 |
|
|
584
|
+
| 4. Focus reconfirmation | off | ordinary | 112832 | 28208 | 114401 | 28601 | 181815 | 45454 | 183038 | 45760 |
|
|
585
|
+
| 4. Focus reconfirmation | off | nested | 128117 | 32030 | 167682 | 41921 | 197100 | 49275 | 236319 | 59080 |
|
|
586
|
+
| 4. Focus reconfirmation | on | ordinary | 124344 | 31086 | 131245 | 32812 | 193327 | 48332 | 199882 | 49971 |
|
|
587
|
+
| 4. Focus reconfirmation | on | nested | 139629 | 34908 | 184526 | 46132 | 208612 | 52153 | 253163 | 63291 |
|
|
588
|
+
| 5. Adversarial design review | off | ordinary | 135747 | 33937 | 138753 | 34689 | 232514 | 58129 | 236562 | 59141 |
|
|
589
|
+
| 5. Adversarial design review | off | nested | 151032 | 37758 | 192034 | 48009 | 247799 | 61950 | 289844 | 72461 |
|
|
590
|
+
| 5. Adversarial design review | on | ordinary | 147259 | 36815 | 155597 | 38900 | 244026 | 61007 | 253406 | 63352 |
|
|
591
|
+
| 5. Adversarial design review | on | nested | 162544 | 40636 | 208878 | 52220 | 259311 | 64828 | 306688 | 76672 |
|
|
592
|
+
| 6. Final design approval | off | ordinary | 135747 | 33937 | 138753 | 34689 | 232514 | 58129 | 236562 | 59141 |
|
|
593
|
+
| 6. Final design approval | off | nested | 151032 | 37758 | 192034 | 48009 | 247799 | 61950 | 289844 | 72461 |
|
|
594
|
+
| 6. Final design approval | on | ordinary | 147259 | 36815 | 155597 | 38900 | 244026 | 61007 | 253406 | 63352 |
|
|
595
|
+
| 6. Final design approval | on | nested | 162544 | 40636 | 208878 | 52220 | 259311 | 64828 | 306688 | 76672 |
|
|
596
|
+
| 7. Track loop | off | ordinary | 158942 | 39736 | 163384 | 40846 | 260346 | 65087 | 302924 | 75731 |
|
|
597
|
+
| 7. Track loop | off | nested | 174227 | 43557 | 216665 | 54167 | 260346 | 65087 | 302924 | 75731 |
|
|
598
|
+
| 7. Track loop | on | ordinary | 170454 | 42614 | 180228 | 45057 | 271858 | 67965 | 319769 | 79943 |
|
|
599
|
+
| 7. Track loop | on | nested | 185739 | 46435 | 233509 | 58378 | 271858 | 67965 | 319769 | 79943 |
|
|
600
|
+
| 8. Final acceptance | off | ordinary | 158942 | 39736 | 163384 | 40846 | 260346 | 65087 | 302924 | 75731 |
|
|
601
|
+
| 8. Final acceptance | off | nested | 174227 | 43557 | 216665 | 54167 | 260346 | 65087 | 302924 | 75731 |
|
|
602
|
+
| 8. Final acceptance | on | ordinary | 170454 | 42614 | 180228 | 45057 | 271858 | 67965 | 319769 | 79943 |
|
|
603
|
+
| 8. Final acceptance | on | nested | 185739 | 46435 | 233509 | 58378 | 271858 | 67965 | 319769 | 79943 |
|
|
604
|
+
| 9. Delivery | off | ordinary | 158942 | 39736 | 163384 | 40846 | 260346 | 65087 | 302924 | 75731 |
|
|
605
|
+
| 9. Delivery | off | nested | 174227 | 43557 | 216665 | 54167 | 260346 | 65087 | 302924 | 75731 |
|
|
606
|
+
| 9. Delivery | on | ordinary | 170454 | 42614 | 180228 | 45057 | 271858 | 67965 | 319769 | 79943 |
|
|
607
|
+
| 9. Delivery | on | nested | 185739 | 46435 | 233509 | 58378 | 271858 | 67965 | 319769 | 79943 |
|
|
573
608
|
|
|
574
609
|
Conditional sets have the following whole-document costs. Early notes cost
|
|
575
610
|
zero extra after required notes enter phase 7. Unusual prose costs zero extra
|