@ethlete/agent-rules 0.1.0-next.51 → 0.1.0-next.53

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 (61) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +16 -53
  3. package/content/hooks/away-mode.py +90 -7
  4. package/content/hooks/{background-design-commands.py → background-commands.py} +14 -65
  5. package/content/hooks/builder-idle-check.py +146 -15
  6. package/content/mods/plugins/codex-runs/.claude-plugin/plugin.json +1 -1
  7. package/content/mods/plugins/codex-runs/hooks/agent-runs.ts +310 -0
  8. package/content/mods/plugins/codex-runs/hooks/register.tsx +171 -12
  9. package/content/mods/plugins/codex-runs/types/index.d.ts +18 -0
  10. package/content/mods/plugins/e2e-progress/.claude-plugin/plugin.json +1 -1
  11. package/content/mods/plugins/status-line/.claude-plugin/plugin.json +1 -1
  12. package/content/mods/plugins/usage-line/.claude-plugin/plugin.json +1 -1
  13. package/content/mods/plugins/usage-line/hooks/rate-limits.ts +23 -0
  14. package/content/mods/plugins/usage-line/hooks/register.tsx +16 -0
  15. package/content/skills/agent-sessions/SKILL.md +1 -1
  16. package/content/skills/codex-subagent/SKILL.md +8 -2
  17. package/content/skills/codex-subagent/codex-agent.mjs +33 -2
  18. package/content/skills/design-exploration/SKILL.md +22 -104
  19. package/content/skills/design-exploration/reference-shots.md +1 -11
  20. package/content/skills/handoff/SKILL.md +2 -0
  21. package/content/skills/handoff/save.md +2 -0
  22. package/migrations/studio-claude-plugin.md +27 -0
  23. package/migrations.json +8 -0
  24. package/package.json +1 -1
  25. package/src/index.js +0 -6
  26. package/src/index.js.map +1 -1
  27. package/src/lib/config.d.ts +4 -7
  28. package/src/lib/config.js +12 -9
  29. package/src/lib/config.js.map +1 -1
  30. package/src/lib/filter.d.ts +1 -0
  31. package/src/lib/filter.js +3 -1
  32. package/src/lib/filter.js.map +1 -1
  33. package/src/lib/plan.js +6 -3
  34. package/src/lib/plan.js.map +1 -1
  35. package/src/lib/report-command.js +8 -2
  36. package/src/lib/report-command.js.map +1 -1
  37. package/src/lib/targets/hooks-shared.d.ts +5 -0
  38. package/src/lib/targets/hooks-shared.js +12 -10
  39. package/src/lib/targets/hooks-shared.js.map +1 -1
  40. package/src/lib/targets/mcp.d.ts +10 -1
  41. package/src/lib/targets/mcp.js +43 -1
  42. package/src/lib/targets/mcp.js.map +1 -1
  43. package/src/lib/timetrack.d.ts +0 -591
  44. package/src/lib/timetrack.js +3 -139
  45. package/src/lib/timetrack.js.map +1 -1
  46. package/content/hooks/design-live-check.py +0 -136
  47. package/content/skills/design-exploration/reference-check-and-notes.md +0 -101
  48. package/content/skills/design-exploration/reference-flows.md +0 -38
  49. package/content/skills/design-exploration/reference-inbox-and-mcp.md +0 -54
  50. package/content/skills/design-exploration/reference-order-and-design-system.md +0 -120
  51. package/content/skills/design-exploration/reference-products-and-sketches.md +0 -250
  52. package/content/skills/timetrack/SKILL.md +0 -324
  53. package/src/lib/peer-path.d.ts +0 -12
  54. package/src/lib/peer-path.js +0 -39
  55. package/src/lib/peer-path.js.map +0 -1
  56. package/src/lib/timetrack-command.d.ts +0 -11
  57. package/src/lib/timetrack-command.js +0 -1262
  58. package/src/lib/timetrack-command.js.map +0 -1
  59. package/src/lib/timetrack-snapshot.d.ts +0 -66
  60. package/src/lib/timetrack-snapshot.js +0 -146
  61. package/src/lib/timetrack-snapshot.js.map +0 -1
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.timetrackAskAutoMode = exports.timetrackRejectApproval = exports.timetrackApprovals = exports.timetrackApprovalStatus = exports.timetrackApplyStandInSplit = exports.timetrackSplitStandIn = exports.timetrackResolveStandIn = exports.timetrackMergeStandIn = exports.timetrackRenameStandIn = exports.timetrackRemoveStandIn = exports.timetrackStandIns = exports.timetrackResyncAgentSessions = exports.timetrackRepointRules = exports.timetrackRules = exports.timetrackCalendarEvents = exports.timetrackTempoDelete = exports.timetrackTempoSyncWrite = exports.timetrackTempoSync = exports.timetrackTempoWorklogs = exports.timetrackEditDay = exports.timetrackDayRows = exports.timetrackTranscriptDay = exports.timetrackDayEvents = exports.timetrackAddWorklog = exports.timetrackCreateIssue = exports.timetrackRepoProject = exports.timetrackSearch = exports.timetrackIssue = exports.timetrackInstance = exports.timetrackNaming = exports.timetrackStatus = exports.askTimetrack = exports.timetrackClientName = exports.timetrackDiscoveryPath = void 0;
12
+ exports.timetrackIssue = exports.timetrackDiscoveryPath = void 0;
13
13
  const crypto_1 = require("crypto");
