@orkestrel/scaffold 0.0.77 → 0.0.78
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/agents/skills/orkestrel-dispatch/scripts/bench.js +204 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +102 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +95 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +207 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +108 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +114 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +108 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +156 -0
- package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +196 -0
- package/dist/agents/skills/orkestrel-publish/scripts/compare.js +206 -0
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +93 -0
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +458 -0
- package/dist/agents/skills/orkestrel-publish/scripts/window.js +188 -0
- package/dist/agents/skills/orkestrel-scout/scripts/map.js +300 -0
- package/dist/agents/templates/brief.md +55 -0
- package/dist/bin/main.js +4 -2
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +77 -135
- package/dist/host/agents/orchestration.md +147 -998
- package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +2 -2
- package/dist/host/agents/skills/enterprise-bootstrap/references/inspection.md +1 -1
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/SKILL.md +6 -13
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/references/fleet.md +5 -7
- package/dist/host/agents/skills/{orkestrel-build-application → orkestrel-build}/SKILL.md +11 -22
- package/dist/host/agents/skills/{orkestrel-build-application → orkestrel-build}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +8 -16
- package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +3 -3
- package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +13 -13
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +61 -0
- package/dist/host/agents/skills/orkestrel-dispatch/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-dispatch/references/bench.md +25 -0
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +32 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +259 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +110 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +115 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +239 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +124 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +123 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +129 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +157 -0
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +42 -193
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +38 -108
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +35 -134
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/SKILL.md +10 -14
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/hardening.md +3 -4
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +228 -0
- package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/SKILL.md +15 -23
- package/dist/host/agents/skills/orkestrel-journey/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/captures.md +1 -1
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/SKILL.md +25 -33
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/references/capture-harness.md +3 -3
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +33 -20
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +39 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +22 -21
- package/dist/host/agents/skills/orkestrel-publish/references/window.md +27 -14
- package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +220 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +114 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +629 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +242 -0
- package/dist/host/agents/skills/orkestrel-scout/SKILL.md +28 -0
- package/dist/host/agents/skills/orkestrel-scout/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +352 -0
- package/dist/host/agents/templates/brief.md +21 -142
- package/dist/host/agents/transports/claude-cli.md +21 -0
- package/dist/host/agents/transports/codex.md +38 -159
- package/dist/host/agents/transports/cursor.md +16 -65
- package/dist/host/claude/AGENTS.md +38 -0
- package/dist/host/claude/agents/analyst.md +14 -53
- package/dist/host/claude/agents/astra.md +26 -0
- package/dist/host/claude/agents/builder.md +14 -30
- package/dist/host/claude/agents/checker.md +13 -57
- package/dist/host/claude/agents/distiller.md +11 -26
- package/dist/host/claude/agents/grok.md +12 -35
- package/dist/host/claude/agents/opus.md +14 -30
- package/dist/host/claude/agents/planner.md +10 -44
- package/dist/host/claude/agents/researcher.md +11 -30
- package/dist/host/claude/agents/reviewer.md +11 -95
- package/dist/host/claude/agents/scout.md +9 -23
- package/dist/host/claude/agents/verifier.md +15 -33
- package/dist/host/claude/rules/documentation.md +8 -2
- package/dist/host/claude/rules/portability.md +7 -1
- package/dist/host/claude/rules/quality.md +36 -96
- package/dist/host/claude/rules/styles.md +3 -0
- package/dist/host/claude/rules/tests.md +6 -3
- package/dist/host/claude/rules/workspace.md +19 -15
- package/dist/host/claude/rules/writing.md +57 -108
- package/dist/host/claude/settings.json +5 -3
- package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +1 -1
- package/dist/host/claude/skills/{orkestrel-align-packages → orkestrel-align}/SKILL.md +2 -2
- package/dist/host/claude/skills/{orkestrel-build-application → orkestrel-build}/SKILL.md +2 -2
- package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +11 -0
- package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +2 -1
- package/dist/host/claude/skills/{orkestrel-harden-package → orkestrel-harden}/SKILL.md +2 -2
- package/dist/host/claude/skills/{orkestrel-prove-journey → orkestrel-journey}/SKILL.md +2 -2
- package/dist/host/claude/skills/orkestrel-polish/SKILL.md +12 -0
- package/dist/host/claude/skills/orkestrel-scout/SKILL.md +11 -0
- package/dist/host/codex/agents/analyst.toml +14 -31
- package/dist/host/codex/agents/astra.toml +25 -0
- package/dist/host/codex/agents/builder.toml +13 -20
- package/dist/host/codex/agents/checker.toml +13 -27
- package/dist/host/codex/agents/distiller.toml +9 -22
- package/dist/host/codex/agents/grok.toml +11 -30
- package/dist/host/codex/agents/opus.toml +14 -22
- package/dist/host/codex/agents/orkestrel.toml +1 -1
- package/dist/host/codex/agents/planner.toml +11 -28
- package/dist/host/codex/agents/researcher.toml +10 -22
- package/dist/host/codex/agents/reviewer.toml +11 -27
- package/dist/host/codex/agents/scout.toml +11 -17
- package/dist/host/codex/agents/verifier.toml +16 -12
- package/dist/host/codex/config.toml +18 -21
- package/dist/host/cursor/mcp.json +0 -4
- package/dist/host/cursor/rules/orchestration.mdc +12 -20
- package/dist/host/dotfiles/mcp.json +0 -4
- package/dist/host/dotfiles/oxlintrc.json +7 -0
- package/dist/host/guides/probe.md +9 -9
- package/dist/host/guides/scaffold.md +117 -71
- package/dist/host/guides/test.md +1 -1
- package/dist/host/manifest.json +321 -184
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +68 -46
- package/dist/host/tests/policy.test.ts +1 -5
- package/dist/host/tests/setupPolicy.ts +179 -4
- package/dist/src/core/index.cjs +255 -84
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +94 -29
- package/dist/src/core/index.d.ts +94 -29
- package/dist/src/core/index.js +253 -85
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +55 -9
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +29 -4
- package/dist/src/server/index.d.ts +29 -4
- package/dist/src/server/index.js +56 -11
- package/dist/src/server/index.js.map +1 -1
- package/package.json +15 -11
- package/dist/host/CLAUDE.md +0 -61
- package/dist/host/agents/skills/orkestrel-prove-journey/agents/openai.yaml +0 -4
- package/dist/host/agents/transports/claude.md +0 -49
- package/dist/host/claude/agents/application.md +0 -36
- package/dist/host/claude/agents/sol.md +0 -61
- package/dist/host/claude/skills/orkestrel-polish-surface/SKILL.md +0 -12
- package/dist/host/codex/agents/application.toml +0 -25
- package/dist/host/codex/agents/sol.toml +0 -19
- /package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/references/integration.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/centralization.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/contract.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/research.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/decide.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/layer.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/statechart.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/styles.md +0 -0
package/dist/src/core/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { fillTemplate } from "@orkestrel/template";
|
|
|
3
3
|
import { Emitter } from "@orkestrel/emitter";
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@orkestrel/scaffold",
|
|
6
|
-
version: "0.0.
|
|
6
|
+
version: "0.0.78",
|
|
7
7
|
description: "Scaffold workspaces with commands: new, audit, repair, catalog, and overwrite.",
|
|
8
8
|
keywords: [
|
|
9
9
|
"audit",
|
|
@@ -24,6 +24,7 @@ var package_default = {
|
|
|
24
24
|
"dist/src",
|
|
25
25
|
"dist/bin",
|
|
26
26
|
"dist/host",
|
|
27
|
+
"dist/agents",
|
|
27
28
|
"README.md"
|
|
28
29
|
],
|
|
29
30
|
type: "module",
|
|
@@ -59,56 +60,59 @@ var package_default = {
|
|
|
59
60
|
"copy": "node -e \"const fs=require('node:fs'),p=require('node:path'),a=process.argv[1],b=process.argv[2];fs.mkdirSync(p.dirname(b),{recursive:true});fs.cpSync(a,b,{force:true});console.log('Copied: '+a+' to '+b)\"",
|
|
60
61
|
"scaffold": "node ./dist/bin/main.js",
|
|
61
62
|
"lint": "oxlint --config .oxlintrc.json --fix .",
|
|
62
|
-
"check": "tsc --noEmit --project tsconfig.json && npm run check:src",
|
|
63
|
+
"check": "tsc --noEmit --project tsconfig.json && npm run check:src && npm run check:skills",
|
|
63
64
|
"check:src": "npm run check:src:core && npm run check:src:server && npm run check:src:bin",
|
|
64
65
|
"check:src:core": "tsc --noEmit -p configs/src/tsconfig.core.json",
|
|
65
66
|
"check:src:server": "tsc --noEmit -p configs/src/tsconfig.server.json",
|
|
66
67
|
"check:src:bin": "tsc --noEmit -p configs/src/tsconfig.bin.json",
|
|
68
|
+
"check:skills": "tsc --noEmit -p configs/agents/tsconfig.skills.json",
|
|
67
69
|
"format": "oxfmt --config .oxfmtrc.json --write .",
|
|
68
70
|
"format:check": "oxfmt --config .oxfmtrc.json --check .",
|
|
69
71
|
"lint:check": "oxlint --config .oxlintrc.json --deny-warnings .",
|
|
70
|
-
"test": "npm run test:src:core && npm run test:src:server && npm run test:src:bin && npm run test:policy && npm run test:config && npm run test:setup && npm run test:guides",
|
|
72
|
+
"test": "npm run test:src:core && npm run test:src:server && npm run test:src:bin && npm run test:policy && npm run test:config && npm run test:setup && npm run test:skills && npm run test:guides",
|
|
71
73
|
"test:src:core": "vitest run --config vite.config.ts --no-cache --reporter=dot --project src:core",
|
|
72
74
|
"test:src:server": "vitest run --config vite.config.ts --no-cache --reporter=dot --project src:server",
|
|
73
75
|
"test:src:bin": "vitest run --config vite.config.ts --no-cache --reporter=dot --project src:bin",
|
|
74
76
|
"test:policy": "vitest run --config vite.config.ts --no-cache --reporter=dot --project policy",
|
|
75
77
|
"test:config": "vitest run --config vite.config.ts --no-cache --reporter=dot --project config",
|
|
76
78
|
"test:guides": "node --experimental-strip-types tests/guides.test.ts",
|
|
79
|
+
"test:skills": "vitest run --config vite.config.ts --no-cache --reporter=dot --project skills",
|
|
77
80
|
"test:distribution": "vitest run --config vite.config.ts --no-cache --reporter=dot --project distribution",
|
|
78
81
|
"test:probe": "vitest run --config vite.config.ts --no-cache --reporter=verbose --project probe",
|
|
79
82
|
"test:bench": "vitest bench --config vite.config.ts --no-cache --project probe",
|
|
80
83
|
"test:setup": "vitest run --config vite.config.ts --no-cache --reporter=dot --project setup",
|
|
81
|
-
"build": "npm run clean && npm run build:src && npm run build:host && npm run build:inventory",
|
|
84
|
+
"build": "npm run clean && npm run build:src && npm run build:host && npm run build:skills && npm run build:inventory",
|
|
82
85
|
"build:src": "npm run build:src:core && npm run build:src:server && npm run build:src:bin",
|
|
83
86
|
"build:src:core": "vite build --config configs/src/vite.core.config.ts && npm run copy dist/src/core/index.d.ts dist/src/core/index.d.cts",
|
|
84
87
|
"build:src:server": "vite build --config configs/src/vite.server.config.ts && npm run copy dist/src/server/index.d.ts dist/src/server/index.d.cts",
|
|
85
88
|
"build:src:bin": "vite build --config configs/src/vite.bin.config.ts",
|
|
86
89
|
"build:host": "node -e \"import('./dist/src/server/index.js').then((m)=>{const n=m.stageHost(process.cwd(),'dist/host',{report: (message) => console.error(message)}).length;console.log('build-host: staged '+n+' file(s) into dist/host')})\"",
|
|
87
90
|
"build:inventory": "node -e \"import('./dist/src/server/index.js').then((m)=>{const p=process.argv[1]??'host.json',n=m.stageInventory(process.cwd(),p).entries.length;console.log('build-inventory: staged '+n+' file(s) into '+p)})\"",
|
|
91
|
+
"build:skills": "tsc -p configs/agents/tsconfig.skills.json --noEmit false --allowImportingTsExtensions false --rewriteRelativeImportExtensions --declaration false --sourceMap false --rootDir .agents/skills --outDir dist/agents/skills && npm run copy .agents/templates/brief.md dist/agents/templates/brief.md",
|
|
88
92
|
"prepack": "npm run build",
|
|
89
93
|
"prepublishOnly": "npm run format:check && npm run lint:check && npm run check && npm run build && npm test && npm run test:distribution -- --mode release"
|
|
90
94
|
},
|
|
91
95
|
dependencies: {
|
|
92
96
|
"@orkestrel/console": "^0.0.14",
|
|
93
|
-
"@orkestrel/contract": "^0.0.
|
|
97
|
+
"@orkestrel/contract": "^0.0.18",
|
|
94
98
|
"@orkestrel/emitter": "^0.0.10",
|
|
95
99
|
"@orkestrel/markdown": "^0.0.15",
|
|
96
100
|
"@orkestrel/process": "^0.0.13",
|
|
97
101
|
"@orkestrel/template": "^0.0.8"
|
|
98
102
|
},
|
|
99
103
|
devDependencies: {
|
|
100
|
-
"@microsoft/api-extractor": "^7.59.
|
|
104
|
+
"@microsoft/api-extractor": "^7.59.3",
|
|
101
105
|
"@orkestrel/guide": "^0.0.20",
|
|
102
106
|
"@orkestrel/html": "^0.0.10",
|
|
103
107
|
"@orkestrel/probe": "^0.0.16",
|
|
104
|
-
"@orkestrel/test": "^0.0.
|
|
105
|
-
"@types/node": "^26.
|
|
108
|
+
"@orkestrel/test": "^0.0.24",
|
|
109
|
+
"@types/node": "^26.6.3",
|
|
106
110
|
"@vitest/browser-playwright": "^4.1.11",
|
|
107
|
-
"oxfmt": "^0.
|
|
108
|
-
"oxlint": "^1.
|
|
111
|
+
"oxfmt": "^0.71.0",
|
|
112
|
+
"oxlint": "^1.86.0",
|
|
109
113
|
"playwright": "^1.63.0",
|
|
110
114
|
"typescript": "^6.0.3",
|
|
111
|
-
"vite": "^8.3.
|
|
115
|
+
"vite": "^8.3.1",
|
|
112
116
|
"vitest": "^4.1.11"
|
|
113
117
|
},
|
|
114
118
|
engines: { "node": ">=22.18.0" }
|
|
@@ -256,8 +260,8 @@ var HOST_PATHS = Object.freeze([
|
|
|
256
260
|
* Staging walks these beside {@link HOST_PATHS}, so a release ships them and a
|
|
257
261
|
* reader reaches them two ways: a scaffold checkout sitting beside the
|
|
258
262
|
* repository, or the `node_modules/@orkestrel/scaffold/dist/host/` root inside
|
|
259
|
-
* the installed package. The `AGENTS.md`
|
|
260
|
-
*
|
|
263
|
+
* the installed package. The `AGENTS.md` pointer scaffold plans is what names
|
|
264
|
+
* each location.
|
|
261
265
|
*
|
|
262
266
|
* This list, {@link HOST_PATHS}, and {@link REFERENCE_PATHS} are disjoint by
|
|
263
267
|
* prefix in every direction: no member equals or sits beneath another list's
|
|
@@ -266,18 +270,22 @@ var HOST_PATHS = Object.freeze([
|
|
|
266
270
|
* name twice, which refuses the stage.
|
|
267
271
|
*
|
|
268
272
|
* The plan claims paths inside the canon deliberately, and each has a reason.
|
|
269
|
-
* `blueprintToDocumentArtifacts` claims `AGENTS.md`
|
|
270
|
-
*
|
|
273
|
+
* `blueprintToDocumentArtifacts` claims `AGENTS.md` as this package's own
|
|
274
|
+
* template pointer. `blueprintToHostArtifacts` claims
|
|
271
275
|
* {@link CATALOG_AGENT_PATH}, because the catalog verb refuses a target that
|
|
272
276
|
* lacks the file and repair restores its absence.
|
|
273
277
|
*
|
|
274
278
|
* A target therefore holds a file at a canon path only where the plan claims it.
|
|
275
279
|
* That is the rule every verb obeys, and it is what makes a copy found anywhere
|
|
276
|
-
* else superseded.
|
|
280
|
+
* else superseded. A member this checkout no longer holds, `CLAUDE.md` since
|
|
281
|
+
* Claude Code began reading `AGENTS.md` directly, stays listed for exactly that
|
|
282
|
+
* reason: the stager ships nothing for it, `audit` reports a target's copy
|
|
283
|
+
* `foreign`, and `overwrite` deletes it.
|
|
277
284
|
*/
|
|
278
285
|
var CANON_PATHS = Object.freeze([
|
|
279
286
|
"AGENTS.md",
|
|
280
287
|
"CLAUDE.md",
|
|
288
|
+
".claude/AGENTS.md",
|
|
281
289
|
".mcp.json",
|
|
282
290
|
".agents/orchestration.md",
|
|
283
291
|
".agents/skills",
|
|
@@ -399,6 +407,26 @@ var CATALOG_OPENING_MARKER = "<!-- orkestrel:catalog -->";
|
|
|
399
407
|
* refused rather than rewritten.
|
|
400
408
|
*/
|
|
401
409
|
var CATALOG_CLOSING_MARKER = "<!-- /orkestrel:catalog -->";
|
|
410
|
+
/**
|
|
411
|
+
* Lists the package-facing skills a target receives pointers for, frozen and alphabetical.
|
|
412
|
+
*
|
|
413
|
+
* @remarks
|
|
414
|
+
* `blueprintToHostArtifacts` plans, for each name, the Claude bridge, the Codex
|
|
415
|
+
* sidecar, and the derived `SKILL.md` pointer, so every harness discovers the
|
|
416
|
+
* skill while its body, references, and scripts stay in the installed package.
|
|
417
|
+
* `orkestrel-align`, `orkestrel-dispatch`, `orkestrel-publish`, and
|
|
418
|
+
* `orkestrel-scout` are excluded because they run from the scaffold checkout
|
|
419
|
+
* and a target is not an orchestration host.
|
|
420
|
+
*/
|
|
421
|
+
var TARGET_SKILL_NAMES = Object.freeze([
|
|
422
|
+
"enterprise-bootstrap",
|
|
423
|
+
"orkestrel-build",
|
|
424
|
+
"orkestrel-debrief",
|
|
425
|
+
"orkestrel-falsify",
|
|
426
|
+
"orkestrel-harden",
|
|
427
|
+
"orkestrel-journey",
|
|
428
|
+
"orkestrel-polish"
|
|
429
|
+
]);
|
|
402
430
|
/** Names the inventory skeleton a workspace with declared service vendors is given once. */
|
|
403
431
|
var SERVICE_SCRIPT_PATH = "scripts/service.sh";
|
|
404
432
|
/** Names the shared Vitest global-setup module whose presence makes a workspace `global`. */
|
|
@@ -436,6 +464,8 @@ var SERVICE_TEST_INCLUDE = "tests/service/**/*.test.ts";
|
|
|
436
464
|
var SHOWCASE_CONFIG_PATH = "configs/app/vite.showcase.config.ts";
|
|
437
465
|
/** Names the Vite wrapper whose presence makes a workspace `journey`. */
|
|
438
466
|
var JOURNEY_CONFIG_PATH = "configs/app/vite.journey.config.ts";
|
|
467
|
+
/** Names the TypeScript wrapper whose presence makes a workspace `skills`. */
|
|
468
|
+
var SKILLS_CONFIG_PATH = "configs/agents/tsconfig.skills.json";
|
|
439
469
|
/** Matches the bare workspace name syntax: lowercase alphanumeric with hyphens, letter first. */
|
|
440
470
|
var NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
441
471
|
/**
|
|
@@ -712,7 +742,11 @@ const resolve = {
|
|
|
712
742
|
// override receives that record in the same position. A \`UserConfig\` declares \`mode\`
|
|
713
743
|
// but not \`command\`, and the invocation record always carries both, so a value
|
|
714
744
|
// carrying the pair is that record rather than an override. The merge returns the
|
|
715
|
-
// base
|
|
745
|
+
// base in the record's \`mode\` and carries none of the record's other fields. Vitest
|
|
746
|
+
// runs a project that declares no \`mode\` in its own run mode, \`test\`, rather than in
|
|
747
|
+
// the \`--mode\` value it was invoked with, so a distribution proof run with
|
|
748
|
+
// \`--mode release\` would read \`test\` and skip where it must fail. A record whose
|
|
749
|
+
// \`mode\` is not a string throws. The \`tests/config.test.ts\` file drives every
|
|
716
750
|
// registered factory through it.
|
|
717
751
|
//
|
|
718
752
|
// \`mergeConfig\` concatenates arrays, so an override carrying \`plugins\` would otherwise
|
|
@@ -725,7 +759,13 @@ const resolve = {
|
|
|
725
759
|
// merges it, so an override's arrays elsewhere concatenate with the base's rather than
|
|
726
760
|
// replacing them.
|
|
727
761
|
export function mergeOverride(base: UserConfig, override?: UserConfig): UserConfig {
|
|
728
|
-
if (override === undefined
|
|
762
|
+
if (override === undefined) return base
|
|
763
|
+
if ('command' in override && 'mode' in override) {
|
|
764
|
+
if (typeof override.mode !== 'string') {
|
|
765
|
+
throw new Error('The project invocation carries no string mode')
|
|
766
|
+
}
|
|
767
|
+
return { ...base, mode: override.mode }
|
|
768
|
+
}
|
|
729
769
|
const merged: UserConfig = mergeConfig(base, override)
|
|
730
770
|
if (merged.plugins === undefined) return merged
|
|
731
771
|
const candidates = override.plugins ?? []
|
|
@@ -1134,6 +1174,25 @@ export function appShowcase(override?: UserConfig): UserConfig {
|
|
|
1134
1174
|
}
|
|
1135
1175
|
return mergeOverride(project, override)
|
|
1136
1176
|
}
|
|
1177
|
+
`,
|
|
1178
|
+
skills: `// The skill scripts this package ships as canon, each driven as a child process against a
|
|
1179
|
+
// scratch fixture from its mirrored proof under \`tests/agents/skills/<skill>/scripts/\`. The
|
|
1180
|
+
// \`configs/agents/tsconfig.skills.json\` wrapper selects the project.
|
|
1181
|
+
export function skills(override?: UserConfig): UserConfig {
|
|
1182
|
+
const project: UserConfig = {
|
|
1183
|
+
resolve,
|
|
1184
|
+
test: {
|
|
1185
|
+
name: { label: 'skills', color: 'blue' },
|
|
1186
|
+
include: ['tests/agents/**/*.test.ts'],
|
|
1187
|
+
setupFiles: ['./tests/setup.ts'],
|
|
1188
|
+
environment: 'node',
|
|
1189
|
+
browser: { enabled: false },
|
|
1190
|
+
// Each case spawns node on a script; a census case runs \`vitest list\` over this checkout.
|
|
1191
|
+
testTimeout: 60_000,
|
|
1192
|
+
},
|
|
1193
|
+
}
|
|
1194
|
+
return mergeOverride(project, override)
|
|
1195
|
+
}
|
|
1137
1196
|
`,
|
|
1138
1197
|
conformance: `// Where this package drifts from the official tooling it stays compatible with.
|
|
1139
1198
|
// The subject is this package, so the proof is hermetic and stays in \`npm test\`.
|
|
@@ -1188,7 +1247,7 @@ export function service(override?: UserConfig): UserConfig {
|
|
|
1188
1247
|
}
|
|
1189
1248
|
`,
|
|
1190
1249
|
probe: `// A workbench, not a proof. No gate selects this project. Run in test mode by the
|
|
1191
|
-
// \`test:probe\` script, it collects \`tmp/
|
|
1250
|
+
// \`test:probe\` script, it collects \`tmp/probes/**/*.test.ts\`. Run in benchmark mode by the
|
|
1192
1251
|
// \`test:bench\` script, the same workbench also collects \`tests/**/*.test.ts\` for a \`bench\` block,
|
|
1193
1252
|
// so a suite may carry a bench beside its ordinary tests without a second project. The mode
|
|
1194
1253
|
// guard around each \`bench\` call keeps it out of test mode, so it never executes there.
|
|
@@ -1197,13 +1256,13 @@ export function probe(override?: UserConfig): UserConfig {
|
|
|
1197
1256
|
resolve,
|
|
1198
1257
|
test: {
|
|
1199
1258
|
name: { label: 'probe', color: 'black' },
|
|
1200
|
-
include: ['tmp/
|
|
1259
|
+
include: ['tmp/probes/**/*.test.ts'],
|
|
1201
1260
|
setupFiles: ['./tests/setup.ts'],
|
|
1202
1261
|
environment: 'node',
|
|
1203
1262
|
browser: { enabled: false },
|
|
1204
1263
|
fileParallelism: false,
|
|
1205
1264
|
pool: 'threads',
|
|
1206
|
-
benchmark: { include: ['tmp/
|
|
1265
|
+
benchmark: { include: ['tmp/probes/**/*.test.ts', 'tests/**/*.test.ts'] },
|
|
1207
1266
|
},
|
|
1208
1267
|
}
|
|
1209
1268
|
return mergeOverride(project, override)
|
|
@@ -1344,6 +1403,16 @@ export function probe(override?: UserConfig): UserConfig {
|
|
|
1344
1403
|
"../../src/bin/**/*.tsx"
|
|
1345
1404
|
]
|
|
1346
1405
|
}
|
|
1406
|
+
`,
|
|
1407
|
+
skills: `{
|
|
1408
|
+
"extends": "../../tsconfig.json",
|
|
1409
|
+
"compilerOptions": {
|
|
1410
|
+
"lib": ["ESNext"],
|
|
1411
|
+
"types": ["node"]
|
|
1412
|
+
},
|
|
1413
|
+
"include": ["../../.agents/skills/*/scripts/*.ts"],
|
|
1414
|
+
"exclude": ["../../node_modules"]
|
|
1415
|
+
}
|
|
1347
1416
|
`
|
|
1348
1417
|
}),
|
|
1349
1418
|
vites: Object.freeze({
|
|
@@ -1884,7 +1953,8 @@ const TSC = createRequire(join(ROOT, 'package.json')).resolve('typescript/bin/ts
|
|
|
1884
1953
|
// rather than an exit code a caller can read. Every following argument is a literal or
|
|
1885
1954
|
// a path this file built, so the shell has nothing to escape.
|
|
1886
1955
|
const SHELL = process.platform === 'win32'
|
|
1887
|
-
// \`prepublishOnly\` runs this proof as \`npm run test:distribution -- --mode release
|
|
1956
|
+
// \`prepublishOnly\` runs this proof as \`npm run test:distribution -- --mode release\`,
|
|
1957
|
+
// and the root configuration's project factories carry that mode into this project.
|
|
1888
1958
|
// Release is the publish gate, so evidence it cannot obtain fails there and skips
|
|
1889
1959
|
// everywhere else: a gate that passes on missing evidence proves nothing.
|
|
1890
1960
|
const RELEASE = import.meta.env.MODE === 'release'
|
|
@@ -2957,20 +3027,21 @@ Resolve every one of those paths against scaffold, never against this repository
|
|
|
2957
3027
|
\`node_modules/@orkestrel/scaffold/dist/host/claude/rules/\` directory, and the
|
|
2958
3028
|
\`node_modules/@orkestrel/scaffold/dist/host/agents/skills/\` directory.
|
|
2959
3029
|
|
|
2960
|
-
Every path a scaffold-supplied file names resolves the same way.
|
|
3030
|
+
Every path a scaffold-supplied file names resolves the same way. Run a script such a file names
|
|
3031
|
+
through its built twin: replace \`node .agents/skills/\` with
|
|
3032
|
+
\`node node_modules/@orkestrel/scaffold/dist/agents/skills/\` and the \`.ts\` extension with \`.js\`,
|
|
3033
|
+
because Node runs no \`.ts\` file under \`node_modules\`. The files this repository carries
|
|
2961
3034
|
— the \`.claude/agents/orkestrel.md\` catalog file, the \`.claude/settings.json\` permission file,
|
|
2962
|
-
|
|
3035
|
+
the bench scripts under \`scripts/\`, and the skill pointers under \`.agents/skills/\` and
|
|
3036
|
+
\`.claude/skills/\`, which name the canonical skills and how to run their scripts — are this
|
|
3037
|
+
repository's own copies and resolve here.
|
|
3038
|
+
|
|
3039
|
+
In Claude Code, also read the Claude bridge: \`../scaffold/.claude/AGENTS.md\` beside a checkout, or
|
|
3040
|
+
\`node_modules/@orkestrel/scaffold/dist/host/claude/AGENTS.md\` from the installed copy. Keep no
|
|
3041
|
+
\`CLAUDE.md\` in this repository; one stops Claude Code from reading this file.
|
|
2963
3042
|
|
|
2964
3043
|
Edit none of the scaffold-owned files here. The \`scaffold repair\` command restores them, so a
|
|
2965
3044
|
change to one is a commit in the scaffold repository followed by a release.
|
|
2966
|
-
`,
|
|
2967
|
-
claude: `# CLAUDE.md
|
|
2968
|
-
|
|
2969
|
-
Read the \`AGENTS.md\` file in this repository first. It names the coding and orchestration
|
|
2970
|
-
authority and where to read each contract.
|
|
2971
|
-
|
|
2972
|
-
This file imports nothing. An \`@path\` import inlines the imported file into every context that
|
|
2973
|
-
loads it, which is the cost this pointer removes.
|
|
2974
3045
|
`
|
|
2975
3046
|
}),
|
|
2976
3047
|
guides: Object.freeze({ readme: `# Guides
|
|
@@ -2989,12 +3060,28 @@ loads it, which is the cost this pointer removes.
|
|
|
2989
3060
|
|
|
2990
3061
|
{{directories}}
|
|
2991
3062
|
` }),
|
|
2992
|
-
orchestration: Object.freeze({
|
|
3063
|
+
orchestration: Object.freeze({
|
|
3064
|
+
skill: `
|
|
3065
|
+
# Load the canonical skill
|
|
3066
|
+
|
|
3067
|
+
This file is a pointer the \`@orkestrel/scaffold\` package writes into every fleet workspace; the
|
|
3068
|
+
skill itself ships with that package. Read the canonical \`SKILL.md\` completely and follow it:
|
|
3069
|
+
|
|
3070
|
+
- beside a scaffold checkout, \`../scaffold/.agents/skills/{{name}}/SKILL.md\`;
|
|
3071
|
+
- otherwise, \`node_modules/@orkestrel/scaffold/dist/host/agents/skills/{{name}}/SKILL.md\`.
|
|
3072
|
+
|
|
3073
|
+
Resolve every path the canonical skill names against the same root; under \`node_modules\` each
|
|
3074
|
+
segment drops its opening dot. Run a script the skill names through its built twin, as this
|
|
3075
|
+
repository's \`AGENTS.md\` states. This pointer carries no process of its own; \`AGENTS.md\`, the applicable
|
|
3076
|
+
rules, and the canonical skill remain authoritative in that order.
|
|
3077
|
+
`,
|
|
3078
|
+
service: `#!/usr/bin/env sh
|
|
2993
3079
|
set -eu
|
|
2994
3080
|
|
|
2995
3081
|
printf '%s\\n' \\
|
|
2996
3082
|
{{vendors}}
|
|
2997
|
-
`
|
|
3083
|
+
`
|
|
3084
|
+
})
|
|
2998
3085
|
});
|
|
2999
3086
|
//#endregion
|
|
3000
3087
|
//#region src/core/errors.ts
|
|
@@ -3319,7 +3406,8 @@ var isBlueprint = recordOf({
|
|
|
3319
3406
|
vendors: andOf(isCollection, arrayOf(isString)),
|
|
3320
3407
|
global: isBoolean,
|
|
3321
3408
|
showcase: isBoolean,
|
|
3322
|
-
journey: isBoolean
|
|
3409
|
+
journey: isBoolean,
|
|
3410
|
+
skills: isBoolean
|
|
3323
3411
|
}, ["description"]);
|
|
3324
3412
|
/**
|
|
3325
3413
|
* Narrows a value to an {@link Artifact}.
|
|
@@ -3344,8 +3432,13 @@ var isArtifact = unionOf(recordOf({
|
|
|
3344
3432
|
ownership: literalOf("presence", "birth"),
|
|
3345
3433
|
environment: isEnvironment,
|
|
3346
3434
|
origin: literalOf("host"),
|
|
3347
|
-
source: isPath
|
|
3348
|
-
|
|
3435
|
+
source: isPath,
|
|
3436
|
+
pointer: isBoolean
|
|
3437
|
+
}, [
|
|
3438
|
+
"environment",
|
|
3439
|
+
"source",
|
|
3440
|
+
"pointer"
|
|
3441
|
+
]), recordOf({
|
|
3349
3442
|
path: isPath,
|
|
3350
3443
|
group: isGroup,
|
|
3351
3444
|
ownership: literalOf("content"),
|
|
@@ -3844,10 +3937,11 @@ function isDeferredPath(path) {
|
|
|
3844
3937
|
* boundary, so a sibling whose name opens with a member's name —
|
|
3845
3938
|
* `.claude/rulesets` beside `.claude/rules` — stays outside.
|
|
3846
3939
|
*
|
|
3847
|
-
* Membership answers
|
|
3848
|
-
* it. A plan claims `AGENTS.md
|
|
3849
|
-
*
|
|
3850
|
-
*
|
|
3940
|
+
* Membership answers whether scaffold owns the path, not whether a plan claims
|
|
3941
|
+
* it. A plan claims `AGENTS.md` and {@link CATALOG_AGENT_PATH} at canon paths
|
|
3942
|
+
* deliberately, so a consumer deciding whether to write, restore, or remove a
|
|
3943
|
+
* path reads the plan rather than this predicate. A member the checkout no
|
|
3944
|
+
* longer holds is still canon, so a copy a target keeps reports as foreign.
|
|
3851
3945
|
*
|
|
3852
3946
|
* @example
|
|
3853
3947
|
* ```ts
|
|
@@ -4643,6 +4737,36 @@ function manifestToDependencies(manifest) {
|
|
|
4643
4737
|
peer: limitEntries(peer, MAX_COLLECTION_ITEMS)
|
|
4644
4738
|
};
|
|
4645
4739
|
}
|
|
4740
|
+
/**
|
|
4741
|
+
* Renders the `SKILL.md` pointer a target carries in place of a canonical skill.
|
|
4742
|
+
*
|
|
4743
|
+
* @param canonical - The canonical `SKILL.md` text, which opens with a frontmatter block.
|
|
4744
|
+
* @param name - The skill directory name the pointer body names.
|
|
4745
|
+
* @returns The canonical frontmatter block copied line for line, from its opening `---` line through
|
|
4746
|
+
* its closing `---` line, then the filled `ARTIFACT_TEMPLATES.orchestration.skill` body, with `\n`
|
|
4747
|
+
* line endings; `undefined` when the canonical text does not open with a complete frontmatter block.
|
|
4748
|
+
*
|
|
4749
|
+
* @remarks
|
|
4750
|
+
* The frontmatter is copied rather than rewritten, so every harness that
|
|
4751
|
+
* discovers the pointer reads the canonical `name` and `description` and
|
|
4752
|
+
* triggers the skill exactly as the canonical file would. A CRLF canonical
|
|
4753
|
+
* text yields the same pointer as its LF form.
|
|
4754
|
+
*
|
|
4755
|
+
* @example
|
|
4756
|
+
* ```ts
|
|
4757
|
+
* import { renderSkillPointer } from '@orkestrel/scaffold'
|
|
4758
|
+
*
|
|
4759
|
+
* renderSkillPointer('---\nname: orkestrel-harden\ndescription: Hardens a package.\n---\n\n# Harden\n', 'orkestrel-harden')?.startsWith('---\nname: orkestrel-harden\ndescription: Hardens a package.\n---\n\n# Load the canonical skill\n') // true
|
|
4760
|
+
* renderSkillPointer('# Harden\n', 'orkestrel-harden') // undefined
|
|
4761
|
+
* ```
|
|
4762
|
+
*/
|
|
4763
|
+
function renderSkillPointer(canonical, name) {
|
|
4764
|
+
const lines = canonical.split(/\r\n|\n/u);
|
|
4765
|
+
if (lines[0] !== "---") return void 0;
|
|
4766
|
+
const closing = lines.indexOf("---", 1);
|
|
4767
|
+
if (closing === -1) return void 0;
|
|
4768
|
+
return `${lines.slice(0, closing + 1).join("\n")}\n${fillTemplate(ARTIFACT_TEMPLATES.orchestration.skill, { name })}`;
|
|
4769
|
+
}
|
|
4646
4770
|
//#endregion
|
|
4647
4771
|
//#region src/core/compilers.ts
|
|
4648
4772
|
/**
|
|
@@ -4859,7 +4983,8 @@ function blueprintToScripts(blueprint) {
|
|
|
4859
4983
|
check: [
|
|
4860
4984
|
"tsc --noEmit --project tsconfig.json",
|
|
4861
4985
|
...compiles ? ["npm run check:src"] : [],
|
|
4862
|
-
...blueprint.app.length > 0 ? ["npm run check:app"] : []
|
|
4986
|
+
...blueprint.app.length > 0 ? ["npm run check:app"] : [],
|
|
4987
|
+
...blueprint.skills ? ["npm run check:skills"] : []
|
|
4863
4988
|
].join(" && ")
|
|
4864
4989
|
};
|
|
4865
4990
|
if (compiles) {
|
|
@@ -4871,6 +4996,7 @@ function blueprintToScripts(blueprint) {
|
|
|
4871
4996
|
scripts["check:app"] = blueprint.app.map((environment) => `npm run check:app:${environment}`).join(" && ");
|
|
4872
4997
|
for (const environment of blueprint.app) scripts[`check:app:${environment}`] = environment === "browser" ? "vue-tsc --noEmit -p configs/app/tsconfig.browser.json" : `tsc --noEmit -p configs/app/tsconfig.${environment}.json`;
|
|
4873
4998
|
}
|
|
4999
|
+
if (blueprint.skills) scripts["check:skills"] = `tsc --noEmit -p ${SKILLS_CONFIG_PATH}`;
|
|
4874
5000
|
scripts.test = [
|
|
4875
5001
|
...compiles ? ["npm run test:src"] : [],
|
|
4876
5002
|
...blueprint.app.length > 0 ? ["npm run test:app"] : [],
|
|
@@ -4879,6 +5005,7 @@ function blueprintToScripts(blueprint) {
|
|
|
4879
5005
|
"npm run test:config",
|
|
4880
5006
|
...blueprint.setup.includes("node") ? ["npm run test:setup"] : [],
|
|
4881
5007
|
...blueprint.setup.includes("browser") ? ["npm run test:setup:browser"] : [],
|
|
5008
|
+
...blueprint.skills ? ["npm run test:skills"] : [],
|
|
4882
5009
|
...blueprint.guides ? ["npm run test:guides"] : [],
|
|
4883
5010
|
...blueprint.conformance ? ["npm run test:conformance"] : [],
|
|
4884
5011
|
...integrates ? ["npm run test:integration"] : [],
|
|
@@ -4902,6 +5029,7 @@ function blueprintToScripts(blueprint) {
|
|
|
4902
5029
|
if (blueprint.setup.includes("node")) scripts["test:setup"] = `${vitest} --project setup`;
|
|
4903
5030
|
if (blueprint.setup.includes("browser")) scripts["test:setup:browser"] = `${vitest} --project setup:browser`;
|
|
4904
5031
|
if (blueprint.journey && blueprint.app.includes("browser")) scripts["test:journey"] = `vitest run --config ${JOURNEY_CONFIG_PATH} --no-cache --reporter=dot`;
|
|
5032
|
+
if (blueprint.skills) scripts["test:skills"] = `${vitest} --project skills`;
|
|
4905
5033
|
if (blueprint.guides) scripts["test:guides"] = `node --experimental-strip-types ${GUIDES_TEST_PATH}`;
|
|
4906
5034
|
if (blueprint.conformance) scripts["test:conformance"] = `${vitest} --project conformance`;
|
|
4907
5035
|
scripts["test:probe"] = "vitest run --config vite.config.ts --no-cache --reporter=verbose --project probe";
|
|
@@ -4958,7 +5086,7 @@ function blueprintToScripts(blueprint) {
|
|
|
4958
5086
|
* Every direct `test:<project>` script is writable, together with the probe and
|
|
4959
5087
|
* benchmark workbench scripts. A workspace carrying guides adds `test:guides`,
|
|
4960
5088
|
* whose package-owned entry runs the guides project and handles explicit parity
|
|
4961
|
-
* rewrites
|
|
5089
|
+
* rewrites, and one carrying skills adds `test:skills`. Publishing adds the pack and publication lifecycle scripts.
|
|
4962
5090
|
* Aggregate test scripts and
|
|
4963
5091
|
* maintainer-owned gate chains stay outside the region.
|
|
4964
5092
|
*
|
|
@@ -5292,6 +5420,10 @@ function blueprintToRootVite(blueprint) {
|
|
|
5292
5420
|
factories.push(CONFIG_TEMPLATES.factories.guides);
|
|
5293
5421
|
projects.push("guides");
|
|
5294
5422
|
}
|
|
5423
|
+
if (blueprint.skills) {
|
|
5424
|
+
factories.push(CONFIG_TEMPLATES.factories.skills);
|
|
5425
|
+
projects.push("skills");
|
|
5426
|
+
}
|
|
5295
5427
|
if (blueprint.conformance) {
|
|
5296
5428
|
factories.push(CONFIG_TEMPLATES.factories.conformance);
|
|
5297
5429
|
projects.push("conformance");
|
|
@@ -5446,6 +5578,13 @@ ${paths.join("\n")}
|
|
|
5446
5578
|
environment: "browser",
|
|
5447
5579
|
content: CONFIG_TEMPLATES.vites.app.journey
|
|
5448
5580
|
});
|
|
5581
|
+
if (blueprint.skills) artifacts.push({
|
|
5582
|
+
path: SKILLS_CONFIG_PATH,
|
|
5583
|
+
group: "configs",
|
|
5584
|
+
ownership: "content",
|
|
5585
|
+
origin: "template",
|
|
5586
|
+
content: CONFIG_TEMPLATES.tsconfigs.skills
|
|
5587
|
+
});
|
|
5449
5588
|
return artifacts;
|
|
5450
5589
|
}
|
|
5451
5590
|
/**
|
|
@@ -5732,21 +5871,23 @@ function blueprintToGuideArtifacts(blueprint) {
|
|
|
5732
5871
|
*
|
|
5733
5872
|
* @param blueprint - The workspace specification.
|
|
5734
5873
|
* @returns The birth-owned package front page and the content-owned `AGENTS.md`
|
|
5735
|
-
*
|
|
5874
|
+
* pointer.
|
|
5736
5875
|
*
|
|
5737
5876
|
* @remarks
|
|
5738
5877
|
* The front page is the workspace's own prose, so it is written once and left
|
|
5739
|
-
* alone from then on. The
|
|
5740
|
-
* restored whenever
|
|
5878
|
+
* alone from then on. The pointer is scaffold's, so it is content-owned and
|
|
5879
|
+
* restored whenever it drifts.
|
|
5741
5880
|
*
|
|
5742
|
-
*
|
|
5743
|
-
* vendored paths at one storage name, and `AGENTS.md`
|
|
5744
|
-
*
|
|
5745
|
-
*
|
|
5881
|
+
* The pointer is planned here rather than vendored because `stageHost` refuses two
|
|
5882
|
+
* vendored paths at one storage name, and `AGENTS.md` already stores the canon a
|
|
5883
|
+
* release ships. Planning it as this package's own content leaves the path with
|
|
5884
|
+
* one claimant. No `CLAUDE.md` is planned: a target holding one stops Claude Code
|
|
5885
|
+
* from reading `AGENTS.md`, so the path stays canon without a claimant, `audit`
|
|
5886
|
+
* reports a copy `foreign`, and `overwrite` deletes it.
|
|
5746
5887
|
*
|
|
5747
|
-
*
|
|
5748
|
-
*
|
|
5749
|
-
*
|
|
5888
|
+
* The pointer carries no varying span, so it is not filled: a workspace's name
|
|
5889
|
+
* never reaches the text, and the paths a reader follows are the same in every
|
|
5890
|
+
* target.
|
|
5750
5891
|
*
|
|
5751
5892
|
* @example
|
|
5752
5893
|
* ```ts
|
|
@@ -5754,39 +5895,29 @@ function blueprintToGuideArtifacts(blueprint) {
|
|
|
5754
5895
|
*
|
|
5755
5896
|
* const blueprint = createBlueprint('router', { src: ['core'] })
|
|
5756
5897
|
*
|
|
5757
|
-
* blueprintToDocumentArtifacts(blueprint).map((artifact) => artifact.path) // ['README.md', 'AGENTS.md'
|
|
5898
|
+
* blueprintToDocumentArtifacts(blueprint).map((artifact) => artifact.path) // ['README.md', 'AGENTS.md']
|
|
5758
5899
|
* ```
|
|
5759
5900
|
*/
|
|
5760
5901
|
function blueprintToDocumentArtifacts(blueprint) {
|
|
5761
5902
|
const publishes = blueprint.src.length > 0;
|
|
5762
5903
|
const name = publishes ? `@orkestrel/${blueprint.name}` : blueprint.name;
|
|
5763
5904
|
const description = blueprint.description ?? (publishes ? `The ${name} package.` : `The ${name} application.`);
|
|
5764
|
-
return [
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
content: ARTIFACT_TEMPLATES.docs.agents
|
|
5781
|
-
},
|
|
5782
|
-
{
|
|
5783
|
-
path: "CLAUDE.md",
|
|
5784
|
-
group: "docs",
|
|
5785
|
-
ownership: "content",
|
|
5786
|
-
origin: "template",
|
|
5787
|
-
content: ARTIFACT_TEMPLATES.docs.claude
|
|
5788
|
-
}
|
|
5789
|
-
];
|
|
5905
|
+
return [{
|
|
5906
|
+
path: "README.md",
|
|
5907
|
+
group: "docs",
|
|
5908
|
+
ownership: "birth",
|
|
5909
|
+
origin: "template",
|
|
5910
|
+
content: fillTemplate(ARTIFACT_TEMPLATES.docs.readme, {
|
|
5911
|
+
package: name,
|
|
5912
|
+
description
|
|
5913
|
+
})
|
|
5914
|
+
}, {
|
|
5915
|
+
path: "AGENTS.md",
|
|
5916
|
+
group: "docs",
|
|
5917
|
+
ownership: "content",
|
|
5918
|
+
origin: "template",
|
|
5919
|
+
content: ARTIFACT_TEMPLATES.docs.agents
|
|
5920
|
+
}];
|
|
5790
5921
|
}
|
|
5791
5922
|
/**
|
|
5792
5923
|
* Compiles the blueprint-dependent orchestration artifacts.
|
|
@@ -5846,13 +5977,20 @@ function blueprintToOrchestrationArtifacts(blueprint) {
|
|
|
5846
5977
|
* staged bytes; and the `.claude/agents` directory in `CANON_PATHS` is what
|
|
5847
5978
|
* stages those bytes, so listing the file in `HOST_PATHS` as well would claim one
|
|
5848
5979
|
* storage name twice and refuse the stage. The rest of the canon a target reads
|
|
5849
|
-
* from the installed package, at the locations the `AGENTS.md`
|
|
5850
|
-
*
|
|
5980
|
+
* from the installed package, at the locations the `AGENTS.md` pointer
|
|
5981
|
+
* {@link blueprintToDocumentArtifacts} emits names.
|
|
5851
5982
|
*
|
|
5852
5983
|
* The {@link SEED_GUIDE_PATHS} mirrors are claimed explicitly
|
|
5853
5984
|
* from `REFERENCE_PATHS`. The target's own guide is excluded by
|
|
5854
5985
|
* {@link selectHostPaths}; the remaining reference guides grant no target claim.
|
|
5855
5986
|
*
|
|
5987
|
+
* The skill pointer set follows, for each name in {@link TARGET_SKILL_NAMES}:
|
|
5988
|
+
* the `.claude/skills/<name>/SKILL.md` bridge and the
|
|
5989
|
+
* `.agents/skills/<name>/agents/openai.yaml` sidecar as copies, then the
|
|
5990
|
+
* `.agents/skills/<name>/SKILL.md` pointer with `pointer` set, whose bytes
|
|
5991
|
+
* hydration derives from the canonical skill. A blueprint with `skills` set
|
|
5992
|
+
* ships its own skill canon, so it plans no pointer set.
|
|
5993
|
+
*
|
|
5856
5994
|
* @example
|
|
5857
5995
|
* ```ts
|
|
5858
5996
|
* import { blueprintToHostArtifacts, createBlueprint } from '@orkestrel/scaffold'
|
|
@@ -5861,15 +5999,44 @@ function blueprintToOrchestrationArtifacts(blueprint) {
|
|
|
5861
5999
|
*
|
|
5862
6000
|
* blueprintToHostArtifacts(blueprint).some((artifact) => artifact.path === 'tests/guides.test.ts') // false
|
|
5863
6001
|
* blueprintToHostArtifacts(blueprint).some((artifact) => artifact.path === 'guides/router.md') // false
|
|
6002
|
+
* blueprintToHostArtifacts(blueprint).find((artifact) => artifact.path === '.agents/skills/orkestrel-harden/SKILL.md')?.pointer // true
|
|
5864
6003
|
* ```
|
|
5865
6004
|
*/
|
|
5866
6005
|
function blueprintToHostArtifacts(blueprint) {
|
|
5867
|
-
|
|
6006
|
+
const vendored = [...selectHostPaths([...HOST_PATHS, ...SEED_GUIDE_PATHS], blueprint.name), CATALOG_AGENT_PATH].map((path) => ({
|
|
5868
6007
|
path,
|
|
5869
6008
|
group: inferGroup(path),
|
|
5870
6009
|
ownership: "presence",
|
|
5871
6010
|
origin: "host"
|
|
5872
6011
|
}));
|
|
6012
|
+
if (blueprint.skills) return vendored;
|
|
6013
|
+
const skills = TARGET_SKILL_NAMES.flatMap((name) => {
|
|
6014
|
+
const bridge = `.claude/skills/${name}/SKILL.md`;
|
|
6015
|
+
const sidecar = `.agents/skills/${name}/agents/openai.yaml`;
|
|
6016
|
+
const pointer = `.agents/skills/${name}/SKILL.md`;
|
|
6017
|
+
return [
|
|
6018
|
+
{
|
|
6019
|
+
path: bridge,
|
|
6020
|
+
group: inferGroup(bridge),
|
|
6021
|
+
ownership: "presence",
|
|
6022
|
+
origin: "host"
|
|
6023
|
+
},
|
|
6024
|
+
{
|
|
6025
|
+
path: sidecar,
|
|
6026
|
+
group: inferGroup(sidecar),
|
|
6027
|
+
ownership: "presence",
|
|
6028
|
+
origin: "host"
|
|
6029
|
+
},
|
|
6030
|
+
{
|
|
6031
|
+
path: pointer,
|
|
6032
|
+
group: inferGroup(pointer),
|
|
6033
|
+
ownership: "presence",
|
|
6034
|
+
origin: "host",
|
|
6035
|
+
pointer: true
|
|
6036
|
+
}
|
|
6037
|
+
];
|
|
6038
|
+
});
|
|
6039
|
+
return [...vendored, ...skills];
|
|
5873
6040
|
}
|
|
5874
6041
|
/**
|
|
5875
6042
|
* Replaces the content of every drafted artifact an override names.
|
|
@@ -6835,7 +7002,8 @@ function createBlueprint(name, input) {
|
|
|
6835
7002
|
vendors: input?.vendors ?? [],
|
|
6836
7003
|
global: input?.global ?? false,
|
|
6837
7004
|
showcase: input?.showcase ?? false,
|
|
6838
|
-
journey: input?.journey ?? false
|
|
7005
|
+
journey: input?.journey ?? false,
|
|
7006
|
+
skills: input?.skills ?? false
|
|
6839
7007
|
}));
|
|
6840
7008
|
if (blueprint === void 0) throw new ScaffoldError("INVALID", "The filled record is not a blueprint.", { name });
|
|
6841
7009
|
return blueprint;
|
|
@@ -7144,6 +7312,6 @@ var Compiler = class {
|
|
|
7144
7312
|
}
|
|
7145
7313
|
};
|
|
7146
7314
|
//#endregion
|
|
7147
|
-
export { APP_BROWSER_DEV_DEPENDENCIES, APP_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_TEMPLATES, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, CANON_PATHS, CATALOG_AGENT_PATH, CATALOG_CLOSING_MARKER, CATALOG_OPENING_MARKER, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DECLARATION_DEV_DEPENDENCIES, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, DISTRIBUTION_TEST_PATH, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_RANGE_PATTERN, FLOOR_RANGE_PATTERN, FOREIGN_NAME_PATTERN, GLOBAL_SETUP_PATH, GROUPS, GUIDES_TEST_PATH, HEX_PATTERN, HOST_INVENTORY_PATH, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, JOURNEY_CONFIG_PATH, MANIFEST_PATH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_SCRIPT_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, MINIMUM_NODE_VERSION, MINIMUM_NPM_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, PRINT_WIDTH, REFERENCE_PATHS, RELEASE_PROOF_COMMAND, SEED_GUIDE_PATHS, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, ScaffoldError, TAB_WIDTH, VERSION_PATTERN, WORKSPACE_DEV_ENGINES, WORKSPACE_OWNED_PATHS, applyOverrides, artifactToFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToGuideArtifacts, blueprintToHostArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToOrchestrationArtifacts, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSourceArtifacts, blueprintToTestArtifacts, blueprintToWritableScripts, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, computeHash, contentToHex, createBlueprint, dependenciesToQuestions, extractRangeMajor, extractVersion, inferDrift, inferGroup, isArtifact, isAudit, isBlueprint, isCanonPath, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDeferredPath, isDependency, isDependencyName, isEnvironment, isFinding, isFloorPath, isGroup, isGroups, isHex, isManifestScript, isMirror, isOverride, isPath, isPlan, isQuestion, isRetainedPath, isScaffoldError, isSnapshot, manifestToDependencies, manifestToName, matchesDriftReachability, matchesEngines, matchesOrchestrationPath, matchesPrintWidth, matchesRange, nameToGuide, overridesToQuestions, parseBlueprint, parseCompilerOptions, parseGroups, parseSnapshot, pathToCondition, planToFindings, planToHash, planToSummary, replaceManifestRanges, replaceManifestScripts, replacePlanRanges, selectGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
|
|
7315
|
+
export { APP_BROWSER_DEV_DEPENDENCIES, APP_DEV_DEPENDENCIES, APP_MATRIX, APP_SERVER_DEV_DEPENDENCIES, ARTIFACT_TEMPLATES, BASE_DEV_DEPENDENCIES, BIN_CONFIGS, BIN_ENTRY_PATH, CANON_PATHS, CATALOG_AGENT_PATH, CATALOG_CLOSING_MARKER, CATALOG_OPENING_MARKER, CONFIG_TEMPLATES, CONFORMANCE_TEST_PATH, CONTROL_CHARACTER_PATTERN, Compiler, DECLARATION_DEV_DEPENDENCIES, DEFAULT_ENGINES, DEFAULT_VERSION, DEPENDENCY_NAME_PATTERN, DISTRIBUTION_TEST_PATH, ENGINES_PATTERN, ENVIRONMENTS, EXECUTABLE_PATHS, EXTRA_RANGE_PATTERN, FLOOR_RANGE_PATTERN, FOREIGN_NAME_PATTERN, GLOBAL_SETUP_PATH, GROUPS, GUIDES_TEST_PATH, HEX_PATTERN, HOST_INVENTORY_PATH, HOST_PATHS, INTEGRATION_TEST_PATH, INVALID_PATH_CHARACTER_PATTERN, JOURNEY_CONFIG_PATH, MANIFEST_PATH, MAX_ARTIFACT_BYTES, MAX_ARTIFACT_HEX_LENGTH, MAX_AUDIT_FINDINGS, MAX_COLLECTION_ITEMS, MAX_DEPENDENCY_NAME_LENGTH, MAX_MANIFEST_BYTES, MAX_NAME_LENGTH, MAX_PATH_LENGTH, MAX_RANGE_LENGTH, MAX_REGISTRY_BYTES, MAX_SCRIPT_LENGTH, MAX_TOTAL_ARTIFACT_BYTES, MAX_TOTAL_REGISTRY_BYTES, MINIMUM_NODE_VERSION, MINIMUM_NPM_VERSION, NAME_PATTERN, ORCHESTRATION_PATH_NAMES, ORCHESTRATION_PATH_PREFIXES, ORKESTREL_RANGE_PATTERN, PRINT_WIDTH, REFERENCE_PATHS, RELEASE_PROOF_COMMAND, SEED_GUIDE_PATHS, SERVICE_SCRIPT_PATH, SERVICE_SETUP_PATH, SERVICE_TEST_INCLUDE, SHOWCASE_CONFIG_PATH, SHOWCASE_DEV_DEPENDENCIES, SKILLS_CONFIG_PATH, SOURCE_BROWSER_DEV_DEPENDENCIES, SRC_MATRIX, ScaffoldError, TAB_WIDTH, TARGET_SKILL_NAMES, VERSION_PATTERN, WORKSPACE_DEV_ENGINES, WORKSPACE_OWNED_PATHS, applyOverrides, artifactToFinding, artifactToHex, artifactsToQuestions, blueprintToConfigArtifacts, blueprintToDevDependencies, blueprintToDocumentArtifacts, blueprintToGuideArtifacts, blueprintToHostArtifacts, blueprintToMachinery, blueprintToManifest, blueprintToOrchestrationArtifacts, blueprintToQuestions, blueprintToRootTsconfig, blueprintToRootVite, blueprintToScripts, blueprintToSourceArtifacts, blueprintToTestArtifacts, blueprintToWritableScripts, bytesToHex, catalogToLayers, cloneValue, compareVersions, computeBytes, computeHash, contentToHex, createBlueprint, dependenciesToQuestions, extractRangeMajor, extractVersion, inferDrift, inferGroup, isArtifact, isAudit, isBlueprint, isCanonPath, isCatalogEntry, isCollection, isCompilerHooks, isCompilerOptions, isContent, isDeferredPath, isDependency, isDependencyName, isEnvironment, isFinding, isFloorPath, isGroup, isGroups, isHex, isManifestScript, isMirror, isOverride, isPath, isPlan, isQuestion, isRetainedPath, isScaffoldError, isSnapshot, manifestToDependencies, manifestToName, matchesDriftReachability, matchesEngines, matchesOrchestrationPath, matchesPrintWidth, matchesRange, nameToGuide, overridesToQuestions, parseBlueprint, parseCompilerOptions, parseGroups, parseSnapshot, pathToCondition, planToFindings, planToHash, planToSummary, renderSkillPointer, replaceManifestRanges, replaceManifestScripts, replacePlanRanges, selectGroups, selectHostPaths, serializeTypeScriptString, srcToEntry, srcToExports, srcToRoot };
|
|
7148
7316
|
|
|
7149
7317
|
//# sourceMappingURL=index.js.map
|