@orkestrel/scaffold 0.0.108 → 0.0.109
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 +1 -1
- 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 +43 -18
- package/dist/host/agents/platforms/windows.md +3 -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 +31 -20
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +3 -4
- 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 +10 -8
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +1 -5
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +1 -1
- package/dist/host/agents/skills/orkestrel-falsify/scripts/mutate.ts +701 -0
- package/dist/host/agents/skills/orkestrel-harden/SKILL.md +16 -12
- 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 +8 -4
- 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 +75 -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 +28 -24
- package/dist/host/agents/skills/orkestrel-parallel/references/claude.md +15 -13
- 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/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 +10 -9
- package/dist/host/agents/skills/orkestrel-publish/references/window.md +20 -25
- 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 +1 -1
- package/dist/host/agents/transports/claude-cli.md +3 -3
- package/dist/host/agents/transports/codex.md +2 -7
- package/dist/host/agents/transports/cursor.md +2 -3
- package/dist/host/claude/AGENTS.md +2 -2
- package/dist/host/claude/agents/analyst.md +3 -3
- package/dist/host/claude/agents/astra.md +3 -3
- package/dist/host/claude/agents/builder.md +1 -1
- 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 +2 -2
- 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 +4 -0
- package/dist/host/claude/agents/scout.md +1 -1
- package/dist/host/claude/agents/verifier.md +1 -1
- 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 +2 -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 +4 -5
- package/dist/host/claude/rules/styles.md +2 -2
- package/dist/host/claude/rules/tests.md +57 -114
- package/dist/host/claude/rules/typescript.md +7 -9
- package/dist/host/claude/rules/workspace.md +21 -19
- 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 +3 -4
- package/dist/host/codex/agents/builder.toml +1 -1
- package/dist/host/codex/agents/opus.toml +3 -4
- package/dist/host/codex/agents/orkestrel.toml +1 -1
- package/dist/host/codex/agents/researcher.toml +2 -2
- package/dist/host/codex/agents/verifier.toml +1 -1
- package/dist/host/configs/helpers.ts +21 -1
- package/dist/host/configs/policy.ts +299 -15
- 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 +96 -18
- package/dist/host/guides/study.md +534 -440
- package/dist/host/guides/test.md +111 -44
- package/dist/host/manifest.json +160 -240
- package/dist/host/tests/config.test.ts +971 -187
- package/dist/host/tests/policy.test.ts +127 -1
- package/dist/host/tests/setupPolicy.ts +893 -33
- package/dist/src/core/index.cjs +214 -86
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +122 -38
- package/dist/src/core/index.d.ts +122 -38
- package/dist/src/core/index.js +209 -85
- 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
|
@@ -11,19 +11,17 @@ paths:
|
|
|
11
11
|
|
|
12
12
|
# Application composition
|
|
13
13
|
|
|
14
|
+
These rules govern how an application composes its environments: selections, entries, manifests, and the server runner. `AGENTS.md` § Project model owns the environment boundaries.
|
|
15
|
+
|
|
14
16
|
- Select only needed app environments; app-only, src-only, and mixed workspaces
|
|
15
17
|
are first-class.
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
- `new` selects the styles surface with `--styles`, its themes target with `--themes` (requires
|
|
19
|
-
`--styles`), the showcase with `--showcase` (requires `--app browser`), and extensions with
|
|
20
|
-
`--extend <surface:name,…>`. Each `--extend` entry is `browser:vue`, applied to every selected
|
|
21
|
-
browser axis, or `styles:<name>`, which requires `--styles`. `--app browser` implies the journey.
|
|
18
|
+
- `guides/scaffold.md` § Select at creation owns the `scaffold new` selections and the
|
|
19
|
+
combinations it refuses.
|
|
22
20
|
- Core-only, browser-only, and server-only applications are valid. A combined
|
|
23
21
|
browser+server application includes app/core for shared contracts.
|
|
24
22
|
- Every selected environment has an `index.ts` barrel. `main.ts` is an executable
|
|
25
23
|
entry and never owns reusable declarations.
|
|
26
|
-
- app/core is
|
|
24
|
+
- app/core is check/test-only.
|
|
27
25
|
- app/browser is framework-independent: it uses app/core contracts, an
|
|
28
26
|
`index.html` entry, a `main.ts` that renders through the DOM, `check:app:browser`
|
|
29
27
|
through `tsc`, and real Chromium tests.
|
|
@@ -37,10 +35,10 @@ paths:
|
|
|
37
35
|
- app/server uses app/core contracts, parses environment values before binding,
|
|
38
36
|
defaults to loopback, emits `dist/app/server/main.cjs`, and keeps only
|
|
39
37
|
`node:*` external.
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
- Parse the server's options container and its host and port before any mutation. Reject a
|
|
39
|
+
wrong-shaped container, an empty host, and a non-integer, negative, or out-of-range port with a
|
|
40
|
+
coded error and its guard.
|
|
41
|
+
- The project toolchain enforces the environment boundary: `.oxlintrc.json`
|
|
44
42
|
`no-restricted-imports` enforces declared package, alias, and conventional
|
|
45
43
|
relative import direction; scoped TypeScript configurations remove Node and
|
|
46
44
|
DOM globals from the wrong environment; Vite's real browser and server builds
|
|
@@ -48,14 +46,10 @@ paths:
|
|
|
48
46
|
generated-consumer tests exercise those real configurations.
|
|
49
47
|
- Generated consumers must pass lint, scoped typechecking, production builds, and
|
|
50
48
|
real integration tests.
|
|
51
|
-
- Include `.ts`, `.tsx`, `.mts`, and `.cts` in scoped checks.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
host-independent; src browser/server may import src core but never one
|
|
56
|
-
another's implementation. Apply the same environment law to
|
|
57
|
-
`@orkestrel/<package>/browser` and `/server` exports; a package's bare export
|
|
58
|
-
is its core API.
|
|
49
|
+
- Include `.ts`, `.tsx`, `.mts`, and `.cts` in scoped checks. Put CSS in browser code; compile
|
|
50
|
+
SCSS through the `sass` dependency the styles surface declares.
|
|
51
|
+
- Apply the environment law to `@orkestrel/<package>/browser` and `/server` exports; a package's
|
|
52
|
+
bare export is its core API.
|
|
59
53
|
- App-only manifests are unscoped and `private: true`, with no `main`,
|
|
60
54
|
`module`, `types`, export map, or publish configuration. Mixed manifests
|
|
61
55
|
publish only `dist/src` and the SCSS sources a stylesheet export names, and
|
|
@@ -64,8 +58,7 @@ paths:
|
|
|
64
58
|
- Give app/server process signals to a tested, explicitly stoppable,
|
|
65
59
|
generation-safe runner whose stale failures cannot release a newer run.
|
|
66
60
|
- Return the runner from convenience startup, so normal cleanup cannot be hidden.
|
|
67
|
-
- `
|
|
68
|
-
`startApplicationServer` belongs in `handlers.ts` beside the other process-lifecycle
|
|
61
|
+
- Place `startApplicationServer` in `handlers.ts` beside the other process-lifecycle
|
|
69
62
|
functions, because `factories.ts` admits only `create`-prefixed construction and this
|
|
70
63
|
one starts a signal-owning resource. `main.ts` invokes it and owns no reusable
|
|
71
64
|
declarations or duplicated signal handling.
|
|
@@ -4,13 +4,12 @@ paths:
|
|
|
4
4
|
- 'app/**/*.{ts,vue}'
|
|
5
5
|
- 'tests/**/*.ts'
|
|
6
6
|
- 'configs/**/*.ts'
|
|
7
|
-
- 'vite.config.ts'
|
|
8
|
-
- 'tsconfig.json'
|
|
9
|
-
- 'package.json'
|
|
10
7
|
---
|
|
11
8
|
|
|
12
9
|
# Architecture and placement rules
|
|
13
10
|
|
|
11
|
+
These rules govern where each declaration lives and how classes, functions, plugins, stores, and barrels are shaped. `.claude/rules/workspace.md` places the environments themselves.
|
|
12
|
+
|
|
14
13
|
## Centralized-file pattern
|
|
15
14
|
|
|
16
15
|
| Content | Sole location |
|
|
@@ -71,7 +70,7 @@ Use only the centralized files an environment needs.
|
|
|
71
70
|
so both stay in `helpers.ts`. Placement follows what the function is; the name form follows
|
|
72
71
|
placement.
|
|
73
72
|
- Repair a violation of those forms by deciding what the function **is** first, then moving or
|
|
74
|
-
renaming to match.
|
|
73
|
+
renaming to match.
|
|
75
74
|
- Wrong file, right name → **move it**. A `scan*` in `parsers.ts` is a pure lexical leaf that
|
|
76
75
|
belongs in `helpers.ts`. The barrel star-exports both, so the move leaves the published surface
|
|
77
76
|
identical.
|
|
@@ -79,12 +78,9 @@ Use only the centralized files an environment needs.
|
|
|
79
78
|
drive its own state, as opposed to a plain value that carries data and no behaviour. A function
|
|
80
79
|
returning a live entity is an entity factory and belongs in `factories.ts` whatever it is
|
|
81
80
|
called, so `restoreThing` there is misnamed, not misplaced. Renaming moves the published
|
|
82
|
-
surface and earns a version bump
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
dependencies with it — an entity factory moved into `helpers.ts` makes that file import an
|
|
86
|
-
implementation class, and a leaf file that imports a class stops being a leaf for every module
|
|
87
|
-
beneath it.
|
|
81
|
+
surface and earns a version bump.
|
|
82
|
+
- Never let the name choose. Never relocate a correctly placed function to escape a rename: an
|
|
83
|
+
entity factory moved into `helpers.ts` makes that file import an implementation class.
|
|
88
84
|
- Keep the leaf pair class-free. `helpers.ts` and `validators.ts` sit at the bottom of a module's
|
|
89
85
|
graph: they import types, constants, errors, and each other, and they import no implementation
|
|
90
86
|
class. Every file that constructs or drives a class — `cloners.ts`, `compilers.ts`, `factories.ts`,
|
|
@@ -100,29 +96,37 @@ Use only the centralized files an environment needs.
|
|
|
100
96
|
|
|
101
97
|
### What the policy instruments prove
|
|
102
98
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
(`tests/policy.test.ts`, `tests/setupPolicy.ts`)
|
|
106
|
-
The plugin reads declaration syntax and file name; the sweep reads paths and workspace text;
|
|
99
|
+
`.claude/rules/workspace.md` § Policy instruments fixes which instrument takes which rule. The
|
|
100
|
+
`policy` Oxlint plugin (`configs/policy.ts`) reads declaration syntax and file name; the fleet
|
|
101
|
+
policy sweep (`tests/policy.test.ts`, `tests/setupPolicy.ts`) reads paths and workspace text;
|
|
107
102
|
neither reads meaning.
|
|
108
103
|
|
|
109
104
|
- The plugin proves that a module function sits in a function-kind file, that module data sits in a
|
|
110
105
|
data-kind file, that every centralized declaration is exported, that a class sits in its matching
|
|
111
|
-
implementation or errors file,
|
|
112
|
-
no bare collection literal
|
|
106
|
+
implementation or errors file, that `constants.ts` declares only UPPER_SNAKE_CASE consts with
|
|
107
|
+
no bare collection literal, and that every interface or type-alias property is `readonly`.
|
|
108
|
+
- The plugin proves that no file declares a `let` that `prefer-const` leaves, and, over
|
|
109
|
+
`POLICY_NESTED_GLOBS` and `POLICY_SCRIPT_GLOBS`, that no function sits inside another outside the
|
|
110
|
+
callback positions.
|
|
111
|
+
- The plugin proves that a skill script exports every top-level declaration with a doc block and
|
|
112
|
+
runs nothing but its entry guard, over `POLICY_SCRIPT_GLOBS`.
|
|
113
113
|
- The sweep proves that no source, test, config, script, or sheet file carries an `eslint-disable`,
|
|
114
114
|
`oxlint-disable`, or `prettier-ignore` directive.
|
|
115
115
|
- The sweep proves that every `.claude/rules/*.md` file has a rule-map row in `AGENTS.md` and that
|
|
116
116
|
every row resolves to a file.
|
|
117
117
|
- The sweep proves the host portability rules that are path- or text-shaped over the population
|
|
118
118
|
`POLICY_PORTABILITY_GLOB` names: no path segment carries a Windows reserved device name, a
|
|
119
|
-
character Windows refuses, a trailing dot or space, or a sibling differing only by case;
|
|
120
|
-
`package.json` script names a `.sh` file
|
|
119
|
+
character Windows refuses, a trailing dot or space, or a sibling differing only by case; no
|
|
120
|
+
`package.json` script names a `.sh` file; and no shell, PowerShell, Python, or batch file sits
|
|
121
|
+
outside `scripts/`.
|
|
122
|
+
- The sweep proves that the authored and source text decodes as UTF-8 with no replacement,
|
|
123
|
+
byte-order, or control character beyond tab, line feed, and carriage return.
|
|
124
|
+
- The sweep proves that a skill proof imports no skill file but its own script.
|
|
121
125
|
- The plugin proves, over the population `POLICY_ENDING_GLOBS` names, that no source trims a
|
|
122
126
|
payload before splitting it on `'\n'`, reads `os.EOL`, or imports `EOL` from `node:os`.
|
|
123
|
-
-
|
|
124
|
-
collision into one file, and turns `:` into an alternate data
|
|
125
|
-
|
|
127
|
+
- Prove a filename the host refuses from a path population, never from written files: a Windows
|
|
128
|
+
host rejects `<`, folds a case collision into one file, and turns `:` into an alternate data
|
|
129
|
+
stream.
|
|
126
130
|
- The plugin does not prove a collection is frozen. It reads the declaration, never the value a
|
|
127
131
|
call returns, so `Object.freeze([…])` and any other call initializer are one syntax to it. The
|
|
128
132
|
freeze obligation in the earlier kind-purity rules binds regardless; only the bare literal is
|
|
@@ -131,8 +135,7 @@ neither reads meaning.
|
|
|
131
135
|
functions reads the same to it apart from the `parse*`, `create*`, `create*Plugin`, and `create*Plugins` name
|
|
132
136
|
forms: `cloners.ts`, `combinators.ts`, `compilers.ts`, `errors.ts`, `factories.ts`, `handlers.ts`,
|
|
133
137
|
`helpers.ts`, `inferers.ts`, `middlewares.ts`, `parsers.ts`, `plugins.ts`, `relations.ts`,
|
|
134
|
-
`schemas.ts`, `seeders.ts`, `shapers.ts`, and `validators.ts`.
|
|
135
|
-
later version of the plugin claims more.
|
|
138
|
+
`schemas.ts`, `seeders.ts`, `shapers.ts`, and `validators.ts`.
|
|
136
139
|
- The name forms read names only: a function, an export specifier, an exported import alias, and a
|
|
137
140
|
star re-export in the kind file. They never read a return type, so a `create{Name}Plugins` that
|
|
138
141
|
returns one plugin passes; review owns arity. A value binding in a kind file is the data rule's
|
|
@@ -152,20 +155,17 @@ neither reads meaning.
|
|
|
152
155
|
- The cleanup pass and independent review prove kind purity across those files. A helper misfiled
|
|
153
156
|
as a parser, a coercer misfiled as a guard, a compiler misfiled as a factory, and a shaper
|
|
154
157
|
misfiled as a cloner are review findings, not instrument diagnostics.
|
|
155
|
-
- The plugin does not decide barrel membership
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
add module resolution here to duplicate it.
|
|
158
|
+
- The plugin does not decide barrel membership: it parses each file alone and resolves no module.
|
|
159
|
+
Each package's `tests/guides.test.ts` imports the barrel and decides reachability. Add no module
|
|
160
|
+
resolution to the plugin.
|
|
159
161
|
- The kind table is mandatory whether or not an instrument can see the violation.
|
|
160
162
|
|
|
161
163
|
## Wrapper test
|
|
162
164
|
|
|
163
|
-
|
|
165
|
+
`AGENTS.md` § Design laws states the wrapper test. Apply it:
|
|
164
166
|
|
|
165
167
|
- Delete one-line delegates, pass-through factories, rename-only helpers/getters, compatibility aliases, and wrappers around semantically identical platform or declared-dependency primitives.
|
|
166
168
|
- Rename or import the real symbol and update every consumer atomically. Do not preserve a wrapper to avoid downstream edits.
|
|
167
|
-
- Do not re-export a dependency's symbol from this package.
|
|
168
|
-
- A public class method composes real entity behavior; it never exists only to forward 1:1 to a helper.
|
|
169
169
|
- Audit callers and callees after every extraction so the old path and duplicate implementation do not remain.
|
|
170
170
|
|
|
171
171
|
## Functions and orchestration
|
|
@@ -276,8 +276,6 @@ Every shape obeys:
|
|
|
276
276
|
- Never re-export a symbol originating in another package; fix consumer imports to the originating package.
|
|
277
277
|
- Implementation files export their own classes directly.
|
|
278
278
|
- Expose every intentional top-level source export through its correct environment barrel.
|
|
279
|
-
- Never let current consumer count gate later exposure. Developers receive the same supported
|
|
280
|
-
mechanisms the package uses, so they retain full control and customization.
|
|
281
279
|
- If a declaration must not be public, make it a true local or runtime-private detail, or remove
|
|
282
280
|
the capability for a substantive reason. Never leave an intentional reusable export stranded
|
|
283
281
|
outside the barrel.
|
|
@@ -290,7 +288,6 @@ Every shape obeys:
|
|
|
290
288
|
- Delete a barrel row whose class no consumer can construct, and delete its `@example` with it. A
|
|
291
289
|
row obliges a documented, runnable example, so a class kept public without one is drift that
|
|
292
290
|
parity cannot see.
|
|
293
|
-
- When a symbol moves, update every import; never leave a compatibility re-export.
|
|
294
291
|
|
|
295
292
|
```ts
|
|
296
293
|
export * from './types.js'
|
|
@@ -304,16 +301,9 @@ export * from './greeters/Greeter.js'
|
|
|
304
301
|
|
|
305
302
|
## System constraints
|
|
306
303
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
-
|
|
310
|
-
- For multiple backends, implement shared querying/paging/aggregation in one engine over those primitives. A backend may override an operation only with a genuine native fast path and otherwise falls back to the engine.
|
|
304
|
+
`AGENTS.md` § Design laws owns the minimal-API, shim, polling, and product-policy laws. This section adds:
|
|
305
|
+
|
|
306
|
+
- For multiple backends, implement shared querying/paging/aggregation in one engine over the smallest primitives. A backend may override an operation only with a genuine native fast path and otherwise falls back to the engine.
|
|
311
307
|
- Centralize any pattern repeated twice.
|
|
312
308
|
- Keep everything generic/reusable and free of unrelated-project logic.
|
|
313
|
-
-
|
|
314
|
-
its reusable top-level exports follow the earlier barrel rule without a second consumer gate.
|
|
315
|
-
- Do not remove structural files because they are empty.
|
|
316
|
-
- Prefer the smallest complete implementation that preserves architecture.
|
|
317
|
-
- No deprecation aliases, compatibility shims, or backward-compatibility branches; update all consumers atomically.
|
|
318
|
-
- No polling/busy loops or recursive microtasks as architecture. Park idle work on an event/abort wakeup and yield long work in cooperative quanta.
|
|
319
|
-
- Framework/server utilities provide mechanism—HMAC, CORS, parsing, sessions, cookies, CSRF, static serving—not product policy such as user models, login flow, or authorization.
|
|
309
|
+
- Mechanism in a framework or server utility means HMAC, CORS, parsing, sessions, cookies, CSRF, and static serving; product policy means user models, login flow, and authorization.
|
|
@@ -11,9 +11,10 @@ paths:
|
|
|
11
11
|
|
|
12
12
|
# Vue and browser rules
|
|
13
13
|
|
|
14
|
+
These rules govern Vue and browser code: where Vue lives, reactivity, composables, styling classes, and platform APIs. `AGENTS.md` § Project model owns the import boundaries of each face.
|
|
15
|
+
|
|
14
16
|
- Publish only TypeScript composables and contracts from `src/vue`; put Vue single-file components
|
|
15
17
|
in `app/vue`. Keep `.vue` files and `vue` imports out of `src/browser` and `app/browser`.
|
|
16
|
-
Apply `AGENTS.md` § Project model to imports from each Vue face.
|
|
17
18
|
- Declare `vue` in the manifest as an optional peer only for the `./vue` export. Until that
|
|
18
19
|
declaration exists, the `./vue` build refuses `vue`, `vue/*`, and `@vue/*`; after it, the build
|
|
19
20
|
externalizes `vue` and its subpaths and still refuses `@vue/*`.
|
|
@@ -31,7 +32,5 @@ function useTheme(): {
|
|
|
31
32
|
- Use utility classes for layout: flex, gap, spacing, sizing.
|
|
32
33
|
- Use the framework's token-backed semantic classes for color/chrome: `.surface`, `.button`, `.muted`, `.accent`.
|
|
33
34
|
- A `[data-theme]` change must retheme the whole interface through tokens.
|
|
34
|
-
- Add custom SCSS only when no utility provides the behavior.
|
|
35
|
-
- Integrate through the framework's Sass variables/functions instead of hand-rolled values.
|
|
36
|
-
- Never write literal colors.
|
|
35
|
+
- Add custom SCSS only when no utility provides the behavior, and write it per `.claude/rules/styles.md`, which owns literal colors and the pinned-recreation exception.
|
|
37
36
|
- Prefer native platform APIs—Popover, `<dialog>`, `hashchange` routing, native events/storage/observers—over custom replacements or added dependencies.
|
|
@@ -43,13 +43,13 @@ A package directory holds:
|
|
|
43
43
|
## Start a session
|
|
44
44
|
|
|
45
45
|
1. Read the package folder's `README.md` when present, then `plan.md` § State, then the first open chunk of § Sequence.
|
|
46
|
-
2. Run `git status --porcelain -b`, `git log @{upstream}..`, and `node .agents/skills/orkestrel-dispatch/scripts/sweep.ts --report`. Reconcile each difference with § State before you act.
|
|
46
|
+
2. Run `git status --porcelain -b`, `git log @{upstream}..`, and `node .agents/skills/orkestrel-dispatch/scripts/sweep.ts --report`. Reconcile each difference with `plan.md` § State before you act.
|
|
47
47
|
3. Act only on what the folder, the tree, and git hold. Agent memory from another machine or harness is absent.
|
|
48
48
|
|
|
49
49
|
## Hand off and close
|
|
50
50
|
|
|
51
51
|
- Keep `plan.md` § State current at every commit, and make its last line the next action.
|
|
52
52
|
- Before a session ends or its context compacts, write each ruling, decision, and next action into the folder; `.agents/orchestration.md` § Memory owns what memory can hold.
|
|
53
|
-
- When a chunk closes, remove it from § Sequence. Its closing commit carries its evidence, and § State names the commit.
|
|
53
|
+
- When a chunk closes, remove it from `plan.md` § Sequence. Its closing commit carries its evidence, and `plan.md` § State names the commit.
|
|
54
54
|
- Delete a verdict file when its seam closes.
|
|
55
55
|
- At acceptance, move each file that outlives the campaign to its root home, retarget its citations in the same change, and delete the package directory per `.agents/skills/orkestrel-debrief/references/retention.md`. Delete a top-level file when the wave or fleet campaign it records closes.
|
|
@@ -14,8 +14,7 @@ paths:
|
|
|
14
14
|
|
|
15
15
|
# Documentation and parity rules
|
|
16
16
|
|
|
17
|
-
Documentation is an enforced contract,
|
|
18
|
-
`AGENTS.md` govern its prose and are not restated here.
|
|
17
|
+
Documentation is an enforced contract. These rules govern guides, parity, examples, agent-facing surfaces, and skill files; `AGENTS.md` § Writing and `.claude/rules/writing.md` govern their prose.
|
|
19
18
|
|
|
20
19
|
## Authority and workflow
|
|
21
20
|
|
|
@@ -44,18 +43,15 @@ Documentation is an enforced contract, not explanatory decoration. The Writing r
|
|
|
44
43
|
rewriting, and remaining-drift reporting. Run `npm run test:guides` for read-only parity
|
|
45
44
|
assertions. Use
|
|
46
45
|
`npm run test:guides -- --to guide` or `npm run test:guides -- --to source` only when choosing
|
|
47
|
-
an explicit rewrite direction.
|
|
48
|
-
entry and rewrite directions in the package-owned `tests/guides.test.ts`. Scaffold must not
|
|
49
|
-
synthesize or overwrite that authored proof. Update each fleet package's authored file before
|
|
50
|
-
its release. Never weaken the gate.
|
|
46
|
+
an explicit rewrite direction. The package authors `tests/guides.test.ts`.
|
|
51
47
|
- The TSDoc voice rule governs a doc block, and a `Summary` cell carries that block's description
|
|
52
48
|
paragraph, so the same voice governs the cell. A guide tagline and a README pitch are noun
|
|
53
49
|
phrases, and each is the blockquote under its file's H1.
|
|
54
50
|
- A vendored dependency guide is a mirror. Its relative links address the upstream tree and resolve to nothing here, so they are outside local-link parity. Refresh a mirror rather than rewriting it: a rewritten copy is a translation, and no comparison against the fetched bytes can check it.
|
|
55
51
|
- Place a fence whose code is tab-indented outside a list item: inside one, `oxfmt` writes the item's continuation spaces before each tab, which `git diff --check` refuses.
|
|
56
|
-
- Falsify a prose claim the way you falsify a code claim. The parity test proves a name exists, never that a sentence about behavior is true, so run the example and read what it returns. A `// false` beside a call that returns `true` is a defect
|
|
57
|
-
|
|
58
|
-
- Re-read the prose last, against what
|
|
52
|
+
- Falsify a prose claim the way you falsify a code claim. The parity test proves a name exists, never that a sentence about behavior is true, so run the example and read what it returns. A `// false` beside a call that returns `true` is a defect. `tests/guides.test.ts` executes the flagship fences, per `.claude/rules/tests.md`.
|
|
53
|
+
- Assert a prose claim about behaviour with an executed assertion that breaks if the claim goes false: `expect(text).toContain('a spawn fault reports null')` passes unchanged when the code starts returning something else. Keep a substring check only as a presence guard beside the executed assertion, and never close a row whose close condition names a behaviour on a substring.
|
|
54
|
+
- Re-read the prose last, against what shipped. Where a change documents a limit rather than closing it, check that the sentence states the limit and neither describes the option that lost nor claims more than the code earns.
|
|
59
55
|
|
|
60
56
|
For behavioral interfaces/classes:
|
|
61
57
|
|
|
@@ -80,6 +76,15 @@ Code fences import through the package's published specifier:
|
|
|
80
76
|
|
|
81
77
|
Never use in-repository `@src/*` aliases in public guide examples; reserve them for source/tests.
|
|
82
78
|
|
|
79
|
+
## Agent-facing surfaces
|
|
80
|
+
|
|
81
|
+
A skill, a tool description, and a refusal message each teach an agent mid-task. When you write one:
|
|
82
|
+
|
|
83
|
+
- Put the critical path in the tool description, most important first: a worked example, the key nesting, and the reply shape. A harness abbreviates a nested schema and delivers the description intact; never leave the teaching to the schema.
|
|
84
|
+
- Make every refusal orient, name, or correct: state the subject, the exact key path, the expected shape, the valid candidates, and every missing and every unexpected item, in one refusal.
|
|
85
|
+
- Refuse with the correction in the message. Never coerce a malformed input and never silently drop it. Encode an untrusted identifier in a diagnostic, JSON-encoded and length-capped, so malformed input cannot fake or balloon the message.
|
|
86
|
+
- Acknowledge or state, never both: a mutation returns an acknowledgement and a read returns state. Say the split in both tools' descriptions so neither is polled for the other's job.
|
|
87
|
+
|
|
83
88
|
## Workflow skills
|
|
84
89
|
|
|
85
90
|
- Skills prescribe reusable process; they do not copy naming, placement, syntax, lifecycle, or test laws from `AGENTS.md` and rules.
|
|
@@ -87,7 +92,7 @@ Never use in-repository `@src/*` aliases in public guide examples; reserve them
|
|
|
87
92
|
- For a portable skill that teaches an external framework, takes the host project's own `AGENTS.md` file as its code law, and binds none of this repository's rule files, drop the `orkestrel-` prefix and name the skill for the framework a reader searches for. Add no other exception. The `enterprise-bootstrap` skill meets that test and keeps its name: it carries Bootstrap 5.3 craft, assumes no stack, and names the `.agents/orchestration.md` and `.claude/rules/quality.md` files only where they are present. Do not rename it into the namespace.
|
|
88
93
|
- Keep `SKILL.md` concise and route conditional detail to one-level `references/`.
|
|
89
94
|
- In a `SKILL.md`, name another skill's reference by that skill and the reference's title, never as a `references/<name>.md` path; the policy sweep attributes that token to the citing skill.
|
|
90
|
-
-
|
|
95
|
+
- In the `@orkestrel/scaffold` checkout, when you add a canonical skill, register it in `TARGET_SKILL_NAMES` in `src/core/constants.ts`, in the skill lists of `tests/distribution.test.ts`, `tests/src/core/Compiler.test.ts`, and `tests/src/core/compilers.test.ts`, and in the pointer-file count of `tests/src/bin/CLI.test.ts`, then regenerate `host.json` with a build.
|
|
91
96
|
- Name every Markdown file in a skill's `references/` from its `SKILL.md`, and delete a reference nothing names.
|
|
92
97
|
- Frontmatter contains only `name` and a trigger-focused `description`.
|
|
93
98
|
- Set `name` to the skill's own directory name.
|
|
@@ -95,10 +100,18 @@ Never use in-repository `@src/*` aliases in public guide examples; reserve them
|
|
|
95
100
|
- Do not put model routing or package version catalogs in a skill.
|
|
96
101
|
- Validate every referenced resource, leave no template TODOs, and limit each skill directory to `SKILL.md`, `agents/openai.yaml`, the `references/*.md` files its `SKILL.md` names, and the `scripts/*.ts` files its `SKILL.md` names; add no other file or directory.
|
|
97
102
|
- Put a repeatable or idempotent step of a skill in `scripts/<name>.ts`, run with `node .agents/skills/<skill>/scripts/<name>.ts` from the checkout root under Node's type stripping, and name the script, its arguments, and its exit codes from `SKILL.md` so an executor runs it instead of re-deriving the step. Name another skill's script by its full path under `.agents/skills/<skill>/scripts/`; the policy sweep attributes a bare `scripts/<name>.ts` token to the skill whose `SKILL.md` carries it and requires a qualified path to exist.
|
|
98
|
-
-
|
|
103
|
+
- Keep a skill script simple: one repeatable step its skill needs. It obeys `AGENTS.md`, `.claude/rules/typescript.md`, `.claude/rules/names.md`, and `.claude/rules/portability.md` as written, plus the no-nested-function and wrapper laws in `.claude/rules/architecture.md`, with these adaptations:
|
|
104
|
+
- It is self-contained: it declares every type, constant, and helper it needs even when another script declares the same one, and no file but its own proof imports it. The kind-file placement law stops at it, and the `@orkestrel/process` spawn rule yields to `child_process` there, because a target may not declare that package.
|
|
105
|
+
- It exports every top-level declaration, each with a doc block, so its proof can test each function.
|
|
106
|
+
- It runs `main` only when Node runs the file itself: `if (process.argv[1] !== undefined && realpathSync(process.argv[1]) === import.meta.filename)`. An import runs nothing. The `policy/no-malformed-script` lint rule refuses an unexported declaration, an export with no doc block directly above it, and any top-level statement other than an import, an exported declaration, or that one guard.
|
|
107
|
+
- Its opening comment carries the usage line and the exit codes.
|
|
108
|
+
- It spawns `process.execPath` or an executable by name with an argument array and never a shell, except the npm shim where no `npm-cli.js` sits beside the binary.
|
|
109
|
+
|
|
110
|
+
Every script has a mirrored proof at `tests/agents/skills/<skill>/scripts/<name>.test.ts`. The proof imports the script to test its functions, and drives it as a child process against a scratch fixture to test its command line. The policy sweep refuses a script without a proof and a proof that imports a file under `.agents/skills/` other than its own script, lint refuses a script import other than a `node:` module, and a proof grows a case for every defect found.
|
|
111
|
+
|
|
99
112
|
- Run a script in a target through its built twin, `node node_modules/@orkestrel/scaffold/dist/agents/skills/<skill>/scripts/<name>.js`, because Node refuses to strip types for a file under `node_modules`; `.claude/rules/workspace.md` names the `build:skills` script that emits the twins. When a script spawns a sibling script, take the extension from the running file (`extname(fileURLToPath(import.meta.url))`), so the twin spawns `.js` and the checkout spawns `.ts`. When a script resolves a file under `.agents/templates/`, add that file to the copy in `build:skills`.
|
|
100
113
|
- Resolve a sibling canon file (a template, another script) from the script's own location with `import.meta.url`, and the manifest, `tmp/`, and the test tree from the working directory, because a target runs the script from `node_modules/@orkestrel/scaffold/dist/agents/` against its own checkout.
|
|
101
|
-
- Read arguments as `--flag value` pairs
|
|
114
|
+
- Read arguments as `--flag value` pairs: the first occurrence of a flag wins, a value that opens with `--` is a missing value, and `--flag=value` is not read. Refuse every argument before a bare `--` that opens with `--` and names no flag the script reads, the `--flag=value` form included, so a mistyped flag never runs the default; a bare `--` opens a command the script passes on. Where flags select different work (`--visit` or `--plan`), the script names one operation mode per run and refuses two; where each flag adds a section to one report (`--tree` with `--headings`), the script combines them and its usage line says so. Read every value of a flag that repeats (`--range`) and say in the usage line that it repeats. Exit 64 on every usage refusal and say on stderr what was refused: the usage line when no mode or two modes were given, and the flag with the value it takes when a flag was unknown, malformed, or given with no value.
|
|
102
115
|
- Print to the terminal by default. Offer `--json` for a reader that parses, and `--out FILE` (`.txt` for a list, `.json` for a structure) where a lane reads the result later or the output would crowd a context; a written file saves the tokens a terminal dump spends. Choose per script; state each form in its usage line.
|
|
103
116
|
- Verify each API a skill instructs an executor to call against the installed package's public entry before landing the instruction, and name the entry you read. A skill that names a symbol its package does not export teaches an executor to write a dangling import.
|
|
104
117
|
- Put every symbol a skill teaches in a named import inside a Markdown fence in `SKILL.md` or a named reference. The policy sweep reads fenced value and type imports from `@orkestrel/*` declaration entries; it does not read identifiers in prose or table cells, or validate call signatures and runtime behavior.
|
|
@@ -113,10 +113,15 @@ The root design laws in `AGENTS.md` — one term per concept, boolean behavior s
|
|
|
113
113
|
- Prefer short common English; avoid jargon, abbreviations, and non-universal acronyms.
|
|
114
114
|
- Properties are nouns; methods are verbs.
|
|
115
115
|
- Booleans read as assertions: `aborted`, `exhausted`, `expired`.
|
|
116
|
+
- Name an option, a field, a result, a record, a constant, or an action for the thing or the outcome, never with an -ing word, which reads as work in progress: `final`, not `closing`; `uniform`, not `framing`; `FrameResult`, not `FrameReading`; `CAPTURE_STAGE_LIMIT`, not `CAPTURE_STAGINGS`. Four kinds of -ing word remain:
|
|
117
|
+
- a noun that carries no tense (`string`, `binding`, `finding`, `heading`, `warning`);
|
|
118
|
+
- a name that mirrors an external field under the rule below (`encoding`, `CONNECTING`);
|
|
119
|
+
- a lifecycle state that is in progress when it is read (`pending`, `running`, `stopping`);
|
|
120
|
+
- an adjective naming a condition that holds when it is read (`blocking`, `missing`, `remaining`).
|
|
116
121
|
- Accessors use bare nouns, never `get*`/`set*`.
|
|
117
122
|
- Do not alternate `count`/`length`/`size`/`total` or `abort`/`cancel`.
|
|
118
|
-
- Name the axis a discriminant varies
|
|
119
|
-
- A binary switch
|
|
123
|
+
- Name the axis a discriminant varies; `operation` and `via` are axis names beside those `AGENTS.md` lists.
|
|
124
|
+
- A binary switch such as `bail` is never `'continue' | 'halt'`; genuine discriminants, multi-state lifecycles, conventional value pairs (`ascending`/`descending`, `and`/`or`), and external-spec literals remain unions.
|
|
120
125
|
- An option key, constant, or member that transliterates an external protocol field, format field, or engine pragma keeps the external wording in this project's casing, and its TSDoc names the source it mirrors: the `foreignKeys` key mirrors the `PRAGMA foreign_keys` statement, and the `keepAlive` key mirrors the Ollama `keep_alive` field.
|
|
121
126
|
- Outside a declared wire body, a mirrored name never uses `kind` or `type` as a member name, and never uses a word § Rejected naming lists. A Compound File Binary (CFB) directory entry's object-type byte takes a named discriminant.
|
|
122
127
|
- A declared wire body — a type whose members transliterate an external wire format field for field — keeps the external field names, `type` and `kind` included, and its TSDoc names the format it transliterates. The package's own domain type carries neither word, and the package owns the projection between the wire body and the domain type.
|
|
@@ -127,14 +132,14 @@ Give every bare exported name one owning package across the `@orkestrel` fleet.
|
|
|
127
132
|
|
|
128
133
|
Check a public name against the fleet's published guides before adding it. The `surface` policy rule reports a name another package's guide already claims, and `.claude/rules/workspace.md` § Policy instruments fixes the instrument that reports it.
|
|
129
134
|
|
|
130
|
-
The rule grandfathers a source name the target's own hosted guide claims, because that guide is the target's own claim to it. It grandfathers no root `tests/setup*.ts` export
|
|
135
|
+
The rule grandfathers a source name the target's own hosted guide claims, because that guide is the target's own claim to it. It grandfathers no root `tests/setup*.ts` export. A vendored `tests/setup*.ts` module a scaffold release stages sits outside the inspected population.
|
|
131
136
|
|
|
132
137
|
Resolve a reported collision with these rules, in order.
|
|
133
138
|
|
|
134
139
|
1. **Reuse before renaming.** Where the colliding declarations carry the same contract, delete this one and import the owner's export. Declare the dependency that import needs, or stop and report that the dependency is not authorized.
|
|
135
140
|
2. **The subject keeps the name.** Where the contracts differ, leave the name with the package whose domain the name describes, and rename the other declaration for the thing it is. Refuse a rename that makes the renamed declaration vaguer; name its own contract instead.
|
|
136
141
|
3. **Qualify rather than extract.** Extract a shared package only where a proof shows the colliding declarations interchangeable and the dependency change is authorized. Otherwise qualify the name in place for the domain it serves, and route the extraction through a design round rather than renaming by fiat.
|
|
137
|
-
4. **Close the collision in the code.** Change a declaration; the rule reads no allowlist a target can add a name to, and it carries no suppression.
|
|
142
|
+
4. **Close the collision in the code.** Change a declaration; the rule reads no allowlist a target can add a name to, and it carries no suppression. Never suppress the violation, and never edit a vendored policy instrument to clear it. In the `@orkestrel/scaffold` checkout, shrink the committed `host.json` collision record by closing a collision, and never widen it to admit one.
|
|
138
143
|
|
|
139
144
|
## Acronyms
|
|
140
145
|
|
|
@@ -7,17 +7,16 @@ paths:
|
|
|
7
7
|
|
|
8
8
|
# API pattern rules
|
|
9
9
|
|
|
10
|
+
These rules govern the shape of options, managers, emitters, and contracts, and the reuse check that precedes a new primitive. `.claude/rules/architecture.md` places the files; `.claude/rules/names.md` names the members.
|
|
11
|
+
|
|
10
12
|
## Declared ecosystem capabilities
|
|
11
13
|
|
|
12
|
-
Before writing a guard, parser, combinator, outcome, safe exception boundary, contract shape/compiler, schema utility, error narrower, emitter helper, or other general primitive:
|
|
14
|
+
`AGENTS.md` § Non-negotiable rules owns the reuse law. Before writing a guard, parser, combinator, outcome, safe exception boundary, contract shape/compiler, schema utility, error narrower, emitter helper, or other general primitive:
|
|
13
15
|
|
|
14
16
|
1. Inspect `package.json`, the lockfile, vendored dependency guides, and exact installed declarations/exports.
|
|
15
17
|
2. Build a semantic overlap map between the proposed/local behavior and declared `@orkestrel/*` capabilities.
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
18
|
-
5. Test the difference. Similar names are not proof of equivalent semantics.
|
|
19
|
-
|
|
20
|
-
Never reimplement or rename-wrap a declared package primitive. Do not add an ecosystem dependency unless the user explicitly authorizes it.
|
|
18
|
+
3. Keep local behavior only when it adds a real domain invariant, composition, projection, translation, or intentionally different contract.
|
|
19
|
+
4. Test the difference. Similar names are not proof of equivalent semantics.
|
|
21
20
|
|
|
22
21
|
## Options
|
|
23
22
|
|
|
@@ -120,7 +119,7 @@ Use these orthogonal contract mechanisms:
|
|
|
120
119
|
|
|
121
120
|
- Use plain guards/parsers for small contracts.
|
|
122
121
|
- Use the shape DSL only when validation, serialization, and generation parity earns its complexity.
|
|
123
|
-
- When `@orkestrel/contract` is declared, use its exact installed guards, parsers, combinators, outcomes, `attempt` boundary, and shape DSL wherever their semantics match.
|
|
122
|
+
- When `@orkestrel/contract` is declared, use its exact installed guards, parsers, combinators, outcomes, `attempt` boundary, and shape DSL wherever their semantics match.
|
|
124
123
|
- A guard never throws for any input, including cycles, deep nesting, revoked proxies, throwing accessors, or exotic prototypes; return false.
|
|
125
124
|
- Recursive guards track ancestors and cap depth.
|
|
126
125
|
- Recursion enters only through an explicit lazy gate.
|
|
@@ -93,7 +93,7 @@ and the form of a conditional skip.
|
|
|
93
93
|
- Write every `package.json` script as a portable command: a Node invocation or an installed binary.
|
|
94
94
|
Never name a `.sh` file there.
|
|
95
95
|
- Keep `#!/usr/bin/env node` on an npm bin. npm writes the Windows shim from it.
|
|
96
|
-
-
|
|
96
|
+
- Give the Claude Code Cloud session hooks in `scripts/`, the one bash exception `AGENTS.md` admits, `.gitattributes` `eol=lf`. The policy sweep refuses a shell, PowerShell, Python, or batch file outside `scripts/` and any file but a `.sh` file inside it.
|
|
97
97
|
- Spawn a command from a script with an argument array and no shell, so quoting is the same on every host; resolve a `.cmd` shim to the JavaScript entry it wraps rather than spawning the shim.
|
|
98
98
|
|
|
99
99
|
## Claims
|
|
@@ -8,6 +8,8 @@ paths:
|
|
|
8
8
|
|
|
9
9
|
# Evidence, probes, and completion rules
|
|
10
10
|
|
|
11
|
+
These rules govern how a claim is established: the evidence read before a change, the probes and instruments that settle a question, performance measurement, and the completion check.
|
|
12
|
+
|
|
11
13
|
## Evidence before change
|
|
12
14
|
|
|
13
15
|
- Read the authoritative `types.ts` and the decision-bearing implementation first-hand. Delegate bulk reading, never the owning decision.
|
|
@@ -34,7 +36,7 @@ paths:
|
|
|
34
36
|
- When the question supplies no project, no case, or no control, write a probe per `.claude/rules/tests.md` § Probes and report the probe's control and coverage.
|
|
35
37
|
- When no `probe` server is registered, register one outside the repository in the harness's user or local MCP scope, pointing at `node_modules/@orkestrel/probe/dist/bin/main.js`, and start it in the repository whose projects the question names. A scaffold target holds no `.mcp.json`.
|
|
36
38
|
- When a question concerns what a rendered page shows or does, drive the page through the tools the `browse` MCP server registers and read what they return before arguing from source. Accept a surface through journey tests, never through a `browse` session; `.agents/skills/orkestrel-journey/references/recorded.md` rules how a recorded journey counts.
|
|
37
|
-
- When no `browse` server is registered and the workspace declares `@orkestrel/browser`, register one outside the repository in the harness's user or local MCP scope, running `node` with the argument `node_modules/@orkestrel/browser/dist/bin/main.js`, and start it in the repository root. Leave `BROWSE_ROOT` unset so the server writes under `tmp/browsers
|
|
39
|
+
- When no `browse` server is registered and the workspace declares `@orkestrel/browser`, register one outside the repository in the harness's user or local MCP scope, running `node` with the argument `node_modules/@orkestrel/browser/dist/bin/main.js`, and start it in the repository root. Leave `BROWSE_ROOT` unset so the server writes under `tmp/browsers/`, and set `BROWSE_HEADLESS=false` only while a person watches the window. `guides/browser.md` § Register the browse binary with Claude Code lists every `BROWSE_*` variable.
|
|
38
40
|
- When the workspace builds the surface into a `showcase/<application>.html` page, serve that page before navigating: run the `build:showcase` script, or the `build:showcase:<framework>` script for a framework mode, then serve the `showcase/` directory with `npx vite preview --config configs/app/vite.showcase.config.ts` and navigate to the page by its file name. Never navigate to a `file:` URL; `browse` refuses every scheme but `http:` and `https:`.
|
|
39
41
|
- When the workspace builds no showcase page for the surface, or the question needs what one HTML file does not carry (a second route, a separately requested asset, or a source edit shown without a rebuild), start the `dev` script, or the `dev:<framework>` script for a framework face, and navigate to the address the script prints.
|
|
40
42
|
- When the surface calls an API, start every server it calls before navigating, each on a port apart from the page's server: a third-party backend by its own start command, and the project's `src/server` or `app/server` surface by the script that starts it, which is the `serve:build` script for `app/server`.
|
|
@@ -57,9 +59,8 @@ paths:
|
|
|
57
59
|
|
|
58
60
|
## Ecosystem reuse
|
|
59
61
|
|
|
60
|
-
- Prove a semantic difference before keeping a local variant of an installed primitive.
|
|
62
|
+
- Prove a semantic difference before keeping a local variant of an installed primitive, per `.claude/rules/patterns.md` § Declared ecosystem capabilities.
|
|
61
63
|
- Fix a reusable defect in the lowest package that owns the mechanism; keep product policy downstream.
|
|
62
|
-
- Never re-export a dependency's symbol.
|
|
63
64
|
|
|
64
65
|
## Production hardening
|
|
65
66
|
|
|
@@ -68,9 +69,7 @@ paths:
|
|
|
68
69
|
- Test observable invariants at each seam with real implementations; use a dedicated real-service project for external behavior.
|
|
69
70
|
- Treat "works with an external client" as unproven until one representative real client has driven it end to end.
|
|
70
71
|
- Audit test discovery, counts, skipped and todo tests, cleanup, and assertion adequacy before acceptance. Coverage is not adequacy.
|
|
71
|
-
- Add an independent review for security, destructive paths, concurrency, protocols, or untrusted input, per the size gate in `.agents/orchestration.md`.
|
|
72
72
|
|
|
73
73
|
## Completion
|
|
74
74
|
|
|
75
75
|
- Sweep centralization, wrappers, test helpers, and text integrity after implementation and before gates.
|
|
76
|
-
- Stop when the enumerated scope is closed and the gates the size gate names are green. The next scope is the deliverable; a further pass needs a further instruction from the user.
|
|
@@ -59,8 +59,8 @@ SCSS mirrors TypeScript centralization. Concrete token prefixes are project-spec
|
|
|
59
59
|
custom-property value is the one text Sass emits verbatim, so write every custom-property
|
|
60
60
|
declaration in a literal partial as a Sass string interpolation (`--name: #{'VALUE'};`), which the
|
|
61
61
|
formatter reads as a string and Sass emits byte for byte. Keep a pinned expected output in a JSON
|
|
62
|
-
fixture, never in a CSS file the formatter would canonicalise. The face's byte proofs
|
|
63
|
-
|
|
62
|
+
fixture, never in a CSS file the formatter would canonicalise. The face's byte proofs hold under
|
|
63
|
+
`npm run format`.
|
|
64
64
|
- Never repeat per-color/per-variant blocks; drive shared structure with one `@each` over a shared list.
|
|
65
65
|
- If a pattern appears in at least two partials, move it to `_mixins.scss`.
|
|
66
66
|
- Treat a declaration block two partials share because each records an external value as a
|