ytdb-slate 0.14.0 → 0.15.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 +13 -8
- package/docs/blast-radius.md +25 -24
- package/docs/change-records.md +215 -0
- package/docs/configuration.md +44 -8
- package/docs/context-budget.md +204 -54
- package/docs/delivery-packages.md +76 -78
- package/docs/design-principles.md +54 -10
- package/docs/model-routing.md +5 -6
- package/docs/pr-publishing.md +95 -147
- package/docs/recursive-workflow.md +30 -206
- package/docs/review-common-policy.md +1 -1
- package/docs/review-rules.md +22 -23
- package/docs/roadmap.md +1 -1
- package/docs/safety-and-trust.md +43 -3
- package/docs/track-workflow.md +149 -105
- package/docs/user-notes.md +30 -36
- package/extension/action-temporary.ts +100 -0
- package/extension/concurrency.ts +28 -0
- package/extension/episodes.ts +24 -0
- package/extension/failover.ts +18 -2
- package/extension/handoff.ts +90 -17
- package/extension/index.ts +6 -1
- package/extension/mode.ts +40 -45
- package/extension/model-default.ts +3 -3
- package/extension/paths.ts +1 -0
- package/extension/render.ts +146 -127
- package/extension/startup-summary.ts +5 -5
- package/extension/state.ts +15 -1
- package/extension/threads.ts +144 -26
- package/extension/tools.ts +25 -12
- package/extension/worker-codemode.ts +32 -0
- package/extension/worker-extensions.ts +2 -2
- package/extension/worker-nested-lifecycle.ts +58 -0
- package/extension/worker-reminder.ts +3 -2
- package/extension/worker.ts +112 -38
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/JetBrains/ytdb-slate/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
|
-
Slate is a multi-agent orchestration extension for the [pi coding agent](https://pi.dev). You work in one interactive pi session, the main session. A bounded action is a focused task with a clear limit. A worker thread is an isolated pi session that researches, implements, or reviews changes. Slate sends bounded actions to separate worker threads. Each worker thread returns a short structured summary called an episode. A review workflow adds reviewers for risks
|
|
5
|
+
Slate is a multi-agent orchestration extension for the [pi coding agent](https://pi.dev). You work in one interactive pi session, the main session. A bounded action is a focused task with a clear limit. A worker thread is an isolated pi session that researches, implements, or reviews changes. Slate sends bounded actions to separate worker threads. Each worker thread returns a short structured summary called an episode. A review workflow adds reviewers for risks the orchestrator proves or for work above a size threshold.
|
|
6
|
+
|
|
7
|
+
The developers of the [YouTrackDB](https://github.com/JetBrains/youtrackdb) database use Slate in production development.
|
|
6
8
|
|
|
7
9
|
## What Slate does
|
|
8
10
|
|
|
@@ -14,6 +16,8 @@ Slate is a multi-agent orchestration extension for the [pi coding agent](https:/
|
|
|
14
16
|
|
|
15
17
|
## Quick start
|
|
16
18
|
|
|
19
|
+
Slate requires pi 1.4.0 or later. Older pi can still load the package, but it is not supported. Slate provides no runtime version warning.
|
|
20
|
+
|
|
17
21
|
You need an installed and authenticated [pi coding agent](https://pi.dev/docs/latest/quickstart). From your project directory, install a pinned Slate version:
|
|
18
22
|
|
|
19
23
|
```bash
|
|
@@ -36,7 +40,7 @@ Try a request with a clear outcome:
|
|
|
36
40
|
Add input validation to the account settings endpoint. First research the relevant code and tests. Show me the proposed plan and risks before implementation.
|
|
37
41
|
```
|
|
38
42
|
|
|
39
|
-
Slate asks for required decisions before editing code. It delegates work after workflow gates allow it.
|
|
43
|
+
Slate asks for required decisions before editing code. It delegates work after workflow gates allow it. The workflow summary is off by default. Run `/slate summary on` to save an opt-in. The panel appears at the next interactive startup or mode activation, not when you save the choice. The summary disappears when you send your first prompt to the model. A handoff successor keeps the current panel visibility instead of using the saved choice.
|
|
40
44
|
|
|
41
45
|
Run `/slate off` to stop Slate's delegation and remove the summary. `/slate summary off` also removes it. Toggling orchestrator mode off with `/slate` removes it too. Other slash commands leave it visible unless they reload or replace the session. `/reload`, `/new`, `/resume`, and `/fork` clear the panel when they reload or replace the session. Slate then shows it only when orchestrator mode is on and the saved choice allows automatic display. Run `/slate summary` to show it at any time. See [Commands](#commands).
|
|
42
46
|
|
|
@@ -57,13 +61,13 @@ test-quality defects, unreadable user-facing prose, licensing exposure,
|
|
|
57
61
|
non-local logic defects, consumer contract breaks, governing-rule defects, and
|
|
58
62
|
unreported failures.
|
|
59
63
|
|
|
60
|
-
The orchestrator records risks for the change and each track.
|
|
64
|
+
The orchestrator records risks for the change and each track. The orchestrator judges each named proof and selects design gates and reviewers. You can inspect the assessment and direct changes. A track with a proved risk gets one general reviewer and its required specialists. An implementer's approximate track size above 100 added plus removed lines also adds the general reviewer unless the track changes only documents that neither ship as code nor run. Lockfiles, migration files, and generated output do not count. A track that the orchestrator estimates above 100 such lines needs a high-level design before implementation, including when it changes only documents. A track with neither review trigger gets no routine implementation reviewer. See [workflow](docs/track-workflow.md) and [focus areas](docs/blast-radius.md) for the rules. Optional draft pull requests cover each level with code tracks. A change without nested tracks has at most one pull request. Each design track needs your explicit acceptance of its whole subtree, which contains that track and its descendants. Final acceptance of the whole change remains a separate decision. Only you merge pull requests. See [recursive workflow](docs/recursive-workflow.md) for nested planning, repair children, and acceptance.
|
|
61
65
|
|
|
62
66
|
## Product principles
|
|
63
67
|
|
|
64
|
-
- **Control without reading every line.** Many coding agents produce code that the developer accepts without reading it. Slate keeps you in control in a different way. It gives you higher-level views of the work:
|
|
65
|
-
- **Quality before cost, within limits.** We expect the cost of model use to fall over time. Slate therefore spends more model work on code quality, up to a reasonable limit. For example, Slate adds reviewers for
|
|
66
|
-
- **Cost in proportion to the change.** The cost of a change should grow in proportion to its complexity. A small track with no
|
|
68
|
+
- **Control without reading every line.** Many coding agents produce code that the developer accepts without reading it. Slate keeps you in control in a different way. It gives you higher-level views of the work: proved risks, designs, and review results. You direct and check each change through these views, so you do not need to read all of the generated code.
|
|
69
|
+
- **Quality before cost, within limits.** We expect the cost of model use to fall over time. Slate therefore spends more model work on code quality, up to a reasonable limit. For example, Slate adds reviewers for proved risks and for large tracks that change code.
|
|
70
|
+
- **Cost in proportion to the change.** The cost of a change should grow in proportion to its complexity. A small track with no proved risk gets no design gate and no routine implementation reviewer. A larger or riskier track can add design steps, review steps, or both.
|
|
67
71
|
|
|
68
72
|
## Commands
|
|
69
73
|
|
|
@@ -74,7 +78,7 @@ The orchestrator records risks for the change and each track. You approve or rej
|
|
|
74
78
|
| `/slate` | Toggle orchestrator mode. |
|
|
75
79
|
| `/slate summary` | Show the workflow summary in any mode, even when automatic display is off. |
|
|
76
80
|
| `/slate summary off` | Stop automatic display and remove a visible summary. |
|
|
77
|
-
| `/slate summary on` |
|
|
81
|
+
| `/slate summary on` | Save automatic display for the next startup or mode activation. |
|
|
78
82
|
| `/slate effective` | Show the effective logical-model policy and remembered route selections. |
|
|
79
83
|
| `/slate handoff [focus]` | Prepare a new-session handoff, with an optional focus. |
|
|
80
84
|
| `/slate resume` | Clear a context-budget pause and accept user prompts again. |
|
|
@@ -101,9 +105,10 @@ See [`docs/roadmap.md`](docs/roadmap.md) for details.
|
|
|
101
105
|
|
|
102
106
|
## Shipped docs
|
|
103
107
|
|
|
104
|
-
These documents define workflow and reference behavior. Slate
|
|
108
|
+
These documents define workflow and reference behavior. Slate uses installed paths for workflow citations in its numbered system-prompt rules. The filenames `change-records.md` and `recursive-workflow.md` resolve beside the Lifecycle document, `track-workflow.md`.
|
|
105
109
|
|
|
106
110
|
- [`docs/blast-radius.md`](docs/blast-radius.md) defines focus areas, proofs, and review coverage.
|
|
111
|
+
- [`docs/change-records.md`](docs/change-records.md) defines identifiers, code ranges, design markers, and safe writes to change records.
|
|
107
112
|
- [`docs/configuration.md`](docs/configuration.md) defines settings, merge rules, and path warnings.
|
|
108
113
|
- [`docs/context-budget.md`](docs/context-budget.md) defines context limits, model overrides, and measured prompt sizes.
|
|
109
114
|
- [`docs/delivery-packages.md`](docs/delivery-packages.md) — the compact track and change package format, read only before package preparation
|
package/docs/blast-radius.md
CHANGED
|
@@ -10,18 +10,19 @@ composition and finding handling.
|
|
|
10
10
|
The orchestrator judges all eleven focus areas for the change and independently
|
|
11
11
|
for every track. An area is **NAMED** when the orchestrator submits its
|
|
12
12
|
four-part proof. The proof states the defect class, the place where the defect
|
|
13
|
-
can occur, the material consequence, and the review contribution.
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
can occur, the material consequence, and the review contribution.
|
|
14
|
+
The orchestrator judges and records each proof. A sufficient NAMED proof makes
|
|
15
|
+
the area **proved**. An insufficient NAMED line becomes **SKIPPED**.
|
|
16
|
+
Only a proved area adds focus-dependent
|
|
16
17
|
gates or area reviewers. A track with one or more proved areas gets exactly
|
|
17
18
|
one Reviewer I and every required area specialist. The implementer's approximate
|
|
18
19
|
size above 100 counted lines also requires Reviewer I on a track that is not
|
|
19
20
|
documentation-only. Without either trigger, routine implementation review is
|
|
20
21
|
`NOT REQUIRED`. Size alone adds no area reviewer or blocking track acceptance.
|
|
21
22
|
[track-workflow.md](track-workflow.md) § Track size and split defines counted
|
|
22
|
-
lines and the separate pre-implementation design estimate. The user
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
lines and the separate pre-implementation design estimate. The user judges
|
|
24
|
+
whether the proposal is the simplest solution. No script or other rule decides
|
|
25
|
+
whether a proof holds.
|
|
25
26
|
|
|
26
27
|
Each track must be one coherent unit that a human can review in one sitting.
|
|
27
28
|
The orchestrator owns the split and records its rationale.
|
|
@@ -39,7 +40,7 @@ limits, the implementer-requested exception, and the recursive-document loading
|
|
|
39
40
|
|
|
40
41
|
## Focus areas and their gates
|
|
41
42
|
|
|
42
|
-
A focus area is one named risk. An area adds its reviewer only when the
|
|
43
|
+
A focus area is one named risk. An area adds its reviewer only when the orchestrator judges its NAMED proof sufficient.
|
|
43
44
|
|
|
44
45
|
<!-- focus-area-table:begin -->
|
|
45
46
|
| # | focus area | the gate it adds | where the gate runs |
|
|
@@ -313,13 +314,11 @@ Areas may engage together when each area meets its own trigger. The unreported f
|
|
|
313
314
|
|
|
314
315
|
The orchestrator records one line for every area. A named line gives a concrete
|
|
315
316
|
four-part proof. A line that is not NAMED states which part of the trigger
|
|
316
|
-
answers no. A NAMED line becomes proved
|
|
317
|
-
NAMED line becomes SKIPPED and adds no gate or reviewer.
|
|
317
|
+
answers no. A NAMED line becomes proved when the orchestrator judges its proof sufficient.
|
|
318
|
+
An insufficient NAMED line becomes SKIPPED and adds no gate or reviewer.
|
|
318
319
|
|
|
319
|
-
Each change and track keeps its own assessment and risk record.
|
|
320
|
-
|
|
321
|
-
[track-workflow.md](track-workflow.md) § Confirmation gate. A shared approval
|
|
322
|
-
does not merge the records or replace either record's evidence.
|
|
320
|
+
Each change and track keeps its own assessment and risk record.
|
|
321
|
+
Shared evidence does not merge the records or replace either assessment.
|
|
323
322
|
|
|
324
323
|
Every NAMED proof has these four parts:
|
|
325
324
|
|
|
@@ -350,8 +349,8 @@ material when loss of that control would be material. A cosmetic consequence
|
|
|
350
349
|
is not material. A proof is not convincing when its words would also fit a
|
|
351
350
|
change that does not engage the area.
|
|
352
351
|
|
|
353
|
-
No rule mechanically decides whether a proof holds. The
|
|
354
|
-
proof at
|
|
352
|
+
No rule mechanically decides whether a proof holds. The orchestrator judges every
|
|
353
|
+
proof at planning and focus reconfirmation. A SKIPPED area gets
|
|
355
354
|
no gate or reviewer. The skip is recorded and is not an escalation. A track with
|
|
356
355
|
no proved area gets no area reviewer.
|
|
357
356
|
|
|
@@ -374,7 +373,7 @@ A path is evidence, not a definition or a decision.
|
|
|
374
373
|
## Lifecycle rules owned by the spine
|
|
375
374
|
|
|
376
375
|
[track-workflow.md](track-workflow.md) § Risk planning and reconciliation owns
|
|
377
|
-
planning,
|
|
376
|
+
planning, proof judgment, focus reconfirmation, the late-area route, and the
|
|
378
377
|
committed-difference comparison. This document does not duplicate those rules.
|
|
379
378
|
|
|
380
379
|
[review-rules.md](review-rules.md) § Reviewer sets, merge rule and charters owns
|
|
@@ -391,12 +390,9 @@ On a halt, the orchestrator:
|
|
|
391
390
|
|
|
392
391
|
1. pauses implementation.
|
|
393
392
|
2. re-derives all eleven focus lines for the remaining work.
|
|
394
|
-
3.
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
rejection of every new NAMED proof and every proposed removal of a proved
|
|
398
|
-
area. A rejected removal preserves the proved area and all of its gates and
|
|
399
|
-
reviewers.
|
|
393
|
+
3. records each addition or removal with its proof or failed trigger part.
|
|
394
|
+
4. judges each new NAMED proof and removal, records the resulting gate changes,
|
|
395
|
+
and honors any user direction without silently waiving a separate gate.
|
|
400
396
|
5. runs the required design gate for remaining work when a newly proved
|
|
401
397
|
DESIGN-TRIGGERING area requires it, unless the user records a decision to
|
|
402
398
|
skip that gate.
|
|
@@ -408,8 +404,9 @@ A late proved area recomputes the complete required routine reviewer set for the
|
|
|
408
404
|
completed range. If Reviewer I has not covered that range, dispatch Reviewer I
|
|
409
405
|
and the new area specialist. If Reviewer I already ran because of size or
|
|
410
406
|
another proved area, dispatch only the new specialist. Do not dispatch Reviewer I
|
|
411
|
-
again. Every newly required perspective reviews the completed range. The
|
|
412
|
-
|
|
407
|
+
again. Every newly required perspective reviews the completed range. The owning
|
|
408
|
+
research log reports the resulting coverage.
|
|
409
|
+
Disclose relevant concerns under the package rules.
|
|
413
410
|
|
|
414
411
|
## Review coverage and the coverage register
|
|
415
412
|
|
|
@@ -438,6 +435,10 @@ log.
|
|
|
438
435
|
prefixes and the source of truth for track boundaries. This section owns the
|
|
439
436
|
remaining commit discipline.
|
|
440
437
|
|
|
438
|
+
These review-range body rules do not govern the final publishing-disabled delivery squash.
|
|
439
|
+
That squash follows project commit rules or the default under
|
|
440
|
+
[track-workflow.md](track-workflow.md) § Delivery history and accounting.
|
|
441
|
+
|
|
441
442
|
The cumulative implementation commit is defined in
|
|
442
443
|
[track-workflow.md](track-workflow.md) § Lifecycle and phases. When the track
|
|
443
444
|
has a high-level design, the cumulative implementation commit body carries the
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Common change records
|
|
2
|
+
|
|
3
|
+
For record writing, a **change record** is a research log, status file, implementer report, or design file.
|
|
4
|
+
[change-records.md](change-records.md) owns the common record rules below.
|
|
5
|
+
[recursive-workflow.md](recursive-workflow.md) owns nested-track rules.
|
|
6
|
+
Use [track-workflow.md](track-workflow.md) § Recursive planning and loading for document loading.
|
|
7
|
+
|
|
8
|
+
[writing-guidance.md](writing-guidance.md) separately defines change records for the writing convention.
|
|
9
|
+
That definition covers pull request descriptions, delivery commit bodies, release notes, and issues.
|
|
10
|
+
|
|
11
|
+
## Identifiers, code ranges, and design markers
|
|
12
|
+
|
|
13
|
+
Use [track-workflow.md](track-workflow.md) § Delivery and termination for the
|
|
14
|
+
canonical marker template and flat-workflow exception.
|
|
15
|
+
A **canonical path number** uses positive decimal components separated by dots.
|
|
16
|
+
Write positive decimal components without leading zeros, separated by dots.
|
|
17
|
+
Each component is at most 9,007,199,254,740,991.
|
|
18
|
+
Use only ASCII digits, from the American Standard Code for Information Interchange.
|
|
19
|
+
The identifier has at most 128 characters.
|
|
20
|
+
Use the same spelling in reports, log names, commits, markers, and packages.
|
|
21
|
+
|
|
22
|
+
A **code range** contains one code track's owned commits through its completion marker.
|
|
23
|
+
For a single-track change without a marker, it ends at the last owned commit accepted at final acceptance.
|
|
24
|
+
Keep that endpoint in the owning research log.
|
|
25
|
+
Record its start boundary immediately before its first owned commit, before writing starts.
|
|
26
|
+
Use a prior code marker, design marker, or level start, not path-number arithmetic.
|
|
27
|
+
Exclude a publishing bootstrap.
|
|
28
|
+
Every non-marker commit in the range belongs to that code track.
|
|
29
|
+
Keep the start stable through permitted pre-user-review rewrites.
|
|
30
|
+
Append the marker after required gates, packages, acceptance, and requested fixes.
|
|
31
|
+
Later feedback follows [user-notes.md](user-notes.md), not an extension of a closed range.
|
|
32
|
+
|
|
33
|
+
A **design marker** records acceptance of a whole design subtree.
|
|
34
|
+
It creates no implementation range or repeated child contribution.
|
|
35
|
+
Show child-range and delivery references only when a decision needs them.
|
|
36
|
+
The next code track starts at the completed subtree's current history head.
|
|
37
|
+
With publishing, place the marker on the subtree's last pull request branch.
|
|
38
|
+
Add it after whole-subtree acceptance and before merge.
|
|
39
|
+
Use [pr-publishing.md](pr-publishing.md) § Ready-for-review flip for enclosing design acceptance.
|
|
40
|
+
Without publishing, add it to the current linear history after acceptance.
|
|
41
|
+
The change root uses final acceptance, not another track marker.
|
|
42
|
+
|
|
43
|
+
Use [track-workflow.md](track-workflow.md) § Track intention block and implementer response
|
|
44
|
+
for one continuing code report, its contents, and commit forms.
|
|
45
|
+
The current `root-design.md` or `track-<number>-design.md` is authoritative for its node.
|
|
46
|
+
The owning research log records each approved design hash and aggregate evidence.
|
|
47
|
+
A copied design in a log does not replace that authority.
|
|
48
|
+
A design track has no implementer report or extra cumulative implementation commit.
|
|
49
|
+
A required code-track design stays in its owning log's Planned changes content.
|
|
50
|
+
Its cumulative implementation commit carries that design and its low-level design.
|
|
51
|
+
|
|
52
|
+
## Manual records and safe writes
|
|
53
|
+
|
|
54
|
+
A design track or review-fix child track triggers the manual status file.
|
|
55
|
+
This **status file**, `status.md`, displays planned work, pending gates, and log locations.
|
|
56
|
+
It grants no completion or gate authority.
|
|
57
|
+
Its plain-text **repair state** column shows each code track and review-fix child's repair use.
|
|
58
|
+
Each cell shows rounds used of 2, stuck-fix consultations used of the budget, and any pending gate.
|
|
59
|
+
No fixed machine-readable format is required.
|
|
60
|
+
After every fix round, gate, consultation, consultation grant, investigation trigger, and split decision, record the repair state before the next dispatch.
|
|
61
|
+
A record-only worker first writes a typed entry in the affected code track's owning research log, citing the report section.
|
|
62
|
+
Use `verification` for rounds, gates, consultations, and investigation triggers.
|
|
63
|
+
Use `decision` for consultation grants and split decisions.
|
|
64
|
+
The worker updates the `status.md` entry and cell second, before the next dispatch.
|
|
65
|
+
The typed log entries are the evidence for each count.
|
|
66
|
+
A cell grants no round.
|
|
67
|
+
If a cell and the log disagree, work stops and the orchestrator asks the user.
|
|
68
|
+
No automatic correction lowers a count.
|
|
69
|
+
A change without a design track or review-fix child has no `status.md`.
|
|
70
|
+
A user-chosen split in such a change creates review-fix children, loads [recursive-workflow.md](recursive-workflow.md), and creates `status.md`.
|
|
71
|
+
Create `track-<number>-research-log.md` when entering a design track.
|
|
72
|
+
Here `<number>` is the canonical path number defined above.
|
|
73
|
+
Each log owns its subtree's decisions and accepted history bindings.
|
|
74
|
+
Parents keep context and links, not copies of child history.
|
|
75
|
+
Root-wide decisions belong in `research-log.md`.
|
|
76
|
+
Cross-subtree effects belong in their owning parent.
|
|
77
|
+
For a review-fix subtree, use the affected code track's existing records.
|
|
78
|
+
Its owning research log is the nearest enclosing design-track log, or the root log when none exists.
|
|
79
|
+
A versioned copy retains the earlier design bytes under a separate name.
|
|
80
|
+
|
|
81
|
+
Record-only workers write research logs, status files, and design records.
|
|
82
|
+
The orchestrator names the records in the worker's task.
|
|
83
|
+
Each record-only task states the write and check method of these rules for each assigned record.
|
|
84
|
+
When a source folder exists, the task states the read-only source rule.
|
|
85
|
+
|
|
86
|
+
Record-only workers are dispatched without a track number.
|
|
87
|
+
Implementers write only their own implementer reports.
|
|
88
|
+
Under `slate-changes/`, write only assigned records and your scratch.
|
|
89
|
+
The preamble supplies placement rules.
|
|
90
|
+
Follow the preamble's no-change and missing-path rules.
|
|
91
|
+
Drafts, designs, and records outlive the action.
|
|
92
|
+
Scratch lasts only this action.
|
|
93
|
+
|
|
94
|
+
Required outside-checkout project or verification folders take precedence under each tool's deletion and retention rules.
|
|
95
|
+
They supply no alternate start-copy or payload destination.
|
|
96
|
+
Workers use the built-in tools to write change records.
|
|
97
|
+
|
|
98
|
+
A worker never writes in a change folder that a fork marks as a read-only source.
|
|
99
|
+
That read-only source folder is `slate-changes/<source>/`.
|
|
100
|
+
Another folder's first log line names that source: `Read-only earlier log: ...`.
|
|
101
|
+
|
|
102
|
+
A worker creates a new log or report by appending its first temporary file with `>>`.
|
|
103
|
+
Research logs and implementer reports are append-only.
|
|
104
|
+
On an existing log or report, a worker appends only with the shell operator `>>`.
|
|
105
|
+
The operator `>>` appends output without replacing earlier text.
|
|
106
|
+
For example, use `cat temporary-file >> file`.
|
|
107
|
+
|
|
108
|
+
A worker never uses `>`, the write tool, the edit tool, or `sed -i` on an existing log or report.
|
|
109
|
+
It appends at the end.
|
|
110
|
+
It never changes or deletes earlier text.
|
|
111
|
+
A correction is a new entry.
|
|
112
|
+
|
|
113
|
+
A worker may rewrite `status.md` completely.
|
|
114
|
+
Before changing an existing design file, a worker copies the current file to a new versioned name such as `root-design.v2.md`.
|
|
115
|
+
A versioned name must not exist yet.
|
|
116
|
+
The worker uses `cp -n` to make the copy.
|
|
117
|
+
The command `cp -n` leaves an existing destination unchanged.
|
|
118
|
+
|
|
119
|
+
The worker then uses `cmp` to check that the copy equals the current file.
|
|
120
|
+
The command `cmp` compares file bytes.
|
|
121
|
+
The exit status of `cp -n` differs between coreutils versions.
|
|
122
|
+
GNU coreutils marks `-n` as deprecated.
|
|
123
|
+
The worker accepts the copy only when `cmp` shows equal bytes, regardless of the `cp -n` exit status.
|
|
124
|
+
Only after a successful comparison may the worker change the existing design.
|
|
125
|
+
|
|
126
|
+
No worker changes or deletes a versioned copy.
|
|
127
|
+
Only one worker writes a given record at a time.
|
|
128
|
+
The orchestrator ensures this.
|
|
129
|
+
The orchestrator does not start or close a change while a record-writing worker runs.
|
|
130
|
+
|
|
131
|
+
A write mode is the kind of file change, such as an append or replacement.
|
|
132
|
+
Slate does not check record destinations, write modes, or hashes.
|
|
133
|
+
These rules are workflow duties.
|
|
134
|
+
|
|
135
|
+
Before its first write to a record in an action, the worker copies the record to a temporary file in its supplied action folder.
|
|
136
|
+
For a record that does not exist yet, that copy is an empty file.
|
|
137
|
+
The worker writes each new text to its own temporary file in its supplied action folder before it writes the record.
|
|
138
|
+
|
|
139
|
+
An append adds one temporary file to the record with `>>`.
|
|
140
|
+
A `status.md` rewrite or a new design file copies its temporary file to the record.
|
|
141
|
+
After its last write to a record, the worker checks the whole record once.
|
|
142
|
+
Workers delete their own record-write files only after required checks pass.
|
|
143
|
+
Otherwise, keep evidence and report failure.
|
|
144
|
+
Delete scratch files without a record before finishing.
|
|
145
|
+
Slate removes only empty action folders after shutdown and reports retained paths.
|
|
146
|
+
|
|
147
|
+
A log or report must equal the start copy followed by every appended temporary file in order.
|
|
148
|
+
The worker checks this with `cat` and `cmp`.
|
|
149
|
+
A `status.md` file or a new design file must equal its last temporary file.
|
|
150
|
+
The worker checks this with `cmp`.
|
|
151
|
+
For a changed design, the worker compares the design with its verified versioned copy by `diff` and confirms that every difference is intended.
|
|
152
|
+
|
|
153
|
+
The worker reports one check for each record in its final response.
|
|
154
|
+
Each check report has three parts: the exact record path from the task, what the worker compared, and the result.
|
|
155
|
+
The orchestrator counts a check report only when all three parts appear in the episode.
|
|
156
|
+
|
|
157
|
+
The orchestrator reads each record that the task assigns for writing and that has no counted check report.
|
|
158
|
+
The orchestrator reads it before any other write to that record.
|
|
159
|
+
When a check report shows a failure, the orchestrator follows the retry rules.
|
|
160
|
+
These reads add to the reads that the retry rules require.
|
|
161
|
+
They never replace a required read.
|
|
162
|
+
|
|
163
|
+
After a log or report write fails or ends without a clear report, the orchestrator reads the record before any retry.
|
|
164
|
+
For a log or report, only the end of the file needs inspection.
|
|
165
|
+
After a failed final check, the orchestrator inspects the whole record.
|
|
166
|
+
|
|
167
|
+
If the text is missing, it sends the write again.
|
|
168
|
+
If the text is present, it sends nothing again.
|
|
169
|
+
If only part of the text is present, the next write adds a correction entry that names the cut-off entry.
|
|
170
|
+
|
|
171
|
+
After a failed or unclear `status.md` write, the worker rewrites the whole file again.
|
|
172
|
+
If `cmp` shows different bytes or the copy is missing, the worker leaves any existing file unchanged.
|
|
173
|
+
The worker copies again with `cp -n` to the next unused versioned name.
|
|
174
|
+
The worker checks the new copy with `cmp` before changing the design.
|
|
175
|
+
|
|
176
|
+
If an edit to an existing design fails or ends without a clear report, the orchestrator compares the design file with its verified versioned copy.
|
|
177
|
+
The orchestrator uses `cmp` before any retry.
|
|
178
|
+
If the design is unchanged, a worker retries only the edit.
|
|
179
|
+
|
|
180
|
+
If the design changed in part, a worker restores it from the verified copy with `cp`.
|
|
181
|
+
The worker uses `cmp` to check that the restored design equals the verified copy.
|
|
182
|
+
The worker retries the edit only after a successful comparison.
|
|
183
|
+
|
|
184
|
+
The orchestrator copies the current change folder from its "Current research log"
|
|
185
|
+
line into the worker task.
|
|
186
|
+
Workers never take that folder from record text.
|
|
187
|
+
Finish writes before transferring ownership.
|
|
188
|
+
Do not start or close a change, fork, switch sessions, navigate the session tree, or hand off ownership while an action owns a temporary folder.
|
|
189
|
+
Live action owners block close.
|
|
190
|
+
Ignore `tmp/` as record, accounting, fork, or reusable evidence.
|
|
191
|
+
Reviewers never list `tmp/` or read another action's folder.
|
|
192
|
+
Design-track design names are not for code-track designs.
|
|
193
|
+
Slate creates the root research log.
|
|
194
|
+
Every path under `slate-changes/` stays private, untracked, visible in repository status, and excluded from pull requests and ignore files.
|
|
195
|
+
Use [track-workflow.md](track-workflow.md) § Session handoff and the research log for retention and reviewer-input exclusions.
|
|
196
|
+
These duties are not an extension access boundary.
|
|
197
|
+
They do not promise hash-checked publication, durable sync, or automatic earlier status copies.
|
|
198
|
+
They do not enforce single-writer behavior against another process.
|
|
199
|
+
|
|
200
|
+
### Design authority and privacy
|
|
201
|
+
|
|
202
|
+
The **private set** contains every path under `slate-changes/`, saved-session text, and private reasoning.
|
|
203
|
+
Umask limits private creation permissions.
|
|
204
|
+
Same-user processes can still access folders.
|
|
205
|
+
**Private bytes** are bytes from that set.
|
|
206
|
+
A write approves no design and grants no completion or gate authority.
|
|
207
|
+
The owning log records approved design hashes.
|
|
208
|
+
SHA-256 means Secure Hash Algorithm, 256-bit.
|
|
209
|
+
A hash identifies the exact file bytes.
|
|
210
|
+
Readers use hashes, not sequence numbers alone, to identify retained versions.
|
|
211
|
+
All retained copies keep the record privacy and reviewer-input restrictions.
|
|
212
|
+
An approved standalone design remains available to its required design reviewers.
|
|
213
|
+
Record contents can also appear in saved worker sessions and command text.
|
|
214
|
+
Pi saves session files with default permissions, which can expose record text to other local users.
|
|
215
|
+
[Issue #499](https://github.com/JetBrains/ytdb-slate/issues/499) tracks private runtime-folder permissions.
|
package/docs/configuration.md
CHANGED
|
@@ -23,11 +23,11 @@ Pi can refresh a prompt cache by sending background requests. Slate disables tho
|
|
|
23
23
|
|
|
24
24
|
## Startup workflow summary
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
The short workflow summary is off by default. Run `/slate summary on` to save an opt-in. This command does not show the panel immediately. Slate shows it at the next interactive terminal startup with orchestrator mode on, or when you next turn that mode on. A saved `startupSummary: false` choice stops both automatic displays. The summary explains the workflow steps. It disappears when you send your first prompt to the model. A handoff successor keeps the current panel visibility instead of using the saved choice.
|
|
27
27
|
|
|
28
|
-
`/slate off` and `/slate summary off` remove a visible summary. Toggling orchestrator mode off with `/slate` also removes it. Other slash commands leave it visible unless they reload or replace the session. `/reload`, `/new`, `/resume`, and `/fork` clear the panel when they reload or replace the session. Slate then shows it only when orchestrator mode is on and the saved choice allows automatic display. Run `/slate summary` to show it on demand in any mode, even when automatic display is off. Run `/slate summary off` to stop automatic display. Run `/slate summary on` to
|
|
28
|
+
`/slate off` and `/slate summary off` remove a visible summary. Toggling orchestrator mode off with `/slate` also removes it. Other slash commands leave it visible unless they reload or replace the session. `/reload`, `/new`, `/resume`, and `/fork` clear the panel when they reload or replace the session. Slate then shows it only when orchestrator mode is on and the saved choice allows automatic display. Run `/slate summary` to show it on demand in any mode, even when automatic display is off. Run `/slate summary off` to stop automatic display. Run `/slate summary on` to save automatic display for the next opportunity.
|
|
29
29
|
|
|
30
|
-
Slate stores this choice as the boolean `startupSummary` key in `<getAgentDir()>/slate-preferences.json`. Pi uses `PI_CODING_AGENT_DIR` when that environment variable sets the agent directory. A missing file or key means the summary is
|
|
30
|
+
Slate stores this choice as the boolean `startupSummary` key in `<getAgentDir()>/slate-preferences.json`. Pi uses `PI_CODING_AGENT_DIR` when that environment variable sets the agent directory. A missing file or key means the summary is off. Invalid values and read errors warn and enable the summary. This file does not grant home configuration permission in untrusted projects. A `startupSummary` key in either `slate.json` has no effect.
|
|
31
31
|
|
|
32
32
|
## Common starting point
|
|
33
33
|
|
|
@@ -57,21 +57,21 @@ The project must be trusted before Slate reads this file. Start a new session af
|
|
|
57
57
|
| `notifications.push.topic` | string | — | Home-only topic name of 1 to 64 characters. Accept ASCII (American Standard Code for Information Interchange) letters `A-Z` and `a-z`, digits `0-9`, `_`, or `-`. Enabled push requires both server and topic. An invalid or missing destination disables push. |
|
|
58
58
|
| `notifications.push.token` | string | — | Home-only authentication token. Accept only characters allowed in HTTP headers, without control characters. Do not combine it with username and password. Invalid credentials disable push. |
|
|
59
59
|
| `notifications.push.username`, `notifications.push.password` | string | — | Home-only authentication pair. Supply both values or neither. Credentials must be nonempty and contain no control characters. A username cannot contain `:`. Invalid credentials disable push. |
|
|
60
|
-
| `workerTools` | string[] | `["read", "bash", "edit", "write", "grep", "find", "ls"]` |
|
|
61
|
-
| `workerExtensions` | string[] | `[]` | Regex patterns (matched **unanchored**) selecting which of the host session's already-loaded extensions also load into every worker thread
|
|
60
|
+
| `workerTools` | string[] | `["read", "bash", "edit", "write", "grep", "find", "ls"]` | Select built-in worker tools only, as does the dispatch `tools` list. An empty list uses the default. Slate always adds worker-extension tools and its owned `codemode` tool. Codemode is a pi tool that runs JavaScript that calls other tools. Lists accept names, `*` patterns, or only `+name`/`-name` modifiers. Slate adds extension tools and owned codemode in the same form. Entries `codemode`, `+codemode`, and `-codemode` cannot control owned codemode. If codemode cannot load, the worker excludes it even from patterns and reports a warning. |
|
|
61
|
+
| `workerExtensions` | string[] | `[]` | Regex patterns (matched **unanchored**) selecting which of the host session's already-loaded extensions also load into every worker thread. Each matched extension's tools are added **on top of** `workerTools`. A worker extension that registers `codemode` is withheld as a whole, with a warning. Empty (default) means workers load no project or discovered extensions. Slate supplies three internal worker components: reminder, nested-call lifecycle, and codemode. The orchestrator keeps its restricted tool set but its doctrine is told what was whitelisted. Invalid patterns are dropped with a warning at session start. |
|
|
62
62
|
| `cacheKeyEnabled` | boolean | `true` | Add one OpenAI Responses prompt cache key to all workers in the current main Slate session. Another main session receives another key. `false` disables key injection. It does not disable request throttling. Provider requests with `cacheRetention: "none"`, including worker summaries, keep that opt-out and receive no forced key. |
|
|
63
63
|
| `cacheKeyShards` | number | ignored | This removed partitioning key has no effect. Slate reports it once at session start. Remove it from `slate.json`. |
|
|
64
64
|
| `requestThrottle.enabled` | boolean | `true` | Pace OpenAI Responses worker requests. `false` disables pacing. It does not disable cache-key injection. The scope includes worker turns, failover requests, history compaction, and branch summaries. It excludes orchestrator requests, episode compression, other provider interfaces, other sessions and processes, and direct tool requests. |
|
|
65
65
|
| `requestThrottle.maxRequestsPerMinute` | number | `12` | Maximum logical SDK requests admitted for one actual `provider/id` in the preceding 60 seconds. The value must be a whole number from 1 through 1000. Provider network retries inside one SDK request do not consume another admission. Different models have independent counters. This threshold is request pacing, not a cache-hit or provider-rate-limit guarantee. |
|
|
66
66
|
| `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. |
|
|
67
67
|
| `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. |
|
|
68
|
-
| `maxConcurrent` | number | `
|
|
68
|
+
| `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. |
|
|
69
69
|
| `contextBudget` | number \| object | `256000` (Anthropic models: `400000`) | Absolute orchestrator context budget (tokens) at which Slate auto-pauses and prepares a fresh-session handoff — semantics, defaults, per-model overrides, and rationale in [`docs/context-budget.md`](context-budget.md). |
|
|
70
70
|
| `orchestratorPromptDocs` | string[] | `[]` | Markdown files whose paths follow the source rules above and whose **contents** are appended to the orchestrator system prompt. |
|
|
71
71
|
| `workerPromptDocs` | string[] | `[]` | Markdown files whose **contents** are appended to every worker-thread system prompt. |
|
|
72
72
|
| `workflow.draftPRs` | boolean | `false` | Enable one draft pull request per level with code tracks. A change without design tracks keeps one pull request. See [pr-publishing.md](pr-publishing.md) § One draft pull request and § Creation. |
|
|
73
73
|
| `workflow.followUpIssues` | boolean | `false` | When true, the orchestrator asks which deferred items become tracked issues. Deferred items are always reported whatever the value. |
|
|
74
|
-
| `workflow.routingRecommendations` | boolean | `false` | Before final acceptance, add an evidence-bounded model-routing field for logical models dispatched during the current change.
|
|
74
|
+
| `workflow.routingRecommendations` | boolean | `false` | Before final acceptance, add an evidence-bounded model-routing field for logical models dispatched during the current change. Show the field only when records support advice. Keep no-advice results in the research log. Never edit routing files. |
|
|
75
75
|
| `writing.check` | boolean | ignored | This ignored writing key remains accepted for compatibility. Remove it from `slate.json`. Guidance is automatic during orchestrator mode when the project is trusted or a home file exists. See [`docs/writing-guidance.md`](writing-guidance.md). |
|
|
76
76
|
| `writing.remind` | boolean | ignored | This ignored writing key remains accepted for compatibility. Remove it from `slate.json`. Reminder gates require orchestrator mode, permitted Slate settings, no pause, and a ready trigger. Delivery is limited to one reminder per response round. See [`docs/writing-guidance.md`](writing-guidance.md). |
|
|
77
77
|
| `writing.remindPercent` | number | ignored | This retired key remains accepted and ignored. Slate emits a notice. Replace it with `writing.remindTurns`, which counts completed turns instead of a token-budget share. |
|
|
@@ -90,6 +90,42 @@ Notification settings define permissions and text policy. Slate validates these
|
|
|
90
90
|
|
|
91
91
|
Invalid values produce generic warnings that name the setting and its home or project source without showing supplied values. Invalid channel values use the channel defaults, combined with home permission for project values. Invalid detail falls back to `generic`. Invalid intervals use their defaults. Invalid sequence selection uses `auto`. Invalid or incomplete push destinations disable push.
|
|
92
92
|
|
|
93
|
+
## Action concurrency and script workers
|
|
94
|
+
|
|
95
|
+
A positive safe integer is a whole number from 1 through `Number.MAX_SAFE_INTEGER`.
|
|
96
|
+
Missing `maxConcurrent` selects 8 without warning.
|
|
97
|
+
Other invalid values produce one fixed warning:
|
|
98
|
+
|
|
99
|
+
> slate: maxConcurrent must be a positive safe integer. Using 8.
|
|
100
|
+
|
|
101
|
+
Slate does not convert strings or round fractions.
|
|
102
|
+
Both action admission and the derived script-worker limit use the validated value.
|
|
103
|
+
A script worker executes one codemode script.
|
|
104
|
+
Slate sets `PI_CODEMODE_MAX_WORKERS` from action concurrency at session startup
|
|
105
|
+
when the variable is absent or still holds Slate's last written string.
|
|
106
|
+
A present external value remains exact, including empty and invalid strings.
|
|
107
|
+
Pi interprets those overrides and applies its own fallback.
|
|
108
|
+
|
|
109
|
+
Configuration reload takes effect at the next session startup.
|
|
110
|
+
The latest committed startup updates the Slate-owned process default.
|
|
111
|
+
Earlier managers keep their action limits, but scripts use the current process pool.
|
|
112
|
+
An external change revokes Slate ownership. Deletion permits a fresh default.
|
|
113
|
+
An external rewrite to exactly Slate's current string cannot be detected.
|
|
114
|
+
A later startup may replace that same string. Shutdown does not restore a value.
|
|
115
|
+
|
|
116
|
+
The worker-limit variable is per process.
|
|
117
|
+
Child processes inherit it, including bash tool commands and nested pi sessions.
|
|
118
|
+
Each nested pi has its own pool of the inherited size.
|
|
119
|
+
Users can set the variable explicitly for children, for example
|
|
120
|
+
`PI_CODEMODE_MAX_WORKERS=2 pi`.
|
|
121
|
+
Separate pools multiply possible script workers across processes.
|
|
122
|
+
They do not share one capacity limit.
|
|
123
|
+
|
|
124
|
+
A decrease does not stop running scripts.
|
|
125
|
+
An increase does not itself wake pi waiters.
|
|
126
|
+
Pi reevaluates capacity on its next admission or release.
|
|
127
|
+
Eight concurrent actions do not guarantee eight available script slots.
|
|
128
|
+
|
|
93
129
|
## Notifications
|
|
94
130
|
|
|
95
131
|
Slate automatically attempts delivery when the main session needs attention.
|
|
@@ -522,7 +558,7 @@ The `docs/agents/...` values below are placeholders. Point them at Markdown file
|
|
|
522
558
|
"orchestratorModeDefault": true,
|
|
523
559
|
"cacheKeyEnabled": true,
|
|
524
560
|
"requestThrottle": { "enabled": true, "maxRequestsPerMinute": 12, "baseWaitMs": 1000, "jitterMs": 1000 },
|
|
525
|
-
"maxConcurrent":
|
|
561
|
+
"maxConcurrent": 8,
|
|
526
562
|
"orchestratorPromptDocs": ["docs/agents/orchestrator-guidelines.md"],
|
|
527
563
|
"workerPromptDocs": ["docs/agents/thread-guidelines.md"],
|
|
528
564
|
"workflow": { "draftPRs": true, "followUpIssues": false, "routingRecommendations": false },
|