@orkestrel/scaffold 0.0.101 → 0.0.103

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.
Files changed (59) hide show
  1. package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +6 -14
  2. package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +41 -28
  3. package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +5 -12
  4. package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +25 -13
  5. package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +18 -25
  6. package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +11 -9
  7. package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +233 -232
  8. package/dist/agents/skills/orkestrel-publish/scripts/compare.js +95 -89
  9. package/dist/agents/skills/orkestrel-publish/scripts/pins.js +5 -7
  10. package/dist/agents/skills/orkestrel-publish/scripts/swap.js +1273 -0
  11. package/dist/agents/skills/orkestrel-publish/scripts/wave.js +99 -89
  12. package/dist/agents/skills/orkestrel-publish/scripts/window.js +54 -52
  13. package/dist/agents/skills/orkestrel-scout/scripts/map.js +160 -161
  14. package/dist/bin/main.js +483 -444
  15. package/dist/bin/main.js.map +1 -1
  16. package/dist/host/AGENTS.md +1 -0
  17. package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +10 -10
  18. package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +8 -11
  19. package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +58 -28
  20. package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +5 -10
  21. package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +31 -12
  22. package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +28 -23
  23. package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +12 -10
  24. package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +318 -237
  25. package/dist/host/agents/skills/orkestrel-journey/references/statechart.md +2 -5
  26. package/dist/host/agents/skills/orkestrel-publish/SKILL.md +7 -6
  27. package/dist/host/agents/skills/orkestrel-publish/references/release.md +12 -10
  28. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +12 -5
  29. package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +124 -82
  30. package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +5 -7
  31. package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +1655 -0
  32. package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +128 -97
  33. package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +70 -55
  34. package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +215 -155
  35. package/dist/host/claude/rules/architecture.md +2 -2
  36. package/dist/host/claude/rules/tests.md +8 -2
  37. package/dist/host/claude/rules/typescript.md +130 -0
  38. package/dist/host/claude/rules/workspace.md +33 -18
  39. package/dist/host/configs/helpers.ts +209 -148
  40. package/dist/host/configs/policy.ts +110 -105
  41. package/dist/host/dotfiles/oxlintrc.json +1 -11
  42. package/dist/host/guides/scaffold.md +244 -170
  43. package/dist/host/manifest.json +36 -30
  44. package/dist/host/tests/config.test.ts +1263 -687
  45. package/dist/host/tests/policy.test.ts +19 -0
  46. package/dist/host/tests/setupPolicy.ts +1699 -1026
  47. package/dist/src/core/index.cjs +1595 -1686
  48. package/dist/src/core/index.cjs.map +1 -1
  49. package/dist/src/core/index.d.cts +202 -18
  50. package/dist/src/core/index.d.ts +202 -18
  51. package/dist/src/core/index.js +1590 -1687
  52. package/dist/src/core/index.js.map +1 -1
  53. package/dist/src/server/index.cjs +448 -392
  54. package/dist/src/server/index.cjs.map +1 -1
  55. package/dist/src/server/index.d.cts +1182 -1052
  56. package/dist/src/server/index.d.ts +1182 -1052
  57. package/dist/src/server/index.js +447 -395
  58. package/dist/src/server/index.js.map +1 -1
  59. package/package.json +2 -2
@@ -100,8 +100,10 @@ Exported from `@orkestrel/scaffold`, and reachable from
100
100
  | `HostArtifact` | interface | Represents a file byte-copied from the vendored data root, planned before its bytes are read. |
101
101
  | `HydratedArtifact` | interface | Represents a vendored file whose exact bytes have been read, so its content can be compared. |
102
102
  | `ManifestDependencySet` | interface | Describes the runtime, development, and peer sections read from an existing package manifest. |
103
+ | `ManifestEdit` | interface | Represents one in-place replacement of manifest text. |
103
104
  | `ManifestRegionSet` | interface | Describes the manifest regions a writing operation may change. |
104
105
  | `ManifestScript` | interface | Represents one manifest script a region-writing operation may replace. |
106
+ | `ManifestToken` | interface | Represents one string or object brace found in manifest text. |
105
107
  | `Override` | interface | Represents one artifact override. |
106
108
  | `Plan` | interface | Holds the compiled, ordered artifact list and the selection it covers. |
107
109
  | `PlanSummary` | interface | Represents the tally of one plan by artifact origin. |
@@ -113,94 +115,95 @@ Exported from `@orkestrel/scaffold`, and reachable from
113
115
 
114
116
  #### Constants
115
117
 
