@orkestrel/scaffold 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +84 -99
  2. package/dist/bin/main.js +1094 -0
  3. package/dist/bin/main.js.map +1 -0
  4. package/dist/host/CLAUDE.md +3 -1
  5. package/dist/host/agents/orchestration.md +61 -4
  6. package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +1 -1
  7. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +7 -5
  8. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +1 -1
  9. package/dist/host/agents/skills/orkestrel-harden-package/references/contract.md +1 -1
  10. package/dist/host/claude/agents/orkestrel.md +4 -4
  11. package/dist/host/claude/rules/architecture.md +45 -3
  12. package/dist/host/claude/rules/quality.md +4 -0
  13. package/dist/host/claude/rules/tests.md +57 -1
  14. package/dist/host/claude/rules/workspace.md +50 -17
  15. package/dist/host/codex/agents/orkestrel.toml +1 -1
  16. package/dist/host/configs/helpers.ts +762 -0
  17. package/dist/host/dotfiles/oxlintrc.json +2 -1
  18. package/dist/host/guides/scaffold.md +862 -0
  19. package/dist/host/manifest.json +40 -33
  20. package/dist/host/tests/config.test.ts +544 -0
  21. package/dist/host/tests/policy.test.ts +46 -0
  22. package/dist/host/tests/setupPolicy.ts +529 -701
  23. package/dist/src/core/index.cjs +3568 -10576
  24. package/dist/src/core/index.cjs.map +1 -1
  25. package/dist/src/core/index.d.cts +2361 -2800
  26. package/dist/src/core/index.d.ts +2361 -2800
  27. package/dist/src/core/index.js +3512 -10440
  28. package/dist/src/core/index.js.map +1 -1
  29. package/dist/src/server/index.cjs +2855 -3765
  30. package/dist/src/server/index.cjs.map +1 -1
  31. package/dist/src/server/index.d.cts +1915 -1330
  32. package/dist/src/server/index.d.ts +1915 -1330
  33. package/dist/src/server/index.js +2812 -3680
  34. package/dist/src/server/index.js.map +1 -1
  35. package/package.json +16 -23
  36. package/dist/bin/scaffold.js +0 -1896
  37. package/dist/bin/scaffold.js.map +0 -1
  38. package/dist/host/guides/src/scaffold.md +0 -2922
  39. /package/dist/host/guides/{src/guide.md → guide.md} +0 -0
@@ -16,23 +16,28 @@ 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 SCSS bundle producing `index.css` |
25
- | `src/bin/` | Optional executable entry; never a public barrel |
26
- | `app/core/` | Shared application logic with an `index.ts` barrel |
27
- | `app/browser/` | Browser app; `main.ts` entry, not a barrel |
28
- | `app/server/` | Node server app; `main.ts` entry |
29
- | `tests/` | Mirrors src/app environments |
30
- | `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 SCSS bundle producing `index.css` |
25
+ | `src/bin/` | Optional executable; `main.ts` entry, never a public barrel |
26
+ | `app/core/` | Shared application logic with an `index.ts` barrel |
27
+ | `app/browser/` | Browser app; `main.ts` entry, not a barrel |
28
+ | `app/server/` | Node server app; `main.ts` entry |
29
+ | `tests/` | Mirrors src/app environments; root holds cross-cutting proofs |
30
+ | `configs/` | Thin target wrappers around root configs |
31
31
 
32
32
  - Dependency direction is the root project model in `AGENTS.md` and is not restated here; this file governs where the environments live and how they are configured.
33
33
  - Typical browser-app domains: `components/`, `pages/`, `composables/`, `controllers/`, `services/`, `stores/`.
34
34
  - Typical server-app domains: `handlers.ts`, `middlewares.ts`, `routes.ts`.
35
35
  - `src/styles/index.ts` is a side-effect entry importing `./index.scss`.
36
+ - `src/bin/main.ts` is the executable entry, built to `dist/bin/main.js`. The name is fixed, as it
37
+ is for `app/browser/main.ts` and `app/server/main.ts`, so every runtime entry in a workspace is
38
+ found at the same name.
39
+ - `package.json`'s `bin` key is the installed command name. The entry path is the value and does
40
+ not carry that name.
36
41
 
37
42
  ## Aliases
38
43
 
@@ -55,6 +60,9 @@ Define aliases in `tsconfig.json` first. `vite.config.ts` derives from `compiler
55
60
  - `*/types.ts`: public API contracts.
56
61
  - `configs/src/` and `configs/app/`: thin per-target wrappers, including optional
57
62
  `configs/src/*bin*` files. Shared logic remains in root configs.
63
+ - `configs/helpers.ts`: the one permitted leaf under `configs/`. It imports nothing from the
64
+ workspace, which is what keeps it a leaf. Each `configs/src/*.config.ts` imports the root config
65
+ rather than the leaf, so shared build logic stays in one place.
58
66
 
59
67
  Environment rules:
60
68
 
@@ -71,7 +79,7 @@ Environment rules:
71
79
  | `dist/src/browser` | Browser library + declarations | ES |
