@ethlete/agent-rules 0.1.0-next.6 → 0.1.0-next.60

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.
Files changed (220) hide show
  1. package/AGENTS.md +28 -0
  2. package/CHANGELOG.md +841 -0
  3. package/CLAUDE.md +1 -0
  4. package/README.md +244 -36
  5. package/THIRD-PARTY-LICENSES.md +35 -0
  6. package/content/defaults.json +1 -1
  7. package/content/hooks/away-mode.py +410 -0
  8. package/content/hooks/background-commands.py +177 -0
  9. package/content/hooks/builder-idle-check.py +529 -0
  10. package/content/hooks/context-warning.py +666 -134
  11. package/content/hooks/git-safety.py +213 -0
  12. package/content/hooks/human-wait-check.py +167 -0
  13. package/content/hooks/subagent-model-policy.py +261 -0
  14. package/content/mods/.claude-plugin/marketplace.json +26 -0
  15. package/content/mods/plugins/codex-runs/.claude-plugin/plugin.json +6 -0
  16. package/content/mods/plugins/codex-runs/hooks/agent-runs.ts +310 -0
  17. package/content/mods/plugins/codex-runs/hooks/hooks.json +1 -0
  18. package/content/mods/plugins/codex-runs/hooks/progress.ts +130 -0
  19. package/content/mods/plugins/codex-runs/hooks/register.tsx +283 -0
  20. package/content/mods/plugins/codex-runs/tests/pane.test.ts +21 -0
  21. package/content/mods/plugins/codex-runs/tsconfig.json +4 -0
  22. package/content/mods/plugins/codex-runs/types/index.d.ts +37 -0
  23. package/content/mods/plugins/e2e-progress/.claude-plugin/plugin.json +6 -0
  24. package/content/mods/plugins/e2e-progress/hooks/hooks.json +1 -0
  25. package/content/mods/plugins/e2e-progress/hooks/progress.ts +205 -0
  26. package/content/mods/plugins/e2e-progress/hooks/register.tsx +498 -0
  27. package/content/mods/plugins/e2e-progress/tsconfig.json +3 -0
  28. package/content/mods/plugins/e2e-progress/types/index.d.ts +27 -0
  29. package/content/mods/plugins/status-line/.claude-plugin/plugin.json +6 -0
  30. package/content/mods/plugins/status-line/hooks/hooks.json +1 -0
  31. package/content/mods/plugins/status-line/hooks/line.ts +74 -0
  32. package/content/mods/plugins/status-line/hooks/register.tsx +141 -0
  33. package/content/mods/plugins/status-line/types/index.d.ts +5 -0
  34. package/content/mods/plugins/usage-line/.claude-plugin/plugin.json +6 -0
  35. package/content/mods/plugins/usage-line/hooks/codex.ts +52 -0
  36. package/content/mods/plugins/usage-line/hooks/format.ts +24 -0
  37. package/content/mods/plugins/usage-line/hooks/hooks.json +1 -0
  38. package/content/mods/plugins/usage-line/hooks/rate-limits.ts +23 -0
  39. package/content/mods/plugins/usage-line/hooks/register.tsx +83 -0
  40. package/content/mods/plugins/usage-line/tsconfig.json +4 -0
  41. package/content/mods/plugins/usage-line/types/index.d.ts +5 -0
  42. package/content/output-styles/ste-clarity.md +131 -0
  43. package/content/rules/agent-sessions-wake-up.md +11 -0
  44. package/content/rules/app-styling.md +66 -0
  45. package/content/rules/comments.md +4 -1
  46. package/content/rules/lint-and-format.md +7 -5
  47. package/content/rules/nx-layout.md +53 -0
  48. package/content/rules/reactive-state.md +1 -1
  49. package/content/rules/styling.md +19 -10
  50. package/content/rules/subagent-models.md +42 -0
  51. package/content/rules/waiting-on-the-human.md +17 -0
  52. package/content/skills/agent-sessions/SKILL.md +101 -0
  53. package/content/skills/agent-sessions/agent-sessions.mjs +1462 -0
  54. package/content/skills/angular-patterns/SKILL.md +31 -7
  55. package/content/skills/api-source/SKILL.md +156 -0
  56. package/content/skills/app-testing/SKILL.md +141 -0
  57. package/content/skills/codex-subagent/SKILL.md +102 -0
  58. package/content/skills/codex-subagent/codex-agent.mjs +260 -0
  59. package/content/skills/codex-subagent/codex-limit.mjs +106 -0
  60. package/content/skills/design-exploration/SKILL.md +121 -0
  61. package/content/skills/design-exploration/check-story.mjs +139 -0
  62. package/content/skills/design-exploration/reference-shots.md +15 -0
  63. package/content/skills/design-exploration/shoot-template.mjs +61 -0
  64. package/content/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  65. package/content/skills/domain-modeling/SKILL.md +71 -0
  66. package/content/skills/e2e-triage/SKILL.md +80 -0
  67. package/content/skills/figma-export/SKILL.md +16 -18
  68. package/content/skills/git-commit/SKILL.md +21 -7
  69. package/content/skills/git-flow/SKILL.md +9 -5
  70. package/content/skills/grill-with-docs/SKILL.md +13 -0
  71. package/content/skills/grilling/SKILL.md +52 -0
  72. package/content/skills/handoff/SKILL.md +30 -72
  73. package/content/skills/handoff/save.md +189 -0
  74. package/content/skills/query/SKILL.md +165 -74
  75. package/content/skills/report/SKILL.md +26 -0
  76. package/content/skills/rxjs-signals/SKILL.md +33 -4
  77. package/content/skills/sdk-docs/SKILL.md +50 -14
  78. package/content/skills/sdk-local-build/SKILL.md +26 -8
  79. package/content/skills/sdk-local-build/sdk-local-baseline.mjs +64 -0
  80. package/content/skills/sdk-source/SKILL.md +37 -34
  81. package/content/skills/sdk-update/SKILL.md +103 -0
  82. package/content/skills/story-styling/SKILL.md +12 -10
  83. package/content/skills/styleguide/SKILL.md +13 -8
  84. package/content/skills/styleguide/assets.md +54 -0
  85. package/content/skills/styleguide/changesets.md +17 -0
  86. package/content/skills/styleguide/file-structure.md +73 -0
  87. package/content/skills/styleguide/lint-rule-lookup.md +52 -0
  88. package/content/skills/styleguide/storybook-structure.md +25 -0
  89. package/content/skills/theming/SKILL.md +76 -49
  90. package/content/skills/verify-in-app/SKILL.md +107 -0
  91. package/content/skills/verify-in-storybook/SKILL.md +1 -1
  92. package/content/skills/verify-on-apple-devices/SKILL.md +100 -0
  93. package/content/skills/verify-on-apple-devices/apple-remote.sh +421 -0
  94. package/content/skills/verify-on-apple-devices/sim-edge-back.m +159 -0
  95. package/migrations/list-state-query-form.md +20 -0
  96. package/migrations/nx-layout.md +29 -0
  97. package/migrations/sdk-components-over-hand-built-ui.md +27 -0
  98. package/migrations/search-query-field.md +52 -0
  99. package/migrations/studio-claude-plugin.md +27 -0
  100. package/migrations.json +47 -0
  101. package/package.json +8 -3
  102. package/src/index.js +84 -28
  103. package/src/index.js.map +1 -1
  104. package/src/lib/cli-args.d.ts +9 -0
  105. package/src/lib/cli-args.js +48 -0
  106. package/src/lib/cli-args.js.map +1 -0
  107. package/src/lib/commitlint.d.ts +10 -0
  108. package/src/lib/commitlint.js +51 -0
  109. package/src/lib/commitlint.js.map +1 -0
  110. package/src/lib/config.d.ts +53 -22
  111. package/src/lib/config.js +128 -12
  112. package/src/lib/config.js.map +1 -1
  113. package/src/lib/filter.d.ts +3 -0
  114. package/src/lib/filter.js +7 -5
  115. package/src/lib/filter.js.map +1 -1
  116. package/src/lib/frontmatter.d.ts +2 -0
  117. package/src/lib/frontmatter.js +33 -5
  118. package/src/lib/frontmatter.js.map +1 -1
  119. package/src/lib/git-flow/config.js +1 -1
  120. package/src/lib/git-flow/config.js.map +1 -1
  121. package/src/lib/git-flow/index.d.ts +1 -0
  122. package/src/lib/git-flow/index.js +20 -6
  123. package/src/lib/git-flow/index.js.map +1 -1
  124. package/src/lib/git-flow/parse.js +38 -12
  125. package/src/lib/git-flow/parse.js.map +1 -1
  126. package/src/lib/git-flow/rename.d.ts +24 -0
  127. package/src/lib/git-flow/rename.js +70 -0
  128. package/src/lib/git-flow/rename.js.map +1 -0
  129. package/src/lib/git-flow/start.d.ts +27 -0
  130. package/src/lib/git-flow/start.js +34 -1
  131. package/src/lib/git-flow/start.js.map +1 -1
  132. package/src/lib/git-flow-command.js +10 -2
  133. package/src/lib/git-flow-command.js.map +1 -1
  134. package/src/lib/git-flow-repair.d.ts +1 -1
  135. package/src/lib/git-flow-repair.js +30 -15
  136. package/src/lib/git-flow-repair.js.map +1 -1
  137. package/src/lib/git-flow-start.d.ts +1 -1
  138. package/src/lib/git-flow-start.js +25 -32
  139. package/src/lib/git-flow-start.js.map +1 -1
  140. package/src/lib/git.d.ts +37 -0
  141. package/src/lib/git.js +85 -3
  142. package/src/lib/git.js.map +1 -1
  143. package/src/lib/gitlab.js +24 -6
  144. package/src/lib/gitlab.js.map +1 -1
  145. package/src/lib/index.d.ts +2 -0
  146. package/src/lib/index.js +26 -11
  147. package/src/lib/index.js.map +1 -1
  148. package/src/lib/migrate.js +8 -2
  149. package/src/lib/migrate.js.map +1 -1
  150. package/src/lib/output-style-command.d.ts +3 -0
  151. package/src/lib/output-style-command.js +69 -0
  152. package/src/lib/output-style-command.js.map +1 -0
  153. package/src/lib/output-style.d.ts +38 -0
  154. package/src/lib/output-style.js +134 -0
  155. package/src/lib/output-style.js.map +1 -0
  156. package/src/lib/owned-paths.js +8 -2
  157. package/src/lib/owned-paths.js.map +1 -1
  158. package/src/lib/package-runner.d.ts +4 -0
  159. package/src/lib/package-runner.js +86 -0
  160. package/src/lib/package-runner.js.map +1 -0
  161. package/src/lib/plain-text.d.ts +9 -0
  162. package/src/lib/plain-text.js +22 -0
  163. package/src/lib/plain-text.js.map +1 -0
  164. package/src/lib/plan.d.ts +6 -6
  165. package/src/lib/plan.js +153 -40
  166. package/src/lib/plan.js.map +1 -1
  167. package/src/lib/prettier.d.ts +21 -0
  168. package/src/lib/prettier.js +51 -0
  169. package/src/lib/prettier.js.map +1 -0
  170. package/src/lib/prompt.js +10 -2
  171. package/src/lib/prompt.js.map +1 -1
  172. package/src/lib/render.d.ts +14 -1
  173. package/src/lib/render.js +23 -5
  174. package/src/lib/render.js.map +1 -1
  175. package/src/lib/report-command.d.ts +34 -0
  176. package/src/lib/report-command.js +322 -0
  177. package/src/lib/report-command.js.map +1 -0
  178. package/src/lib/sessions-command.d.ts +4 -0
  179. package/src/lib/sessions-command.js +16 -0
  180. package/src/lib/sessions-command.js.map +1 -0
  181. package/src/lib/sync.d.ts +1 -2
  182. package/src/lib/sync.js +37 -17
  183. package/src/lib/sync.js.map +1 -1
  184. package/src/lib/targets/agents-skills.js +1 -1
  185. package/src/lib/targets/agents-skills.js.map +1 -1
  186. package/src/lib/targets/claude-hooks.d.ts +5 -0
  187. package/src/lib/targets/claude-hooks.js +27 -4
  188. package/src/lib/targets/claude-hooks.js.map +1 -1
  189. package/src/lib/targets/claude-mods.d.ts +20 -0
  190. package/src/lib/targets/claude-mods.js +47 -0
  191. package/src/lib/targets/claude-mods.js.map +1 -0
  192. package/src/lib/targets/claude.js +2 -3
  193. package/src/lib/targets/claude.js.map +1 -1
  194. package/src/lib/targets/codex-hooks.js +4 -2
  195. package/src/lib/targets/codex-hooks.js.map +1 -1
  196. package/src/lib/targets/codex.js +4 -4
  197. package/src/lib/targets/codex.js.map +1 -1
  198. package/src/lib/targets/copilot.js +4 -4
  199. package/src/lib/targets/copilot.js.map +1 -1
  200. package/src/lib/targets/cursor.js +3 -3
  201. package/src/lib/targets/cursor.js.map +1 -1
  202. package/src/lib/targets/git-hooks.d.ts +1 -1
  203. package/src/lib/targets/git-hooks.js +6 -5
  204. package/src/lib/targets/git-hooks.js.map +1 -1
  205. package/src/lib/targets/hooks-shared.d.ts +34 -5
  206. package/src/lib/targets/hooks-shared.js +132 -36
  207. package/src/lib/targets/hooks-shared.js.map +1 -1
  208. package/src/lib/targets/mcp.d.ts +25 -0
  209. package/src/lib/targets/mcp.js +114 -0
  210. package/src/lib/targets/mcp.js.map +1 -0
  211. package/src/lib/targets/shared.d.ts +1 -9
  212. package/src/lib/targets/shared.js +4 -8
  213. package/src/lib/targets/shared.js.map +1 -1
  214. package/src/lib/timetrack.d.ts +16 -0
  215. package/src/lib/timetrack.js +149 -0
  216. package/src/lib/timetrack.js.map +1 -0
  217. package/content/skills/styleguide/STYLEGUIDE.md +0 -520
  218. package/src/lib/jira.d.ts +0 -28
  219. package/src/lib/jira.js +0 -83
  220. package/src/lib/jira.js.map +0 -1
