@orkestrel/scaffold 0.0.122 → 0.0.124
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-harden/scripts/interleave.js +539 -0
- package/dist/agents/skills/orkestrel-parallel/scripts/lane.js +1163 -0
- package/dist/bin/main.js +21 -19
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +13 -7
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -3
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +1 -1
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +4 -2
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +2 -2
- package/dist/host/agents/skills/orkestrel-harden/SKILL.md +16 -3
- package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +18 -12
- package/dist/host/agents/skills/orkestrel-harden/references/document.md +1 -0
- package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +2 -1
- package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +1 -1
- package/dist/host/agents/skills/orkestrel-harden/references/methods.md +642 -0
- package/dist/host/agents/skills/orkestrel-harden/scripts/interleave.ts +665 -0
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +14 -13
- package/dist/host/agents/skills/orkestrel-parallel/references/claude-code.md +13 -13
- package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +1 -0
- package/dist/host/agents/skills/orkestrel-parallel/scripts/lane.ts +1433 -0
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +2 -1
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +18 -1
- package/dist/host/claude/AGENTS.md +1 -1
- package/dist/host/claude/agents/analyst.md +1 -1
- package/dist/host/claude/agents/builder.md +1 -1
- package/dist/host/claude/agents/distiller.md +2 -1
- package/dist/host/claude/agents/grok.md +2 -2
- package/dist/host/claude/agents/opus.md +2 -2
- package/dist/host/claude/agents/orkestrel.md +30 -30
- package/dist/host/claude/agents/reviewer.md +2 -2
- package/dist/host/claude/agents/scout.md +2 -1
- package/dist/host/claude/agents/verifier.md +1 -1
- package/dist/host/claude/rules/campaign.md +12 -11
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/patterns.md +14 -0
- package/dist/host/claude/rules/quality.md +4 -1
- package/dist/host/claude/rules/tests.md +4 -0
- package/dist/host/claude/rules/writing.md +1 -1
- package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/codex/agents/analyst.toml +4 -1
- package/dist/host/codex/agents/astra.toml +1 -1
- package/dist/host/codex/agents/builder.toml +1 -1
- package/dist/host/codex/agents/distiller.toml +4 -2
- package/dist/host/codex/agents/grok.toml +5 -2
- package/dist/host/codex/agents/opus.toml +3 -3
- package/dist/host/codex/agents/reviewer.toml +6 -2
- package/dist/host/codex/agents/scout.toml +5 -1
- package/dist/host/codex/agents/verifier.toml +6 -1
- package/dist/host/guides/agent.md +1119 -457
- package/dist/host/guides/contract.md +226 -104
- package/dist/host/guides/database.md +12 -12
- package/dist/host/guides/ndjson.md +94 -21
- package/dist/host/guides/ollama.md +22 -18
- package/dist/host/guides/probe.md +29 -27
- package/dist/host/guides/reason.md +377 -114
- package/dist/host/guides/scaffold.md +43 -21
- package/dist/host/guides/study.md +538 -450
- package/dist/host/guides/tool.md +163 -58
- package/dist/host/manifest.json +70 -52
- package/dist/src/core/index.cjs +21 -20
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +1 -4
- package/dist/src/core/index.d.ts +1 -4
- package/dist/src/core/index.js +21 -20
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +87 -8
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +50 -6
- package/dist/src/server/index.d.ts +50 -6
- package/dist/src/server/index.js +87 -10
- package/dist/src/server/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -1012,6 +1012,52 @@ function listCanonPaths(target, groups) {
|
|
|
1012
1012
|
}).filter((path) => groups.includes((0, _src_core.inferArtifactGroup)(path)));
|
|
1013
1013
|
}
|
|
1014
1014
|
/**
|
|
1015
|
+
* Lists the configuration wrappers a target holds, filtered to a plan's groups.
|
|
1016
|
+
*
|
|
1017
|
+
* @param target - The directory to read.
|
|
1018
|
+
* @param groups - The artifact groups the plan selects.
|
|
1019
|
+
* @returns Every exact-case wrapper file the target holds, in compile order, and `[]`
|
|
1020
|
+
* when the target holds none, cannot be resolved, or the plan selects no wrapper's group.
|
|
1021
|
+
*
|
|
1022
|
+
* @remarks
|
|
1023
|
+
* The population sits under `configs/src` and `configs/app`, and the widest blueprint
|
|
1024
|
+
* compiles it: every environment on both axes, `bin`, `styles`, `themes`, `showcase`,
|
|
1025
|
+
* `journey`, and each framework on both axes. A wrapper the plan claims pairs with its
|
|
1026
|
+
* artifact, and the rest report `foreign`, which lets the deletion verb take the wrappers
|
|
1027
|
+
* an environment left behind.
|
|
1028
|
+
*
|
|
1029
|
+
* Every other file under those directories belongs to its author and stays unread,
|
|
1030
|
+
* and so does a named styles extension's wrapper, because those names form an open
|
|
1031
|
+
* set. The exact-case read keeps a case-variant name out on a case-folding host.
|
|
1032
|
+
*
|
|
1033
|
+
* @example
|
|
1034
|
+
* ```ts
|
|
1035
|
+
* import { listWrapperPaths } from '@orkestrel/scaffold/server'
|
|
1036
|
+
*
|
|
1037
|
+
* listWrapperPaths('vacant', ['configs']) // []
|
|
1038
|
+
* ```
|
|
1039
|
+
*/
|
|
1040
|
+
function listWrapperPaths(target, groups) {
|
|
1041
|
+
const widest = (0, _src_core.createBlueprint)("wrapper", {
|
|
1042
|
+
src: _src_core.ENVIRONMENTS,
|
|
1043
|
+
app: _src_core.ENVIRONMENTS,
|
|
1044
|
+
extensions: _src_core.FRAMEWORKS.map((name) => ({
|
|
1045
|
+
surface: "browser",
|
|
1046
|
+
name,
|
|
1047
|
+
axes: _src_core.AXES
|
|
1048
|
+
})),
|
|
1049
|
+
bin: true,
|
|
1050
|
+
styles: true,
|
|
1051
|
+
themes: true,
|
|
1052
|
+
showcase: true,
|
|
1053
|
+
journey: true
|
|
1054
|
+
});
|
|
1055
|
+
return (0, _src_core.blueprintToConfigArtifacts)(widest).filter(({ path, group }) => groups.includes(group) && (path.startsWith("configs/src/") || path.startsWith("configs/app/"))).map(({ path }) => path).filter((path) => {
|
|
1056
|
+
const full = resolveContainedPath(target, path);
|
|
1057
|
+
return full !== void 0 && isExactCaseFile(full);
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1015
1061
|
* Removes every directory one set of deletions emptied.
|
|
1016
1062
|
*
|
|
1017
1063
|
* @param target - The directory the deleted paths are relative to.
|
|
@@ -1782,10 +1828,40 @@ function resolveHostRoot() {
|
|
|
1782
1828
|
*/
|
|
1783
1829
|
function readSurfaceModule(loader = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)) {
|
|
1784
1830
|
const loaded = (0, _orkestrel_contract.attempt)(() => loader("@orkestrel/guide"));
|
|
1785
|
-
if (!loaded.success || !isSurfaceModule(loaded.value)) throw new _src_core.ScaffoldError("TARGET", "Surface reflection requires @orkestrel/guide with createGuide, createSource, extractSourceLines, and isGuideError.
|
|
1831
|
+
if (!loaded.success || !isSurfaceModule(loaded.value)) throw new _src_core.ScaffoldError("TARGET", "Surface reflection requires @orkestrel/guide with createGuide, createSource, extractSourceLines, and isGuideError. Install that module where scaffold resolves it, or name a built @orkestrel/guide checkout as a surface candidate.", { ...!loaded.success ? { error: loaded.error } : {} });
|
|
1786
1832
|
return loaded.value;
|
|
1787
1833
|
}
|
|
1788
1834
|
/**
|
|
1835
|
+
* Resolves the guide loader one surface run passes to every reader.
|
|
1836
|
+
*
|
|
1837
|
+
* @param roots - The candidate checkouts the run names.
|
|
1838
|
+
* @returns Node resolution from the one candidate whose manifest names `@orkestrel/guide`, so
|
|
1839
|
+
* that checkout's own exports serve the module; otherwise Node resolution from this module.
|
|
1840
|
+
* @throws Thrown with TARGET when two candidates name `@orkestrel/guide`, or when that
|
|
1841
|
+
* candidate's own exports do not resolve because its build output is absent.
|
|
1842
|
+
* @example
|
|
1843
|
+
* ```ts
|
|
1844
|
+
* import { readSurfaceModule, resolveSurfaceLoader } from '@orkestrel/scaffold/server'
|
|
1845
|
+
* readSurfaceModule(resolveSurfaceLoader([])).createGuide('# Sample').surface() // []
|
|
1846
|
+
* ```
|
|
1847
|
+
*/
|
|
1848
|
+
function resolveSurfaceLoader(roots) {
|
|
1849
|
+
const guides = roots.filter((root) => {
|
|
1850
|
+
const manifest = readFileText(root, "package.json", _src_core.MAX_MANIFEST_BYTES);
|
|
1851
|
+
return manifest !== void 0 && (0, _src_core.manifestToName)(manifest) === "@orkestrel/guide";
|
|
1852
|
+
});
|
|
1853
|
+
if (guides.length > 1) throw new _src_core.ScaffoldError("TARGET", `Surface candidates ${JSON.stringify(guides.map((root) => root.slice(0, 512)))} each name @orkestrel/guide, and one run loads one guide module. Name one @orkestrel/guide checkout.`, { roots: guides });
|
|
1854
|
+
const root = guides[0];
|
|
1855
|
+
if (root === void 0) return (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
1856
|
+
const loader = (0, node_module.createRequire)((0, node_path.join)(root, "package.json"));
|
|
1857
|
+
const resolved = (0, _orkestrel_contract.attempt)(() => loader.resolve("@orkestrel/guide"));
|
|
1858
|
+
if (!resolved.success) throw new _src_core.ScaffoldError("TARGET", `Surface candidate ${JSON.stringify(root.slice(0, 512))} is @orkestrel/guide, and its own exports do not resolve. Run npm run build in that checkout before checking its claims.`, {
|
|
1859
|
+
root,
|
|
1860
|
+
error: resolved.error
|
|
1861
|
+
});
|
|
1862
|
+
return loader;
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1789
1865
|
* Reads one guide's claims and reports parser refusals with its owner and source.
|
|
1790
1866
|
*
|
|
1791
1867
|
* @param source - The source label or path to name in a refusal.
|
|
@@ -3244,10 +3320,10 @@ var Materializer = class {
|
|
|
3244
3320
|
* @remarks
|
|
3245
3321
|
* Host directories expand before the target is read, so this method and
|
|
3246
3322
|
* {@link repair} compare the same paths with the same ownership. Foreign
|
|
3247
|
-
* candidates are files beneath those expanded roots
|
|
3248
|
-
* a `CANON_PATHS` member
|
|
3249
|
-
* file outside these populations never becomes a deletion candidate
|
|
3250
|
-
* because its group is selected.
|
|
3323
|
+
* candidates are files beneath those expanded roots, files the target holds at
|
|
3324
|
+
* a `CANON_PATHS` member, and the configuration wrappers `listWrapperPaths`
|
|
3325
|
+
* names. A file outside these populations never becomes a deletion candidate
|
|
3326
|
+
* merely because its group is selected.
|
|
3251
3327
|
*
|
|
3252
3328
|
* The canon is staged for reading rather than for a target, so a copy of one of
|
|
3253
3329
|
* its paths sitting in a target is a superseded artifact and reports foreign. A
|
|
@@ -3470,8 +3546,8 @@ var Materializer = class {
|
|
|
3470
3546
|
* A tree carrying uncommitted work is refused whole for the same reason.
|
|
3471
3547
|
*
|
|
3472
3548
|
* The candidate list carries every foreign population {@link audit} reports. A
|
|
3473
|
-
* superseded instruction copy inside the canon
|
|
3474
|
-
* therefore follow the same transaction rules.
|
|
3549
|
+
* superseded instruction copy inside the canon, a stray beneath an owned root, and
|
|
3550
|
+
* a wrapper an environment left behind therefore follow the same transaction rules.
|
|
3475
3551
|
* Membership decides it, never byte identity. An untracked leftover stays in
|
|
3476
3552
|
* place and remains a finding, which is the seam a maintainer uses to keep a
|
|
3477
3553
|
* git-ignored file.
|
|
@@ -3592,7 +3668,8 @@ var Materializer = class {
|
|
|
3592
3668
|
});
|
|
3593
3669
|
return listFiles(directory).map((name) => `${root}/${name}`);
|
|
3594
3670
|
}),
|
|
3595
|
-
...listCanonPaths(target, plan.groups)
|
|
3671
|
+
...listCanonPaths(target, plan.groups),
|
|
3672
|
+
...listWrapperPaths(target, plan.groups)
|
|
3596
3673
|
]);
|
|
3597
3674
|
const questions = [];
|
|
3598
3675
|
if (plan.groups.includes("guides")) {
|
|
@@ -4913,6 +4990,7 @@ exports.listAncestors = listAncestors;
|
|
|
4913
4990
|
exports.listCanonPaths = listCanonPaths;
|
|
4914
4991
|
exports.listDirectories = listDirectories;
|
|
4915
4992
|
exports.listFiles = listFiles;
|
|
4993
|
+
exports.listWrapperPaths = listWrapperPaths;
|
|
4916
4994
|
exports.matchesAnchor = matchesAnchor;
|
|
4917
4995
|
exports.matchesExecutablePath = matchesExecutablePath;
|
|
4918
4996
|
exports.matchesExpectation = matchesExpectation;
|
|
@@ -4942,6 +5020,7 @@ exports.readSurfaceRecord = readSurfaceRecord;
|
|
|
4942
5020
|
exports.resolveContainedPath = resolveContainedPath;
|
|
4943
5021
|
exports.resolveHostRoot = resolveHostRoot;
|
|
4944
5022
|
exports.resolveRealPath = resolveRealPath;
|
|
5023
|
+
exports.resolveSurfaceLoader = resolveSurfaceLoader;
|
|
4945
5024
|
exports.stageBytes = stageBytes;
|
|
4946
5025
|
exports.stageHost = stageHost;
|
|
4947
5026
|
exports.stageInventory = stageInventory;
|