72
80
  | `dist/src/server` | Server library + declarations | ES and CJS |
73
81
  | `dist/src/styles` | Compiled `index.css` | ES wrapper |
74
- | `dist/bin` | Optional executable | ES with shebang |
82
+ | `dist/bin` | Optional executable `main.js` | ES with shebang |
75
83
  | `dist/app/browser` | Browser application | target-defined |
76
84
  | `dist/app/server` | Server application | CJS |
77
85
  | `dist/showcase` | Single-file `index.html` demo | self-contained |
@@ -85,7 +93,8 @@ Environment rules:
85
93
 
86
94
  ## Test project matrix
87
95
 
88
- `vite.config.ts` defines one Vitest project per src/app axis × environment:
96
+ `vite.config.ts` defines Vitest projects on two axes. The first is one project per src/app axis ×
97
+ environment:
89
98
 
90
99
  | Project | Files | Environment | Setup |
91
100
  | ------------- | ---------------------- | ------------------- | ----------------------------------------------- |
@@ -98,13 +107,37 @@ Environment rules:
98
107
  | `app:browser` | `tests/app/browser/**` | Playwright Chromium | `setup.ts`, `setupBrowser.ts` |
99
108
  | `app:server` | `tests/app/server/**` | Node | `setup.ts`, `setupServer.ts` |
100
109
 
110
+ The second axis is cross-cutting workspace proofs. Each one covers the whole workspace rather than
111
+ one environment, so each is its own project:
112
+
113
+ | Project | Files | Proves | In `test` |
114
+ | ------------- | --------------------------- | -------------------------------------------------------------- | --------- |
115
+ | `policy` | `tests/policy.test.ts` | Every source file obeys the syntactic coding and placement law | Yes |
116
+ | `config` | `tests/config.test.ts` | Root configuration resolves its aliases, projects, and outputs | Yes |
117
+ | `guides` | `tests/guides.test.ts` | Every documented API exists and every public API is documented | Yes |
118
+ | `integration` | `tests/integration.test.ts` | The built package works when installed and driven from outside | No |
119
+
120
+ One project sits on neither axis. `probe` includes `tmp/probe/**/*.test.ts` so an agent can run a
121
+ throwaway instrument against real sources, aliases and setup. Declare no proof there. Every test
122
+ script names its project, so no gate runs it; its directory is ignored by git; and
123
+ `.claude/rules/tests.md` governs what may live there.
124
+
125
+ - Define a cross-cutting project only for a proof the package actually has.
126
+ - A live-service project is the fifth kind. It is named for the service it drives, and
127
+ `.claude/rules/tests.md` governs it.
128
+ - A project leaves the default run for one of two reasons: it drives a live external service, or it
129
+ is hermetic but slow — it spawns processes, packs, installs, or drives a real build.
130
+ - Every isolated project has its own script, is excluded from `test`, and runs in `prepublishOnly`.
131
+
101
132
  Setup assets:
102
133
 
103
134
  - `tests/setup.css` declares cascade-layer order before `@import 'tailwindcss'` and its `@source`.
104
135
  - Browser setup wires `setup.css`.
105
136
  - Styles setup loads `setup.css` and the compiled cascade.
106
137
 
107
- Scope with `test:src`, `test:src:core`, `test:app`, `test:app:server`, and equivalent scripts.
138
+ Scope with `test:src`, `test:src:core`, `test:app`, `test:app:server`, and equivalent scripts. Each
139
+ cross-cutting project has its own script too: `test:policy`, `test:config`, `test:guides`,
140
+ `test:integration`.
108
141
 
109
142
  ## Typechecking and environment isolation
110
143
 
@@ -156,10 +189,10 @@ Build/check config alignment:
156
189
  | `check:<scope>` | On-demand environment-isolation pass |
157
190
  | `format` | Format all files |
158
191
  | `format:check` | Non-mutating whole-tree format gate |
159
- | `test` | Source/application projects, then guide parity |
192
+ | `test` | Environment projects plus non-isolated cross-cutting proofs |
160
193
  | `clean` | Remove `dist/` |
161
194
  | `copy <from> <to>` | Copy while creating parent directories |
162
- | `prepublishOnly` | `format:check lint:check check build test` |
195
+ | `prepublishOnly` | The gate chain in `AGENTS.md`, then every isolated project |
163
196
 
164
197
  Run `show` only **after** formatting. The committed `demo/showcase.html` is generated/minified; formatting after generation would expand its inlined bundle.
165
198
 
@@ -5,7 +5,7 @@ model_reasoning_effort = "medium"
5
5
  sandbox_mode = "read-only"
6
6
  developer_instructions = """
7
7
  Read AGENTS.md, applicable .claude/rules files, the dispatch-named skill and required
8
- references, guides/src/scaffold.md, the governing package guide, and
8
+ references, guides/scaffold.md, the governing package guide, and
9
9
  .claude/agents/orkestrel.md as the canonical ecosystem catalog and operating
10
10
  reference. Do not edit its generated catalog. Verify versions, ranges, guide parity,
11
11
  branch position, and gate results against manifests, lockfiles, exact installed