@ethlete/agent-rules 0.1.0-next.32 → 0.1.0-next.34

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.
@@ -51,6 +51,19 @@ et design sketch reject <layer>/<name> --variant b [--reason <text>] --by <model
51
51
  et design sketch reopen <layer>/<name> --variant b [--reason <text>] --by <model id> # only when the user takes b back; the rejection stays in the history
52
52
  ```
53
53
 
54
+ When the app shows UI the design does not draw, open the sketch at once with the built look as variant a, and
55
+ name the compare DIFFs it explains:
56
+
57
+ ```bash
58
+ et design sketch covers <layer>/<name> <state> <state>@<x>,<y>,<w>,<h>… --by <model id> # no state clears them
59
+ ```
60
+
61
+ While the sketch is open, `compare` lists each covered DIFF with the sketch name and passes it. A bare state
62
+ covers its whole DIFF; `@x,y,w,h` covers only differing pixels inside that box of the state's picture (the
63
+ diff PNG compare writes), and never a size change. A sketch with several targets needs the part in front,
64
+ `<layer>/<name>:<state>[@x,y,w,h]`, and refuses a bare state (exit 2); a one-target sketch takes both forms. Any other DIFF on the part still fails. After the pick the
65
+ cover ends, and the part must compare green again.
66
+
54
67
  One change across several parts (an alias removal, a token rename) is one sketch with several targets: each
55
68
  variant holds every target, and `ready` compares them all. `ready` and `preview` also name every part a `shared/`
56
69
  edit reaches.
@@ -161,8 +174,7 @@ several variants at once; with `--round` they all start the new round. A new rou
161
174
  variant and mark the sketch `ready` again. `sketch new --round <title> --note <text>` names
162
175
  round 1 and sets its note; `--round` without `--note` fails. `sketch ready` refuses while the running round has no note; set it with `sketch round`.
163
176
  `sketch ready` also shoots every state of every variant and of the product's part: when not one pixel differs
164
- in any of them, it merges the sketch itself and logs it as an `auto` entry in the product's `accepted.json`
165
- ("No visible change in any state: merged automatically."). Any difference or failed shot leaves it `ready`.
177
+ in any of them, it merges the sketch itself. Any difference or failed shot leaves it `ready`.
166
178
  A problem the product already had before the merge does not block it (the check prints it as a note); only a problem the merge adds does.
167
179
  Run `sketch ready` again on a `ready` sketch to repeat the check and the auto merge.
168
180
 
@@ -194,6 +206,6 @@ in the product since the sketch was created, the merge refuses: bring each varia
194
206
  current shape. The user's reason is optional: with one, the merge sets the note from it; without
195
207
  one, the part keeps the `note` the picked variant file holds, so write that note while you draw.
196
208
 
197
- After the user approves a direct edit of a merged part (no sketch), run `et design accept <layer>/<name> --product <p> --by <model id> --note <why>` so `design check` stops warning `changed outside a sketch`. Never accept an edit the user did not approve.
209
+ A part is build-ready when `design check` writes a current check record with no blockers (`ready.json`, tool-written, committed); Studio shows "Baubereit", "Nicht baubereit (n)" or "Wird geprüft". A direct edit of a merged part outside a sketch opens an old/new edit sketch that the user picks in Studio; there is no go and no accept command. `design check` warns `LEFTOVER-FILE` for a leftover gate file of the old go and accept flow and names the file to delete.
198
210
 
199
211
  To drop a merged part the user no longer wants (folded back into its host, say), run `et design part remove <layer>/<name> --product <p> --by <model id>`: it deletes the folder, its `merged.json` entry and its tsconfig path, and resolves its comments. It refuses while another part imports it or an open sketch targets it. Never `git rm` a part by hand.
@@ -196,6 +196,10 @@ before. Then run, with the slug of the file you saved:
196
196
  node <sessions-skill-dir>/agent-sessions.mjs restart <name> '<resume command> <slug> [<text after the slug>]'
197
197
  ```
198
198
 
199
+ Add `--process` after `restart` when the session changed a plugin, a settings file, an MCP server or `PATH`.
200
+ A plain restart keeps the old process, so the change reaches only a new one.
201
+ Before `--process`, write the command line of each background job of the session into the handoff file. The exit stops these jobs, so the new process starts them again.
202
+
199
203
  If the user wrote text after the slug of the save command, append it to the prompt word for word.
