@orkestrel/scaffold 0.0.81 → 0.0.82
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/bin/main.js +167 -13
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +5 -3
- package/dist/host/agents/skills/orkestrel-harden/references/centralization.md +2 -2
- package/dist/host/agents/skills/orkestrel-journey/SKILL.md +41 -38
- package/dist/host/agents/skills/orkestrel-journey/references/captures.md +3 -3
- package/dist/host/agents/skills/orkestrel-journey/references/decide.md +3 -3
- package/dist/host/agents/skills/orkestrel-journey/references/layer.md +5 -5
- package/dist/host/agents/skills/orkestrel-journey/references/statechart.md +3 -3
- package/dist/host/agents/skills/orkestrel-journey/references/styles.md +9 -9
- package/dist/host/claude/rules/application.md +20 -6
- package/dist/host/claude/rules/architecture.md +2 -2
- package/dist/host/claude/rules/browser.md +9 -0
- package/dist/host/claude/rules/documentation.md +2 -1
- package/dist/host/claude/rules/styles.md +35 -12
- package/dist/host/claude/rules/tests.md +15 -10
- package/dist/host/claude/rules/workspace.md +128 -98
- package/dist/host/claude/skills/orkestrel-journey/SKILL.md +1 -1
- package/dist/host/configs/helpers.ts +157 -9
- package/dist/host/configs/policy.ts +64 -61
- package/dist/host/dotfiles/oxlintrc.json +132 -16
- package/dist/host/dotfiles/prettierignore +1 -1
- package/dist/host/guides/README.md +9 -5
- package/dist/host/guides/scaffold.md +475 -115
- package/dist/host/manifest.json +26 -26
- package/dist/host/tests/config.test.ts +996 -39
- package/dist/host/tests/policy.test.ts +11 -0
- package/dist/host/tests/setupPolicy.ts +396 -22
- package/dist/src/core/index.cjs +1261 -159
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +297 -35
- package/dist/src/core/index.d.ts +297 -35
- package/dist/src/core/index.js +1241 -160
- package/dist/src/core/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,9 +18,11 @@ paths:
|
|
|
18
18
|
not add `tests/configs/`.
|
|
19
19
|
- Resolve a mirrored module through `.ts`, `.tsx`, `.mts`, `.cts`, `.vue`, `.scss`, or `.css`.
|
|
20
20
|
- Resolve a Sass or CSS partial through the module's leading underscore.
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
- Mirror root setup modules and proofs in both directions. A root `tests/setup<Name>.test.ts`
|
|
22
|
+
resolves to `tests/setup<Name>.ts`. A root `tests/setup<Name>.ts` that declares an export has
|
|
23
|
+
`tests/setup<Name>.test.ts` or is imported by `tests/setup.test.ts`, which can prove several
|
|
24
|
+
setup modules when their helpers serve several projects. A vendored module is outside this
|
|
25
|
+
population. The policy sweep (`tests/setupPolicy.ts`) enforces both directions.
|
|
24
26
|
- Prefer test filenames matching entrypoints: `index.test.ts` for `index.ts`, `main.test.ts` for `main.ts`.
|
|
25
27
|
- Tests are deterministic: identical inputs produce identical results.
|
|
26
28
|
- Keep default suites fast: timers normally use 10–50 ms and tests make no network calls.
|
|
@@ -60,11 +62,11 @@ its own:
|
|
|
60
62
|
| `tests/setup*.test.ts` | Reusable behavior exported from sibling `tests/setup*.ts` modules works as the workspace's suites require |
|
|
61
63
|
| `tests/service/**/*.test.ts` | The live external services this package drives, driven for real |
|
|
62
64
|
|
|
63
|
-
- Put `tests/setupBrowser.test.ts` in the browser-enabled
|
|
64
|
-
other root `tests/setup*.test.ts` proof in the Node `setup`
|
|
65
|
-
|
|
66
|
-
do not duplicate production behavior there, and do not
|
|
67
|
-
cross-cutting proof.
|
|
65
|
+
- Put `tests/setupBrowser.test.ts` and `tests/setupStyles.test.ts` in the browser-enabled
|
|
66
|
+
`setup:browser` project. Put every other root `tests/setup*.test.ts` proof in the Node `setup`
|
|
67
|
+
project, and exclude both browser proofs from that project. Keep each proof's assertions on
|
|
68
|
+
exported test-infrastructure behavior: do not duplicate production behavior there, and do not
|
|
69
|
+
move setup-helper assertions into another cross-cutting proof.
|
|
68
70
|
- `.claude/rules/workspace.md` names the Vitest project each location belongs to.
|
|
69
71
|
- The `guides` project runs in Node with the browser disabled. Its subject is what the guide
|
|
70
72
|
claims: that every documented name resolves, and that every fence asserting a value returns
|
|
@@ -90,7 +92,9 @@ its own:
|
|
|
90
92
|
- A nested `tests/{src,app}/<environment>/**/integration.test.ts` runs in that environment's project,
|
|
91
93
|
whose existing glob collects it exactly once. Give it a separate exact-path project entry only when
|
|
92
94
|
the proof needs different setup or a different runtime, and exclude that exact path from the
|
|
93
|
-
environment project when you do.
|
|
95
|
+
environment project when you do. A `tests/app/<application>/integration.test.ts` journey suite is
|
|
96
|
+
such a proof: `.claude/rules/workspace.md` § Test project matrix collects it in the journey
|
|
97
|
+
projects of its mode.
|
|
94
98
|
|
|
95
99
|
## Probes
|
|
96
100
|
|
|
@@ -196,7 +200,8 @@ Place helpers by environment:
|
|
|
196
200
|
- `tests/setup.ts`: host-independent; no `node:*`, DOM, `window`, or Vue.
|
|
197
201
|
- `tests/setupServer.ts`: Node-only helpers and `node:fs` loaders anchored to `WORKSPACE_ROOT`.
|
|
198
202
|
- `tests/setupBrowser.ts`: DOM/Vue/browser helpers and setup CSS.
|
|
199
|
-
- `tests/setupStyles.ts`:
|
|
203
|
+
- `tests/setupStyles.ts`: the CSSOM and sheet helpers `.claude/rules/styles.md` places there; every
|
|
204
|
+
sheet-face project loads it after `tests/setupBrowser.ts`.
|
|
200
205
|
|
|
201
206
|
### Recorder
|
|
202
207
|
|
|
@@ -4,7 +4,7 @@ paths:
|
|
|
4
4
|
- 'app/**/*'
|
|
5
5
|
- 'tests/**/*'
|
|
6
6
|
- 'configs/**/*'
|
|
7
|
-
- '
|
|
7
|
+
- 'showcase/**/*'
|
|
8
8
|
- 'package.json'
|
|
9
9
|
- 'tsconfig.json'
|
|
10
10
|
- 'vite.config.ts'
|
|
@@ -16,23 +16,27 @@ Use only the environments a project needs, and keep the root dependency model in
|
|
|
16
16
|
|
|
17
17
|
## Environments
|
|
18
18
|
|
|
19
|
-
| Path | Purpose
|
|
20
|
-
| -------------- |
|
|
21
|
-
| `src/core/` | Published host-independent library
|
|
22
|
-
| `src/browser/` | Published browser-only library
|
|
23
|
-
| `src/server/` | Published Node-only library
|
|
24
|
-
| `src/styles/` | Optional
|
|
25
|
-
| `src
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `app/
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
19
|
+
| Path | Purpose |
|
|
20
|
+
| -------------- | ------------------------------------------------------------------ |
|
|
21
|
+
| `src/core/` | Published host-independent library |
|
|
22
|
+
| `src/browser/` | Published browser-only library |
|
|
23
|
+
| `src/server/` | Published Node-only library |
|
|
24
|
+
| `src/styles/` | Optional styles surface: the base sheet face producing `index.css` |
|
|
25
|
+
| `src/<name>/` | Styles extension: a named sheet face beside `src/styles/` |
|
|
26
|
+
| `src/vue/` | Browser extension: the published `vue` face over `src/browser/` |
|
|
27
|
+
| `src/bin/` | Optional executable; `main.ts` entry, never a public barrel |
|
|
28
|
+
| `app/core/` | Shared application logic with an `index.ts` barrel |
|
|
29
|
+
| `app/browser/` | Browser app; `main.ts` entry, not a barrel |
|
|
30
|
+
| `app/vue/` | Browser extension: the Vue app beside `app/browser/`; `main.ts` |
|
|
31
|
+
| `app/server/` | Node server app; `main.ts` entry |
|
|
32
|
+
| `tests/` | Mirrors src/app environments; root holds cross-cutting proofs |
|
|
33
|
+
| `configs/` | Thin target wrappers around root configs |
|
|
31
34
|
|
|
32
35
|
- Dependency direction is the root project model in `AGENTS.md` and is not restated here; this file governs where the environments live and how they are configured.
|
|
33
36
|
- Typical browser-app domains: `components/`, `pages/`, `composables/`, `controllers/`, `services/`, `stores/`.
|
|
34
37
|
- Typical server-app domains: `handlers.ts`, `middlewares.ts`, `routes.ts`.
|
|
35
|
-
- `src/styles
|
|
38
|
+
- A sheet face (`src/styles/` and each `src/<name>/` styles extension) builds from `sheet.ts`, which imports `./index.scss` alone; its `index.ts` star-exports `./sheet.js`. The themes target builds from `src/styles/themes/sheet.ts` the same way.
|
|
39
|
+
- Name a styles extension with a name the `NAME_PATTERN` constant admits, and never `core`, `browser`, `server`, `bin`, `styles`, `themes`, or `vue`.
|
|
36
40
|
- `src/bin/main.ts` is the executable entry, built to `dist/bin/main.js`. The name is fixed, as it
|
|
37
41
|
is for `app/browser/main.ts` and `app/server/main.ts`, so every runtime entry in a workspace is
|
|
38
42
|
found at the same name.
|
|
@@ -47,11 +51,14 @@ Use only the environments a project needs, and keep the root dependency model in
|
|
|
47
51
|
| `@src/browser` | `src/browser/index.ts` |
|
|
48
52
|
| `@src/server` | `src/server/index.ts` |
|
|
49
53
|
| `@src/styles` | `src/styles/index.ts` |
|
|
54
|
+
| `@src/<name>` | `src/<name>/index.ts` |
|
|
55
|
+
| `@src/vue` | `src/vue/index.ts` |
|
|
50
56
|
| `@app/core` | `app/core/index.ts` |
|
|
51
57
|
| `@app/browser` | `app/browser/index.ts` |
|
|
58
|
+
| `@app/vue` | `app/vue/index.ts` |
|
|
52
59
|
| `@app/server` | `app/server/index.ts` |
|
|
53
60
|
|
|
54
|
-
Define aliases in `tsconfig.json` first. `vite.config.ts` derives from `compilerOptions.paths`; keep both aligned.
|
|
61
|
+
Give every selected environment and every face an alias: `src/styles`, each `src/<name>` styles extension, and each axis the `vue` extension occupies. Define aliases in `tsconfig.json` first. `vite.config.ts` derives from `compilerOptions.paths`; keep both aligned.
|
|
55
62
|
|
|
56
63
|
## Configuration authority
|
|
57
64
|
|
|
@@ -65,8 +72,8 @@ Define aliases in `tsconfig.json` first. `vite.config.ts` derives from `compiler
|
|
|
65
72
|
under `configs/`. Each imports nothing from the workspace, which is what keeps it a leaf, so no
|
|
66
73
|
`configs/types.ts` exists for one to import: each keeps its own types, data, and functions in its
|
|
67
74
|
one file, and the centralized-kind placement in `.claude/rules/architecture.md` does not reach a
|
|
68
|
-
leaf. Each `configs/src/*.config.ts` imports the root config
|
|
69
|
-
|
|
75
|
+
leaf. Each `configs/src/*.config.ts` wrapper imports the root config and may import the permitted
|
|
76
|
+
leaves; keep shared build and project composition in the root config.
|
|
70
77
|
- Keep `configs/helpers.ts` free of any dependency a core-only workspace does not declare. It is
|
|
71
78
|
vendored byte-identical to every workspace, so an import there must resolve in all of them.
|
|
72
79
|
`configs/browsers.ts` exists for that reason: it imports `playwright` and
|
|
@@ -92,39 +99,55 @@ Environment rules:
|
|
|
92
99
|
|
|
93
100
|
## Build outputs
|
|
94
101
|
|
|
95
|
-
| Output
|
|
96
|
-
|
|
|
97
|
-
| `dist/src/core`
|
|
98
|
-
| `dist/src/browser`
|
|
99
|
-
| `dist/src/server`
|
|
100
|
-
| `dist/src/
|
|
101
|
-
| `dist/
|
|
102
|
-
| `dist/
|
|
103
|
-
| `dist/
|
|
104
|
-
| `dist/
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
| Output | Content | Format |
|
|
103
|
+
| ----------------------------- | -------------------------------- | ------------------------- |
|
|
104
|
+
| `dist/src/core` | Core library + declarations | ES and CJS |
|
|
105
|
+
| `dist/src/browser` | Browser library + declarations | ES |
|
|
106
|
+
| `dist/src/server` | Server library + declarations | ES and CJS |
|
|
107
|
+
| `dist/src/vue` | Vue face + declarations | ES |
|
|
108
|
+
| `dist/src/styles` | Compiled `index.css` | CSS |
|
|
109
|
+
| `dist/src/styles/themes` | Compiled themes `index.css` | CSS |
|
|
110
|
+
| `dist/src/<name>` | Compiled `index.css` | CSS |
|
|
111
|
+
| `dist/bin` | Optional executable `main.js` | ES with shebang |
|
|
112
|
+
| `dist/app/browser` | Browser application | target-defined |
|
|
113
|
+
| `dist/app/vue` | Vue application | target-defined |
|
|
114
|
+
| `dist/app/server` | Server application | CJS |
|
|
115
|
+
| `showcase/<application>.html` | Single-file page per application | self-contained, committed |
|
|
116
|
+
|
|
117
|
+
- Roll up each published TypeScript face's declarations in its Vite wrapper. A face that imports `@src/core` or `@src/browser` rewrites those specifiers to the published subpaths in its emitted declarations.
|
|
118
|
+
- A sheet face ships CSS, not declarations, and its JavaScript build stub stays out of `files`.
|
|
119
|
+
- Build each sheet face with `cssMinify: false`, bounded to its own output directory.
|
|
120
|
+
- Build `dist/src/styles/themes` after `dist/src/styles`; the themes build empties only its own directory.
|
|
121
|
+
- Build each selected showcase through `appShowcase(mode)`, `configs/app/vite.showcase.config.ts`, and `vite-plugin-singlefile` into root `showcase/<application>.html`; preserve sibling pages. Use `app/browser/index.html` and `browser.html` for the base modes, and `app/vue/index.html` and `vue.html` for `--mode vue`.
|
|
122
|
+
- Stamp each page after inlining with a `build-id` meta line whose value is the SHA-256 digest of the final page without that line.
|
|
123
|
+
- The showcase is outside the default build, and no test reads its pages.
|
|
110
124
|
- Use Oxc for showcase JS minification and Lightning CSS for CSS.
|
|
111
|
-
- Inject a `build-id` meta stamp so rebuilt `file://` demos cache-bust.
|
|
112
125
|
|
|
113
126
|
## Test project matrix
|
|
114
127
|
|
|
115
128
|
`vite.config.ts` defines Vitest projects on an environment axis and a workspace-proof axis. The
|
|
116
|
-
environment axis is one project per src/app axis × environment:
|
|
117
|
-
|
|
118
|
-
| Project | Files | Environment
|
|
119
|
-
| ------------- | ---------------------- |
|
|
120
|
-
| `src:core` | `tests/src/core/**` | Node
|
|
121
|
-
| `src:browser` | `tests/src/browser/**` | Playwright Chromium
|
|
122
|
-
| `src:
|
|
123
|
-
| `src:
|
|
124
|
-
| `src:
|
|
125
|
-
| `
|
|
126
|
-
| `
|
|
127
|
-
| `app:
|
|
129
|
+
environment axis is one project per src/app axis × environment, plus one per extension face:
|
|
130
|
+
|
|
131
|
+
| Project | Files | Environment | Setup |
|
|
132
|
+
| ------------- | ---------------------- | ------------------------------------- | ----------------------------------------------- |
|
|
133
|
+
| `src:core` | `tests/src/core/**` | Node | `setup.ts` |
|
|
134
|
+
| `src:browser` | `tests/src/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
135
|
+
| `src:vue` | `tests/src/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
136
|
+
| `src:server` | `tests/src/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
137
|
+
| `src:styles` | `tests/src/styles/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` |
|
|
138
|
+
| `src:<name>` | `tests/src/<name>/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` |
|
|
139
|
+
| `src:bin` | `tests/src/bin/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
140
|
+
| `app:core` | `tests/app/core/**` | Node | `setup.ts` |
|
|
141
|
+
| `app:browser` | `tests/app/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
142
|
+
| `app:vue` | `tests/app/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
143
|
+
| `app:server` | `tests/app/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
144
|
+
|
|
145
|
+
- Compose every sheet-face project (`src:styles` and each `src:<name>`) in its own wrapper through
|
|
146
|
+
the one root `sheetProject` factory, and run it through its `test:src:<face>` script, which builds
|
|
147
|
+
that face first.
|
|
148
|
+
- Give every browser project `optimizeDeps.include` of `@orkestrel/test`, `@orkestrel/test/browser`,
|
|
149
|
+
`@orkestrel/contract` where the manifest declares it, and `vue` where the project renders Vue.
|
|
150
|
+
Give a Node project no `optimizeDeps` setting.
|
|
128
151
|
|
|
129
152
|
The workspace-proof axis is cross-cutting. Each proof covers the whole workspace rather than
|
|
130
153
|
one environment, so each is its own project:
|
|
@@ -133,9 +156,9 @@ one environment, so each is its own project:
|
|
|
133
156
|
| ------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
|
|
134
157
|
| `policy` | `tests/policy.test.ts` | The path- and text-shaped policy laws: mirrors, suppressions, the rule map, filenames, manifest scripts, skills, and bridges | `test` |
|
|
135
158
|
| `config` | `tests/config.test.ts` | Root configuration resolves its aliases, projects, and outputs | `test` |
|
|
136
|
-
| `setup` | `tests/setup*.test.ts
|
|
137
|
-
| `setup:browser` | `tests/setupBrowser.test.ts`
|
|
138
|
-
| `journey:<variant>` | `tests/app
|
|
159
|
+
| `setup` | `tests/setup*.test.ts` other than either `setup:browser` proof | Prove root setup behavior in Node with `setup.ts`. | `test` |
|
|
160
|
+
| `setup:browser` | `tests/setupBrowser.test.ts`, `tests/setupStyles.test.ts` | Prove browser and style setup behavior in Playwright Chromium with `setup.ts` and `setupBrowser.ts`. | `test` |
|
|
161
|
+
| `journey:<variant>` | `tests/app/<application>/integration.test.ts` | Drive the application the Vite mode selects at the declared variant viewport in Playwright Chromium with `setup.ts` and `setupBrowser.ts`. | `test` through the journey scripts |
|
|
139
162
|
| `guides` | `tests/guides.test.ts` | Every documented API exists, every public API is documented, every compared summary, example, and pitch equals its source, and every executable fence returns what the guide says it returns | `test` |
|
|
140
163
|
| `conformance` | `tests/conformance.test.ts` | Where this package drifts from the official tooling it tracks | `test` |
|
|
141
164
|
| `skills` | `tests/agents/**/*.test.ts` | Each skill script under `.agents/skills/*/scripts/` does what its `SKILL.md` states, driven as a child process against a scratch fixture from its mirrored proof; `configs/agents/tsconfig.skills.json` selects the project | `test` |
|
|
@@ -143,19 +166,22 @@ one environment, so each is its own project:
|
|
|
143
166
|
| `integration` | `tests/integration.test.ts` | The package's features work together end to end across environments | `test` |
|
|
144
167
|
| `service` | `tests/service/**/*.test.ts` | The live external services this package drives, driven for real | `prepublishOnly`; `test` when private |
|
|
145
168
|
|
|
146
|
-
- Define the Node `setup` project
|
|
147
|
-
exact-case, other than `tests/setupBrowser.test.ts
|
|
148
|
-
`tests/
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
script
|
|
169
|
+
- Define the Node `setup` project when `global` selects its seeded proof or a root file matches
|
|
170
|
+
`tests/setup*.test.ts`, exact-case, other than `tests/setupBrowser.test.ts` and
|
|
171
|
+
`tests/setupStyles.test.ts`. Include those matching files and exclude both browser proofs.
|
|
172
|
+
Define `setup:browser` when a sheet face or the themes target selects its seeded proof, or either
|
|
173
|
+
exact-case browser proof exists; collect those browser proof paths alone. For each registered project, emit
|
|
174
|
+
its `test:setup` or `test:setup:browser` script and run it from `test`; otherwise emit neither its
|
|
175
|
+
project nor its script.
|
|
152
176
|
- When `tests/setupGlobal.ts` exists, give `src:browser`, `setup:browser`, and `integration` that
|
|
153
177
|
module as their `globalSetup` option, and give no other project a global setup.
|
|
154
178
|
- When a browser application selects the journey axis, register `journey:<variant>` projects
|
|
155
179
|
through the birth-owned `configs/app/vite.journey.config.ts` wrapper. Keep the adopter's variant
|
|
156
|
-
list there and compose each project through the root `appJourney
|
|
157
|
-
`
|
|
158
|
-
|
|
180
|
+
list there and compose each project through the root `appJourney(variant, variants, mode?)`
|
|
181
|
+
factory, which resolves the Vite mode to `browser` or an app-side browser extension and collects
|
|
182
|
+
`tests/app/<application>/integration.test.ts` for that application. Exclude each collected suite
|
|
183
|
+
from its application project, and run `test:journey` and one `test:journey:<framework>` per
|
|
184
|
+
app-side browser extension after the application projects in `test`.
|
|
159
185
|
|
|
160
186
|
`conformance`, `integration`, `distribution`, and `service` are separate subjects, not names for
|
|
161
187
|
one.
|
|
@@ -189,14 +215,13 @@ ignored by git; and `.claude/rules/tests.md` governs what may live there.
|
|
|
189
215
|
|
|
190
216
|
Setup assets:
|
|
191
217
|
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
- Styles setup loads `setup.css` and the compiled cascade.
|
|
218
|
+
- Load only the setup assets and compiled sheets the selected proofs require.
|
|
219
|
+
- Import `tailwindcss` from a setup asset only where an authored proof declares it.
|
|
195
220
|
|
|
196
|
-
Scope with `test:src`, `test:src:core`, `test:app`, `test:app:server`, and
|
|
197
|
-
cross-cutting project has its own script too: `test:policy`,
|
|
198
|
-
`test:setup:browser`, `test:journey`, `test:
|
|
199
|
-
`test:conformance`, `test:distribution`, `test:integration`, `test:service`.
|
|
221
|
+
Scope with `test:src`, `test:src:core`, `test:src:<face>`, `test:app`, `test:app:server`, and
|
|
222
|
+
equivalent scripts. Each cross-cutting project has its own script too: `test:policy`,
|
|
223
|
+
`test:config`, `test:setup`, `test:setup:browser`, `test:journey`, `test:journey:<framework>`,
|
|
224
|
+
`test:guides`, `test:conformance`, `test:distribution`, `test:integration`, `test:service`.
|
|
200
225
|
|
|
201
226
|
## Typechecking and environment isolation
|
|
202
227
|
|
|
@@ -214,12 +239,14 @@ then runs the configured scoped checks that prove environment isolation.
|
|
|
214
239
|
- Lint is a separate complementary gate; neither lint nor root checking replaces
|
|
215
240
|
environment-isolation checks.
|
|
216
241
|
|
|
217
|
-
| Scope | `lib` | `types`
|
|
218
|
-
| ---------------------------- | --------------------------------- |
|
|
219
|
-
| `src:core`, `app:core` | `["ESNext","WebWorker"]` | `[]`
|
|
220
|
-
| `src:browser`, `app:browser` | `["ESNext","DOM","DOM.Iterable"]` | default
|
|
221
|
-
| `src:server`, `app:server` | `["ESNext"]` | `["node"]`
|
|
222
|
-
| `src:styles`
|
|
242
|
+
| Scope | `lib` | `types` | Permitted host globals |
|
|
243
|
+
| ---------------------------- | --------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
244
|
+
| `src:core`, `app:core` | `["ESNext","WebWorker"]` | `[]` | WHATWG web interop: fetch family, streams, URL, Abort, encoders, crypto, timers, console, DOMException, structuredClone; no DOM, no Node |
|
|
245
|
+
| `src:browser`, `app:browser` | `["ESNext","DOM","DOM.Iterable"]` | default | DOM; no Node |
|
|
246
|
+
| `src:server`, `app:server` | `["ESNext"]` | `["node"]` | Node; no DOM |
|
|
247
|
+
| `src:styles`, `src:<name>` | `["ESNext"]` | `["vite/client"]` | Vite SCSS module declaration only |
|
|
248
|
+
| `src:vue` | `["ESNext","DOM","DOM.Iterable"]` | `["vite/client"]` | DOM; no Node |
|
|
249
|
+
| `app:vue` | `["ESNext","DOM","DOM.Iterable"]` | `["vite/client","vue"]` | DOM and Vue; no Node |
|
|
223
250
|
|
|
224
251
|
Strict core is load-bearing:
|
|
225
252
|
|
|
@@ -228,35 +255,39 @@ Strict core is load-bearing:
|
|
|
228
255
|
|
|
229
256
|
Build/check config alignment:
|
|
230
257
|
|
|
231
|
-
- `configs/src/tsconfig.{core,browser,server}.json` serves emit and scoped checking.
|
|
232
|
-
- `configs/src/tsconfig.styles.json`
|
|
258
|
+
- `configs/src/tsconfig.{core,browser,vue,server}.json` serves emit and scoped checking.
|
|
259
|
+
- `configs/src/tsconfig.styles.json` and each `configs/src/tsconfig.<name>.json` of a styles
|
|
260
|
+
extension are check-only.
|
|
233
261
|
- `configs/app/tsconfig.core.json` is check-only.
|
|
234
|
-
- `configs/app/tsconfig.{browser,server}.json` is check-only.
|
|
262
|
+
- `configs/app/tsconfig.{browser,vue,server}.json` is check-only.
|
|
235
263
|
- Root `tsconfig.json` keeps all libs/types for IDE and comprehensive checking; scoped configs tighten each environment.
|
|
236
264
|
|
|
237
265
|
## Script intent
|
|
238
266
|
|
|
239
|
-
| Script
|
|
240
|
-
|
|
|
241
|
-
| `dev`
|
|
242
|
-
| `build`
|
|
243
|
-
| `serve` / `serve:build`
|
|
244
|
-
| `showcase`
|
|
245
|
-
| `
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
| `lint
|
|
249
|
-
| `check` |
|
|
250
|
-
| `check
|
|
251
|
-
| `
|
|
252
|
-
| `format
|
|
253
|
-
| `
|
|
254
|
-
| `
|
|
255
|
-
| `
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
258
|
-
|
|
259
|
-
|
|
267
|
+
| Script | Contract |
|
|
268
|
+
| ---------------------------- | -------------------------------------------------------------------------- |
|
|
269
|
+
| `dev` | Browser development entry |
|
|
270
|
+
| `build` | Build configured library/application targets |
|
|
271
|
+
| `serve` / `serve:build` | Run built server / build then run |
|
|
272
|
+
| `showcase` | Showcase dev server of the base mode |
|
|
273
|
+
| `showcase:<framework>` | Showcase dev server of that framework's mode |
|
|
274
|
+
| `build:showcase` | Build `showcase/browser.html` |
|
|
275
|
+
| `build:showcase:<framework>` | Build `showcase/<framework>.html` |
|
|
276
|
+
| `lint` | `oxlint --config .oxlintrc.json --fix .`; separate from typecheck |
|
|
277
|
+
| `lint:check` | Non-mutating whole-tree lint gate |
|
|
278
|
+
| `check` | Comprehensive root typecheck plus configured isolation scopes |
|
|
279
|
+
| `check:<scope>` | On-demand environment-isolation pass |
|
|
280
|
+
| `format` | Format all files |
|
|
281
|
+
| `format:check` | Non-mutating whole-tree format gate |
|
|
282
|
+
| `test` | Environment projects plus non-isolated cross-cutting proofs |
|
|
283
|
+
| `clean` | Remove `dist/` |
|
|
284
|
+
| `copy <from> <to>` | Copy while creating parent directories |
|
|
285
|
+
| `prepublishOnly` | Publishing workspaces only: the gate chain, then isolated proofs |
|
|
286
|
+
| `prepack` | Publishing workspaces only: rebuild `dist/` so a pack ships current output |
|
|
287
|
+
|
|
288
|
+
- In a publishing workspace, `prepublishOnly` runs `build:showcase` and every
|
|
289
|
+
`build:showcase:<framework>` script after `npm run build`.
|
|
290
|
+
- List `showcase/` in `.prettierignore`, so formatting never rewrites a committed page.
|
|
260
291
|
|
|
261
292
|
## Tooling
|
|
262
293
|
|
|
@@ -266,7 +297,7 @@ Run `show` only **after** formatting. The committed `demo/showcase.html` is gene
|
|
|
266
297
|
- Bundler: Vite.
|
|
267
298
|
- Tests: Vitest; `@vitest/browser-playwright` for browser projects.
|
|
268
299
|
- Node build targets derive from the package's declared supported runtime. Keep `engines`, bundler targets, scoped configs, tests, and documentation aligned; never hard-code one Node version line-wide.
|
|
269
|
-
- Browser framework:
|
|
300
|
+
- Browser framework: the `vue` extension where selected.
|
|
270
301
|
|
|
271
302
|
Policy instruments:
|
|
272
303
|
|
|
@@ -278,9 +309,8 @@ Policy instruments:
|
|
|
278
309
|
thing it polices. A file-level `oxlint-disable` silently defeats every lint rule in its file,
|
|
279
310
|
plugin rules included, and nothing inside a file can suppress the sweep.
|
|
280
311
|
- Write each visitor in the plugin's visitor table as a one-line context-binding arrow delegating to
|
|
281
|
-
a named module-scope `report{Noun}` function. Never write rule logic inline in the table.
|
|
282
|
-
|
|
283
|
-
`.claude/rules/architecture.md` for exactly that table.
|
|
312
|
+
a named module-scope `report{Noun}` function. Never write rule logic inline in the table. Treat the
|
|
313
|
+
visitor table as a returned object literal whose members are callbacks.
|
|
284
314
|
- Name an individual rule id here only where the rule reads its evidence from outside the workspace
|
|
285
315
|
its instrument runs in. This section fixes the instruments and how work is assigned between them;
|
|
286
316
|
each rule's substance stays with the law it enforces.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orkestrel-journey
|
|
3
|
-
description: Prove a browser application the way a person uses it — real keystrokes, clicks, and Tab/Enter against only what is visible and reachable — through the journey layer @orkestrel/test/browser publishes, and generate the capture portfolio, the resolved-style matrix, and the statechart outcome from those same journeys. Use when accepting a UI build, proving an application end to end, deciding whether a
|
|
3
|
+
description: Prove a browser application the way a person uses it — real keystrokes, clicks, and Tab/Enter against only what is visible and reachable — through the journey layer @orkestrel/test/browser publishes, and generate the capture portfolio, the resolved-style matrix, and the statechart outcome from those same journeys. Use when accepting a UI build, proving an application end to end, deciding whether a screen is reachable by keyboard alone, proving what a screen refuses as well as what it does, proving the styles a browser actually resolved under each theme and viewport, driving a transition table through the interface and watching it run, auditing whether the interface speaks the user's vocabulary rather than the engine's, producing the screenshots a design review judges, routing a rendered question to an artifact a model can read, or whenever the only evidence a screen works is a test that drove it through JavaScript instead of through the interface.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Load the canonical workflow
|