@ethlete/agent-rules 0.1.0-next.23 → 0.1.0-next.24
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/CHANGELOG.md +28 -0
- package/README.md +8 -1
- package/content/rules/app-styling.md +10 -3
- package/content/rules/nx-layout.md +13 -10
- package/content/skills/design-exploration/SKILL.md +146 -33
- package/content/skills/theming/SKILL.md +4 -0
- package/migrations/nx-layout.md +1 -1
- package/package.json +6 -4
- package/src/index.js +16 -3
- package/src/index.js.map +1 -1
- package/src/lib/config.d.ts +1 -1
- package/src/lib/config.js +3 -3
- package/src/lib/config.js.map +1 -1
- package/src/lib/git-flow/index.js +20 -7
- package/src/lib/git-flow/index.js.map +1 -1
- package/src/lib/git-flow-command.js +10 -2
- package/src/lib/git-flow-command.js.map +1 -1
- package/src/lib/git-flow-repair.js +11 -3
- package/src/lib/git-flow-repair.js.map +1 -1
- package/src/lib/git-flow-start.js +11 -3
- package/src/lib/git-flow-start.js.map +1 -1
- package/src/lib/gitlab.js +13 -5
- package/src/lib/gitlab.js.map +1 -1
- package/src/lib/index.js +26 -13
- package/src/lib/index.js.map +1 -1
- package/src/lib/package-runner.d.ts +1 -0
- package/src/lib/package-runner.js +18 -1
- package/src/lib/package-runner.js.map +1 -1
- package/src/lib/plan.js +9 -5
- package/src/lib/plan.js.map +1 -1
- package/src/lib/prompt.js +10 -2
- package/src/lib/prompt.js.map +1 -1
- package/src/lib/render.d.ts +4 -3
- package/src/lib/render.js +8 -4
- package/src/lib/render.js.map +1 -1
- package/src/lib/targets/claude-hooks.js +2 -1
- package/src/lib/targets/claude-hooks.js.map +1 -1
- package/src/lib/targets/claude.js +2 -2
- package/src/lib/targets/claude.js.map +1 -1
- package/src/lib/targets/codex-hooks.js +2 -1
- package/src/lib/targets/codex-hooks.js.map +1 -1
- package/src/lib/targets/codex.js +1 -1
- package/src/lib/targets/codex.js.map +1 -1
- package/src/lib/targets/copilot.js +2 -2
- package/src/lib/targets/copilot.js.map +1 -1
- package/src/lib/targets/cursor.js +2 -2
- package/src/lib/targets/cursor.js.map +1 -1
- package/src/lib/targets/git-hooks.d.ts +1 -0
- package/src/lib/targets/git-hooks.js +4 -4
- package/src/lib/targets/git-hooks.js.map +1 -1
- package/src/lib/targets/hooks-shared.d.ts +1 -0
- package/src/lib/targets/hooks-shared.js +5 -5
- package/src/lib/targets/hooks-shared.js.map +1 -1
- package/src/lib/targets/shared.js +1 -1
- package/src/lib/targets/shared.js.map +1 -1
- package/src/lib/timetrack-command.js +14 -6
- package/src/lib/timetrack-command.js.map +1 -1
- package/src/lib/timetrack.js +14 -6
- package/src/lib/timetrack.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @ethlete/agent-rules
|
|
2
2
|
|
|
3
|
+
## 0.1.0-next.24
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- The design-exploration skill names the order of a product design: themes, logo and CI, wireframes, components, larger elements, pages, then the working prototype.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- The design-exploration skill explains that `setup` has no cleanup hook and what the `ngStates` host wrapper means for `flow.body`.
|
|
12
|
+
- The design-exploration skill shows how to draw a prototype with states through `ngStates()`.
|
|
13
|
+
- The `ethlete-design-exploration` skill tells agents to draw SDK parts with `ng()`, which renders the real components, before drawing a new part.
|
|
14
|
+
- Note in the design-exploration skill that a drawing's `setup` can be an array of functions.
|
|
15
|
+
- The design-exploration skill names `setup(root)` as the way to give a drawing behavior, because a `<script>` in its body never runs.
|
|
16
|
+
- The design exploration skill says every call needs a `stage`, and that a quick idea takes `sketch`.
|
|
17
|
+
- The `ethlete-design-exploration` skill makes agents draw from the project design system and the SDK mocks before drawing a new part, and defines what an accepted entry holds.
|
|
18
|
+
- The design-exploration skill explains the theme switch of a design project.
|
|
19
|
+
- `init` and the default commands now follow the repo's package manager (yarn, pnpm, bun) and detect Claude from a `CLAUDE.md`. The generated banners name that runner, and `sync` only warns about a missing lint script when emitted content uses it.
|
|
20
|
+
- Run `ethlete-agents` without `tslib` installed. The CLI now inlines its TypeScript helpers, so a fresh Yarn 4 repo no longer fails with "Cannot find module 'tslib'".
|
|
21
|
+
- The `nx-layout` rule now makes one domain lib per app (`libs/domain/<app>`, a folder per feature) the default. A feature gets its own lib only for a concrete reason, such as size or build time.
|
|
22
|
+
- The design-exploration skill no longer describes the removed `et design` call page (round bands, contact sheet, compare overlay, theme switch). Calls are read in Ethlete Studio.
|
|
23
|
+
- In an existing app, an agent now converts the styles of every component it changes, and reports a repo-wide styling deviation once.
|
|
24
|
+
- A wireframe call lists the parts it needs in `inventory`, each an SDK component or a new part with its component call. `et design check` warns about an inventory on any other call.
|
|
25
|
+
- `ng()` and `ngStates()` take `fields`: each entry becomes a signal form field with a value, errors and a touched state, bound as `[formField]="fields.<name>"`.
|
|
26
|
+
- `ng()` in the design tool renders an open select panel or menu, and the frame places it below its trigger.
|
|
27
|
+
- The design-exploration skill lists the call commands (`new`, `status`, `--help`), the `stage` field, nested surface panels, and colour overrides with `themeCss()`.
|
|
28
|
+
- The design-exploration skill starts a design with foundations (type scale, spacing, radius), ends the wireframe stage with a component inventory, and sends a missing part back to a component call.
|
|
29
|
+
- The theming docs and skill warn that `hover:bg-et-surface-interaction-hover` is a full-strength tint and name `etSurfaceInteractive` for hover rows.
|
|
30
|
+
|
|
3
31
|
## 0.1.0-next.23
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -15,10 +15,17 @@ npx ethlete-agents init # writes ethlete-agents.config.json
|
|
|
15
15
|
npx ethlete-agents sync # writes the generated rules and skills
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
With Yarn 4.18+ and `npmMinimalAgeGate`, a freshly published release is blocked until it ages. Add
|
|
19
|
+
`npmPreapprovedPackages: ["@ethlete/*"]` to `.yarnrc.yml` to install new `@ethlete/*` versions right away.
|
|
20
|
+
|
|
21
|
+
`init` pre-fills `vars` with the lint, format and Storybook commands for your repo, using its package manager; check them before
|
|
19
22
|
the first sync. `sync`, `check`, `init` and `migrate` reject a flag they do not know and print the usage
|
|
20
23
|
instead of running, and a config file that does not parse is reported by name.
|
|
21
24
|
|
|
25
|
+
Adopting the rules in an existing app includes a styling audit: count the global CSS files,
|
|
26
|
+
classes and hardcoded colours that break the `app-styling` rule, tell the user the numbers, and
|
|
27
|
+
record the conversion as owed work.
|
|
28
|
+
|
|
22
29
|
Commit the generated files, and add a drift check to CI:
|
|
23
30
|
|
|
24
31
|
```bash
|
|
@@ -20,9 +20,16 @@ component a host class (`host: { class: 'app-player-card' }`) and scope every se
|
|
|
20
20
|
the way SDK components scope theirs under their `et-` classes. Never write a bare element or
|
|
21
21
|
unprefixed class selector in a component stylesheet.
|
|
22
22
|
|
|
23
|
-
In an existing repo,
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
In an existing repo, convert a component's styles whenever you change any of its files (class,
|
|
24
|
+
template, template-bound logic or CSS), not only its styles; if the conversion is large, ask the
|
|
25
|
+
user first. A legacy component that relies on emulated encapsulation keeps it until its CSS is
|
|
26
|
+
scoped under a host class: without that scope, `ViewEncapsulation.None` leaks its CSS into every
|
|
27
|
+
view.
|
|
28
|
+
|
|
29
|
+
If the repo as a whole breaks this section (global classes in `styles.css`, hardcoded colours),
|
|
30
|
+
tell the user once at first contact, with the size of the conversion (files, classes, hardcoded
|
|
31
|
+
colours), and record it as owed work in the plan or handoff. Never skip it silently. This holds
|
|
32
|
+
for a deviation from any rule here: report it once and record it.
|
|
26
33
|
|
|
27
34
|
Write CSS only for what utilities cannot express. With Tailwind 4, keep that CSS **unlayered**
|
|
28
35
|
or in `@layer utilities` — never in `@layer components`, and that includes the global
|
|
@@ -13,8 +13,9 @@ Apps are thin shells. All feature code lives in libs, grouped by kind, not by Nx
|
|
|
13
13
|
```text
|
|
14
14
|
apps/<app>/src/app/ app.component.ts, app.config.ts, app.routes.ts only
|
|
15
15
|
libs/
|
|
16
|
-
domain/<app
|
|
17
|
-
|
|
16
|
+
domain/<app>/ one lib per app
|
|
17
|
+
src/lib/<feature>/ views, components, services, <feature>.routes.ts
|
|
18
|
+
src/lib/shared/ code shared by the app's features (optional)
|
|
18
19
|
queries/ query clients and creators, one folder per backend
|
|
19
20
|
types/ API models and shared types
|
|
20
21
|
uikit/ app-agnostic presentational components
|
|
@@ -23,16 +24,17 @@ libs/
|
|
|
23
24
|
assets/ fonts, icons, images
|
|
24
25
|
```
|
|
25
26
|
|
|
26
|
-
-
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
-
|
|
27
|
+
- Each feature folder exports its own `<FEATURE>_ROUTES`, re-exported from the lib's
|
|
28
|
+
`src/index.ts`. `app.routes.ts` only lazy-loads them:
|
|
29
|
+
`loadChildren: () => import('@acme/domain/admin').then((m) => m.USERS_ROUTES)`.
|
|
30
|
+
- Split a feature into its own lib (`libs/domain/<app>/<feature>`) only for a concrete
|
|
31
|
+
reason, such as size or build time, and name that reason to the user.
|
|
30
32
|
Never put features, queries, shared UI or theme in the app project.
|
|
31
33
|
- Do not add Nx `feature/ui/data-access/util` folders or `type:*` tags.
|
|
32
34
|
- Every lib has `src/index.ts` and explicit `build` (`@nx/angular:ng-packagr-lite`), `lint`
|
|
33
35
|
and `test` targets in `project.json`. Keep `plugins: []` in `nx.json`.
|
|
34
|
-
- Alias = path with slashes: `@acme/domain/admin
|
|
35
|
-
`@acme/uikit`, `@acme/env`. Project name = path with dashes (`domain-admin
|
|
36
|
+
- Alias = path with slashes: `@acme/domain/admin`, `@acme/queries`, `@acme/types`,
|
|
37
|
+
`@acme/uikit`, `@acme/env`. Project name = path with dashes (`domain-admin`).
|
|
36
38
|
Component `prefix` = the repo abbreviation.
|
|
37
39
|
- Tag every project with one `scope:*`: `scope:<app>` for an app and its domain libs,
|
|
38
40
|
`scope:core` for env and types, plus `scope:queries`, `scope:uikit`, `scope:theme`.
|
|
@@ -43,5 +45,6 @@ libs/
|
|
|
43
45
|
scopes with `bannedExternalImports`.
|
|
44
46
|
- Environment config lives only in `libs/env`, never hardcoded in a query client.
|
|
45
47
|
|
|
46
|
-
This is the layout for new workspaces and new code. Do not restructure
|
|
47
|
-
workspace that deviates from it unless the user asks.
|
|
48
|
+
This is the layout for new workspaces and new code. Do not restructure the folders, projects
|
|
49
|
+
and tags of an existing workspace that deviates from it unless the user asks. This covers the
|
|
50
|
+
workspace layout only: every other rule still applies to the code you touch.
|
|
@@ -37,7 +37,7 @@ finished while the user is still talking about it.
|
|
|
37
37
|
- Your pick, one line on why.
|
|
38
38
|
- Nothing else. No next step, no second finding.
|
|
39
39
|
|
|
40
|
-
**Do not send a screenshot.** The user keeps the
|
|
40
|
+
**Do not send a screenshot.** The user keeps the call open. Screenshot only for your own
|
|
41
41
|
check that a variant renders.
|
|
42
42
|
|
|
43
43
|
If a second defect appears, add it to the open list and give it one line. Do not draw it.
|
|
@@ -46,8 +46,8 @@ If a second defect appears, add it to the open list and give it one line. Do not
|
|
|
46
46
|
|
|
47
47
|
The exploration's plan file names the tool. Two shapes exist.
|
|
48
48
|
|
|
49
|
-
**A repository with a `.ethlete/design` folder** draws
|
|
50
|
-
|
|
49
|
+
**A repository with a `.ethlete/design` folder** draws each variant of a call in its own
|
|
50
|
+
frame, and the user reads the call in Ethlete Studio. The tool is `et design`, from `@ethlete/cli`, so the repository itself needs no design
|
|
51
51
|
tooling. A call argues in the repository it is about:
|
|
52
52
|
|
|
53
53
|
```
|
|
@@ -64,11 +64,34 @@ The first segment of a slug is the **project**. `config.json` gives each project
|
|
|
64
64
|
`styles` and its own `head`, so one project's type scale and fonts never reach another's
|
|
65
65
|
drawings. A project the config names not draws bare.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
A project can also name `themes`: `{ "surface": ["light", "dark"], "color": ["brand", …] }`; the
|
|
68
|
+
first name of each list is the default. A frame asked for a theme gets the
|
|
69
|
+
`et-surface--<name>` and `et-color--<name>` classes on its root, so a drawing in such a project
|
|
70
|
+
must not set a surface or colour class on its own root, and must take its colours from the theme
|
|
71
|
+
tokens. An inner panel may set `et-surface--<name>`, to put a dark and a light panel side by side
|
|
72
|
+
or to draw an elevated card. To try another value of a colour theme, a variant calls `themeCss()`
|
|
73
|
+
in its own `styles`; it never changes the project's providers.
|
|
74
|
+
|
|
75
|
+
### Make and track a call
|
|
76
|
+
|
|
77
|
+
`et design --help` lists every command. Start a call with the tool, never by hand:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
et design new <project>/<group>/<name> --stage component --variants a,b
|
|
81
|
+
et design status <slug> drawing # while you draw; check sets checking, then ready or failed
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`new` writes `call.ts`, `fixture.ts` and one variant file per key, and the call renders at
|
|
85
|
+
once. `stage` in `call.ts` names the stage of the design (see "The order of a design"). Every
|
|
86
|
+
call needs one: `new` refuses to start without `--stage`, and `et design check --call` fails on a
|
|
87
|
+
call without it. Ethlete Studio groups the calls by it, and the check warns when an element, page
|
|
88
|
+
or prototype call imports nothing from the design system. The status shows on the call's row in Studio.
|
|
89
|
+
|
|
90
|
+
`et design [checkout]` serves the frames on the port `config.json` names. The
|
|
68
91
|
checkout defaults to the working directory, and `DE_PORT` overrules the config, so two
|
|
69
92
|
checkouts can be drawn at once. A repository that builds the tool rather than installing it
|
|
70
93
|
wraps this in a script - in the ethlete SDK, `yarn design:check`. There, the user reads the
|
|
71
|
-
calls in Ethlete Studio, started with `yarn studio`, and Studio serves the
|
|
94
|
+
calls in Ethlete Studio, started with `yarn studio`, and Studio serves the frames itself. Do not
|
|
72
95
|
start `yarn design` next to it.
|
|
73
96
|
|
|
74
97
|
Ethlete Studio carries its own copy of the tool, so it draws a checkout that installs nothing.
|
|
@@ -77,42 +100,21 @@ use can reach it.
|
|
|
77
100
|
|
|
78
101
|
`call.ts` calls `defineCall` from `@design-explore`. Each variant carries a `key`, a `name`,
|
|
79
102
|
a `claim`, a `cost`, an optional `verdict` of `chosen` or `rejected`, and a `load` that
|
|
80
|
-
imports its own module.
|
|
103
|
+
imports its own module.
|
|
81
104
|
|
|
82
105
|
In a call that runs past about a dozen variants, every variant names the pass that drew it with
|
|
83
|
-
`round: 'r3'`. **That tag is the only thing that makes a round exist
|
|
84
|
-
|
|
85
|
-
same bands in the sidebar, so a new variant can never leave the menu stale. A round whose
|
|
86
|
-
variants all carry a verdict is **settled**: the page folds it down to its winner plus one row
|
|
87
|
-
per rejected variant, and a link opens it again.
|
|
88
|
-
|
|
89
|
-
A call whose rounds have all ruled is **resolved**. Its winners usually form a chain, each one
|
|
90
|
-
the last plus a change, so the page stops drawing them: it leads with a **Result** band holding
|
|
91
|
-
the final winner, and prints the chain as a row of keys above it. Every round below folds to
|
|
92
|
-
rows. A key in the chain opens the round that drew it.
|
|
106
|
+
`round: 'r3'`. **That tag is the only thing that makes a round exist**, in the order the variants introduce
|
|
107
|
+
them. A round whose variants all carry a verdict is **settled**.
|
|
93
108
|
|
|
94
109
|
`rounds` is prose only. Each entry gives a `key`, a `title` and a `note` saying what came out
|
|
95
110
|
of that pass, which is how the intro stays short and each pass reads as a reply to the one
|
|
96
|
-
before. An untagged round still draws
|
|
97
|
-
|
|
98
|
-
and the check both report it. Write the note in the same pass that sets the verdicts, never
|
|
111
|
+
before. An untagged round still draws - it says the bare key until somebody writes the entry. A
|
|
112
|
+
`rounds` entry that no variant names is stale prose, and the check reports it. Write the note in the same pass that sets the verdicts, never
|
|
99
113
|
before the user rules.
|
|
100
114
|
|
|
101
115
|
A call with one variant and no `claim` is a **view**: one reference picture, drawn full
|
|
102
116
|
width with no verdict tag. Use it for a picture that answers no question.
|
|
103
117
|
|
|
104
|
-
Two views, and a way to compare:
|
|
105
|
-
|
|
106
|
-
- **rounds** is the default. Round headings, the result band, and the folding above.
|
|
107
|
-
- **all N** is a contact sheet: every variant in the call at about a third size, in one grid, so
|
|
108
|
-
a call of two dozen fits on a screen or two. Use it to find the variants worth a close look.
|
|
109
|
-
- Clicking a variant's name anywhere - a heading, a folded row, a thumbnail - puts it in the
|
|
110
|
-
**compare overlay** at the top of the page. Two drawings that differ by a few pixels can only
|
|
111
|
-
be told apart in one place, so the overlay stacks every pick in one box at full size and the
|
|
112
|
-
reader switches between them: click the box or press space to blink, and with two picks the
|
|
113
|
-
arrow keys wipe a seam across. Nothing is scaled and nothing moves. The picks live in the URL
|
|
114
|
-
under `pick`, so a comparison is a link you can send.
|
|
115
|
-
|
|
116
118
|
Three constraints the tool puts on a variant file:
|
|
117
119
|
|
|
118
120
|
- **Never import a package barrel.** The libraries resolve to source, so one barrel makes
|
|
@@ -123,6 +125,20 @@ Three constraints the tool puts on a variant file:
|
|
|
123
125
|
- **One file per variant**, so several agents can draw at once, and a broken variant breaks
|
|
124
126
|
its own frame only.
|
|
125
127
|
|
|
128
|
+
A `<script>` in a drawing's `body` never runs. For behavior - a play button that restarts a
|
|
129
|
+
CSS animation, a click that toggles a class - give the drawing a `setup(root)` function. The
|
|
130
|
+
frame calls it once, after the markup is in `root`. `setup` has no cleanup hook, because each
|
|
131
|
+
frame load is fresh. Wire behavior with one delegated listener on `root`. `setup` can also be an array of functions, run in order. If one throws, the
|
|
132
|
+
markup stays and the error shows on top of it.
|
|
133
|
+
|
|
134
|
+
For a prototype with states, render each state with `ngStates({ closed: …, open: … }, { imports })`
|
|
135
|
+
and put its `body` in the drawing. `setup: flow.on([{ click: '.trigger', go: 'open' }])` swaps the
|
|
136
|
+
states on a click, in a View Transition. To draw an open overlay, open it in
|
|
137
|
+
the template (`<et-select [open]="true">`, `<div etMenu [open]="true">`): `ng()` returns the real
|
|
138
|
+
panel, and the frame places it below its trigger. See `components/ssr/02-open-overlays`. `ngStates` wraps the states in a
|
|
139
|
+
`<div data-de-states style="display: contents">` host. So `flow.body` must be the drawing's body,
|
|
140
|
+
or contain it. A selector rule must not depend on that wrapper. See `components/ssr/01-states`.
|
|
141
|
+
|
|
126
142
|
**A repository with a sketch Storybook** draws every variant in the **same** story, side by
|
|
127
143
|
side, under the real geometry the thing ships in. The default Storybook is
|
|
128
144
|
{%storybookUrl%}; an app with its own sketch Storybook names its port in the plan file.
|
|
@@ -134,6 +150,103 @@ Either way:
|
|
|
134
150
|
settled.
|
|
135
151
|
- Keep the rejected variants drawn, marked as rejected.
|
|
136
152
|
|
|
153
|
+
## The order of a design
|
|
154
|
+
|
|
155
|
+
A product design runs in this order. Each stage settles in calls before the next starts, and
|
|
156
|
+
each stage draws with what the stages before it settled:
|
|
157
|
+
|
|
158
|
+
1. **Foundations**: colours, colour themes and surface themes (the project's `themes` in
|
|
159
|
+
`config.json`), plus the type scale, spacing and radius.
|
|
160
|
+
2. **Logo and CI**, if the project needs them.
|
|
161
|
+
3. **Wireframes**: early, rough concepts of the main flows (`mode: 'wireframe'`). They show
|
|
162
|
+
which components the product needs, not how they look. The stage ends with an inventory in
|
|
163
|
+
the wireframe call: every part the wireframes need, each mapped to the SDK component it
|
|
164
|
+
starts from, or marked new with the component call that draws it. The inventory is the
|
|
165
|
+
queue of component calls:
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
inventory: [
|
|
169
|
+
{ part: 'Search field', sdk: 'et-input' },
|
|
170
|
+
{ part: 'Match card', new: true, call: 'tomflix/components/match-card' },
|
|
171
|
+
],
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
4. **Components**, from the SDK ones rendered with `ng()`, themed and set up for the project.
|
|
175
|
+
Each accepted one becomes a design-system entry.
|
|
176
|
+
5. **Larger elements**: the shell, the navigation, headers, lists, built from the entries.
|
|
177
|
+
6. **Pages**, built from the elements and the entries.
|
|
178
|
+
7. **The working prototype**: the pages joined with `ngStates` and `flow.on`.
|
|
179
|
+
|
|
180
|
+
Do not start a stage before the one above it is settled, and do not draw a page from parts that
|
|
181
|
+
are not in the design system. If the user asks for a later stage first, say which earlier stage
|
|
182
|
+
is missing, and draw that first.
|
|
183
|
+
|
|
184
|
+
A quick exploration of an idea does not run this order: start it with `--stage sketch`. A
|
|
185
|
+
sketch needs no settled stage before it, and Studio lists it apart from the seven stages. When
|
|
186
|
+
the idea holds, draw it again at its real stage.
|
|
187
|
+
|
|
188
|
+
A call made before the stage was required carries `legacy: true` instead, which
|
|
189
|
+
`et design legacy <project>` writes once. Never add `legacy` to a new call.
|
|
190
|
+
|
|
191
|
+
A later stage can show that an earlier one is incomplete. If a page needs a part that the system
|
|
192
|
+
does not have, add it to the inventory and open a component call for it. Never draw the part
|
|
193
|
+
inline in the page.
|
|
194
|
+
|
|
195
|
+
## Draw from the design system
|
|
196
|
+
|
|
197
|
+
A call that invents its own button, field or row does not match the calls beside it. **Before
|
|
198
|
+
you draw a part, look for it in this order, and draw new only when none of them has it:**
|
|
199
|
+
|
|
200
|
+
1. The project's design system, `.ethlete/design/system/<project>/`.
|
|
201
|
+
2. The real SDK components, rendered on the design server with `ng()` from `@design-explore`:
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
const field = await ng(`<et-form-field><et-label>Name</et-label><et-input /></et-form-field>`, {
|
|
205
|
+
imports: ['FORM_FIELD_IMPORTS', 'INPUT_IMPORTS'],
|
|
206
|
+
});
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The template is a real Angular template, and `imports` names exports of
|
|
210
|
+
`@ethlete/components`. The project's `providers` module in `config.json` supplies the themes.
|
|
211
|
+
Render every component of a drawing in **one** `ng()` call: each call is a new app, so two
|
|
212
|
+
calls repeat element ids. The server renders the built package, so in the SDK rebuild
|
|
213
|
+
`dist` after a component change.
|
|
214
|
+
|
|
215
|
+
To draw a form state (a value, an error, a touched field), give `ng()` (or `ngStates()`)
|
|
216
|
+
`fields`. Each entry becomes a signal form field the template binds as
|
|
217
|
+
`[formField]="fields.<name>"`. An error is a kind (`'required'`) or a kind and a message. A
|
|
218
|
+
field shows its errors only when it is touched:
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
const form = await ng(
|
|
222
|
+
`<et-form-field><et-label>Email</et-label><et-input [formField]="fields.email" /></et-form-field>`,
|
|
223
|
+
{
|
|
224
|
+
imports: ['FORM_FIELD_IMPORTS', 'INPUT_IMPORTS'],
|
|
225
|
+
fields: { email: { value: 'ada@', errors: [{ kind: 'email', message: 'Not an email' }], touched: true } },
|
|
226
|
+
},
|
|
227
|
+
);
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
3. Only then a new drawing. Build it from the two above, and say in the variant's `claim`
|
|
231
|
+
that the part is new.
|
|
232
|
+
|
|
233
|
+
One entry is one folder:
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
.ethlete/design/system/<project>/<entry>/
|
|
237
|
+
<entry>.ts exports the drawing function, with typed options; built from the SDK mocks
|
|
238
|
+
entry.md what it is, when to use it, which SDK parts and options, do and do not
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Its preview is a view call at `.ethlete/design/calls/<project>/system/<entry>/`, because the
|
|
242
|
+
tool reads calls from `calls/` only. A variant imports the entry with a relative path. Read
|
|
243
|
+
every `entry.md` of the project before the first drawing of a session.
|
|
244
|
+
|
|
245
|
+
**An entry exists only because the user accepted it.** A `chosen` verdict is not enough: a
|
|
246
|
+
chosen variant is often a layout or a one-off. When the user says to accept a part into the
|
|
247
|
+
system, extract it in one commit: the entry folder, its preview call, and the source call's
|
|
248
|
+
variant changed to import it. Never change an entry's look without a call the user settled.
|
|
249
|
+
|
|
137
250
|
## Check before you look
|
|
138
251
|
|
|
139
252
|
A broken build draws an overlay, so a screenshot of it looks like a design. **One check
|
|
@@ -156,7 +269,7 @@ node check-story.mjs --lint <changed files> --tsconfig apps/<app>/.storybook/tsc
|
|
|
156
269
|
```
|
|
157
270
|
|
|
158
271
|
Both take about four seconds and need no dev server. Then stop and hand the slug to the
|
|
159
|
-
user. Do not also
|
|
272
|
+
user. Do not also render it in a browser: it costs a browser launch, and both tools
|
|
160
273
|
transpile without type checking, so the render reports `ok` on a file that does not
|
|
161
274
|
compile. Open it only when the check passes and the drawing still does not appear:
|
|
162
275
|
|
|
@@ -183,7 +296,7 @@ A call has one job per variant, so it fans out. Every brief names `model: opus`.
|
|
|
183
296
|
|
|
184
297
|
## Screenshots
|
|
185
298
|
|
|
186
|
-
**Off by default.** The user has the
|
|
299
|
+
**Off by default.** The user has the call open and sends you a picture when something looks
|
|
187
300
|
wrong. Take one only when the code cannot tell you whether two variants really differ, and
|
|
188
301
|
never to put in front of the user. Copy {%resource:shoot-template.mjs%} to the repository
|
|
189
302
|
root.
|
|
@@ -73,6 +73,10 @@ resolve automatically per CSS state when the element has `[etSurfaceInteractive]
|
|
|
73
73
|
similarly `[etColorInteractive]` re-resolves the color tokens per state. Put either on
|
|
74
74
|
the interactive element itself, never on a wrapper.
|
|
75
75
|
|
|
76
|
+
**Never use `hover:bg-et-surface-interaction-hover` for a hover row.** The token is a
|
|
77
|
+
full-strength neutral tint, so in dark mode it gives a light row with near-white text. Use
|
|
78
|
+
`[etSurfaceInteractive]` on the row for hover feedback.
|
|
79
|
+
|
|
76
80
|
## Providing context
|
|
77
81
|
|
|
78
82
|
- `[etProvideSurface]="surfaceThemeName"` / `[etAutoSurface]` (auto-picks the next
|
package/migrations/nx-layout.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Compare the workspace with the Nx layout rule
|
|
2
2
|
|
|
3
3
|
`@ethlete/agent-rules` now ships an `nx-layout` rule for Nx workspaces: thin apps, feature code in
|
|
4
|
-
`libs/domain/<app
|
|
4
|
+
one `libs/domain/<app>` lib per app with a folder per feature, shared `queries`, `types`, `uikit`, `theme` and `env` libs, aliases that
|
|
5
5
|
mirror the path, and one `scope:*` tag per project. New code follows it.
|
|
6
6
|
|
|
7
7
|
This is a recommendation, not a rewrite. Moving projects changes import paths, project names, tags
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/agent-rules",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.24",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/ethlete-io/ethdk",
|
|
7
|
+
"directory": "libs/agent-rules"
|
|
8
|
+
},
|
|
4
9
|
"license": "MIT",
|
|
5
10
|
"type": "commonjs",
|
|
6
11
|
"exports": {
|
|
@@ -19,9 +24,6 @@
|
|
|
19
24
|
"bin": {
|
|
20
25
|
"ethlete-agents": "./src/index.js"
|
|
21
26
|
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"tslib": "^2.3.0"
|
|
24
|
-
},
|
|
25
27
|
"ethlete": {
|
|
26
28
|
"migrations": "./migrations.json"
|
|
27
29
|
},
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
3
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
18
|
const fs_1 = require("fs");
|
|
6
19
|
const path_1 = require("path");
|
|
7
20
|
const cli_args_1 = require("./lib/cli-args");
|
|
@@ -51,7 +64,7 @@ const init = (root) => {
|
|
|
51
64
|
console.error(`${config_1.CONFIG_FILE_NAME} already exists.`);
|
|
52
65
|
return 1;
|
|
53
66
|
}
|
|
54
|
-
const defaults = (0, load_content_1.loadDefaultVars)();
|
|
67
|
+
const defaults = (0, package_runner_1.followPackageManager)(root, (0, load_content_1.loadDefaultVars)());
|
|
55
68
|
const detected = (0, package_runner_1.detectCommandVars)(root);
|
|
56
69
|
const vars = Object.fromEntries(INIT_VARS.map((name) => { var _a; return [name, (_a = detected[name]) !== null && _a !== void 0 ? _a : defaults[name]]; }).filter(([, value]) => value));
|
|
57
70
|
const template = {
|
|
@@ -108,7 +121,7 @@ const run = (argv) => {
|
|
|
108
121
|
return command === undefined || command === '--help' || command === '-h' ? 0 : 1;
|
|
109
122
|
}
|
|
110
123
|
};
|
|
111
|
-
|
|
124
|
+
__exportStar(require("./lib"), exports);
|
|
112
125
|
// Guarded so the package can also be imported as a library without running the CLI.
|
|
113
126
|
if (require.main === module) {
|
|
114
127
|
Promise.resolve()
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/agent-rules/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/agent-rules/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,2BAA+C;AAC/C,+BAA4B;AAC5B,6CAA+D;AAC/D,yCAA+F;AAC/F,6DAAwD;AACxD,qDAAqD;AACrD,2CAAwC;AACxC,qEAAgE;AAChE,yDAA+E;AAC/E,iDAAyC;AACzC,qCAAyC;AACzC,+DAA2D;AAE3D,MAAM,KAAK,GAAG;;;;6CAI+B,yBAAgB;;;;;;;;;;;;;;;kDAeX,sBAAa,CAAC,IAAI,CAAC,IAAI,CAAC;;uBAEnD,yBAAgB;;CAEtC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAc,EAAE,IAAY,EAAE,EAAE;IAChD,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAA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AsB;AAEtB,oFAAoF;AACpF,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,OAAO,EAAE;SACd,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACtC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAClC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,IAAA,kBAAK,EAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC7E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/src/lib/config.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ export declare const MOVED_LOCAL_CONFIG_KEYS: string[];
|
|
|
80
80
|
export declare const TOPOLOGY_CONFIG_FILE_NAME = "ethlete.config.local.json";
|
|
81
81
|
export declare const readLocalConfig: (root: string) => LocalConfigState;
|
|
82
82
|
/**
|
|
83
|
-
* Emit for the agents a repo already uses. `codex` is always included: `AGENTS.md` is the
|
|
83
|
+
* Emit for the agents a repo already uses (a `.claude` directory or a `CLAUDE.md` file means Claude). `codex` is always included: `AGENTS.md` is the
|
|
84
84
|
* cross-tool standard that Cursor, Copilot and most other agents read as well, and gating it on
|
|
85
85
|
* an existing `AGENTS.md` would mean the file that triggers Codex output is the very file the
|
|
86
86
|
* sync is supposed to create.
|
package/src/lib/config.js
CHANGED
|
@@ -121,14 +121,14 @@ const readLocalConfig = (root) => {
|
|
|
121
121
|
};
|
|
122
122
|
exports.readLocalConfig = readLocalConfig;
|
|
123
123
|
/**
|
|
124
|
-
* Emit for the agents a repo already uses. `codex` is always included: `AGENTS.md` is the
|
|
124
|
+
* Emit for the agents a repo already uses (a `.claude` directory or a `CLAUDE.md` file means Claude). `codex` is always included: `AGENTS.md` is the
|
|
125
125
|
* cross-tool standard that Cursor, Copilot and most other agents read as well, and gating it on
|
|
126
126
|
* an existing `AGENTS.md` would mean the file that triggers Codex output is the very file the
|
|
127
127
|
* sync is supposed to create.
|
|
128
128
|
*/
|
|
129
129
|
const detectTargets = (root) => {
|
|
130
130
|
const detected = ['codex'];
|
|
131
|
-
if ((0, fs_1.existsSync)((0, path_1.join)(root, '.claude')))
|
|
131
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(root, '.claude')) || (0, fs_1.existsSync)((0, path_1.join)(root, 'CLAUDE.md')))
|
|
132
132
|
detected.push('claude');
|
|
133
133
|
if ((0, fs_1.existsSync)((0, path_1.join)(root, '.cursor')))
|
|
134
134
|
detected.push('cursor');
|
|
@@ -167,7 +167,7 @@ const loadConfig = (options) => {
|
|
|
167
167
|
root,
|
|
168
168
|
targets,
|
|
169
169
|
scopes: raw.profile === 'sdk' ? ['sdk', 'both'] : ['consumer', 'both'],
|
|
170
|
-
vars: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, load_content_1.loadDefaultVars)()), (0, package_runner_1.detectCommandVars)(root)), { packageRunner: (0, package_runner_1.detectPackageRunner)(root) }), gitFlowVars(gitFlow)), (0, commitlint_1.commitMessageVars)((0, commitlint_1.findCommitlintConfig)(root))), ((_b = raw.vars) !== null && _b !== void 0 ? _b : {})),
|
|
170
|
+
vars: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, package_runner_1.followPackageManager)(root, (0, load_content_1.loadDefaultVars)())), (0, package_runner_1.detectCommandVars)(root)), { packageRunner: (0, package_runner_1.detectPackageRunner)(root) }), gitFlowVars(gitFlow)), (0, commitlint_1.commitMessageVars)((0, commitlint_1.findCommitlintConfig)(root))), ((_b = raw.vars) !== null && _b !== void 0 ? _b : {})),
|
|
171
171
|
exclude: (_c = raw.exclude) !== null && _c !== void 0 ? _c : [],
|
|
172
172
|
claudeMdImportsAgentsMd: (_d = raw.claudeMdImportsAgentsMd) !== null && _d !== void 0 ? _d : false,
|
|
173
173
|
hooks: (_e = raw.hooks) !== null && _e !== void 0 ? _e : [],
|
package/src/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/config.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAAqC;AACrC,6CAAuE;AAEvE,yCAAmF;AACnF,iDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/config.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,+BAAqC;AACrC,6CAAuE;AAEvE,yCAAmF;AACnF,iDAAiD;AACjD,qDAAgG;AAEnF,QAAA,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAIlE,QAAA,gBAAgB,GAAG,4BAA4B,CAAC;AAEhD,QAAA,sBAAsB,GAAG,kCAAkC,CAAC;AA8CzE,uGAAuG;AAChG,MAAM,eAAe,GAAG,CAAC,KAAa,EAAE,EAAE;IAC/C,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,OAAO,CAAC,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,wBAAgB,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAC;QAEhC,IAAI,MAAM,KAAK,OAAO;YAAE,OAAO,KAAK,CAAC;QAErC,OAAO,GAAG,MAAM,CAAC;IACnB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAZW,QAAA,eAAe,mBAY1B;AAEF,MAAM,eAAe,GAAwB;IAC3C,SAAS;IACT,SAAS;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CAAC,QAAQ,mCAAI,EAAE;QAC5B,OAAO;QACP,IAAI,EAAE,MAAA,GAAG,CAAC,IAAI,mCAAI,EAAE;QACpB,cAAc,EAAE,wBAAwB,CAAC,GAAG,CAAC;KAC9C,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,UAAU,cA6BrB"}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
tslib_1.__exportStar(require("./validate"), exports);
|
|
17
|
+
__exportStar(require("./build"), exports);
|
|
18
|
+
__exportStar(require("./config"), exports);
|
|
19
|
+
__exportStar(require("./parse"), exports);
|
|
20
|
+
__exportStar(require("./rename"), exports);
|
|
21
|
+
__exportStar(require("./start"), exports);
|
|
22
|
+
__exportStar(require("./validate"), exports);
|
|
10
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/agent-rules/src/lib/git-flow/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/agent-rules/src/lib/git-flow/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,6CAA2B"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.gitFlowCommand = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
13
|
const config_1 = require("./config");
|
|
6
14
|
const git_1 = require("./git");
|
|
7
15
|
const git_flow_1 = require("./git-flow");
|
|
@@ -118,7 +126,7 @@ Options for start and repair
|
|
|
118
126
|
--yes Do not ask for confirmation
|
|
119
127
|
--dry-run Print the plan and stop
|
|
120
128
|
`;
|
|
121
|
-
const gitFlowCommand = (options) =>
|
|
129
|
+
const gitFlowCommand = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
122
130
|
const { root, argv } = options;
|
|
123
131
|
// The subcommand is the first positional, not `argv[0]` — a global flag like `--root` may precede it.
|
|
124
132
|
const [subcommand, ref] = positionalArgs(argv);
|