200
204
  Escape each `'` in it as `'\''`. The restart drops anything you leave out, and the fresh session has
201
205
  no other way to see it.
@@ -227,8 +231,11 @@ first line of the handoff file: `Restarted because: <one line>`. End the turn wi
227
231
  the constraints and the dead ends, so do not re-read the plan files it summarises, and do
228
232
  not survey the directory. Open a source file when you are going to edit it, and load a
229
233
  focused guidance file only when the work needs one.
230
- 5. Continue with the **Next steps** section. Don't redo work listed under
234
+ 5. If the handoff name starts with a role prefix (`builder-`, `doc-agent-`) and a skill
235
+ of that name exists (`builder-agent`, `doc-agent`), load that skill now. Do it yourself;
236
+ do not wait for a line in the handoff that asks for it.
237
+ 6. Continue with the **Next steps** section. Don't redo work listed under
231
238
  _Done_; don't re-open questions under _Decisions_.
232
- 6. When every next step is complete, decide whether the handoff can be removed. Delete it
239
+ 7. When every next step is complete, decide whether the handoff can be removed. Delete it
233
240
  only if this workflow created it and the save workflow or user authorized cleanup.
234
241
  Otherwise report that it is no longer needed and let the user decide.
@@ -108,6 +108,11 @@ full-strength neutral tint, so in dark mode it gives a light row with near-white
108
108
 
109
109
  ## Pitfalls
110
110
 
111
+ - A surface theme may have `elevation: -1` (a literal unary minus); the generator fails on a theme it cannot
112
+ parse. Filled form fields, table card rows and grid items resolve `parent.elevation + 1`; toasts and
113
+ `@ethlete/cdk` overlays with a backdrop always resolve elevation 1 (without a backdrop, `parent + 1`), and the
114
+ overlay scope class goes from `et-surface--inherited` to `et-surface--<theme>`. `@ethlete/cdk` CSS reads no
115
+ `--et-surface-*` token, so `etProvideSurface` on a cdk host does nothing.
111
116
  - `@property` `initial-value` cannot contain `var()`, so a public `--et-*` token
112
117
  declared via `@property` can never default to a theme token. If the default should
113
118
  come from the theme, don't declare an `@property` - consume the theme token directly
@@ -125,8 +130,9 @@ full-strength neutral tint, so in dark mode it gives a light row with near-white
125
130
  permitted for theme-less setups, but themes make it unnecessary. `injectSemanticColorTheme()`
126
131
  is a hard requirement wherever it is read.
127
132
  - **Cascade layers, not `:where()`, decide who wins against SDK component CSS.** SDK
128
- styles live in `@layer components`, so a utility or unlayered app CSS overrides them.
129
- An app rule inside `@layer components` loses. See the `app-styling` rule.
133
+ styles live in `@layer components.sdk`, nested in `components`, so an app rule in
134
+ `@layer components`, a utility, or unlayered app CSS overrides them. See the
135
+ `app-styling` rule.
130
136
 
131
137
  Styling a **story** file rather than a component? The colour rule is the same. Check the
132
138
  repository's Storybook guidance before assuming a Tailwind utility exists.
@@ -49,9 +49,8 @@ answer proposes waits for the user's approval as auto mode's own does.
49
49
  A subject the app does not offer the press on is refused: an unknown or resolved stand-in, one
50
50
  the day holds no time of, a context a rule names or the user named by hand.
51
51
 
52
- Tell the user a request waits in Timetrack, then read `approval` once they say they decided -
53
- do not poll in a loop. A request that is still waiting at the end of the day it was asked on
54
- expires; ask again rather than assuming it landed. Set `TIMETRACK_CLIENT` to name yourself in the
52
+ Tell the user a request waits, then read `approval` once they say they decided - do not poll.
53
+ A request still waiting at the end of its day expires; ask again. Set `TIMETRACK_CLIENT` to name yourself in the
55
54
  queue (Claude Code is named without it).
56
55
 
57
56
  **Never ask the user for a Jira token, and never write one into a file.** If a command reports
@@ -61,33 +60,44 @@ nobody can rotate.
61
60
 
62
61
  ## What each command is for
63
62
 
