@orkestrel/scaffold 0.0.80 → 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/agents/orkestrel.md +52 -52
- 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 +27 -27
- 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 +1263 -161
- 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 +1243 -162
- package/dist/src/core/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -43,58 +43,58 @@ so network-controlled descriptions never enter agent instruction context.
|
|
|
43
43
|
|
|
44
44
|
<!-- orkestrel:catalog -->
|
|
45
45
|
|
|
46
|
-
| Package | Version | Layer | Runtime dependencies
|
|
47
|
-
| ----------------------- | -------- | ----- |
|
|
48
|
-
| `@orkestrel/abort` | `0.0.
|
|
49
|
-
| `@orkestrel/agent` | `0.0.
|
|
50
|
-
| `@orkestrel/brief` | `0.0.
|
|
51
|
-
| `@orkestrel/browser` | `0.0.
|
|
52
|
-
| `@orkestrel/budget` | `0.0.
|
|
53
|
-
| `@orkestrel/codec` | `0.0.
|
|
54
|
-
| `@orkestrel/console` | `0.0.
|
|
55
|
-
| `@orkestrel/contract` | `0.0.18` | L0 |
|
|
56
|
-
| `@orkestrel/csv` | `0.0.
|
|
57
|
-
| `@orkestrel/database` | `0.0.
|
|
58
|
-
| `@orkestrel/emitter` | `0.0.
|
|
59
|
-
| `@orkestrel/form` | `0.0.
|
|
60
|
-
| `@orkestrel/guide` | `0.0.
|
|
61
|
-
| `@orkestrel/html` | `0.0.
|
|
62
|
-
| `@orkestrel/indexeddb` | `0.0.
|
|
63
|
-
| `@orkestrel/interpret` | `0.0.
|
|
64
|
-
| `@orkestrel/lsp` | `0.0.
|
|
65
|
-
| `@orkestrel/markdown` | `0.0.
|
|
66
|
-
| `@orkestrel/mcp` | `0.0.
|
|
67
|
-
| `@orkestrel/middleware` | `0.0.
|
|
68
|
-
| `@orkestrel/msg` | `0.0.
|
|
69
|
-
| `@orkestrel/ndjson` | `0.0.
|
|
70
|
-
| `@orkestrel/ollama` | `0.0.
|
|
71
|
-
| `@orkestrel/pool` | `0.0.
|
|
72
|
-
| `@orkestrel/probe` | `0.0.
|
|
73
|
-
| `@orkestrel/process` | `0.0.
|
|
74
|
-
| `@orkestrel/program` | `0.0.
|
|
75
|
-
| `@orkestrel/qualifier` | `0.0.
|
|
76
|
-
| `@orkestrel/queue` | `0.0.
|
|
77
|
-
| `@orkestrel/rater` | `0.0.
|
|
78
|
-
| `@orkestrel/reason` | `0.0.
|
|
79
|
-
| `@orkestrel/relation` | `0.0.
|
|
80
|
-
| `@orkestrel/router` | `0.0.
|
|
81
|
-
| `@orkestrel/scaffold` | `0.0.
|
|
82
|
-
| `@orkestrel/sea` | `0.0.
|
|
83
|
-
| `@orkestrel/server` | `0.0.
|
|
84
|
-
| `@orkestrel/sqlite` | `0.0.
|
|
85
|
-
| `@orkestrel/sse` | `0.0.
|
|
86
|
-
| `@orkestrel/supervisor` | `0.0.1` | L5 | `@orkestrel/contract` `^0.0.11`, `@orkestrel/database` `^0.0.9`, `@orkestrel/emitter` `^0.0.6`, `@orkestrel/workflow` `^0.0.12`
|
|
87
|
-
| `@orkestrel/table` | `0.0.
|
|
88
|
-
| `@orkestrel/template` | `0.0.
|
|
89
|
-
| `@orkestrel/terminal` | `0.0.
|
|
90
|
-
| `@orkestrel/test` | `0.0.24` | L1 | `@orkestrel/contract` `^0.0.18`
|
|
91
|
-
| `@orkestrel/timeout` | `0.0.
|
|
92
|
-
| `@orkestrel/tool` | `0.0.
|
|
93
|
-
| `@orkestrel/toolbox` | `0.0.
|
|
94
|
-
| `@orkestrel/websocket` | `0.0.
|
|
95
|
-
| `@orkestrel/worker` | `0.0.
|
|
96
|
-
| `@orkestrel/workflow` | `0.0.
|
|
97
|
-
| `@orkestrel/workspace` | `0.0.
|
|
46
|
+
| Package | Version | Layer | Runtime dependencies | Peer dependencies |
|
|
47
|
+
| ----------------------- | -------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
48
|
+
| `@orkestrel/abort` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
49
|
+
| `@orkestrel/agent` | `0.0.25` | L5 | `@orkestrel/tool` `^0.0.17`, `@orkestrel/abort` `^0.0.12`, `@orkestrel/queue` `^0.0.15`, `@orkestrel/budget` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16`, `@orkestrel/workflow` `^0.0.20`, `@orkestrel/workspace` `^0.0.10` | |
|
|
50
|
+
| `@orkestrel/brief` | `0.0.10` | L4 | `@orkestrel/reason` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/interpret` `^0.0.15` | |
|
|
51
|
+
| `@orkestrel/browser` | `0.0.18` | L3 | `@orkestrel/html` `^0.0.11`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/websocket` `^0.0.14` | |
|
|
52
|
+
| `@orkestrel/budget` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
53
|
+
| `@orkestrel/codec` | `0.0.5` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
54
|
+
| `@orkestrel/console` | `0.0.15` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
55
|
+
| `@orkestrel/contract` | `0.0.18` | L0 | | |
|
|
56
|
+
| `@orkestrel/csv` | `0.0.9` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
57
|
+
| `@orkestrel/database` | `0.0.16` | L2 | `@orkestrel/sqlite` `^0.0.13`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/indexeddb` `^0.0.13` | |
|
|
58
|
+
| `@orkestrel/emitter` | `0.0.11` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
59
|
+
| `@orkestrel/form` | `0.0.8` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
60
|
+
| `@orkestrel/guide` | `0.0.21` | L3 | `@orkestrel/contract` `^0.0.18`, `@orkestrel/markdown` `^0.0.16` | |
|
|
61
|
+
| `@orkestrel/html` | `0.0.11` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
62
|
+
| `@orkestrel/indexeddb` | `0.0.13` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
63
|
+
| `@orkestrel/interpret` | `0.0.15` | L3 | `@orkestrel/reason` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/template` `^0.0.9` | |
|
|
64
|
+
| `@orkestrel/lsp` | `0.0.10` | L3 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/process` `^0.0.14`, `@orkestrel/contract` `^0.0.18` | |
|
|
65
|
+
| `@orkestrel/markdown` | `0.0.16` | L2 | `@orkestrel/html` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
66
|
+
| `@orkestrel/mcp` | `0.0.33` | L4 | `@orkestrel/sse` `^0.0.9`, `@orkestrel/tool` `^0.0.17`, `@orkestrel/codec` `^0.0.5`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/process` `^0.0.14`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/websocket` `^0.0.14` | `@orkestrel/router` `^0.0.16`, `@orkestrel/server` `^0.0.21` |
|
|
67
|
+
| `@orkestrel/middleware` | `0.0.22` | L4 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/budget` `^0.0.12`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18` | `@orkestrel/server` `^0.0.21`, `@orkestrel/database` `^0.0.16` |
|
|
68
|
+
| `@orkestrel/msg` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
69
|
+
| `@orkestrel/ndjson` | `0.0.11` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
70
|
+
| `@orkestrel/ollama` | `0.0.19` | L6 | `@orkestrel/tool` `^0.0.17`, `@orkestrel/agent` `^0.0.25`, `@orkestrel/budget` `^0.0.12`, `@orkestrel/ndjson` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
71
|
+
| `@orkestrel/pool` | `0.0.13` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
72
|
+
| `@orkestrel/probe` | `0.0.19` | L5 | `@orkestrel/lsp` `^0.0.10`, `@orkestrel/mcp` `^0.0.33`, `@orkestrel/tool` `^0.0.17`, `@orkestrel/queue` `^0.0.15`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18` | `vitest` `^4.1.11`, `typescript` `^6.0.3` |
|
|
73
|
+
| `@orkestrel/process` | `0.0.14` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
74
|
+
| `@orkestrel/program` | `0.0.15` | L4 | `@orkestrel/rater` `^0.0.16`, `@orkestrel/reason` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/qualifier` `^0.0.16` | |
|
|
75
|
+
| `@orkestrel/qualifier` | `0.0.16` | L3 | `@orkestrel/reason` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
76
|
+
| `@orkestrel/queue` | `0.0.15` | L3 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
77
|
+
| `@orkestrel/rater` | `0.0.16` | L3 | `@orkestrel/reason` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
78
|
+
| `@orkestrel/reason` | `0.0.12` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
79
|
+
| `@orkestrel/relation` | `0.0.14` | L3 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
80
|
+
| `@orkestrel/router` | `0.0.16` | L2 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
81
|
+
| `@orkestrel/scaffold` | `0.0.80` | L3 | `@orkestrel/console` `^0.0.15`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/process` `^0.0.14`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/markdown` `^0.0.16`, `@orkestrel/template` `^0.0.9` | |
|
|
82
|
+
| `@orkestrel/sea` | `0.0.18` | L3 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/process` `^0.0.14`, `@orkestrel/contract` `^0.0.18` | |
|
|
83
|
+
| `@orkestrel/server` | `0.0.21` | L3 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/codec` `^0.0.5`, `@orkestrel/router` `^0.0.16`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18` | |
|
|
84
|
+
| `@orkestrel/sqlite` | `0.0.13` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
85
|
+
| `@orkestrel/sse` | `0.0.9` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
86
|
+
| `@orkestrel/supervisor` | `0.0.1` | L5 | `@orkestrel/contract` `^0.0.11`, `@orkestrel/database` `^0.0.9`, `@orkestrel/emitter` `^0.0.6`, `@orkestrel/workflow` `^0.0.12` | |
|
|
87
|
+
| `@orkestrel/table` | `0.0.7` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
88
|
+
| `@orkestrel/template` | `0.0.9` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
89
|
+
| `@orkestrel/terminal` | `0.0.17` | L3 | `@orkestrel/sse` `^0.0.9`, `@orkestrel/form` `^0.0.8`, `@orkestrel/console` `^0.0.15`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
90
|
+
| `@orkestrel/test` | `0.0.24` | L1 | `@orkestrel/contract` `^0.0.18` | `vitest` `^4.1.11` |
|
|
91
|
+
| `@orkestrel/timeout` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
92
|
+
| `@orkestrel/tool` | `0.0.17` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
93
|
+
| `@orkestrel/toolbox` | `0.0.16` | L6 | `@orkestrel/form` `^0.0.8`, `@orkestrel/tool` `^0.0.17`, `@orkestrel/agent` `^0.0.25`, `@orkestrel/server` `^0.0.21`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16`, `@orkestrel/relation` `^0.0.14`, `@orkestrel/terminal` `^0.0.17`, `@orkestrel/workflow` `^0.0.20`, `@orkestrel/workspace` `^0.0.10` | |
|
|
94
|
+
| `@orkestrel/websocket` | `0.0.14` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
95
|
+
| `@orkestrel/worker` | `0.0.14` | L4 | `@orkestrel/pool` `^0.0.13`, `@orkestrel/queue` `^0.0.15`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
96
|
+
| `@orkestrel/workflow` | `0.0.20` | L4 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/queue` `^0.0.15`, `@orkestrel/budget` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
97
|
+
| `@orkestrel/workspace` | `0.0.10` | L3 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
98
98
|
|
|
99
99
|
<!-- /orkestrel:catalog -->
|
|
100
100
|
|
|
@@ -15,13 +15,25 @@ paths:
|
|
|
15
15
|
are first-class.
|
|
16
16
|
- The CLI names the independent selections `--src` and `--app`.
|
|
17
17
|
`--surfaces` is not an alias and must fail as an unknown option.
|
|
18
|
+
- `new` selects the styles surface with `--styles`, its themes target with `--themes` (requires
|
|
19
|
+
`--styles`), the showcase with `--showcase` (requires `--app browser`), and extensions with
|
|
20
|
+
`--extend <surface:name,…>`. Each `--extend` entry is `browser:vue`, applied to every selected
|
|
21
|
+
browser axis, or `styles:<name>`, which requires `--styles`. `--app browser` implies the journey.
|
|
18
22
|
- Core-only, browser-only, and server-only applications are valid. A combined
|
|
19
23
|
browser+server application includes app/core for shared contracts.
|
|
20
24
|
- Every selected environment has an `index.ts` barrel. `main.ts` is an executable
|
|
21
25
|
entry and never owns reusable declarations.
|
|
22
26
|
- app/core is host-independent and check/test-only.
|
|
23
|
-
- app/browser uses app/core contracts,
|
|
24
|
-
entry, `
|
|
27
|
+
- app/browser is framework-independent: it uses app/core contracts, an
|
|
28
|
+
`index.html` entry, a `main.ts` that renders through the DOM, `check:app:browser`
|
|
29
|
+
through `tsc`, and real Chromium tests.
|
|
30
|
+
- The Vue application lives in app/vue: `main.ts`, `index.html`, `App.vue`,
|
|
31
|
+
`check:app:vue` through `vue-tsc`, `dev:vue`, and real Chromium tests.
|
|
32
|
+
- When a target's app/browser holds a `.vue` file, move it to app/vue. The
|
|
33
|
+
generator's `repair` raises a blocking question naming that move until it lands.
|
|
34
|
+
- The showcase builds one page per application, app/browser and each app-side
|
|
35
|
+
browser extension, into root `showcase/` with the final-page stamp;
|
|
36
|
+
`.claude/rules/workspace.md` § Build outputs owns its build.
|
|
25
37
|
- app/server uses app/core contracts, parses environment values before binding,
|
|
26
38
|
defaults to loopback, emits `dist/app/server/main.cjs`, and keeps only
|
|
27
39
|
`node:*` external.
|
|
@@ -36,8 +48,9 @@ paths:
|
|
|
36
48
|
generated-consumer tests exercise those real configurations.
|
|
37
49
|
- Generated consumers must pass lint, scoped typechecking, production builds, and
|
|
38
50
|
real integration tests.
|
|
39
|
-
-
|
|
40
|
-
|
|
51
|
+
- Include `.ts`, `.tsx`, `.mts`, and `.cts` in scoped checks. Publish only TypeScript from
|
|
52
|
+
`src/vue`, and put Vue SFCs in `app/vue`. Put CSS in browser code; compile SCSS through the
|
|
53
|
+
`sass` dependency the styles surface declares.
|
|
41
54
|
- Published `src` environments never import private `app` modules. Src core is
|
|
42
55
|
host-independent; src browser/server may import src core but never one
|
|
43
56
|
another's implementation. Apply the same environment law to
|
|
@@ -45,8 +58,9 @@ paths:
|
|
|
45
58
|
is its core API.
|
|
46
59
|
- App-only manifests are unscoped and `private: true`, with no `main`,
|
|
47
60
|
`module`, `types`, export map, or publish configuration. Mixed manifests
|
|
48
|
-
publish only `dist/src
|
|
49
|
-
|
|
61
|
+
publish only `dist/src` and the SCSS sources a stylesheet export names, and
|
|
62
|
+
never app output; `vue` stays a development dependency apart from the optional
|
|
63
|
+
peer `.claude/rules/browser.md` admits.
|
|
50
64
|
- Give app/server process signals to a tested, explicitly stoppable,
|
|
51
65
|
generation-safe runner whose stale failures cannot release a newer run.
|
|
52
66
|
- Return the runner from convenience startup, so normal cleanup cannot be hidden.
|
|
@@ -49,7 +49,7 @@ Use only the centralized files an environment needs.
|
|
|
49
49
|
- Extract local declarations by kind. “Only used here” and “not exported” are not exemptions.
|
|
50
50
|
- Every declaration in a centralized file is exported. Fold away a trivial single-use declaration or export/test it; never leave it hidden.
|
|
51
51
|
- The only permitted non-exported module-scope declarations are in a runtime entrypoint that must be self-contained and cannot import siblings, such as raw source loaded in a worker. Explain that necessity in a comment.
|
|
52
|
-
-
|
|
52
|
+
- Treat `src/bin/main.ts`, `app/browser/main.ts`, `app/vue/main.ts`, and `app/server/main.ts` as fixed runtime entries. Declare no module-scope constant or function in them; import what they need and run. Apply the preceding self-contained exception only to an entrypoint that cannot import siblings.
|
|
53
53
|
- Perform a cleanup pass after implementation: no stray implementation-file declarations, non-exported/wrong-kind centralized declarations, prohibited nested declarations, duplicate implementations, compatibility aliases, superfluous wrappers, stale imports/barrel rows, or untested extracted functions.
|
|
54
54
|
|
|
55
55
|
## Kind purity
|
|
@@ -166,7 +166,7 @@ A wrapper survives only when it adds a real boundary, invariant, composition, tr
|
|
|
166
166
|
|
|
167
167
|
- Never declare or assign a function inside another function or method.
|
|
168
168
|
- This bans local `function`, `function*`, and `const fn = () => ...`, regardless of caller count.
|
|
169
|
-
-
|
|
169
|
+
- Admit a named or anonymous function expression passed as a call or constructor argument, returned as a result, or used as an arrow body, through parentheses, non-computed object-literal property values, and array elements. Admit methods, getters, and setters of such an object literal. Refuse a climb out of a method or accessor body, or through a spread, computed key, class field, assignment, or local binding.
|
|
170
170
|
- Instance-bound work that reaches state or sibling methods is a method, not a free function.
|
|
171
171
|
|
|
172
172
|
Separate these roles:
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
paths:
|
|
3
3
|
- 'src/browser/**/*.ts'
|
|
4
|
+
- 'src/vue/**/*.ts'
|
|
4
5
|
- 'app/browser/**/*.{ts,vue}'
|
|
6
|
+
- 'app/vue/**/*.{ts,vue}'
|
|
5
7
|
- 'tests/{src,app}/browser/**/*'
|
|
8
|
+
- 'tests/{src,app}/vue/**/*'
|
|
6
9
|
- 'tests/setupBrowser.ts'
|
|
7
10
|
---
|
|
8
11
|
|
|
9
12
|
# Vue and browser rules
|
|
10
13
|
|
|
14
|
+
- Publish only TypeScript composables and contracts from `src/vue`; put Vue single-file components
|
|
15
|
+
in `app/vue`. Keep `.vue` files and `vue` imports out of `src/browser` and `app/browser`.
|
|
16
|
+
Apply `AGENTS.md` § Project model to imports from each Vue face.
|
|
17
|
+
- Declare `vue` in the manifest as an optional peer only for the `./vue` export. Until that
|
|
18
|
+
declaration exists, the `./vue` build refuses `vue`, `vue/*`, and `@vue/*`; after it, the build
|
|
19
|
+
externalizes `vue` and its subpaths and still refuses `@vue/*`.
|
|
11
20
|
- Never use Vue `$emit`.
|
|
12
21
|
- Coordinate reactivity through props, controllers, stores, services, and composables.
|
|
13
22
|
- A composable exposes readonly refs plus methods; consumers never mutate returned refs directly:
|
|
@@ -23,7 +23,8 @@ Documentation is an enforced contract, not explanatory decoration. The Writing r
|
|
|
23
23
|
- `AGENTS.md` and its linked rules are the sole convention source. Do not create competing instruction copies in guides.
|
|
24
24
|
- `guides/README.md` is the map: maintain both a concept index and a directory index. The concept index runs `spec ↔ source ↔ tests ↔ showcase` minus every column whose subject this workspace lacks, so an app-only workspace that publishes no library and builds no showcase still owes a full index over the columns it has.
|
|
25
25
|
- Where the repository keeps one, `ROADMAP.md` is the sequenced plan of record. Each chunk reaches green before the next.
|
|
26
|
-
-
|
|
26
|
+
- Demonstrate public API in application source, prove its journeys there, and rebuild the selected showcase pages for publication.
|
|
27
|
+
- Name each `showcase/<application>.html` page that demonstrates the row in the concept index's showcase column; name `browser.html` for the base modes.
|
|
27
28
|
- An integration surface's guide documents the validated hookup for each supported client: the exact commands run, the authentication and approval model that client needs, and the honest limit wherever a client cannot reach part of the surface.
|
|
28
29
|
|
|
29
30
|
## Parity
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
paths:
|
|
3
3
|
- '**/*.{scss,css}'
|
|
4
4
|
- 'src/styles/**/*'
|
|
5
|
+
- 'src/*/sheet.ts'
|
|
5
6
|
- 'tests/setupStyles.ts'
|
|
7
|
+
- 'tests/setupStyles.test.ts'
|
|
6
8
|
- 'tests/setupBrowser.ts'
|
|
7
9
|
---
|
|
8
10
|
|
|
@@ -12,19 +14,24 @@ SCSS mirrors TypeScript centralization. Concrete token prefixes are project-spec
|
|
|
12
14
|
|
|
13
15
|
## Centralized files
|
|
14
16
|
|
|
15
|
-
| File
|
|
16
|
-
|
|
|
17
|
-
| `_mixins.scss`
|
|
18
|
-
| `_tokens.scss`
|
|
19
|
-
| `_theme.scss`
|
|
20
|
-
| `
|
|
17
|
+
| File | Sole responsibility |
|
|
18
|
+
| ------------------- | ------------------------------------------------------------- |
|
|
19
|
+
| `_mixins.scss` | `@function` values and `@mixin` declaration emitters |
|
|
20
|
+
| `_tokens.scss` | `:root` public custom-property tokens and cascade-layer order |
|
|
21
|
+
| `_theme.scss` | Token overrides under theme selectors |
|
|
22
|
+
| `_reset.scss` | The face's reset declarations, when that face owns a reset |
|
|
23
|
+
| `themes/index.scss` | Barrel of named theme packs, compiled into its own sheet |
|
|
24
|
+
| `index.scss` | Sole compilation barrel |
|
|
21
25
|
|
|
26
|
+
- Apply this table and the folder barrels in § Folders to every sheet face: `src/styles` and each
|
|
27
|
+
`src/<name>` styles extension. `.claude/rules/workspace.md` § Environments fixes the `sheet.ts`
|
|
28
|
+
entry.
|
|
22
29
|
- `_mixins.scss` emits no top-level CSS.
|
|
23
30
|
- Consumers load it with `@use '../mixins' as *`.
|
|
24
31
|
- Never load `mixins` from `index.scss`.
|
|
25
|
-
- `index.scss` is the sole compilation barrel; it loads `tokens`, `theme
|
|
32
|
+
- `index.scss` is the sole compilation barrel of its sheet; it loads `tokens`, `theme` where `_theme.scss` exists, and the output partials with `@use`. Never load `themes/` from `index.scss`.
|
|
26
33
|
- `_tokens.scss` is the token source of truth. Adding a token is allowed; rename/removal is breaking.
|
|
27
|
-
- `_theme.scss` only
|
|
34
|
+
- `_theme.scss` and each `themes/` pack only retune tokens under theme selectors such as `[data-theme='…']`.
|
|
28
35
|
- Component partials never override global tokens.
|
|
29
36
|
|
|
30
37
|
## Sass mechanisms
|
|
@@ -39,8 +46,11 @@ SCSS mirrors TypeScript centralization. Concrete token prefixes are project-spec
|
|
|
39
46
|
- Check `_tokens.scss` before inventing a token.
|
|
40
47
|
- Put global tokens in `_tokens.scss`; put truly component-scoped custom properties on the component selector.
|
|
41
48
|
- Never bury tokens in unrelated partials.
|
|
42
|
-
- Never use literal colors. Use `var(--token)` or `color-mix()` over
|
|
43
|
-
literal color may appear in is `_tokens.scss`, where the token itself is
|
|
49
|
+
- Never use literal colors outside a pinned recreation. Use `var(--token)` or `color-mix()` over
|
|
50
|
+
tokens. The one file a literal color may appear in is `_tokens.scss`, where the token itself is
|
|
51
|
+
declared. A face whose contract is the exact recreation of a pinned external artifact keeps
|
|
52
|
+
the literals, declarations, and order the pin declares, and records tokenization and
|
|
53
|
+
accessibility additions in its separate authored face.
|
|
44
54
|
- Never repeat per-color/per-variant blocks; drive shared structure with one `@each` over a shared list.
|
|
45
55
|
- If a pattern appears in at least two partials, move it to `_mixins.scss`.
|
|
46
56
|
- Treat a declaration block two partials share because each records an external value as a
|
|
@@ -50,8 +60,21 @@ SCSS mirrors TypeScript centralization. Concrete token prefixes are project-spec
|
|
|
50
60
|
- Never `@extend` across partials; share through tokens/mixins.
|
|
51
61
|
- Never declare a `transition:` without `prefers-reduced-motion: reduce`. Use the project transition mixin, which emits both.
|
|
52
62
|
- Animations include `@include reduced-motion { animation: none }`.
|
|
53
|
-
- Never wrap rules in a foreign cascade layer. Each partial uses its folder's own layer.
|
|
54
|
-
|
|
63
|
+
- Never wrap rules in a foreign cascade layer. Each partial uses its folder's own layer. A sheet
|
|
64
|
+
that recreates an external framework instead writes every normal declaration into one layer named
|
|
65
|
+
for that framework and every `!important` declaration outside every layer.
|
|
66
|
+
- Declare cascade-layer order once in the consumer entry before `@import 'tailwindcss'`, so utilities win predictably. When a package publishes several sheets, open every published sheet with the same full order statement, so the order holds whichever sheet loads first.
|
|
67
|
+
- Open `themes/index.scss` with `@use '../tokens'`, whose first emitted rule is the order statement, then `@use 'default'`; Sass refuses a `@use` after another rule, so never write the statement there literally.
|
|
68
|
+
|
|
69
|
+
## Folders
|
|
70
|
+
|
|
71
|
+
- Give each folder an `_index.scss` barrel that loads its partials with `@use`; keep the barrel when the folder is empty.
|
|
72
|
+
- Put a rule that styles one element in `elements/`, a class skin that applies with no script running in `components/`, and a class that sets one property in `utilities/`.
|
|
73
|
+
- Add another folder only for a job `elements/`, `components/`, and `utilities/` do not hold, and give it its own barrel and its own layer.
|
|
74
|
+
|
|
75
|
+
## Proofs
|
|
76
|
+
|
|
77
|
+
- Declare every CSSOM instrument a sheet proof reads in `tests/setupStyles.ts`, never in a test file. `tests/setupStyles.test.ts` proves each instrument under the root setup mirror in `.claude/rules/tests.md`.
|
|
55
78
|
|
|
56
79
|
## Naming
|
|
57
80
|
|
|
@@ -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
|
|