package/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
package/README.md CHANGED
@@ -15,6 +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
+ 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
22
+ the first sync. `sync`, `check`, `init` and `migrate` reject a flag they do not know and print the usage
23
+ instead of running, and a config file that does not parse is reported by name.
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
+
18
29
  Commit the generated files, and add a drift check to CI:
19
30
 
20
31
  ```bash
@@ -38,6 +49,11 @@ Marker-block files (`AGENTS.md`, `.github/copilot-instructions.md`) are only rew
38
49
  between `<!-- ethlete:agent-rules:start -->` and `:end` - everything you wrote around
39
50
  them survives.
40
51
 
52
+ When the repo has the `et` binary installed (`node_modules/.bin/et`), `sync` also registers its design MCP server
53
+ (`et design mcp` through the `packageRunner`, for example `yarn et design mcp`) as `ethlete-design`: in `.mcp.json` for Claude Code and in
54
+ `.codex/config.toml` for Codex. Only that entry is written; other servers and tables
55
+ stay as they are.
56
+
41
57
  ## Migrating a repo to the AGENTS.md layout
42
58
 
43
59
  `AGENTS.md` is the cross-tool standard, and Claude Code officially supports reading it
@@ -99,12 +115,26 @@ Prettier rewrites them and `check` then reports drift on every run:
99
115
  `.agents/skills/` is the cross-tool baseline) and adds `claude`, `cursor` or `copilot`
100
116
  when their directory exists; or list an explicit subset.
101
117
  - **`profile`** - `"consumer"` (default) emits `scope: consumer` and `scope: both`
102
- content. `"sdk"` emits only `both`; the SDK repo uses it so its own hand-written,
103
- authoring-side guides are not overwritten by the consumer-side versions.
118
+ content. `"sdk"` emits `scope: sdk` and `scope: both`; the SDK repo uses it so its own
119
+ hand-written, authoring-side guides are not overwritten by the consumer-side versions.
104
120
  - **`vars`** - values for the template tokens a guide declares. Defaults live in
105
121
  `content/defaults.json`; a guide whose variable has no default and no value is
106
- skipped with a warning rather than emitted with a dangling placeholder.
107
- - **`exclude`** - content names to skip entirely.
122
+ skipped with a warning rather than emitted with a dangling placeholder. Some are
123
+ derived from the repo instead of defaulted - the `gitFlow*` ones from the `gitFlow`
124
+ block, `packageRunner` (`yarn`, `pnpm exec`, `bunx` or `npx`) from the root
125
+ `package.json`'s `packageManager` or the lockfile, and `commitRuleSource` / `commitValidation` from whether a commitlint config
126
+ exists (`commitlint.config.*`, `.commitlintrc*`, or a `commitlint` key in
127
+ `package.json`). Without one, the git-commit guide presents the format as the repo's
128
+ convention and never mentions a `commitlint` run - an agent that goes looking for a
129
+ promised validator and finds nothing reports the discrepancy instead of just
130
+ committing. `lintCommand` / `lintFixCommand` run the repo's `lint` script, else
131
+ `nx lint <project>` when Nx is installed, and `storybookStartCommand` runs its `storybook`
132
+ script; `sync` warns when a lint var names a script `package.json` does not have. Setting
133
+ any derived var in `vars` overrides the detection.
134
+ - **`exclude`** - rule or skill names to skip entirely for every configured agent and
135
+ developer. For example, `"exclude": ["git-flow", "handoff"]` prevents those skills
136
+ from being generated; the next `sync` also removes copies generated previously. Unknown
137
+ names produce a warning so a typo cannot silently leave a skill enabled.
108
138
  - **`claudeMdImportsAgentsMd`** - set (usually by `migrate`) when `CLAUDE.md` is an
109
139
  `@AGENTS.md` import or symlink; the claude target then skips `.claude/rules/ethlete/`
110
140
  so the rules don't load twice. `sync` warns when the flag is set but the import is
@@ -189,31 +219,32 @@ exist already - `start` says so rather than inventing a parent. `--of <branch>`
189
219
  parent explicitly, `--hotfix` branches off production, `--release <date>` makes a release
190
220
  branch, and `--subject <text>` skips Jira entirely.
191
221
 
192
- Jira needs a host, an email and an API token. Only the host belongs in the committed
193
- config; the two secrets come from `JIRA_EMAIL` / `JIRA_API_TOKEN` or from the gitignored
194
- local config.
222
+ The issue is read through the Timetrack app - see [Jira, through Timetrack](#jira-through-timetrack).
223
+ No repository holds a Jira credential, so the only thing the committed config still says about
224
+ Jira is how an issue type becomes a branch type:
195
225
 
196
226
  ```json