64
- | Command | Use it when |
65
- | ------------------------------------------ | --------------------------------------------------------------------------- |
66
- | `status` | Before anything else, when a Jira command failed and you need the cause |
67
- | `instance` | A setup step needs the instance's levels or its branch-subject field |
68
- | `issue <KEY>` | The user names a key and you need its summary, type or parent |
69
- | `search [text]` | The user describes work but names no key |
70
- | `project [path]` | You need the project a repository files into |
71
- | `create --summary "…"` | The work has no ticket and the user asked for one |
72
- | `log --issue <KEY> --minutes <n>` | The user asks to record time that nothing observed |
73
- | `day [YYYY-MM-DD]` | You need the evidence a day holds, not a screenshot of it |
74
- | `rows [YYYY-MM-DD]` | You need the rows the day drew, and the ids an edit names them by |
75
- | `edit <row-id> …` | The user asks you to correct one row of a day |
76
- | `rules` | You need to know why a band was named, or why it was not |
77
- | `standins` | You need to know which work still waits for a ticket, and for how long |
78
- | `standins --remove <id>` | A placeholder is wrong or too wide, and the user asked you to delete it |
79
- | `standins --rename <id> --name <text>` | The name a placeholder carries is wrong, and the user asked you to fix it |
80
- | `standins --merge <id> --into <id>` | Two placeholders are one piece of work, and the user asked you to join them |
81
- | `standins --resolve <id> --issue <KEY>` | The user named the issue a placeholder is, or the one a resolved one is now |
82
- | `naming [YYYY-MM-DD]` | A checkout was never offered a name and you need the step that stopped |
83
- | `worklogs [from] [to]` | You need what the user already booked in Tempo over a span of days |
84
- | `calendar [from] [to]` | You need the user's meetings and calendar entries over a span of days |
85
- | `sync <YYYY-MM-DD>` | The user asks what a Tempo sync of a day would write, or asks to sync it |
86
- | `worklog --delete <id> --day <YYYY-MM-DD>` | The user asked you to delete one of their own Tempo worklogs |
87
- | `approval <id>` | A write you queued: whether the user approved it, and what it answered |
88
- | `approvals` | You need what waits in the queue, from every caller |
89
- | `approval <id> --reject` | The user asked you to drop a waiting write, or you queued one by mistake |
90
- | `ask --stand-in <id>` / `--context <id>` | The user asks auto mode to look at a stand-in or an unnamed band again |
63
+ | Command | Use it when |
64
+ | ------------------------------------------ | ---------------------------------------------------------------------------- |
65
+ | `status` | Before anything else, when a Jira command failed and you need the cause |
66
+ | `instance` | A setup step needs the instance's levels or its branch-subject field |
67
+ | `issue <KEY>` | The user names a key and you need its summary, type or parent |
68
+ | `search [text]` | The user describes work but names no key |
69
+ | `project [path]` | You need the project a repository files into |
70
+ | `create --summary "…"` | The work has no ticket and the user asked for one |
71
+ | `log --issue <KEY> --minutes <n>` | The user asks to record time that nothing observed |
72
+ | `day [YYYY-MM-DD]` | You need the evidence a day holds, not a screenshot of it |
73
+ | `rows [YYYY-MM-DD]` | You need the rows the day drew, and the ids an edit names them by |
74
+ | `edit <row-id> …` | The user asks you to correct one row of a day |
75
+ | `rules` | You need to know why a band was named, or why it was not |
76
+ | `standins` | You need to know which work still waits for a ticket, and for how long |
77
+ | `standins --remove <id>` | A placeholder is wrong or too wide, and the user asked you to delete it |
78
+ | `standins --rename <id> --name <text>` | The name a placeholder carries is wrong, and the user asked you to fix it |
79
+ | `standins --merge <id> --into <id>` | Two placeholders are one piece of work, and the user asked you to join them |
80
+ | `standins --resolve <id> --issue <KEY>` | The user named the issue a placeholder is, or the one a resolved one is now |
81
+ | `naming [YYYY-MM-DD]` | A checkout was never offered a name and you need the step that stopped |
82
+ | `transcript [YYYY-MM-DD]` | You need what the user said in the day's calls (their microphone) |
83
+ | `resync [path…] [--replace]` | Checkouts got a project link and their agent session logs must be read again |
84
+ | `worklogs [from] [to]` | You need what the user already booked in Tempo over a span of days |
85
+ | `calendar [from] [to]` | You need the user's meetings and calendar entries over a span of days |
86
+ | `sync <YYYY-MM-DD>` | The user asks what a Tempo sync of a day would write, or asks to sync it |
87
+ | `worklog --delete <id> --day <YYYY-MM-DD>` | The user asked you to delete one of their own Tempo worklogs |
88
+ | `approval <id>` | A write you queued: whether the user approved it, and what it answered |
89
+ | `approvals` | You need what waits in the queue, from every caller |
90
+ | `approval <id> --reject` | The user asked you to drop a waiting write, or you queued one by mistake |
91
+ | `ask --stand-in <id>` / `--context <id>` | The user asks auto mode to look at a stand-in or an unnamed band again |
92
+
93
+ `naming` reports whether a Tempo token is stored, how far the worklog history got, and per checkout the
94
+ offer or the reason there is none (`already-named`, `no-project-link`, `no-history`,
95
+ `project-too-small`, `too-few-days`, `share-too-low`); read a `history` of `failed` or `no-token` first.
96
+ `rules` reads the settings that name a day's work - attribution rules, project links, background
97
+ projects, ruled applications - and holds no host, account or token, so it is safe to quote. A
98
+ rule that donates its time carries no issue key, and a `backgroundProjects` project keeps only the
99
+ minutes no other band claims. `resync` queues a re-read, `--replace` overwrites what the store holds
100
+ (after a parser fix).
91
101
 