116
- | Name | Kind | Summary |
117
- | --------------------------------- | ----- | ------------------------------------------------------------------------------------------------------ |
118
- | `APP_BROWSER_DEV_DEPENDENCIES` | const | Lists the development dependencies a private browser application adds. |
119
- | `APP_DEV_DEPENDENCIES` | const | Names the development dependency every private `app` environment adds. |
120
- | `APP_MATRIX` | const | Holds the configuration and runtime-entry settings each private `app` environment contributes, frozen. |
121
- | `APP_SERVER_DEV_DEPENDENCIES` | const | Lists the development dependencies a private server application adds. |
122
- | `ARTIFACT_TEMPLATES` | const | Holds formatter-stable template text for source, test, document, guide, and service artifacts. |
123
- | `AXES` | const | Lists the axes a browser extension may occupy, frozen. |
124
- | `BASE_DEV_DEPENDENCIES` | const | Holds the tooling versions scaffold and every generated workspace share. |
125
- | `BIN_CONFIGS` | const | Lists the configuration files a workspace that ships its own executable adds, frozen. |
126
- | `BIN_ENTRY_PATH` | const | Names the executable entry whose presence makes a workspace `bin`. |
127
- | `BROWSE_DEV_DEPENDENCIES` | const | Names the development dependency a browser or styles surface adds. |
128
- | `BROWSE_UPSTREAM` | const | Lists the packages `@orkestrel/browser` depends on at runtime, directly or transitively, frozen. |
129
- | `CANON_PATHS` | const | Lists the instruction-canon paths staged for reading rather than for a target, frozen. |
130
- | `CATALOG_AGENT_PATH` | const | Names the agent file whose marker-bounded package table the catalog verb alone owns. |
131
- | `CATALOG_CLOSING_MARKER` | const | Names the marker closing the package table inside `CATALOG_AGENT_PATH`. |
132
- | `CATALOG_OPENING_MARKER` | const | Names the marker opening the package table inside `CATALOG_AGENT_PATH`. |
133
- | `CONFIG_TEMPLATES` | const | Holds formatter-stable template text for every configuration artifact. |
134
- | `CONFORMANCE_TEST_PATH` | const | Names the official-tooling drift proof whose presence makes a workspace `conformance`. |
135
- | `CONTROL_CHARACTER_PATTERN` | const | Matches the Unicode controls, formatting controls, and line and paragraph separators rejected in text. |
136
- | `DECLARATION_DEV_DEPENDENCIES` | const | Lists the development dependencies that roll declarations up for published source. |
137
- | `DEFAULT_ENGINES` | const | Names the `engines.node` range a workspace starts with. |
138
- | `DEFAULT_VERSION` | const | Names the version a workspace starts at. |
139
- | `DEPENDENCY_NAME_PATTERN` | const | Matches the runtime dependency name syntax: the `@orkestrel` scope and a bare name. |
140
- | `DISTRIBUTION_TEST_PATH` | const | Names the generated packed-package proof every publishing workspace is planned at. |
141
- | `ENGINES_PATTERN` | const | Matches the minimum-Node engine syntax a blueprint declares. |
142
- | `ENVIRONMENTS` | const | Lists the `Environment` values, frozen. |
143
- | `EXECUTABLE_PATHS` | const | Lists the vendored paths a target receives with its executable bit set, frozen. |
144
- | `EXTRA_RANGE_PATTERN` | const | Matches the registry-only semver subset accepted for a development extra's range. |
145
- | `FLOOR_RANGE_PATTERN` | const | Matches the exact `major.minor.patch` floor accepted for a foreign peer's range. |
146
- | `FOREIGN_NAME_PATTERN` | const | Matches the package name syntax for a dependency this package does not publish. |
147
- | `FRAMEWORKS` | const | Lists the supported browser frameworks, frozen. |
148
- | `FRAMEWORK_MATRIX` | const | Describes the tooling and package boundaries of each browser framework, frozen. |
149
- | `GLOBAL_SETUP_PATH` | const | Names the shared Vitest global-setup module whose presence makes a workspace `global`. |
150
- | `GROUPS` | const | Lists the `Group` values in plan order, frozen. |
151
- | `GUIDES_TEST_PATH` | const | Names the package-owned guide-parity entry used by `test:guides` and to select the `guides` project. |
152
- | `HEX_PATTERN` | const | Matches exact lowercase hexadecimal bytes: two digits per byte, and empty content is valid. |
153
- | `HOST_INVENTORY_PATH` | const | Names the repository-relative path where the committed vendored-file inventory is served. |
154
- | `HOST_PATHS` | const | Lists the paths a target receives from the vendored data root, frozen. |
155
- | `INTEGRATION_TEST_PATH` | const | Names the cross-environment composition proof whose presence makes a workspace `integration`. |
156
- | `INVALID_PATH_CHARACTER_PATTERN` | const | Matches the visible characters a target-relative path and a Markdown path cell both forbid. |
157
- | `JOURNEY_CONFIG_PATH` | const | Names the Vite wrapper whose presence makes a workspace `journey`. |
158
- | `MANIFEST_PATH` | const | Names the manifest path every compiler plan emits with birth ownership. |
159
- | `MAX_ARTIFACT_BYTES` | const | Caps the bytes accepted for one artifact. |
160
- | `MAX_ARTIFACT_HEX_LENGTH` | const | Caps the length of the hexadecimal string carrying one artifact's bytes. |
161
- | `MAX_AUDIT_FINDINGS` | const | Caps the findings one audit can produce from a bounded plan and snapshot. |
162
- | `MAX_COLLECTION_ITEMS` | const | Caps the items accepted in one public collection. |
163
- | `MAX_DEPENDENCY_NAME_LENGTH` | const | Sets the maximum dependency package name length, scope included, as the registry caps it. |
164
- | `MAX_MANIFEST_BYTES` | const | Caps the bytes accepted for one package or vendored-host manifest. |
165
- | `MAX_NAME_LENGTH` | const | Caps the bare workspace name length. |
166
- | `MAX_PATH_LENGTH` | const | Caps the length of one path, matching the longest a supported filesystem accepts. |
167
- | `MAX_RANGE_LENGTH` | const | Caps the length of one declared package range. |
168
- | `MAX_REGISTRY_BYTES` | const | Caps the decoded bytes accepted from one registry response. |
169
- | `MAX_SCRIPT_LENGTH` | const | Caps the length of one manifest script name or command. |
170
- | `MAX_TOTAL_ARTIFACT_BYTES` | const | Caps the bytes retained across one whole plan or audit. |
171
- | `MAX_TOTAL_REGISTRY_BYTES` | const | Caps the decoded bytes accepted across one registry-reading call. |
172
- | `MINIMUM_NODE_VERSION` | const | Names the oldest Node version the generated toolchain supports. |
173
- | `MINIMUM_NPM_VERSION` | const | Names the oldest npm version the generated toolchain supports. |
174
- | `NAME_PATTERN` | const | Matches the bare workspace name syntax: lowercase alphanumeric with hyphens, letter first. |
175
- | `ORCHESTRATION_PATH_NAMES` | const | Lists the exact root paths that wire an agent bench or own an orchestration directory, frozen. |
176
- | `ORCHESTRATION_PATH_PREFIXES` | const | Lists the path prefixes whose contents instruct or wire an agent, frozen. |
177
- | `ORKESTREL_RANGE_PATTERN` | const | Matches the exact caret-pinned pre-1.0 range accepted for an `@orkestrel/*` runtime dependency. |
178
- | `PRINT_WIDTH` | const | Caps the columns one emitted line may occupy, matching `printWidth` in `.oxfmtrc.json`. |
179
- | `REFERENCE_PATHS` | const | Lists the reference paths staged for offline reading, frozen. |
180
- | `RELEASE_PROOF_COMMAND` | const | Names the `prepublishOnly` row that runs the packed-package proof against a real registry. |
181
- | `RESERVED_SHEET_NAMES` | const | Lists the names a styles extension cannot occupy, frozen. |
182
- | `SEED_GUIDE_PATHS` | const | Lists the guide paths a generated workspace starts with, frozen. |
183
- | `SERVICE_SCRIPT_PATH` | const | Names the inventory skeleton a workspace with declared service vendors is given once. |
184
- | `SERVICE_SETUP_PATH` | const | Names the live-service readiness module whose presence makes a workspace `service`. |
185
- | `SERVICE_TEST_INCLUDE` | const | Names the include the live-service project covers, which is a directory rather than one proof. |
186
- | `SHEET_ENTRY_NAME` | const | Names the build entry beside each stylesheet marker. |
187
- | `SHOWCASE_CONFIG_PATH` | const | Names the Vite wrapper whose presence makes a workspace `showcase`. |
188
- | `SHOWCASE_DEV_DEPENDENCIES` | const | Names the tested dependency pair selected by the optional single-file showcase build. |
189
- | `SHOWCASE_OVERRIDES` | const | Names the scoped npm override required by the tested showcase plugin. |
190
- | `SHOWCASE_PAGES_PATH` | const | Names the physical showcase output directory. |
191
- | `SKILLS_CONFIG_PATH` | const | Names the TypeScript wrapper whose presence makes a workspace `skills`. |
192
- | `SOURCE_BROWSER_DEV_DEPENDENCIES` | const | Lists the development dependencies a published browser `src` environment adds. |
193
- | `SRC_MATRIX` | const | Holds the build and export settings each published `src` environment contributes, frozen. |
194
- | `STYLES_DEV_DEPENDENCIES` | const | Lists the development dependencies the styles surface adds, frozen. |
195
- | `STYLES_ENTRY_PATH` | const | Names the base stylesheet marker. |
196
- | `SURFACES` | const | Lists the surfaces an extension may extend, frozen. |
197
- | `TAB_WIDTH` | const | Sets the columns one tab occupies when the formatter measures a line, matching `tabWidth`. |
198
- | `TARGET_SKILL_NAMES` | const | Lists the package-facing skills a target receives pointers for, frozen and alphabetical. |
199
- | `THEMES_BARREL_PATH` | const | Names the themes stylesheet marker. |
200
- | `THEMES_ENTRY_PATH` | const | Names the themes build entry marker. |
201
- | `VERSION_PATTERN` | const | Matches the exact `major.minor.patch` version syntax a blueprint declares. |
202
- | `WORKSPACE_DEV_ENGINES` | const | Holds the `devEngines` record every generated manifest carries. |
203
- | `WORKSPACE_OWNED_PATHS` | const | Lists the vendored paths whose present bytes belong to each workspace, frozen. |
118
+ | Name | Kind | Summary |
119
+ | --------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
+ | `APP_BROWSER_DEV_DEPENDENCIES` | const | Lists the development dependencies a private browser application adds. |
121
+ | `APP_DEV_DEPENDENCIES` | const | Names the development dependency every private `app` environment adds. |
122
+ | `APP_MATRIX` | const | Holds the configuration and runtime-entry settings each private `app` environment contributes, frozen. |
123
+ | `APP_SERVER_DEV_DEPENDENCIES` | const | Lists the development dependencies a private server application adds. |
124
+ | `ARTIFACT_TEMPLATES` | const | Holds formatter-stable template text for source, test, document, guide, and service artifacts. |
125
+ | `AXES` | const | Lists the axes a browser extension may occupy, frozen. |
126
+ | `BASE_DEV_DEPENDENCIES` | const | Holds the tooling versions scaffold and every generated workspace share. |
127
+ | `BIN_CONFIGS` | const | Lists the configuration files a workspace that ships its own executable adds, frozen. |
128
+ | `BIN_ENTRY_PATH` | const | Names the executable entry whose presence makes a workspace `bin`. |
129
+ | `BROWSE_DEV_DEPENDENCIES` | const | Names the development dependency a browser or styles surface adds. |
130
+ | `BROWSE_UPSTREAM` | const | Lists the packages `@orkestrel/browser` depends on at runtime, directly or transitively, frozen. |
131
+ | `CANON_PATHS` | const | Lists the instruction-canon paths staged for reading rather than for a target, frozen. |
132
+ | `CATALOG_AGENT_PATH` | const | Names the agent file whose marker-bounded package table the catalog verb alone owns. |
133
+ | `CATALOG_CLOSING_MARKER` | const | Names the marker closing the package table inside `CATALOG_AGENT_PATH`. |
134
+ | `CATALOG_OPENING_MARKER` | const | Names the marker opening the package table inside `CATALOG_AGENT_PATH`. |
135
+ | `CONFIG_TEMPLATES` | const | Holds formatter-stable template text for every configuration artifact. |
136
+ | `CONFORMANCE_TEST_PATH` | const | Names the official-tooling drift proof whose presence makes a workspace `conformance`. |
137
+ | `CONTROL_CHARACTER_PATTERN` | const | Matches the Unicode controls, formatting controls, and line and paragraph separators rejected in text. |
138
+ | `DECLARATION_DEV_DEPENDENCIES` | const | Lists the development dependencies that roll declarations up for published source. |
139
+ | `DEFAULT_ENGINES` | const | Names the `engines.node` range a workspace starts with. |
140
+ | `DEFAULT_VERSION` | const | Names the version a workspace starts at. |
141
+ | `DEPENDENCY_NAME_PATTERN` | const | Matches the runtime dependency name syntax: the `@orkestrel` scope and a bare name. |
142
+ | `DISTRIBUTION_TEST_PATH` | const | Names the generated packed-package proof every publishing workspace is planned at. |
143
+ | `ENGINES_PATTERN` | const | Matches the minimum-Node engine syntax a blueprint declares. |
144
+ | `ENVIRONMENTS` | const | Lists the `Environment` values, frozen. |
145
+ | `EXECUTABLE_PATHS` | const | Lists the vendored paths a target receives with its executable bit set, frozen. |
146
+ | `EXTRA_RANGE_PATTERN` | const | Matches the registry-only semver subset accepted for a development extra's range. |
147
+ | `FLOOR_RANGE_PATTERN` | const | Matches the exact `major.minor.patch` floor accepted for a foreign peer's range. |
148
+ | `FOREIGN_NAME_PATTERN` | const | Matches the package name syntax for a dependency this package does not publish. |
149
+ | `FRAMEWORKS` | const | Lists the supported browser frameworks, frozen. |
150
+ | `FRAMEWORK_MATRIX` | const | Describes the tooling and package boundaries of each browser framework, frozen. |
151
+ | `GLOBAL_SETUP_PATH` | const | Names the shared Vitest global-setup module whose presence makes a workspace `global`. |
152
+ | `GROUPS` | const | Lists the `Group` values in plan order, frozen. |
153
+ | `GUIDES_TEST_PATH` | const | Names the package-owned guide-parity entry used by `test:guides` and to select the `guides` project. |
154
+ | `HEX_PATTERN` | const | Matches exact lowercase hexadecimal bytes: two digits per byte, and empty content is valid. |
155
+ | `HOST_INVENTORY_PATH` | const | Names the repository-relative path where the committed vendored-file inventory is served. |
156
+ | `HOST_PATHS` | const | Lists the paths a target receives from the vendored data root, frozen. |
157
+ | `INTEGRATION_TEST_PATH` | const | Names the cross-environment composition proof whose presence makes a workspace `integration`. |
158
+ | `INVALID_PATH_CHARACTER_PATTERN` | const | Matches the visible characters a target-relative path and a Markdown path cell both forbid. |
159
+ | `JOURNEY_CONFIG_PATH` | const | Names the Vite wrapper whose presence makes a workspace `journey`. |
160
+ | `MANIFEST_PATH` | const | Names the manifest path every compiler plan emits with birth ownership. |
161
+ | `MAX_ARTIFACT_BYTES` | const | Caps the bytes accepted for one artifact. |
162
+ | `MAX_ARTIFACT_HEX_LENGTH` | const | Caps the length of the hexadecimal string carrying one artifact's bytes. |
163
+ | `MAX_AUDIT_FINDINGS` | const | Caps the findings one audit can produce from a bounded plan and snapshot. |
164
+ | `MAX_COLLECTION_ITEMS` | const | Caps the items accepted in one public collection. |
165
+ | `MAX_DEPENDENCY_NAME_LENGTH` | const | Sets the maximum dependency package name length, scope included, as the registry caps it. |
166
+ | `MAX_MANIFEST_BYTES` | const | Caps the bytes accepted for one package or vendored-host manifest. |
167
+ | `MAX_NAME_LENGTH` | const | Caps the bare workspace name length. |
168
+ | `MAX_PATH_LENGTH` | const | Caps the length of one path, matching the longest a supported filesystem accepts. |
169
+ | `MAX_RANGE_LENGTH` | const | Caps the length of one declared package range. |
170
+ | `MAX_REGISTRY_BYTES` | const | Caps the decoded bytes accepted from one registry response. |
171
+ | `MAX_SCRIPT_LENGTH` | const | Caps the length of one manifest script name or command. |
172
+ | `MAX_TOTAL_ARTIFACT_BYTES` | const | Caps the bytes retained across one whole plan or audit. |
173
+ | `MAX_TOTAL_REGISTRY_BYTES` | const | Caps the decoded bytes accepted across one registry-reading call. |
174
+ | `MINIMUM_NODE_VERSION` | const | Names the oldest Node version the generated toolchain supports. |
175
+ | `MINIMUM_NPM_VERSION` | const | Names the oldest npm version the generated toolchain supports. |
176
+ | `NAME_PATTERN` | const | Matches the bare workspace name syntax: lowercase alphanumeric with hyphens, letter first. |
177
+ | `ORCHESTRATION_PATH_NAMES` | const | Lists the exact root paths that wire an agent bench or own an orchestration directory, frozen. |
178
+ | `ORCHESTRATION_PATH_PREFIXES` | const | Lists the path prefixes whose contents instruct or wire an agent, frozen. |
179
+ | `ORKESTREL_RANGE_PATTERN` | const | Matches the exact caret-pinned pre-1.0 range accepted for an `@orkestrel/*` runtime dependency. |
180
+ | `PRINT_WIDTH` | const | Caps the columns one emitted line may occupy, matching `printWidth` in `.oxfmtrc.json`. |
181
+ | `REFERENCE_PATHS` | const | Lists the reference paths staged for offline reading, frozen. |
182
+ | `RELEASE_PROOF_COMMAND` | const | Names the `prepublishOnly` row that runs the packed-package proof against a real registry. |
183
+ | `RESERVED_SHEET_NAMES` | const | Lists the names a styles extension cannot occupy, frozen. |
184
+ | `SEED_GUIDE_PATHS` | const | Lists the guide paths a generated workspace starts with, frozen. |
185
+ | `SERVICE_SCRIPT_PATH` | const | Names the inventory skeleton a workspace with declared service vendors is given once. |
186
+ | `SERVICE_SETUP_PATH` | const | Names the live-service readiness module whose presence makes a workspace `service`. |
187
+ | `SERVICE_TEST_INCLUDE` | const | Names the include the live-service project covers, which is a directory rather than one proof. |
188
+ | `SHEET_ENTRY_NAME` | const | Names the build entry beside each stylesheet marker. |
189
+ | `SHOWCASE_CONFIG_PATH` | const | Names the Vite wrapper whose presence makes a workspace `showcase`. |
190
+ | `SHOWCASE_DEV_DEPENDENCIES` | const | Names the tested dependency pair selected by the optional single-file showcase build. |
191
+ | `SHOWCASE_OVERRIDES` | const | Names the scoped npm override required by the tested showcase plugin. |
192
+ | `SHOWCASE_PAGES_PATH` | const | Names the physical showcase output directory. |
193
+ | `SKILLS_CONFIG_PATH` | const | Names the TypeScript wrapper whose presence makes a workspace `skills`. |
194
+ | `SOURCE_BROWSER_DEV_DEPENDENCIES` | const | Lists the development dependencies a published browser `src` environment adds. |
195
+ | `SRC_MATRIX` | const | Holds the build and export settings each published `src` environment contributes, frozen. |
196
+ | `STUDIES_TEST_INCLUDE` | const | Names the include the study project covers, where an exact-case `*.test.ts` file beneath `tests/studies`, outside any `node_modules` or `.git` directory, makes a workspace `studies`. |
197
+ | `STYLES_DEV_DEPENDENCIES` | const | Lists the development dependencies the styles surface adds, frozen. |
198
+ | `STYLES_ENTRY_PATH` | const | Names the base stylesheet marker. |
199
+ | `SURFACES` | const | Lists the surfaces an extension may extend, frozen. |
200
+ | `TAB_WIDTH` | const | Sets the columns one tab occupies when the formatter measures a line, matching `tabWidth`. |
201
+ | `TARGET_SKILL_NAMES` | const | Lists the package-facing skills a target receives pointers for, frozen and alphabetical. |
202
+ | `THEMES_BARREL_PATH` | const | Names the themes stylesheet marker. |
203
+ | `THEMES_ENTRY_PATH` | const | Names the themes build entry marker. |
204
+ | `VERSION_PATTERN` | const | Matches the exact `major.minor.patch` version syntax a blueprint declares. |
205
+ | `WORKSPACE_DEV_ENGINES` | const | Holds the `devEngines` record every generated manifest carries. |
206
+ | `WORKSPACE_OWNED_PATHS` | const | Lists the vendored paths whose present bytes belong to each workspace, frozen. |
204
207
 