197
227
  {
198
228
  "jira": {
199
- "host": "https://your-team.atlassian.net",
200
- "subjectField": "customfield_10050",
201
229
  "typeByIssueType": { "Bug": "fix" }
202
230
  }
203
231
  }
204
232
  ```
205
233
 
206
- - **`subjectField`** - the field holding a Story's branch subject. Without it the summary
207
- is slugified, which is a paraphrase rather than the agreed subject.
208
234
  - **`typeByIssueType`** - the branch type per Jira issue type; anything unlisted becomes
209
235
  `feat`. `--type` overrides it per call.
210
236
 
237
+ The branch subject comes from the instance's own subject field, which Timetrack resolves
238
+ because the field id is a property of the instance rather than of this repo. An issue that
239
+ sets no subject falls back to its summary, and the printed plan says which of the two it used.
240
+
211
241
  ### `repair` - renaming a branch that does not conform
212
242
 
213
243
  `git-flow repair [ref]` derives the conforming name (`--key FIP-2900` when the old name
214
244
  carries no issue key, `--to <branch>` to override), renames the branch locally and on the
215
245
  remote, and retargets the open merge requests aimed at it through the GitLab API.
216
- `GITLAB_TOKEN` needs the `api` scope.
246
+ `GITLAB_TOKEN` needs the `api` scope, and is sent only to the hosts named in `GITLAB_HOST`
247
+ (comma-separated) or, in a GitLab CI job, `CI_SERVER_HOST`.
217
248
 
218
249
  Everything is checked before the first mutation, and it refuses rather than half-finishing:
219
250
 
@@ -221,10 +252,16 @@ Everything is checked before the first mutation, and it refuses rather than half
221
252
  move a merge request to another source branch, and closing it would lose its discussion -
222
253
  merge or close it first.
223
254
  - A branch that is pushed but whose merge requests cannot be listed (no token, or a remote
224
- that is not GitLab) blocks too. `--no-mr-check` asserts that none point at it.
255
+ that is not a configured GitLab host) blocks too. `--no-mr-check` asserts that none point at it.
225
256
  - If a retarget fails halfway, the old branch is still there and the recovery commands are
226
257
  printed.
227
258
 
259
+ ## Jira, through Timetrack
260
+
261
+ `ethlete-agents git-flow start` looks up the issue in the running Timetrack app, which holds the Jira
262
+ credentials. The app writes its loopback port and per-run token to `agent.json` in its data directory.
263
+ Set `TIMETRACK_AGENT_DISCOVERY` if the app keeps that file elsewhere.
264
+
228
265
  ## Hooks (opt-in)
229
266
 
230
267
  Hooks run commands on the developer's machine, so none are emitted by default - opt in
@@ -232,7 +269,7 @@ per hook in the config:
232
269
 
233
270
  ```json
