@orkestrel/scaffold 0.0.108 → 0.0.110
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 +326 -91
- package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +110 -14
- package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +280 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +188 -26
- package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +142 -43
- package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +240 -62
- package/dist/agents/skills/orkestrel-dispatch/scripts/patch.js +323 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +169 -32
- package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +290 -69
- package/dist/agents/skills/orkestrel-falsify/scripts/mutate.js +560 -0
- package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +1052 -205
- package/dist/agents/skills/orkestrel-harden/scripts/measure.js +361 -0
- package/dist/agents/skills/orkestrel-harden/scripts/titles.js +455 -80
- package/dist/agents/skills/orkestrel-parallel/scripts/cases.js +327 -0
- package/dist/agents/skills/orkestrel-publish/scripts/compare.js +298 -51
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +170 -13
- package/dist/agents/skills/orkestrel-publish/scripts/swap.js +956 -191
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +707 -112
- package/dist/agents/skills/orkestrel-publish/scripts/window.js +235 -41
- package/dist/agents/skills/orkestrel-scout/scripts/map.js +341 -54
- package/dist/agents/templates/brief.md +6 -2
- package/dist/bin/main.js +51 -46
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +23 -21
- package/dist/host/agents/orchestration.md +85 -54
- package/dist/host/agents/platforms/windows.md +8 -3
- package/dist/host/agents/skills/orkestrel-align/SKILL.md +10 -13
- package/dist/host/agents/skills/orkestrel-align/references/fleet.md +4 -10
- package/dist/host/agents/skills/orkestrel-align/references/integration.md +1 -1
- package/dist/host/agents/skills/orkestrel-build/SKILL.md +16 -48
- package/dist/host/agents/skills/orkestrel-build/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +19 -16
- package/dist/host/agents/skills/orkestrel-debrief/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +15 -28
- package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +5 -6
- package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +4 -6
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +36 -25
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +4 -5
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +366 -75
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +126 -16
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +323 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +220 -31
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +176 -33
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +294 -59
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/patch.ts +401 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +199 -34
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +330 -69
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +14 -12
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +2 -5
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +2 -1
- package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +701 -0
- package/dist/host/agents/skills/orkestrel-harden/SKILL.md +31 -24
- package/dist/host/agents/skills/orkestrel-harden/references/bindings.md +23 -81
- package/dist/host/agents/skills/orkestrel-harden/references/centralization.md +4 -5
- package/dist/host/agents/skills/orkestrel-harden/references/contract.md +2 -0
- package/dist/host/agents/skills/orkestrel-harden/references/document.md +33 -0
- package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +6 -3
- package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +34 -18
- package/dist/host/agents/skills/orkestrel-harden/references/research.md +2 -0
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +1272 -279
- package/dist/host/agents/skills/orkestrel-harden/scripts/measure.ts +425 -0
- package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +603 -98
- package/dist/host/agents/skills/orkestrel-journey/SKILL.md +79 -98
- package/dist/host/agents/skills/orkestrel-journey/references/captures.md +54 -17
- package/dist/host/agents/skills/orkestrel-journey/references/decide.md +1 -20
- package/dist/host/agents/skills/orkestrel-journey/references/layer.md +21 -31
- package/dist/host/agents/skills/orkestrel-journey/references/styles.md +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +33 -29
- package/dist/host/agents/skills/orkestrel-parallel/references/claude.md +15 -13
- package/dist/host/agents/skills/orkestrel-parallel/references/cloud.md +28 -0
- package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +1 -0
- package/dist/host/agents/skills/orkestrel-parallel/references/cursor.md +13 -13
- package/dist/host/agents/skills/orkestrel-parallel/references/t3.md +13 -13
- package/dist/host/agents/skills/orkestrel-parallel/scripts/cases.ts +389 -0
- package/dist/host/agents/skills/orkestrel-polish/SKILL.md +16 -20
- package/dist/host/agents/skills/orkestrel-polish/references/capture-harness.md +16 -26
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +12 -26
- package/dist/host/agents/skills/orkestrel-publish/agents/openai.yaml +2 -2
- package/dist/host/agents/skills/orkestrel-publish/references/adopt.md +23 -0
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +4 -4
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +13 -10
- package/dist/host/agents/skills/orkestrel-publish/references/window.md +21 -26
- package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +348 -59
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +202 -22
- package/dist/host/agents/skills/orkestrel-publish/scripts/swap.ts +1061 -191
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +812 -140
- package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +280 -38
- package/dist/host/agents/skills/orkestrel-scout/SKILL.md +3 -3
- package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +428 -70
- package/dist/host/agents/templates/brief.md +6 -2
- package/dist/host/agents/transports/claude-cli.md +3 -3
- package/dist/host/agents/transports/codex.md +3 -8
- package/dist/host/agents/transports/cursor.md +2 -3
- package/dist/host/claude/AGENTS.md +2 -3
- package/dist/host/claude/agents/analyst.md +3 -3
- package/dist/host/claude/agents/astra.md +4 -4
- package/dist/host/claude/agents/builder.md +4 -3
- package/dist/host/claude/agents/checker.md +1 -1
- package/dist/host/claude/agents/distiller.md +1 -1
- package/dist/host/claude/agents/grok.md +1 -1
- package/dist/host/claude/agents/opus.md +3 -3
- package/dist/host/claude/agents/orkestrel.md +57 -90
- package/dist/host/claude/agents/researcher.md +1 -1
- package/dist/host/claude/agents/reviewer.md +6 -2
- package/dist/host/claude/agents/scout.md +1 -1
- package/dist/host/claude/agents/verifier.md +2 -2
- package/dist/host/claude/rules/application.md +14 -21
- package/dist/host/claude/rules/architecture.md +34 -44
- package/dist/host/claude/rules/browser.md +3 -4
- package/dist/host/claude/rules/campaign.md +3 -2
- package/dist/host/claude/rules/documentation.md +25 -12
- package/dist/host/claude/rules/names.md +9 -4
- package/dist/host/claude/rules/patterns.md +6 -7
- package/dist/host/claude/rules/portability.md +1 -1
- package/dist/host/claude/rules/quality.md +7 -6
- package/dist/host/claude/rules/styles.md +2 -2
- package/dist/host/claude/rules/tests.md +68 -115
- package/dist/host/claude/rules/typescript.md +7 -9
- package/dist/host/claude/rules/workspace.md +27 -26
- package/dist/host/claude/rules/writing.md +2 -5
- package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-publish/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-scout/SKILL.md +1 -1
- package/dist/host/codex/agents/analyst.toml +9 -3
- package/dist/host/codex/agents/astra.toml +10 -7
- package/dist/host/codex/agents/builder.toml +4 -4
- package/dist/host/codex/agents/opus.toml +6 -6
- package/dist/host/codex/agents/orkestrel.toml +1 -1
- package/dist/host/codex/agents/researcher.toml +2 -2
- package/dist/host/codex/agents/reviewer.toml +2 -2
- package/dist/host/codex/agents/verifier.toml +4 -4
- package/dist/host/codex/config.toml +1 -1
- package/dist/host/configs/helpers.ts +21 -1
- package/dist/host/configs/policy.ts +299 -15
- package/dist/host/cursor/rules/orchestration.mdc +1 -1
- package/dist/host/dotfiles/oxlintrc.json +137 -3
- package/dist/host/guides/agent.md +111 -134
- package/dist/host/guides/capture.md +801 -0
- package/dist/host/guides/probe.md +27 -8
- package/dist/host/guides/scaffold.md +97 -19
- package/dist/host/guides/study.md +534 -440
- package/dist/host/guides/test.md +111 -44
- package/dist/host/manifest.json +170 -244
- package/dist/host/tests/config.test.ts +977 -187
- package/dist/host/tests/policy.test.ts +165 -1
- package/dist/host/tests/setupPolicy.ts +1246 -33
- package/dist/src/core/index.cjs +222 -90
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +126 -40
- package/dist/src/core/index.d.ts +126 -40
- package/dist/src/core/index.js +217 -89
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +20 -27
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.js +21 -28
- package/dist/src/server/index.js.map +1 -1
- package/package.json +11 -11
- package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +0 -283
- package/dist/host/agents/skills/orkestrel-dispatch/references/bench.md +0 -25
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +0 -333
- package/dist/host/guides/supervisor.md +0 -4890
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, readdirSync, readFileSync, rmSync } from 'node:fs'
|
|
1
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
|
|
2
2
|
import { join } from 'node:path'
|
|
3
3
|
import { describe, expect, it } from 'vitest'
|
|
4
4
|
import { POLICY_BANNED_TERMS, POLICY_JUDGED_TERMS } from '../configs/policy.js'
|
|
@@ -10,11 +10,17 @@ import {
|
|
|
10
10
|
createPolicySurfaceGuide,
|
|
11
11
|
writePolicySurfaceHost,
|
|
12
12
|
createSkillMetadata,
|
|
13
|
+
DIST_POLICY_CONTROLS,
|
|
14
|
+
DIST_POLICY_MESSAGE,
|
|
13
15
|
inspectPolicyControl,
|
|
16
|
+
inspectPolicyDist,
|
|
14
17
|
inspectPolicyFilenamePaths,
|
|
15
18
|
inspectPolicyMirrorPaths,
|
|
16
19
|
inspectPolicyMirrors,
|
|
17
20
|
inspectPolicyPortability,
|
|
21
|
+
inspectPolicyShellPaths,
|
|
22
|
+
inspectPolicyShells,
|
|
23
|
+
inspectPolicyText,
|
|
18
24
|
inspectPolicyWiring,
|
|
19
25
|
inspectPolicyWorkspace,
|
|
20
26
|
inspectSkillFamily,
|
|
@@ -56,6 +62,7 @@ import {
|
|
|
56
62
|
SKILL_POLICY_PARAGRAPHS,
|
|
57
63
|
SKILL_POLICY_TEXT,
|
|
58
64
|
stemToPolicyCandidates,
|
|
65
|
+
TEXT_POLICY_CONTROLS,
|
|
59
66
|
testToPolicyStem,
|
|
60
67
|
} from './setupPolicy.js'
|
|
61
68
|
|
|
@@ -712,6 +719,140 @@ describe('portability policy', () => {
|
|
|
712
719
|
]),
|
|
713
720
|
).toEqual([])
|
|
714
721
|
})
|
|
722
|
+
|
|
723
|
+
it('rejects a shell-family file outside scripts whatever its case, and a non-shell file inside it', () => {
|
|
724
|
+
expect(
|
|
725
|
+
inspectPolicyShellPaths([
|
|
726
|
+
'src/run.sh',
|
|
727
|
+
'tools/BUILD.PY',
|
|
728
|
+
'scripts/probe.ts',
|
|
729
|
+
'scripts/a/b.cmd',
|
|
730
|
+
]),
|
|
731
|
+
).toEqual([
|
|
732
|
+
{
|
|
733
|
+
rule: 'portability',
|
|
734
|
+
path: 'src/run.sh',
|
|
735
|
+
message: 'shell, PowerShell, Python, and batch files sit only in scripts',
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
rule: 'portability',
|
|
739
|
+
path: 'tools/BUILD.PY',
|
|
740
|
+
message: 'shell, PowerShell, Python, and batch files sit only in scripts',
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
rule: 'portability',
|
|
744
|
+
path: 'scripts/probe.ts',
|
|
745
|
+
message: 'scripts holds .sh files and nothing else',
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
rule: 'portability',
|
|
749
|
+
path: 'scripts/a/b.cmd',
|
|
750
|
+
message: 'scripts holds .sh files and nothing else',
|
|
751
|
+
},
|
|
752
|
+
])
|
|
753
|
+
})
|
|
754
|
+
|
|
755
|
+
it('accepts a shell file at any depth inside scripts and every other file elsewhere', () => {
|
|
756
|
+
expect(
|
|
757
|
+
inspectPolicyShellPaths([
|
|
758
|
+
'scripts/deps.sh',
|
|
759
|
+
'scripts/DEPS.SH',
|
|
760
|
+
'scripts/nested/hook.sh',
|
|
761
|
+
'src/worker/helpers.ts',
|
|
762
|
+
'package.json',
|
|
763
|
+
'.gitattributes',
|
|
764
|
+
'build.shared.ts',
|
|
765
|
+
]),
|
|
766
|
+
).toEqual([])
|
|
767
|
+
})
|
|
768
|
+
|
|
769
|
+
it('reads files only: a directory named like a shell file or inside scripts is no violation', () => {
|
|
770
|
+
const scratch = createPolicyScratch({ prefix: 'orkestrel-policy-shells-' })
|
|
771
|
+
try {
|
|
772
|
+
scratch.write('src/tools.py/index.ts', 'export {}\n')
|
|
773
|
+
scratch.write('scripts/nested/deps.sh', '#!/usr/bin/env bash\n')
|
|
774
|
+
scratch.write('src/run.sh', '#!/usr/bin/env bash\n')
|
|
775
|
+
// The refused file arrives beside the directories, so an empty result elsewhere is a read
|
|
776
|
+
// that reached the population rather than one that found nothing.
|
|
777
|
+
expect(inspectPolicyShells(scratch.path)).toEqual([
|
|
778
|
+
{
|
|
779
|
+
rule: 'portability',
|
|
780
|
+
path: 'src/run.sh',
|
|
781
|
+
message: 'shell, PowerShell, Python, and batch files sit only in scripts',
|
|
782
|
+
},
|
|
783
|
+
])
|
|
784
|
+
} finally {
|
|
785
|
+
scratch.destroy()
|
|
786
|
+
}
|
|
787
|
+
})
|
|
788
|
+
})
|
|
789
|
+
|
|
790
|
+
describe('dist import policy', () => {
|
|
791
|
+
for (const control of DIST_POLICY_CONTROLS) {
|
|
792
|
+
it(`${control.label} [membership: ${control.membership}]`, () => {
|
|
793
|
+
expect(
|
|
794
|
+
inspectPolicyControl(control).filter((violation) => violation.rule === 'dist'),
|
|
795
|
+
).toEqual(control.violations)
|
|
796
|
+
})
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// The valid file beside the broken one proves the sweep ran over the workspace and refused the
|
|
800
|
+
// file it could not read, rather than reporting nothing because it read nothing.
|
|
801
|
+
it('reports a file the parser refuses and still reads the files beside it', () => {
|
|
802
|
+
const scratch = createPolicyScratch({ prefix: 'orkestrel-policy-dist-' })
|
|
803
|
+
try {
|
|
804
|
+
scratch.write('src/core/valid.ts', "import '../../dist/src/core/index.js'\n")
|
|
805
|
+
scratch.write('src/core/broken.ts', 'export const = \n')
|
|
806
|
+
const violations = inspectPolicyDist(scratch.path)
|
|
807
|
+
expect(violations).toHaveLength(2)
|
|
808
|
+
expect(violations[0]).toMatchObject({ rule: 'dist', path: 'src/core/broken.ts' })
|
|
809
|
+
expect(violations[0]?.message.startsWith('tracked TypeScript parses: ')).toBe(true)
|
|
810
|
+
expect(violations[1]).toEqual({
|
|
811
|
+
rule: 'dist',
|
|
812
|
+
path: 'src/core/valid.ts',
|
|
813
|
+
message: `${DIST_POLICY_MESSAGE}: ../../dist/src/core/index.js`,
|
|
814
|
+
})
|
|
815
|
+
} finally {
|
|
816
|
+
scratch.destroy()
|
|
817
|
+
}
|
|
818
|
+
})
|
|
819
|
+
|
|
820
|
+
it('holds the tracked TypeScript of this workspace clear of dist', () => {
|
|
821
|
+
expect(inspectPolicyDist(process.cwd())).toEqual([])
|
|
822
|
+
})
|
|
823
|
+
})
|
|
824
|
+
|
|
825
|
+
describe('text integrity policy', () => {
|
|
826
|
+
for (const control of TEXT_POLICY_CONTROLS) {
|
|
827
|
+
it(`${control.label} [membership: ${control.membership}]`, () => {
|
|
828
|
+
expect(
|
|
829
|
+
inspectPolicyControl(control).filter((violation) => violation.rule === 'text'),
|
|
830
|
+
).toEqual(control.violations)
|
|
831
|
+
})
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
// A text fixture is a JavaScript string and cannot hold a byte sequence UTF-8 never carries, so
|
|
835
|
+
// the bytes are written directly. The valid file beside the broken one proves the sweep ran
|
|
836
|
+
// over the workspace and refused one file rather than every file.
|
|
837
|
+
it('rejects a file whose bytes are not UTF-8 and accepts the same file once they are', () => {
|
|
838
|
+
const scratch = createPolicyScratch({ prefix: 'orkestrel-policy-text-' })
|
|
839
|
+
try {
|
|
840
|
+
mkdirSync(join(scratch.path, 'src'), { recursive: true })
|
|
841
|
+
writeFileSync(join(scratch.path, 'src', 'valid.ts'), Uint8Array.of(0x61, 0xc3, 0xa8, 0x0a))
|
|
842
|
+
writeFileSync(join(scratch.path, 'src', 'broken.ts'), Uint8Array.of(0x61, 0xc3, 0x28, 0x0a))
|
|
843
|
+
expect(inspectPolicyText(scratch.path)).toEqual([
|
|
844
|
+
{ rule: 'text', path: 'src/broken.ts', message: 'text decodes as UTF-8' },
|
|
845
|
+
])
|
|
846
|
+
writeFileSync(join(scratch.path, 'src', 'broken.ts'), Uint8Array.of(0x61, 0xc3, 0xa8, 0x0a))
|
|
847
|
+
expect(inspectPolicyText(scratch.path)).toEqual([])
|
|
848
|
+
} finally {
|
|
849
|
+
scratch.destroy()
|
|
850
|
+
}
|
|
851
|
+
})
|
|
852
|
+
|
|
853
|
+
it('holds the authored and source text of this workspace to clean UTF-8', () => {
|
|
854
|
+
expect(inspectPolicyText(process.cwd())).toEqual([])
|
|
855
|
+
})
|
|
715
856
|
})
|
|
716
857
|
|
|
717
858
|
describe('prose policy', () => {
|
|
@@ -893,6 +1034,29 @@ describe('policy configuration wiring', () => {
|
|
|
893
1034
|
])
|
|
894
1035
|
})
|
|
895
1036
|
|
|
1037
|
+
it('counts a rule as enabled only at error severity, in the string or an array first member', () => {
|
|
1038
|
+
const configuration = {
|
|
1039
|
+
rules: { 'rule/top-off': 'off', 'rule/top-warn': ['warn'], 'rule/top-error': 'error' },
|
|
1040
|
+
overrides: [
|
|
1041
|
+
{
|
|
1042
|
+
files: ['a/**'],
|
|
1043
|
+
rules: { 'rule/scoped-off': 'off', 'rule/scoped-error': ['error', {}] },
|
|
1044
|
+
},
|
|
1045
|
+
],
|
|
1046
|
+
}
|
|
1047
|
+
expect(
|
|
1048
|
+
inspectPolicyWiring(
|
|
1049
|
+
configuration,
|
|
1050
|
+
['rule/top-off', 'rule/top-warn', 'rule/top-error', 'rule/scoped-off', 'rule/scoped-error'],
|
|
1051
|
+
[],
|
|
1052
|
+
),
|
|
1053
|
+
).toEqual(
|
|
1054
|
+
['rule/top-off', 'rule/top-warn', 'rule/scoped-off'].map(
|
|
1055
|
+
(rule) => `${rule} is enabled by no top-level or override rules record`,
|
|
1056
|
+
),
|
|
1057
|
+
)
|
|
1058
|
+
})
|
|
1059
|
+
|
|
896
1060
|
it('reports a configuration that is not a record', () => {
|
|
897
1061
|
expect(inspectPolicyWiring([], [], [])).toEqual(['Oxlint configuration must be a record'])
|
|
898
1062
|
})
|