205
208
  #### Guards
206
209
 
@@ -257,6 +260,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
257
260
  | `compareVersions` | function | Compares two versions by their numeric components. |
258
261
  | `computeBytes` | function | Counts the UTF-8 bytes text encodes to. |
259
262
  | `computeHash` | function | Computes the deterministic content identity of text. |
263
+ | `computeTotal` | function | Computes the sum of a list of numbers. |
260
264
  | `contentToHex` | function | Encodes text as the exact lowercase hexadecimal form of its UTF-8 bytes. |
261
265
  | `extractRangeMajor` | function | Extracts the major component of an admitted dependency range. |
262
266
  | `extractVersion` | function | Extracts the major, minor, and patch components of an exact version. |
@@ -266,6 +270,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
266
270
  | `isDeferredPath` | function | Checks whether another surface owns the vendored bytes at a path. |
267
271
  | `isFloorPath` | function | Checks whether a destination's floor bytes survive a live overlay. |
268
272
  | `isRetainedPath` | function | Checks whether another surface owns a target's present bytes at a path. |
273
+ | `iterateAnswers` | function | Yields the answer to each value of a source and ends after the first refused answer. |
269
274
  | `manifestToDependencies` | function | Projects a package manifest's text to the `@orkestrel/*` packages each dependency section declares. |
