@orkestrel/scaffold 0.0.134 → 0.0.136
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-parallel/scripts/lane.js +777 -83
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +327 -21
- package/dist/bin/main.js +254 -36
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +2 -2
- package/dist/host/agents/orchestration.md +2 -2
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +983 -123
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +22 -5
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +403 -32
- package/dist/host/claude/agents/orkestrel.md +17 -17
- package/dist/host/claude/agents/reviewer.md +1 -1
- 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 +4 -2
- package/dist/host/claude/rules/workspace.md +73 -67
- package/dist/host/configs/helpers.ts +109 -73
- package/dist/host/dotfiles/oxlintrc.json +1 -57
- package/dist/host/guides/agent.md +989 -395
- package/dist/host/guides/contract.md +198 -163
- package/dist/host/guides/database.md +978 -503
- package/dist/host/guides/indexeddb.md +80 -66
- package/dist/host/guides/middleware.md +5 -5
- package/dist/host/guides/ollama.md +41 -42
- package/dist/host/guides/relation.md +56 -32
- package/dist/host/guides/scaffold.md +185 -107
- package/dist/host/guides/sqlite.md +44 -23
- package/dist/host/guides/study.md +12 -12
- package/dist/host/guides/test.md +163 -47
- package/dist/host/guides/toolbox.md +127 -81
- package/dist/host/guides/workspace.md +21 -14
- package/dist/host/manifest.json +30 -30
- package/dist/host/scripts/browsers.sh +0 -0
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/npm.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +237 -115
- package/dist/src/core/index.cjs +591 -218
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +248 -29
- package/dist/src/core/index.d.ts +248 -29
- package/dist/src/core/index.js +581 -216
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +18 -8
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +4 -3
- package/dist/src/server/index.d.ts +4 -3
- package/dist/src/server/index.js +19 -9
- package/dist/src/server/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -44,57 +44,57 @@ 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` | |
|
|
51
51
|
| `@orkestrel/capture` | `0.0.7` | L3 | `@orkestrel/process` `^0.0.19`, `@orkestrel/timeout` `^0.0.17`, `@orkestrel/contract` `^0.0.23` | `vite` `^8.3.8`, `vitest` `^4.1.12 \|\| ^5.1.0`, `playwright` `^1.61.0`, `@vitest/browser-playwright` `^4.1.12 \|\| ^5.0.5` |
|
|
52
52
|
| `@orkestrel/codec` | `0.0.10` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
53
53
|
| `@orkestrel/console` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23` | |
|
|
54
|
-
| `@orkestrel/contract` | `0.0.
|
|
54
|
+
| `@orkestrel/contract` | `0.0.24` | 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.25` | L2 | `@orkestrel/sqlite` `^0.0.19`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.24`, `@orkestrel/indexeddb` `^0.0.19` | |
|
|
57
57
|
| `@orkestrel/emitter` | `0.0.16` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
58
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
|
-
| `@orkestrel/indexeddb` | `0.0.
|
|
61
|
+
| `@orkestrel/indexeddb` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.24` | |
|
|
62
62
|
| `@orkestrel/interpret` | `0.0.23` | L3 | `@orkestrel/reason` `^0.0.18`, `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.23`, `@orkestrel/template` `^0.0.14` | |
|
|
63
63
|
| `@orkestrel/jsonrpc` | `0.0.3` | L1 | `@orkestrel/contract` `^0.0.23` | |
|
|
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.23` | L3 | `@orkestrel/emitter` `^0.0.16`, `@orkestrel/contract` `^0.0.24`, `@orkestrel/database` `^0.0.25` | |
|
|
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.135` | 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
|
-
| `@orkestrel/sqlite` | `0.0.
|
|
84
|
+
| `@orkestrel/sqlite` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.24` | |
|
|
85
85
|
| `@orkestrel/sse` | `0.0.14` | L2 | `@orkestrel/codec` `^0.0.10`, `@orkestrel/contract` `^0.0.23` | |
|
|
86
|
-
| `@orkestrel/study` | `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
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.39` | 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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer
|
|
3
|
-
description: 'Opus 5.5 review lane by default, on another engine when the dispatch names one, over implemented work, read-only on source: design fit, API and vocabulary, architecture shape
|
|
3
|
+
description: 'Opus 5.5 review lane by default, on another engine when the dispatch names one, over implemented work, read-only on source: design fit, API and vocabulary, and architecture shape by default; correctness, constraints, and test sufficiency when the dispatch assigns the objective lane. Tests numbered claims and returns the falsify verdict. Never edits source.'
|
|
4
4
|
tools: Read, Grep, Glob
|
|
5
5
|
model: opus
|
|
6
6
|
effort: high
|
|
@@ -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.
|
|
@@ -84,7 +84,7 @@ A skill, a tool description, and a refusal message each teach an agent mid-task.
|
|
|
84
84
|
- Put the critical path in the tool description, most important first: a worked example, the key nesting, and the reply shape. A harness abbreviates a nested schema and delivers the description intact; never leave the teaching to the schema.
|
|
85
85
|
- Make every refusal orient, name, or correct: state the subject, the exact key path, the expected shape, the valid candidates, and every missing and every unexpected item, in one refusal.
|
|
86
86
|
- Keep the provenance a refusal computed, its token, span, reason, and known field, and never invent the value or field the caller intended.
|
|
87
|
-
- Refuse with the correction in the message. Never coerce a malformed input and never silently drop it. Encode an untrusted identifier in a diagnostic, JSON-encoded and length-capped, so malformed input cannot fake or balloon the message.
|
|
87
|
+
- Refuse with the correction in the message. Never coerce a malformed input and never silently drop it. A door can repair a lossless leaf through the `repairValue` function where its guide states that it does, and, where the door serves a model, its tool description states it too. Encode an untrusted identifier in a diagnostic, JSON-encoded and length-capped, so malformed input cannot fake or balloon the message.
|
|
88
88
|
- Acknowledge or state, never both: a mutation returns an acknowledgement and a read returns state. Say the split in both tools' descriptions so neither is polled for the other's job.
|
|
89
89
|
|
|
90
90
|
## Workflow skills
|
|
@@ -135,8 +135,8 @@ Use these orthogonal contract mechanisms:
|
|
|
135
135
|
- Choose a hand guard or a shape-derived guard by how often the check runs and the representation it reads: a hand guard with a directional parity test on a per-element path, a derived guard at a once-per-entity door, and a diagnostic computed only after a refusal.
|
|
136
136
|
- Admit an owned record from its raw form before any projection or fallback, so that corrupt-present stays apart from absent.
|
|
137
137
|
- When a person, a model, or a client authored a value, admit it whole against the contract this package owns for it: refuse the value when it omits a member the contract requires or carries a member the contract does not declare, and never remove a member to admit the rest. Apply § Foreign contracts, not this bullet, to a value another package publishes.
|
|
138
|
-
- When that contract is a compiled `@orkestrel/contract` contract, admit through the `admitValue` function and return its faults in the refusal; call the contract's `parse` method only to project an owned value outward.
|
|
139
|
-
- State shape soundness, lossless
|
|
138
|
+
- When that contract is a compiled `@orkestrel/contract` contract, then from `@orkestrel/contract` 0.0.24 on, admit through the strict `admitValue` function and return its faults in the refusal, and admit through the `repairValue` function only at a door the repair exception in `.claude/rules/documentation.md` § Agent-facing surfaces covers; call the contract's `parse` method only to project an owned value outward.
|
|
139
|
+
- State shape soundness, lossless repair, and authoring validity as separate claims, and prove each at its own door.
|
|
140
140
|
- Treat persistence canonicalization as part of the declared identity round trip: when a store reorders or rewrites a value, compare identity by the value the declaration states.
|
|
141
141
|
- Make a refusal bound cover the ownership and capture work paid before validation: read the limit during capture, with one counter per door call.
|
|
142
142
|
- Report unread or unavailable evidence as unread, never as a false predicate or an empty success.
|
|
@@ -145,6 +145,8 @@ Use these orthogonal contract mechanisms:
|
|
|
145
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.
|
|
146
146
|
- Derive a decision from validated inputs; an editable prior result never substitutes for them.
|
|
147
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.
|
|
148
150
|
|
|
149
151
|
### Foreign contracts
|
|
150
152
|
|
|
@@ -16,37 +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
|
|
20
|
-
|
|
|
21
|
-
| `src/core/`
|
|
22
|
-
| `src/browser/`
|
|
23
|
-
| `src/server/`
|
|
24
|
-
| `src/styles/`
|
|
25
|
-
| `src/<name>/`
|
|
26
|
-
| `src/vue/`
|
|
27
|
-
| `src/bin/`
|
|
28
|
-
| `
|
|
29
|
-
| `app/
|
|
30
|
-
| `app/
|
|
31
|
-
| `app/
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `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 |
|
|
35
34
|
|
|
36
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.
|
|
37
36
|
- Typical browser-app domains: `components/`, `pages/`, `composables/`, `controllers/`, `services/`, `stores/`.
|
|
38
37
|
- Typical server-app domains: `handlers.ts`, `middlewares.ts`, `routes.ts`.
|
|
39
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.
|
|
40
|
-
- Name a styles extension with a name the `NAME_PATTERN` constant admits, and never `core`, `browser`, `server`, `bin`, `
|
|
41
|
-
- `src/bin/main.ts` is the executable entry, built to `dist/bin/main.js
|
|
42
|
-
is for `app/browser/main.ts` and
|
|
43
|
-
found at the same name.
|
|
44
|
-
- `src/
|
|
45
|
-
`
|
|
46
|
-
|
|
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` 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
|
|
47
49
|
body is the one exception to `.claude/rules/architecture.md` § Barrel exports, and the vendored
|
|
48
|
-
`.oxlintrc.json`
|
|
49
|
-
|
|
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.
|
|
50
53
|
- `package.json`'s `bin` key is the installed command name. The entry path is the value and does
|
|
51
54
|
not carry that name.
|
|
52
55
|
- Keep every ignored output at the workspace root or under `tmp/`, and write no `.gitignore`
|
|
@@ -72,9 +75,9 @@ Use only the environments a project needs, and keep the root dependency model in
|
|
|
72
75
|
|
|
73
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.
|
|
74
77
|
|
|
75
|
-
Import a sibling environment through its alias. In `src/browser`, `src/server`, `src/vue`, `src/bin`,
|
|
76
|
-
|
|
77
|
-
|
|
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.
|
|
78
81
|
|
|
79
82
|
## Configuration authority
|
|
80
83
|
|
|
@@ -83,7 +86,7 @@ Import a sibling environment through its alias. In `src/browser`, `src/server`,
|
|
|
83
86
|
- `*/types.ts`: public API contracts.
|
|
84
87
|
- `configs/agents/tsconfig.skills.json`: the scoped typecheck of the skill scripts; its presence selects the `skills` blueprint fact.
|
|
85
88
|
- `configs/src/` and `configs/app/`: thin per-target wrappers, including optional
|
|
86
|
-
`configs/src/*bin*`
|
|
89
|
+
`configs/src/*bin*` files. Shared logic remains in root configs.
|
|
87
90
|
- `configs/helpers.ts`, `configs/browsers.ts`, `configs/commands.ts`, and `configs/policy.ts`: the
|
|
88
91
|
only permitted leaves under `configs/`. Each imports nothing from the workspace, which is what
|
|
89
92
|
keeps it a leaf, so no `configs/types.ts` exists for one to import: each keeps its own types,
|
|
@@ -126,26 +129,26 @@ Environment rules:
|
|
|
126
129
|
|
|
127
130
|
## Build outputs
|
|
128
131
|
|
|
129
|
-
| Output | Content
|
|
130
|
-
| ----------------------------- |
|
|
131
|
-
| `dist/src/core` | Core library + declarations
|
|
132
|
-
| `dist/src/browser` | Browser library + declarations
|
|
133
|
-
| `dist/src/server` | Server library + declarations
|
|
134
|
-
| `dist/src/vue` | Vue face + declarations
|
|
135
|
-
| `dist/src/styles` | Compiled `index.css`
|
|
136
|
-
| `dist/src/styles/themes` | Compiled themes `index.css`
|
|
137
|
-
| `dist/src/<name>` | Compiled `index.css`
|
|
138
|
-
| `dist/bin` |
|
|
139
|
-
| `dist/
|
|
140
|
-
| `dist/app/
|
|
141
|
-
| `dist/app/
|
|
142
|
-
| `
|
|
143
|
-
| `showcase/<application>.html` | Single-file page per application | self-contained, committed |
|
|
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 |
|
|
144
146
|
|
|
145
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.
|
|
146
|
-
- Build
|
|
147
|
-
`../src/<environment>/index.js
|
|
148
|
-
`
|
|
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`.
|
|
149
152
|
- A sheet face ships CSS, not declarations, and its JavaScript build stub stays out of `files`.
|
|
150
153
|
- Build each sheet face with `cssMinify: false`, bounded to its own output directory.
|
|
151
154
|
- Build `dist/src/styles/themes` after `dist/src/styles`; the themes build empties only its own directory.
|
|
@@ -159,20 +162,19 @@ Environment rules:
|
|
|
159
162
|
`vite.config.ts` defines Vitest projects on an environment axis and a workspace-proof axis. The
|
|
160
163
|
environment axis is one project per src/app axis × environment, plus one per extension face:
|
|
161
164
|
|
|
162
|
-
| Project
|
|
163
|
-
|
|
|
164
|
-
| `src:core`
|
|
165
|
-
| `src:browser`
|
|
166
|
-
| `src:vue`
|
|
167
|
-
| `src:server`
|
|
168
|
-
| `src:styles`
|
|
169
|
-
| `src:<name>`
|
|
170
|
-
| `src:bin`
|
|
171
|
-
| `
|
|
172
|
-
| `app:
|
|
173
|
-
| `app:
|
|
174
|
-
| `app:
|
|
175
|
-
| `app:server` | `tests/app/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
165
|
+
| Project | Files | Environment | Setup |
|
|
166
|
+
| ------------- | ---------------------- | ------------------------------------- | ------------------------------------------------------------ |
|
|
167
|
+
| `src:core` | `tests/src/core/**` | Node | `setup.ts` |
|
|
168
|
+
| `src:browser` | `tests/src/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
169
|
+
| `src:vue` | `tests/src/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
170
|
+
| `src:server` | `tests/src/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
171
|
+
| `src:styles` | `tests/src/styles/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` when present |
|
|
172
|
+
| `src:<name>` | `tests/src/<name>/**` | Playwright Chromium, `isolate: false` | `setup.ts`, `setupBrowser.ts`, `setupStyles.ts` when present |
|
|
173
|
+
| `src:bin` | `tests/src/bin/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
174
|
+
| `app:core` | `tests/app/core/**` | Node | `setup.ts` |
|
|
175
|
+
| `app:browser` | `tests/app/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
176
|
+
| `app:vue` | `tests/app/vue/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
|
|
177
|
+
| `app:server` | `tests/app/server/**` | Node | `setup.ts`, `setupServer.ts` |
|
|
176
178
|
|
|
177
179
|
- Compose every sheet-face project (`src:styles` and each `src:<name>`) in its own wrapper through
|
|
178
180
|
the one root `sheetProject` factory, and run it through its `test:src:<face>` script, which builds
|
|
@@ -254,10 +256,15 @@ throwaway instrument against real sources, aliases and setup. Declare no proof t
|
|
|
254
256
|
project composed in the root configuration rather than declared as a path string. The `probe` MCP
|
|
255
257
|
server arms through it — its arming specifications live under the `tmp/probes/` directory and infer
|
|
256
258
|
this project — so a workspace that removes the project, or declares it as a path string, fails the
|
|
257
|
-
server's arming, and an unarmed server refuses every `prove` call.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
server's arming, and an unarmed server refuses every `prove` call. A browser-hosted face is every
|
|
260
|
+
planned face that runs in Playwright Chromium: `src:browser`, `app:browser`, `src:vue`, `app:vue`,
|
|
261
|
+
each sheet face, and the themes target. Its browser benches are the `*.bench.ts` files beneath its
|
|
262
|
+
test directory. `test:bench` runs the Node bench project over `*.bench.ts` files under `tests/` and
|
|
263
|
+
`tmp/probes/` other than the browser benches. In a workspace with a browser-hosted face, it also
|
|
264
|
+
runs the `bench:browser` project over those browser benches in Playwright Chromium; derive both
|
|
265
|
+
glob lists from the planned faces, and give a workspace without one no `bench:browser` project.
|
|
266
|
+
Neither bench project collects an ordinary test file. Every test script names its project and the `test:bench` script
|
|
267
|
+
joins no chain, so no gate runs a probe or bench project; the `probe` project's directory is
|
|
261
268
|
ignored by git; and `.claude/rules/tests.md` governs what may live there.
|
|
262
269
|
|
|
263
270
|
- Define a cross-cutting project only for a proof the package actually has.
|
|
@@ -285,8 +292,7 @@ then runs the configured scoped checks that prove environment isolation.
|
|
|
285
292
|
|
|
286
293
|
- Use plain `tsc` for a TypeScript-only tree.
|
|
287
294
|
- Use `vue-tsc` only for a scope containing `.vue` internals.
|
|
288
|
-
- `check:src` mirrors configured `src:*` test projects; optional `src:bin`
|
|
289
|
-
are each their own scope.
|
|
295
|
+
- `check:src` mirrors configured `src:*` test projects; optional `src:bin` is its own scope.
|
|
290
296
|
- `check:app` mirrors configured `app:*` projects.
|
|
291
297
|
- `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.
|
|
292
298
|
- 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.
|