92
102
  `git-flow start` uses the same channel, so a branch is named from the real issue rather than
93
103
  from a key you typed. Follow the repository's branch workflow when creating a branch.
@@ -144,148 +154,33 @@ minutes ago.
144
154
  An edit may correct a row's times, its name, its note and whether it syncs. It may not split, merge
145
155
  or delete one - restructuring a day is the user's own decision, made on the screen.
146
156
 
147
- ## Why a band carries the name it does
148
-
149
- `rules` reads the settings that name a day's work - the attribution rules, the project links,
150
- the background projects and the applications the user has ruled in or out. It holds no host, no
151
- account and no token, so it is safe to quote back to the user.
152
-
153
- ```bash
154
- {%packageRunner%} ethlete-agents timetrack rules # a summary of the rules
155
- {%packageRunner%} ethlete-agents timetrack rules --json # the whole answer
156
- ```
157
-
158
- Read it before claiming a band should have been named something: a rule that donates its time
159
- carries no issue key, and a project in `backgroundProjects` keeps only the minutes no other
160
- band claims.
161
-
162
157
  ## Work with no ticket yet
163
158
 
164
159
  A **stand-in** is a name the user gave work that Jira does not hold yet. It takes bands across
165
- days and across checkouts, and it books nothing. `standins` lists them:
166
-
167
- ```bash
168
- {%packageRunner%} ethlete-agents timetrack standins # the open ones, oldest first
169
- {%packageRunner%} ethlete-agents timetrack standins --json # the whole answer, resolved ones included
170
- ```
171
-
172
- **Never open or resolve a stand-in.** The name is the user's own word for their work, and the
173
- app is the only place they give it. If the user asks for a ticket, use `create` and tell them
174
- to resolve the stand-in in Timetrack.
175
-
176
- A placeholder is drawn per branch, and per directory where the branch names no piece of work.
177
- A base branch, or no branch at all, says nothing about what was worked on, so the directory the
178
- commits touched answers instead. That directory is the project the repository declares - the one
179
- carrying the `project.json` or `package.json` above the changed files. A repository that declares
180
- none lets its own commits pick the grain between them. A directory named with a leading dot is
181
- the checkout's own tooling, so it never answers: a commit in `.changeset` or `.github` is
182
- bookkeeping for another piece of work.
183
-
184
- Where the directories cannot answer either, the branch the checkout was next cut onto does. A
185
- branch is very often cut once the work on it has started, so the minutes before the cut sit on
186
- the base branch although they are that branch's work.
187
-
188
- One placeholder written before any of that was true covers a whole checkout, and it blocks a
189
- per-branch placeholder for every branch of it. The list says so:
190
-
191
- ```
192
- Competition journey spec frontend in FIFAGG 3d old, 3 day(s) of work
193
- covers all of /home/tom/dev/fifagg/specs, so no branch of it gets one of its own
194
- ```
195
-
196
- Two separate things cause that, and either alone is enough: the record names no branch, or the
197
- rule naming it names no branch. The line above reports both, so take it at its word rather than
198
- reading `--json` yourself.
199
-
200
- ### Give one another name
201
-
202
- The name is only wrong, and the work behind it is right:
203
-
204
- ```bash
205
- {%packageRunner%} ethlete-agents timetrack standins --rename <id> --name '20260921 competition navigation rework'
206
- ```
207
-
208
- The days it holds and the rules that name it stay, which is what a delete and a fresh record would
209
- lose. Rename one only when the user asks. The name is their own word for their work, so a name you
210
- find unclear is not a fault to correct.
211
-
212
- ### Resolve one to its issue
160
+ days and checkouts and books nothing. `standins` lists the open ones, oldest first (`--json`
161
+ adds the resolved ones).
213
162
 