270
275
  | `manifestToName` | function | Projects a package manifest's text to its own name. |
271
276
  | `matchesDriftReachability` | function | Tests whether `inferDrift` could have produced a finding for an ownership. |
@@ -276,6 +281,7 @@ Exported from `@orkestrel/scaffold`, and reachable from
276
281
  | `nameToGuide` | function | Derives the guide mirror path a package name answers for. |
277
282
  | `planToSummary` | function | Projects a plan into its tally by artifact origin. |
278
283
  | `renderSkillPointer` | function | Renders the `SKILL.md` pointer a target carries in place of a canonical skill. |
284
+ | `scanManifestTokens` | function | Scans manifest text for its strings and object braces, in order. |
279
285
  | `selectGroups` | function | Selects the groups a compile covers, in plan order. |
280
286
  | `selectHostPaths` | function | Selects the host paths a named workspace vendors. |
281
287
  | `serializeTypeScriptString` | function | Serializes one string as a single-quoted TypeScript literal. |
@@ -310,11 +316,13 @@ Exported from `@orkestrel/scaffold`, and reachable from
310
316
  | `blueprintToWritableScripts` | function | Projects a blueprint into the manifest scripts a region write may replace. |
311
317
  | `dependenciesToQuestions` | function | Measures one declared package list against the name and range syntax it accepts. |
312
318
  | `insertManifestDependencies` | function | Inserts dependencies a package manifest does not declare into the section each one names. |
319
+ | `insertManifestSection` | function | Inserts dependencies into one section of package manifest text. |
313
320
  | `overridesToQuestions` | function | Measures a blueprint's overrides against the artifacts drafted for it. |
314
321
  | `pathToCondition` | function | Builds one `exports` condition block for a built environment. |
315
322
  | `planToFindings` | function | Compares a plan against a target's current content. |
316
323
  | `planToHash` | function | Computes a plan's content identity. |
317
324
  | `replaceManifestRanges` | function | Replaces the runtime and development dependency ranges in package manifest text, and never a peer range. |
325
+ | `replaceManifestOverride` | function | Replaces one npm override leaf in manifest text, inserting its absent ancestors. |
318
326
  | `replaceManifestOverrides` | function | Replaces selected npm override leaves while preserving every byte outside the edited path. |
319
327
  | `replaceManifestScripts` | function | Replaces named script values in package manifest text. |
320
328
  | `replacePlanRanges` | function | Replaces dependency ranges in a plan's manifest and recomputes its identity. |
@@ -348,27 +356,27 @@ Exported from `@orkestrel/scaffold/server`, and reachable from
348
356
 
