@ethlete/agent-rules 0.1.0-next.5 → 0.1.0-next.50

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 (242) hide show
  1. package/AGENTS.md +28 -0
  2. package/CHANGELOG.md +742 -0
  3. package/CLAUDE.md +1 -0
  4. package/README.md +430 -25
  5. package/THIRD-PARTY-LICENSES.md +35 -0
  6. package/content/defaults.json +1 -1
  7. package/content/git-hooks/post-checkout.sh +10 -0
  8. package/content/git-hooks/pre-push.sh +5 -0
  9. package/content/hooks/away-mode.py +327 -0
  10. package/content/hooks/background-design-commands.py +228 -0
  11. package/content/hooks/builder-idle-check.py +388 -0
  12. package/content/hooks/context-warning.py +694 -134
  13. package/content/hooks/design-live-check.py +136 -0
  14. package/content/hooks/git-safety.py +213 -0
  15. package/content/hooks/human-wait-check.py +167 -0
  16. package/content/hooks/subagent-model-policy.py +261 -0
  17. package/content/mods/.claude-plugin/marketplace.json +26 -0
  18. package/content/mods/plugins/codex-runs/.claude-plugin/plugin.json +6 -0
  19. package/content/mods/plugins/codex-runs/hooks/hooks.json +1 -0
  20. package/content/mods/plugins/codex-runs/hooks/progress.ts +130 -0
  21. package/content/mods/plugins/codex-runs/hooks/register.tsx +103 -0
  22. package/content/mods/plugins/codex-runs/tsconfig.json +4 -0
  23. package/content/mods/plugins/codex-runs/types/index.d.ts +19 -0
  24. package/content/mods/plugins/e2e-progress/.claude-plugin/plugin.json +6 -0
  25. package/content/mods/plugins/e2e-progress/hooks/hooks.json +1 -0
  26. package/content/mods/plugins/e2e-progress/hooks/progress.ts +152 -0
  27. package/content/mods/plugins/e2e-progress/hooks/register.tsx +442 -0
  28. package/content/mods/plugins/e2e-progress/tsconfig.json +3 -0
  29. package/content/mods/plugins/e2e-progress/types/index.d.ts +26 -0
  30. package/content/mods/plugins/status-line/.claude-plugin/plugin.json +6 -0
  31. package/content/mods/plugins/status-line/hooks/hooks.json +1 -0
  32. package/content/mods/plugins/status-line/hooks/line.ts +74 -0
  33. package/content/mods/plugins/status-line/hooks/register.tsx +141 -0
  34. package/content/mods/plugins/status-line/types/index.d.ts +5 -0
  35. package/content/mods/plugins/usage-line/.claude-plugin/plugin.json +6 -0
  36. package/content/mods/plugins/usage-line/hooks/codex.ts +52 -0
  37. package/content/mods/plugins/usage-line/hooks/format.ts +24 -0
  38. package/content/mods/plugins/usage-line/hooks/hooks.json +1 -0
  39. package/content/mods/plugins/usage-line/hooks/register.tsx +67 -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 +100 -0
  53. package/content/skills/agent-sessions/agent-sessions.mjs +1420 -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 +96 -0
  58. package/content/skills/codex-subagent/codex-agent.mjs +229 -0
  59. package/content/skills/codex-subagent/codex-limit.mjs +106 -0
  60. package/content/skills/design-exploration/SKILL.md +203 -0
  61. package/content/skills/design-exploration/check-story.mjs +139 -0
  62. package/content/skills/design-exploration/reference-check-and-notes.md +100 -0
  63. package/content/skills/design-exploration/reference-flows.md +38 -0
  64. package/content/skills/design-exploration/reference-inbox-and-mcp.md +54 -0
  65. package/content/skills/design-exploration/reference-order-and-design-system.md +120 -0
  66. package/content/skills/design-exploration/reference-products-and-sketches.md +250 -0
  67. package/content/skills/design-exploration/reference-shots.md +25 -0
  68. package/content/skills/design-exploration/shoot-template.mjs +61 -0
  69. package/content/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  70. package/content/skills/domain-modeling/SKILL.md +71 -0
  71. package/content/skills/e2e-triage/SKILL.md +80 -0
  72. package/content/skills/figma-export/SKILL.md +16 -18
  73. package/content/skills/git-commit/SKILL.md +21 -7
  74. package/content/skills/git-flow/SKILL.md +87 -0
  75. package/content/skills/grill-with-docs/SKILL.md +13 -0
  76. package/content/skills/grilling/SKILL.md +52 -0
  77. package/content/skills/handoff/SKILL.md +29 -69
  78. package/content/skills/handoff/save.md +187 -0
  79. package/content/skills/query/SKILL.md +165 -70
  80. package/content/skills/report/SKILL.md +26 -0
  81. package/content/skills/rxjs-signals/SKILL.md +33 -4
  82. package/content/skills/sdk-docs/SKILL.md +50 -14
  83. package/content/skills/sdk-local-build/SKILL.md +26 -8
  84. package/content/skills/sdk-local-build/sdk-local-baseline.mjs +64 -0
  85. package/content/skills/sdk-source/SKILL.md +37 -34
  86. package/content/skills/sdk-update/SKILL.md +103 -0
  87. package/content/skills/story-styling/SKILL.md +12 -10
  88. package/content/skills/styleguide/SKILL.md +13 -8
  89. package/content/skills/styleguide/assets.md +54 -0
  90. package/content/skills/styleguide/changesets.md +17 -0
  91. package/content/skills/styleguide/file-structure.md +73 -0
  92. package/content/skills/styleguide/lint-rule-lookup.md +52 -0
  93. package/content/skills/styleguide/storybook-structure.md +25 -0
  94. package/content/skills/theming/SKILL.md +68 -43
  95. package/content/skills/timetrack/SKILL.md +324 -0
  96. package/content/skills/verify-in-app/SKILL.md +107 -0
  97. package/content/skills/verify-in-storybook/SKILL.md +1 -1
  98. package/migrations/list-state-query-form.md +20 -0
  99. package/migrations/nx-layout.md +29 -0
  100. package/migrations/sdk-components-over-hand-built-ui.md +27 -0
  101. package/migrations/search-query-field.md +52 -0
  102. package/migrations.json +39 -0
  103. package/package.json +19 -3
  104. package/src/index.js +99 -32
  105. package/src/index.js.map +1 -1
  106. package/src/lib/cli-args.d.ts +9 -0
  107. package/src/lib/cli-args.js +48 -0
  108. package/src/lib/cli-args.js.map +1 -0
  109. package/src/lib/commitlint.d.ts +10 -0
  110. package/src/lib/commitlint.js +51 -0
  111. package/src/lib/commitlint.js.map +1 -0
  112. package/src/lib/config.d.ts +64 -5
  113. package/src/lib/config.js +140 -11
  114. package/src/lib/config.js.map +1 -1
  115. package/src/lib/filter.d.ts +2 -0
  116. package/src/lib/filter.js +4 -4
  117. package/src/lib/filter.js.map +1 -1
  118. package/src/lib/frontmatter.d.ts +2 -0
  119. package/src/lib/frontmatter.js +33 -5
  120. package/src/lib/frontmatter.js.map +1 -1
  121. package/src/lib/git-flow/build.d.ts +35 -0
  122. package/src/lib/git-flow/build.js +24 -0
  123. package/src/lib/git-flow/build.js.map +1 -0
  124. package/src/lib/git-flow/config.d.ts +59 -0
  125. package/src/lib/git-flow/config.js +50 -0
  126. package/src/lib/git-flow/config.js.map +1 -0
  127. package/src/lib/git-flow/index.d.ts +6 -0
  128. package/src/lib/git-flow/index.js +23 -0
  129. package/src/lib/git-flow/index.js.map +1 -0
  130. package/src/lib/git-flow/parse.d.ts +49 -0
  131. package/src/lib/git-flow/parse.js +300 -0
  132. package/src/lib/git-flow/parse.js.map +1 -0
  133. package/src/lib/git-flow/rename.d.ts +24 -0
  134. package/src/lib/git-flow/rename.js +70 -0
  135. package/src/lib/git-flow/rename.js.map +1 -0
  136. package/src/lib/git-flow/start.d.ts +49 -0
  137. package/src/lib/git-flow/start.js +57 -0
  138. package/src/lib/git-flow/start.js.map +1 -0
  139. package/src/lib/git-flow/validate.d.ts +34 -0
  140. package/src/lib/git-flow/validate.js +72 -0
  141. package/src/lib/git-flow/validate.js.map +1 -0
  142. package/src/lib/git-flow-command.d.ts +4 -0
  143. package/src/lib/git-flow-command.js +165 -0
  144. package/src/lib/git-flow-command.js.map +1 -0
  145. package/src/lib/git-flow-repair.d.ts +17 -0
  146. package/src/lib/git-flow-repair.js +165 -0
  147. package/src/lib/git-flow-repair.js.map +1 -0
  148. package/src/lib/git-flow-start.d.ts +20 -0
  149. package/src/lib/git-flow-start.js +140 -0
  150. package/src/lib/git-flow-start.js.map +1 -0
  151. package/src/lib/git-test-env.fixtures.d.ts +11 -0
  152. package/src/lib/git-test-env.fixtures.js +31 -0
  153. package/src/lib/git-test-env.fixtures.js.map +1 -0
  154. package/src/lib/git.d.ts +64 -0
  155. package/src/lib/git.js +131 -0
  156. package/src/lib/git.js.map +1 -0
  157. package/src/lib/gitlab.d.ts +35 -0
  158. package/src/lib/gitlab.js +116 -0
  159. package/src/lib/gitlab.js.map +1 -0
  160. package/src/lib/index.d.ts +2 -0
  161. package/src/lib/index.js +26 -11
  162. package/src/lib/index.js.map +1 -1
  163. package/src/lib/migrate.js +8 -2
  164. package/src/lib/migrate.js.map +1 -1
  165. package/src/lib/output-style-command.d.ts +3 -0
  166. package/src/lib/output-style-command.js +69 -0
  167. package/src/lib/output-style-command.js.map +1 -0
  168. package/src/lib/output-style.d.ts +38 -0
  169. package/src/lib/output-style.js +134 -0
  170. package/src/lib/output-style.js.map +1 -0
  171. package/src/lib/owned-paths.js +8 -2
  172. package/src/lib/owned-paths.js.map +1 -1
  173. package/src/lib/package-runner.d.ts +4 -0
  174. package/src/lib/package-runner.js +86 -0
  175. package/src/lib/package-runner.js.map +1 -0
  176. package/src/lib/peer-path.d.ts +12 -0
  177. package/src/lib/peer-path.js +39 -0
  178. package/src/lib/peer-path.js.map +1 -0
  179. package/src/lib/plain-text.d.ts +9 -0
  180. package/src/lib/plain-text.js +22 -0
  181. package/src/lib/plain-text.js.map +1 -0
  182. package/src/lib/plan.d.ts +6 -6
  183. package/src/lib/plan.js +160 -38
  184. package/src/lib/plan.js.map +1 -1
  185. package/src/lib/prettier.d.ts +21 -0
  186. package/src/lib/prettier.js +51 -0
  187. package/src/lib/prettier.js.map +1 -0
  188. package/src/lib/prompt.d.ts +8 -0
  189. package/src/lib/prompt.js +35 -0
  190. package/src/lib/prompt.js.map +1 -0
  191. package/src/lib/render.d.ts +26 -2
  192. package/src/lib/render.js +45 -10
  193. package/src/lib/render.js.map +1 -1
  194. package/src/lib/report-command.d.ts +34 -0
  195. package/src/lib/report-command.js +316 -0
  196. package/src/lib/report-command.js.map +1 -0
  197. package/src/lib/sessions-command.d.ts +4 -0
  198. package/src/lib/sessions-command.js +16 -0
  199. package/src/lib/sessions-command.js.map +1 -0
  200. package/src/lib/sync.d.ts +1 -2
  201. package/src/lib/sync.js +37 -17
  202. package/src/lib/sync.js.map +1 -1
  203. package/src/lib/targets/agents-skills.js +1 -1
  204. package/src/lib/targets/agents-skills.js.map +1 -1
  205. package/src/lib/targets/claude-hooks.d.ts +2 -0
  206. package/src/lib/targets/claude-hooks.js +8 -3
  207. package/src/lib/targets/claude-hooks.js.map +1 -1
  208. package/src/lib/targets/claude-mods.d.ts +20 -0
  209. package/src/lib/targets/claude-mods.js +47 -0
  210. package/src/lib/targets/claude-mods.js.map +1 -0
  211. package/src/lib/targets/claude.js +2 -3
  212. package/src/lib/targets/claude.js.map +1 -1
  213. package/src/lib/targets/codex-hooks.js +4 -2
  214. package/src/lib/targets/codex-hooks.js.map +1 -1
  215. package/src/lib/targets/codex.js +4 -4
  216. package/src/lib/targets/codex.js.map +1 -1
  217. package/src/lib/targets/copilot.js +4 -4
  218. package/src/lib/targets/copilot.js.map +1 -1
  219. package/src/lib/targets/cursor.js +3 -3
  220. package/src/lib/targets/cursor.js.map +1 -1
  221. package/src/lib/targets/git-hooks.d.ts +25 -0
  222. package/src/lib/targets/git-hooks.js +71 -0
  223. package/src/lib/targets/git-hooks.js.map +1 -0
  224. package/src/lib/targets/hooks-shared.d.ts +29 -5
  225. package/src/lib/targets/hooks-shared.js +130 -36
  226. package/src/lib/targets/hooks-shared.js.map +1 -1
  227. package/src/lib/targets/mcp.d.ts +16 -0
  228. package/src/lib/targets/mcp.js +72 -0
  229. package/src/lib/targets/mcp.js.map +1 -0
  230. package/src/lib/targets/shared.d.ts +1 -9
  231. package/src/lib/targets/shared.js +4 -8
  232. package/src/lib/targets/shared.js.map +1 -1
  233. package/src/lib/timetrack-command.d.ts +11 -0
  234. package/src/lib/timetrack-command.js +1262 -0
  235. package/src/lib/timetrack-command.js.map +1 -0
  236. package/src/lib/timetrack-snapshot.d.ts +66 -0
  237. package/src/lib/timetrack-snapshot.js +146 -0
  238. package/src/lib/timetrack-snapshot.js.map +1 -0
  239. package/src/lib/timetrack.d.ts +607 -0
  240. package/src/lib/timetrack.js +285 -0
  241. package/src/lib/timetrack.js.map +1 -0
  242. package/content/skills/styleguide/STYLEGUIDE.md +0 -520
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Screenshot one Storybook story, with optional forced pseudo-states.
3
+ *
4
+ * Copy to the repository root - Node resolves `playwright` from the working directory.
5
+ *
6
+ * node shoot.mjs <story-id> [width] [height] [out.png]
7
+ *
8
+ * To hold :hover / :focus-visible / :active open at the same time, fill FORCED below with
9
+ * one entry per element. A CSS selector is matched inside the story's document.
10
+ */
11
+ import { chromium } from 'playwright';
12
+
13
+ const BASE = process.env.SB_URL ?? 'http://localhost:4400';
14
+
15
+ /** @type {{ selector: string, states: ('hover'|'focus'|'focus-visible'|'active')[] }[]} */
16
+ const FORCED = [
17
+ // { selector: '[data-state="hover"] .the-band', states: ['hover'] },
18
+ ];
19
+
20
+ const [id, width = '1100', height = '760', out = 'shot.png'] = process.argv.slice(2);
21
+
22
+ if (!id) {
23
+ console.error('usage: node shoot.mjs <story-id> [width] [height] [out.png]');
24
+ process.exit(1);
25
+ }
26
+
27
+ const browser = await chromium.launch();
28
+ const page = await browser.newPage({
29
+ viewport: { width: Number(width), height: Number(height) },
30
+ deviceScaleFactor: 2,
31
+ });
32
+
33
+ await page.goto(`${BASE}/iframe.html?id=${id}&viewMode=story`, { waitUntil: 'domcontentloaded' });
34
+ await page.waitForSelector('#storybook-root > *', { timeout: 15000 });
35
+
36
+ const overlays = await page.locator('#webpack-dev-server-client-overlay, vite-error-overlay').count();
37
+ if (overlays > 0) {
38
+ console.error('compile error overlay is present - the image would lie');
39
+ await browser.close();
40
+ process.exit(1);
41
+ }
42
+
43
+ if (FORCED.length > 0) {
44
+ const cdp = await page.context().newCDPSession(page);
45
+ await cdp.send('DOM.enable');
46
+ await cdp.send('CSS.enable');
47
+ const { root } = await cdp.send('DOM.getDocument', { depth: -1 });
48
+
49
+ for (const { selector, states } of FORCED) {
50
+ const { nodeIds } = await cdp.send('DOM.querySelectorAll', { nodeId: root.nodeId, selector });
51
+ for (const nodeId of nodeIds) {
52
+ await cdp.send('CSS.forcePseudoState', { nodeId, forcedPseudoClasses: states });
53
+ }
54
+ }
55
+ }
56
+
57
+ await page.waitForTimeout(400);
58
+ await page.screenshot({ path: out });
59
+ await browser.close();
60
+
61
+ console.log(out);
@@ -0,0 +1,60 @@
1
+ # CONTEXT.md Format
2
+
3
+ ## Structure
4
+
5
+ ```md
6
+ # {Context Name}
7
+
8
+ {One or two sentence description of what this context is and why it exists.}
9
+
10
+ ## Language
11
+
12
+ **Order**:
13
+ {A one or two sentence description of the term}
14
+ _Avoid_: Purchase, transaction
15
+
16
+ **Invoice**:
17
+ A request for payment sent to a customer after delivery.
18
+ _Avoid_: Bill, payment request
19
+
20
+ **Customer**:
21
+ A person or organization that places orders.
22
+ _Avoid_: Client, buyer, account
23
+ ```
24
+
25
+ ## Rules
26
+
27
+ - **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
28
+ - **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
29
+ - **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
30
+ - **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
31
+
32
+ ## Single vs multi-context repos
33
+
34
+ **Single context (most repos):** One `CONTEXT.md` at the repo root.
35
+
36
+ **Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
37
+
38
+ ```md
39
+ # Context Map
40
+
41
+ ## Contexts
42
+
43
+ - [Ordering](./src/ordering/CONTEXT.md): receives and tracks customer orders
44
+ - [Billing](./src/billing/CONTEXT.md): generates invoices and processes payments
45
+ - [Fulfillment](./src/fulfillment/CONTEXT.md): manages warehouse picking and shipping
46
+
47
+ ## Relationships
48
+
49
+ - **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
50
+ - **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
51
+ - **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
52
+ ```
53
+
54
+ The skill infers which structure applies:
55
+
56
+ - If `CONTEXT-MAP.md` exists, read it to find contexts
57
+ - If only a root `CONTEXT.md` exists, single context
58
+ - If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
59
+
60
+ When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: domain-modeling
3
+ description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a CONTEXT.md, or recording a design decision.
4
+ kind: skill
5
+ scope: both
6
+ ---
7
+
8
+ # Domain Modeling
9
+
10
+ Actively build and sharpen the project's domain model as you design. This is the _active_ discipline: challenging terms, inventing edge-case scenarios, and writing the glossary down and turning decisions into tests the moment they crystallise. (Merely _reading_ `CONTEXT.md` for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
11
+
12
+ ## File structure
13
+
14
+ Most repos have a single context:
15
+
16
+ ```
17
+ /
18
+ ├── CONTEXT.md
19
+ └── src/
20
+ ```
21
+
22
+ If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
23
+
24
+ ```
25
+ /
26
+ ├── CONTEXT-MAP.md
27
+ └── src/
28
+ ├── ordering/
29
+ │ └── CONTEXT.md
30
+ └── billing/
31
+ └── CONTEXT.md
32
+ ```
33
+
34
+ Create files lazily: only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved.
35
+
36
+ ## During the session
37
+
38
+ ### Challenge against the glossary
39
+
40
+ When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
41
+
42
+ ### Sharpen fuzzy language
43
+
44
+ When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account': do you mean the Customer or the User? Those are different things."
45
+
46
+ ### Discuss concrete scenarios
47
+
48
+ When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
49
+
50
+ ### Cross-reference with code
51
+
52
+ When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"
53
+
54
+ ### Update CONTEXT.md inline
55
+
56
+ When a term is resolved, update `CONTEXT.md` right there. Don't batch these up: capture them as they happen. Use the format in {%resource:CONTEXT-FORMAT.md%}.
57
+
58
+ `CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
59
+
60
+ ### Record a decision as a test or a tool
61
+
62
+ Never write an ADR. A decision becomes one of these, in the same change:
63
+
64
+ 1. **A test** that fails when the code goes against the decision, with a one-sentence comment that states the decision.
65
+ 2. **A tool**: a live check that runs while the agent writes, or a generator for the base the agent then extends.
66
+
67
+ A decision that fits neither is not settled yet: keep asking. Existing ADRs stay until a cleanup pass turns each one into a test or deletes it.
68
+
69
+ ---
70
+
71
+ Vendored from [mattpocock/skills](https://github.com/mattpocock/skills) at `3cca18b`, MIT (Copyright (c) 2026 Matt Pocock).
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: e2e-triage
3
+ description: Work through a failed Playwright e2e run - read the failures file the @ethlete/cli failure reporter writes, group the failures by error, fix the largest group first, and re-run only the specs that failed. Read when an e2e run fails with more than a few tests, when an `e2e-failures.jsonl` file is present, or before you start a full e2e run after a change.
4
+ kind: skill
5
+ scope: consumer
6
+ requires: ['@ethlete/cli']
7
+ vars: [docsBaseUrl]
8
+ ---
9
+
10
+ # Triage a failed e2e run
11
+
12
+ Many failed tests rarely mean many bugs. In one real run, a single change in a shared pipe failed 61
13
+ tests. After the fix, 158 of the first 159 retried tests passed. So find the shared cause first, and
14
+ never fix failures one test at a time from the top of the log.
15
+
16
+ ## Before the run
17
+
18
+ 1. Check that `playwright.config.ts` lists `@ethlete/cli/playwright/failure-reporter` in `reporter`.
19
+ If not, add it next to the reporter that is there: `[['list'], ['@ethlete/cli/playwright/failure-reporter']]`.
20
+ The reporter writes one JSON line per failed attempt while the run goes on. The guide is
21
+ {%docsBaseUrl%}/cli/e2e.
22
+ 2. Run the specs of the files you changed first. Start the full suite only when they pass. A full
23
+ run takes long, and one broken shared file fails it everywhere.
24
+
25
+ ## Read the failures
26
+
27
+ The file is `e2e-failures.jsonl` next to `playwright.config.ts`, unless `E2E_FAILURES_FILE` or the
28
+ `outputFile` option of the reporter names another path. You can read it while the run goes on.
29
+
30
+ Each line has `test`, `location`, `project`, `status`, `retry`, `seconds`, `error`, `detail` and `context`.
31
+ `error` holds the first lines of the message. `detail` holds the first later line with a URL, for errors whose first lines do not name it, or `null`. `context` is the path of Playwright's
32
+ `error-context.md`, which holds the page snapshot at the failure.
33
+
34
+ Do not parse the console log of the run. It mixes the output of parallel workers, and it has no end
35
+ line if the run stops.
36
+
37
+ ## Group, then fix the largest group
38
+
39
+ 1. Normalize the `error` text of each line. Remove line and column numbers, timeouts in ms, ids,
40
+ hashes and dates. Keep the matcher, the locator and the expected value.
41
+ 2. Group the lines by the normalized text. Count the distinct spec files per group, not only the lines.
42
+ A group that spans many spec files points at shared code: a component, a pipe, a fixture or a
43
+ test helper.
44
+ 3. Take the largest group. Read one `context` file of it, then the code the error points at. Find
45
+ one cause that explains the whole group.
46
+ 4. Fix that cause. Then re-run only the spec files of that group.
47
+
48
+ A group whose errors are a connection refused (`ERR_CONNECTION_REFUSED`, `ECONNREFUSED`) on a local mock or
49
+ `webServer` port is an infrastructure group, not a test verdict. Check that the server is still up,
50
+ restart it, and re-run those tests before you read them as failures.
51
+
52
+ Small groups that differ only in a locator often have the same cause. Check them after the large group
53
+ is fixed, because a fix often clears them too.
54
+
55
+ ## Re-run only what failed
56
+
57
+ Take the spec file from `location`, without the `:line`. Collect each file once, then run:
58
+
59
+ ```bash
60
+ npx playwright test <file> <file> --project=<project> --no-deps
61
+ ```
62
+
63
+ - Pass each file as its own argument. In zsh, an unquoted `$files` is one argument, and Playwright
64
+ then finds no tests.
65
+ - `--no-deps` skips the setup projects. Leave it out if the failure is in a setup project, or if the
66
+ setup state is gone.
67
+ - `--project` comes from the `project` field. Run one call per project.
68
+
69
+ ## Retries and flaky tests
70
+
71
+ With `retries` on, a test that fails each attempt has one line per attempt (`retry` 0, 1, and so on).
72
+ A test with a line for `retry` 0 and no line for the last retry passed on a later attempt: it is flaky.
73
+ Report a flaky test, but fix the stable failures first.
74
+
75
+ ## Rules
76
+
77
+ - Never skip a failed test, or mark it with `test.fail()` or `test.fixme()`, to make a run pass.
78
+ - Never change an assertion to match the wrong value the app shows now. A failed e2e test is a
79
+ signal first. If you think the test is wrong, say why, and ask before you change it.
80
+ - Report per group: the cause, the fix, the spec files you re-ran, and what still fails.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: figma-export
3
- description: Reconcile a component against a Figma export - which exports to ask the designer for (an .svg frame and its "copy as CSS" dump), how to dump the geometry out of each, which of their numbers are authoritative, and how to measure the real rendered result against them headlessly. Use whenever a design export is dropped next to a component and the component has to be matched to it.
3
+ description: Reconcile a component against a Figma export (.svg frame, "copy as CSS" dump) and measure the render against it. Use whenever a design export is dropped next to a component to be matched.
4
4
  kind: skill
5
5
  scope: both
6
6
  ---
@@ -15,18 +15,15 @@ Three things arrive from Figma, and each answers a different question:
15
15
  | **`.css`** (Copy as CSS) | Named layers, auto-layout properties, typography metrics, design-token names | Any hierarchy at all — the dump is flat |
16
16
  | **`.png`** (a screenshot) | Figma's own blue measurement overlays, and what the designer chose to frame | Nothing machine-readable |
17
17
 
18
- **Ask for the `.svg` and the `.css` together, and do not start until you have both.** The two
19
- are complements, not alternatives: the SVG is the only export you can both look at and
20
- measure, and the CSS is the only one that names layers and records type. A PNG earns its place
21
- only when it is a _screenshot_ carrying dev-mode annotations — a PNG _render_ of the same frame
22
- adds nothing the SVG does not. None of the three tells you the colours.
18
+ **Ask for the `.svg` and the `.css` together.** That pair is the preferred complete input:
19
+ the SVG is the export you can look at and measure, and the CSS names layers and records
20
+ type. A PNG earns its place only when it is a _screenshot_ carrying dev-mode annotations.
21
+ Exports expose rendered color values, but they do not identify the authoritative semantic
22
+ theme token.
23
23
 
24
- Say what you are missing and what it would settle, in one line — "I have the SVG; the `.css`
25
- export would give me the font sizes and whether these cards Hug or Fill" — and wait. Every
26
- number in your diff has to trace back to something in an export or to a token; a plausible
27
- `17px` you inferred from a 12px outlined glyph is worse than an open question, because it
28
- survives review as though it had been specified. If the pair genuinely cannot be produced, say
29
- in the write-up which numbers are therefore guesses.
24
+ If one artifact is missing, inspect the existing code and the artifact you do have. List
25
+ the exact facts that remain unknown and do not invent their measurements. Ask before a
26
+ structural choice or an untraceable numeric value, not before useful read-only inspection.
30
27
 
31
28
  ## 1. Read the export before touching code
32
29
 
@@ -126,8 +123,8 @@ it; the SVG has the tree but no names. The image is what disambiguates:
126
123
  - **Authoritative:** geometry and typography metrics — widths, padding, gaps, `flex-grow`,
127
124
  border radius, font size / weight / line-height / letter-spacing, and the breakpoints at
128
125
  which the layout changes.
129
- - **Never authoritative: colour.** Backgrounds, text, borders and interaction states resolve
130
- from the surface and colour theming tokens — see {%skill:theming%}. A hex in the
126
+ - **Never authoritative: semantic colour choice.** Backgrounds, text, borders and
127
+ interaction states resolve from the repository's theme tokens. A hex in the
131
128
  export is information about the _designer's_ palette, not a value to paste. Where the
132
129
  export's colour and the token disagree, keep the token and note the delta for the design
133
130
  review; the export can be wrong about contrast in a way the tokens are not. This holds
@@ -181,13 +178,14 @@ Harness gotchas, each of which will cost you an hour:
181
178
  ~1px wide of reality, so a label that wraps in the harness may well fit in the app. Check
182
179
  before calling a wrap a defect.
183
180
  - Playwright is CommonJS and unresolvable from a scratch directory — `createRequire` against
184
- the repo root, as the template does. The same applies when driving a story:
185
- {%skill:verify-in-storybook%}.
181
+ the repo root, as the template does. When driving a story, follow the repository's
182
+ installed Storybook verification guidance if present.
186
183
 
187
184
  ## 5. Close the loop
188
185
 
189
186
  Report the measured numbers next to the export's, per width — not "matches the design". Say
190
187
  explicitly which parts of the export you deliberately did **not** implement and why (colour
191
188
  kept as tokens, a label the product decided never to render, a field the API lacks). Then
192
- delete the export files once their component is signed off, so the folder always shows only
193
- what is still outstanding.
189
+ report that the export files are no longer needed. Delete only artifacts this workflow
190
+ created and only when the workflow or user explicitly authorizes cleanup; otherwise let the
191
+ user decide whether supplied exports remain useful records.
@@ -1,23 +1,22 @@
1
1
  ---
2
2
  name: git-commit
3
- description: How to write git commits in this repo - commitlint format (type(scope): Subject), lean messages, no trailers. Read before committing anything (e.g. the user says "commit this").
3
+ description: How to write git commits in this repo - conventional format (type(scope): Subject), lean messages, no trailers. Read before committing anything (e.g. the user says "commit this").
4
4
  kind: skill
5
5
  scope: both
6
- vars: [commitScopes]
6
+ vars: [commitScopes, commitRuleSource, commitValidation]
7
7
  ---
8
8
 
9
9
  # Git commits
10
10
 
11
- Commits are **lean** and follow the **commitlint rules** in `commitlint.config.js`
12
- (conventional commits with a required scope):
11
+ Commits are **lean** and follow {%commitRuleSource%}:
13
12
 
14
- - **Format: `type(scope): Subject`** - one line. All three parts are enforced:
13
+ - **Format: `type(scope): Subject`** - one line, all three parts required:
15
14
  - `type` ∈ `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`,
16
15
  `build`, `ci`, `chore`, `revert`
17
- - `scope` is **required**, ∈ {%commitScopes%}
16
+ - `scope` ∈ {%commitScopes%}
18
17
  - Subject is **sentence-case** ("Add the search filter", not
19
18
  "add the search filter")
20
- - When unsure a message passes, check it: `echo "<msg>" | npx commitlint`.
19
+ - {%commitValidation%}
21
20
  - Add a short body only when the change genuinely needs context that the diff
22
21
  can't convey.
23
22
  - **No trailers.** Never append `Co-Authored-By`, `Claude-Session`, or similar
@@ -26,4 +25,19 @@ Commits are **lean** and follow the **commitlint rules** in `commitlint.config.j
26
25
  - **Stage only what belongs to the change.** The working tree often carries
