jackherd 1.12.6 → 1.12.7

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  What changed for people who use jackherd, newest first.
4
4
 
5
+ ## 1.12.7
6
+
7
+ - **Newest first in the herd.** The rows of Your turn that wait on your answer (the board's open questions, a session's questions, the files and Artifacts sent to you) stand newest first; what frees a lane still comes before the rest, newest first within it. A since without a year counts in the year nearest to now, so a row of 31 December stands under one of 1 January. With more than five rows, the oldest are the ones under `▸ n more`. An opened source lists its entries newest first by the time each shows: before, an entry with its own time from the source (say, when an error was last seen) could stand among entries in the order the watcher saw them change. Rows of the same time keep their order. Appointments keep their order, the ones without a time first, then the next due.
8
+
5
9
  ## 1.12.6
6
10
 
7
11
  - **The coordinator has a line in the herd.** While every lane rests and the coordinator works (a diagnosis, a review, a release), the herd no longer looks like a standstill: a line over the lanes, under "Your turn" and "Sources", set like the head of a block of one line, reads `● Jack · working · <task> · since 12:54`: the coordinator's state, the task it reported with `jh task start` from the main checkout and since when, its context fill at the right edge; at rest `○ Jack · idle`, without the last task. The name stands in the column of the block names. While the coordinator works, its task shimmers like the running task of a folded lane (and stands still in teal with `plans.shimmer: false`). A long task is cut with `…`, the time and the fill stay. The line is no lane and stays when "Lanes" is folded. That task no longer shows as a separate `now:` line. A lane's own herd shows no coordinator line. The orchestrate skill tells the coordinator to report each step of its own that way, and `jh task done` at its end.
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <p>
2
- <img alt="jackherd: a black and white Shih Tzu in a turquoise bandana, three lanes running from him to three agent nodes" src="https://unpkg.com/jackherd@1.12.6/assets/branding/jackherd-logo-outline.svg" width="340">
2
+ <img alt="jackherd: a black and white Shih Tzu in a turquoise bandana, three lanes running from him to three agent nodes" src="https://unpkg.com/jackherd@1.12.7/assets/branding/jackherd-logo-outline.svg" width="340">
3
3
  <br>
4
4
  </p>
5
5
 