349
357
  #### Interfaces
350
358
 
351
- | Name | Kind | Summary |
352
- | ----------------------- | --------- | ------------------------------------------------------------------------------------------------- |
353
- | `BytesReadResult` | interface | Reports the outcome of one bounded read whose body is taken as exact bytes. |
354
- | `Host` | interface | Represents a whole vendored host supplied as a value: the membership beside the bytes filling it. |
355
- | `HostInventory` | interface | Represents the committed vendored-file inventory as one call's reads are decided against. |
356
- | `HostManifest` | interface | Represents the complete vendored-host inventory. |
357
- | `HostStageOptions` | interface | Configures the committed inventory baseline and staging reports. |
358
- | `ManifestEntry` | interface | Represents one file record of the vendored host's manifest. |
359
- | `MaterializeResult` | interface | Reports the outcome of one mutation of a target. |
360
- | `MaterializerInterface` | interface | Describes the mutation contract: the package's only filesystem writer. |
361
- | `MaterializerOptions` | interface | Represents the options for the materializer. |
362
- | `ReadAllowance` | interface | Represents the byte allowance one whole upstream call spends across every read it makes. |
363
- | `SurfaceCollision` | interface | Represents a Surface name claimed by distinct package guides. |
364
- | `TextReadResult` | interface | Reports the outcome of one bounded read whose body is taken as text. |
365
- | `Worktree` | interface | Describes what git reports about a target's working tree. |
366
- | `UpstreamInterface` | interface | Describes the upstream contract: the package's only network reader, and it never writes. |
367
- | `UpstreamOptions` | interface | Represents the options for the upstream reader. |
368
- | `WriteAnchor` | interface | Represents one physical directory identity captured across a write transaction. |
369
- | `WriteDirectoryResult` | interface | Reports the final directory anchor of a write transaction and the subset one call created. |
370
- | `WriteExpectation` | interface | Represents one destination snapshot captured before a write and required to survive it. |
371
- | `WritePrecondition` | interface | Describes the narrower caller-observed destination state a write transaction must still match. |
359
+ | Name | Kind | Summary |
360
+ | ------------------------ | --------- | ------------------------------------------------------------------------------------------------- |
361
+ | `BytesReadResult` | interface | Reports the outcome of one bounded read whose body is taken as exact bytes. |
362
+ | `Host` | interface | Represents a whole vendored host supplied as a value: the membership beside the bytes filling it. |
363
+ | `HostInventory` | interface | Represents the committed vendored-file inventory as one call's reads are decided against. |
364
+ | `HostManifest` | interface | Represents the complete vendored-host inventory. |
365
+ | `HostStageOptions` | interface | Configures the committed inventory baseline and staging reports. |
366
+ | `ManifestEntry` | interface | Represents one file record of the vendored host's manifest. |
367
+ | `MaterializeResult` | interface | Reports the outcome of one mutation of a target. |
368
+ | `MaterializerInterface` | interface | Describes the mutation contract: the package's only filesystem writer. |
369
+ | `MaterializerOptions` | interface | Represents the options for the materializer. |
370
+ | `ReadAllowanceInterface` | interface | Describes the byte allowance one upstream call spends across every read it makes. |
371
+ | `SurfaceCollision` | interface | Represents a Surface name claimed by distinct package guides. |
372
+ | `TextReadResult` | interface | Reports the outcome of one bounded read whose body is taken as text. |
373
+ | `Worktree` | interface | Describes what git reports about a target's working tree. |
374
+ | `UpstreamInterface` | interface | Describes the upstream contract: the package's only network reader, and it never writes. |
375
+ | `UpstreamOptions` | interface | Represents the options for the upstream reader. |
376
+ | `WriteAnchor` | interface | Represents one physical directory identity captured across a write transaction. |
377
+ | `WriteDirectoryResult` | interface | Reports the final directory anchor of a write transaction and the subset one call created. |
378
+ | `WriteExpectation` | interface | Represents one destination snapshot captured before a write and required to survive it. |
379
+ | `WritePrecondition` | interface | Describes the narrower caller-observed destination state a write transaction must still match. |
372
380
 
373
381
  The inventory contracts carry these data members.
374
382
 
@@ -435,59 +443,64 @@ The inventory contracts carry these data members.
435
443
 
436
444
  #### Helpers
437
445
 