214
- The user told you which Jira issue a placeholder is:
215
-
216
- ```bash
217
- {%packageRunner%} ethlete-agents timetrack standins --resolve <id> --issue <KEY>
218
- ```
219
-
220
- It resolves the placeholder as the user's own pick in the app does, so every band on every day it
221
- held takes the key. One that is resolved already moves to the new key, as the app's Undo and a new
222
- pick would. It writes nothing to Tempo, so a day of it already booked keeps the old key there. The
223
- app reads the issue from Jira before it queues anything, so an unknown key or placeholder answers an
224
- error and nothing waits. A done issue is fine. The approval card shows the name, the old key and the
225
- new one with its summary.
226
-
227
- ### Re-cut one that named two pieces of work
228
-
229
- A record covering a whole checkout is repaired rather than deleted, because a delete strands its
230
- days. `--split` re-cuts it into one record per directory, and moves each day onto the right one:
231
-
232
- ```bash
233
- {%packageRunner%} ethlete-agents timetrack standins --split <id> # the plan, writes nothing
234
- {%packageRunner%} ethlete-agents timetrack standins --split <id> --force # queue it for approval
235
- ```
236
-
237
- Without `--force` it prints every directory the commits name, with its commit count and its days,
238
- then says which of them it would write. A directory under three commits is an edit made in
239
- passing rather than a piece of work, so it is listed but not written. Pass
240
- `--paths <dir>,<dir>` to pick the pieces yourself.
241
-
242
- The commits are read across every branch, and only the ones the checkout's own `user.email`
243
- authored. That is the history the collector that opened the record read, so work left on an
244
- unmerged branch still counts and a colleague's commits never shape a piece. `--author <email>`
245
- overrides the address.
246
-
247
- A day the record covers that holds no commit of yours goes back to unnamed, and the split names
248
- it. That is the honest answer: nothing says which directory it was. The day review is where it
249
- gets named, and `--claim <dir>` gives every such day to one directory instead.
250
-
251
- The record and its checkout-wide rule always go, even when a day is left unnamed. Both are read
252
- as covering every branch of the checkout, so keeping either would block any later branch from
253
- getting a record of its own — which is the fault the repair exists to cure.
254
-
255
- The record must name the checkout it was opened for. One the user opened by hand names none, and
256
- the split refuses it.
257
-
258
- You may delete one, because that takes a name away rather than putting one on the day:
163
+ **Never open or resolve a stand-in without the user asking.** The name is the user's own word for
164
+ their work, and the app is the only place they give it. If the user asks for a ticket, use
165
+ `create` and tell them to resolve the stand-in in Timetrack.
259
166
 
260
167
  ```bash
168
+ {%packageRunner%} ethlete-agents timetrack standins --rename <id> --name '<text>' # only the name is wrong
169
+ {%packageRunner%} ethlete-agents timetrack standins --resolve <id> --issue <KEY> # the user named the issue
170
+ {%packageRunner%} ethlete-agents timetrack standins --merge <id> --into <id> # two are one piece of work
171
+ {%packageRunner%} ethlete-agents timetrack standins --split <id> # plan only; add --force to queue
261
172
  {%packageRunner%} ethlete-agents timetrack standins --remove <id>
262
173
  ```
263
174
 