14
14
  const fs_1 = require("fs");
15
15
  const os_1 = require("os");
@@ -77,7 +77,6 @@ const readDiscovery = () => {
77
77
  * runs this, and nothing otherwise.
78
78
  */
79
79
  const timetrackClientName = () => { var _a; return ((_a = process.env['TIMETRACK_CLIENT']) === null || _a === void 0 ? void 0 : _a.trim()) || (process.env['CLAUDECODE'] ? 'Claude Code' : undefined); };
80
- exports.timetrackClientName = timetrackClientName;
81
80
  const IMPOSTOR = [
82
81
  'Something other than Timetrack answers on the port its discovery file names.',
83
82
  'The app writes a new port and a new token at every start — restart Timetrack, then try again.',
@@ -118,7 +117,7 @@ const proveTheServer = (discovery) => __awaiter(void 0, void 0, void 0, function
118
117
  */
119
118
  const askTimetrack = (request) => __awaiter(void 0, void 0, void 0, function* () {
120
119
  const discovery = readDiscovery();
121
- const client = (0, exports.timetrackClientName)();
120
+ const client = timetrackClientName();
122
121
  yield proveTheServer(discovery);
123
122
  let response;
124
123
  try {
@@ -145,141 +144,6 @@ const askTimetrack = (request) => __awaiter(void 0, void 0, void 0, function* ()
145
144
  throw new Error(answer.message);
146
145
  return answer.value;
147
146
  });
148
- exports.askTimetrack = askTimetrack;
149
- const timetrackStatus = () => (0, exports.askTimetrack)({ op: 'status' });
150
- exports.timetrackStatus = timetrackStatus;
151
- const timetrackNaming = (day) => (0, exports.askTimetrack)({ op: 'naming.offers', day });
152
- exports.timetrackNaming = timetrackNaming;
153
- const timetrackInstance = () => (0, exports.askTimetrack)({ op: 'jira.instance' });
154
- exports.timetrackInstance = timetrackInstance;
155
- const timetrackIssue = (key) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.askTimetrack)({ op: 'jira.issue', key })).issue; });
147
+ const timetrackIssue = (key) => __awaiter(void 0, void 0, void 0, function* () { return (yield askTimetrack({ op: 'jira.issue', key })).issue; });
156
148
  exports.timetrackIssue = timetrackIssue;
157
- const timetrackSearch = (options) => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.askTimetrack)(Object.assign({ op: 'jira.search' }, options))).issues; });
158
- exports.timetrackSearch = timetrackSearch;
159
- const timetrackRepoProject = (repoPath) => (0, exports.askTimetrack)({ op: 'repo.project', repoPath });
160
- exports.timetrackRepoProject = timetrackRepoProject;
161
- /** Queues a new issue, filed with the app's own ticket settings once the user approves it. */
162
- const timetrackCreateIssue = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'jira.create' }, options));
163
- exports.timetrackCreateIssue = timetrackCreateIssue;
164
- /** Queues a row for the day it belongs to. It is a row on the day once approved, not a Tempo entry. */
165
- const timetrackAddWorklog = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'worklog.add' }, options));
166
- exports.timetrackAddWorklog = timetrackAddWorklog;
167
- const timetrackDayEvents = (day, options = {}) => (0, exports.askTimetrack)(Object.assign({ op: 'day.events', day }, (options.received ? { received: true } : {})));
168
- exports.timetrackDayEvents = timetrackDayEvents;
169
- const timetrackTranscriptDay = (day) => (0, exports.askTimetrack)({ op: 'transcript.day', day });
170
- exports.timetrackTranscriptDay = timetrackTranscriptDay;
171
- const timetrackDayRows = (day) => (0, exports.askTimetrack)({ op: 'day.rows', day });
172
- exports.timetrackDayRows = timetrackDayRows;
173
- /**
174
- * Queues the stated edits to a day's rows. Once approved, the result is the day as it reads afterwards.
175
- *
176
- * `applied` in that result counts the edits that found their row: a day the collectors keep changing
177
- * can drop a row a caller read a moment ago.
178
- */
179
- const timetrackEditDay = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'day.edits' }, options));
180
- exports.timetrackEditDay = timetrackEditDay;
181
- /** Reads the user's own Tempo worklogs from Tempo, both days included. The app caps the span at 92 days. */
182
- const timetrackTempoWorklogs = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'tempo.worklogs' }, options));
183
- exports.timetrackTempoWorklogs = timetrackTempoWorklogs;
184
- /**
185
- * Plans a Tempo sync of one day exactly as the app's Sync page does. It writes nothing, so it is
186
- * answered at once. The app moves its review to the day.
187
- */
188
- const timetrackTempoSync = (day) => (0, exports.askTimetrack)({ op: 'tempo.sync', day });
189
- exports.timetrackTempoSync = timetrackTempoSync;
190
- /** Queues the write of the plan whose hash the user confirmed. The app checks the hash again on approval. */
191
- const timetrackTempoSyncWrite = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'tempo.sync' }, options));
192
- exports.timetrackTempoSyncWrite = timetrackTempoSyncWrite;
193
- /**
194
- * Queues the delete of one of the user's own Tempo worklogs. Once approved, the app refuses an id that
195
- * is not among the account's own worklogs on `day`, and drops the ledger entry that owned it.
196
- */
197
- const timetrackTempoDelete = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'tempo.delete' }, options));
198
- exports.timetrackTempoDelete = timetrackTempoDelete;
199
- /** Reads the calendars the app watches, both days included. The app caps the span at 92 days. */
200
- const timetrackCalendarEvents = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'calendar.events' }, options));
201
- exports.timetrackCalendarEvents = timetrackCalendarEvents;
202
- const timetrackRules = () => (0, exports.askTimetrack)({ op: 'settings.rules' });
203
- exports.timetrackRules = timetrackRules;
204
- /**
205
- * Queues pointing every attribution rule that names issue `from` at issue `to`, optionally only the
206
- * rules of one checkout. The app checks a rule names `from` and that `to` exists before it queues.
207
- */
208
- const timetrackRepointRules = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'rules.repoint' }, options));
209
- exports.timetrackRepointRules = timetrackRepointRules;
210
- /**
211
- * Queues a read of the agent session logs under `paths` again, so sessions the app dropped while no
212
- * project link held them are stored. Once approved, the read runs in the background.
213
- *
214
- * With `replace`, the re-read overwrites the samples, spend and prompts the store holds for those
215
- * sessions, which is how a parser fix reaches days already stored.
216
- */
217
- const timetrackResyncAgentSessions = (paths, options = {}) => (0, exports.askTimetrack)(Object.assign({ op: 'agentSessions.resync', paths }, (options.replace ? { replace: true } : {})));
218
- exports.timetrackResyncAgentSessions = timetrackResyncAgentSessions;
219
- const timetrackStandIns = () => __awaiter(void 0, void 0, void 0, function* () { return (yield (0, exports.askTimetrack)({ op: 'standIn.list' })).standIns; });
220
- exports.timetrackStandIns = timetrackStandIns;
221
- /**
222
- * Queues the delete of one placeholder. Once approved, the result is the list as it reads afterwards.
223
- *
224
- * The rule pointing at it goes with it. A record the app opened for one branch refuses that branch as
225
- * it goes, so no second one opens for it; a record naming no branch refuses nothing, and the next
226
- * pass may open one at whatever grain the day reads.
227
- */
228
- const timetrackRemoveStandIn = (id) => (0, exports.askTimetrack)({ op: 'standIn.remove', id });
229
- exports.timetrackRemoveStandIn = timetrackRemoveStandIn;
230
- /**
231
- * Queues another name for one placeholder. Once approved, the result is the list as it reads afterwards.
232
- *
233
- * Only the name changes. The days it holds and the rules that name it stay, which is what a delete
234
- * and a fresh record would lose.
235
- */
236
- const timetrackRenameStandIn = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'standIn.rename' }, options));
237
- exports.timetrackRenameStandIn = timetrackRenameStandIn;
238
- /**
239
- * Queues the merge of one open placeholder into another. Once approved, the result is the list as it
240
- * reads afterwards. The kept one takes the days and the rules of both.
241
- */
242
- const timetrackMergeStandIn = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'standIn.merge' }, options));
243
- exports.timetrackMergeStandIn = timetrackMergeStandIn;
244
- /**
245
- * Queues the resolve of one placeholder to a Jira issue, as the user's pick in the app does. A resolved
246
- * one moves to the new issue. The app checks both exist before it queues; once approved, the result is
247
- * the list as it reads afterwards.
248
- */
249
- const timetrackResolveStandIn = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'standIn.resolve' }, options));
250
- exports.timetrackResolveStandIn = timetrackResolveStandIn;
251
- /**
252
- * Plans the cut of one placeholder into one per directory it turned out to cover, and writes nothing.
253
- *
254
- * The commits come from the caller: one
255
- * collected before Timetrack read file paths carries none, so only `git log --name-only` can say.
256
- * A checkout whose commits name more directories than a grain can hold has no automatic reading,
257
- * and `paths` is how the user picks which of them are the pieces.
258
- */
259
- const timetrackSplitStandIn = (options) => (0, exports.askTimetrack)(Object.assign(Object.assign({ op: 'standIn.split' }, options), { apply: false }));
260
- exports.timetrackSplitStandIn = timetrackSplitStandIn;
261
- /** Queues the split `timetrackSplitStandIn` planned, with the same options. */
262
- const timetrackApplyStandInSplit = (options) => (0, exports.askTimetrack)(Object.assign(Object.assign({ op: 'standIn.split' }, options), { apply: true }));
263
- exports.timetrackApplyStandInSplit = timetrackApplyStandInSplit;
264
- /** Where a write this caller queued stands, and what it answered once the user approved it. */
265
- const timetrackApprovalStatus = (id) => (0, exports.askTimetrack)({ op: 'approval.status', id });
266
- exports.timetrackApprovalStatus = timetrackApprovalStatus;
267
- /** The writes that wait in the app now, from every caller, in the order its queue panel lists them. */
268
- const timetrackApprovals = () => (0, exports.askTimetrack)({ op: 'approvals.list' });
269
- exports.timetrackApprovals = timetrackApprovals;
270
- /**
271
- * Rejects one write that waits, as the user's Reject press does, and answers at once. The app refuses an
272
- * item that no longer waits. There is no approving counterpart: only the user approves, in the app.
273
- */
274
- const timetrackRejectApproval = (id) => (0, exports.askTimetrack)({ op: 'approval.reject', id });
275
- exports.timetrackRejectApproval = timetrackRejectApproval;
276
- /**
277
- * Asks auto mode about one subject of a day again, as the app's "Ask auto mode again" does, and answers
278
- * at once with what it queued. The new answer replaces the stored one later; it writes nothing to Jira or
279
- * Tempo, and whatever it queues waits for the user's approval as auto mode's own does.
280
- */
281
- const timetrackAskAutoMode = (options) => (0, exports.askTimetrack)(Object.assign({ op: 'autoMode.ask', day: options.day }, (options.subject.kind === 'stand-in'
282
- ? { standInId: options.subject.standInId }
283
- : { contextId: options.subject.contextId })));
284
- exports.timetrackAskAutoMode = timetrackAskAutoMode;
285
149
  //# sourceMappingURL=timetrack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timetrack.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/timetrack.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAkE;AAClE,2BAA8C;AAC9C,2BAAuC;AACvC,+BAA4B;AAE5B,2FAA2F;AAC3F,MAAM,UAAU,GAAG,sBAAsB,CAAC;AAE1C,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAExC;;;GAGG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,qGAAqG;AACrG,MAAM,UAAU,GAAG,MAAO,CAAC;AAE3B,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,UAAU,GAAG,cAAc,CAAC;AA2WlC,MAAM,WAAW,GAAG;IAClB,iEAAiE;IACjE,2FAA2F;CAC5F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;GAKG;AACI,MAAM,sBAAsB,GAAG,GAAG,EAAE;;IACzC,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,0CAAE,IAAI,EAAE,CAAC;IAElE,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAE9B,MAAM,IAAI,GAAG,IAAA,YAAO,GAAE,CAAC;IAEvB,IAAI,IAAA,aAAQ,GAAE,KAAK,QAAQ;QAAE,OAAO,IAAA,WAAI,EAAC,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,UAAU,EAAE,kBAAkB,CAAC,CAAC;IAEjH,IAAI,IAAA,aAAQ,GAAE,KAAK,OAAO,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,0CAAE,IAAI,EAAE,CAAC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AC,QAAQ,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC;IAEnG,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAc,CAAC;IAEpD,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAEhD,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB,CAAC,CAAA,CAAC;AAEK,MAAM,cAAc,GAAG,CAAO,GAAW,EAAE,EAAE,kDAClD,OAAA,CAAC,MAAM,YAAY,CAA4B,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAA,GAAA,CAAC;AADtE,QAAA,cAAc,kBACwD"}