438
- | Name | Kind | Summary |
439
- | ------------------------- | -------- | -------------------------------------------------------------------------------------- |
440
- | `computeDigest` | function | Computes the SHA-256 digest of text. |
441
- | `computeFileDigest` | function | Computes the SHA-256 digest of one file's exact bytes. |
442
- | `computeManifestDigest` | function | Computes the digest of a vendored host's declared membership. |
443
- | `decodeHexText` | function | Decodes exact bytes stated in hexadecimal as strict UTF-8 text. |
444
- | `filesToHost` | function | Assembles a whole vendored host from live files and the installed floor. |
445
- | `hexToDigest` | function | Projects exact bytes stated in hexadecimal to their SHA-256 digest. |
446
- | `isExactCaseFile` | function | Tests whether a path is a physical file with exact on-disk casing. |
447
- | `isPhysicalDirectory` | function | Tests whether a path is a physical directory this package will read or write into. |
448
- | `isPhysicalFile` | function | Tests whether a path is a physical file this package will read or replace. |
449
- | `isVacant` | function | Tests whether a target is safe to write a fresh workspace into. |
450
- | `listCanonPaths` | function | Lists the canon paths a target holds, filtered to a plan's groups. |
451
- | `listDirectories` | function | Lists a directory's descendant directories as sorted root-relative paths. |
452
- | `listFiles` | function | Lists a directory's files as sorted root-relative paths. |
453
- | `matchesAnchor` | function | Tests whether a path still holds the captured directory identity. |
454
- | `matchesExecutablePath` | function | Tests whether a vendored path is one a target receives executable. |
455
- | `matchesExpectation` | function | Tests whether a destination still holds what was captured of it. |
456
- | `matchesGitPath` | function | Tests whether a path addresses a target's own repository metadata. |
457
- | `matchesMissingPath` | function | Tests whether a caught filesystem error reports an absent path. |
458
- | `matchesPrecondition` | function | Tests whether a destination still matches the narrower state a caller observed. |
459
- | `matchesProtectedPath` | function | Tests whether a target-relative path is one no verb may delete. |
460
- | `matchesSensitivePath` | function | Tests whether a path names local configuration or a credential. |
461
- | `pathToStorage` | function | Projects a target-relative path to the storage name a vendored host holds it under. |
462
- | `pruneEmptiedDirectories` | function | Removes every directory one set of deletions emptied. |
463
- | `readAnchor` | function | Captures one directory's physical identity. |
464
- | `readExpectation` | function | Captures what one destination holds before a write. |
465
- | `readFileHex` | function | Reads one contained file as its exact bytes in lowercase hexadecimal. |
466
- | `readFileText` | function | Reads one contained file as bounded UTF-8 text. |
467
- | `readHostFloor` | function | Reads the installed vendored host floor as a value. |
468
- | `readHostManifest` | function | Reads a vendored host's manifest, when it carries one. |
469
- | `readManifestEntry` | function | Derives one vendored-host manifest entry from a file in a checkout. |
470
- | `readSnapshot` | function | Reads a target's current bytes at the paths a plan claims. |
471
- | `readSurfaceBaseline` | function | Reads the Surface collision baseline from a committed inventory. |
472
- | `readSurfaceCollisions` | function | Reads bare Surface names claimed by distinct package guides. |
473
- | `resolveContainedPath` | function | Resolves a root-relative path and refuses one that leaves its root. |
474
- | `resolveRealPath` | function | Resolves a path through the real filesystem, keeping the part that does not exist yet. |
475
- | `stageBytes` | function | Stages the named destinations of a value host into a private root. |
476
- | `stageHost` | function | Stages a vendored host root from a real checkout. |
477
- | `stageInventory` | function | Stages the committed inventory of the files a vendored host carries. |
446
+ | Name | Kind | Summary |
447
+ | ------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
448
+ | `climbRealPath` | function | Climbs from an absolute path to its deepest existing ancestor and resolves it through every link. |
449
+ | `collectIndexed` | function | Places each result at the index its entry names, in a fresh array. |
450
+ | `computeDigest` | function | Computes the SHA-256 digest of text. |
451
+ | `computeFileDigest` | function | Computes the SHA-256 digest of one file's exact bytes. |
452
+ | `computeManifestDigest` | function | Computes the digest of a vendored host's declared membership. |
453
+ | `decodeHexText` | function | Decodes exact bytes stated in hexadecimal as strict UTF-8 text. |
454
+ | `filesToHost` | function | Assembles a whole vendored host from live files and the installed floor. |
455
+ | `hexToDigest` | function | Projects exact bytes stated in hexadecimal to their SHA-256 digest. |
456
+ | `isExactCaseFile` | function | Tests whether a path is a physical file with exact on-disk casing. |
457
+ | `isPhysicalDirectory` | function | Tests whether a path is a physical directory this package will read or write into. |
458
+ | `isPhysicalFile` | function | Tests whether a path is a physical file this package will read or replace. |
459
+ | `isVacant` | function | Tests whether a target is safe to write a fresh workspace into. |
460
+ | `listAncestors` | function | Lists a path followed by each directory above it, nearest first. |
461
+ | `listCanonPaths` | function | Lists the canon paths a target holds, filtered to a plan's groups. |
462
+ | `listDirectories` | function | Lists a directory's descendant directories as sorted root-relative paths. |
463
+ | `listFiles` | function | Lists a directory's files as sorted root-relative paths. |
464
+ | `matchesAnchor` | function | Tests whether a path still holds the captured directory identity. |
465
+ | `matchesExecutablePath` | function | Tests whether a vendored path is one a target receives executable. |
466
+ | `matchesExpectation` | function | Tests whether a destination still holds what was captured of it. |
467
+ | `matchesGitPath` | function | Tests whether a path addresses a target's own repository metadata. |
468
+ | `matchesMissingPath` | function | Tests whether a caught filesystem error reports an absent path. |
469
+ | `matchesPrecondition` | function | Tests whether a destination still matches the narrower state a caller observed. |
470
+ | `matchesProtectedPath` | function | Tests whether a target-relative path is one no verb may delete. |
471
+ | `matchesSensitivePath` | function | Tests whether a path names local configuration or a credential. |
472
+ | `pathToStorage` | function | Projects a target-relative path to the storage name a vendored host holds it under. |
473
+ | `pruneEmptiedDirectories` | function | Removes every directory one set of deletions emptied. |
474
+ | `readAnchor` | function | Captures one directory's physical identity. |
475
+ | `readExpectation` | function | Captures what one destination holds before a write. |
476
+ | `readFileHex` | function | Reads one contained file as its exact bytes in lowercase hexadecimal. |
477
+ | `readFileText` | function | Reads one contained file as bounded UTF-8 text. |
478
+ | `readHostFloor` | function | Reads the installed vendored host floor as a value. |
479
+ | `readHostManifest` | function | Reads a vendored host's manifest, when it carries one. |
480
+ | `readManifestEntry` | function | Derives one vendored-host manifest entry from a file in a checkout. |
481
+ | `readSnapshot` | function | Reads a target's current bytes at the paths a plan claims. |
482
+ | `readSurfaceBaseline` | function | Reads the Surface collision baseline from a committed inventory. |
483
+ | `readSurfaceCollisions` | function | Reads bare Surface names claimed by distinct package guides. |
484
+ | `resolveContainedPath` | function | Resolves a root-relative path and refuses one that leaves its root. |
485
+ | `resolveRealPath` | function | Resolves a path through the real filesystem, keeping the part that does not exist yet. |
486
+ | `stageBytes` | function | Stages the named destinations of a value host into a private root. |
487
+ | `stageHost` | function | Stages a vendored host root from a real checkout. |
488
+ | `stageInventory` | function | Stages the committed inventory of the files a vendored host carries. |
478
489
 
479
490
  #### Classes
480
491
 
481
492
  | Name | Kind | Summary |
482
493
  | ------------------ | ----- | --------------------------------------------------------------------------------------------- |
483
494
  | `Materializer` | class | Represents the mutation spine: read the vendored host, re-derive the target, stage, swap. |
495
+ | `ReadAllowance` | class | Represents the byte allowance one upstream call spends across every read it makes. |
484
496
  | `Upstream` | class | Represents the reading spine: one bounded, unauthenticated, redirect-free request per answer. |
485
497
  | `WriteTransaction` | class | Represents one staged, reversible mutation of one target directory. |
486
498
 
487
499
  ## Methods
488
500
 
489
- `Compiler` implements `CompilerInterface`, `Materializer` implements `MaterializerInterface`, and
490
- `Upstream` implements `UpstreamInterface`. Each class exposes exactly its interface's members and
501
+ `Compiler` implements `CompilerInterface`, `Materializer` implements `MaterializerInterface`,
502
+ `ReadAllowance` implements `ReadAllowanceInterface`, and `Upstream` implements
503
+ `UpstreamInterface`. Each class exposes exactly its interface's members and
491
504
  nothing more, so the following interface tables describe the classes too. `WriteTransaction`
492
505
  publishes no interface and is documented directly.
493
506
 
@@ -512,6 +525,12 @@ publishes no interface and is documented directly.
512
525
  | `remove` | Re-derives and deletes the tracked files the plan does not own. |
513
526
  | `destroy` | Tears the materializer down. Every later call throws, and teardown is idempotent. |
514
527
 
528
+ #### `ReadAllowanceInterface`
529
+
530
+ | Method | Summary |
531
+ | ------- | ------------------------------------------------ |
532
+ | `spend` | Spends bytes a read consumed from the allowance. |
533
+
515
534
  #### `UpstreamInterface`
516
535
 
517
536
  | Method | Summary |
@@ -644,8 +663,9 @@ answers a read and grant no verb write authority that it did not already have.
644
663
  states what each emits and what each refuses. Creation leaves `setup` empty, and the remaining
645
664
  structural facts take no creation option. Add a root `tests/setup*.test.ts` proof for `setup`,
646
665
  `tests/guides.test.ts` for `guides`, `tests/integration.test.ts` for `integration`,
647
- `tests/conformance.test.ts` for `conformance`, `tests/setupService.ts` for `service`,
648
- `tests/setupGlobal.ts` for `global`, `configs/app/vite.journey.config.ts` for `journey`, and
666
+ `tests/conformance.test.ts` for `conformance`, `tests/setupService.ts` for `service`, an
667
+ exact-case `*.test.ts` file beneath `tests/studies`, outside any `node_modules` or `.git` directory,
668
+ for `studies`, `tests/setupGlobal.ts` for `global`, `configs/app/vite.journey.config.ts` for `journey`, and
649
669
  `configs/agents/tsconfig.skills.json` for `skills`; reading verbs detect each exact-case file and
