@orkestrel/scaffold 0.0.2 → 0.0.3

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 (78) hide show
  1. package/README.md +29 -15
  2. package/dist/bin/scaffold.js +1162 -1200
  3. package/dist/bin/scaffold.js.map +1 -1
  4. package/dist/host/AGENTS.md +124 -925
  5. package/dist/host/CLAUDE.md +260 -495
  6. package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +53 -0
  7. package/dist/host/agents/skills/orkestrel-align-packages/agents/openai.yaml +4 -0
  8. package/dist/host/agents/skills/orkestrel-align-packages/references/fleet.md +50 -0
  9. package/dist/host/agents/skills/orkestrel-align-packages/references/integration.md +56 -0
  10. package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +64 -0
  11. package/dist/host/agents/skills/orkestrel-build-application/agents/openai.yaml +4 -0
  12. package/dist/host/agents/skills/orkestrel-build-application/references/application.md +129 -0
  13. package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +64 -0
  14. package/dist/host/agents/skills/orkestrel-harden-package/agents/openai.yaml +4 -0
  15. package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +85 -0
  16. package/dist/host/agents/skills/orkestrel-harden-package/references/contract.md +57 -0
  17. package/dist/host/agents/skills/orkestrel-harden-package/references/hardening.md +93 -0
  18. package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +61 -0
  19. package/dist/host/claude/agents/application.md +32 -0
  20. package/dist/host/claude/agents/builder.md +12 -7
  21. package/dist/host/claude/agents/checker.md +15 -8
  22. package/dist/host/claude/agents/codex.md +40 -0
  23. package/dist/host/claude/agents/grok.md +20 -37
  24. package/dist/host/claude/agents/orkestrel.md +89 -223
  25. package/dist/host/claude/agents/planner.md +14 -34
  26. package/dist/host/claude/agents/reviewer.md +39 -24
  27. package/dist/host/claude/agents/verifier.md +15 -10
  28. package/dist/host/claude/rules/application.md +57 -0
  29. package/dist/host/claude/rules/architecture.md +179 -0
  30. package/dist/host/claude/rules/browser.md +28 -0
  31. package/dist/host/claude/rules/documentation.md +64 -0
  32. package/dist/host/claude/rules/names.md +209 -0
  33. package/dist/host/claude/rules/patterns.md +130 -0
  34. package/dist/host/claude/rules/quality.md +45 -0
  35. package/dist/host/claude/rules/styles.md +64 -0
  36. package/dist/host/claude/rules/tests.md +123 -0
  37. package/dist/host/claude/rules/typescript.md +78 -0
  38. package/dist/host/claude/rules/workspace.md +180 -0
  39. package/dist/host/claude/settings.json +116 -0
  40. package/dist/host/claude/skills/orkestrel-align-packages/SKILL.md +10 -0
  41. package/dist/host/claude/skills/orkestrel-build-application/SKILL.md +12 -0
  42. package/dist/host/claude/skills/orkestrel-harden-package/SKILL.md +10 -0
  43. package/dist/host/codex/agents/analyst.toml +15 -0
  44. package/dist/host/codex/agents/application.toml +25 -0
  45. package/dist/host/codex/agents/builder.toml +24 -0
  46. package/dist/host/codex/agents/checker.toml +15 -0
  47. package/dist/host/codex/agents/grok.toml +17 -0
  48. package/dist/host/codex/agents/implementer.toml +17 -0
  49. package/dist/host/codex/agents/orkestrel.toml +16 -0
  50. package/dist/host/codex/agents/planner.toml +20 -0
  51. package/dist/host/codex/agents/reviewer.toml +18 -0
  52. package/dist/host/codex/agents/verifier.toml +14 -0
  53. package/dist/host/codex/config.toml +64 -0
  54. package/dist/host/dotfiles/oxlintrc.json +307 -1
  55. package/dist/host/guides/src/scaffold.md +2059 -2007
  56. package/dist/host/manifest.json +355 -137
  57. package/dist/host/scripts/codex.sh +49 -0
  58. package/dist/host/scripts/cursor.sh +33 -47
  59. package/dist/host/scripts/deps.sh +34 -16
  60. package/dist/host/scripts/ollama.sh +6 -149
  61. package/dist/host/tests/setupPolicy.ts +354 -0
  62. package/dist/src/core/index.cjs +6600 -1199
  63. package/dist/src/core/index.cjs.map +1 -1
  64. package/dist/src/core/index.d.cts +801 -266
  65. package/dist/src/core/index.d.ts +801 -266
  66. package/dist/src/core/index.js +6518 -1191
  67. package/dist/src/core/index.js.map +1 -1
  68. package/dist/src/server/index.cjs +3132 -593
  69. package/dist/src/server/index.cjs.map +1 -1
  70. package/dist/src/server/index.d.cts +643 -95
  71. package/dist/src/server/index.d.ts +643 -95
  72. package/dist/src/server/index.js +3054 -594
  73. package/dist/src/server/index.js.map +1 -1
  74. package/package.json +15 -12
  75. package/dist/host/claude/agents/composer.md +0 -64
  76. package/dist/host/claude/agents/researcher.md +0 -38
  77. package/dist/host/claude/agents/scout.md +0 -35
  78. package/dist/host/github/workflows/ci.yml +0 -64
