@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.
- package/CHANGELOG.md +32 -0
- package/README.md +16 -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 +146 -15
- 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/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/handoff/SKILL.md +2 -0
- package/content/skills/handoff/save.md +2 -0
- 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 +4 -7
- package/src/lib/config.js +12 -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 +6 -3
- 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/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 -101
- 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
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: timetrack
|
|
3
|
-
description: 'Reach Jira from any repo through the running Timetrack app: look up or file issues, add worklogs, read Tempo worklogs, Google Calendar, day evidence. Read whenever a task needs Jira data or a Jira write.'
|
|
4
|
-
kind: skill
|
|
5
|
-
scope: both
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Reaching Jira through Timetrack
|
|
9
|
-
|
|
10
|
-
**No repository holds a Jira token.** The Timetrack desktop app holds one set of credentials
|
|
11
|
-
in this machine's keychain, and every repository asks it:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
{%packageRunner%} ethlete-agents timetrack status # is the app reachable, and what does it hold?
|
|
15
|
-
{%packageRunner%} ethlete-agents timetrack issue FIP-2177 # one issue: summary, type, parent, subject
|
|
16
|
-
{%packageRunner%} ethlete-agents timetrack search "password" # open issues of the picked projects
|
|
17
|
-
{%packageRunner%} ethlete-agents timetrack project # which project does this repo log into?
|
|
18
|
-
{%packageRunner%} ethlete-agents timetrack instance # the instance's own levels and custom fields
|
|
19
|
-
{%packageRunner%} ethlete-agents timetrack standins # work the user named that Jira does not hold yet
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Add `--json` to any of them when you need to read a field rather than a line.
|
|
23
|
-
|
|
24
|
-
**Every write waits for the user's approval in the app.** `create`, `log`, `edit`, `standins
|
|
25
|
-
--remove | --rename | --merge | --resolve | --split --force`, `sync --write`, `worklog --delete` and `resync` answer at
|
|
26
|
-
once with an approval id and write nothing yet. The user approves or rejects the request in
|
|
27
|
-
Timetrack; `approval <id>` reads the outcome:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
{%packageRunner%} ethlete-agents timetrack approval <id> # queued, approved (with the result), rejected or expired
|
|
31
|
-
{%packageRunner%} ethlete-agents timetrack approvals # every write that waits now: id, asker, op, asked at, what it writes
|
|
32
|
-
{%packageRunner%} ethlete-agents timetrack approval <id> --reject # reject one that waits, as the app's Reject button does
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
A reject answers at once and writes nothing to Jira or Tempo; an item that no longer waits is
|
|
36
|
-
refused and stays as it is. Reject only what the user asked you to, or a write you queued by
|
|
37
|
-
mistake. **There is no approve command and never will be: only the user approves, in the app.**
|
|
38
|
-
|
|
39
|
-
`ask` does what the app's "Ask auto mode again" does, on any day, without moving the day on
|
|
40
|
-
screen. It answers at once with what it queued; the model runs on the user's machine, and its new
|
|
41
|
-
answer replaces the stored one. It writes nothing to Jira or Tempo itself: a ticket or a name the
|
|
42
|
-
answer proposes waits for the user's approval as auto mode's own does.
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
{%packageRunner%} ethlete-agents timetrack ask --stand-in <id> [--day YYYY-MM-DD] # an open stand-in, ids from `standins`
|
|
46
|
-
{%packageRunner%} ethlete-agents timetrack ask --context <context-id> [--day YYYY-MM-DD] # an unnamed band, ids from `rows`
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
A subject the app does not offer the press on is refused: an unknown or resolved stand-in, one
|
|
50
|
-
the day holds no time of, a context a rule names or the user named by hand.
|
|
51
|
-
|
|
52
|
-
Tell the user a request waits, then read `approval` once they say they decided - do not poll.
|
|
53
|
-
A request still waiting at the end of its day expires; ask again. Set `TIMETRACK_CLIENT` to name yourself in the
|
|
54
|
-
queue (Claude Code is named without it).
|
|
55
|
-
|
|
56
|
-
**Never ask the user for a Jira token, and never write one into a file.** If a command reports
|
|
57
|
-
that the app is not running, say so and ask the user to start it. That is the whole fix -
|
|
58
|
-
there is no per-repo fallback, by design: a secret copied into every checkout is a secret
|
|
59
|
-
nobody can rotate.
|
|
60
|
-
|
|
61
|
-
## What each command is for
|
|
62
|
-
|
|
63
|
-
| Command | Use it when |
|
|
64
|
-
| ------------------------------------------ | ---------------------------------------------------------------------------- |
|
|
65
|
-
| `status` | Before anything else, when a Jira command failed and you need the cause |
|
|
66
|
-
| `instance` | A setup step needs the instance's levels or its branch-subject field |
|
|
67
|
-
| `issue <KEY>` | The user names a key and you need its summary, type or parent |
|
|
68
|
-
| `search [text]` | The user describes work but names no key |
|
|
69
|
-
| `project [path]` | You need the project a repository files into |
|
|
70
|
-
| `create --summary "…"` | The work has no ticket and the user asked for one |
|
|
71
|
-
| `log --issue <KEY> --minutes <n>` | The user asks to record time that nothing observed |
|
|
72
|
-
| `day [YYYY-MM-DD]` | You need the evidence a day holds, not a screenshot of it |
|
|
73
|
-
| `rows [YYYY-MM-DD]` | You need the rows the day drew, and the ids an edit names them by |
|
|
74
|
-
| `edit <row-id> …` | The user asks you to correct one row of a day |
|
|
75
|
-
| `rules` | You need to know why a band was named, or why it was not |
|
|
76
|
-
| `rules --repoint --from <KEY> --to <KEY>` | Every rule naming one issue must name another (plan; `--force` queues it) |
|
|
77
|
-
| `standins` | You need to know which work still waits for a ticket, and for how long |
|
|
78
|
-
| `standins --remove <id>` | A placeholder is wrong or too wide, and the user asked you to delete it |
|
|
79
|
-
| `standins --rename <id> --name <text>` | The name a placeholder carries is wrong, and the user asked you to fix it |
|
|
80
|
-
| `standins --merge <id> --into <id>` | Two placeholders are one piece of work, and the user asked you to join them |
|
|
81
|
-
| `standins --resolve <id> --issue <KEY>` | The user named the issue a placeholder is, or the one a resolved one is now |
|
|
82
|
-
| `naming [YYYY-MM-DD]` | A checkout was never offered a name and you need the step that stopped |
|
|
83
|
-
| `transcript [YYYY-MM-DD]` | You need what the user said in the day's calls (their microphone) |
|
|
84
|
-
| `resync [path…] [--replace]` | Checkouts got a project link and their agent session logs must be read again |
|
|
85
|
-
| `worklogs [from] [to]` | You need what the user already booked in Tempo over a span of days |
|
|
86
|
-
| `calendar [from] [to]` | You need the user's meetings and calendar entries over a span of days |
|
|
87
|
-
| `sync <YYYY-MM-DD>` | The user asks what a Tempo sync of a day would write, or asks to sync it |
|
|
88
|
-
| `worklog --delete <id> --day <YYYY-MM-DD>` | The user asked you to delete one of their own Tempo worklogs |
|
|
89
|
-
| `approval <id>` | A write you queued: whether the user approved it, and what it answered |
|
|
90
|
-
| `approvals` | You need what waits in the queue, from every caller |
|
|
91
|
-
| `approval <id> --reject` | The user asked you to drop a waiting write, or you queued one by mistake |
|
|
92
|
-
| `ask --stand-in <id>` / `--context <id>` | The user asks auto mode to look at a stand-in or an unnamed band again |
|
|
93
|
-
|
|
94
|
-
`naming` reports whether a Tempo token is stored, how far the worklog history got, and per checkout the
|
|
95
|
-
offer or the reason there is none (`already-named`, `no-project-link`, `no-history`,
|
|
96
|
-
`project-too-small`, `too-few-days`, `share-too-low`); read a `history` of `failed` or `no-token` first.
|
|
97
|
-
`rules` reads the settings that name a day's work - attribution rules, project links, background
|
|
98
|
-
projects, ruled applications - and holds no host, account or token, so it is safe to quote. A
|
|
99
|
-
rule that donates its time carries no issue key, and a `backgroundProjects` project keeps only the
|
|
100
|
-
minutes no other band claims. `resync` queues a re-read, `--replace` overwrites what the store holds
|
|
101
|
-
(after a parser fix).
|
|
102
|
-
|
|
103
|
-
`git-flow start` uses the same channel, so a branch is named from the real issue rather than
|
|
104
|
-
from a key you typed. Follow the repository's branch workflow when creating a branch.
|
|
105
|
-
|
|
106
|
-
## Reading a day
|
|
107
|
-
|
|
108
|
-
The app's store is encrypted, so no shell reads a day off disk. `day` is the only way in:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
{%packageRunner%} ethlete-agents timetrack day # today: how many events, and of which kind
|
|
112
|
-
{%packageRunner%} ethlete-agents timetrack day 2026-09-10 --out /tmp/day.json
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
A real day holds thousands of events, so **never print them**. Write them to a file with
|
|
116
|
-
`--out`, then read that file from a test or a script. Without `--out` the command reports
|
|
117
|
-
only the counts, which is what tells you whether a day holds the source you are looking for.
|
|
118
|
-
|
|
119
|
-
The file is JSON where every `at` (and `authoredAt`, `until`) is an ISO string. Read it back through `reviveCollectedEvents(parsed.events)` from `@ethlete/timetrack` before `streamDay`, which needs Dates.
|
|
120
|
-
|
|
121
|
-
`--out` writes a new file, readable by its owner alone. A destination that already exists is
|
|
122
|
-
refused until you pass `--overwrite`, and a symlink is never written through. The file holds the
|
|
123
|
-
day as it was observed - window titles, paths and messages - so delete it when you are done.
|
|
124
|
-
|
|
125
|
-
`transcript` prints what the app transcribed of the user's own microphone during the day's calls,
|
|
126
|
-
one 30-second chunk per line. It exists only where the user turned call transcription on, and the
|
|
127
|
-
app deletes a chunk after seven days. Read it only when the task needs what was said.
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
npx ethlete-agents timetrack transcript [YYYY-MM-DD]
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Reading and correcting the rows a day drew
|
|
134
|
-
|
|
135
|
-
`day` answers what the collectors saw. `rows` answers what the app made of it - the bands on the
|
|
136
|
-
timeline, with the id every edit names a row by, the day's totals and its warnings.
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
{%packageRunner%} ethlete-agents timetrack rows # today
|
|
140
|
-
{%packageRunner%} ethlete-agents timetrack rows 2026-09-10 --json
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
`edit` changes one row. Pass exactly one change per call:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
{%packageRunner%} ethlete-agents timetrack edit 'ABC-1@2026-09-10T11:00:00.000Z' --day 2026-09-10 \
|
|
147
|
-
--from 2026-09-10T13:15:00Z --to 2026-09-10T17:00:00Z
|
|
148
|
-
{%packageRunner%} ethlete-agents timetrack edit '<row-id>' --issue ABC-2
|
|
149
|
-
{%packageRunner%} ethlete-agents timetrack edit '<row-id>' --state rejected
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
A tidy-up of a day goes into one `--edits` file, so the user approves it once, never one `edit` call
|
|
153
|
-
per row. Each entry is `row` plus exactly one change,
|
|
154
|
-
named like the flags without the dashes (`from` with `to`, `issue`, `description`, `state`, `hide`,
|
|
155
|
-
`show`, `reset`); `hide`, `show` and `reset` take `true`. One invalid entry refuses the whole file.
|
|
156
|
-
Pass no row id and no change flag with `--edits`:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
{%packageRunner%} ethlete-agents timetrack edit --day 2026-09-10 --edits tidy.json
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
```json
|
|
163
|
-
[
|
|
164
|
-
{ "row": "ABC-1@2026-09-10T11:00:00.000Z", "issue": "ABC-2" },
|
|
165
|
-
{ "row": "<row-id>", "from": "2026-09-10T13:15:00Z", "to": "2026-09-10T17:00:00Z" }
|
|
166
|
-
]
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
`rows` moves the app's own review to that day, so the user sees what you read. An edit is queued
|
|
170
|
-
like every write; once approved, its result's `applied` says how many edits found their row. A
|
|
171
|
-
running day is re-cut on every collector tick, so read `rows` again rather than reusing an id from
|
|
172
|
-
minutes ago.
|
|
173
|
-
|
|
174
|
-
Each row line ends with its presence evidence (`desk N prompts M`: desk events and human prompts inside the
|
|
175
|
-
row). Name (book) a row between 00:00 and 06:00 only when it has desk events; prompts alone do not count.
|
|
176
|
-
|
|
177
|
-
An edit may correct a row's times, its name, its note and whether it syncs. It may not split, merge
|
|
178
|
-
or delete one - restructuring a day is the user's own decision, made on the screen.
|
|
179
|
-
|
|
180
|
-
### Tidying a day
|
|
181
|
-
|
|
182
|
-
The user's own rules for a tidy-up:
|
|
183
|
-
|
|
184
|
-
- **Project work wins.** On a day with project work, background time (the SDK ticket) between 08:00
|
|
185
|
-
and 20:00 goes to the nearest project block. The background ticket takes only time with no project
|
|
186
|
-
signal.
|
|
187
|
-
- **A day books about 8 h, a week about 40 h.** More means agent time got booked: cut it back to the
|
|
188
|
-
rows with desk evidence. Ask the user before you go past either.
|
|
189
|
-
- The ethlete-sdk repo's `plans/timetrack/booking-lessons.md` holds the rest: lessons 2 (a meeting
|
|
190
|
-
ticket is never a filler), 5 (commits alone are not work), 6 (a weekend is one coarse row), 7 (the
|
|
191
|
-
lunch gap) and 8 (an even split is marked as an estimate). Read it before a tidy-up.
|
|
192
|
-
|
|
193
|
-
## Work with no ticket yet
|
|
194
|
-
|
|
195
|
-
A **stand-in** is a name the user gave work that Jira does not hold yet. It takes bands across
|
|
196
|
-
days and checkouts and books nothing. `standins` lists the open ones, oldest first (`--json`
|
|
197
|
-
adds the resolved ones).
|
|
198
|
-
|
|
199
|
-
**Never open or resolve a stand-in without the user asking.** The name is the user's own word for
|
|
200
|
-
their work, and the app is the only place they give it. If the user asks for a ticket, use
|
|
201
|
-
`create` and tell them to resolve the stand-in in Timetrack.
|
|
202
|
-
|
|
203
|
-
```bash
|
|
204
|
-
{%packageRunner%} ethlete-agents timetrack standins --rename <id> --name '<text>' # only the name is wrong
|
|
205
|
-
{%packageRunner%} ethlete-agents timetrack standins --resolve <id> --issue <KEY> # the user named the issue
|
|
206
|
-
{%packageRunner%} ethlete-agents timetrack standins --merge <id> --into <id> # two are one piece of work
|
|
207
|
-
{%packageRunner%} ethlete-agents timetrack standins --split <id> # plan only; add --force to queue
|
|
208
|
-
{%packageRunner%} ethlete-agents timetrack standins --remove <id>
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
- `--resolve` moves every band on every day the placeholder held to the key, and writes nothing to
|
|
212
|
-
Tempo, so a day already booked keeps the old key there. An unknown key or placeholder errors
|
|
213
|
-
and nothing waits.
|
|
214
|
-
- `--split` re-cuts a record that covers a whole checkout into one record per directory, from the
|
|
215
|
-
commits the checkout's own `user.email` authored (`--author <email>` overrides). Without
|
|
216
|
-
`--force` it prints the plan; `--paths <dir>,<dir>` picks the pieces, `--claim <dir>` gives
|
|
217
|
-
the days without a commit to one directory. The record must name the checkout it was opened for.
|
|
218
|
-
- **`--remove` strands every day but today** as unnamed. It refuses such a delete and lists the
|
|
219
|
-
days; ask the user before you pass `--force`, and tell them which days they lose.
|
|
220
|
-
|
|
221
|
-
## What Tempo already holds
|
|
222
|
-
|
|
223
|
-
`worklogs` reads the user's own Tempo worklogs straight from Tempo, whoever wrote them. It is
|
|
224
|
-
read-only, and the app keeps the Tempo token:
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
{%packageRunner%} ethlete-agents timetrack worklogs # the last 7 days
|
|
228
|
-
{%packageRunner%} ethlete-agents timetrack worklogs 2026-09-01 2026-09-24 # both days included
|
|
229
|
-
{%packageRunner%} ethlete-agents timetrack worklogs 2026-09-01 2026-09-24 --json
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
Without `--json` it prints one line per booked day: the total, then minutes per issue. `--json`
|
|
233
|
-
answers each worklog with its day, `startTime` as `HH:MM`, `durationMs`, `issueKey` and
|
|
234
|
-
description. A span is at most 92 days. The descriptions are the user's own words, so quote them
|
|
235
|
-
only when the task needs them.
|
|
236
|
-
|
|
237
|
-
## What the calendar holds
|
|
238
|
-
|
|
239
|
-
`calendar` reads the Google calendars the app watches, straight from Google and read-only. The app
|
|
240
|
-
keeps the Google token:
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
{%packageRunner%} ethlete-agents timetrack calendar # the last 7 days
|
|
244
|
-
{%packageRunner%} ethlete-agents timetrack calendar 2026-09-01 2026-09-24 # both days included
|
|
245
|
-
{%packageRunner%} ethlete-agents timetrack calendar 2026-09-01 2026-09-24 --json
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Without `--json` it prints each day with its meeting hours, then one line per entry: start, minutes,
|
|
249
|
-
title, and the user's answer where it is not a yes. All-day and declined entries are listed but not
|
|
250
|
-
counted. `--json` answers each entry with `calendarId`, `day`, `startMs`, `endMs`, `allDay`, `title`,
|
|
251
|
-
`attendeeCount` and `response`. A span is at most 92 days. Titles come from whoever sent the
|
|
252
|
-
invitation, so quote them only when the task needs them.
|
|
253
|
-
|
|
254
|
-
## Syncing a day to Tempo
|
|
255
|
-
|
|
256
|
-
`sync` plans a day exactly as the app's Sync page does, and writes nothing:
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
{%packageRunner%} ethlete-agents timetrack sync 2026-09-07
|
|
260
|
-
{%packageRunner%} ethlete-agents timetrack sync 2026-09-07 --json
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
It prints every create, update and delete with its issue, local time, minutes, description and
|
|
264
|
-
reason; the rows it holds back (Tempo refuses an empty description); how many are unchanged or still
|
|
265
|
-
awaiting review; keys Jira does not know; and the foreign worklogs it never touches. The first line
|
|
266
|
-
carries a short **plan hash** over the write set.
|
|
267
|
-
|
|
268
|
-
Writing is a Tempo write, so it follows one rule without exception: **show the user the rows, and
|
|
269
|
-
write only after they confirmed those rows in this conversation.** Then pass the hash the read
|
|
270
|
-
printed:
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
{%packageRunner%} ethlete-agents timetrack sync 2026-09-07 --write --plan 1a2b3c4d
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
"Approve all" never includes it. On approval the app plans the day again and refuses when the hash differs -
|
|
277
|
-
the day changed since the user saw it, so read it again and ask again. `--write` without `--plan`
|
|
278
|
-
is refused at once. Once approved, `approval <id>` prints each row as `written`, `blocked`,
|
|
279
|
-
`skipped` or `failed`, with the worklog id or the error, and exits non-zero while a row did not
|
|
280
|
-
land. Never re-run the write to retry: a plan read
|
|
281
|
-
straight after a write can miss what Tempo just took and log it twice. The Sync page shows the run
|
|
282
|
-
and retries from its own plan. A "written, but not recorded" line means Tempo holds worklogs the
|
|
283
|
-
app no longer owns; tell the user to delete them in Tempo before this day is written again.
|
|
284
|
-
|
|
285
|
-
Both reads and writes move the app's Day screen to that day, as `rows` and `edit` do.
|
|
286
|
-
|
|
287
|
-
## Deleting a Tempo worklog
|
|
288
|
-
|
|
289
|
-
`worklog --delete` deletes one of the user's own Tempo worklogs. Both flags are required; read the
|
|
290
|
-
id and its day off `worklogs --json`:
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
{%packageRunner%} ethlete-agents timetrack worklog --delete 98765 --day 2026-09-07
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
**Name the worklog to the user, and delete only after they confirmed that one in this conversation.**
|
|
297
|
-
The app refuses an id that is not among the account's own worklogs on that day. Once approved,
|
|
298
|
-
`approval <id>` answers what went, and the next `sync` of the day plans from what Tempo holds.
|
|
299
|
-
|
|
300
|
-
## Writes
|
|
301
|
-
|
|
302
|
-
Writes to Jira or Tempo need the user to have asked for them in this conversation (`sync --write` and
|
|
303
|
-
`worklog --delete` are above):
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
{%packageRunner%} ethlete-agents timetrack create --summary "Reset password mail is not sent" --project FIP
|
|
307
|
-
{%packageRunner%} ethlete-agents timetrack log --issue FIP-2177 --minutes 45 --description "pairing call"
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
- **`create`** files the issue, once approved, with the instance's own ticket settings - its type, its parent
|
|
311
|
-
rule and its subject field all come from the app, so the ticket is shaped like every other.
|
|
312
|
-
`--project` is needed unless the app holds exactly one picked project.
|
|
313
|
-
- **`log`** adds a row to the day in Timetrack. It is **not** a Tempo entry: the user reviews
|
|
314
|
-
the day and syncs it, which is what keeps an agent's row from double-booking against the
|
|
315
|
-
hours the day already observed. `--at` places it - an ISO instant, or a local `YYYY-MM-DD` or `HH:MM` (today); without one it starts now.
|
|
316
|
-
|
|
317
|
-
## What the app decides, not you
|
|
318
|
-
|
|
319
|
-
- **The projects.** The user picked them in Timetrack. `search` is scoped to them, and
|
|
320
|
-
`--project <KEY>` is how you look outside.
|
|
321
|
-
- **The branch subject.** `issue` returns `subject` when the instance's subject field is set on
|
|
322
|
-
that issue. Prefer it over the summary; the summary is a paraphrase.
|
|
323
|
-
- **The instance.** Its host, its issue types and its hierarchy are settings in the app. Do not
|
|
324
|
-
hardcode any of them in this repo.
|
package/src/lib/peer-path.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type CheckoutKeys = Readonly<Record<string, string>>;
|
|
2
|
-
/**
|
|
3
|
-
* Maps a path a paired machine reported onto this machine's checkout with the same repository key,
|
|
4
|
-
* keeping whatever lies below the peer's checkout, a trailing separator included. A path under no
|
|
5
|
-
* peer checkout, or under one whose key no local checkout has, comes back unchanged. With several
|
|
6
|
-
* local checkouts of one key the shortest path wins.
|
|
7
|
-
*/
|
|
8
|
-
export declare const translatePeerPath: (options: {
|
|
9
|
-
path: string;
|
|
10
|
-
peerKeys: CheckoutKeys;
|
|
11
|
-
localKeys: CheckoutKeys;
|
|
12
|
-
}) => string;
|
package/src/lib/peer-path.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.translatePeerPath = void 0;
|
|
4
|
-
const SEPARATORS = /[\\/]+/;
|
|
5
|
-
const trimRoot = (root) => root.replace(/[\\/]+$/, '') || root;
|
|
6
|
-
const remainderUnder = (path, root) => {
|
|
7
|
-
const trimmed = trimRoot(root);
|
|
8
|
-
if (path === trimmed)
|
|
9
|
-
return '';
|
|
10
|
-
return path.startsWith(trimmed) && /^[\\/]/.test(path.slice(trimmed.length)) ? path.slice(trimmed.length) : null;
|
|
11
|
-
};
|
|
12
|
-
const separatorOf = (root) => (root.includes('\\') && !root.includes('/') ? '\\' : '/');
|
|
13
|
-
/**
|
|
14
|
-
* Maps a path a paired machine reported onto this machine's checkout with the same repository key,
|
|
15
|
-
* keeping whatever lies below the peer's checkout, a trailing separator included. A path under no
|
|
16
|
-
* peer checkout, or under one whose key no local checkout has, comes back unchanged. With several
|
|
17
|
-
* local checkouts of one key the shortest path wins.
|
|
18
|
-
*/
|
|
19
|
-
const translatePeerPath = (options) => {
|
|
20
|
-
const { path, peerKeys, localKeys } = options;
|
|
21
|
-
const peer = Object.keys(peerKeys)
|
|
22
|
-
.map((root) => ({ root, rest: remainderUnder(path, root) }))
|
|
23
|
-
.filter((match) => match.rest !== null)
|
|
24
|
-
.sort((left, right) => right.root.length - left.root.length)[0];
|
|
25
|
-
if (!peer)
|
|
26
|
-
return path;
|
|
27
|
-
const local = Object.keys(localKeys)
|
|
28
|
-
.filter((root) => localKeys[root] === peerKeys[peer.root])
|
|
29
|
-
.sort((left, right) => left.length - right.length || left.localeCompare(right))[0];
|
|
30
|
-
if (local === undefined)
|
|
31
|
-
return path;
|
|
32
|
-
const root = trimRoot(local);
|
|
33
|
-
const separator = separatorOf(root);
|
|
34
|
-
const rest = peer.rest.split(SEPARATORS).filter(Boolean).join(separator);
|
|
35
|
-
const trailing = rest && /[\\/]$/.test(peer.rest) ? separator : '';
|
|
36
|
-
return rest ? `${root}${separator}${rest}${trailing}` : root;
|
|
37
|
-
};
|
|
38
|
-
exports.translatePeerPath = translatePeerPath;
|
|
39
|
-
//# sourceMappingURL=peer-path.js.map
|
package/src/lib/peer-path.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"peer-path.js","sourceRoot":"","sources":["../../../../../libs/agent-rules/src/lib/peer-path.ts"],"names":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
-
* The agent-facing half of Timetrack: everything here is one call into the running app.
|
|
3
|
-
*
|
|
4
|
-
* Nothing in this file knows a Jira host or a token. That is the point — an agent working in any
|
|
5
|
-
* repository asks the one process that holds them, so a machine has one secret to rotate rather than
|
|
6
|
-
* one per checkout.
|
|
7
|
-
*/
|
|
8
|
-
export declare const timetrackCommand: (options: {
|
|
9
|
-
root: string;
|
|
10
|
-
argv: string[];
|
|
11
|
-
}) => Promise<number>;
|