@orkestrel/scaffold 0.0.21 → 0.0.23
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/bin/scaffold.js +371 -140
- package/dist/bin/scaffold.js.map +1 -1
- package/dist/host/AGENTS.md +61 -42
- package/dist/host/CLAUDE.md +39 -408
- package/dist/host/agents/orchestration.md +454 -0
- package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +25 -7
- package/dist/host/agents/skills/orkestrel-align-packages/SKILL.md +2 -2
- package/dist/host/agents/skills/orkestrel-build-application/SKILL.md +42 -31
- package/dist/host/agents/skills/orkestrel-build-application/references/application.md +129 -0
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +3 -3
- package/dist/host/agents/skills/orkestrel-debrief/references/field-testing.md +2 -2
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +167 -0
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +98 -0
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +148 -0
- package/dist/host/agents/skills/orkestrel-harden-package/SKILL.md +4 -2
- package/dist/host/agents/skills/orkestrel-harden-package/references/centralization.md +5 -5
- package/dist/host/agents/skills/orkestrel-harden-package/references/research.md +2 -0
- package/dist/host/agents/skills/orkestrel-polish-surface/SKILL.md +11 -6
- package/dist/host/claude/agents/analyst.md +59 -0
- package/dist/host/claude/agents/application.md +1 -1
- package/dist/host/claude/agents/builder.md +1 -1
- package/dist/host/claude/agents/checker.md +5 -1
- package/dist/host/claude/agents/codex.md +120 -94
- package/dist/host/claude/agents/grok.md +44 -32
- package/dist/host/claude/agents/implementer.md +1 -1
- package/dist/host/claude/agents/orkestrel.md +5 -5
- package/dist/host/claude/agents/planner.md +9 -3
- package/dist/host/claude/agents/researcher.md +6 -5
- package/dist/host/claude/agents/reviewer.md +12 -6
- package/dist/host/claude/agents/scout.md +7 -4
- package/dist/host/claude/agents/verifier.md +1 -1
- package/dist/host/claude/rules/application.md +17 -16
- package/dist/host/claude/rules/architecture.md +41 -22
- package/dist/host/claude/rules/documentation.md +2 -1
- package/dist/host/claude/rules/names.md +7 -6
- package/dist/host/claude/rules/quality.md +65 -18
- package/dist/host/claude/rules/styles.md +1 -1
- package/dist/host/claude/rules/tests.md +12 -6
- package/dist/host/claude/rules/typescript.md +1 -1
- package/dist/host/claude/rules/workspace.md +6 -3
- package/dist/host/claude/settings.json +2 -0
- package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +10 -0
- package/dist/host/codex/agents/analyst.toml +13 -4
- package/dist/host/codex/agents/checker.toml +1 -1
- package/dist/host/codex/agents/grok.toml +2 -1
- package/dist/host/codex/agents/opus.toml +1 -1
- package/dist/host/codex/agents/planner.toml +1 -1
- package/dist/host/codex/agents/researcher.toml +2 -2
- package/dist/host/codex/agents/reviewer.toml +1 -1
- package/dist/host/codex/agents/scout.toml +2 -2
- package/dist/host/codex/config.toml +23 -70
- package/dist/host/cursor/rules/orchestration.mdc +33 -0
- package/dist/host/guides/src/scaffold.md +339 -125
- package/dist/host/manifest.json +47 -1
- package/dist/host/tests/setupPolicy.ts +210 -3
- package/dist/src/core/index.cjs +477 -69
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +132 -43
- package/dist/src/core/index.d.ts +132 -43
- package/dist/src/core/index.js +474 -70
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +83 -33
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +43 -27
- package/dist/src/server/index.d.ts +43 -27
- package/dist/src/server/index.js +84 -35
- package/dist/src/server/index.js.map +1 -1
- package/package.json +4 -4
package/dist/host/AGENTS.md
CHANGED
|
@@ -5,19 +5,18 @@
|
|
|
5
5
|
|
|
6
6
|
## Authority and loading
|
|
7
7
|
|
|
8
|
-
- These instructions apply to every project in this style
|
|
9
|
-
- The user's current instruction wins. Otherwise
|
|
10
|
-
- `*/types.ts` is authoritative for public APIs. Implementation and tests conform to it
|
|
11
|
-
-
|
|
12
|
-
- `.
|
|
13
|
-
-
|
|
14
|
-
- External delegates, including Cursor and Codex/OpenAI models, have no exemption. Every dispatch must restate the non-negotiables, applicable rules, guide/spec, and owned files; every result receives independent review.
|
|
8
|
+
- These instructions apply to every project in this style. Never import assumptions, names, or logic from another repository.
|
|
9
|
+
- The user's current instruction wins. Otherwise this file and its linked rules outrank existing code. Existing code is evidence to verify, not ground truth.
|
|
10
|
+
- `*/types.ts` is authoritative for public APIs. Implementation and tests conform to it. Never undo a user's type edit.
|
|
11
|
+
- `.agents/orchestration.md` governs agent operation only and cannot weaken this coding contract. `CLAUDE.md`, `.codex/config.toml`, and `.cursor/rules/` are harness bridges to it and carry no independent coding policy.
|
|
12
|
+
- `.agents/skills/` contains reusable workflows. An explicitly invoked or dispatch-named skill and its required references are binding process instructions, but cannot weaken this file, the applicable rules, or the governing guide or spec.
|
|
13
|
+
- External delegates, including Cursor and Codex models, have no exemption. Every dispatch restates the non-negotiables, applicable rules, guide or spec, and owned files. Every result receives independent review.
|
|
15
14
|
- Before working, read in order:
|
|
16
15
|
1. this file;
|
|
17
16
|
2. every applicable file in `.claude/rules/` from the rule map below;
|
|
18
17
|
3. every explicitly invoked or dispatch-named skill and the references it requires;
|
|
19
|
-
4. `guides/README.md`, the matching guide
|
|
20
|
-
- Rules state **how to write**. Guides
|
|
18
|
+
4. `guides/README.md`, the matching guide or spec, and `ROADMAP.md` when present.
|
|
19
|
+
- Rules state **how to write**. Guides and specs state **what to build** and the domain workflow. When they conflict, stop and surface the conflict.
|
|
21
20
|
|
|
22
21
|
## Project model
|
|
23
22
|
|
|
@@ -29,10 +28,12 @@ configs/ thin target wrappers around root Vite/TypeScript configuration
|
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
- `core` is host-independent. Browser and server may import core; core imports neither.
|
|
32
|
-
- `app/core` is host-independent. `app/server` may import app/core plus core
|
|
33
|
-
-
|
|
31
|
+
- `app/core` is host-independent. `app/server` may import app/core plus core and server libraries, never browser code. `app/browser` may import app/core plus core and browser libraries, and reaches server behavior through shared contracts and transports, never through Node or server implementation imports.
|
|
32
|
+
- Enforce environment boundaries with the project toolchain directly: Oxlint restricts declared package, alias, and conventional relative imports; scoped TypeScript projects remove host globals from core and the opposite host; Vite resolves and builds the selected Vue/browser and Node/server graphs; generated-consumer tests exercise those real configurations.
|
|
33
|
+
- Published source never imports private app code. Core stays host-independent. Browser and server stay disjoint.
|
|
34
|
+
- Do not add a second parser or source-language analyzer to duplicate TypeScript, Oxlint, Vue, HTML, CSS, or Vite.
|
|
34
35
|
- `tsconfig.json`, `vite.config.ts`, and each `*/types.ts` are their respective sources of truth.
|
|
35
|
-
- Use only the environments the project needs
|
|
36
|
+
- Use only the environments the project needs. Do not delete structural files merely because they are empty.
|
|
36
37
|
|
|
37
38
|
## Non-negotiable rules
|
|
38
39
|
|
|
@@ -47,71 +48,74 @@ configs/ thin target wrappers around root Vite/TypeScript configuration
|
|
|
47
48
|
- **NEVER** use default exports except where a framework requires them, such as Vue SFCs or config files.
|
|
48
49
|
- **NEVER** use mocks, behavioral fakes, module replacement, framework spies, or fake clocks to simulate project-owned behavior. Use real implementations, recorders, temporary resources, protocol-faithful fixture servers, and inert customizable data stubs.
|
|
49
50
|
- **ALWAYS** make interface properties and public return collections readonly.
|
|
50
|
-
- **ALWAYS** define reusable
|
|
51
|
-
- **ALWAYS** inspect the exact declared
|
|
51
|
+
- **ALWAYS** define reusable and public types in `*/types.ts` before implementation.
|
|
52
|
+
- **ALWAYS** inspect the exact declared and installed `@orkestrel/*` capabilities before implementing overlapping logic. Reuse a primitive when its semantics match, and do not wrap it merely to rename it.
|
|
52
53
|
- **ALWAYS** finish the requested implementation: no empty stubs, deferred logic, or concealed follow-up work.
|
|
53
54
|
- **ALWAYS** follow the repository's naming, placement, export, and dependency-direction rules exactly.
|
|
54
55
|
|
|
55
56
|
## Design laws
|
|
56
57
|
|
|
57
58
|
- **Types first.** Public contracts precede implementation.
|
|
58
|
-
- **Single-word entity APIs.** Properties, methods, option keys, and events use one descriptive word. If one word is insufficient, change the shape: group options, extract a sub-entity
|
|
59
|
+
- **Single-word entity APIs.** Properties, methods, option keys, and events use one descriptive word. If one word is insufficient, change the shape: group options, extract a sub-entity or manager, or split behaviors.
|
|
59
60
|
- **Self-describing helpers.** Module-scope helpers normally use `{verb}{Noun}` because they lack entity context.
|
|
60
|
-
- **One concept, one term.** Do not alternate synonyms
|
|
61
|
+
- **One concept, one term.** Do not alternate synonyms. Lifecycle verbs have fixed meanings.
|
|
61
62
|
- **Boolean behavior.** A binary behavioral switch is a boolean, not a two-literal union.
|
|
62
|
-
- **Real domain states only.** Literal unions represent irreducible modes, phases, discriminants, or external values—not decorative labels for already
|
|
63
|
+
- **Real domain states only.** Literal unions represent irreducible modes, phases, discriminants, or external values — not decorative labels for facts already represented.
|
|
63
64
|
- **Absence is `undefined`.** Never invent sentinels such as `'none'`, `'unset'`, `'unknown'`, `''`, or `-1`. Use `null` only when an external format distinguishes it from omission.
|
|
64
|
-
- **Derive state.** Compute facts from existing fields
|
|
65
|
+
- **Derive state.** Compute facts from existing fields. Do not store a second flag or label that can drift.
|
|
65
66
|
- **Named discriminants.** Name the axis that varies (`relationship`, `command`, `category`), never `kind` or `type`.
|
|
66
67
|
- **Centralize by kind.** Types, constants, helpers, validators, parsers, factories, errors, and similar declarations live in their designated centralized files. Implementation files contain one class plus imports.
|
|
67
|
-
- **Export and test reusable logic.** No hidden module helpers or declarations
|
|
68
|
-
- **No nested functions.** Extract function declarations
|
|
69
|
-
- **Functional core, imperative shell.** Export pure leaves
|
|
68
|
+
- **Export and test reusable logic.** No hidden module helpers or declarations. Fold trivial one-use logic into its caller, or export it from the correct centralized module and test it.
|
|
69
|
+
- **No nested functions.** Extract function declarations and assignments from bodies. The only exceptions are an anonymous callback passed directly as an argument and an anonymous function returned directly as a result.
|
|
70
|
+
- **Functional core, imperative shell.** Export pure leaves. Keep stateful or defining orchestration as class methods. Classes compose behavior; they do not forward 1:1 to helpers.
|
|
70
71
|
- **No superfluous wrappers.** A wrapper must add a boundary, invariant, composition, translation, lifecycle, or materially narrower contract. Otherwise use or rename the real symbol and update every consumer.
|
|
71
|
-
- **Minimal public API.** Add capability with its real consumer; do not speculate. Prefer one minimal interface and one shared engine, allowing native backend overrides only for genuine faster paths.
|
|
72
|
-
- **No compatibility shims.** This is greenfield
|
|
72
|
+
- **Minimal public API.** Add or substantively expand a capability with its first real consumer; do not speculate. This is a creation gate, never a later visibility gate. Once an intentional reusable capability exists, expose its top-level source exports through the correct environment barrel regardless of which consumers currently use them, so developers receive the same supported mechanisms the package uses. Remove a symbol only when the capability itself should not exist. Prefer one minimal interface and one shared engine, allowing native backend overrides only for genuine faster paths.
|
|
73
|
+
- **No compatibility shims.** This is greenfield. Update every consumer in the same change.
|
|
73
74
|
- **Mechanism, not product policy.** Framework code supplies reusable mechanisms and stops before application decisions.
|
|
74
|
-
- **No polling architecture.** Park idle work on events
|
|
75
|
+
- **No polling architecture.** Park idle work on events and abort signals. Yield long work cooperatively.
|
|
75
76
|
|
|
76
77
|
## TTTDD: Types Then Tests Driven Development
|
|
77
78
|
|
|
78
|
-
1. **Types:** define or revise the contract in `*/types.ts
|
|
79
|
-
2. **Implementation:** conform exactly to the types
|
|
79
|
+
1. **Types:** define or revise the contract in `*/types.ts`. Entity-scoped names satisfy the naming rules and properties are readonly.
|
|
80
|
+
2. **Implementation:** conform exactly to the types. Place every declaration in its prescribed file.
|
|
80
81
|
3. **Consolidation:** remove duplication and route repeated behavior through one shared implementation.
|
|
81
82
|
4. **Tests:** cover happy paths, edge cases, failures, and boundary values with targeted deterministic tests.
|
|
82
|
-
5. **Documentation:** update the matching guide
|
|
83
|
+
5. **Documentation:** update the matching guide or spec and parity coverage.
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
- Treat a mid-task type change from the user as immediately authoritative. Type failures identify implementation that has not caught up.
|
|
86
|
+
- Insert a failing proof before fixing a defect: record the exact command and its failing count, implement, then record the same command green. A test that never ran red does not bind to the defect it claims.
|
|
87
|
+
- Run the question rather than reasoning about it. Get the smallest real input through the real code and read the real output, as early as the question can be put under a test. Reasoning chooses what to run and interprets what comes back; it never replaces the run.
|
|
88
|
+
- Test your own assumptions before relying on them, and before stating them. A probe needs no dispute to justify it, and an unverified belief you put into context becomes a fact for everything downstream.
|
|
89
|
+
- Follow the applicable repository skill for comprehensive hardening, research, centralization, contract adoption, real-service integration, or cross-package alignment.
|
|
90
|
+
- Leave no current-scope requirement as a TODO, skipped test, deferred row, or hidden follow-up.
|
|
91
|
+
- Define completion before starting. Enumerate the capabilities the change owns and what closing each one requires. That enumeration is current scope and is fixed when the work begins. Record a finding outside it against the capability that owns it, for the next change, rather than reopening this one.
|
|
89
92
|
|
|
90
93
|
## Work process
|
|
91
94
|
|
|
92
|
-
1. **Understand:** clarify scope and entities
|
|
95
|
+
1. **Understand:** clarify scope and entities, and state what completion requires, before starting. Read `*/types.ts`, the rule files, the applicable skill, and the matching guide before editing.
|
|
93
96
|
2. **Research:** when requested or externally material, verify current primary sources and build a capability/defect matrix before changing the API.
|
|
94
97
|
3. **Design:** change types first and typecheck the proposed contract.
|
|
95
98
|
4. **Implement:** match the interface, reuse declared ecosystem primitives, extract centralized logic, and update the sole barrel.
|
|
96
99
|
5. **Consolidate:** remove duplication, nested declarations, and superfluous wrappers without expanding the API.
|
|
97
|
-
6. **Test:** mirror source structure, challenge the applicable seams with real implementations, and run the narrowest relevant project.
|
|
100
|
+
6. **Test:** mirror source structure, challenge the applicable seams with real implementations, and run the narrowest relevant project. Reach this step early and often, not once at the end. A question answered by a test is settled; the same question answered in prose is still open.
|
|
98
101
|
7. **Document:** update the guide, examples, and parity contract.
|
|
99
|
-
8. **Verify:** audit discovery
|
|
102
|
+
8. **Verify:** audit discovery, deferrals, and package contents as applicable. Run the required gates and read their actual output before claiming success.
|
|
100
103
|
|
|
101
|
-
Quality gates before commit, in order
|
|
104
|
+
Quality gates before commit, in order. The acceptance gate is the non-mutating variant; run the mutating `format` and `lint` first only to converge, then prove with the checks:
|
|
102
105
|
|
|
103
106
|
```text
|
|
104
107
|
npm run format:check → npm run lint:check → npm run check → npm run build → npm test
|
|
105
108
|
```
|
|
106
109
|
|
|
107
|
-
- Use scoped checks
|
|
110
|
+
- Use scoped checks and tests during development. Do not run the whole suite casually.
|
|
108
111
|
- Type error: read the complete diagnostic, compare implementation with `*/types.ts`, fix one cause, and rerun the relevant check.
|
|
109
|
-
- Unused contract symbol: stop
|
|
110
|
-
- Compound entity member: stop
|
|
112
|
+
- Unused contract symbol: stop. Implement it or leave the prescribed TODO. Never delete it for lint.
|
|
113
|
+
- Compound entity member: stop. Correct the API shape before implementation. This does not apply to descriptive module helpers.
|
|
114
|
+
- Scope closed and gates green: stop. Report the outcome and move to the next scope. Another pass over the same surface is a new instruction, not diligence.
|
|
111
115
|
|
|
112
116
|
## Rule map
|
|
113
117
|
|
|
114
|
-
|
|
118
|
+
Every file below is a normative extension of this root. Read every rule relevant to the files or concepts you touch. Path frontmatter only controls Claude's automatic loading.
|
|
115
119
|
|
|
116
120
|
| Rule | Governs |
|
|
117
121
|
| -------------------------------- | ---------------------------------------------------------------------- |
|
|
@@ -130,11 +134,26 @@ All files below are normative extensions of this root. Read every rule relevant
|
|
|
130
134
|
## Documentation contract
|
|
131
135
|
|
|
132
136
|
- Specs precede code. Read the matching guide, form the intended design, then compare the implementation.
|
|
133
|
-
-
|
|
137
|
+
- Keep public exports and behavioral methods in guide parity. TypeScript, SCSS, Markdown, tests, and showcase must agree.
|
|
134
138
|
- Never suppress a parity failure. Correct the drift.
|
|
135
139
|
|
|
136
140
|
## Communication
|
|
137
141
|
|
|
138
142
|
- Do the obvious work without asking for ceremonial permission.
|
|
139
|
-
- Keep chat summaries short
|
|
143
|
+
- Keep chat summaries short. Show exact changes as diffs when useful.
|
|
140
144
|
- Never claim a gate passed until you ran it and read the result.
|
|
145
|
+
|
|
146
|
+
### Writing
|
|
147
|
+
|
|
148
|
+
This governs prose everywhere: chat replies, instruction files, guides, TSDoc, commit messages, and briefs.
|
|
149
|
+
|
|
150
|
+
- Write plainly. Say what you mean; mean what you say.
|
|
151
|
+
- Lead with the decision or the finding. Do not build up to it.
|
|
152
|
+
- One idea per sentence. Keep sentences short.
|
|
153
|
+
- Use the active voice, and the imperative for instructions.
|
|
154
|
+
- State the rule first. Add rationale only when it changes a judgment call, and keep it subordinate.
|
|
155
|
+
- Do not write aphorisms, metaphors, or rhetorical flourish. An aphorism is a memory device for a person; it carries no instruction an agent can act on.
|
|
156
|
+
- Do not use a long or technical word where a short common one works.
|
|
157
|
+
- Keep all substance, nuance, and precision. Cut only what makes text hard to read.
|
|
158
|
+
- Present a tradeoff as option, cost, and recommendation — not as a balanced meditation.
|
|
159
|
+
- Write requirements so they are specific and testable. Replace evaluative words such as "user friendly" or "hardened further" with the concrete condition that closes them.
|