264
- The rule that named it goes with it, and what happens next is worth knowing before you ask:
265
-
266
- - The record names a branch. The delete refuses that branch, and no second one opens for it.
267
- - It names none. The delete refuses nothing, so the next pass opens one per branch instead.
268
-
269
- **Deleting one strands every day but today.** Only the day the app next reviews gets a new
270
- placeholder; every earlier day the record covered then reads as unnamed, with nothing left to
271
- say what it was. The command refuses such a delete and lists the days, and `--force` makes it
272
- anyway. Ask the user before you use `--force`, and tell them which days they will lose.
273
-
274
- ## Why a checkout was never offered a name
275
-
276
- The day screen offers a whole checkout one issue when the user's own record already answers it. The
277
- card is either drawn or it is not, and every step that can stop it is invisible from the screen.
278
- `naming` names the step:
279
-
280
- ```bash
281
- {%packageRunner%} ethlete-agents timetrack naming # today
282
- {%packageRunner%} ethlete-agents timetrack naming 2026-09-14
283
- ```
284
-
285
- It reports whether a Tempo token is stored, how far the read of the worklog history got, and for each
286
- checkout the day saw either the offer or the reason there is none - `already-named`,
287
- `no-project-link`, `no-history`, `project-too-small`, `too-few-days` or `share-too-low`. A `history`
288
- of `failed` or `no-token` explains every checkout at once, so read that line first.
175
+ - `--resolve` moves every band on every day the placeholder held to the key, and writes nothing to
176
+ Tempo, so a day already booked keeps the old key there. An unknown key or placeholder errors
177
+ and nothing waits.
178
+ - `--split` re-cuts a record that covers a whole checkout into one record per directory, from the
179
+ commits the checkout's own `user.email` authored (`--author <email>` overrides). Without
180
+ `--force` it prints the plan; `--paths <dir>,<dir>` picks the pieces, `--claim <dir>` gives
181
+ the days without a commit to one directory. The record must name the checkout it was opened for.
182
+ - **`--remove` strands every day but today** as unnamed. It refuses such a delete and lists the
183
+ days; ask the user before you pass `--force`, and tell them which days they lose.
289
184
 
290
185
  ## What Tempo already holds
291
186
 
@@ -342,8 +237,7 @@ printed:
342
237
  {%packageRunner%} ethlete-agents timetrack sync 2026-09-07 --write --plan 1a2b3c4d
343
238
  ```
344
239
 
345
- The write is queued, and the user approves it in the app as well - "Approve all" never includes
346
- it. On approval the app plans the day again and refuses, writing nothing, when the hash differs -
240
+ "Approve all" never includes it. On approval the app plans the day again and refuses when the hash differs -
347
241
  the day changed since the user saw it, so read it again and ask again. `--write` without `--plan`
348
242
  is refused at once. Once approved, `approval <id>` prints each row as `written`, `blocked`,
349
243
  `skipped` or `failed`, with the worklog id or the error, and exits non-zero while a row did not
@@ -363,17 +257,14 @@ id and its day off `worklogs --json`:
363
257
  {%packageRunner%} ethlete-agents timetrack worklog --delete 98765 --day 2026-09-07
364
258
  ```
365
259
 
366
- It is a Tempo write, so the same rule holds: **name the worklog to the user, and delete only after
367
- they confirmed that one in this conversation.** The app refuses, deleting nothing, an id that is not
368
- among the account's own worklogs on that day. The delete is queued for the user's approval like
369
- `sync --write`; once approved, `approval <id>` answers what went, and the app drops its own record
370
- of the worklog, so the next `sync` of the day plans from what Tempo holds.
260
+ **Name the worklog to the user, and delete only after they confirmed that one in this conversation.**
261
+ The app refuses an id that is not among the account's own worklogs on that day. Once approved,
262
+ `approval <id>` answers what went, and the next `sync` of the day plans from what Tempo holds.
371
263
 
372
264
  ## Writes
373
265
 
374
- Four commands write to Jira or Tempo, so all need the user to have asked for them in this
375
- conversation - `sync --write` and `worklog --delete` are described above. Each is queued for the
376
- user's approval in the app:
266
+ Writes to Jira or Tempo need the user to have asked for them in this conversation (`sync --write` and
267
+ `worklog --delete` are above):
377
268
 