650
670
  register its fixed machinery. An explicitly supplied
651
671
  plan with `vendors` owns and protects the birth-owned `scripts/service.sh` inventory skeleton.
@@ -666,9 +686,12 @@ read from the markers Surfaces and extensions lists. The remaining facts come fr
666
686
  files: `src/bin/main.ts` selects `bin`, each root `tests/setup*.test.ts` match selects `setup`,
667
687
  `tests/guides.test.ts` selects `guides`, `tests/integration.test.ts` selects `integration`,
668
688
  `tests/conformance.test.ts` selects `conformance`, `tests/setupService.ts` selects `service`,
669
- `tests/setupGlobal.ts` selects `global`, `configs/app/vite.journey.config.ts` selects `journey`,
689
+ any exact-case `*.test.ts` file beneath `tests/studies`, nested or direct, outside any
690
+ `node_modules` or `.git` directory, which Vitest's default exclude never collects, selects
691
+ `studies`, `tests/setupGlobal.ts` selects `global`, `configs/app/vite.journey.config.ts` selects `journey`,
670
692
  and `configs/agents/tsconfig.skills.json` selects `skills`. A containing directory does not select
671
- any of those facts by itself. `tests/distribution.test.ts` selects nothing: the published `src`
693
+ any of those facts by itself: `tests/studies/types.ts`, a case-folded `tests/Studies` directory, and
694
+ the harness module `tests/setupStudy.ts` select no `studies`. `tests/distribution.test.ts` selects nothing: the published `src`
672
695
  axis and the sheet faces the target ships already decide the `distribution` project, and the file is
673
696
  planned from that.
674
697
 
@@ -1012,8 +1035,8 @@ because the shape is chosen once and read afterwards: `new` refuses the advisory
1012
1035
  `repair` need the plan to describe and restore a target that already has that shape. A library
1013
1036
  caller creating a workspace holds the same refusal, and the Compile section states it.
1014
1037
 
1015
- `bin`, `setup`, `guides`, `integration`, `conformance`, `service`, `vendors`, `global`, `styles`,
1016
- `themes`, `showcase`, `journey`, and `skills` are structural facts, and `extensions` lists the
1038
+ `bin`, `setup`, `guides`, `integration`, `conformance`, `service`, `vendors`, `studies`, `global`,
1039
+ `styles`, `themes`, `showcase`, `journey`, and `skills` are structural facts, and `extensions` lists the
1017
1040
  extension faces. Reading verbs set each fact and list each extension only when the workspace
1018
1041
  physically ships the directory or exact-case file that defines it, never because of the workspace's
1019
1042
  name and never because a sibling fact is set.
@@ -1077,6 +1100,19 @@ workspace drives and emits `scripts/service.sh`, an inventory skeleton that star
1077
1100
  vendor inventory and live-service setup are independent: a workspace may declare vendors before it
1078
1101
  writes a suite, and a suite may drive a service the skeleton does not start.
1079
1102
 
1103
+ `studies` says the workspace holds at least one exact-case `*.test.ts` file beneath `tests/studies`,
1104
+ nested or direct, outside any `node_modules` or `.git` directory, which Vitest's default exclude
1105
+ never collects, and it alone registers the `studies` Vitest project over that directory and its
1106
+ `test:studies` script. The project loads `tests/setup.ts` alone. The tests import
1107
+ `tests/setupStudy.ts`, a harness module the package owns, so scaffold plans no such file and no
1108
+ project loads it as a setup file. A publishing workspace invokes the project from `prepublishOnly`,
1109
+ after `npm test` and before the release proof; a `private: true` workspace invokes it from `test`,
1110
+ before the live-service project. Its longer timeouts and disabled file parallelism match the
1111
+ live-service project. The root `studies/` directory holds the adapters and declarations the study
1112
+ tests run, and it selects nothing. A `prepublishOnly` chain written before the fact existed upgrades
1113
+ in place: the generated chain without its study step, and without both its study step and the release
1114
+ proof, are accepted predecessors.
1115
+
1080
1116
  `integration` projects a cross-environment composition proof for any workspace, independently of
1081
1117
  whether it has a published `src`. Its generated seed imports every selected `src` and `app`
1082
1118
  environment through its public barrel. It starts no process and does not pack or install the
@@ -1499,12 +1535,12 @@ content is produced. `Ownership` says what scaffold claims at the path.
1499
1535
 
1500
1536
  Presence ownership has separate mechanisms, and a reader needs to know which applies:
1501
1537
 
1502
- | Mechanism | Paths | Bytes belong to | Cost |
1503
- | --------------- | ------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------- |
1504
- | Verb-owned | `CATALOG_AGENT_PATH` and dependency guide mirrors | `catalog` or `mirror` | The owning verb is the only route for a later update. |
1505
- | Workspace-owned | `WORKSPACE_OWNED_PATHS`, which holds `.gitignore` | The target workspace | Present bytes receive no later canonical ignore update. |
1506
- | Plan-owned | `DISTRIBUTION_TEST_PATH` | The plan, until the workspace writes its own | A deleted file is restored from the plan on the next write. |
1507
- | Unhydrated | Every vendored path a core-compiled plan carries | Scaffold, after a hydrating face reads them | Hydration restores the byte claim the core plan omits. |
1538
+ | Mechanism | Paths | Bytes belong to | Cost |
1539
+ | --------------- | -------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------- |
1540
+ | Verb-owned | `CATALOG_AGENT_PATH` and dependency guide mirrors | `catalog` or `mirror` | The owning verb is the only route for a later update. |
1541
+ | Workspace-owned | `WORKSPACE_OWNED_PATHS`, which holds `.gitignore` | The target workspace | Present bytes receive no later canonical ignore update. |
1542
+ | Plan-owned | `DISTRIBUTION_TEST_PATH` and `configs/commands.ts` | The plan, until the workspace writes its own | A deleted file is restored from the plan on the next write. |
1543
+ | Unhydrated | Every vendored path a core-compiled plan carries | Scaffold, after a hydrating face reads them | Hydration restores the byte claim the core plan omits. |
1508
1544
 
1509
1545
  The unhydrated row is the one a core-only caller meets most, and reading it as a claim about the
1510
1546
  path is the mistake it invites. `Compiler` runs in the pure core face, which cannot read the
