@orkestrel/scaffold 0.0.133 → 0.0.135
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/agents/skills/orkestrel-dispatch/scripts/bench.js +61 -96
- package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +48 -76
- package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +27 -66
- package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +31 -64
- package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +43 -57
- package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +43 -86
- package/dist/agents/skills/orkestrel-dispatch/scripts/patch.js +68 -104
- package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +35 -69
- package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +47 -84
- package/dist/agents/skills/orkestrel-falsify/scripts/mutate.js +134 -116
- package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +38 -90
- package/dist/agents/skills/orkestrel-harden/scripts/interleave.js +39 -103
- package/dist/agents/skills/orkestrel-harden/scripts/measure.js +40 -89
- package/dist/agents/skills/orkestrel-harden/scripts/titles.js +41 -87
- package/dist/agents/skills/orkestrel-parallel/scripts/cases.js +43 -88
- package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1568 -213
- package/dist/agents/skills/orkestrel-publish/scripts/compare.js +40 -60
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +47 -81
- package/dist/agents/skills/orkestrel-publish/scripts/steps.js +66 -104
- package/dist/agents/skills/orkestrel-publish/scripts/swap.js +74 -88
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +387 -109
- package/dist/agents/skills/orkestrel-publish/scripts/window.js +55 -96
- package/dist/agents/skills/orkestrel-scout/scripts/map.js +54 -101
- package/dist/bin/main.js +275 -33
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +1 -1
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +81 -97
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +64 -72
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +41 -63
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +56 -79
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +61 -74
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +59 -89
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +87 -106
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +57 -76
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +73 -88
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +2 -2
- package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +167 -119
- package/dist/host/agents/skills/orkestrel-harden/references/methods.md +1 -1
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +58 -75
- package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +55 -99
- package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +59 -90
- package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +60 -80
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +4 -4
- package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +71 -108
- package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1990 -274
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +28 -7
- package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +58 -79
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +66 -87
- package/dist/host/agents/skills/orkestrel-publish/scripts/steps.ts +84 -102
- package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +92 -99
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +483 -127
- package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +82 -120
- package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
- package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +85 -112
- package/dist/host/claude/agents/orkestrel.md +16 -16
- package/dist/host/claude/rules/architecture.md +1 -1
- package/dist/host/claude/rules/documentation.md +1 -1
- package/dist/host/claude/rules/patterns.md +7 -4
- package/dist/host/claude/rules/styles.md +1 -1
- package/dist/host/claude/rules/tests.md +3 -3
- package/dist/host/claude/rules/workspace.md +50 -37
- package/dist/host/configs/helpers.ts +117 -71
- package/dist/host/dotfiles/oxlintrc.json +6 -0
- package/dist/host/guides/agent.md +989 -395
- package/dist/host/guides/database.md +357 -342
- package/dist/host/guides/form.md +79 -4
- package/dist/host/guides/middleware.md +5 -5
- package/dist/host/guides/ollama.md +41 -42
- package/dist/host/guides/scaffold.md +170 -70
- package/dist/host/guides/study.md +12 -12
- package/dist/host/guides/table.md +20 -6
- package/dist/host/guides/test.md +166 -52
- package/dist/host/guides/toolbox.md +127 -81
- package/dist/host/guides/workspace.md +21 -14
- package/dist/host/manifest.json +54 -54
- package/dist/host/tests/config.test.ts +251 -7
- package/dist/host/tests/policy.test.ts +14 -21
- package/dist/host/tests/setupPolicy.ts +43 -36
- package/dist/src/core/index.cjs +533 -139
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +223 -16
- package/dist/src/core/index.d.ts +223 -16
- package/dist/src/core/index.js +524 -139
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +23 -14
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +3 -2
- package/dist/src/server/index.d.ts +3 -2
- package/dist/src/server/index.js +24 -15
- package/dist/src/server/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -44,7 +44,7 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
|
|
|
44
44
|
| Package | Version | Layer | Runtime dependencies | Peer dependencies |
|
|
45
45
|
| ----------------------- | --------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
46
46
|
| `@orkestrel/abort` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
47
|
-
| `@orkestrel/agent` | `0.0.
|
|
47
|
+
| `@orkestrel/agent` | `0.0.44` | L5 | `@orkestrel/tool` `^0.0.23`, `@orkestrel/abort` `^0.0.17`, `@orkestrel/queue` `^0.0.23`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/ndjson` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24`, `@orkestrel/workflow` `^0.0.29`, `@orkestrel/workspace` `^0.0.19` | |
|
|
48
48
|
| `@orkestrel/brief` | `0.0.18` | L4 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/interpret` `^0.0.23` | |
|
|
49
49
|
| `@orkestrel/browser` | `0.0.33` | L5 | `@orkestrel/mcp` `^0.0.43`, `@orkestrel/html` `^0.0.16`, `@orkestrel/pool` `^0.0.21`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/codec` `^0.0.10`, `@orkestrel/router` `^0.0.21`, `@orkestrel/server` `^0.0.27`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/markdown` `^0.0.21`, `@orkestrel/websocket` `^0.0.19` | |
|
|
50
50
|
| `@orkestrel/budget` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
@@ -53,9 +53,9 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
|
|
|
53
53
|
| `@orkestrel/console` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
54
54
|
| `@orkestrel/contract` | `0.0.23` | L0 | | |
|
|
55
55
|
| `@orkestrel/csv` | `0.0.14` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
|
|
56
|
-
| `@orkestrel/database` | `0.0.
|
|
56
|
+
| `@orkestrel/database` | `0.0.24` | L2 | `@orkestrel/sqlite` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/indexeddb` `^0.0.18` | |
|
|
57
57
|
| `@orkestrel/emitter` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
58
|
-
| `@orkestrel/form` | `0.0.
|
|
58
|
+
| `@orkestrel/form` | `0.0.18` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
59
59
|
| `@orkestrel/guide` | `0.0.31` | L3 | `@orkestrel/contract` `^0.0.23`, `@orkestrel/markdown` `^0.0.21` | |
|
|
60
60
|
| `@orkestrel/html` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
61
61
|
| `@orkestrel/indexeddb` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
@@ -64,37 +64,37 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
|
|
|
64
64
|
| `@orkestrel/lsp` | `0.0.15` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/jsonrpc` `^0.0.3`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23` | |
|
|
65
65
|
| `@orkestrel/markdown` | `0.0.21` | L2 | `@orkestrel/html` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
66
66
|
| `@orkestrel/mcp` | `0.0.43` | L4 | `@orkestrel/sse` `^0.0.14`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/codec` `^0.0.10`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/jsonrpc` `^0.0.3`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/websocket` `^0.0.19` | `@orkestrel/router` `^0.0.21`, `@orkestrel/server` `^0.0.27` |
|
|
67
|
-
| `@orkestrel/middleware` | `0.0.
|
|
67
|
+
| `@orkestrel/middleware` | `0.0.32` | L4 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | `@orkestrel/server` `^0.0.27`, `@orkestrel/database` `^0.0.24` |
|
|
68
68
|
| `@orkestrel/msg` | `0.0.17` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
|
|
69
69
|
| `@orkestrel/ndjson` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
70
|
-
| `@orkestrel/ollama` | `0.0.
|
|
70
|
+
| `@orkestrel/ollama` | `0.0.38` | L6 | `@orkestrel/tool` `^0.0.23`, `@orkestrel/agent` `^0.0.44`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/ndjson` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23` | |
|
|
71
71
|
| `@orkestrel/pool` | `0.0.21` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
72
72
|
| `@orkestrel/probe` | `0.0.30` | L5 | `@orkestrel/lsp` `^0.0.15`, `@orkestrel/mcp` `^0.0.43`, `@orkestrel/pool` `^0.0.21`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | `vitest` `^4.1.12 \|\| ^5.1.0`, `typescript` `^6.0.3 \|\| ^7.0.2` |
|
|
73
73
|
| `@orkestrel/process` | `0.0.19` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
74
74
|
| `@orkestrel/program` | `0.0.21` | L4 | `@orkestrel/rater` `^0.0.22`, `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/qualifier` `^0.0.22` | |
|
|
75
75
|
| `@orkestrel/qualifier` | `0.0.22` | L3 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
76
|
-
| `@orkestrel/queue` | `0.0.
|
|
76
|
+
| `@orkestrel/queue` | `0.0.23` | L3 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24` | |
|
|
77
77
|
| `@orkestrel/rater` | `0.0.22` | L3 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
78
78
|
| `@orkestrel/reason` | `0.0.18` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
79
|
-
| `@orkestrel/relation` | `0.0.
|
|
79
|
+
| `@orkestrel/relation` | `0.0.22` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24` | |
|
|
80
80
|
| `@orkestrel/router` | `0.0.21` | L2 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
81
|
-
| `@orkestrel/scaffold` | `0.0.
|
|
81
|
+
| `@orkestrel/scaffold` | `0.0.134` | L3 | `@orkestrel/console` `^0.0.20`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/markdown` `^0.0.21`, `@orkestrel/template` `^0.0.14` | |
|
|
82
82
|
| `@orkestrel/sea` | `0.0.23` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/process` `^0.0.19`, `@orkestrel/contract` `^0.0.23` | |
|
|
83
83
|
| `@orkestrel/server` | `0.0.27` | L3 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/codec` `^0.0.10`, `@orkestrel/router` `^0.0.21`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | |
|
|
84
84
|
| `@orkestrel/sqlite` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
85
85
|
| `@orkestrel/sse` | `0.0.14` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
|
|
86
|
-
| `@orkestrel/study` | `0.0.
|
|
87
|
-
| `@orkestrel/table` | `0.0.
|
|
86
|
+
| `@orkestrel/study` | `0.0.20` | L7 | `@orkestrel/tool` `^0.0.23`, `@orkestrel/abort` `^0.0.17`, `@orkestrel/agent` `^0.0.44`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/ollama` `^0.0.38`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | |
|
|
87
|
+
| `@orkestrel/table` | `0.0.17` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
88
88
|
| `@orkestrel/template` | `0.0.14` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
89
|
-
| `@orkestrel/terminal` | `0.0.
|
|
90
|
-
| `@orkestrel/test` | `0.0.
|
|
89
|
+
| `@orkestrel/terminal` | `0.0.26` | L3 | `@orkestrel/sse` `^0.0.14`, `@orkestrel/form` `^0.0.18`, `@orkestrel/console` `^0.0.20`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24` | |
|
|
90
|
+
| `@orkestrel/test` | `0.0.38` | L1 | `@orkestrel/contract` `^0.0.23` | `vitest` `^4.1.12 \|\| ^5.1.0`, `playwright` `^1.65.0` |
|
|
91
91
|
| `@orkestrel/timeout` | `0.0.17` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
92
92
|
| `@orkestrel/tool` | `0.0.23` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
93
|
-
| `@orkestrel/toolbox` | `0.0.
|
|
93
|
+
| `@orkestrel/toolbox` | `0.0.33` | L6 | `@orkestrel/form` `^0.0.18`, `@orkestrel/tool` `^0.0.23`, `@orkestrel/agent` `^0.0.44`, `@orkestrel/server` `^0.0.27`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24`, `@orkestrel/relation` `^0.0.22`, `@orkestrel/terminal` `^0.0.26`, `@orkestrel/workflow` `^0.0.29`, `@orkestrel/workspace` `^0.0.19` | |
|
|
94
94
|
| `@orkestrel/websocket` | `0.0.19` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
95
|
-
| `@orkestrel/worker` | `0.0.
|
|
96
|
-
| `@orkestrel/workflow` | `0.0.
|
|
97
|
-
| `@orkestrel/workspace` | `0.0.
|
|
95
|
+
| `@orkestrel/worker` | `0.0.23` | L4 | `@orkestrel/pool` `^0.0.21`, `@orkestrel/queue` `^0.0.23`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24` | |
|
|
96
|
+
| `@orkestrel/workflow` | `0.0.29` | L4 | `@orkestrel/abort` `^0.0.17`, `@orkestrel/queue` `^0.0.23`, `@orkestrel/budget` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24` | |
|
|
97
|
+
| `@orkestrel/workspace` | `0.0.19` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/database` `^0.0.24` | |
|
|
98
98
|
|
|
99
99
|
<!-- /orkestrel:catalog -->
|
|
100
100
|
|
|
@@ -304,7 +304,7 @@ export * from './greeters/Greeter.js'
|
|
|
304
304
|
|
|
305
305
|
`AGENTS.md` § Design laws owns the minimal-API, shim, polling, and product-policy laws. This section adds:
|
|
306
306
|
|
|
307
|
-
- For multiple backends,
|
|
307
|
+
- For multiple backends, have each backend answer every part of an operation its engine performs natively, such as filtering, ordering, paging, counting, aggregating, and transactions. Implement one shared engine over the smallest primitives, and run it only over the part a backend's engine cannot answer, for that backend alone. Never run the shared engine where a native path exists.
|
|
308
308
|
- Centralize any pattern repeated twice.
|
|
309
309
|
- Keep everything generic/reusable and free of unrelated-project logic.
|
|
310
310
|
- Mechanism in a framework or server utility means HMAC, CORS, parsing, sessions, cookies, CSRF, and static serving; product policy means user models, login flow, and authorization.
|
|
@@ -113,7 +113,7 @@ A skill, a tool description, and a refusal message each teach an agent mid-task.
|
|
|
113
113
|
|
|
114
114
|
- Run a script in a target through its built twin, `node node_modules/@orkestrel/scaffold/dist/agents/skills/<skill>/scripts/<name>.js`, because Node refuses to strip types for a file under `node_modules`; `.claude/rules/workspace.md` names the `build:skills` script that emits the twins. When a script spawns a sibling script, take the extension from the running file (`extname(fileURLToPath(import.meta.url))`), so the twin spawns `.js` and the checkout spawns `.ts`. When a script resolves a file under `.agents/templates/`, add that file to the copy in `build:skills`.
|
|
115
115
|
- Resolve a sibling canon file (a template, another script) from the script's own location with `import.meta.url`, and the manifest, `tmp/`, and the test tree from the working directory, because a target runs the script from `node_modules/@orkestrel/scaffold/dist/agents/` against its own checkout.
|
|
116
|
-
- Read arguments
|
|
116
|
+
- Read arguments with `parseArgs` from `node:util`, with `strict: true` and every flag the script reads declared in its `options`: it refuses an unknown flag, a value-taking flag with no value, and a value that opens with `-` and is longer than `-`, outside the `--flag=value` form, and it reads `--flag value` and `--flag=value` alike. Never wrap `parseArgs` to change what it reads. Declare a flag that repeats (`--range`) with `multiple: true` and say in the usage line that it repeats. Where a script passes a command on, parse only the arguments before the first bare `--` and take the arguments after it as the command. Where flags select different work (`--visit` or `--plan`), the script names one operation mode per run and refuses two; where each flag adds a section to one report (`--tree` with `--headings`), the script combines them and its usage line says so. Exit 64 on every usage refusal and say on stderr what was refused: the `parseArgs` error message followed by the usage line, the usage line when no mode or two modes were given, and the flag with the value it takes when a value fails the script's own check.
|
|
117
117
|
- Print to the terminal by default. Offer `--json` for a reader that parses, and `--out FILE` (`.txt` for a list, `.json` for a structure) where a lane reads the result later or the output would crowd a context; a written file saves the tokens a terminal dump spends. Choose per script; state each form in its usage line.
|
|
118
118
|
- Verify each API a skill instructs an executor to call against the installed package's public entry before landing the instruction, and name the entry you read. A skill that names a symbol its package does not export teaches an executor to write a dangling import.
|
|
119
119
|
- Put every symbol a skill teaches in a named import inside a Markdown fence in `SKILL.md` or a named reference. The policy sweep reads fenced value and type imports from `@orkestrel/*` declaration entries; it does not read identifiers in prose or table cells, or validate call signatures and runtime behavior.
|
|
@@ -13,10 +13,11 @@ These rules govern the shape of options, managers, emitters, and contracts, and
|
|
|
13
13
|
|
|
14
14
|
`AGENTS.md` § Non-negotiable rules owns the reuse law. Before writing a guard, parser, combinator, outcome, safe exception boundary, contract shape/compiler, schema utility, error narrower, emitter helper, or other general primitive:
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
16
|
+
1. Check the stable `node:` modules and ECMAScript built-ins at the declared `engines.node` floor, and use the one whose semantics match, such as `parseArgs` from `node:util` for command-line flags.
|
|
17
|
+
2. Inspect `package.json`, the lockfile, vendored dependency guides, and exact installed declarations/exports.
|
|
18
|
+
3. Build a semantic overlap map between the proposed/local behavior and declared `@orkestrel/*` capabilities.
|
|
19
|
+
4. Keep local behavior only when it adds a real domain invariant, composition, projection, translation, or intentionally different contract.
|
|
20
|
+
5. Test the difference. Similar names are not proof of equivalent semantics.
|
|
20
21
|
|
|
21
22
|
## Options
|
|
22
23
|
|
|
@@ -144,6 +145,8 @@ Use these orthogonal contract mechanisms:
|
|
|
144
145
|
- Declare a parser's whole admitted language and its adjacent refusals, and prove them with a table of the class; never tune the parser example by example. On a parser change, run a seeded differential against its parent build, and read a passing suite as no evidence of what the change moved.
|
|
145
146
|
- Derive a decision from validated inputs; an editable prior result never substitutes for them.
|
|
146
147
|
- Project a value outward by its authorship and trust origin, and accept no authority channel from a client.
|
|
148
|
+
- When a handler acts on a resource a run selects, take the resource from the execution context that run supplies, accept it only as the instance the handler's own registry holds, and never read a pointer other runs share.
|
|
149
|
+
- When a list bounds what a run reads from a resource, hold every handler that reaches that resource to the same list at the call: refuse a member outside it with one text whether or not it exists, and pass the list into any operation that walks the resource.
|
|
147
150
|
|
|
148
151
|
### Foreign contracts
|
|
149
152
|
|
|
@@ -109,4 +109,4 @@ State classes are bare adjectives such as `.active` and `.disabled`, chosen cons
|
|
|
109
109
|
|
|
110
110
|
When a class sets one component's tokens for one key of a shared Sass map, such as a recreated `$theme-colors`, write it as a variant class, as Bootstrap writes `.btn-success`: generate one class per key with `@each` over the map's keys, take each value from the family map with an `@error` on a missing key, and set only the component's own custom properties. Keep the bare modifier form for a class that any component reads.
|
|
111
111
|
|
|
112
|
-
The composable owns interaction state, class application, `aria-*`, and timing. The partial owns visual presentation. Their contracts are stable class names and transition tokens. A native browser module's partial keys its chrome on the module's `data-*` state attribute, scoped under the module's host attribute, and its proof sets the attribute directly; the stable-class-name contract covers the classes a composable writes, not a module's attributes.
|
|
112
|
+
The composable owns interaction state, class application, `aria-*`, and timing. The partial owns visual presentation. Their contracts are stable class names and transition tokens. A native browser module's partial keys its chrome on the module's `data-*` state attribute, scoped under the module's host attribute, and its proof sets the attribute directly; the stable-class-name contract covers the classes a composable writes, not a module's attributes. When descent from the host cannot select every element the module marks, because the module declares no host attribute or reaches the element through an association such as `commandfor` or `form`, key the state attribute on the marked element instead: compound it with the class whose paint the state changes, and only when no other module of the package writes that attribute. The proof of such a rule sets the attribute directly in a fixture that carries no host attribute, and proves that an element carrying the attribute without the class paints unchanged.
|
|
@@ -209,9 +209,9 @@ Test helpers are shared infrastructure, not local test-file clutter.
|
|
|
209
209
|
- For the test modules scaffold owns, keep shared helpers within them instead of importing them
|
|
210
210
|
from `@orkestrel/test`. In the vendored set (`tests/setupPolicy.ts`, `tests/policy.test.ts`, and
|
|
211
211
|
`tests/config.test.ts`), follow the vendored-file import law in `.claude/rules/workspace.md`. In
|
|
212
|
-
the `tests/setupDistribution.ts` harness, import only `node:` modules,
|
|
213
|
-
in its browser variant also `playwright`, `@vitest/browser-playwright`,
|
|
214
|
-
`../configs/browsers.js`.
|
|
212
|
+
the `tests/setupDistribution.ts` harness, import only `node:` modules, `@orkestrel/contract`,
|
|
213
|
+
`vitest`, and `vite`, and in its browser variant also `playwright`, `@vitest/browser-playwright`,
|
|
214
|
+
and `../configs/browsers.js`.
|
|
215
215
|
|
|
216
216
|
- Extract a fixture, recorder, event factory, async wait, renderer, scenario/data builder, protocol fixture, or DOM builder as soon as it could serve another test.
|
|
217
217
|
- Any duplicate or near-duplicate helper is a defect; consolidate it into one general form.
|
|
@@ -16,30 +16,40 @@ 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 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
|
|
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
|
|
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` and host-tool modules; never a 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 |
|
|
34
34
|
|
|
35
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.
|
|
36
36
|
- Typical browser-app domains: `components/`, `pages/`, `composables/`, `controllers/`, `services/`, `stores/`.
|
|
37
37
|
- Typical server-app domains: `handlers.ts`, `middlewares.ts`, `routes.ts`.
|
|
38
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
39
|
- Name a styles extension with a name the `NAME_PATTERN` constant admits, and never `core`, `browser`, `server`, `bin`, `styles`, `themes`, or `vue`.
|
|
40
|
-
- `src/bin/main.ts` is the executable entry, built to `dist/bin/main.js
|
|
41
|
-
is for `app/browser/main.ts` and
|
|
42
|
-
found at the same name.
|
|
40
|
+
- `src/bin/main.ts` is the executable entry, built to `dist/bin/main.js` and published through the
|
|
41
|
+
manifest's `bin` field. The name is fixed, as it is for `app/browser/main.ts` and
|
|
42
|
+
`app/server/main.ts`, so every runtime entry in a workspace is found at the same name.
|
|
43
|
+
- Every other direct `src/bin/<name>.ts` whose stem `BIN_MODULE_PATTERN` admits and
|
|
44
|
+
`CENTRAL_FILE_NAMES` does not name is a module for a host tool that loads it by specifier and
|
|
45
|
+
reads its default export, as Vitest reads a reporter. It builds through the same bin build to the
|
|
46
|
+
ES-only `dist/bin/<name>.js` and its `dist/bin/<name>.d.ts`, and publishes as
|
|
47
|
+
`exports["./<name>"]`. Its body is two statements: an import of the value it publishes from a
|
|
48
|
+
library environment through that environment's alias, then `export default` of that value. That
|
|
49
|
+
body is the one exception to `.claude/rules/architecture.md` § Barrel exports, and the vendored
|
|
50
|
+
`.oxlintrc.json` admits a default export in `src/bin/*.ts`. Keep the value in its environment,
|
|
51
|
+
exported by name through that environment's barrel. Never name a module for a subpath another
|
|
52
|
+
face publishes; the blueprint gate refuses it and names both.
|
|
43
53
|
- `package.json`'s `bin` key is the installed command name. The entry path is the value and does
|
|
44
54
|
not carry that name.
|
|
45
55
|
- Keep every ignored output at the workspace root or under `tmp/`, and write no `.gitignore`
|
|
@@ -65,9 +75,9 @@ Use only the environments a project needs, and keep the root dependency model in
|
|
|
65
75
|
|
|
66
76
|
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.
|
|
67
77
|
|
|
68
|
-
Import a sibling environment through its alias. In `src/browser`, `src/server`, `src/vue`, and `src/bin`,
|
|
69
|
-
relative path to `src/core`, to `src/browser` from `src/vue`, or to `src/server` from `src/bin`
|
|
70
|
-
private copy of that environment into the face, so the vendored `.oxlintrc.json` refuses it with a message naming the alias.
|
|
78
|
+
Import a sibling environment through its alias. In `src/browser`, `src/server`, `src/vue`, and `src/bin`,
|
|
79
|
+
a relative path to `src/core`, to `src/browser` from `src/vue`, or to `src/server` from `src/bin`
|
|
80
|
+
bundles a private copy of that environment into the face, so the vendored `.oxlintrc.json` refuses it with a message naming the alias.
|
|
71
81
|
|
|
72
82
|
## Configuration authority
|
|
73
83
|
|
|
@@ -119,22 +129,26 @@ Environment rules:
|
|
|
119
129
|
|
|
120
130
|
## Build outputs
|
|
121
131
|
|
|
122
|
-
| Output | Content
|
|
123
|
-
| ----------------------------- |
|
|
124
|
-
| `dist/src/core` | Core library + declarations
|
|
125
|
-
| `dist/src/browser` | Browser library + declarations
|
|
126
|
-
| `dist/src/server` | Server library + declarations
|
|
127
|
-
| `dist/src/vue` | Vue face + declarations
|
|
128
|
-
| `dist/src/styles` | Compiled `index.css`
|
|
129
|
-
| `dist/src/styles/themes` | Compiled themes `index.css`
|
|
130
|
-
| `dist/src/<name>` | Compiled `index.css`
|
|
131
|
-
| `dist/bin` |
|
|
132
|
-
| `dist/app/browser` | Browser application
|
|
133
|
-
| `dist/app/vue` | Vue application
|
|
134
|
-
| `dist/app/server` | Server application
|
|
135
|
-
| `showcase/<application>.html` | Single-file page per application
|
|
132
|
+
| Output | Content | Format |
|
|
133
|
+
| ----------------------------- | ------------------------------------------------ | ------------------------------------------------------- |
|
|
134
|
+
| `dist/src/core` | Core library + declarations | ES and CJS |
|
|
135
|
+
| `dist/src/browser` | Browser library + declarations | ES |
|
|
136
|
+
| `dist/src/server` | Server library + declarations | ES and CJS |
|
|
137
|
+
| `dist/src/vue` | Vue face + declarations | ES |
|
|
138
|
+
| `dist/src/styles` | Compiled `index.css` | CSS |
|
|
139
|
+
| `dist/src/styles/themes` | Compiled themes `index.css` | CSS |
|
|
140
|
+
| `dist/src/<name>` | Compiled `index.css` | CSS |
|
|
141
|
+
| `dist/bin` | Executable `main.js`; each module + declarations | ES; shebang on `main.js` alone |
|
|
142
|
+
| `dist/app/browser` | Browser application | target-defined |
|
|
143
|
+
| `dist/app/vue` | Vue application | target-defined |
|
|
144
|
+
| `dist/app/server` | Server application | CJS runtime entry; ES barrel when `studies` is selected |
|
|
145
|
+
| `showcase/<application>.html` | Single-file page per application | self-contained, committed |
|
|
136
146
|
|
|
137
147
|
- 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.
|
|
148
|
+
- Build every `src/bin` module ES only with `@src/*` external, rewritten through `output.paths` to
|
|
149
|
+
`../src/<environment>/index.js`. Give `main.js` alone the `#!/usr/bin/env node` banner, and roll
|
|
150
|
+
up `dist/bin/<name>.d.ts` for every other module with `rewriteSourceSpecifier` rewriting each
|
|
151
|
+
`@src/<environment>` to `../src/<environment>/index.js`.
|
|
138
152
|
- A sheet face ships CSS, not declarations, and its JavaScript build stub stays out of `files`.
|
|
139
153
|
- Build each sheet face with `cssMinify: false`, bounded to its own output directory.
|
|
140
154
|
- Build `dist/src/styles/themes` after `dist/src/styles`; the themes build empties only its own directory.
|
|
@@ -273,8 +287,7 @@ then runs the configured scoped checks that prove environment isolation.
|
|
|
273
287
|
|
|
274
288
|
- Use plain `tsc` for a TypeScript-only tree.
|
|
275
289
|
- Use `vue-tsc` only for a scope containing `.vue` internals.
|
|
276
|
-
- `check:src` mirrors configured `src:*` test projects; optional `src:bin` is its
|
|
277
|
-
own scope.
|
|
290
|
+
- `check:src` mirrors configured `src:*` test projects; optional `src:bin` is its own scope.
|
|
278
291
|
- `check:app` mirrors configured `app:*` projects.
|
|
279
292
|
- `check:skills` typechecks `.agents/skills/*/scripts/*.ts` through `configs/agents/tsconfig.skills.json` wherever that wrapper is present: the root project's wildcard never enters a dot-prefixed directory, so the scripts need their own scope.
|
|
280
293
|
- The `build:skills` script emits a `.js` twin of every `.agents/skills/*/scripts/*.ts` script into the `dist/agents/skills/` tree through the same wrapper, rewrites each relative import to `.js`, and copies `.agents/templates/brief.md` into the `dist/agents/templates/` directory; the `build` chain runs it after `build:host`, and `dist/agents` ships in the package.
|