378
269
  ```bash
379
270
  {%packageRunner%} ethlete-agents timetrack create --summary "Reset password mail is not sent" --project FIP
package/migrations.json CHANGED
@@ -1,14 +1,5 @@
1
1
  {
2
2
  "migrations": [
3
- {
4
- "name": "app-styling-utilities",
5
- "version": "0.1.0-next.17",
6
- "kind": "assisted",
7
- "level": "required",
8
- "description": "App rules in @layer components move out of that layer, so SDK styles stop overriding them.",
9
- "instructions": "./migrations/app-styling-utilities.md",
10
- "docs": "/components/setup"
11
- },
12
3
  {
13
4
  "name": "list-state-query-form",
14
5
  "version": "0.1.0-next.17",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/agent-rules",
3
- "version": "0.1.0-next.32",
3
+ "version": "0.1.0-next.34",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/ethlete-io/ethdk",
@@ -0,0 +1,11 @@
1
+ import { ExecFileSyncOptions, SpawnSyncOptions, SpawnSyncReturns } from 'child_process';
2
+ /** `process.env` plus `extra` without the `GIT_*` variables inherited from a hook, so git in a temp repo never reaches the hook's repo. */
3
+ export declare const gitEnv: (extra?: Record<string, string | undefined>) => NodeJS.ProcessEnv;
4
+ /** `execFileSync('git', args, options)` with every inherited `GIT_*` variable stripped. */
5
+ export declare const gitExec: (args: string[], options?: ExecFileSyncOptions) => string & Buffer;
6
+ /** `spawnSync('git', args, options)` with every inherited `GIT_*` variable stripped. */
7
+ export declare const gitSpawn: (args: string[], options?: SpawnSyncOptions) => SpawnSyncReturns<string & Buffer>;
8
+ /** Runs git in `dir` with `GIT_*` stripped and returns trimmed stdout. */
9
+ export declare const git: (dir: string, ...args: string[]) => string;
10
+ /** Makes a temp directory, runs `git init` in it and returns its path. */
11
+ export declare const tempGitRepo: (prefix?: string) => string;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tempGitRepo = exports.git = exports.gitSpawn = exports.gitExec = exports.gitEnv = void 0;
4
+ const child_process_1 = require("child_process");
5
+ const fs_1 = require("fs");
6
+ const os_1 = require("os");
7
+ const path_1 = require("path");
8
+ /** `process.env` plus `extra` without the `GIT_*` variables inherited from a hook, so git in a temp repo never reaches the hook's repo. */
9
+ const gitEnv = (extra = {}) => {
10
+ const merged = Object.assign(Object.assign({}, process.env), extra);
11
+ return Object.fromEntries(Object.entries(merged).filter(([key, value]) => !(key.startsWith('GIT_') && process.env[key] === value)));
12
+ };
13
+ exports.gitEnv = gitEnv;
14
+ const withGitEnv = (options) => (Object.assign(Object.assign({}, options), { env: (0, exports.gitEnv)(options === null || options === void 0 ? void 0 : options.env) }));
15
+ /** `execFileSync('git', args, options)` with every inherited `GIT_*` variable stripped. */
16
+ const gitExec = (args, options) => (0, child_process_1.execFileSync)('git', args, withGitEnv(options));
17
+ exports.gitExec = gitExec;
18
+ /** `spawnSync('git', args, options)` with every inherited `GIT_*` variable stripped. */
19
+ const gitSpawn = (args, options) => (0, child_process_1.spawnSync)('git', args, withGitEnv(options));
20
+ exports.gitSpawn = gitSpawn;
21
+ /** Runs git in `dir` with `GIT_*` stripped and returns trimmed stdout. */
22
+ const git = (dir, ...args) => (0, exports.gitExec)(args, { cwd: dir, encoding: 'utf8', stdio: 'pipe' }).trim();
23
+ exports.git = git;
24
+ /** Makes a temp directory, runs `git init` in it and returns its path. */
25
+ const tempGitRepo = (prefix = 'git-spec-') => {
26
+ const dir = (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), prefix));
27
+ (0, exports.git)(dir, 'init', '-q');
28
+ return dir;
29
+ };
30
+ exports.tempGitRepo = tempGitRepo;
31
+ //# sourceMappingURL=git-test-env.fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-test-env.fixtures.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/git-test-env.fixtures.ts"],"names":[],"mappings":";;;AAAA,iDAAiH;AACjH,2BAAiC;AACjC,2BAA4B;AAC5B,+BAA4B;AAE5B,2IAA2I;AACpI,MAAM,MAAM,GAAG,CAAC,QAA4C,EAAE,EAAE,EAAE;IACvE,MAAM,MAAM,mCAAQ,OAAO,CAAC,GAAG,GAAK,KAAK,CAAE,CAAC;IAC5C,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,CACpF,CAAC;AACzB,CAAC,CAAC;AALW,QAAA,MAAM,UAKjB;AAEF,MAAM,UAAU,GAAG,CAAwC,OAAW,EAAE,EAAE,CAAC,iCACtE,OAAO,KACV,GAAG,EAAE,IAAA,cAAM,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,IACzB,CAAC;AAEH,2FAA2F;AACpF,MAAM,OAAO,GAAG,CAAC,IAAc,EAAE,OAA6B,EAAE,EAAE,CACvE,IAAA,4BAAY,EAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,CAAoB,CAAC;AADvD,QAAA,OAAO,WACgD;AAEpE,wFAAwF;AACjF,MAAM,QAAQ,GAAG,CAAC,IAAc,EAAE,OAA0B,EAAE,EAAE,CACrE,IAAA,yBAAS,EAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,CAAsC,CAAC;AADtE,QAAA,QAAQ,YAC8D;AAEnF,0EAA0E;AACnE,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,GAAG,IAAc,EAAE,EAAE,CACpD,IAAA,eAAO,EAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AADzD,QAAA,GAAG,OACsD;AAEtE,0EAA0E;AACnE,MAAM,WAAW,GAAG,CAAC,MAAM,GAAG,WAAW,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,IAAA,gBAAW,EAAC,IAAA,WAAI,EAAC,IAAA,WAAM,GAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAChD,IAAA,WAAG,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACvB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB"}
@@ -1,63 +0,0 @@
1
- # Move app CSS out of `@layer components`
2
-
3
- The `app-styling` rule now says how app components are styled: Tailwind utilities in the
4
- template, CSS only for what a utility cannot express, and never an app rule in
5
- `@layer components`. SDK styles are injected into that layer at runtime, after the app's
6
- stylesheet, so an app rule there ties on layer and loses on source order. That is a bug today,
7
- and this task fixes it. The rest of the rule applies when a component is next edited.
8
-
9
- ## Before you start
10
-
11
- If this repo has no `app-styling` rule yet (in `AGENTS.md`, or under `.claude/rules/ethlete/`),
12
- run `ethlete-agents sync` with this repo's package manager (`yarn`, `pnpm exec` or `npx`), then
13
- read the rule. If the repo's own styling rules (a styleguide, `CONTRIBUTING.md`, the parts of
14
- `AGENTS.md` outside the generated block) forbid a change below, follow them and report the
15
- conflict.
16
-
17
- ## What to change
18
-
19
- 1. Find the app stylesheets with a `@layer components` block, global stylesheets included:
20
-
21
- ```bash
22
- grep -rlE '@layer components' apps libs --include='*.css' --include='*.scss' --include='*.sass' --include='*.less'
23
- ```
24
-
25
- 2. In each, move the rules out of the block into `@layer utilities`, and delete the empty
26
- block. In `@layer utilities` a rule still beats the SDK, and does not beat every utility the
27
- way unlayered CSS would.
28
- 3. The move lets these rules win over SDK styles they used to lose to. Check the views that use
29
- them. Where a view now looks wrong because the old rule was never meant to apply, delete the
30
- rule instead.
31
-
32
- ## Leave these alone
33
-
34
- - A library that ships its own CSS to other repos. The rule is about app components.
35
- - Generated theme files, such as the surface and colour themes `@ethlete/core` writes.
36
- - `--spacing` and the other rem scales in `@theme`. If the app has not set `--spacing: 0.4rem`,
37
- setting it now rescales every utility already in use: report it and leave it.
38
- - `html { font-size: 62.5%; }`: if it is missing, report it and leave it. Adding it rescales
39
- every `rem` the app uses.
40
-
41
- ## On touch, not in this task
42
-
43
- Rewriting BEM classes and component stylesheets to utilities, replacing hardcoded colours with
44
- theme tokens, and adding `ViewEncapsulation.None` to a component that relies on emulated CSS
45
- (its CSS would leak) happen when someone edits that component. Count what is left for the
46
- final message:
47
-
48
- ```bash
49
- grep -rlE 'styleUrls?:' apps libs --include='*.ts' | wc -l
50
- grep -rlE 'class="[^"]*\b[a-z0-9-]+__[a-z0-9-]+' apps libs --include='*.html' --include='*.ts' | wc -l
51
- grep -rlE '@Component\(' apps libs --include='*.ts' | xargs grep -LE 'ViewEncapsulation\.None' | wc -l
52
- ```
53
-
54
- ## Done when
55
-
56
- - The grep in step 1 finds no app stylesheet, apart from the ones under "Leave these alone".
57
- - The type check, lint and build pass for every project you changed.
58
- - Each view that uses a moved rule is checked in the browser. A view you cannot open (the login
59
- fails, no API) is listed as unchecked in your final message; that does not block the task.
60
- - Your final message gives the three counts above, and whether `--spacing` and the 62.5% root
61
- are set.
62
-
63
- Then delete this task file.