6
- [![npm](https://img.shields.io/npm/v/jackherd)](https://www.npmjs.com/package/jackherd) [![license: MIT](https://img.shields.io/npm/l/jackherd)](https://www.npmjs.com/package/jackherd) [![2 dependencies](https://img.shields.io/badge/dependencies-2-brightgreen)](https://www.npmjs.com/package/jackherd?activeTab=dependencies)<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.6/assets/icons/space.svg">
6
+ [![npm](https://img.shields.io/npm/v/jackherd)](https://www.npmjs.com/package/jackherd) [![license: MIT](https://img.shields.io/npm/l/jackherd)](https://www.npmjs.com/package/jackherd) [![2 dependencies](https://img.shields.io/badge/dependencies-2-brightgreen)](https://www.npmjs.com/package/jackherd?activeTab=dependencies)<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.7/assets/icons/space.svg">
7
7
 
8
8
  # Jack herds your coding agents.
9
9
 
@@ -15,25 +15,25 @@ For developers who'd rather decide than supervise.
15
15
  curl -fsSL https://unpkg.com/jackherd/install.sh | sh
16
16
  ```
17
17
 
18
- Then `/jh-start` in a repository, and Jack offers your first plan. → [Quickstart](#quickstart)<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.6/assets/icons/space.svg">
18
+ Then `/jh-start` in a repository, and Jack offers your first plan. → [Quickstart](#quickstart)<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.7/assets/icons/space.svg">
19
19
 
20
20
  <p>
21
- <img src="https://unpkg.com/jackherd@1.12.6/docs/workflow-dark.svg" width="720" alt="jackherd in herdr: a lane hits a question, Jack asks you as a choice, you pick, and the lane works on while the herd view counts its progress.">
21
+ <img src="https://unpkg.com/jackherd@1.12.7/docs/workflow-dark.svg" width="720" alt="jackherd in herdr: a lane hits a question, Jack asks you as a choice, you pick, and the lane works on while the herd view counts its progress.">
22
22
  <br>
23
- <sub>Jack and his lanes in <a href="https://herdr.dev/">herdr</a>, a terminal for coding agents (recommended). Without it, one Claude Code session builds with subagents.</sub><br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.6/assets/icons/space.svg">
23
+ <sub>Jack and his lanes in <a href="https://herdr.dev/">herdr</a>, a terminal for coding agents (recommended). Without it, one Claude Code session builds with subagents.</sub><br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.7/assets/icons/space.svg">
24
24
  </p>
25
25
 
26
- <p><img src="https://unpkg.com/jackherd@1.12.6/assets/icons/lanes.svg" width="24" height="34" align="middle" alt=""> <b>Parallel where it pays.</b><br>Phases that don't collide run side by side, each lane on its own branch and worktree. Jack keeps the merge order and has the others rebase.</p>
26
+ <p><img src="https://unpkg.com/jackherd@1.12.7/assets/icons/lanes.svg" width="24" height="34" align="middle" alt=""> <b>Parallel where it pays.</b><br>Phases that don't collide run side by side, each lane on its own branch and worktree. Jack keeps the merge order and has the others rebase.</p>
27
27
 
28
- <p><img src="https://unpkg.com/jackherd@1.12.6/assets/icons/bark.svg" width="24" height="34" align="middle" alt=""> <b>Jack barks.</b><br>A blocked lane, a red check, a review comment: Jack wakes, and the herd view shows where every lane stands.</p>
28
+ <p><img src="https://unpkg.com/jackherd@1.12.7/assets/icons/bark.svg" width="24" height="34" align="middle" alt=""> <b>Jack barks.</b><br>A blocked lane, a red check, a review comment: Jack wakes, and the herd view shows where every lane stands.</p>
29
29
 
30
- <p><img src="https://unpkg.com/jackherd@1.12.6/assets/icons/ear.svg" width="24" height="34" align="middle" alt=""> <b>Jack listens.</b><br>Review comments go to the lane that fixes them, with a test. <code>/jh-follow</code> brings anything with a CLI or an API into the herd: tickets, error logs, status pages, deploys, and whatever else you point it at.</p>
30
+ <p><img src="https://unpkg.com/jackherd@1.12.7/assets/icons/ear.svg" width="24" height="34" align="middle" alt=""> <b>Jack listens.</b><br>Review comments go to the lane that fixes them, with a test. <code>/jh-follow</code> brings anything with a CLI or an API into the herd: tickets, error logs, status pages, deploys, and whatever else you point it at.</p>
31
31
 
32
- <p><img src="https://unpkg.com/jackherd@1.12.6/assets/icons/bowl.svg" width="24" height="34" align="middle" alt=""> <b>Picks up where you left off.</b><br>Plan and board hold the state, not the chat.</p>
32
+ <p><img src="https://unpkg.com/jackherd@1.12.7/assets/icons/bowl.svg" width="24" height="34" align="middle" alt=""> <b>Picks up where you left off.</b><br>Plan and board hold the state, not the chat.</p>
33
33
 
34
- <p><img src="https://unpkg.com/jackherd@1.12.6/assets/icons/plan.svg" width="24" height="34" align="middle" alt=""> <b>Lives in your repository.</b><br>Plans, board and every decision are Markdown, reviewed like code. <code>jh init</code> gives your team the same setup.</p>
34
+ <p><img src="https://unpkg.com/jackherd@1.12.7/assets/icons/plan.svg" width="24" height="34" align="middle" alt=""> <b>Lives in your repository.</b><br>Plans, board and every decision are Markdown, reviewed like code. <code>jh init</code> gives your team the same setup.</p>
35
35
 
36
- <p><img src="https://unpkg.com/jackherd@1.12.6/assets/icons/decide.svg" width="24" height="34" align="middle" alt=""> <b>You make the calls.</b><br>Nothing is committed, pushed or merged without your approval. Jack merges on green checks only where you said so: one pull request, or a plan's for up to 24 hours.<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.6/assets/icons/space.svg"></p>
36
+ <p><img src="https://unpkg.com/jackherd@1.12.7/assets/icons/decide.svg" width="24" height="34" align="middle" alt=""> <b>You make the calls.</b><br>Nothing is committed, pushed or merged without your approval. Jack merges on green checks only where you said so: one pull request, or a plan's for up to 24 hours.<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.7/assets/icons/space.svg"></p>
37
37
 
38
38
  ## Quickstart
39
39
 
@@ -69,22 +69,22 @@ Then `/jh-start` in a repository, and Jack offers your first plan. → [Quicksta
69
69
  /jh-orchestrate docs/plans/board-<name>/board.md
70
70
  ```
71
71
 
72
- By hand (Bun 1.3+): `bun add -g jackherd` or `npm install -g jackherd`, then `jh init --global` for yourself, or `jh init` in a repository to give your team the same skills and guard hooks. → [INSTALL.md](https://unpkg.com/jackherd/INSTALL.md)<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.6/assets/icons/space.svg">
72
+ By hand (Bun 1.3+): `bun add -g jackherd` or `npm install -g jackherd`, then `jh init --global` for yourself, or `jh init` in a repository to give your team the same skills and guard hooks. → [INSTALL.md](https://unpkg.com/jackherd/INSTALL.md)<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.7/assets/icons/space.svg">
73
73
 
74
74
  ## Follow anything outside GitHub
75
75
 
76
76
  Whatever you check by hand, Jack can watch: tickets, error logs, status pages, deploys. One `/jh-follow`, one yes, and every change comes to you like this:
77
77
 
78
- <img src="https://unpkg.com/jackherd@1.12.6/docs/follow-dark.svg" width="720" alt="A source (ticket, error log or status page) has a new or changed entry; jh watch reports it to Jack; Jack puts a row into Your turn, prefixed with the source's label; its [ask] button makes Jack ask you, and then a lane works it.">
78
+ <img src="https://unpkg.com/jackherd@1.12.7/docs/follow-dark.svg" width="720" alt="A source (ticket, error log or status page) has a new or changed entry; jh watch reports it to Jack; Jack puts a row into Your turn, prefixed with the source's label; its [ask] button makes Jack ask you, and then a lane works it.">
79
79
 
80
- The herd sums up your sources in one `Sources` line: per source its new entries, or when it last ran, red while it fails; opened, a click on an entry opens it. A ticket shows on the lane that works it, and a row in Your turn that came from a source starts with that source's label.<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.6/assets/icons/space.svg">
80
+ The herd sums up your sources in one `Sources` line: per source its new entries, or when it last ran, red while it fails; opened, a click on an entry opens it. A ticket shows on the lane that works it, and a row in Your turn that came from a source starts with that source's label.<br><img width="1" height="8" alt="" src="https://unpkg.com/jackherd@1.12.7/assets/icons/space.svg">
81
81
 
82
82
  ## In detail
83
83
 
84
84
  <details>
85
85
  <summary><b>What Jack does on his own, and what waits for you</b></summary>
86
86
 
87
- <img src="https://unpkg.com/jackherd@1.12.6/docs/lanes-dark.svg" alt="Jack prompts two lanes and asks you for decisions and approvals; the lanes send questions back as text; jh watch reads lane state, pull requests and checks and wakes Jack.">
87
+ <img src="https://unpkg.com/jackherd@1.12.7/docs/lanes-dark.svg" alt="Jack prompts two lanes and asks you for decisions and approvals; the lanes send questions back as text; jh watch reads lane state, pull requests and checks and wakes Jack.">
88
88
 
89
89
  | On his own | After your approval | Never |
90
90
  | --- | --- | --- |
@@ -117,7 +117,7 @@ The guards catch mistakes, not intent; for that, use branch protection. The hook
117
117
 
118
118
  A **plan** is Markdown with phases, checkbox tasks, a model and a review gate per phase. A **board** lists the lanes of one or more plans: which phases each lane builds, on which model, after what. A **lane** is one agent session in its own git worktree (a second checkout of your repository), and **Jack** is the session in the main checkout that runs `/jh-orchestrate` on a board.
119
119
 
120
- <img src="https://unpkg.com/jackherd@1.12.6/docs/skills-dark.svg" alt="/jh-grill hands decisions to /jh-plan; /jh-plan feeds /jh-orchestrate or a single /jh-implement; /jh-implement ends in /jh-pre-commit, which runs the reviewers; /jh-diagnose hands a red command to /jh-implement.">
120
+ <img src="https://unpkg.com/jackherd@1.12.7/docs/skills-dark.svg" alt="/jh-grill hands decisions to /jh-plan; /jh-plan feeds /jh-orchestrate or a single /jh-implement; /jh-implement ends in /jh-pre-commit, which runs the reviewers; /jh-diagnose hands a red command to /jh-implement.">
121
121
 
122
122
  | Skill | Does |
123
123
  | --- | --- |
@@ -177,8 +177,8 @@ It has five blocks, top down. **Your turn** holds everything that waits on you,
177
177
 
178
178
  How the herd reads the board:
179
179
 
180
- - **Your turn** takes its rows from the board's open questions, the questions a session left in its dialog, the files and Artifacts sent to you, the board's appointments and its next section. What blocks a lane comes first, then the oldest; five rows show, then `▸ n more · k older than 7 days`. Appointments show for the next seven days, three of them, then `▸ n later`. `unblocks …` under a row names the lanes it frees (the board's Unblocks column). The head keeps the count, how many rows block lanes and the age of the oldest, folded too. At the selected row, `[ask]` asks Jack to put the question to you, `[done]` closes the row, `[run]` asks Jack to run an appointment now and `[move]` to ask you for a new time; enter never presses `[done]`. A row goes once its board row is closed or after `jh waiting close <id>`.
181
- - **Sources** shows, per source that is no ticket, its entries and how many are new, or when it last ran: amber with a new entry that is not in Your turn yet, red while it fails. Opened, a click on an entry opens it; `↑ in your turn` marks one a row of Your turn asks about.
180
+ - **Your turn** takes its rows from the board's open questions, the questions a session left in its dialog, the files and Artifacts sent to you, the board's appointments and its next section. What blocks a lane comes first, then the newest; five rows show, then `▸ n more · k older than 7 days`. Appointments show for the next seven days, three of them, then `▸ n later`. `unblocks …` under a row names the lanes it frees (the board's Unblocks column). The head keeps the count, how many rows block lanes and the age of the oldest, folded too. At the selected row, `[ask]` asks Jack to put the question to you, `[done]` closes the row, `[run]` asks Jack to run an appointment now and `[move]` to ask you for a new time; enter never presses `[done]`. A row goes once its board row is closed or after `jh waiting close <id>`.
181
+ - **Sources** shows, per source that is no ticket, its entries and how many are new, or when it last ran: amber with a new entry that is not in Your turn yet, red while it fails. Opened, its entries stand newest first by the time they show, and a click on an entry opens it; `↑ in your turn` marks one a row of Your turn asks about.
182
182
  - **Lanes** opens at the start. A lane that works or is blocked opens by itself only when it first appears; after that, opening and folding are yours. A lane symbol says the state (`●` working, `◆` blocked, `◉` the agent finished its answer, `○` idle, `(·) no agent` a worktree nobody works in); only blocked wears its word. A resting lane names what it waits on: `waits on you` with the open questions of its report, `waits on` a row of Your turn, `after` its board row's starts-after cell, or `idle · no reason`.
183
183
  - **Waiting** lists the lanes not started yet: no worktree yet, something left to do, and what each starts after; it starts folded. Finished lanes (cleaned up, or every phase they name ticked) are not shown.
184
184
  - **An open lane** shows, top down: its branch, the model and how long it idles; its link chips on one line, `+n` for the rest; its pull requests; the phases it works on, each with its bar and its first four open tasks, the running ones first, `▸ n more open · k done` to list them all; `▸ next` with the phases that wait, as ranges; `▸ done` with the finished ones. A lane shows only the phases its board rows name; a lane without a worktree reads its plan from the main checkout. A folded lane line names the phase moved last, `+n` more active ones and its count, and a reported task below it.
@@ -1,6 +1,6 @@
1
1
  id = "crossdelta.jackherd"
2
2
  name = "jackherd"
3
- version = "1.12.6"
3
+ version = "1.12.7"
4
4
  min_herdr_version = "0.8.2"
5
5
  description = "Show the herd, the state of a board's lanes, in a herdr pane"
6
6
  platforms = ["linux", "macos"]
package/install.sh CHANGED
@@ -9,7 +9,7 @@ set -eu
9
9
 
10
10
  # The default is the version this file ships with. The release bump changes it together with
11
11
  # package.json; install.test.ts fails while the two differ. Overridable, but only by a plain release.
12
- JACKHERD_VERSION="${JACKHERD_VERSION:-1.12.6}"
12
+ JACKHERD_VERSION="${JACKHERD_VERSION:-1.12.7}"
13
13
 
14
14
  JACKHERD_PACKAGE='jackherd'
15
15
  # Test seam: the terminal the wizard asks its questions on.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jackherd",
3
- "version": "1.12.6",
3
+ "version": "1.12.7",
4
4
  "keywords": [
5
5
  "claude-code",
6
6
  "coding-agents",
@@ -2,6 +2,7 @@ import { DAY_MS, twoDigits } from '../plan-format/clock'
2
2
  import type { WaitingItem } from '../plan-format/waiting'
3
3
  import type { PlanLanguage } from '../vocabulary'
4
4
  import { parseAppointmentTime } from '../watch/appointments'
5
+ import { newestFirst } from '../watch/newest-first'
5
6
  import { type AppointmentRow, appointmentRows, TIME_OPEN } from './appointment-rows'
6
7
  import { calendarDaysBetween } from './calendar-days'
7
8
  import { plain } from './markdown-text'
@@ -30,7 +31,7 @@ export type TurnRow = {
30
31
  appointment?: AppointmentRow
31
32
  }
32
33
 
33
- /** "Your turn": the now rows, what blocks a lane first, then the oldest; the planned rows, those without a time first. */
34
+ /** "Your turn": the now rows, what blocks a lane first, then the newest; the planned rows, those without a time first. */
34
35
  export type YourTurn = { now: TurnRow[]; planned: TurnRow[] }
35
36
 
36
37
  /** "Your turn" as the herd draws it, with the clock (epoch milliseconds) its ages and the week ahead are counted from. */
@@ -140,9 +141,9 @@ const plannedFrom = (row: TurnRow | undefined, appointment: AppointmentRow): Tur
140
141
  return row ? { ...planned, unblocks: row.unblocks, ...(row.waiting ? { waiting: row.waiting } : {}) } : planned
141
142
  }
142
143
 
143
- const byBlockingThenAge = (left: TurnRow, right: TurnRow): number =>
144
- Number(right.unblocks.length > 0) - Number(left.unblocks.length > 0) ||
145
- (left.at ?? Number.POSITIVE_INFINITY) - (right.at ?? Number.POSITIVE_INFINITY)
144
+ /** What frees a lane first (the orchestrate skill's `Unblocks` column), then the newest; equal rows keep their order. */
145
+ const byBlockingThenNewest = (left: TurnRow, right: TurnRow): number =>
146
+ Number(right.unblocks.length > 0) - Number(left.unblocks.length > 0) || newestFirst(left.at, right.at)
146
147
 
147
148
  const byTime = (left: TurnRow, right: TurnRow): number =>
148
149
  (left.at ?? Number.NEGATIVE_INFINITY) - (right.at ?? Number.NEGATIVE_INFINITY)
@@ -169,7 +170,7 @@ export const yourTurnOf = ({ waiting, appointments, next, now }: TurnSources): Y
169
170
  }
170
171
  const shown = [...nowRows, ...planned]
171
172
  const nextRows = next.filter((text) => !shown.some((row) => sameTopic(topicText(row), text))).map(nextRowOf)
172
- return { now: [...nowRows].sort(byBlockingThenAge), planned: [...planned, ...nextRows].sort(byTime) }
173
+ return { now: [...nowRows].sort(byBlockingThenNewest), planned: [...planned, ...nextRows].sort(byTime) }
173
174
  }
174
175
 
175
176
  /**
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A sort comparator over two times in epoch milliseconds, newest first: a time nobody can read (null) goes after every
3
+ * time, and equal times (two nulls included) give 0, so the stable `Array.prototype.sort` keeps their order.
4
+ */
5
+ export const newestFirst = (left: number | null, right: number | null): number => {
6
+ if (left === null || right === null) return Number(left === null) - Number(right === null)
7
+ return right - left
8
+ }
@@ -1,3 +1,4 @@
1
+ import { newestFirst } from './newest-first'
1
2
  import { isFresh, NEW_FOR_MS } from './plan-badges'
2
3
  import { previewUrlOf } from './previews'
3
4
  import { lineText, type SourceEntry, type SourceRecord } from './sources'
@@ -16,7 +17,7 @@ export type EntryStatus = {
16
17
  isNew: boolean
17
18
  }
18
19
 
19
- /** What the herd shows of a source: when it ran last, since when it fails, its newest report and its entries, newest change first. */
20
+ /** What the herd shows of a source: when it ran last, since when it fails, its newest report and its entries, newest first by the time each shows. */
20
21
  export type SourceStatus = {
21
22
  name: string
22
23
  ranAt: number | null
@@ -48,7 +49,9 @@ const statusOf = (name: string, record: SourceRecord | undefined, now: number):
48
49
  ranAt: record?.ranAt ?? null,
49
50
  failingSince: record?.failingSince ?? null,
50
51
  latest: latestOf(record?.latest, now),
51
- entries: (record?.entries ?? []).map((entry) => entryStatusOf(entry, now)),
52
+ entries: (record?.entries ?? [])
53
+ .map((entry) => entryStatusOf(entry, now))
54
+ .sort((left, right) => newestFirst(left.at, right.at)),
52
55
  })
53
56
 
54
57
  /**