@@ -1542,7 +1578,9 @@ and `tests/app`, the `tests/src/bin/main.test.ts` file, and the `tests/integrati
1542
1578
  Every sheet face's seed under `src` is yours on the same terms. Scaffold writes those
1543
1579
  planned files only during materialize and leaves later edits or deletions alone. You also own the
1544
1580
  `tests/guides.test.ts`, `tests/conformance.test.ts`, and `tests/service/**/*.test.ts` proof files,
1545
- each of which selects its project by being written. Scaffold content-owns `tests/setupPolicy.ts`,
1581
+ each of which selects its project by being written. The browser commands you register in
1582
+ `configs/commands.ts` are yours too: scaffold writes the empty seed when the file is missing and
1583
+ leaves the bytes you wrote alone. Scaffold content-owns `tests/setupPolicy.ts`,
1546
1584
  `tests/policy.test.ts`, and `tests/config.test.ts`; `repair` and `overwrite` restore those files when
1547
1585
  their bytes drift or the files are missing.
1548
1586
 
@@ -1678,7 +1716,8 @@ the others are not.
1678
1716
 
1679
1717
  Content ownership does not preserve an arbitrary custom Vitest project. The optional proof projects
1680
1718
  are fixed: `guides`, `integration`, `conformance`, and `service` are selected by their defining
1681
- paths, and `distribution` by a published `src` environment. A workspace that needs other local
1719
+ paths, `studies` by an exact-case `*.test.ts` file beneath `tests/studies` outside any `node_modules` or
1720
+ `.git` directory, and `distribution` by a published `src` environment. A workspace that needs other local
1682
1721
  configuration must keep those edits outside a content-owned file; `repair` restores that file to the
1683
1722
  canonical project set.
1684
1723
 
@@ -2137,6 +2176,36 @@ Nothing is fixed except the manifest.
2137
2176
  one usable build for many Playwright versions. It is its own file rather than a block in the
2138
2177
  vendored `configs/helpers.ts`, which every workspace receives byte-identical while only a browser
2139
2178
  selection declares the `playwright` this module imports.
2179
+ - One template artifact, `configs/commands.ts`, for every workspace that receives
2180
+ `configs/browsers.ts`. It exports one frozen `commands` record, empty in the seed, and every root
2181
+ factory that configures a `playwright()` provider passes that record to Vitest as
2182
+ `test.browser.commands`. `appVue` and each `journey:<variant>` project keep it through the
2183
+ browser configuration they spread. Scaffold claims the file by presence, so `repair` and
2184
+ `overwrite` write the seed into a target that lacks it and keep the commands you register.
2185
+ - The root configuration bundles `configs/commands.ts` into every configuration load, builds
2186
+ included, and the bundle resolves no workspace alias. A native import of `src/server/index.ts`
2187
+ from a command body fails with `ERR_MODULE_NOT_FOUND` on that module's own `@src/core` import.
2188
+ Import only a `node:` module or a package the manifest declares in `dependencies` or
2189
+ `devDependencies` at the top of the file. Load workspace source inside the command body through
2190
+ `context.project.vitest.import`, which runs on the root Vite server and its `resolve.alias`, and
2191
+ narrow the module it returns as `unknown`. The following module registers a `greeting` command
2192
+ that returns the `message` export of `src/server/index.ts`:
2193
+
2194
+ ```ts
2195
+ import type { BrowserCommandContext, BrowserConfigOptions } from 'vitest/node'
2196
+ import { fileURLToPath } from 'node:url'
2197
+
2198
+ const SERVER_ENTRY = fileURLToPath(new URL('../src/server/index.ts', import.meta.url))
2199
+
2200
+ export const commands: Readonly<NonNullable<BrowserConfigOptions['commands']>> = Object.freeze({
2201
+ greeting: async (context: BrowserCommandContext): Promise<string | undefined> => {
2202
+ const loaded = await context.project.vitest.import<unknown>(SERVER_ENTRY)
2203
+ if (typeof loaded !== 'object' || loaded === null || !('message' in loaded)) return undefined
2204
+ return typeof loaded.message === 'string' ? loaded.message : undefined
2205
+ },
2206
+ })
2207
+ ```
2208
+
2140
2209
  - One template artifact per source and test file the selection needs: an `index.ts` barrel per
2141
2210
  selected environment, `main.ts` and `index.html` for an application browser, `tests/setup.ts`
2142
2211
  plus the host setup modules the selection reaches, and one entry test per axis project. An
@@ -2288,7 +2357,8 @@ upstream.destroy()
2288
2357
  ```
2289
2358
 
2290
2359
  Every request is unauthenticated, follows no redirect, and is bounded twice: `limit` refuses one
2291
- oversized answer and `budget` refuses many small ones. A per-package failure is collected as a
2360
+ oversized answer and `budget` refuses many small ones. A read that lands exactly on the budget is
2361
+ accepted, and the call's next read is refused before it is requested. A per-package failure is collected as a
2292
2362
  verdict carrying its cause rather than thrown, so one unreachable package never costs the caller the
2293
2363
  rest of the answer. The organization package list is the exception, because without it there is no
2294
2364
  fleet to report.
@@ -2478,11 +2548,11 @@ module's behavior unmeasured. A generated file there would read as a proof while
2478
2548
  which is worse than an absent one. So the file a consumer writes is what selects each of those
2479
2549
  projects. Scaffold also seeds proofs for its own setup modules, as Root setup mirror describes.
2480
2550
 
2481
- Registration follows the same split. Scaffold registers `conformance` and `service` when their
2551
+ Registration follows the same split. Scaffold registers `conformance`, `studies`, and `service` when their
2482
2552
  structural facts are set, and registers `distribution` whenever the workspace publishes at least one
2483
- `src` environment or sheet face. In a publishing workspace, `distribution` and `service` run from `prepublishOnly`
2553
+ `src` environment or sheet face. In a publishing workspace, `distribution`, `studies`, and `service` run from `prepublishOnly`
2484
2554
  and `conformance` stays in `test`. In a `private: true` workspace, `distribution` is absent,
2485
- `service` runs from `test`, and there is no `prepublishOnly` at all. The `policy` project reports an exporting root setup module that lacks its sibling proof or an import from `tests/setup.test.ts`.
2555
+ `studies` and then `service` run from `test`, and there is no `prepublishOnly` at all. The `policy` project reports an exporting root setup module that lacks its sibling proof or an import from `tests/setup.test.ts`.
2486
2556
  Separately, a filled, exporting `tests/setup*.ts` module that no `tests/setup*.test.ts`
2487
2557
  proof covers raises the non-blocking `setup` question in `audit`, which names the modules and the proof to add.
2488
2558
  For setup modules the workspace authors, the workspace supplies the behavior proof; the setup modules scaffold seeds arrive with their sibling proofs.
@@ -2617,7 +2687,9 @@ no `tests/conformance.test.ts` registers a project whose include resolves to not
2617
2687
  exits non-zero on it. A blueprint carrying `service` gets `tests/setupService.ts` — the root
2618
2688
  configuration names that module by path, so an absent one fails the project's load rather than its
2619
2689
  run — and still no suite beneath `tests/service`, so `test:service` reports no test files until the
2620
- consumer writes the first one. The `distribution` project no longer has that case: `new` writes the
2690
+ consumer writes the first one. A blueprint carrying `studies` has no such case, because the fact is
2691
+ the presence of a collected test file and an include with no file behind it leaves the fact unset.
2692
+ The `distribution` project no longer has that case: `new` writes the
2621
2693
  proof into the workspace it registers the project in, and a target that later lost the file reports
2622
2694
  drift that `repair` closes. Every remaining case is visible the first time the script runs, which is
2623
2695
  why none is silent.
@@ -2662,6 +2734,8 @@ The generated guide index lists each occupied Vue face with its source, tests, a
2662
2734
  staging, promotion, and rollback after a driven failure.
2663
2735
  - [`tests/src/server/Upstream.test.ts`](../tests/src/server/Upstream.test.ts) — the bounds, the
2664
2736
  verdicts, and cancellation, against a protocol-faithful loopback server.
2737
+ - [`tests/src/server/ReadAllowance.test.ts`](../tests/src/server/ReadAllowance.test.ts) — the
2738
+ per-call byte allowance, its overshoot, and its refusals.
2665
2739
  - [`tests/src/server/helpers.test.ts`](../tests/src/server/helpers.test.ts) — path containment,
2666
2740
  digests, inventories, and the staging producer.
2667
2741
  - [`tests/src/server/validators.test.ts`](../tests/src/server/validators.test.ts) — the host-path