234
271
  {
235
- "hooks": ["context-warning"]
272
+ "hooks": ["context-warning", "subagent-model-policy", "background-commands", "git-safety", "away-mode"]
236
273
  }
237
274
  ```
238
275
 
@@ -250,20 +287,117 @@ unregisters and deletes the script again. Codex only loads project-local hooks o
250
287
  Available hooks:
251
288
 
252
289
  - **`context-warning`** - warns once per tier (and instructs the agent) when the session
253
- context crosses 70% / 85% of the token budget, recommending a handoff. Under Claude the
290
+ context crosses 70% / 85% / 95% of the token budget, recommending a handoff. Under Claude the
254
291
  budget is capped at the 200k long-context pricing boundary: on 1M-window models every
255
292
  request past 200k input tokens bills the whole context at a premium rate, so the
256
- warnings fire at ~140k/~170k instead of deep into the expensive range. Codex has no
257
- such boundary, so its budget is the model's own reported context window and the
258
- warnings are pure occupancy.
293
+ warnings fire at ~140k/~170k instead of deep into the expensive range. Codex uses
294
+ the model-specific 272k pricing boundary for GPT-5.6, GPT-5.5 and GPT-5.4, and the
295
+ rollout's reported context window for models without that pricing rule.
296
+
297
+ The 85% tier asks the agent to choose - finish the task, or hand off - because a session
298
+ is often a step or two from done when it fires. The 95% tier takes that choice away. Every
299
+ prompt after the first warning carries a short reminder instead of a new warning: the
300
+ remaining budget, and how to work so that either ending stays cheap. The `handoff` skill
301
+ calls this handoff mode.
302
+
303
+ Under Claude the hook runs on four events, because a warning that only a user prompt can
304
+ trigger never reaches a long autonomous run. `SessionStart` names the budget before the
305
+ first request. `UserPromptSubmit` carries the tiered warning and the reminder.
306
+ `PostToolBatch` fires between the agent's own model requests, so it learns the count while
307
+ it works. `Stop` fires as a turn ends over 85% and the turn then continues, so the agent
308
+ must take one of three and say which: finish, hand off, or cross the boundary on purpose
309
+ for a reason it states. Each event speaks once per tier. Codex has none of the three, so
310
+ its registration stays on `UserPromptSubmit`.
259
311
 
260
312
  Two things are Claude-only: the separate user-facing line (Codex documents only
261
313
  `additionalContext`, so there the warning is folded into the text the model is told to
262
314
  relay), and the auto-mode escalation that writes the handoff file unprompted - Codex's
263
315
  `permission_mode` values are undocumented, so no value enables it.
264
316
 
317
+ Codex sub-agents are tracked by their own thread ids even though they share the root
318
+ session id. A sub-agent warning tells that child to report its state to the parent; it
319
+ never tells the user or the main agent to hand off the root session.
320
+
321
+ - **`subagent-model-policy`** (Claude Code only) - gates every call to the subagent tool.
322
+ A call that names no `model` runs on sonnet, and the model table is returned with it:
323
+ haiku for a lookup, sonnet for scoped work, opus for hard work, fable for judgment-heavy
324
+ work. Without it a subagent inherits the model leading the session, which is how an
325
+ expensive model ends up doing every grep it delegates.
326
+
327
+ Each start appends a line to `.git/ethlete/subagent-starts.jsonl` (model, effort, HEAD,
328
+ description, prompt head, the file paths the prompt names), to join with later commits.
329
+
330
+ A call that names `fable` asks the user - it is the most expensive option, and only the
331
+ user knows whether the task is judgment-heavy. A fork and an agent type whose own
332
+ definition sets a model both pass untouched, because `model` would change nothing there.
333
+
334
+ - **`background-commands`** (Claude Code only) - a foreground wait loop (`until`/`while` with
335
+ `sleep`) gets `run_in_background: true`, and a subagent's Bash call gets
336
+ `export ET_AGENT_ID=<id>;` prepended for `agent-sessions stop-own`. A config that still lists
337
+ `background-design-commands` gets this hook; the design hooks moved into the Ethlete Studio
338
+ Claude plugin.
339
+
340
+ - **`builder-idle-check`** (Claude Code only) - a `Stop` hook for the builder session (the
341
+ one that ran the `builder-agent` skill or `/handoff resume builder-...`). When a turn ends
342
+ with a free slot and `plans/QUEUE.md` has open rows owned by `Builder` without a wait
343
+ reason, it blocks the stop and names those rows. Each live Codex tmux agent session in the
344
+ checkout occupies one slot, including while waiting at its prompt. CI watchers and dev
345
+ servers do not occupy slots. A row waits when its `Stand` cell contains "wartet auf" or
346
+ "Offen nur:". The hook fires once per idle stop chain (`stop_hook_active` passes).
347
+
348
+ - **`human-wait-check`** (Claude Code only) - a `Stop` hook for builder and coordinator sessions
349
+ (the roles of `builder-idle-check`). When a turn ends with a question to the human (a line ending
350
+ in `?`) or a `! <command>` for the human to run, while fewer subagents and background commands run
351
+ than `builderSlots`, and free work is listed - open rows in the `builderIdle` queues (default
352
+ `plans/QUEUE.md`) or the `## Next steps` of the handoff the session resumed
353
+ (`.claude/handoffs/<name>.md`) - it blocks the stop once and names that work, so the session starts
354
+ an independent slice before it waits. With no queue and no handoff it stays silent. Enabling it also
355
+ emits `builder-idle-check.py`, which it imports, without registering that hook.
356
+
357
+ - **`away-mode`** (Claude Code only) - switches an interactive session into "user is away" mode
358
+ on its own. Opt in with `"awayMode": { "skills": ["my-skill"], "thresholdMinutes": 15 }` in the
359
+ config (the local config overrides it); a session is tracked once a prompt starts with
360
+ `/my-skill`. When a prompt that is not typed by a human (mailbox, cross-session, task
361
+ notification, restart) arrives after the threshold without typed input, the hook tells the
362
+ agent the user is away; the next typed prompt tells it the user is back. A typed `afk` marks
363
+ the session away at once. With `"reportCommand": "<cli> report"` inside `awayMode`, the back
364
+ message also carries that command's table since the last typed input (dropped when it fails or
365
+ takes over 10 s). State is kept in `.git/ethlete/away/`.
366
+
265
367
  Hooks can be turned off per machine - see the local config below.
