@orkestrel/scaffold 0.0.1

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 (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +114 -0
  3. package/dist/bin/scaffold.js +1539 -0
  4. package/dist/bin/scaffold.js.map +1 -0
  5. package/dist/host/AGENTS.md +939 -0
  6. package/dist/host/CLAUDE.md +495 -0
  7. package/dist/host/LICENSE +21 -0
  8. package/dist/host/claude/agents/builder.md +48 -0
  9. package/dist/host/claude/agents/checker.md +37 -0
  10. package/dist/host/claude/agents/composer.md +64 -0
  11. package/dist/host/claude/agents/grok.md +50 -0
  12. package/dist/host/claude/agents/orkestrel.md +236 -0
  13. package/dist/host/claude/agents/planner.md +44 -0
  14. package/dist/host/claude/agents/researcher.md +38 -0
  15. package/dist/host/claude/agents/reviewer.md +47 -0
  16. package/dist/host/claude/agents/scout.md +35 -0
  17. package/dist/host/claude/agents/verifier.md +34 -0
  18. package/dist/host/claude/settings.json +26 -0
  19. package/dist/host/dotfiles/editorconfig +17 -0
  20. package/dist/host/dotfiles/gitattributes +3 -0
  21. package/dist/host/dotfiles/gitignore +40 -0
  22. package/dist/host/dotfiles/oxfmtrc.json +18 -0
  23. package/dist/host/dotfiles/oxlintignore +20 -0
  24. package/dist/host/dotfiles/oxlintrc.json +58 -0
  25. package/dist/host/dotfiles/prettierignore +5 -0
  26. package/dist/host/github/workflows/ci.yml +64 -0
  27. package/dist/host/guides/src/guide.md +312 -0
  28. package/dist/host/guides/src/scaffold.md +2152 -0
  29. package/dist/host/manifest.json +137 -0
  30. package/dist/host/scripts/cursor.sh +74 -0
  31. package/dist/host/scripts/deps.sh +38 -0
  32. package/dist/host/scripts/ollama.sh +163 -0
  33. package/dist/src/core/index.cjs +3728 -0
  34. package/dist/src/core/index.cjs.map +1 -0
  35. package/dist/src/core/index.d.cts +1941 -0
  36. package/dist/src/core/index.d.ts +1941 -0
  37. package/dist/src/core/index.js +3636 -0
  38. package/dist/src/core/index.js.map +1 -0
  39. package/dist/src/server/index.cjs +1595 -0
  40. package/dist/src/server/index.cjs.map +1 -0
  41. package/dist/src/server/index.d.cts +779 -0
  42. package/dist/src/server/index.d.ts +779 -0
  43. package/dist/src/server/index.js +1572 -0
  44. package/dist/src/server/index.js.map +1 -0
  45. package/package.json +113 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Orkestrel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # @orkestrel/scaffold
2
+
3
+ Blueprint-to-plan package scaffolding, auditing, dependency guide/version
4
+ pulling, and fleet-wide shared-file upkeep for the `@orkestrel` line.
5
+
6
+ ## Install
7
+
8
+ ```sh
9
+ npm install -D @orkestrel/scaffold
10
+ ```
11
+
12
+ ## Quickstart
13
+
14
+ ```sh
15
+ # from a checkout (after npm run build)
16
+ node ./dist/bin/scaffold.js new
17
+
18
+ # once installed
19
+ npx scaffold new
20
+ ```
21
+
22
+ Run any verb **bare** on a terminal and it guides you: it prompts for whatever's
23
+ missing, previews what it's about to do, and ASKS before writing anything
24
+ (destructive extras like `--prune` are a second, separate question) — hit
25
+ ctrl-c at any prompt and nothing is written. Prefer scripting instead? Every
26
+ flag from the guided flow works standalone:
27
+
28
+ ```sh
29
+ npx scaffold new mypackage --surfaces core --apply
30
+ ```
31
+
32
+ In scripts and CI, every verb is dry-run by default and fully non-interactive —
33
+ add `--apply` and/or `--yes` to make it write, `--json` for one machine-readable
34
+ value instead of prose. Every write destination resolves under the current
35
+ directory — equal to it or nested beneath — so the CLI is safe to run as a
36
+ global command anywhere; `--from` may point anywhere (read-only).
37
+
38
+ **Windows/PowerShell:** invoke as `node ./dist/bin/scaffold.js …` or `npx scaffold …`
39
+ directly — PowerShell mangles npm's `--` passthrough, so avoid
40
+ `npm run scaffold -- …` there.
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.
45
+
46
+ ## CLI
47
+
48
+ ```sh
49
+ scaffold new [name] [--surfaces <list>] [--deps <list>] [--apply] [--yes] [--json]
50
+ scaffold pull [--apply] [--yes] [--json]
51
+ scaffold audit [--live] [--json]
52
+ scaffold repair [--prune] [--apply] [--yes] [--json]
53
+ scaffold fleet [--apply] [--yes] [--json]
54
+ scaffold catalog [--from <path> ...] [--target <repo>] [--offline] [--apply] [--yes] [--json]
55
+ ```
56
+
57
+ Run bare, every verb above guides you interactively; the flags shown are the
58
+ scripting form. Exit codes: `0` clean/success, `1` drift or failure, `2` usage
59
+ error.
60
+
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
63
+ `@orkestrel/*` runtime dependencies (installed as `dependencies`), resolving an
64
+ absent `@range` to the registry's `latest`; run bare on a terminal, it lands as an
65
+ interactive question. Other npm packages are not a `new`-time flag — hand-add them to
66
+ the generated `package.json`'s `devDependencies` after scaffolding; `audit` derives
67
+ its plan from your `package.json` and stays clean over the addition.
68
+ - **`pull`** — fetches the latest vendored dependency guides and registry versions
69
+ for an existing package and reports drift.
70
+ - **`audit`** — a whole-plan conformance report: diffs a target against the FULL plan
71
+ its own manifest implies (host AND generated artifacts alike) and reports drift as
72
+ data, findings and all; exits nonzero the moment any drift is found, so it gates CI
73
+ cleanly. `--live` additionally checks upstream guide/version freshness — `audit` is the
74
+ ONLY verb that carries `--live`.
75
+ - **`repair`** — restores the shared HOST set only (generated source/tests/configs are
76
+ never touched); re-derives the plan from the audit and re-applies only the drifted
77
+ host artifacts; dry-run by default, `--apply` writes the fixes, `--prune` also removes
78
+ target-only files the plan no longer declares (asked as a separate destructive
79
+ question when run bare).
80
+ - **`fleet`** — audits/repairs the shared, host-owned files (`AGENTS.md`,
81
+ `CLAUDE.md`, `.claude/`, `scripts/`, the shared dotfiles, …) across every
82
+ `@orkestrel` repo that is an IMMEDIATE CHILD of the current directory — no root
83
+ flag; the scope is always your checkouts folder, so `cd` there first (`repair`
84
+ is the single-repo counterpart, run from inside one repo); dry-run by default,
85
+ `--apply` writes.
86
+ - **`catalog`** — regenerates the orkestrel agent's package catalog; the npm
87
+ registry is the AUTHORITATIVE package list by default (unauthenticated —
88
+ every fleet repo is public), each `--from <path>` ADDS local-only discoveries
89
+ on top of it, `--offline` sources the `--from` path(s) only, and the table
90
+ writes into `--target`'s `.claude/agents/orkestrel.md`; dry-run by default,
91
+ `--apply` writes, and a shrink warning prints whenever the new table would
92
+ have fewer rows than the currently-embedded one.
93
+
94
+ ## Library
95
+
96
+ ```ts
97
+ import { blueprint, createCompiler } from '@orkestrel/scaffold'
98
+
99
+ const draft = blueprint({ name: '@orkestrel/example', surfaces: ['core'] })
100
+ const compiler = createCompiler()
101
+ const plan = compiler.compile(draft)
102
+ ```
103
+
104
+ `@orkestrel/scaffold/server` carries the impure surface — `createMaterializer`
105
+ (writes a `Plan` to disk) and `createSync` (the only part of the system that
106
+ touches the network, fetching dependency guides and registry versions).
107
+
108
+ ## Guides
109
+
110
+ For the full surface, see [`guides/src/scaffold.md`](guides/src/scaffold.md).
111
+
112
+ ## License
113
+
114
+ MIT © [Orkestrel](https://github.com/orkestrel) — see [LICENSE](./LICENSE).