@@ -1,136 +0,0 @@
1
- #!/usr/bin/env python3
2
- """PostToolUse hook: each design file the agent writes gets the design check's findings at once.
3
-
4
- After an Edit, Write or MultiEdit of a `.ts`, `.css` or `.html` file under `.ethlete/design/`, it runs
5
- `et design lint <file>`: the static design rules of the file's part or sketch variant, and eslint on it.
6
- No draw, no type check. A finding comes back to the agent as a blocking message, one line each, so it fixes
7
- the file before it hands the design to a human. A clean file stays silent.
8
-
9
- It runs `et` the way the repo's `ethlete-design` MCP server in `.mcp.json` does, with `lint` in place
10
- of `mcp`, else `node_modules/.bin/et`. A repo with neither gets no check.
11
-
12
- Can be disabled per machine via a gitignored ethlete-agents.config.local.json at the repo
13
- root: {"disableHooks": true} or {"disableHooks": ["design-live-check"]}.
14
-
15
- Fail-safe: any error exits 0 with no output.
16
- """
17
-
18
- import json
19
- import os
20
- import subprocess
21
- import sys
22
-
23
- HOOK_NAME = "design-live-check"
24
- LOCAL_CONFIG_FILE = "ethlete-agents.config.local.json"
25
- TOOLS = frozenset(("Edit", "Write", "MultiEdit"))
26
- DESIGN_DIR = os.path.join(".ethlete", "design")
27
- CHECKED_EXTENSIONS = (".ts", ".mts", ".css", ".html")
28
- RUN_SECONDS = 50
29
-
30
-
31
- def agent_name(argv):
32
- for index, arg in enumerate(argv):
33
- if arg == "--agent" and index + 1 < len(argv):
34
- return argv[index + 1]
35
- if arg.startswith("--agent="):
36
- return arg.split("=", 1)[1]
37
- return "claude"
38
-
39
-
40
- def repo_root(data):
41
- for variable in ("CLAUDE_PROJECT_DIR", "CODEX_PROJECT_DIR"):
42
- value = os.environ.get(variable)
43
- if value:
44
- return value
45
- cwd = data.get("cwd")
46
- return cwd if isinstance(cwd, str) and cwd else os.getcwd()
47
-
48
-
49
- def load_json(path):
50
- try:
51
- with open(path, encoding="utf-8") as f:
52
- value = json.load(f)
53
- except (OSError, ValueError):
54
- return {}
55
- return value if isinstance(value, dict) else {}
56
-
57
-
58
- def disabled_locally(root):
59
- disabled = load_json(os.path.join(root, LOCAL_CONFIG_FILE)).get("disableHooks")
60
- return disabled is True or (isinstance(disabled, list) and HOOK_NAME in disabled)
61
-
62
-
63
- def design_file_of(root, path):
64
- if not isinstance(path, str) or not path.endswith(CHECKED_EXTENSIONS):
65
- return None
66
- file = os.path.normpath(os.path.join(root, path))
67
- relative = os.path.relpath(file, root)
68
- if relative.startswith("..") or not relative.startswith(DESIGN_DIR + os.sep):
69
- return None
70
- return file if os.path.isfile(file) else None
71
-
72
-
73
- def lint_command_of(root):
74
- servers = load_json(os.path.join(root, ".mcp.json")).get("mcpServers", {})
75
- design = servers.get("ethlete-design") if isinstance(servers, dict) else None
76
- if isinstance(design, dict) and isinstance(design.get("command"), str):
77
- args = design.get("args") if isinstance(design.get("args"), list) else []
78
- words = [design["command"], *[str(arg) for arg in args]]
79
- if words[-1] == "mcp":
80
- return [*words[:-1], "lint"]
81
- local = os.path.join(root, "node_modules", ".bin", "et")
82
- return [local, "design", "lint"] if os.path.isfile(local) else None
83
-
84
-
85
- def message_of(relative, findings):
86
- return (
87
- f"The design check finds this in {relative}. Fix each finding now, before you hand the design back; "
88
- "every line says what to change:\n" + findings
89
- )
90
-
91
-
92
- def main():
93
- if agent_name(sys.argv[1:]) != "claude":
94
- return
95
-
96
- data = json.load(sys.stdin)
97
-
98
- if data.get("tool_name") not in TOOLS:
99
- return
100
-
101
- tool_input = data.get("tool_input")
102
- root = repo_root(data)
103
-
104
- if not isinstance(tool_input, dict) or disabled_locally(root):
105
- return
106
-
107
- file = design_file_of(root, tool_input.get("file_path"))
108
- command = lint_command_of(root) if file else None
109
-
110
- if not command:
111
- return
112
-
113
- run = subprocess.run(
114
- [*command, file],
115
- cwd=root,
116
- capture_output=True,
117
- text=True,
118
- timeout=RUN_SECONDS,
119
- )
120
- findings = run.stdout.strip()
121
-
122
- if run.returncode != 1 or not findings:
123
- return
124
-
125
- sys.stderr.write(message_of(os.path.relpath(file, root), findings) + "\n")
126
- sys.exit(2)
127
-
128
-
129
- if __name__ == "__main__":
130
- try:
131
- main()
132
- except SystemExit:
133
- raise
134
- except Exception:
135
- pass
136
- sys.exit(0)
@@ -1,101 +0,0 @@
1
- # Design exploration: checking a product, drawing files and notes
2
-
3
- ### Check a product
4
-
5
- ```bash
6
- et design check --product <name> # layer dependencies, hard-coded colours, undefined tokens, copied components, scripted motion, tsc (open sketch variants too), render
7
- et design system --json # each part's origin, note, states, presets and problems
8
- ```
9
-
10
- Without `--product`, `check` covers every product. A part may only use its own layer and the
11
- layers below it (see "The order of a design"). Rule `FLOW` reports a misshaped flow file, a frame
12
- naming a part or state that exists neither in the product nor in an open sketch of that part, a duplicate state, and a line to a state that is not a frame of
13
- the flow. Rule `WIREFRAME-KIT` reports a component or foundation importing the kit. Pass the changed files to the check below as before.
14
-
15
- Once the other rules pass, the check draws every state in a headless Chromium on a server of its own
16
- (pages at each preset, a part with `widths` at each width, any other part fitted), and
17
- `sketch check` does the same for the open variants and the pages they show in. Each line names
18
- product, part, state, size and a selector path:
19
-
20
- - `OVERFLOW` - the frame scrolls sideways: content wider than the frame. A page taller than its preset
21
- height is fine: it scrolls, so draw the whole list, not the films that fit.
22
- - `FONT-FACE` - a font the design names did not load in the shot (an `@font-face` that fails, or a family no
23
- stylesheet delivers, e.g. a Google Fonts link the sandbox blocks). Self-host it: a woff2 file in the product's
24
- `assets/` and an `@font-face` rule, never a CDN link.
25
- - `CLIPPED` - an element with `overflow: hidden|clip` cuts its content, unless it sets
26
- `text-overflow: ellipsis` or a line clamp.
27
- - `TRUNCATED` - text cut by `text-overflow: ellipsis` or a line clamp, with the width or height it shows and the one it needs. Widen the box or shorten the text; a state that shows truncation on purpose carries `data-et-skip="TRUNCATED"`.
28
- - `WRAP` - text in a button, tab, badge, chip or `white-space: nowrap` box runs onto a second line.
29
- - `ZERO-SIZE` - the part root has no width or no height.
30
- - `UNKNOWN-THEME` - a `et-color--<name>` class names a colour theme no stylesheet of the frame defines, so it draws in the fallback colour.
31
- - `RENDER` - the frame refused to draw, or the part did not load.
32
-
33
- A failed `sketch check` is yours to fix first: a `TYPE-ERROR` or a missing export usually comes from your variant files, so
34
- correct them and run it again. Draw every variant of the sketch; a variant left as the stub `sketch new` wrote fails
35
- `STATE-SENTENCE` and `sketch ready` refuses it. Report a tool fault only when the refusal is not caused by your files.
36
-
37
- A `WARNING` line does not fail the check:
38
-
39
- - `UNDEFINED-CLASS` - a class carries a prefix the product's part CSS uses (`st-`, not the SDK's
40
- `et-`), but no stylesheet of the frame defines it. Named once, at the first part that draws it.
41
- - `GRID-COVERAGE` - some `grid` rows fill every interaction column (`rest`, `hover`, `active`,
42
- `focus-visible`, `disabled`) and others leave some out, so a state can break there unseen.
43
-
44
- A part that breaks a rule on purpose names it: `definePart({ checks: { skip: ['CLIPPED'] }, … })`;
45
- the skip covers the part wherever it is drawn. Without Playwright Chromium the check prints
46
- `RENDER CHECK SKIPPED` and passes on the other rules.
47
-
48
- A project's `config.json` entry can name `themes`, `{ "surface": [...], "color": [...] }`; a
49
- frame asked for a theme gets the `et-surface--<name>` and `et-color--<name>` classes on its root,
50
- so a drawing must take its colours from the theme tokens and never set a surface or colour class
51
- on its own root. An inner panel may set `et-surface--<name>`.
52
-
53
- `et design [checkout]` serves the frames; the checkout defaults to the working directory and
54
- `DE_PORT` overrules the port. In the ethlete SDK the user reads Studio, started with `yarn studio`,
55
- which serves the frames itself: do not start `yarn design` next to it. Studio carries its own copy
56
- of the tool, so a checkout that installs nothing still draws.
57
-
58
- Three constraints on a drawing file:
59
-
60
- - **Never import a package barrel.** The libraries resolve to source, so one barrel makes the
61
- browser request every module and the requests fail with `ERR_INSUFFICIENT_RESOURCES`. Import
62
- the one file you need.
63
- - **The fixture is shared, and a variant may not change it.**
64
- - **One file per variant**, so a broken variant breaks its own frame only.
65
-
66
- A `<script>` in a drawing never runs. For behavior give the drawing a `setup(root)` function
67
- (called once after the markup is in `root`, no cleanup, wire one delegated listener). Render each
68
- state of a prototype with `ngStates({ closed: …, open: … }, { imports })` and swap them with
69
- `setup: flow.on([{ click: '.trigger', go: 'open' }])`. To draw an open overlay, open it in the
70
- template (`<et-select [open]="true">`); `ng()` returns the real panel and the frame places it.
71
- `ngStates` wraps the states in `<div data-de-states style="display: contents">`, so a selector
72
- rule must not depend on that wrapper.
73
-
74
- **A repository with a sketch Storybook** draws every variant in the **same** story, side by
75
- side, under the real geometry the thing ships in. The default Storybook is
76
- {%storybookUrl%}; an app with its own sketch Storybook names its port in the plan file.
77
-
78
- Either way:
79
-
80
- - Sketches take inputs only and stay out of the application's build.
81
- - Prototype, never refactor. Do not touch the shipped component until the treatment is
82
- settled.
83
- - Keep the rejected variants drawn, marked as rejected.
84
-
85
- ### Notes
86
-
87
- A note explains a state: why it looks this way, what it shows. A comment is feedback that needs
88
- an answer. Write a note when nothing is asked of the reader.
89
-
90
- A note is `<product>/notes/<timestamp>-<id>.json`:
91
-
92
- ```json
93
- { "part": "button", "state": "disabled", "point": { "x": 24, "y": 8 }, "size": "mobile", "text": "Muted, not hidden." }
94
- ```
95
-
96
- - `part`, `state` and `text` are required. `point` is optional, in CSS pixels.
97
- - `size` is required when `point` is set: the preset, the CSS pixel width, or `"fitted"` the note was written at. A
98
- pointed note shows only at that size; a note without a point shows at every size.
99
- - A free note on a flow is an entry in the `notes` array of `flows/<name>.json`:
100
- `{ "id": "…", "text": "…", "at": { "x": 0, "y": -40 } }`. `at` is optional, the note's top-left
101
- corner on the flow canvas, and may be negative.
@@ -1,38 +0,0 @@
1
- # Design exploration: flows
2
-
3
- ### Draw a flow
4
-
5
- A flow joins states of pages into a path the user reads left to right in Studio's Flows view.
6
- It is `<product>/flows/<name>.json`; `position` and `label` are optional:
7
-
8
- ```json
9
- {
10
- "frames": [{ "part": "pages/projects", "state": "empty", "position": { "x": 0, "y": 0 } }],
11
- "lines": [
12
- {
13
- "from": { "part": "pages/projects", "state": "empty" },
14
- "to": { "part": "pages/project-detail", "state": "default" },
15
- "label": "user adds a project"
16
- }
17
- ]
18
- }
19
- ```
20
-
21
- Every flow line is labelled, and the element the label names is visible in the frame before it: a line
22
- labelled "user clicks 'Log in'" starts from a frame that shows a "Log in" button. A line that names
23
- nothing the reader can see, or a label for a control the page lacks, is a defect.
24
-
25
- A line may join two states of one page. A frame may name a page that exists only as an open sketch;
26
- the flow then shows its first variant. Lines hold for every preset. Without `position`, Studio
27
- lays the frames out along the lines.
28
-
29
- A page may not import another page. To show a page inside a page ("in context"), embed it:
30
- `embedPage('pages/system', { state, width, height, scale })` from `@design-system` answers a
31
- drawing whose `body` is a frame of that page, drawn in the same product, sketch variant and theme
32
- as the embedding frame. `width` and `height` are the viewport the page is drawn at (default
33
- 1280 x 800; `height: 'auto'` fits its content), `scale` shrinks the frame. Never rebuild a page
34
- from its elements to show it.
35
-
36
- The app shell (menu, navigation) is one element named by purpose (`elements/shell-primary`) that each page
37
- imports, so a shell pick lands in one file. Never draw the shell inside a page, and never as a state of one.
38
- A dialog without its own URL is an element that a page state shows ("login open").
@@ -1,54 +0,0 @@
1
- # Design exploration: the inbox and the MCP server
2
-
3
- ### Read the inbox
4
-
5
- The user comments on a state of a part in Studio, at a point, or on a sketch variant. The sketch of
6
- an element also shows each page that uses it, with each variant swapped in: a comment there names
7
- the page as its part and the element's sketch variant, so change the variant, not the page.
8
-
9
- ```bash
10
- et design inbox [--json] [--product <p>] # open comments and rebases, then what waits for the user
11
- et design inbox done <id> --note <text> --by <model id> # set the part note, mark the thread addressed
12
- et design comment reply <id> --by <model id> <text> [--question] # answer a comment thread (takes --product)
13
- ```
14
-
15
- Read the inbox at the start of a session and after each sketch you mark `ready`. Answer a comment
16
- by changing the sketch or the part, then `inbox done <id> --note "…"`. The note replaces the `note` of the part the comment was made on (for a sketch variant, the product's part), so write it to explain the whole shape of the part, and pass the old note unchanged when it still holds. `done` fails without `--note`; only the user withdraws a comment without one, in Studio. `done` also stores your `--by` where the comment sat: in the authors of the sketch variant, or in the `madeBy` of the part. A pick or discard decision is listed as waiting
17
- for the user: Studio merges or discards on the user's click, so never run `sketch merge` after a pick.
18
-
19
- A comment is a thread: the user and you both reply. When a comment is unclear, ask with
20
- `comment reply --question` instead of guessing. The thread then moves to the "waiting for the user" group
21
- (`waitingForUser` in `--json`) and returns to the inbox when the user answers. A thread there is
22
- not work for you.
23
-
24
- A thread has three states. **Open** waits for an answer. **Addressed** (`addressed`: who, when, why,
25
- the round) means `inbox done`, a new round, a merge or a discard answered it: it leaves the inbox and
26
- the check, Studio shows it with an "addressed" badge, and you may still `comment reply` on it to say
27
- what you changed. A reply by the user opens it again. **Resolved** means the user closed it in Studio -
28
- only the user resolves. The file stays so the user can look back at it; a reply or `done` on it fails.
29
-
30
- Pass `--question` only when you cannot go on without the user's answer. Studio lists only those
31
- threads under "Questions for you". A report of what you did is no question: reply without the
32
- flag, and the thread shows as "answered" until the user withdraws it or replies.
33
-
34
- ### The `ethlete-design` MCP server
35
-
36
- `ethlete-agents sync` registers `et design mcp` as `ethlete-design` in `.mcp.json` and
37
- `.codex/config.toml` when `@ethlete/cli` is installed. When the tools are in your tool list, use them
38
- instead of the CLI: each runs the `et design` command of the same name in the session's working
39
- directory, takes its flags as arguments, and every write takes `by` (your model id). `product` may be
40
- left out when the workspace has one. `shot` and `motion_shots` return the sheet image itself, so you
41
- look at it without opening a PNG path.
42
-
43
- - **Read:** `parts` (every part, as JSON), `call` (a call's `call.ts`, `fixture.ts`, the variant file to draw into and the frame URL; never change the fixture).
44
- - **Check:** `check` (a product; with `call` and `variant` it lints, type-checks and renders that variant - run it after every edit of a variant), `sketch_check` (each variant laid over the product), `sketch_preview` (what a merge of a variant changes).
45
- - **Shots:** `shot` (a part's states, `variants` for the open sketch), `motion_shots` (a motion at its keyframes, full and reduced, plus its tracks as JSON).
46
- - **Sketch lifecycle:** `sketch_new`, `sketch_variant`, `sketch_round`, `sketch_report`, `sketch_ready`, `sketch_rebase`, `sketch_list`. `sketch_merge` and `sketch_discard` exist, but Studio runs them on the user's click; do not call them.
47
- - **Comments:** `inbox` (what waits for you, then for the user), `comment_reply` (`question` waits for the user's answer), `inbox_done` (needs the new part `note`).
48
-
49
- Part files are written with your own file tools; the server has no write tool for them. Call
50
- `sketch_report` before every variant edit: it tells Studio what you build. It refuses a `ready` sketch: only when the
51
- user asks for a change, run `et design sketch report … --reopen`, which moves the sketch back to in progress, and call
52
- `sketch_ready` again when you are done. `sketch_ready` runs the
53
- render check and refuses on any render issue; mark an element that renders wrong on purpose with
54
- `data-et-skip="<rule>"`. A tool that fails returns the CLI's output; fix it and call again.