266
368
 
369
+ ## Mods (Claude Code)
370
+
371
+ `"mods": ["status-line"]` in the config enables a Claude Code mod from the `ethlete` marketplace the
372
+ package ships (`yarn agents:sync` writes the marketplace and `enabledPlugins` into
373
+ `.claude/settings.json`). A mod runs code in every session of the repo, so none is on by default.
374
+
375
+ - **`codex-runs`** - open the live tmux run list with `/codex-runs` and show a run's last captured lines with
376
+ `/codex-runs <name>`. `agent-sessions run <name> codex` records the launching Claude session ID.
377
+ For a direct tmux launch, pass `-e "ETHLETE_CODEX_OWNER=$CLAUDE_CODE_SESSION_ID"` to `tmux new-session`.
378
+ Runs without an owner appear in Claude sessions in the same checkout. The pane keeps observed runs and
379
+ their last captured output for an hour after they end.
380
+ - **`e2e-progress`** - live Playwright run progress as a status line entry and a pane.
381
+ - **`status-line`** - a band above the prompt, always visible: `▶ <running slice> · 42 min · 14 offen · ❓2`.
382
+ The slice comes from the git `slice-paths` file (`kein Slice` once it is older than 2 h), the queue
383
+ count from the `### Warteschlange` list of the `report.planFiles` markdown files, `❓N` from the
384
+ `-` lines of `<git common dir>/ethlete/open-questions.md`, and `⛔ CI rot` when the latest `gh run`
385
+ of the branch failed (checked every 2 minutes). A field whose source is missing is left out.
386
+ - **`usage-line`** - a status line entry in every session: `5h 36% bis 01:40 · Woche 42%`. The reset time is left
387
+ out when the window reports none. The Codex 5h and weekly limit left follows it (`⛔ codex 5h 0% (02:55) · wk 72%`,
388
+ read from `~/.codex/sessions`, the reset time shown only for an exhausted window).
389
+
390
+ ## Progress report
391
+
392
+ `ethlete-agents report [today|yesterday|week | --since <date> [--until <date>]]` prints a fixed
393
+ markdown table of the period: one line per row with a feature, fix or other non-docs commit (short
394
+ sha, result), the parked rows, and a figures line (commit counts, reverts, red CI runs via `gh`,
395
+ subagent starts per model, the running slice unless its entry is older than 2 h). Without config it works from the git log alone.
396
+ Opt in to short names and the parked section with
397
+ `"report": { "planFiles": ["plans/STATUS.md", "plans/queue.md", "plans/rows.md"] }`: repo-relative paths
398
+ of markdown files holding `| <id> | <short name> | <what> | <state> | <what is missing> | <who> |` rows
399
+ and `N. **<name> (<id>)**` queue lines. The `report` skill runs it and pastes the output.
400
+
267
401
  ## Git hooks (opt-in)