package/README.md CHANGED
@@ -26,10 +26,10 @@ ctrl-c at any prompt and nothing is written. Prefer scripting instead? Every
26
26
  flag from the guided flow works standalone:
27
27
 
28
28
  ```sh
29
- npx scaffold new mypackage --surfaces core --apply
29
+ npx scaffold new mypackage --src core --app core,browser,server --apply
30
30
  ```
31
31
 
32
- In scripts and CI, every verb is dry-run by default and fully non-interactive —
32
+ In scripts, every verb is dry-run by default and fully non-interactive —
33
33
  add `--apply` and/or `--yes` to make it write, `--json` for one machine-readable
34
34
  value instead of prose. Every write destination resolves under the current
35
35
  directory — equal to it or nested beneath — so the CLI is safe to run as a
@@ -39,14 +39,14 @@ global command anywhere; `--from` may point anywhere (read-only).
39
39
  directly — PowerShell mangles npm's `--` passthrough, so avoid
40
40
  `npm run scaffold -- …` there.
41
41
 
42
- **TLS:** the CLI trusts the OS certificate store automatically, so `fetch` calls
43
- succeed behind a corporate TLS-inspecting proxy the same way npm and browsers
44
- do; `NODE_EXTRA_CA_CERTS` adds custom PEMs on top.
42
+ **TLS:** when the running Node release exposes system-CA controls, the CLI adds
43
+ the operating-system certificate store. Earlier supported Node 22 releases use
44
+ Node's default roots. `NODE_EXTRA_CA_CERTS` adds custom PEMs in either case.
45
45
 
46
46
  ## CLI
47
47
 
