@ethlete/agent-rules 0.1.0-next.50 → 0.1.0-next.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/README.md +20 -53
- package/content/hooks/away-mode.py +90 -7
- package/content/hooks/{background-design-commands.py → background-commands.py} +14 -65
- package/content/hooks/builder-idle-check.py +101 -13
- package/content/mods/plugins/codex-runs/.claude-plugin/plugin.json +1 -1
- package/content/mods/plugins/codex-runs/hooks/agent-runs.ts +310 -0
- package/content/mods/plugins/codex-runs/hooks/register.tsx +171 -12
- package/content/mods/plugins/codex-runs/types/index.d.ts +18 -0
- package/content/mods/plugins/e2e-progress/.claude-plugin/plugin.json +1 -1
- package/content/mods/plugins/e2e-progress/hooks/progress.ts +12 -4
- package/content/mods/plugins/e2e-progress/hooks/register.tsx +2 -2
- package/content/mods/plugins/status-line/.claude-plugin/plugin.json +1 -1
- package/content/mods/plugins/usage-line/.claude-plugin/plugin.json +1 -1
- package/content/mods/plugins/usage-line/hooks/rate-limits.ts +23 -0
- package/content/mods/plugins/usage-line/hooks/register.tsx +16 -0
- package/content/skills/agent-sessions/SKILL.md +1 -1
- package/content/skills/codex-subagent/SKILL.md +8 -2
- package/content/skills/codex-subagent/codex-agent.mjs +33 -2
- package/content/skills/design-exploration/SKILL.md +22 -104
- package/content/skills/design-exploration/reference-shots.md +1 -11
- package/content/skills/theming/SKILL.md +22 -20
- package/migrations/studio-claude-plugin.md +27 -0
- package/migrations.json +8 -0
- package/package.json +1 -1
- package/src/index.js +0 -6
- package/src/index.js.map +1 -1
- package/src/lib/config.d.ts +8 -8
- package/src/lib/config.js +13 -9
- package/src/lib/config.js.map +1 -1
- package/src/lib/filter.d.ts +1 -0
- package/src/lib/filter.js +3 -1
- package/src/lib/filter.js.map +1 -1
- package/src/lib/plan.js +15 -6
- package/src/lib/plan.js.map +1 -1
- package/src/lib/report-command.js +8 -2
- package/src/lib/report-command.js.map +1 -1
- package/src/lib/targets/claude-hooks.d.ts +3 -0
- package/src/lib/targets/claude-hooks.js +21 -3
- package/src/lib/targets/claude-hooks.js.map +1 -1
- package/src/lib/targets/hooks-shared.d.ts +5 -0
- package/src/lib/targets/hooks-shared.js +12 -10
- package/src/lib/targets/hooks-shared.js.map +1 -1
- package/src/lib/targets/mcp.d.ts +10 -1
- package/src/lib/targets/mcp.js +43 -1
- package/src/lib/targets/mcp.js.map +1 -1
- package/src/lib/timetrack.d.ts +0 -591
- package/src/lib/timetrack.js +3 -139
- package/src/lib/timetrack.js.map +1 -1
- package/content/hooks/design-live-check.py +0 -136
- package/content/skills/design-exploration/reference-check-and-notes.md +0 -100
- package/content/skills/design-exploration/reference-flows.md +0 -38
- package/content/skills/design-exploration/reference-inbox-and-mcp.md +0 -54
- package/content/skills/design-exploration/reference-order-and-design-system.md +0 -120
- package/content/skills/design-exploration/reference-products-and-sketches.md +0 -250
- package/content/skills/timetrack/SKILL.md +0 -324
- package/src/lib/peer-path.d.ts +0 -12
- package/src/lib/peer-path.js +0 -39
- package/src/lib/peer-path.js.map +0 -1
- package/src/lib/timetrack-command.d.ts +0 -11
- package/src/lib/timetrack-command.js +0 -1262
- package/src/lib/timetrack-command.js.map +0 -1
- package/src/lib/timetrack-snapshot.d.ts +0 -66
- package/src/lib/timetrack-snapshot.js +0 -146
- package/src/lib/timetrack-snapshot.js.map +0 -1
package/src/lib/timetrack.js
CHANGED
|
@@ -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.
|
|
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 =
|
|
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
|
-
|
|
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
|
package/src/lib/timetrack.js.map
CHANGED
|
@@ -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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C;IAC/B,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAC;IACxG,CAAC;IAED,IAAI,CAAC,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,100 +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
|
-
- `WRAP` - text in a button, tab, badge, chip or `white-space: nowrap` box runs onto a second line.
|
|
28
|
-
- `ZERO-SIZE` - the part root has no width or no height.
|
|
29
|
-
- `UNKNOWN-THEME` - a `et-color--<name>` class names a colour theme no stylesheet of the frame defines, so it draws in the fallback colour.
|
|
30
|
-
- `RENDER` - the frame refused to draw, or the part did not load.
|
|
31
|
-
|
|
32
|
-
A failed `sketch check` is yours to fix first: a `TYPE-ERROR` or a missing export usually comes from your variant files, so
|
|
33
|
-
correct them and run it again. Draw every variant of the sketch; a variant left as the stub `sketch new` wrote fails
|
|
34
|
-
`STATE-SENTENCE` and `sketch ready` refuses it. Report a tool fault only when the refusal is not caused by your files.
|
|
35
|
-
|
|
36
|
-
A `WARNING` line does not fail the check:
|
|
37
|
-
|
|
38
|
-
- `UNDEFINED-CLASS` - a class carries a prefix the product's part CSS uses (`st-`, not the SDK's
|
|
39
|
-
`et-`), but no stylesheet of the frame defines it. Named once, at the first part that draws it.
|
|
40
|
-
- `GRID-COVERAGE` - some `grid` rows fill every interaction column (`rest`, `hover`, `active`,
|
|
41
|
-
`focus-visible`, `disabled`) and others leave some out, so a state can break there unseen.
|
|
42
|
-
|
|
43
|
-
A part that breaks a rule on purpose names it: `definePart({ checks: { skip: ['CLIPPED'] }, … })`;
|
|
44
|
-
the skip covers the part wherever it is drawn. Without Playwright Chromium the check prints
|
|
45
|
-
`RENDER CHECK SKIPPED` and passes on the other rules.
|
|
46
|
-
|
|
47
|
-
A project's `config.json` entry can name `themes`, `{ "surface": [...], "color": [...] }`; a
|
|
48
|
-
frame asked for a theme gets the `et-surface--<name>` and `et-color--<name>` classes on its root,
|
|
49
|
-
so a drawing must take its colours from the theme tokens and never set a surface or colour class
|
|
50
|
-
on its own root. An inner panel may set `et-surface--<name>`.
|
|
51
|
-
|
|
52
|
-
`et design [checkout]` serves the frames; the checkout defaults to the working directory and
|
|
53
|
-
`DE_PORT` overrules the port. In the ethlete SDK the user reads Studio, started with `yarn studio`,
|
|
54
|
-
which serves the frames itself: do not start `yarn design` next to it. Studio carries its own copy
|
|
55
|
-
of the tool, so a checkout that installs nothing still draws.
|
|
56
|
-
|
|
57
|
-
Three constraints on a drawing file:
|
|
58
|
-
|
|
59
|
-
- **Never import a package barrel.** The libraries resolve to source, so one barrel makes the
|
|
60
|
-
browser request every module and the requests fail with `ERR_INSUFFICIENT_RESOURCES`. Import
|
|
61
|
-
the one file you need.
|
|
62
|
-
- **The fixture is shared, and a variant may not change it.**
|
|
63
|
-
- **One file per variant**, so a broken variant breaks its own frame only.
|
|
64
|
-
|
|
65
|
-
A `<script>` in a drawing never runs. For behavior give the drawing a `setup(root)` function
|
|
66
|
-
(called once after the markup is in `root`, no cleanup, wire one delegated listener). Render each
|
|
67
|
-
state of a prototype with `ngStates({ closed: …, open: … }, { imports })` and swap them with
|
|
68
|
-
`setup: flow.on([{ click: '.trigger', go: 'open' }])`. To draw an open overlay, open it in the
|
|
69
|
-
template (`<et-select [open]="true">`); `ng()` returns the real panel and the frame places it.
|
|
70
|
-
`ngStates` wraps the states in `<div data-de-states style="display: contents">`, so a selector
|
|
71
|
-
rule must not depend on that wrapper.
|
|
72
|
-
|
|
73
|
-
**A repository with a sketch Storybook** draws every variant in the **same** story, side by
|
|
74
|
-
side, under the real geometry the thing ships in. The default Storybook is
|
|
75
|
-
{%storybookUrl%}; an app with its own sketch Storybook names its port in the plan file.
|
|
76
|
-
|
|
77
|
-
Either way:
|
|
78
|
-
|
|
79
|
-
- Sketches take inputs only and stay out of the application's build.
|
|
80
|
-
- Prototype, never refactor. Do not touch the shipped component until the treatment is
|
|
81
|
-
settled.
|
|
82
|
-
- Keep the rejected variants drawn, marked as rejected.
|
|
83
|
-
|
|
84
|
-
### Notes
|
|
85
|
-
|
|
86
|
-
A note explains a state: why it looks this way, what it shows. A comment is feedback that needs
|
|
87
|
-
an answer. Write a note when nothing is asked of the reader.
|
|
88
|
-
|
|
89
|
-
A note is `<product>/notes/<timestamp>-<id>.json`:
|
|
90
|
-
|
|
91
|
-
```json
|
|
92
|
-
{ "part": "button", "state": "disabled", "point": { "x": 24, "y": 8 }, "size": "mobile", "text": "Muted, not hidden." }
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
- `part`, `state` and `text` are required. `point` is optional, in CSS pixels.
|
|
96
|
-
- `size` is required when `point` is set: the preset, the CSS pixel width, or `"fitted"` the note was written at. A
|
|
97
|
-
pointed note shows only at that size; a note without a point shows at every size.
|
|
98
|
-
- A free note on a flow is an entry in the `notes` array of `flows/<name>.json`:
|
|
99
|
-
`{ "id": "…", "text": "…", "at": { "x": 0, "y": -40 } }`. `at` is optional, the note's top-left
|
|
100
|
-
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.
|