268
402
 
269
403
  Separate from the agent hooks above, and opt-in for the same reason - a generated block
@@ -312,16 +446,47 @@ Git Flow:
312
446
  `allow_failure: true` on top of `advisory` mode is deliberate belt and braces: the job
313
447
  reports for a whole grace period before it can ever be the reason a merge request is red.
314
448
 
449
+ ## Output styles (Claude Code)
450
+
451
+ An output style replaces Claude Code's own answer style for a whole session. This package
452
+ ships one - **`ste-clarity`**, which writes every answer in ASD-STE100 Simplified Technical
453
+ English - and installs it into the machine's Claude config rather than into a repo, because
454
+ that is where Claude Code reads styles from:
455
+
456
+ ```bash
457
+ npx ethlete-agents output-style # install ste-clarity and switch to it
458
+ npx ethlete-agents output-style --dry-run # print what would change
459
+ npx ethlete-agents output-style --remove # take it back out
460
+ ```
461
+
462
+ Two files, both under `~/.claude` (or `$CLAUDE_CONFIG_DIR`, or `--config-dir <path>`):
463
+
464
+ | File | What changes |
465
+ | ------------------------------ | ------------------------------------------------------------------ |
466
+ | `output-styles/ste-clarity.md` | The style itself, written whole |
467
+ | `settings.json` | `"outputStyle": "ste-clarity"` - every other setting is left alone |
468
+
469
+ - **`--no-activate`** writes the style file but not the setting, so switching to it is then
470
+ `/output-style ste-clarity` inside a session.
471
+ - A style file this command did not write is never overwritten or deleted - it says so and
472
+ stops, and `--force` is the way through. A copy of the same style that differs only in
473
+ layout still counts as its own.
474
+ - Nothing here is repo-local, so `sync` and `check` neither write nor diff it. `--remove`
475
+ clears `outputStyle` only while it still points at that style.
476
+
477
+ **Claude Code only.** Codex has no output-style mechanism - everything it is told comes
478
+ from `AGENTS.md`, which `sync` already writes.
479
+
315
480
  ## Per-machine local config
