@orkestrel/scaffold 0.0.39 → 0.0.41
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 +8 -1
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +2 -2
- package/dist/host/agents/orchestration.md +33 -2
- package/dist/host/agents/skills/enterprise-bootstrap/references/bootstrap-reference.md +16 -16
- package/dist/host/agents/skills/enterprise-bootstrap/references/components.md +3 -3
- package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +1 -1
- package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +7 -2
- package/dist/host/claude/agents/builder.md +2 -2
- package/dist/host/claude/agents/orkestrel.md +48 -48
- package/dist/host/claude/rules/application.md +6 -4
- package/dist/host/claude/rules/architecture.md +2 -0
- package/dist/host/claude/rules/documentation.md +6 -0
- package/dist/host/claude/rules/tests.md +11 -1
- package/dist/host/claude/rules/typescript.md +15 -1
- package/dist/host/claude/rules/workspace.md +43 -13
- package/dist/host/claude/rules/writing.md +125 -0
- package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +10 -1
- package/dist/host/claude/skills/orkestrel-align-packages/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-harden-package/SKILL.md +1 -1
- package/dist/host/configs/policy.ts +185 -0
- package/dist/host/dotfiles/oxlintrc.json +13 -1
- package/dist/host/dotfiles/prettierignore +3 -0
- package/dist/host/guides/scaffold.md +13 -7
- package/dist/host/manifest.json +11 -7
- package/dist/host/tests/config.test.ts +195 -4
- package/dist/host/tests/policy.test.ts +82 -0
- package/dist/host/tests/setupPolicy.ts +863 -21
- package/dist/src/core/index.cjs +68 -6
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +11 -9
- package/dist/src/core/index.d.ts +11 -9
- package/dist/src/core/index.js +68 -6
- package/dist/src/core/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/host/agents/skills/orkestrel-build-application/references/application.md +0 -129
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orkestrel/scaffold",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"description": "Scaffold workspaces with five commands: new, audit, repair, catalog, and overwrite.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"audit",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@microsoft/api-extractor": "^7.58.12",
|
|
100
|
-
"@orkestrel/guide": "^0.0.
|
|
100
|
+
"@orkestrel/guide": "^0.0.12",
|
|
101
101
|
"@orkestrel/html": "^0.0.4",
|
|
102
102
|
"@orkestrel/test": "^0.0.6",
|
|
103
103
|
"@types/node": "^26.2.0",
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Application architecture reference
|
|
2
|
-
|
|
3
|
-
## Environment selection
|
|
4
|
-
|
|
5
|
-
Support application-only, source-only, and mixed workspaces.
|
|
6
|
-
The CLI uses `--src core,browser,server` for published src environments and
|
|
7
|
-
`--app core,browser,server` for private app environments. At least one selector
|
|
8
|
-
is required in non-interactive creation; `--surfaces` is not part of the
|
|
9
|
-
vocabulary.
|
|
10
|
-
|
|
11
|
-
| Selection | Contract |
|
|
12
|
-
| ----------- | ------------------------------------------------------ |
|
|
13
|
-
| app/core | Host-independent contracts and composition |
|
|
14
|
-
| app/browser | Vue browser runtime and real-browser tests |
|
|
15
|
-
| app/server | Node runtime, executable CJS build, and loopback tests |
|
|
16
|
-
|
|
17
|
-
Core-only, browser-only, and server-only are valid. A browser+server pair must
|
|
18
|
-
include app/core so shared transport contracts have one host-independent owner.
|
|
19
|
-
|
|
20
|
-
## Dependency direction
|
|
21
|
-
|
|
22
|
-
- app/core imports no DOM, Node, app/browser, or app/server implementation.
|
|
23
|
-
- app/browser may import app/core and published browser/core packages.
|
|
24
|
-
- app/server may import app/core and published server/core packages.
|
|
25
|
-
- Published src environments never import private app modules. Src core is
|
|
26
|
-
host-independent; src browser/server may import src core and remain
|
|
27
|
-
mutually disjoint.
|
|
28
|
-
- Apply the same direction to cross-package `@orkestrel/<package>/browser` and
|
|
29
|
-
`/server` exports; a package's bare export is its core API.
|
|
30
|
-
- Browser code reaches server behavior through app/core contracts and a
|
|
31
|
-
transport boundary, never by importing app/server.
|
|
32
|
-
- Every environment barrel contains `export *` declarations only. A star-export
|
|
33
|
-
collision is a design failure to be renamed at its owner, never hidden behind
|
|
34
|
-
a selective barrel row.
|
|
35
|
-
- Types, constants, helpers, validators, parsers, and factories live in their
|
|
36
|
-
centralized kind files; an implementation file holds one class plus imports.
|
|
37
|
-
`ApplicationServerRunner` lives alone in `ApplicationServerRunner.ts` and
|
|
38
|
-
`startApplicationServer` in `handlers.ts`, because `factories.ts` admits only
|
|
39
|
-
`create`-prefixed construction; `main.ts` owns no reusable declarations.
|
|
40
|
-
- Enforcement is layered, and each layer owns exactly what it can express:
|
|
41
|
-
- `.oxlintrc.json` `no-restricted-imports` owns **literal-string** declared
|
|
42
|
-
package, alias, and conventional relative imports, in both directions.
|
|
43
|
-
`.oxfmtrc.json` owns formatting. Neither replaces the other, and neither
|
|
44
|
-
replaces typechecking.
|
|
45
|
-
- `tests/setupPolicy.ts` owns what Oxlint cannot represent: computed and
|
|
46
|
-
template-literal import specifiers, declaration placement, and the
|
|
47
|
-
export-star barrel law. It is a deliberately narrow TypeScript-compiler pass
|
|
48
|
-
over the repository's own coding laws — not a general-purpose analyzer, and
|
|
49
|
-
not a second linter.
|
|
50
|
-
- Scoped TypeScript projects remove Node/DOM globals from the wrong
|
|
51
|
-
environment.
|
|
52
|
-
- Vite's real browser/server builds resolve Vue, assets, CSS, workers, and
|
|
53
|
-
runtime module graphs, and its generated environment-boundary plugin checks
|
|
54
|
-
dependency direction and physical workspace containment on the actual graph.
|
|
55
|
-
Vite's parsed HTML asset callbacks reject forced inlining before any direct
|
|
56
|
-
asset read; non-inlined output assets are audited by physical source path.
|
|
57
|
-
- Generated-consumer lint, typecheck, build, and integration tests prove the
|
|
58
|
-
combined configuration.
|
|
59
|
-
- Do not add a second general-purpose parser, source-language analyzer, or
|
|
60
|
-
boundary script that duplicates a layer above. Use the toolchain's own
|
|
61
|
-
facilities instead: Vite's Oxc/Rolldown AST for TypeScript and JavaScript
|
|
62
|
-
asset references, the official Vue SFC compiler for `.vue` blocks, Vite's
|
|
63
|
-
HTML parser callbacks, its bundled Lightning CSS dependency analyzer, and the
|
|
64
|
-
TypeScript compiler API for the narrow coding-law pass.
|
|
65
|
-
- Include `.ts`, `.tsx`, `.mts`, and `.cts` in every scoped TypeScript check.
|
|
66
|
-
Vue SFCs belong only to app/browser. CSS is the generated browser style
|
|
67
|
-
format; SCSS requires an explicitly authorized Sass compiler dependency.
|
|
68
|
-
|
|
69
|
-
## Entries and configuration
|
|
70
|
-
|
|
71
|
-
- Every selected app environment has an `index.ts` barrel.
|
|
72
|
-
- app/browser executes from `main.ts` through `index.html`.
|
|
73
|
-
- app/server centralizes process signals in an explicitly stoppable runner,
|
|
74
|
-
returns that runner from convenience startup so cleanup is never hidden, and
|
|
75
|
-
executes it from a declaration-free `main.ts`; its bundle is
|
|
76
|
-
`dist/app/server/main.cjs`, with only `node:*` external.
|
|
77
|
-
- app/core is check/test-only.
|
|
78
|
-
- Root `tsconfig.json` owns `@app/*` aliases.
|
|
79
|
-
- Root `vite.config.ts` owns shared config and Vitest projects.
|
|
80
|
-
- `configs/app` contains thin target wrappers and scoped tsconfigs.
|
|
81
|
-
- app/browser uses `vue-tsc`; other app environments use `tsc`.
|
|
82
|
-
|
|
83
|
-
## Manifest policy
|
|
84
|
-
|
|
85
|
-
- App-only: unscoped name, `private: true`, no package `main`, `module`,
|
|
86
|
-
`types`, `exports`, or public `publishConfig`.
|
|
87
|
-
- Mixed: normal published source entries; package files include `dist/src` and
|
|
88
|
-
exclude `dist/app`.
|
|
89
|
-
- Add Vue only to development tooling when app/browser is selected; mixed
|
|
90
|
-
publication must not expose an app-only Vue runtime dependency.
|
|
91
|
-
- Add no product-specific dependencies or optional showcase tooling by default.
|
|
92
|
-
|
|
93
|
-
## Boundaries and tests
|
|
94
|
-
|
|
95
|
-
- Default server host is loopback.
|
|
96
|
-
- Parse the options container and host/port leaves before mutation; reject
|
|
97
|
-
wrong-shaped containers, empty hosts, and non-integer, negative, or
|
|
98
|
-
out-of-range ports with a coded error and guard.
|
|
99
|
-
- Lifecycle transitions serialize in call order, ephemeral restarts re-request
|
|
100
|
-
port zero, server stop closes hostile active connections deterministically,
|
|
101
|
-
and runner stop idempotently releases its SIGINT/SIGTERM listeners. Runner
|
|
102
|
-
generations isolate asynchronous failures so an older transition cannot
|
|
103
|
-
release a newer run's listeners.
|
|
104
|
-
- Real child-process tests prove executable readiness, collision exit, signal
|
|
105
|
-
termination, and port release. On Windows, `ChildProcess.kill('SIGTERM')`
|
|
106
|
-
reports OS termination by signal; POSIX delivery exercises the runner's
|
|
107
|
-
graceful signal listener and exits zero.
|
|
108
|
-
- Browser tests use Playwright-backed Vitest Browser Mode and real DOM. A
|
|
109
|
-
browser-capability check probes the installed executable directly with
|
|
110
|
-
`existsSync(chromium.executablePath())`; there is no channel or environment
|
|
111
|
-
guessing.
|
|
112
|
-
- Server tests bind port zero on loopback and use real fetch requests.
|
|
113
|
-
- Capability-dependent tests probe the actual capability and scope any skip.
|
|
114
|
-
- The generated browser application disables the public directory so an
|
|
115
|
-
unmanaged file copy cannot bypass the module graph or its boundary checks.
|
|
116
|
-
- Generated CI runs the gates on the declared minimum Node release and on the
|
|
117
|
-
current major.
|
|
118
|
-
- Guide parity walks existing `src` and/or `app` roots and maps every selected
|
|
119
|
-
`@src/*` / `@app/*` alias.
|
|
120
|
-
|
|
121
|
-
## Cleanup before gates
|
|
122
|
-
|
|
123
|
-
- Source: no stray or misplaced declarations, non-exported centralized
|
|
124
|
-
declarations, nested function declarations, duplicate implementations,
|
|
125
|
-
superfluous wrappers, compatibility aliases, or stale imports and barrel rows.
|
|
126
|
-
- Tests: no unused or duplicated helpers, empty setup files, placeholder suites,
|
|
127
|
-
current-scope `.todo` / `.skip`, or assertions that cannot fail.
|
|
128
|
-
- Text: UTF-8 only; scan generated or migrated edits for replacement characters,
|
|
129
|
-
mojibake, and stray control characters.
|