48
48
  ```sh
49
- scaffold new [name] [--surfaces <list>] [--deps <list>] [--apply] [--yes] [--json]
49
+ scaffold new [name] [--src <list>] [--app <list>] [--deps <list>] [--apply] [--yes] [--json]
50
50
  scaffold pull [--apply] [--yes] [--json]
51
51
  scaffold audit [--live] [--json]
52
52
  scaffold repair [--prune] [--apply] [--yes] [--json]
@@ -59,7 +59,10 @@ scripting form. Exit codes: `0` clean/success, `1` drift or failure, `2` usage
59
59
  error.
60
60
 
61
61
  - **`new [name]`** — drafts a `Blueprint` and compiles it into a `Plan`; dry-run by
62
- default (prints a review), `--apply` writes the package to disk. `--deps` names
62
+ default (prints a review), `--apply` writes the workspace to disk. `--src`
63
+ selects published source environments and `--app` independently selects private application
64
+ environments; at least one is required. App-only workspaces are unscoped and `"private": true`,
65
+ while mixed workspaces retain the published `@orkestrel/*` package boundary. `--deps` names
63
66
  `@orkestrel/*` runtime dependencies (installed as `dependencies`), resolving an
64
67
  absent `@range` to the registry's `latest`; run bare on a terminal, it lands as an
65
68
  interactive question. Other npm packages are not a `new`-time flag — hand-add them to
@@ -68,9 +71,9 @@ error.
68
71
  - **`pull`** — fetches the latest vendored dependency guides and registry versions
69
72
  for an existing package and reports drift.
70
73
  - **`audit`** — a conformance report over the artifacts the plan actually gates: the
71
- shared host-origin files (presence, or content once hydrated) AND the generated
72
- configs/manifest (content); reports drift as data, findings and all; exits nonzero
73
- the moment any drift is found, so it gates CI cleanly. Starter files — source/test
74
+ shared host-origin files (presence, or exact bytes once hydrated) AND the generated
75
+ configs/manifest (exact UTF-8 bytes); reports drift as data, findings and all; exits nonzero
76
+ the moment any drift is found. Starter files — source/test
74
77
  stubs, starter guides, README — are written once at scaffold time and are
75
78
  legitimately outgrown, so they are birth-only and never audited; the build and
76
79
  parity gates police their substance instead. `--live` additionally checks upstream
@@ -81,7 +84,7 @@ error.
81
84
  target-only files the plan no longer declares (asked as a separate destructive
82
85
  question when run bare).
83
86
  - **`fleet`** — audits/repairs the shared, host-owned files (`AGENTS.md`,
84
- `CLAUDE.md`, `.claude/`, `scripts/`, the shared dotfiles, …) across every
87
+ `CLAUDE.md`, `.agents/` skills, `.claude/`, `.codex/`, `scripts/`, the shared dotfiles, …) across every
85
88
  `@orkestrel` repo that is an IMMEDIATE CHILD of the current directory — no root
86
89
  flag; the scope is always your checkouts folder, so `cd` there first (`repair`
87
90
  is the single-repo counterpart, run from inside one repo); dry-run by default,
@@ -99,18 +102,29 @@ error.
99
102
  ```ts
100
103
  import { blueprint, createCompiler } from '@orkestrel/scaffold'
101
104
 
102
- const draft = blueprint({ name: '@orkestrel/example', surfaces: ['core'] })
105
+ const draft = blueprint('example', {
106
+ src: ['core'],
107
+ app: ['core', 'browser', 'server'],
108
+ })
103
109
  const compiler = createCompiler()
104
- const plan = compiler.compile(draft)
110
+ const scaffolding = compiler.compile(draft)
111
+ scaffolding.plan?.artifacts.length
112
+ compiler.destroy()
105
113
  ```
106
114
 
107
- `@orkestrel/scaffold/server` carries the impure surface — `createMaterializer`
115
+ `@orkestrel/scaffold/server` carries the impure API — `createMaterializer`
108
116
  (writes a `Plan` to disk) and `createSync` (the only part of the system that
109
117
  touches the network, fetching dependency guides and registry versions).
110
118
 
119
+ The built host uses an exact `{ entries, roots }` manifest. Staging preflights
120
+ containment and portable file-tree collisions, builds in a temporary sibling,
121
+ and swaps only after completion. Reading validates that every declared storage
122
+ file exists, every staged file is declared, and every destination root is
123
+ complete; a present but corrupt or truncated manifest fails closed.
124
+
111
125
  ## Guides
112
126
 
113
- For the full surface, see [`guides/src/scaffold.md`](guides/src/scaffold.md).
127
+ For the full API, see [`guides/src/scaffold.md`](guides/src/scaffold.md).
114
128
 
115
129
  ## License
116
130