316
481
 
317
- A gitignored `ethlete-agents.config.local.json` at the repo root holds the values that
318
- differ per developer, without touching any committed file:
482
+ A gitignored `ethlete-agents.config.local.json` at the repo root holds the agent behaviour
483
+ that differs per developer, without touching any committed file:
319
484
 
320
485
  ```json
321
486
  {
322
487
  "disableHooks": true,
323
- "sdkSourcePath": "/absolute/path/to/ethlete-sdk",
324
- "jira": { "email": "you@example.com", "token": "…" }
488
+ "disableAutoHandoffSave": true,
489
+ "builderSlots": 2
325
490
  }
326
491
  ```
327
492
 
@@ -331,19 +496,49 @@ differ per developer, without touching any committed file:
331
496
  - **`disableAutoHandoffSave`** - keeps the `context-warning` hook's tiered warnings but
332
497
  drops the auto-mode escalation: at the critical tier it recommends `/ethlete-handoff`
333
498
  instead of saving the handoff file itself.
334
- - **`jira`** - the credentials `git-flow start` needs (`host`, `email`, `token`). This is
335
- the one place in a repo a secret may sit, and only because the file is gitignored;
336
- `JIRA_EMAIL` / `JIRA_API_TOKEN` in the environment are the alternative and win over it.
337
- - **`sdkSourcePath`** - a local `ethlete-sdk` checkout. The `sdk-source` and
338
- `sdk-local-build` skills read it when the agent needs the SDK's own sources, or has to
339
- build the SDK and install it here through a `file:` dependency. A relative path is
340
- resolved from the repo root.
499
+ - **`mods`** - Claude Code mods for this machine only. `yarn agents:sync` writes the `ethlete`
500
+ marketplace and the `<mod>@ethlete` entries into the gitignored `.claude/settings.local.json`
501
+ (other keys stay) and never into the committed `settings.json`. Mods in the committed config
502
+ keep going to `settings.json`.
503
+
504
+ - **`builderSlots`** - the slot limit of the `builder-idle-check` hook (default 4): a builder
505
+ stop is blocked while fewer subagents and background commands run than this and a free
506
+ `Builder` row exists in `plans/QUEUE.md`. CI watchers and dev servers do not count.
507
+ - **`builderIdle`** - adapts the `builder-idle-check` hook to a repo whose queue is not
508
+ `plans/QUEUE.md`. Every field is optional; without it the hook behaves as described above.
509
+ A coordinator session (`/handoff resume coordinator-...`) counts next to builder sessions, and
510
+ running in-process subagents count as running agents.
511
+
512
+ ```json
513
+ {
514
+ "builderIdle": {
515
+ "queues": [{ "path": "../specs/tracks/my-track/plan.md", "format": "checkbox" }],
516
+ "waitPatterns": ["blockiert durch", "wartet auf"],
517
+ "roles": ["builder", "coordinator"]
518
+ }
519
+ }
520
+ ```
521
+
522
+ - `queues` - one or more files, paths relative to the repo root (`../` is fine). `format` is
523
+ `"table"` (a `QUEUE.md` table with `ID`/`Stand` columns, only rows owned by `Builder`;
524
+ the default) or `"checkbox"` (every open `- [ ]` line; a leading `**id**` names the row).
525
+ - `waitPatterns` - phrases that mark a row as waiting, case-insensitive; replaces the default
526
+ `["wartet auf", "Offen nur:"]`. A checkbox row waits when its line holds one; a table row when
527
+ its `Stand` cell does.
528
+ - `roles` - session roles that count as a builder, default `["builder", "coordinator"]`.
341
529
 
