@orkestrel/scaffold 0.0.76 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/skills/orkestrel-dispatch/scripts/bench.js +204 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +102 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/cite.js +95 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/helpers.js +207 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/launch.js +108 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/login.js +114 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/result.js +108 -0
- package/dist/agents/skills/orkestrel-dispatch/scripts/sweep.js +156 -0
- package/dist/agents/skills/orkestrel-harden/scripts/discovery.js +196 -0
- package/dist/agents/skills/orkestrel-publish/scripts/compare.js +206 -0
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +93 -0
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +458 -0
- package/dist/agents/skills/orkestrel-publish/scripts/window.js +188 -0
- package/dist/agents/skills/orkestrel-scout/scripts/map.js +300 -0
- package/dist/agents/templates/brief.md +55 -0
- package/dist/bin/main.js +4 -2
- package/dist/bin/main.js.map +1 -1
- package/dist/host/AGENTS.md +77 -135
- package/dist/host/agents/orchestration.md +147 -927
- package/dist/host/agents/skills/enterprise-bootstrap/SKILL.md +2 -2
- package/dist/host/agents/skills/enterprise-bootstrap/references/inspection.md +1 -1
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/SKILL.md +6 -13
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/references/fleet.md +5 -7
- package/dist/host/agents/skills/{orkestrel-build-application → orkestrel-build}/SKILL.md +11 -22
- package/dist/host/agents/skills/{orkestrel-build-application → orkestrel-build}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +8 -16
- package/dist/host/agents/skills/orkestrel-debrief/references/instruction-audit.md +3 -3
- package/dist/host/agents/skills/orkestrel-debrief/references/retention.md +13 -13
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +61 -0
- package/dist/host/agents/skills/orkestrel-dispatch/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-dispatch/references/bench.md +25 -0
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +32 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/bench.ts +259 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +110 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/cite.ts +115 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/helpers.ts +239 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/launch.ts +124 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/login.ts +123 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/result.ts +129 -0
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/sweep.ts +157 -0
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +42 -193
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +38 -108
- package/dist/host/agents/skills/orkestrel-falsify/references/reconcile.md +35 -134
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/SKILL.md +10 -14
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/hardening.md +3 -4
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +228 -0
- package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/SKILL.md +15 -23
- package/dist/host/agents/skills/orkestrel-journey/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/captures.md +1 -1
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/SKILL.md +25 -33
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/agents/openai.yaml +1 -1
- package/dist/host/agents/skills/{orkestrel-polish-surface → orkestrel-polish}/references/capture-harness.md +3 -3
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +33 -20
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +39 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +22 -21
- package/dist/host/agents/skills/orkestrel-publish/references/window.md +27 -14
- package/dist/host/agents/skills/orkestrel-publish/scripts/compare.ts +220 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +114 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +629 -0
- package/dist/host/agents/skills/orkestrel-publish/scripts/window.ts +242 -0
- package/dist/host/agents/skills/orkestrel-scout/SKILL.md +28 -0
- package/dist/host/agents/skills/orkestrel-scout/agents/openai.yaml +4 -0
- package/dist/host/agents/skills/orkestrel-scout/scripts/map.ts +352 -0
- package/dist/host/agents/templates/brief.md +21 -142
- package/dist/host/agents/transports/claude-cli.md +21 -0
- package/dist/host/agents/transports/codex.md +38 -159
- package/dist/host/agents/transports/cursor.md +16 -65
- package/dist/host/claude/AGENTS.md +38 -0
- package/dist/host/claude/agents/analyst.md +14 -53
- package/dist/host/claude/agents/astra.md +26 -0
- package/dist/host/claude/agents/builder.md +14 -30
- package/dist/host/claude/agents/checker.md +13 -57
- package/dist/host/claude/agents/distiller.md +11 -26
- package/dist/host/claude/agents/grok.md +12 -35
- package/dist/host/claude/agents/opus.md +14 -30
- package/dist/host/claude/agents/planner.md +10 -44
- package/dist/host/claude/agents/researcher.md +11 -30
- package/dist/host/claude/agents/reviewer.md +11 -95
- package/dist/host/claude/agents/scout.md +9 -23
- package/dist/host/claude/agents/verifier.md +15 -33
- package/dist/host/claude/rules/documentation.md +8 -2
- package/dist/host/claude/rules/portability.md +7 -1
- package/dist/host/claude/rules/quality.md +36 -96
- package/dist/host/claude/rules/styles.md +3 -0
- package/dist/host/claude/rules/tests.md +6 -3
- package/dist/host/claude/rules/workspace.md +19 -15
- package/dist/host/claude/rules/writing.md +57 -108
- package/dist/host/claude/settings.json +5 -3
- package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +1 -1
- package/dist/host/claude/skills/{orkestrel-align-packages → orkestrel-align}/SKILL.md +2 -2
- package/dist/host/claude/skills/{orkestrel-build-application → orkestrel-build}/SKILL.md +2 -2
- package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +11 -0
- package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +2 -1
- package/dist/host/claude/skills/{orkestrel-harden-package → orkestrel-harden}/SKILL.md +2 -2
- package/dist/host/claude/skills/{orkestrel-prove-journey → orkestrel-journey}/SKILL.md +2 -2
- package/dist/host/claude/skills/orkestrel-polish/SKILL.md +12 -0
- package/dist/host/claude/skills/orkestrel-scout/SKILL.md +11 -0
- package/dist/host/codex/agents/analyst.toml +15 -32
- package/dist/host/codex/agents/astra.toml +25 -0
- package/dist/host/codex/agents/builder.toml +13 -20
- package/dist/host/codex/agents/checker.toml +13 -27
- package/dist/host/codex/agents/distiller.toml +9 -22
- package/dist/host/codex/agents/grok.toml +11 -30
- package/dist/host/codex/agents/opus.toml +14 -22
- package/dist/host/codex/agents/orkestrel.toml +1 -1
- package/dist/host/codex/agents/planner.toml +11 -28
- package/dist/host/codex/agents/researcher.toml +10 -22
- package/dist/host/codex/agents/reviewer.toml +11 -27
- package/dist/host/codex/agents/scout.toml +11 -17
- package/dist/host/codex/agents/verifier.toml +16 -12
- package/dist/host/codex/config.toml +20 -23
- package/dist/host/cursor/mcp.json +0 -4
- package/dist/host/cursor/rules/orchestration.mdc +12 -20
- package/dist/host/dotfiles/mcp.json +0 -4
- package/dist/host/dotfiles/oxlintrc.json +7 -0
- package/dist/host/guides/probe.md +9 -9
- package/dist/host/guides/scaffold.md +117 -71
- package/dist/host/guides/test.md +1 -1
- package/dist/host/manifest.json +322 -185
- package/dist/host/scripts/codex.sh +2 -2
- package/dist/host/tests/config.test.ts +68 -46
- package/dist/host/tests/policy.test.ts +1 -5
- package/dist/host/tests/setupPolicy.ts +179 -4
- package/dist/src/core/index.cjs +255 -84
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +94 -29
- package/dist/src/core/index.d.ts +94 -29
- package/dist/src/core/index.js +253 -85
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +55 -9
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +29 -4
- package/dist/src/server/index.d.ts +29 -4
- package/dist/src/server/index.js +56 -11
- package/dist/src/server/index.js.map +1 -1
- package/package.json +15 -11
- package/dist/host/CLAUDE.md +0 -61
- package/dist/host/agents/skills/orkestrel-prove-journey/agents/openai.yaml +0 -4
- package/dist/host/agents/transports/claude.md +0 -49
- package/dist/host/claude/agents/application.md +0 -36
- package/dist/host/claude/agents/sol.md +0 -61
- package/dist/host/claude/skills/orkestrel-polish-surface/SKILL.md +0 -12
- package/dist/host/codex/agents/application.toml +0 -25
- package/dist/host/codex/agents/sol.toml +0 -19
- /package/dist/host/agents/skills/{orkestrel-align-packages → orkestrel-align}/references/integration.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/centralization.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/contract.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-harden-package → orkestrel-harden}/references/research.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/decide.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/layer.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/statechart.md +0 -0
- /package/dist/host/agents/skills/{orkestrel-prove-journey → orkestrel-journey}/references/styles.md +0 -0
package/dist/host/AGENTS.md
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
# AGENTS.md
|
|
2
2
|
|
|
3
3
|
> TypeScript · types-first · zero unsolicited dependencies · single-word public APIs.
|
|
4
|
-
>
|
|
4
|
+
> The coding contract for every agent and harness in this project.
|
|
5
5
|
|
|
6
6
|
## Authority and loading
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- `.agents/
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
1. this file;
|
|
16
|
-
2. every applicable file in `.claude/rules/` from the Rule map section;
|
|
17
|
-
3. every explicitly invoked or dispatch-named skill and the references it requires;
|
|
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.
|
|
8
|
+
- The user's current instruction wins. Then this file and the rule files it maps. Existing code is evidence to verify, never authority.
|
|
9
|
+
- `*/types.ts` is authoritative for public APIs. Never undo a user's type edit.
|
|
10
|
+
- `.agents/orchestration.md` governs agent operation and cannot weaken this file. Harness bridges (`.claude/AGENTS.md`, `.codex/config.toml`, `.cursor/rules/orchestration.mdc`) add harness mechanics only.
|
|
11
|
+
- A skill under `.agents/skills/` is a procedure. Follow it when the user or a dispatch names it, or when its trigger fires. A skill cannot weaken this file or a rule.
|
|
12
|
+
- Before editing, read: this file; each rule the Rule map scopes to the paths you touch; the named skill and the references it names; the matching guide under `guides/` and `ROADMAP.md` when present. Read nothing else up front.
|
|
13
|
+
- Rules state how to write. Guides state what to build. On conflict, stop and report the conflict.
|
|
14
|
+
- A rule file's stated exception to a law in this file applies.
|
|
20
15
|
|
|
21
16
|
## Project model
|
|
22
17
|
|
|
@@ -27,95 +22,87 @@ tests/ mirrors source; setup*.ts owns shared test infrastructure
|
|
|
27
22
|
configs/ thin target wrappers around root Vite/TypeScript configuration
|
|
28
23
|
```
|
|
29
24
|
|
|
30
|
-
- `core` is host-independent. Browser and server may import core; core imports neither.
|
|
31
|
-
- `app/core` is host-independent. `app/server` may import app/core
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
- `tsconfig.json`, `vite.config.ts`, and each `*/types.ts` are their respective sources of truth.
|
|
36
|
-
- Use only the environments the project needs. Do not delete structural files merely because they are empty.
|
|
25
|
+
- `core` is host-independent. Browser and server may import core; core imports neither; browser and server never import each other.
|
|
26
|
+
- `app/core` is host-independent. `app/server` may import `app/core`, `src/core`, and `src/server`, never browser code. `app/browser` may import `app/core`, `src/core`, and `src/browser`, and reaches server behavior through shared contracts and transports only.
|
|
27
|
+
- Published source never imports private app code.
|
|
28
|
+
- Enforce boundaries with the toolchain (Oxlint import restrictions, scoped TypeScript projects, Vite graphs). Add no second parser for TypeScript, Oxlint, Vue, HTML, CSS, or Vite.
|
|
29
|
+
- `tsconfig.json`, `vite.config.ts`, and each `*/types.ts` are their sources of truth. Keep structural files even when empty.
|
|
37
30
|
|
|
38
31
|
## Non-negotiable rules
|
|
39
32
|
|
|
40
33
|
- **NEVER** use `any`; accept `unknown` and narrow with guards.
|
|
41
34
|
- **NEVER** use non-null assertions (`!`) or type assertions (`as`); narrow or validate.
|
|
42
|
-
- **NEVER** use `@ts-nocheck`, `@ts-ignore`, `@ts-expect-error`, or
|
|
35
|
+
- **NEVER** use `@ts-nocheck`, `@ts-ignore`, `@ts-expect-error`, or a lint-disable directive; fix the cause.
|
|
43
36
|
- **NEVER** add an npm package unless the user explicitly requests it; prefer native APIs.
|
|
44
37
|
- **NEVER** remove a symbol to silence lint. Implement it or annotate `// TODO: [Feature] Brief purpose`.
|
|
45
|
-
- **NEVER**
|
|
46
|
-
- **NEVER**
|
|
47
|
-
- **NEVER** use
|
|
48
|
-
- **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.
|
|
38
|
+
- **NEVER** write `public`, `protected`, `private`, or a parameter property; use `#` fields.
|
|
39
|
+
- **NEVER** use default exports except where a framework requires them.
|
|
40
|
+
- **NEVER** use mocks, behavioral fakes, module replacement, framework spies, or fake clocks for project-owned behavior. Use real implementations, recorders, temporary resources, protocol-faithful fixture servers, and inert data stubs.
|
|
49
41
|
- **ALWAYS** make interface properties and public return collections readonly.
|
|
50
42
|
- **ALWAYS** define reusable and public types in `*/types.ts` before implementation.
|
|
51
|
-
- **ALWAYS** inspect the
|
|
52
|
-
- **ALWAYS** finish the requested implementation: no
|
|
53
|
-
- **ALWAYS**
|
|
43
|
+
- **ALWAYS** inspect the declared and installed `@orkestrel/*` capabilities before writing overlapping logic. Reuse a primitive whose semantics match; never wrap one to rename it.
|
|
44
|
+
- **ALWAYS** finish the requested implementation: no stubs, deferred logic, or hidden follow-up.
|
|
45
|
+
- **ALWAYS** write a script as TypeScript run by Node (`node path/to/script.ts`, type stripping, `node:` modules only): a skill script, a probe, a launcher, an instrument, a one-off tool. Never write a bash, PowerShell, or Python script. The Claude Code Cloud hooks under `scripts/` are the one bash exception, and that folder holds nothing else.
|
|
54
46
|
|
|
55
47
|
## Design laws
|
|
56
48
|
|
|
57
49
|
- **Types first.** Public contracts precede implementation.
|
|
58
|
-
- **Single-word entity APIs.** Properties, methods, option keys, and events use one
|
|
59
|
-
- **Self-describing helpers.** Module-scope helpers
|
|
60
|
-
- **One concept, one term.**
|
|
61
|
-
- **Boolean behavior.** A binary behavioral switch is a boolean
|
|
62
|
-
- **Real domain states only.**
|
|
63
|
-
- **Absence is `undefined`.**
|
|
64
|
-
- **Derive state.** Compute facts from existing fields
|
|
65
|
-
- **Named discriminants.** Name the axis
|
|
66
|
-
- **Centralize by kind.** Types, constants, helpers, validators, parsers, factories,
|
|
67
|
-
- **Export and test reusable logic.**
|
|
68
|
-
- **No nested functions
|
|
69
|
-
- **Functional core, imperative shell.**
|
|
70
|
-
- **No superfluous wrappers.** A wrapper
|
|
71
|
-
- **Minimal public API.**
|
|
72
|
-
- **No compatibility shims.**
|
|
73
|
-
- **Mechanism, not product policy.** Framework code
|
|
50
|
+
- **Single-word entity APIs.** Properties, methods, option keys, and events use one word. When one word cannot carry it, change the shape: group options, extract a sub-entity, or split behaviors.
|
|
51
|
+
- **Self-describing helpers.** Module-scope helpers use `{verb}{Noun}`.
|
|
52
|
+
- **One concept, one term.** Lifecycle verbs have fixed meanings.
|
|
53
|
+
- **Boolean behavior.** A binary behavioral switch is a boolean.
|
|
54
|
+
- **Real domain states only.** A literal union names an irreducible mode, phase, discriminant, or external value.
|
|
55
|
+
- **Absence is `undefined`.** No sentinels. Use `null` only where an external format distinguishes it from omission.
|
|
56
|
+
- **Derive state.** Compute facts from existing fields; never store a second flag or label that can drift.
|
|
57
|
+
- **Named discriminants.** Name the axis (`relationship`, `command`, `category`), never `kind` or `type`.
|
|
58
|
+
- **Centralize by kind.** Types, constants, helpers, validators, parsers, factories, and errors live in their kind file. An implementation file holds one class plus imports.
|
|
59
|
+
- **Export and test reusable logic.** Fold a trivial one-use helper into its caller or export it from its kind file and test it.
|
|
60
|
+
- **No nested functions**, except an anonymous callback passed as an argument or returned as the result.
|
|
61
|
+
- **Functional core, imperative shell.** Pure exported leaves; stateful orchestration as class methods. A method never forwards 1:1 to a helper.
|
|
62
|
+
- **No superfluous wrappers.** A wrapper adds a boundary, invariant, composition, translation, lifecycle, or materially narrower contract, or it goes.
|
|
63
|
+
- **Minimal public API.** Create or substantively expand a capability with its first real consumer; this gate applies at creation, never later. Expose an existing reusable capability through its environment barrel regardless of consumer count. Remove a symbol only when the capability itself must not exist. Prefer one minimal interface and one shared engine, with a native backend override only for a faster path.
|
|
64
|
+
- **No compatibility shims.** Update every consumer in the same change.
|
|
65
|
+
- **Mechanism, not product policy.** Framework code stops before application decisions.
|
|
74
66
|
- **No polling architecture.** Park idle work on events and abort signals. Yield long work cooperatively.
|
|
75
67
|
|
|
76
|
-
##
|
|
68
|
+
## Work loop
|
|
77
69
|
|
|
78
|
-
|
|
79
|
-
2. **Implementation:** conform exactly to the types. Place every declaration in its prescribed file.
|
|
80
|
-
3. **Consolidation:** remove duplication and route repeated behavior through one shared implementation.
|
|
81
|
-
4. **Tests:** cover happy paths, edge cases, failures, and boundary values with targeted deterministic tests.
|
|
82
|
-
5. **Documentation:** update the matching guide or spec and parity coverage.
|
|
70
|
+
Size the change before touching a file. Take the largest row whose trigger applies: large, then medium, then small. Run only what the row names.
|
|
83
71
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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.
|
|
72
|
+
| Size | Trigger | Do |
|
|
73
|
+
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
74
|
+
| small | one behavior in one package, no public type change, none of the medium triggers | edit, prove or test the claim, run the touched test file, stop |
|
|
75
|
+
| medium | a public type or contract change; a capability added or substantively expanded; a defect whose cause is unknown; any change to security, destructive paths, concurrency, a protocol, or untrusted input | types first; one design opinion only when the shape is open; implement; prove; file then project tests; one review pass on the contract and the risky seams by a reviewer who did not write it; scoped gates |
|
|
76
|
+
| large | work across packages; an added independently owned domain; a stated campaign | `.agents/orchestration.md` § Campaign |
|
|
92
77
|
|
|
93
|
-
|
|
78
|
+
A repair inside an existing file is never large by itself. A private retry, cache, or helper with no public type change is small unless a medium trigger names it.
|
|
94
79
|
|
|
95
|
-
|
|
96
|
-
2. **Research:** when requested or externally material, verify current primary sources and build a capability/defect matrix before changing the API.
|
|
97
|
-
3. **Design:** change types first and typecheck the proposed contract.
|
|
98
|
-
4. **Implement:** match the interface, reuse declared ecosystem primitives, extract centralized logic, and update the sole barrel.
|
|
99
|
-
5. **Consolidate:** remove duplication, nested declarations, and superfluous wrappers without expanding the API.
|
|
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.
|
|
101
|
-
7. **Document:** update the guide, examples, and parity contract.
|
|
102
|
-
8. **Verify:** audit discovery, deferrals, and package contents as applicable. Run the required gates and read their actual output before claiming success.
|
|
80
|
+
Within the size, in order:
|
|
103
81
|
|
|
104
|
-
|
|
82
|
+
1. **Types.** Write or revise the contract in `*/types.ts`. Typecheck it.
|
|
83
|
+
2. **Prove.** Select the instrument per `.claude/rules/quality.md` § Instruments: a `prove` claim (edit, test, breaking edit, breaking stage) for a TypeScript claim, otherwise the smallest test or probe. Quote a `prove` closing line where the claim is reported. After two failed attempts to form a claim, write the test and continue.
|
|
84
|
+
3. **Implement.** Conform to the types. Place each declaration in its kind file. Update the barrel.
|
|
85
|
+
4. **Test.** Cover happy paths, edge cases, failures, and boundaries with deterministic tests against real implementations. For a defect, record the failing command and count before the fix and the same command green after.
|
|
86
|
+
5. **Consolidate.** Remove duplication, nested functions, and superfluous wrappers without widening the API.
|
|
87
|
+
6. **Document.** Update the matching guide and parity. Prose comes last and stays short.
|
|
105
88
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
Test ladder, narrowest first; stop at the boundary the change size names:
|
|
90
|
+
|
|
91
|
+
1. The instrument selected in Prove.
|
|
92
|
+
2. The touched file: `npx vitest run --config vite.config.ts --project <project> <file>`, or `npm run test:guides` for a guide proof.
|
|
93
|
+
3. The touched project: `npm run test:<project>`, plus the `check:` script for that project where `package.json` declares one.
|
|
94
|
+
4. Tree-wide gates, once, by `verifier`: `npm run format:check`, `npm run lint:check`, `npm run check`, `npm run build`, `npm test`.
|
|
109
95
|
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
96
|
+
- Run the mutating `npm run lint` then `npm run format` only to converge before the non-mutating gates.
|
|
97
|
+
- A writing unit stops at the project boundary and reports the commands it ran. `verifier` runs the tree-wide gates when dispatched for them and edits no source.
|
|
98
|
+
- Never claim a gate passed without running it and reading its output bare, with no `| tail` or `| grep` behind it.
|
|
99
|
+
- On a type error: read the whole diagnostic, compare with `*/types.ts`, fix one cause, rerun the scoped check.
|
|
100
|
+
- Unused contract symbol: implement it or leave the prescribed TODO. Never delete it for lint.
|
|
101
|
+
- Scope closed and gates green: stop. Another pass over the same surface needs an instruction from the user.
|
|
115
102
|
|
|
116
103
|
## Rule map
|
|
117
104
|
|
|
118
|
-
|
|
105
|
+
Each row is a normative extension of this file. Its `paths` frontmatter controls automatic loading; read the row when its subject matches your change.
|
|
119
106
|
|
|
120
107
|
| Rule | Governs |
|
|
121
108
|
| -------------------------------- | ---------------------------------------------------------------------- |
|
|
@@ -123,66 +110,21 @@ Every file in the following table is a normative extension of this root. Read ev
|
|
|
123
110
|
| `.claude/rules/typescript.md` | TypeScript syntax, imports, immutability, errors, TSDoc |
|
|
124
111
|
| `.claude/rules/architecture.md` | Centralized files, exports, classes, modules, extension points, stores |
|
|
125
112
|
| `.claude/rules/patterns.md` | Options, managers, emitters, guards, parsers, contracts |
|
|
126
|
-
| `.claude/rules/tests.md` | Test behavior, helpers, browser tests, Vitest configuration
|
|
113
|
+
| `.claude/rules/tests.md` | Test behavior, helpers, probes, browser tests, Vitest configuration |
|
|
127
114
|
| `.claude/rules/workspace.md` | Src/app environments, aliases, isolation, builds, scripts, tooling |
|
|
128
115
|
| `.claude/rules/application.md` | App composition, entries, manifest safety, lifecycle, integration |
|
|
129
116
|
| `.claude/rules/browser.md` | Vue/browser architecture and platform usage |
|
|
130
117
|
| `.claude/rules/styles.md` | SCSS/CSS centralization, tokens, mixins, layers, naming |
|
|
131
118
|
| `.claude/rules/portability.md` | Host branching, paths, line endings, processes, terminals, OS claims |
|
|
132
|
-
| `.claude/rules/documentation.md` | Guides, parity, roadmap, showcase, examples
|
|
133
|
-
| `.claude/rules/writing.md` |
|
|
134
|
-
| `.claude/rules/quality.md` |
|
|
135
|
-
|
|
136
|
-
##
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
- Never
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
- Do the obvious work without asking for ceremonial permission.
|
|
145
|
-
- Keep chat summaries short. Show exact changes as diffs when useful.
|
|
146
|
-
- Never claim a gate passed until you ran it and read the result.
|
|
147
|
-
|
|
148
|
-
### Writing
|
|
149
|
-
|
|
150
|
-
This governs prose everywhere: chat replies, instruction files, guides, TSDoc, commit messages, and briefs.
|
|
151
|
-
|
|
152
|
-
Follow ISO 24495-1:2023 Plain Language in every response:
|
|
153
|
-
|
|
154
|
-
- Give the reader what they need for the task at hand, and nothing else.
|
|
155
|
-
- Put the key point first, and order the rest so the reader finds each part where they look for it.
|
|
156
|
-
- Word every sentence so the reader understands it on the first read.
|
|
157
|
-
- Shape the response so the reader can act on it without asking a follow-up question.
|
|
158
|
-
|
|
159
|
-
The rules in this section and `.claude/rules/writing.md` implement these principles. Apply the
|
|
160
|
-
principles directly to a case no rule covers.
|
|
161
|
-
|
|
162
|
-
- Write plainly. Say what you mean; mean what you say.
|
|
163
|
-
- Lead with the decision or the finding. Do not build up to it.
|
|
164
|
-
- One idea per sentence. Keep sentences short.
|
|
165
|
-
- Use the active voice, and the imperative for instructions.
|
|
166
|
-
- State the rule first. Add rationale only when it changes a judgment call, and keep it subordinate.
|
|
167
|
-
- 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.
|
|
168
|
-
- Do not use a long or technical word where a short common one works.
|
|
169
|
-
- Keep all substance, nuance, and precision. Cut only what makes text hard to read.
|
|
170
|
-
- Present a tradeoff as option, cost, and recommendation — not as a balanced meditation.
|
|
171
|
-
- 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.
|
|
172
|
-
- **NEVER state a count.** A number answering "how many" about a set anyone can add to is a count — rules, rows, members, exports, files, options, steps, cases, stages, findings, and tests are such sets. Name the members, or write the sentence without the number.
|
|
173
|
-
- **NEVER name a list item by its position.** Write the item's name, never its ordinal or its number.
|
|
174
|
-
- Treat `both` as a count where it tallies a set that can grow. Keep it where the sentence names the members.
|
|
175
|
-
- Write a number only as a value the reader needs: a duration, a size, a limit, a version, a date, an exit code, or a measurement reported with the run that produced it.
|
|
176
|
-
- Delete a count you find. Do not correct it.
|
|
177
|
-
|
|
178
|
-
#### Instruction files
|
|
179
|
-
|
|
180
|
-
`AGENTS.md`, `.claude/rules/*`, `.agents/*`, `.claude/agents/*`, and every skill are executed, not
|
|
181
|
-
read. An agent loads them mid-task and acts on them. Write them for that reader.
|
|
182
|
-
|
|
183
|
-
- Write every line as a directive: what to do, what to check, or what to refuse. Delete a line that does none of those.
|
|
184
|
-
- Name the observable trigger and the required action. "When X, do Y" is actionable; "X matters" is not.
|
|
185
|
-
- State the finding as the rule. Never record how it was found, which session found it, what was tried first, or what a probe proved. That history belongs in the commit message.
|
|
186
|
-
- Cut any clause written to persuade, reassure, or explain the rule to a person. An agent needs the rule and its trigger, not agreement with it.
|
|
187
|
-
- Give a rule one home. Restating it elsewhere creates a duplicate that drifts, and an agent reading the stale copy is following this file.
|
|
188
|
-
- Keep an example only when it disambiguates the rule. Delete an example that merely illustrates it.
|
|
119
|
+
| `.claude/rules/documentation.md` | Guides, parity, roadmap, showcase, examples, skill files |
|
|
120
|
+
| `.claude/rules/writing.md` | Prose in guides, replies, commits, and instruction files |
|
|
121
|
+
| `.claude/rules/quality.md` | Evidence, probes, instruments, research, completion |
|
|
122
|
+
|
|
123
|
+
## Writing
|
|
124
|
+
|
|
125
|
+
- Lead with the decision or the finding. One idea per sentence. Imperative for instructions.
|
|
126
|
+
- Write plainly: no metaphor, aphorism, flourish, or persuasion.
|
|
127
|
+
- Never state a count of an open set and never name a list item by its position. Name the members.
|
|
128
|
+
- Write a number only as a duration, size, limit, version, date, exit code, or measurement with its run.
|
|
129
|
+
- Keep chat summaries short; show exact changes as diffs when useful.
|
|
130
|
+
- `.claude/rules/writing.md` owns the substitution table, the developer-prose rules, and the instruction-file rules.
|