27
26
  unrelated in-progress work - `git add` the specific files, never `git add -A`
28
27
  blindly.
28
+ - **In a checkout that other sessions share**, commit with
29
+ `git commit -- <paths>`, so their staged files stay out. `git commit -- <path>`
30
+ refuses an untracked file: run `git add -N <that file>` for that one path
31
+ first. Pass a formatter or `eslint --fix` the exact paths you changed, never a
32
+ list from `git diff` or `git status` - that list holds other sessions' files.
33
+ - **Few commits.** One commit per finished slice of work: the code, its specs, its
34
+ changeset and its plan note ("as built") go in together. Fix format, lint and
35
+ review findings before that commit, not in a follow-up commit.
36
+ - **Notes are not commits of their own.** A plan, finding or status note rides
37
+ with the slice it belongs to; a note-only session commits once per finished
38
+ round, never once per finding or status line.
39
+ - **Sketches:** one commit per finished round and one per merge.
40
+ - **Never rewrite shared history.** No rebase, no `--fixup`, no `--amend` in a
41
+ checkout that other sessions share: it rewrites their commits too.
42
+ - Brief every subagent with these commit rules.
29
43
  - Don't push unless asked.
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: git-flow
3
+ description: How to name and base a branch in this repo, and what its merge request must target - feature, sub-feature, release, release fix and hotfix. Read BEFORE creating a branch, opening a merge request, or choosing what to branch from (e.g. the user says "start work on FIP-2177" or "open an MR").
4
+ kind: skill
5
+ scope: both
6
+ vars: [gitFlowDevelopmentBranch, gitFlowProductionBranch, gitFlowTypes, gitFlowEnforcement, gitFlowSubPrefix]
7
+ ---
8
+
9
+ # Git flow
10
+
11
+ Work is organised in two levels: a **main feature branch** per Jira Story, into which
12
+ **sub-feature branches** (one per Task) are merged after review. The main feature branch is
13
+ what gets deployed to a test environment and, once accepted, merged into
14
+ `{%gitFlowDevelopmentBranch%}`.
15
+
16
+ **Never name a branch by hand - `start` does it from the grammar:**
17
+
18
+ ```bash
19
+ {%packageRunner%} ethlete-agents git-flow start FIP-2178 # reads the issue, names it, branches off the right base
20
+ {%packageRunner%} ethlete-agents git-flow check # is the current branch conforming?
21
+ {%packageRunner%} ethlete-agents git-flow explain <branch> # what the parser sees, and what it expects
22
+ {%packageRunner%} ethlete-agents git-flow repair <branch> # rename a non-conforming one, retarget its MRs
23
+ ```
24
+
25
+ `start` prints its plan (branch, base, MR target) and asks before writing anything; add
26
+ `--dry-run` to see the plan alone. It refuses on a dirty working tree, and a Task nests under
27
+ its parent Story's branch, so that branch has to exist first.
28
+
29
+ It reads the issue through the running Timetrack app, which holds this machine's only Jira
30
+ credentials. If it reports that the app is not running, ask the
31
+ user to start it. `--subject <text>` names a branch without reading Jira at all.
32
+
33
+ ## The five shapes
34
+
35
+ | Shape | Issue | Branch from | MR targets |
36
+ | --------------------------------------------------------------------------------- | ----- | ------------------------------ | ---------------------------------------------------------------- |
37
+ | `feat/FIP-2177-user-management` | Story | `{%gitFlowDevelopmentBranch%}` | `{%gitFlowDevelopmentBranch%}` |
38
+ | `{%gitFlowSubPrefix%}/feat/FIP-2177-user-management/FIP-2178-user-password-reset` | Task | the main feature branch | the main feature branch |
39
+ | `release/2026.04.28` | - | `{%gitFlowDevelopmentBranch%}` | `{%gitFlowDevelopmentBranch%}` and `{%gitFlowProductionBranch%}` |
40
+ | `{%gitFlowSubPrefix%}/release/2026.04.28/FIP-2222-button-not-visible` | Bug | the release branch | the release branch |
41
+ | `hotfix/FIP-2799-password-recovery-broken` | Bug | `{%gitFlowProductionBranch%}` | `{%gitFlowProductionBranch%}` |
42
+
43
+ - The **type** is one of {%gitFlowTypes%}, and a nested branch carries its parent's **full**
44
+ name - that path is what makes the parent machine-readable.
45
+ - The **key** is the Jira issue, uppercase, immediately after the type. The **subject** is the
46
+ Story's subject meta field in kebab-case, not a paraphrase of the summary.
47
+ - A branch with no key still works, but nothing can attribute it to an issue. Add the key.
48
+
49
+ ### Why a nested branch starts with `{%gitFlowSubPrefix%}/`
50
+
51
+ Git refuses a ref that is both a branch and a directory of branches. So
52
+ `feat/FIP-2177-user-management/FIP-2178-user-password-reset` **cannot exist** while
53
+ `feat/FIP-2177-user-management` does - git rejects it locally and the push comes back as
54
+ `refname conflict`. The prefix moves the nested tree out of the way and keeps the parent's
55
+ full path inside the child's name, so the MR target is still readable off the name.
56
+
57
+ Do not "fix" a name by dropping the prefix; the branch it produces cannot be created.
58
+
59
+ ## Rules that are not about naming
60
+
61
+ - **Never rebase a shared branch.** A main feature branch is published and other people's
62
+ sub-features are based on it - bring it up to date by **merging**
63
+ `{%gitFlowDevelopmentBranch%}` into it. Rebase only a local branch you have not pushed.
64
+ - **A sub-feature merges into its parent, never straight into
65
+ `{%gitFlowDevelopmentBranch%}`** - that is the whole point of the two levels, since the
66
+ parent is what gets tested as a unit.
67
+ - **Delete the source branch on merge** (the checkbox in the merge request) for sub-features,
68
+ release fixes and merged main features.
69
+ - **A hotfix branches off `{%gitFlowProductionBranch%}`** and, after rollout, that branch is
70
+ merged back into `{%gitFlowDevelopmentBranch%}` so the two do not drift.
71
+ - **Never push directly to `{%gitFlowDevelopmentBranch%}` or
72
+ `{%gitFlowProductionBranch%}`.** Open a merge request; it needs another developer's review.
73
+
74
+ ## Enforcement is `{%gitFlowEnforcement%}`
75
+
76
+ In `advisory` mode every rule reports and nothing blocks - the older naming shapes (`feature/`
77
+ instead of `feat/`, a lowercase key, no key at all, a `dev-*` integration branch) are accepted
78
+ on purpose while the team adapts. Report the suggestion, do not "fix" someone's existing
79
+ branch unasked - `repair` is how a rename happens, and only when asked for.
80
+
81
+ `dev-*` is the **old spelling of a main feature branch**, not a stray name: sub-features
82
+ legitimately target it. Leave a live one alone.
83
+
84
+ ## Commit messages are a separate thing
85
+
86
+ Commits stay conventional (`feat(platform): Prefer a player's common name`) and carry **no
87
+ issue key** - the branch already has it. Follow the repository's commit-message guidance.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: grill-with-docs
3
+ description: A relentless interview to sharpen a plan or design, which also updates the glossary and turns each decision into a test as we go.
4
+ kind: skill
5
+ scope: both
6
+ modelInvocation: false
7
+ ---
8
+
9
+ Call the Skill tool twice, for {%skill:grilling%} and {%skill:domain-modeling%}.
10
+
11
+ ---
12
+
13
+ Vendored from [mattpocock/skills](https://github.com/mattpocock/skills) at `3cca18b`, MIT (Copyright (c) 2026 Matt Pocock).
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: grilling
3
+ description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
4
+ kind: skill
5
+ scope: both
6
+ ---
7
+
8
+ Interview the user relentlessly until you reach a shared understanding. Map this as a **design tree**: every decision branches into the decisions that hang off it.
9
+
10
+ Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled: the questions you can ask _now_ without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
11
+
12
+ Format a round like so:
13
+
14
+ ```
15
+ ❓ **Q1** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
16
+
17
+ ➡️ <your recommended answer>
18
+
19
+ ---
20
+
21
+ ❓ **Q2** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
22
+
23
+ ➡️ <your recommended answer>
24
+ ```
25
+
26
+ Each round the user answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a _later_ round, not this one.
27
+
28
+ Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait.
29
+
30
+ The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
31
+
32
+ ---
33
+
34
+ Vendored from [mattpocock/skills](https://github.com/mattpocock/skills) at `3cca18b`, MIT (Copyright (c) 2026 Matt Pocock).
35
+
36
+ ## Local addition: write each question so it reads alone
37
+
38
+ This section is ours, not upstream.
39
+
40
+ - **One question, one situation.** Say what the thing is and why the decision matters, in plain
41
+ words, before the choices. The user must understand it without the earlier rounds.
42
+ - **No reference chains.** Never lean on other question numbers, ADR numbers, slice numbers or
43
+ plan shorthand ("as Q6 settled", "per ADR 07"). Name the actual thing instead.
44
+ - **Remind the user of a concept** when a round starts a new topic: one or two sentences, with a
45
+ concrete example ("a sketch is a draft with several variants of one part, for example three
46
+ headers").
47
+ - **Check the facts before you recommend.** A recommendation built on an assumed file format or
48
+ an assumed existing tool is worse than none. Look it up first, and say in the round when a
49
+ look-up proved an earlier recommendation wrong.
50
+ - **Decide technical questions yourself.** Put only product and UX questions to the user.
51
+ - **Close with the shared state.** When the frontier is empty, list every decision in one short
52
+ summary and ask the user to confirm it before you write it anywhere.