@orkestrel/scaffold 0.0.71 → 0.0.73
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/dist/host/CLAUDE.md +3 -3
- package/dist/host/agents/orchestration.md +66 -32
- package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +36 -6
- package/dist/host/agents/skills/enterprise-bootstrap/references/color-modes.md +3 -2
- package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +1 -1
- package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +18 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +2 -4
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +12 -9
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +16 -8
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +2 -2
- package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +1 -1
- package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +2 -1
- package/dist/host/agents/skills/orkestrel-prove-journey/SKILL.md +19 -8
- package/dist/host/agents/skills/orkestrel-prove-journey/references/layer.md +16 -15
- package/dist/host/agents/skills/orkestrel-prove-journey/references/statechart.md +5 -2
- package/dist/host/agents/skills/orkestrel-prove-journey/references/styles.md +5 -1
- package/dist/host/agents/templates/brief.md +4 -3
- package/dist/host/agents/transports/claude.md +13 -6
- package/dist/host/agents/transports/codex.md +2 -2
- package/dist/host/agents/transports/cursor.md +85 -0
- package/dist/host/claude/agents/application.md +5 -6
- package/dist/host/claude/agents/builder.md +3 -13
- package/dist/host/claude/agents/checker.md +9 -2
- package/dist/host/claude/agents/distiller.md +37 -0
- package/dist/host/claude/agents/grok.md +9 -56
- package/dist/host/claude/agents/{implementer.md → opus.md} +8 -9
- package/dist/host/claude/agents/orkestrel.md +53 -46
- package/dist/host/claude/agents/planner.md +12 -5
- package/dist/host/claude/agents/researcher.md +7 -0
- package/dist/host/claude/agents/reviewer.md +14 -7
- package/dist/host/claude/agents/scout.md +8 -1
- package/dist/host/claude/agents/sol.md +5 -5
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/writing.md +27 -24
- package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +1 -1
- package/dist/host/codex/agents/analyst.toml +10 -4
- package/dist/host/codex/agents/application.toml +5 -6
- package/dist/host/codex/agents/builder.toml +5 -5
- package/dist/host/codex/agents/checker.toml +4 -0
- package/dist/host/codex/agents/distiller.toml +28 -0
- package/dist/host/codex/agents/grok.toml +27 -19
- package/dist/host/codex/agents/opus.toml +5 -4
- package/dist/host/codex/agents/orkestrel.toml +5 -0
- package/dist/host/codex/agents/planner.toml +10 -0
- package/dist/host/codex/agents/researcher.toml +4 -0
- package/dist/host/codex/agents/reviewer.toml +12 -2
- package/dist/host/codex/agents/scout.toml +5 -2
- package/dist/host/codex/agents/{implementer.toml → sol.toml} +5 -6
- package/dist/host/codex/agents/verifier.toml +3 -0
- package/dist/host/codex/config.toml +2 -2
- package/dist/host/configs/policy.ts +5 -2
- package/dist/host/dotfiles/gitignore +3 -0
- package/dist/host/guides/test.md +77 -55
- package/dist/host/manifest.json +80 -72
- package/dist/host/tests/config.test.ts +113 -57
- package/dist/src/core/index.cjs +448 -349
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +22 -21
- package/dist/src/core/index.d.ts +22 -21
- package/dist/src/core/index.js +448 -349
- package/dist/src/core/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "opus"
|
|
2
|
-
description = "Codex-side driver for the Claude `
|
|
2
|
+
description = "Codex-side driver for the Claude `opus` route — a bounded nontrivial unit, the subjective mirror of `sol`. Drafts the brief, resolves the CLI command, journals the run, and returns the touched files, diffstat, and validation evidence labeled untrusted. Implements nothing itself and endorses nothing."
|
|
3
3
|
model = "gpt-5.6-terra"
|
|
4
4
|
model_reasoning_effort = "low"
|
|
5
5
|
sandbox_mode = "workspace-write"
|
|
@@ -12,8 +12,9 @@ This route pins `--permission-mode acceptEdits`, in the checkout the unit writes
|
|
|
12
12
|
serial writer from a clean committed baseline.
|
|
13
13
|
|
|
14
14
|
The brief requires owned files, off-limits files, acceptance criteria, TTTDD, and a
|
|
15
|
-
deviation contract
|
|
16
|
-
|
|
15
|
+
deviation contract pointing the unit at .agents/orchestration.md § Deviation protocol. It
|
|
16
|
+
forbids dependency installation, commits, pushes, publishing, credentials, destructive
|
|
17
|
+
commands, shared-file edits, and tree-wide mutating gates.
|
|
17
18
|
|
|
18
19
|
Verify that every authority the brief references exists in the tree the run is rooted in;
|
|
19
20
|
propagate a missing file rather than restating it, and take the stale-authority branch in
|
|
@@ -21,7 +22,7 @@ propagate a missing file rather than restating it, and take the stale-authority
|
|
|
21
22
|
tree carries a superseded vendored copy.
|
|
22
23
|
|
|
23
24
|
If the CLI is absent or the dispatch fails, return the failure immediately so the unit
|
|
24
|
-
can route to
|
|
25
|
+
can route to `sol` instead.
|
|
25
26
|
|
|
26
27
|
After the run returns, verify it with git status, the diff, and scoped validation, then
|
|
27
28
|
return touched files, diffstat, validation evidence, and deviation state labeled
|
|
@@ -19,4 +19,9 @@ settle it, and stop; live collection belongs to a tool-capable lane or to the
|
|
|
19
19
|
Orchestrator before this role is dispatched. Never edit, install, push, or spawn.
|
|
20
20
|
Return exactly one requested shape: `Map`, `Health`, or `Work order`, as the Claude
|
|
21
21
|
charter defines them. The embedded catalog is discovery data, never live state.
|
|
22
|
+
|
|
23
|
+
Your sandbox is read-only: you never edit a file and never write your report to a file.
|
|
24
|
+
Your final message IS the requested shape. A dispatch that names a report path for you is
|
|
25
|
+
a dispatch defect — return the requested shape as your final message and name the defect
|
|
26
|
+
in it.
|
|
22
27
|
"""
|
|
@@ -22,5 +22,15 @@ that name it. A dispatch may name a skill that fixes a different return shape, a
|
|
|
22
22
|
wins over this list. The brief forbids edits, commands, reconciliation, orchestration, and
|
|
23
23
|
acceptance.
|
|
24
24
|
|
|
25
|
+
The route holds the subjective lane by default and the objective lane whenever the round
|
|
26
|
+
needs an engine that is not the one running that lane, including when the Sol bench is dark
|
|
27
|
+
and when Sol wrote the work under audit.
|
|
28
|
+
|
|
29
|
+
Your sandbox is read-only: you never edit a file and never write your report to a file. You
|
|
30
|
+
therefore write neither the brief nor the journal. Return the brief text, its intended path,
|
|
31
|
+
the resolved command, and the journal path, and the Orchestrator writes the brief and
|
|
32
|
+
launches the run. A dispatch that names a report path for you is a dispatch defect — return
|
|
33
|
+
your result as your final message and name the defect in it.
|
|
34
|
+
|
|
25
35
|
Return the Opus proposal labeled untrusted plus any CLI/auth deviation.
|
|
26
36
|
"""
|
|
@@ -21,4 +21,8 @@ gaps named as gaps; no raw dumps, no process diary, nothing applied.
|
|
|
21
21
|
|
|
22
22
|
Heavy repository-scale absorption is never yours. If a dispatch exceeds a bounded
|
|
23
23
|
primary-source question, say so instead of absorbing it.
|
|
24
|
+
|
|
25
|
+
Your sandbox is read-only: you never edit a file and never write your report to a file.
|
|
26
|
+
Your final message IS the distillate. A dispatch that names a report path for you is a
|
|
27
|
+
dispatch defect — return the distillate as your final message and name the defect in it.
|
|
24
28
|
"""
|
|
@@ -11,8 +11,11 @@ in full; read it and follow it.
|
|
|
11
11
|
This route pins `--permission-mode plan`.
|
|
12
12
|
|
|
13
13
|
The brief names the lane the route holds, and requires the returned verdict to state
|
|
14
|
-
which lane it held. The
|
|
15
|
-
|
|
14
|
+
which lane it held. The route holds the subjective lane by default and the objective
|
|
15
|
+
lane whenever the round needs an engine that is not the one running that lane,
|
|
16
|
+
including when the Sol bench is dark and when Sol wrote the work under audit. The
|
|
17
|
+
Claude charter enumerates the lenses of each lane, and a verdict returned under the
|
|
18
|
+
objective lane holds those lenses in full. The brief
|
|
16
19
|
requires the `orkestrel-falsify` verdict shape and its single
|
|
17
20
|
terminal line, unless the dispatch names a different skill that fixes one; file:line
|
|
18
21
|
evidence on every required change; out-of-lane questions returned as referrals rather
|
|
@@ -21,5 +24,12 @@ the writer's report, whatever the brief says; and, for a rendered or externally
|
|
|
21
24
|
surface, the capture portfolio as primary evidence with source as corroboration. It
|
|
22
25
|
forbids edits, commands, orchestration, reconciliation, and acceptance.
|
|
23
26
|
|
|
27
|
+
Your sandbox is read-only: you never edit a file and never write your report to a
|
|
28
|
+
file. You therefore write neither the brief nor the journal. Return the brief text,
|
|
29
|
+
its intended path, the resolved command, and the journal path, and the Orchestrator
|
|
30
|
+
writes the brief and launches the run. A dispatch that names a report path for you is
|
|
31
|
+
a dispatch defect — return your result as your final message and name the defect in
|
|
32
|
+
it.
|
|
33
|
+
|
|
24
34
|
Return the Opus audit labeled untrusted plus any CLI/auth deviation.
|
|
25
35
|
"""
|
|
@@ -16,6 +16,9 @@ shape — deep reading and synthesis belong to the grok bench, quality judgment
|
|
|
16
16
|
review roles; if the question needs either, say so instead of drifting into it. Return
|
|
17
17
|
pointers, not prose: file:line for every claim, the minimal shape summary the question
|
|
18
18
|
needs, and an explicit list of searched-and-empty places — an absence claim is only as
|
|
19
|
-
good as its named search. Never
|
|
20
|
-
|
|
19
|
+
good as its named search. Never speculate past the evidence.
|
|
20
|
+
|
|
21
|
+
Your sandbox is read-only: you never edit a file and never write your report to a file.
|
|
22
|
+
Your final message IS the answer. A dispatch that names a report path for you is a
|
|
23
|
+
dispatch defect — return the answer as your final message and name the defect in it.
|
|
21
24
|
"""
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name = "
|
|
2
|
-
description = "GPT-5.6 Sol implementation of one bounded nontrivial unit as the sole serial writer in the checkout the unit writes
|
|
1
|
+
name = "sol"
|
|
2
|
+
description = "GPT-5.6 Sol implementation of one bounded nontrivial unit as the sole serial writer in the checkout the unit writes — the objective mirror of `opus`."
|
|
3
3
|
model = "gpt-5.6-sol"
|
|
4
4
|
model_reasoning_effort = "high"
|
|
5
5
|
sandbox_mode = "workspace-write"
|
|
@@ -13,8 +13,7 @@ dependencies, edit shared files, suppress diagnostics, leave current-scope
|
|
|
13
13
|
deferrals, use mocks, install, commit, push, publish, read secrets, run destructive
|
|
14
14
|
commands, or run tree-wide mutating gates. Validate only owned scope. For a defect
|
|
15
15
|
unit, record the exact command and its failing count before the fix and the same
|
|
16
|
-
command's passing count after, and report both.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
shared-file patches. Never spawn another agent or accept your own work.
|
|
16
|
+
command's passing count after, and report both. Follow .agents/orchestration.md
|
|
17
|
+
§ Deviation protocol. Otherwise return touched paths, diffstat, actual scoped
|
|
18
|
+
validation, and shared-file patches. Never spawn another agent or accept your own work.
|
|
20
19
|
"""
|
|
@@ -12,4 +12,7 @@ npm run format:check; npm run lint:check; npm run check; npm run build; npm test
|
|
|
12
12
|
Build outputs are allowed; never rewrite source or fix failures. Record each exit
|
|
13
13
|
code, exact failure excerpt, owning path, overall GREEN/RED, and anomalies. Never
|
|
14
14
|
spawn another agent. Return only the gate report.
|
|
15
|
+
|
|
16
|
+
Follow .agents/orchestration.md § Permission floor for the discarding git commands. Read a
|
|
17
|
+
dirty git status as the expected state.
|
|
15
18
|
"""
|
|
@@ -25,11 +25,11 @@ instead of acting as the primary Orchestrator. Do not delegate or expand its sco
|
|
|
25
25
|
|
|
26
26
|
Which local agent carries which engine, so the contract's routing resolves here. The
|
|
27
27
|
contract owns when each is used; this is only the mapping:
|
|
28
|
-
- Sol: this session, plus analyst and
|
|
28
|
+
- Sol: this session, plus analyst and sol.
|
|
29
29
|
- Cursor Grok: the grok bridge, read-only.
|
|
30
30
|
- Claude Opus 5: the planner and reviewer bridges, read-only, and the opus bridge for
|
|
31
31
|
writes.
|
|
32
|
-
- Luna: researcher, scout, and checker.
|
|
32
|
+
- Luna: distiller, researcher, scout, and checker.
|
|
33
33
|
- Terra: bridge drivers and fully specified units (builder, application, verifier).
|
|
34
34
|
"""
|
|
35
35
|
|
|
@@ -365,8 +365,9 @@ export const POLICY_BANNED_TERMS: readonly PolicyTerm[] = Object.freeze([
|
|
|
365
365
|
* Lists every substitution-table row a reader rules by sense, which no pattern matches.
|
|
366
366
|
*
|
|
367
367
|
* @remarks
|
|
368
|
-
* Each row carries a permitted sense: a date value, a version value, a causal clause,
|
|
369
|
-
*
|
|
368
|
+
* Each row carries a permitted sense: a date value, a version value, a causal clause, the name a
|
|
369
|
+
* replication topology takes, and a comparative or spatial relation. The currency check proves each
|
|
370
|
+
* row is registered here.
|
|
370
371
|
*/
|
|
371
372
|
export const POLICY_JUDGED_TERMS: readonly string[] = Object.freeze([
|
|
372
373
|
'now',
|
|
@@ -374,6 +375,8 @@ export const POLICY_JUDGED_TERMS: readonly string[] = Object.freeze([
|
|
|
374
375
|
'latest',
|
|
375
376
|
'once',
|
|
376
377
|
'since',
|
|
378
|
+
'above',
|
|
379
|
+
'below',
|
|
377
380
|
'master',
|
|
378
381
|
])
|
|
379
382
|
|
package/dist/host/guides/test.md
CHANGED
|
@@ -43,11 +43,12 @@ package holds one implementation of each and ships as a `devDependency`. Nothing
|
|
|
43
43
|
production code. Source: [`src/core`](../src/core), [`src/browser`](../src/browser), and
|
|
44
44
|
[`src/server`](../src/server).
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
This package runtime-depends on `@orkestrel/contract` for the outcome type `retryUntil` reads
|
|
47
|
+
internally. That type is not re-exported. No exported type here names an `@orkestrel/*` type. A
|
|
47
48
|
dependency on `@orkestrel/emitter` would install a second copy of it beside the one a consumer
|
|
48
49
|
already pins, and the compiler reads two copies as two distinct types. A foreign type in a
|
|
49
50
|
signature fails the other way, rejecting the consumer's own local value inside the consumer's own
|
|
50
|
-
repository.
|
|
51
|
+
repository. Those rules hold both.
|
|
51
52
|
|
|
52
53
|
## Install
|
|
53
54
|
|
|
@@ -110,31 +111,27 @@ member and `plus` introducing its call-signature members, and a type alias's own
|
|
|
110
111
|
a union's arms escaped as `\|`. An extended interface's name comes before `plus`, with the members
|
|
111
112
|
it adds after.
|
|
112
113
|
|
|
113
|
-
| Type | Kind | Shape
|
|
114
|
-
| -------------------------- | --------- |
|
|
115
|
-
| `WaitOptions` | interface | `{ budget?, interval?, signal? }`
|
|
116
|
-
| `RetryOptions` | interface | `WaitOptions` plus `{ attempts? }`
|
|
117
|
-
| `EventSubscriber` | type | `(listener) => cleanup \| void`
|
|
118
|
-
| `RecorderInterface` | interface | `{ calls, count, handler }` plus `clear`
|
|
119
|
-
| `EventSourceInterface` | interface | `{} plus on`
|
|
120
|
-
| `RecorderMap` | type | `{ readonly [K in TName]: RecorderInterface<TMap[K]> }`
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
Each interface's call-signature members are listed under [Methods](#methods). `Result` defaults `E`
|
|
136
|
-
to `Error`, where `@orkestrel/contract` publishes the same name defaulting to `unknown`;
|
|
137
|
-
[Limits](#limits) rules that divergence.
|
|
114
|
+
| Type | Kind | Shape | Summary |
|
|
115
|
+
| -------------------------- | --------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
116
|
+
| `WaitOptions` | interface | `{ budget?, interval?, signal? }` | Configures a bounded asynchronous wait with an elapsed-time limit, a delay between readings, and an abort signal. |
|
|
117
|
+
| `RetryOptions` | interface | `WaitOptions` plus `{ attempts? }` | Configures a bounded retry, adding an optional producer-call limit to a bounded wait's bounds. |
|
|
118
|
+
| `EventSubscriber` | type | `(listener) => cleanup \| void` | Subscribes a listener to one event source. |
|
|
119
|
+
| `RecorderInterface` | interface | `{ calls, count, handler }` plus `clear` | Records every call made to its handler. |
|
|
120
|
+
| `EventSourceInterface` | interface | `{} plus on` | Subscribes handlers to a typed event source. |
|
|
121
|
+
| `RecorderMap` | type | `{ readonly [K in TName]: RecorderInterface<TMap[K]> }` | Maps event names to recorders for their delivered argument tuples. |
|
|
122
|
+
| `SignalInterface` | interface | `{ controller, signal, count }` | Holds a real abort signal and controller instrumented with its live abort-listener tally. |
|
|
123
|
+
| `SignalRegistration` | type | `readonly [listener, installed, capture, cleanup]` | Represents one abort listener an instrumented signal installed, as its tally holds it. |
|
|
124
|
+
| `ResourceFactoryInterface` | interface | `{ created, destroyed }` plus `create` / `destroy` | Represents a numbered resource factory with records of every creation and destruction. |
|
|
125
|
+
| `TeardownInterface` | interface | `{ count }` plus `add` / `destroy` | Represents the cleanup a test adds as it goes and runs once, newest first, when it is done. |
|
|
126
|
+
| `TeardownHandler` | type | `() => void \| Promise<void>` | Represents the work one teardown entry performs when the list is destroyed. |
|
|
127
|
+
| `JSONSafe` | type | `JSONSafe<T>` | Represents the JSON-safe projection of a type: every member JSON preserves, mapped to itself, and every member it does not, mapped to `never`. |
|
|
128
|
+
| `HeadersSource` | type | `NonNullable<ConstructorParameters<typeof Headers>[0]>` | Covers any value the host `Headers` constructor accepts. |
|
|
129
|
+
| `StateTransition` | interface | `{ name, from, event, to }` | Represents one row of a statechart table: the entity's state before an event, the event, and the state that event must leave it in. |
|
|
130
|
+
| `StateScenario` | interface | `{ transition }` plus `arrange` / `act` / `assert` | Drives one `StateTransition` through the three phases that prove it. |
|
|
131
|
+
|
|
132
|
+
Each interface's call-signature members are listed under [Methods](#methods). `Result`, `Success`,
|
|
133
|
+
and `Failure` come from `@orkestrel/contract` (mirrored at [`contract.md`](contract.md)) and are not
|
|
134
|
+
re-exported; `retryUntil` reads `Result` internally.
|
|
138
135
|
|
|
139
136
|
#### Constants
|
|
140
137
|
|
|
@@ -221,15 +218,15 @@ The fixture builders, the readers, and the field writers do take an element, and
|
|
|
221
218
|
journey verb. `build` creates a node, `mount` attaches one, and `render` does both from
|
|
222
219
|
markup or from a tag and its classes; `clearStorage` takes nothing at all, and `removeDatabase`
|
|
223
220
|
takes a database name. The predicates, the element readers, and the describers name a node the
|
|
224
|
-
caller already has — `isRendered`, `isReachable`, `readText`, `readRole`, `readName`,
|
|
225
|
-
`describeTree`, `describeFocus`, `extractOrphans`, `readRows`, `readStyle`,
|
|
226
|
-
`readPixels`, `readContrast`, `readLayers`, `readBackdrop`, and `readRing` — and each
|
|
227
|
-
node rather than acting on a target it was handed. `captureFrame` and `place` take an
|
|
228
|
-
well, and photographing one is a reading too: neither moves focus, dispatches an event,
|
|
229
|
-
what the element renders. `typeInput` and `commitInput` are the exception, and it stays
|
|
230
|
-
write into the field they are given, as the synthetic counterpart of `typeAccessible`
|
|
231
|
-
component that listens for `input`. The color leaves, the cascade readers, the pane verbs,
|
|
232
|
-
whole-document readers take a value or nothing at all, so they name no target either.
|
|
221
|
+
caller already has — `isRendered`, `isReachable`, `readHit`, `readText`, `readRole`, `readName`,
|
|
222
|
+
`readStates`, `describeTree`, `describeFocus`, `extractOrphans`, `readRows`, `readStyle`,
|
|
223
|
+
`readToken`, `readPixels`, `readContrast`, `readLayers`, `readBackdrop`, and `readRing` — and each
|
|
224
|
+
reads that node rather than acting on a target it was handed. `captureFrame` and `place` take an
|
|
225
|
+
element as well, and photographing one is a reading too: neither moves focus, dispatches an event,
|
|
226
|
+
or changes what the element renders. `typeInput` and `commitInput` are the exception, and it stays
|
|
227
|
+
narrow: they write into the field they are given, as the synthetic counterpart of `typeAccessible`
|
|
228
|
+
for a component that listens for `input`. The color leaves, the cascade readers, the pane verbs,
|
|
229
|
+
and the whole-document readers take a value or nothing at all, so they name no target either.
|
|
233
230
|
|
|
234
231
|
#### Types
|
|
235
232
|
|
|
@@ -275,6 +272,7 @@ A `Shape` cell holds the constant's declared type.
|
|
|
275
272
|
| `isOutsideViewport` | function | `(rectangle: DOMRectReadOnly) => boolean` | Determines whether a rectangle lies wholly outside the browser viewport. |
|
|
276
273
|
| `isRendered` | function | `(element: Element) => boolean` | Determines whether the accessibility tree presents one element at all. |
|
|
277
274
|
| `isReachable` | function | `(element: Element) => boolean` | Determines whether a person can click one element where it sits. |
|
|
275
|
+
| `readHit` | function | `(element: Element) => Element \| undefined` | Reads the topmost element at one element's bounding-box centre. |
|
|
278
276
|
| `clickAccessible` | function | `(name: string) => Promise<void>` / `(role: string, name: string) => Promise<void>` | Clicks one visible, focus-reachable control by its accessible name through the browser provider. |
|
|
279
277
|
| `clickAccessibleWithin` | function | `(region: string, role: string, name: string) => Promise<void>` | Clicks one human-reachable control by role and accessible-name text inside a named region. |
|
|
280
278
|
| `clickDisclosure` | function | `(name: string) => Promise<void>` | Opens or closes one native details disclosure by its rendered summary. |
|
|
@@ -1188,24 +1186,24 @@ These hold across `src/core`, `src/browser`, `src/server`, and this guide.
|
|
|
1188
1186
|
into a description of the markup. `build` creates a node, `mount` attaches one, `render` does
|
|
1189
1187
|
both, `clearStorage` takes nothing at all, and `removeDatabase` takes a database name. The
|
|
1190
1188
|
predicates, the element readers, and the describers do take a node —
|
|
1191
|
-
`isRendered`, `isReachable`, `readText`, `readRole`, `readName`, `readStates`,
|
|
1192
|
-
`describeFocus`, `extractOrphans`, `readRows`, `readStyle`, `readToken`,
|
|
1193
|
-
`readContrast`, `readLayers`, `readBackdrop`, and `readRing` — and each is a
|
|
1194
|
-
the caller already has rather than a verb that acts on a target. `captureFrame`
|
|
1195
|
-
one as the subject of a photograph, which is a reading too: neither moves
|
|
1196
|
-
event, nor changes what the element renders. `typeInput` and `commitInput`
|
|
1197
|
-
acts on the element it is handed, and the exception is deliberately
|
|
1198
|
-
synthetic counterpart of `typeAccessible`, for a component that listens for
|
|
1199
|
-
that already holds the field. Drive the field by name wherever the keystrokes
|
|
1200
|
-
the journey claims. `readRing` is the case that makes the split explicit. It
|
|
1201
|
-
chrome a browser painted and never brings the focus about, so a journey
|
|
1202
|
-
through `traverseAccessible` or `userEvent.keyboard` from `vitest/browser`
|
|
1203
|
-
landed. The whole environment imports `vitest/browser` and DOM globals
|
|
1204
|
-
`src/core` import, no framework, no `node:*`, and no `import.meta.env`, so
|
|
1205
|
-
captures is the consumer's decision through `PortfolioOptions.enabled`
|
|
1206
|
-
variable this package reads. `vitest` is a peer dependency, so the
|
|
1207
|
-
the one the consumer already installed, and the
|
|
1208
|
-
`dependencies` is untouched.
|
|
1189
|
+
`isRendered`, `isReachable`, `readHit`, `readText`, `readRole`, `readName`, `readStates`,
|
|
1190
|
+
`describeTree`, `describeFocus`, `extractOrphans`, `readRows`, `readStyle`, `readToken`,
|
|
1191
|
+
`readPixels`, `readContrast`, `readLayers`, `readBackdrop`, and `readRing` — and each is a
|
|
1192
|
+
reader of a node the caller already has rather than a verb that acts on a target. `captureFrame`
|
|
1193
|
+
and `place` take one as the subject of a photograph, which is a reading too: neither moves
|
|
1194
|
+
focus, dispatches an event, nor changes what the element renders. `typeInput` and `commitInput`
|
|
1195
|
+
are the one pair that acts on the element it is handed, and the exception is deliberately
|
|
1196
|
+
narrow: they are the synthetic counterpart of `typeAccessible`, for a component that listens for
|
|
1197
|
+
`input` and a test that already holds the field. Drive the field by name wherever the keystrokes
|
|
1198
|
+
are part of what the journey claims. `readRing` is the case that makes the split explicit. It
|
|
1199
|
+
measures the focus chrome a browser painted and never brings the focus about, so a journey
|
|
1200
|
+
reaches the control through `traverseAccessible` or `userEvent.keyboard` from `vitest/browser`
|
|
1201
|
+
and then measures what landed. The whole environment imports `vitest/browser` and DOM globals
|
|
1202
|
+
and nothing else — no `src/core` import, no framework, no `node:*`, and no `import.meta.env`, so
|
|
1203
|
+
whether a run writes captures is the consumer's decision through `PortfolioOptions.enabled`
|
|
1204
|
+
rather than an environment variable this package reads. `vitest` is a peer dependency, so the
|
|
1205
|
+
provider the layer drives is the one the consumer already installed, and the
|
|
1206
|
+
zero-runtime-dependencies contract's empty `dependencies` is untouched.
|
|
1209
1207
|
14. **The wait family polls only where nothing publishes an event.** The no-polling architecture law
|
|
1210
1208
|
governs a product's idle wakeup: a running system parks on the event or the abort signal that
|
|
1211
1209
|
fires. A test instrument is the other case. It waits on a fact another process produces — a file
|
|
@@ -1250,6 +1248,13 @@ These hold across `src/core`, `src/browser`, `src/server`, and this guide.
|
|
|
1250
1248
|
narrow their own candidates and then keep the ones it accepts — so a journey meets one rule
|
|
1251
1249
|
rather than near-copies of it. Neither asks about the viewport; `resolveAccessible` scrolls a
|
|
1252
1250
|
wholly off-viewport target into view and measures that separately with `isOutsideViewport`.
|
|
1251
|
+
`readHit` reads beside that pair rather than filtering with it. It hit-tests one point — the
|
|
1252
|
+
element's own bounding-box centre — which is how it sees what neither predicate can: a cover
|
|
1253
|
+
over a control they both accept, and a wrapped inline target whose centre falls between its line
|
|
1254
|
+
boxes. No acting verb consults it, because it names a node rather than ruling, and `isReachable`
|
|
1255
|
+
stays the one reachability filter the verbs apply. It is also the reader that needs the pair run
|
|
1256
|
+
first, and [Bounds a shipped helper carries](#bounds-a-shipped-helper-carries) states what it
|
|
1257
|
+
reports for an element that failed them.
|
|
1253
1258
|
17. **A journal forwards every console call and swallows nothing.** A browser publishes no listener
|
|
1254
1259
|
for its own output, so `createJournal` stands in front of the console and hands each call on to
|
|
1255
1260
|
the channel that was there when `start` armed it. A run under a journal therefore prints exactly
|
|
@@ -1373,13 +1378,14 @@ or when a consumer appears the ruling did not consider.
|
|
|
1373
1378
|
| A DOM element builder | Ships | It ships as `build` for the element and `mount` for the attachment, and `render` widened to take a tag and its class list as well as markup. A class list, a text, and an attribute map are what a fixture actually varies, and expressing that variation through markup means assembling a string. Nothing here assembles a tree one call at a time: a fixture with children is still written as markup. |
|
|
1374
1379
|
| A surface digest — `describeSurface` | Refused | Its digest format is one workspace's policy about what a summary of a surface contains, and it is assembled from the excluded `extractControls` besides. `describeTree` and `describeFocus` publish the readings a digest is built from instead. |
|
|
1375
1380
|
| A control extractor — `extractControls` | Refused | Generalized past its one caller it is a wrapper over `querySelectorAll` that adds no boundary, invariant, composition, or narrower contract, which is what the superfluous-wrapper rule refuses. |
|
|
1381
|
+
| A pointer-centre hit reading — `readHit` | Ships | It ships as `readHit`. `extractControls` is the bar it has to clear, and it does: the centre computation composes a rectangle reading with a hit test, the `undefined` translation is this package's absence convention for a reader, and "the point is always this element's centre" is a materially narrower contract than `elementFromPoint`. `roughnotes` writes that composition inline in `App.test.ts`, `integration.test.ts`, and the `ContactForm`, `PaymentForm`, and `SubscribeForm` suites, each against the cover and the wrapped target `isReachable` cannot see. |
|
|
1376
1382
|
| Text resolution by selector — `resolveText` | Refused | The journey-layer contract is the one it breaks: a journey verb resolves its own target from a role and an accessible name, and one that takes a selector turns a journey into a description of the markup. Taking a node the test already holds is a different thing, which is what the element readers do; `findRule` takes a selector because its subject is the stylesheet rather than a target to act on. |
|
|
1377
1383
|
| A hand-driven timer — `terminal`, `toolbox` | Refused | `toolbox` runtime-depends on `terminal`, so the two are one implementation rather than independent demand. The shape is also `@orkestrel/terminal`'s published `TimerHandler`, which a copy here would redeclare unversioned and hand consumers a second incompatible type. |
|
|
1378
1384
|
| A hand-driven clock — `mcp`, `middleware` | Refused | `AGENTS.md` bans replacing the host clock outright, so publishing one from the fleet's own test package would sanction across every workspace the substitution those rules refuse. `waitForDelay` waits on a real host timer and `waitForCondition` bounds a real elapsed interval with `performance.now()`. |
|
|
1379
1385
|
| A reserve-then-release port picker | Refused | It binds a port, closes it, and hands the number to a child that binds it again, and the window between that close and that rebind is a race another process on the host can win. Have the child bind `0` and report back the port it was given; `createLoopback` does exactly that for a server the test owns itself. |
|
|
1380
1386
|
| An abort-signal wait — `waitForAbort` | Ships | It ships as `waitForAbort`. Every bounded member still takes `WaitOptions.signal` and rejects with the signal's own reason, so a bounded wait needs nothing here; this answers the other case, where the abort is itself the fact the test waits for. It parks on a one-shot listener with no timer and no budget, so a signal that never aborts is the caller's own deadlock rather than a timeout this could name. |
|
|
1381
1387
|
| Abort-signal instrumentation | Ships | It ships as `createSignal`. A recorder handed to `addEventListener('abort', …)` still records what one listener heard; what no recorder can answer is how many listeners stand on the signal at this moment, which is the question a leak asks. The instrumented signal counts its own abort registrations, keyed by the original callback and the capture mode, so a helper that removes what it added proves the removal. A registration leaves the tally on removal, on a one-shot delivery, and when a signal scoping it aborts, which is what makes the reading a live tally rather than an install count. |
|
|
1382
|
-
| An outcome triple — a produced arm, a failed arm, and their union |
|
|
1388
|
+
| An outcome triple — a produced arm, a failed arm, and their union | Adopted | This package runtime-depends on `@orkestrel/contract` and imports `Result`, `Success`, and `Failure` from it rather than shipping a second copy. No signature published here returns one — `retryUntil` reads the type internally — and the names are not re-exported. |
|
|
1383
1389
|
| A statechart transition table and its runner | Ships | It ships as `StateTransition` and `StateScenario`, driven by `executeScenario` and `executeScenarios`, with `STATECHART_ATTRIBUTES` and `STATECHART_STATUSES` for the harness a browser workspace renders. `elements` and `veneer` each declare the field-identical pair of interfaces in their own setup file, so the fleet already writes this twice and a third copy drifts the moment one of them adds a phase. The runner ships in its walking form rather than its registering one: a package helper registers no test, so `describe` and `it.each` stay in the workspace and this drives whatever rows it is handed. The row's name is what a failure carries, because a table's rows run under one test name and a bare assertion message never says which row produced it. No published package declares a generic transition record or a closure-walking runner. `@orkestrel/workflow` names a task's behavior with a string and sequences structurally, so it neither takes a scenario's closures nor drives `arrange`, `act`, and `assert` in order, and adopting it would move this package off layer 0 and pull that package's whole runtime graph into every consumer's test install. `STATECHART_STATUSES` names a harness's reported run state rather than a task's derived status, so it does not restate `LifecycleStatus`. `STATECHART_ATTRIBUTES` is the fleet contract the journey skill's statechart reference fixes for every harness and every gate, so it is a mechanism the fleet shares rather than one suite's policy. |
|
|
1384
1390
|
|
|
1385
1391
|
`ScratchInterface`'s own members were ruled the same way, and coherence rather than demand decided
|
|
@@ -1430,6 +1436,19 @@ the helper rather than to the host, and each names what to reach for instead.
|
|
|
1430
1436
|
carrying no leading number — `'auto'`, `'none'`, `''` — reads as `0`, because none of them
|
|
1431
1437
|
contributes a pixel to what a reader sees, so a caller cannot tell an unparsable value from a
|
|
1432
1438
|
genuine zero. Read the text with `readStyle` where that distinction is the subject.
|
|
1439
|
+
- **`readHit` answers for one point, and a node it returns is no proof of a cover.** An element the
|
|
1440
|
+
document does not render measures a zero rectangle at the origin, and a zero-area element measures
|
|
1441
|
+
a point on its own edge, so each is hit-tested like any other point and names whatever paints
|
|
1442
|
+
there — the surrounding container, or the document body for a rectangle collapsed at the origin —
|
|
1443
|
+
while `contains` reads false. A cover painted with `pointer-events: none` is absent from the hit
|
|
1444
|
+
test, so the reading names the element underneath it and the caller reads reachable for a cover a
|
|
1445
|
+
person can see. An element inside a shadow tree retargets in an open root and a closed one alike:
|
|
1446
|
+
the document-level hit test names the host, which the inner element does not contain. Run
|
|
1447
|
+
`isRendered` and `isReachable` first, and ask `element.getRootNode()` for its own
|
|
1448
|
+
`elementFromPoint` where the subject sits in a shadow tree. `undefined` carries the other silence:
|
|
1449
|
+
a centre outside the viewport reads the same as a centre that reaches nothing, and
|
|
1450
|
+
`isOutsideViewport` does not separate them, because it asks whether the whole rectangle misses the
|
|
1451
|
+
viewport while this asks where one point lands.
|
|
1433
1452
|
|
|
1434
1453
|
## Patterns
|
|
1435
1454
|
|
|
@@ -2783,6 +2802,9 @@ Each entry names the contracts its file proves. The test names carry the cases.
|
|
|
2783
2802
|
document no longer holds, a focusable SVG against an element from a foreign namespace, and the
|
|
2784
2803
|
refused summary that proves it is the one filter the acting verbs apply; `isRendered` takes each
|
|
2785
2804
|
removal a browser honours and, as the split from `isReachable`, a zero-size announced control.
|
|
2805
|
+
`readHit` takes a centre that reaches the element itself, a reachable control under a cover that
|
|
2806
|
+
the reading names instead, a soft-wrapped inline target whose two line rectangles leave the box
|
|
2807
|
+
centre on its list item, and a control fixed outside the viewport, whose centre reaches nothing.
|
|
2786
2808
|
Each acting verb takes its happy path and every voice it owns, including both
|
|
2787
2809
|
region-scoped refusals and both native-disclosure ones; `clickAccessibleWithin` also takes a
|
|
2788
2810
|
glyph-captioned control inside a region a glyph-carrying heading labels, which is the loose match
|