342
530
  Everything in this file is read at runtime, never by `sync`: the generated files stay
343
531
  identical on every machine and in CI, which is what lets `check` diff them. That is also
344
- why the file takes nothing beyond these keys - `sync`/`check` warn about unknown keys,
345
- and about an `sdkSourcePath` that is missing or is not an SDK checkout. Add the filename
346
- to your repo's `.gitignore`.
532
+ why the file takes nothing beyond these keys - `sync`/`check` warn about unknown keys. Add
533
+ the filename to your repo's `.gitignore`.
534
+
535
+ ### Where the sibling checkouts live
536
+
537
+ `sdkSourcePath`, `apiRepoPaths` and `apiRepoBranches` used to live in the file above. They
538
+ moved to `ethlete.config.local.json`, which [`@ethlete/cli`](../cli/README.md) owns, because
539
+ `et api` needs the same values the skills do. `sync`/`check` still read that file and warn
540
+ about a path that is missing or is not the checkout it claims to be, and they tell you to
541
+ move any of the three keys still found in the agents file.
347
542
 
348
543
  ## Authoring content
349
544
 
@@ -359,11 +554,24 @@ scope: consumer # consumer | sdk | both
359
554
  requires: ['@ethlete/core'] # optional
360
555
  paths: ['**/*.css'] # optional; becomes Claude `paths` and Cursor `globs` on rules
361
556
  vars: [docsBaseUrl] # optional
557
+ modelInvocation: false # optional; a skill only the user may start
362
558
  ---
363
559
  ```
364
560
 
561
+ A content file vendored from another repository keeps its upstream wording apart from the
562
+ link syntax, and names its source in the body. `THIRD-PARTY-LICENSES.md` lists each one,
563
+ its upstream commit and its license.
564
+
565
+ `content/output-styles/<name>.md` is a third kind, and the only one this package does not
566
+ compile: it is a Claude Code output style verbatim, so its frontmatter is Claude's
567
+ (`name`, `description`, `keep-coding-instructions`) and `output-style` installs the file
568
+ as it is, apart from a marker line that records where it came from.
569
+
365
570
  In a body, `{% varName %}` substitutes a variable, `{% skill:other-name %}` links to
366
- another guide the way the current target expects, and `{% resource:file.mjs %}` links to
367
- a bundled file. The delimiter is `{% … %}`, not `{{ … }}`, so Angular templates in
368
- examples pass through untouched. Resource files get variable substitution too, but no
369
- links.
571
+ another emitted package guide, and `{% resource:file.mjs %}` links to a bundled file.
572
+ Skill links are required dependencies: after scope, package, variable, and exclusion
573
+ filtering, `sync` and `check` fail with the source and missing target instead of emitting
574
+ a dangling name. Optional guidance must be self-contained when its guide is absent. Use
575
+ the structured marker instead of a plain `` `name` skill`` reference so validation can
576
+ see it. The delimiter is `{% … %}`, not `{{ … }}`, so Angular templates in examples pass
577
+ through untouched. Resource files get variable substitution too, but no links.
@@ -0,0 +1,35 @@
1
+ # Third-party content
2
+
3
+ Content in this package that comes from another repository, with the license it keeps.
4
+ To update one, copy it again from upstream and record the new commit here.
5
+
6
+ ## [mattpocock/skills](https://github.com/mattpocock/skills)
7
+
8
+ Commit `3cca18b` (2026-09-04). Vendored skills, kept as written upstream apart from the
9
+ generator's own link syntax and the local changes named below:
10
+
11
+ - `content/skills/grill-with-docs` - the entry point; calls the other two. Its description names tests, not ADRs.
12
+ - `content/skills/grilling` - plus our own section "Local addition" after the upstream footer.
13
+ - `content/skills/domain-modeling` - our change: a decision becomes a test or a tool, never an ADR; `ADR-FORMAT.md` is gone.
14
+
15
+ MIT License
16
+
17
+ Copyright (c) 2026 Matt Pocock
18
+
19
+ Permission is hereby granted, free of charge, to any person obtaining a copy
20
+ of this software and associated documentation files (the "Software"), to deal
21
+ in the Software without restriction, including without limitation the rights
22
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
+ copies of the Software, and to permit persons to whom the Software is
24
+ furnished to do so, subject to the following conditions:
25
+
26
+ The above copyright notice and this permission notice shall be included in all
27
+ copies or substantial portions of the Software.
28
+
29
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
+ SOFTWARE.
@@ -4,7 +4,7 @@
4
4
  "formatCommand": "npx prettier --write <files>",
5
5
  "storybookUrl": "http://localhost:6006",
6
6
  "storybookStartCommand": "npm run storybook",
7
- "docsBaseUrl": "https://ethlete-sdk-docs.web.app",
7
+ "docsBaseUrl": "https://ethlete-sdk-docs-next.web.app",
8
8
  "sdkStorybookUrl": "https://ethlete-sdk.web.app",
9
9
  "handoffDir": ".agents/handoffs"
10
10
  }