@johngaynor/entourage 0.4.0 → 0.4.1-next.13
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/README.md +15 -2
- package/cli/entourage +9 -6
- package/cli/lib/handoff.sh +154 -27
- package/cli/lib/task.sh +1 -1
- package/herdr/README.md +15 -1
- package/herdr/layouts/test.json +11 -0
- package/herdr/mods/steps/main.js +221 -0
- package/herdr/mods/steps/mod.json +1 -0
- package/package.json +1 -1
- package/prompts/task-new.md +1 -1
- package/skills/sdlc-breakdown/SKILL.md +3 -1
- package/skills/sdlc-define/SKILL.md +3 -1
- package/skills/sdlc-plan/SKILL.md +3 -1
package/README.md
CHANGED
|
@@ -19,7 +19,9 @@ name, such as `/sdlc-define ABC-122`.
|
|
|
19
19
|
Whenever a skill ends or pauses, it hands off with a block: which step it was,
|
|
20
20
|
and whether it is `done`, `needs-human` or `failed`. A `done` block also names
|
|
21
21
|
the step that comes next. The agent records each block with
|
|
22
|
-
`entourage task handoff`, and
|
|
22
|
+
`entourage task handoff`, and your answer when you reply to a question.
|
|
23
|
+
`entourage task log` shows them for a card, with how long each step took, and
|
|
24
|
+
the Steps panel in Herdr shows the same for the card whose tab is selected.
|
|
23
25
|
|
|
24
26
|
## Setting up a machine
|
|
25
27
|
|
|
@@ -75,7 +77,8 @@ entourage task new my-project ABC-122
|
|
|
75
77
|
```
|
|
76
78
|
|
|
77
79
|
As it goes, the agent records how each step ended. `task log` lists that for
|
|
78
|
-
a card, oldest first
|
|
80
|
+
a card, oldest first, with how long each step took and how long a question
|
|
81
|
+
waited for your answer:
|
|
79
82
|
|
|
80
83
|
```sh
|
|
81
84
|
entourage task log my-project ABC-122
|
|
@@ -132,3 +135,13 @@ Then publish a GitHub release for that tag. The `Publish to npm` workflow runs
|
|
|
132
135
|
the tests and publishes the package. It signs in to npm by
|
|
133
136
|
[trusted publishing](https://docs.npmjs.com/trusted-publishers), so there is no
|
|
134
137
|
token to keep.
|
|
138
|
+
|
|
139
|
+
Every push to `main` is published too, as a merge build under the npm tag
|
|
140
|
+
`next` (`0.4.1-next.3`, for example). `entourage update` does not install
|
|
141
|
+
those. To try one on a machine:
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
ENTOURAGE_NPM_SPEC=@johngaynor/entourage@next entourage update
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
A plain `entourage update` goes back to the latest release.
|
package/cli/entourage
CHANGED
|
@@ -22,7 +22,8 @@ Usage:
|
|
|
22
22
|
entourage task start <project> <branch> [<repo>[:<group>[,<group>...]] ...]
|
|
23
23
|
start the work: a worktree per repo, opened as a tab
|
|
24
24
|
entourage task handoff <project> <card> record how a step ended: a handoff block on stdin
|
|
25
|
-
entourage task log <project> <card>
|
|
25
|
+
entourage task log <project> <card> [--json]
|
|
26
|
+
list a card's hand-offs and how long each step took
|
|
26
27
|
entourage help
|
|
27
28
|
|
|
28
29
|
A project groups repos that belong together, with a PROJECT.md saying what
|
|
@@ -43,11 +44,13 @@ gets `just setup` run in that tab, so the checkout is ready to work in.
|
|
|
43
44
|
Targets after the branch narrow the task: `app` takes only that repo, and
|
|
44
45
|
`app:athlete` sets it up for its athlete group (`just setup athlete`).
|
|
45
46
|
Join several groups with a comma: `app:athlete,coach`.
|
|
46
|
-
`task handoff` is run by the agent each time a step ends or pauses
|
|
47
|
-
|
|
48
|
-
refuses one that breaks the rules, and
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
`task handoff` is run by the agent each time a step ends or pauses, and
|
|
48
|
+
when the human answers a question. It reads a handoff block on stdin (phase,
|
|
49
|
+
status, next and so on, one per line), refuses one that breaks the rules, and
|
|
50
|
+
records it. `task log` lists what was recorded for a card, with how long each
|
|
51
|
+
step took and how long it waited on the human. With --json it prints the
|
|
52
|
+
same view as one line, for programs: the Steps panel in Herdr draws it. Run
|
|
53
|
+
`entourage task handoff <project> <card>` with no block to see the rules.
|
|
51
54
|
|
|
52
55
|
Herdr's folder is ~/.config/herdr-app (HERDR_APP_HOME picks another).
|
|
53
56
|
Skills are linked into ~/.claude/skills (CLAUDE_CONFIG_DIR picks another
|
package/cli/lib/handoff.sh
CHANGED
|
@@ -13,7 +13,7 @@ STORE=$ENT_HOME/entourage.db
|
|
|
13
13
|
SQLITE=${ENTOURAGE_SQLITE:-sqlite3}
|
|
14
14
|
|
|
15
15
|
# The lines a block can have, in the order they are printed.
|
|
16
|
-
HANDOFF_KEYS='phase status next summary flags question options reason'
|
|
16
|
+
HANDOFF_KEYS='phase status next summary flags question options answer reason'
|
|
17
17
|
# The steps a block can name as its phase or as what comes next.
|
|
18
18
|
HANDOFF_STEPS='define plan breakdown setup'
|
|
19
19
|
# A block is a summary. A line longer than this is not one, and a very long
|
|
@@ -30,7 +30,8 @@ summary: One to three sentences on what was done.
|
|
|
30
30
|
EOF
|
|
31
31
|
|
|
32
32
|
status is done (needs next and summary, may have flags), needs-human (needs
|
|
33
|
-
question and options, may have summary)
|
|
33
|
+
question and options, may have summary), answered (needs answer: what the
|
|
34
|
+
human replied to a needs-human hand-off) or failed (needs reason). phase and
|
|
34
35
|
next are one of: $HANDOFF_STEPS. Every value goes on one line."
|
|
35
36
|
|
|
36
37
|
have_sqlite() { command -v "$SQLITE" >/dev/null 2>&1; }
|
|
@@ -49,23 +50,35 @@ sql_str() {
|
|
|
49
50
|
printf "'%s'" "$(printf '%s' "$1" | LC_ALL=C sed "s/'/''/g")"
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
has_answer_column() { store "$STORE" 'select answer from handoffs limit 0;' >/dev/null; }
|
|
54
|
+
|
|
55
|
+
# A store made before answers were recorded has no column for them. Add it.
|
|
56
|
+
# Two hand-offs can get here at the same moment: one adds the column and the
|
|
57
|
+
# other's attempt fails, so look again before calling that a failure.
|
|
58
|
+
store_upgrade() {
|
|
59
|
+
has_answer_column ||
|
|
60
|
+
store "$STORE" 'alter table handoffs add column answer text;' ||
|
|
61
|
+
has_answer_column
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# Make the store if this is its first use, and bring an older one up to date.
|
|
53
65
|
store_ready() {
|
|
54
66
|
mkdir -p "$ENT_HOME"
|
|
55
67
|
store "$STORE" 'create table if not exists handoffs (
|
|
56
68
|
id integer primary key, at text not null, project text not null,
|
|
57
69
|
card text not null, phase text not null, status text not null,
|
|
58
|
-
next text, summary text, flags text, question text, options text,
|
|
70
|
+
next text, summary text, flags text, question text, options text,
|
|
71
|
+
answer text, reason text);' && store_upgrade
|
|
59
72
|
}
|
|
60
73
|
|
|
61
74
|
# Record one hand-off, timed now in UTC:
|
|
62
|
-
# store_handoff <project> <card> <phase> <status> <next> <summary> <flags> <question> <options> <reason>
|
|
75
|
+
# store_handoff <project> <card> <phase> <status> <next> <summary> <flags> <question> <options> <answer> <reason>
|
|
63
76
|
store_handoff() {
|
|
64
77
|
local at values='' v
|
|
65
78
|
at=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
66
79
|
for v in "$at" "$@"; do values="$values${values:+, }$(sql_str "$v")"; done
|
|
67
80
|
store "$STORE" "insert into handoffs
|
|
68
|
-
(at, project, card, phase, status, next, summary, flags, question, options, reason)
|
|
81
|
+
(at, project, card, phase, status, next, summary, flags, question, options, answer, reason)
|
|
69
82
|
values ($values);"
|
|
70
83
|
}
|
|
71
84
|
|
|
@@ -77,7 +90,7 @@ record_start() {
|
|
|
77
90
|
say " note $SQLITE is not installed, so hand-offs are not recorded"
|
|
78
91
|
return 0
|
|
79
92
|
fi
|
|
80
|
-
{ store_ready && store_handoff "$1" "$2" new done define '' '' '' '' ''; } ||
|
|
93
|
+
{ store_ready && store_handoff "$1" "$2" new done define '' '' '' '' '' ''; } ||
|
|
81
94
|
say " note could not record the start in $STORE"
|
|
82
95
|
}
|
|
83
96
|
|
|
@@ -122,7 +135,7 @@ task_handoff() {
|
|
|
122
135
|
[ "$#" -le 2 ] || die "$HANDOFF_USAGE"
|
|
123
136
|
[ ! -t 0 ] || die "$HANDOFF_USAGE"
|
|
124
137
|
|
|
125
|
-
local phase='' status='' next='' summary='' flags='' question='' options='' reason=''
|
|
138
|
+
local phase='' status='' next='' summary='' flags='' question='' options='' answer='' reason=''
|
|
126
139
|
local line key value n=0 seen=' '
|
|
127
140
|
local re='^[[:space:]]*([a-z]+):[[:space:]]*(.*)$' blank='^[[:space:]]*$' hint='^<.*>$'
|
|
128
141
|
while IFS= read -r line || [ -n "$line" ]; do
|
|
@@ -150,62 +163,176 @@ task_handoff() {
|
|
|
150
163
|
|
|
151
164
|
[ -n "$phase" ] || die "the block has no 'phase:' line, the step that is handing off."
|
|
152
165
|
in_list "$phase" "$HANDOFF_STEPS" || die "'$phase' is not a step. The steps are: $HANDOFF_STEPS."
|
|
153
|
-
[ -n "$status" ] || die "the block has no 'status:' line. Use done, needs-human or failed."
|
|
166
|
+
[ -n "$status" ] || die "the block has no 'status:' line. Use done, needs-human, answered or failed."
|
|
154
167
|
local need allow
|
|
155
168
|
case $status in
|
|
156
169
|
done) need='next summary' allow='flags' ;;
|
|
157
170
|
needs-human) need='question options' allow='summary' ;;
|
|
171
|
+
answered) need='answer' allow='' ;;
|
|
158
172
|
failed) need='reason' allow='' ;;
|
|
159
|
-
*) die "'$status' is not a status. Use done, needs-human or failed." ;;
|
|
173
|
+
*) die "'$status' is not a status. Use done, needs-human, answered or failed." ;;
|
|
160
174
|
esac
|
|
161
175
|
for key in $need; do
|
|
162
|
-
[ -n "${!key}" ] || die "a
|
|
176
|
+
[ -n "${!key}" ] || die "a hand-off with status $status needs a '$key:' line."
|
|
163
177
|
done
|
|
164
|
-
for key in next summary flags question options reason; do
|
|
178
|
+
for key in next summary flags question options answer reason; do
|
|
165
179
|
[ -z "${!key}" ] || in_list "$key" "$need $allow" ||
|
|
166
|
-
die "a
|
|
180
|
+
die "a hand-off with status $status has no '$key:' line. Take it out."
|
|
167
181
|
done
|
|
168
182
|
[ -z "$next" ] || in_list "$next" "$HANDOFF_STEPS" ||
|
|
169
183
|
die "'$next' is not a step that can come next. The steps are: $HANDOFF_STEPS."
|
|
170
184
|
|
|
171
185
|
have_sqlite ||
|
|
172
186
|
die "$SQLITE is not installed, so the hand-off was not recorded. Write the block in your message instead."
|
|
173
|
-
{ store_ready && store_handoff "$name" "$card" "$phase" "$status" "$next" "$summary" "$flags" "$question" "$options" "$reason"; } ||
|
|
187
|
+
{ store_ready && store_handoff "$name" "$card" "$phase" "$status" "$next" "$summary" "$flags" "$question" "$options" "$answer" "$reason"; } ||
|
|
174
188
|
die "the hand-off was not recorded: could not write to $STORE. Write the block in your message instead."
|
|
175
189
|
for key in $HANDOFF_KEYS; do
|
|
176
190
|
[ -z "${!key}" ] || printf '%s: %s\n' "$key" "${!key}"
|
|
177
191
|
done
|
|
178
192
|
}
|
|
179
193
|
|
|
180
|
-
#
|
|
194
|
+
# --- the log ----------------------------------------------------------------
|
|
195
|
+
|
|
196
|
+
# One query works out a card's view: each hand-off with its label, how long it
|
|
197
|
+
# took and whether it is a wait. The plain log and the JSON both read it, so
|
|
198
|
+
# they cannot disagree, and a Herdr mod that draws the JSON formats nothing.
|
|
199
|
+
#
|
|
200
|
+
# Nothing about time is stored beyond each row's own. A step's time is from
|
|
201
|
+
# the row before it to its own row. The time from a needs-human row to its
|
|
202
|
+
# answered row is waiting on the human and belongs to no step. A needs-human
|
|
203
|
+
# row with nothing after it is still waiting, measured to now. A `new` row
|
|
204
|
+
# starts a run, so it has no time, however long ago the run before it ended.
|
|
205
|
+
|
|
206
|
+
# SQL for a number of seconds as text: 50s, 1m 44s, 1h 02m.
|
|
207
|
+
sql_took() {
|
|
208
|
+
local s=$1
|
|
209
|
+
printf "case when %s < 60 then %s || 's'
|
|
210
|
+
when %s < 3600 then (%s / 60) || 'm ' || printf('%%02d', %s %% 60) || 's'
|
|
211
|
+
else (%s / 3600) || 'h ' || printf('%%02d', %s %% 3600 / 60) || 'm' end" \
|
|
212
|
+
"$s" "$s" "$s" "$s" "$s" "$s" "$s"
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
# SQL that starts a query on one card's view, as the table `shown`.
|
|
216
|
+
# log_view <project> <card> <answer column, or null in a store without one>
|
|
217
|
+
log_view() {
|
|
218
|
+
printf "with base as (
|
|
219
|
+
select id, at, phase, status, next, summary, flags, question, options,
|
|
220
|
+
%s as answer, reason,
|
|
221
|
+
lag(at) over w as prev_at, lag(status) over w as before, lead(id) over w as after,
|
|
222
|
+
sum(case when phase = 'new' then 1 else 0 end) over w as run
|
|
223
|
+
from handoffs where project = %s and card = %s
|
|
224
|
+
window w as (order by id)),
|
|
225
|
+
timed as (
|
|
226
|
+
select *,
|
|
227
|
+
case when phase = 'new' or prev_at is null then null
|
|
228
|
+
else max(cast(strftime('%%s', at) - strftime('%%s', prev_at) as integer), 0) end as seconds,
|
|
229
|
+
case when after is null and status = 'needs-human'
|
|
230
|
+
then max(cast(strftime('%%s', 'now') - strftime('%%s', at) as integer), 0) end as open_seconds
|
|
231
|
+
from base),
|
|
232
|
+
shown as (
|
|
233
|
+
select *,
|
|
234
|
+
case when phase = 'new' then 'start'
|
|
235
|
+
when status = 'answered' and before = 'needs-human' then 'wait'
|
|
236
|
+
else 'step' end as kind,
|
|
237
|
+
status || case when next is null then '' else ', then ' || next end as what,
|
|
238
|
+
case when phase = 'new' then 'started'
|
|
239
|
+
when status = 'done' then phase || ' done'
|
|
240
|
+
when status = 'needs-human' then phase || ' asked a question'
|
|
241
|
+
when status = 'answered' then 'answered'
|
|
242
|
+
when status = 'failed' then phase || ' failed'
|
|
243
|
+
else phase || ' ' || status end as label,
|
|
244
|
+
case when seconds is null then '' else (%s) end as short,
|
|
245
|
+
case when seconds is null then ''
|
|
246
|
+
when status = 'answered' and before = 'needs-human' then 'waited ' || (%s)
|
|
247
|
+
when before = 'needs-human' then (%s) || ', includes waiting on the human'
|
|
248
|
+
else (%s) end as took,
|
|
249
|
+
case when open_seconds is null then ''
|
|
250
|
+
else 'waiting on the human for ' || (%s) end as waiting
|
|
251
|
+
from timed)" \
|
|
252
|
+
"$3" "$(sql_str "$1")" "$(sql_str "$2")" \
|
|
253
|
+
"$(sql_took seconds)" "$(sql_took seconds)" "$(sql_took seconds)" "$(sql_took seconds)" \
|
|
254
|
+
"$(sql_took open_seconds)"
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
LOG_USAGE='usage: entourage task log <project> <card> [--json]'
|
|
258
|
+
|
|
259
|
+
# List a card's hand-offs, oldest first, with how long each step took. With
|
|
260
|
+
# --json, the same view as one line of JSON.
|
|
181
261
|
task_log() {
|
|
262
|
+
local json=0 a
|
|
263
|
+
local args=()
|
|
264
|
+
for a in "$@"; do
|
|
265
|
+
case $a in
|
|
266
|
+
--json) json=1 ;;
|
|
267
|
+
-*) die "$LOG_USAGE" ;;
|
|
268
|
+
*) args+=("$a") ;;
|
|
269
|
+
esac
|
|
270
|
+
done
|
|
271
|
+
set -- ${args[@]+"${args[@]}"}
|
|
182
272
|
local name=${1:-} card=${2:-}
|
|
183
|
-
[ -n "$name" ] || die "
|
|
273
|
+
[ -n "$name" ] || die "$LOG_USAGE"
|
|
184
274
|
project_named "$name" || die "there is no entourage project called '$name'. See: entourage project ls"
|
|
185
275
|
card=$(handoff_card "$name" "$card" log) || exit 1
|
|
186
|
-
[ "$#" -le 2 ] || die "
|
|
276
|
+
[ "$#" -le 2 ] || die "$LOG_USAGE"
|
|
187
277
|
have_sqlite || die "$SQLITE is not installed, so no hand-offs have been recorded on this machine."
|
|
188
278
|
|
|
279
|
+
# Reading never changes the store. An older one has no answer column, so it
|
|
280
|
+
# is read without one.
|
|
281
|
+
local answer_column=null view found=''
|
|
282
|
+
if [ -e "$STORE" ]; then
|
|
283
|
+
! has_answer_column || answer_column=answer
|
|
284
|
+
view=$(log_view "$name" "$card" "$answer_column")
|
|
285
|
+
fi
|
|
286
|
+
|
|
287
|
+
if [ "$json" = 1 ]; then
|
|
288
|
+
if [ ! -e "$STORE" ]; then
|
|
289
|
+
printf '{"project":"%s","card":"%s","state":null,"waiting":null,"run":null,"steps":[]}\n' \
|
|
290
|
+
"$(json_str "$name")" "$(json_str "$card")"
|
|
291
|
+
return
|
|
292
|
+
fi
|
|
293
|
+
# SQLite builds the JSON, so no value is escaped by hand. A store that
|
|
294
|
+
# cannot be read is an error, not an empty history.
|
|
295
|
+
store "$STORE" "$view
|
|
296
|
+
select json_object('project', $(sql_str "$name"), 'card', $(sql_str "$card"),
|
|
297
|
+
'state', (select case when status = 'needs-human' then 'waiting on the human'
|
|
298
|
+
when phase = 'new' then 'started' else label || substr(what, length(status) + 1) end
|
|
299
|
+
from shown order by id desc limit 1),
|
|
300
|
+
'waiting', (select nullif(waiting, '') from shown order by id desc limit 1),
|
|
301
|
+
'run', (select max(run) from shown),
|
|
302
|
+
'steps', (select json_group_array(json(step)) from (
|
|
303
|
+
select json_object('run', run, 'at', at, 'clock', strftime('%H:%M', at, 'localtime'),
|
|
304
|
+
'phase', phase, 'status', status, 'next', next, 'kind', kind, 'label', label,
|
|
305
|
+
'took', took, 'short', short, 'seconds', seconds, 'waiting', nullif(waiting, ''),
|
|
306
|
+
'summary', summary, 'flags', flags, 'question', question, 'options', options,
|
|
307
|
+
'answer', answer, 'reason', reason) as step
|
|
308
|
+
from shown order by id)));" ||
|
|
309
|
+
die "could not read the hand-offs in $STORE. It may not be entourage's store."
|
|
310
|
+
return
|
|
311
|
+
fi
|
|
312
|
+
|
|
189
313
|
# The unit separator: no value can hold it, and unlike a tab it does not let
|
|
190
314
|
# `read` run two empty fields together.
|
|
191
|
-
local sep=$'\x1f' count=0 key
|
|
192
|
-
local at phase
|
|
315
|
+
local sep=$'\x1f' count=0 key
|
|
316
|
+
local at phase what took summary flags question options answer reason waiting
|
|
193
317
|
if [ -e "$STORE" ]; then
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
318
|
+
found=$(store -separator "$sep" "$STORE" "$view
|
|
319
|
+
select at, phase, what, took, coalesce(summary, ''), coalesce(flags, ''),
|
|
320
|
+
coalesce(question, ''), coalesce(options, ''), coalesce(answer, ''),
|
|
321
|
+
coalesce(reason, ''), waiting
|
|
322
|
+
from shown order by id;") ||
|
|
199
323
|
die "could not read the hand-offs in $STORE. It may not be entourage's store."
|
|
200
324
|
fi
|
|
201
|
-
while IFS=$sep read -r at phase
|
|
325
|
+
while IFS=$sep read -r at phase what took summary flags question options answer reason waiting; do
|
|
202
326
|
[ -n "$at" ] || continue
|
|
203
327
|
[ "$count" -gt 0 ] || say "$card in '$name'"
|
|
204
328
|
count=$((count + 1))
|
|
205
|
-
printf '%s %-10s %s
|
|
206
|
-
|
|
329
|
+
if [ -n "$took" ]; then printf '%s %-10s %-22s %s\n' "$at" "$phase" "$what" "$took"
|
|
330
|
+
else printf '%s %-10s %s\n' "$at" "$phase" "$what"
|
|
331
|
+
fi
|
|
332
|
+
for key in summary flags question options answer reason; do
|
|
207
333
|
[ -z "${!key}" ] || printf ' %s: %s\n' "$key" "${!key}"
|
|
208
334
|
done
|
|
335
|
+
[ -z "$waiting" ] || printf ' %s\n' "$waiting"
|
|
209
336
|
done <<< "$found"
|
|
210
337
|
[ "$count" -gt 0 ] || say "No hand-offs recorded for $card in '$name'."
|
|
211
338
|
}
|
package/cli/lib/task.sh
CHANGED
|
@@ -321,6 +321,6 @@ cmd_task() {
|
|
|
321
321
|
start) shift; task_start "$@" ;;
|
|
322
322
|
handoff) shift; task_handoff "$@" ;;
|
|
323
323
|
log) shift; task_log "$@" ;;
|
|
324
|
-
*) die "usage: entourage task new <project> <card>, or: entourage task start <project> <branch> [<repo>[:<group>[,<group>...]] ...], or: entourage task handoff <project> <card>, or: entourage task log <project> <card> (see: entourage help)" ;;
|
|
324
|
+
*) die "usage: entourage task new <project> <card>, or: entourage task start <project> <branch> [<repo>[:<group>[,<group>...]] ...], or: entourage task handoff <project> <card>, or: entourage task log <project> <card> [--json] (see: entourage help)" ;;
|
|
325
325
|
esac
|
|
326
326
|
}
|
package/herdr/README.md
CHANGED
|
@@ -10,8 +10,9 @@ layouts (whole-window arrangements of mods).
|
|
|
10
10
|
| `mods/cpu/` | Live CPU usage with a scrolling history. macOS only (reads `/usr/bin/top`). |
|
|
11
11
|
| `mods/layout-switch/` | A dropdown that shows the current layout and switches to another. |
|
|
12
12
|
| `mods/projects/` | Every project in your config, open or not. Click one to show its space; `+` makes a new one. |
|
|
13
|
+
| `mods/steps/` | The steps of the card whose tab is selected: what each did, how long it took, and how long it waited on you. |
|
|
13
14
|
| `layouts/default.json` | Herdr's own layout, plus the layout dropdown. |
|
|
14
|
-
| `layouts/test.json` | `default` with the projects list in place of spaces, plus the CPU mod in the sidebar. |
|
|
15
|
+
| `layouts/test.json` | `default` with the projects list in place of spaces, plus the Steps panel and the CPU mod in the sidebar. |
|
|
15
16
|
| `projects/template/` | The starting `PROJECT.md` for every new project. |
|
|
16
17
|
|
|
17
18
|
The skills are in [../skills/](../skills/), outside this folder. They are
|
|
@@ -184,6 +185,12 @@ entourage task log <project> <card>
|
|
|
184
185
|
commands.
|
|
185
186
|
- **`task new` records the start,** so the time each step took can be read
|
|
186
187
|
from the hand-offs alone.
|
|
188
|
+
- **It records your answers too.** When you reply to a question, the agent
|
|
189
|
+
records a hand-off with `status: answered` and what you said in a few
|
|
190
|
+
words. `task log` shows how long each step took, and the time a question
|
|
191
|
+
waited on you as a line of its own, counted in no step. A question with no
|
|
192
|
+
answer yet shows how long it has been waiting. A step that followed a
|
|
193
|
+
question with no recorded answer is marked as including the wait.
|
|
187
194
|
- **They are kept in `~/.config/entourage/entourage.db`,** a SQLite file
|
|
188
195
|
beside your projects, on this machine only. It needs `sqlite3`, which macOS
|
|
189
196
|
ships; `ENTOURAGE_SQLITE` picks another command. Without it `task new`
|
|
@@ -191,6 +198,13 @@ entourage task log <project> <card>
|
|
|
191
198
|
`entourage status` says so.
|
|
192
199
|
- **The card stays in Linear.** The store records how a step ended, not what
|
|
193
200
|
was written.
|
|
201
|
+
- **The Steps panel shows it in Herdr.** Select a card's tab, the one `task
|
|
202
|
+
new` opened, and the panel lists that card's steps: the time of day, what
|
|
203
|
+
the step did, how long it took, and its summary. A wait on you stands out,
|
|
204
|
+
and so does a question still waiting. It shows the latest run of a card
|
|
205
|
+
written up more than once. The panel draws what
|
|
206
|
+
`entourage task log <project> <card> --json` prints and works nothing out
|
|
207
|
+
itself, so the two always agree.
|
|
194
208
|
|
|
195
209
|
### Starting the work
|
|
196
210
|
|
package/herdr/layouts/test.json
CHANGED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
// The steps of the card whose tab is selected: what each step of its write-up
|
|
2
|
+
// did, how long it took, and how long it waited on the human.
|
|
3
|
+
//
|
|
4
|
+
// All of that is worked out by `entourage task log <project> <card> --json`.
|
|
5
|
+
// This mod draws the view that command returns and holds no rules about
|
|
6
|
+
// hand-offs: every label and every length of time arrives as text.
|
|
7
|
+
//
|
|
8
|
+
// A step is one line. A click on it opens what the step said.
|
|
9
|
+
import { View, div } from "gpui-kit";
|
|
10
|
+
import { v_flex, h_flex } from "gpui-base";
|
|
11
|
+
import { exec, spaces, theme, layout, window, checking, appHome } from "herdr";
|
|
12
|
+
|
|
13
|
+
const LOOK_MS = 2000; // how often to see whether another card is selected
|
|
14
|
+
const REREAD_MS = 6000; // how often to read the selected card's steps again
|
|
15
|
+
const PROJECTS_MS = 60000; // projects change rarely
|
|
16
|
+
const TIMEOUT_MS = 10000;
|
|
17
|
+
// How this mod's own link into the repo that ships it ends.
|
|
18
|
+
const LINKED_AT = "/herdr/mods/steps";
|
|
19
|
+
// A tab is a card's when it is named as `entourage task new` names it.
|
|
20
|
+
const CARD = /^[A-Za-z][A-Za-z0-9]*-[0-9]+$/;
|
|
21
|
+
|
|
22
|
+
// `herdr-app check` draws the mod once, with no card selected, which would
|
|
23
|
+
// show one line of text and none of the rows. It is given these to draw, all
|
|
24
|
+
// of them open, so a mistake in a row fails the check.
|
|
25
|
+
const SAMPLE = {
|
|
26
|
+
run: 1,
|
|
27
|
+
state: "waiting on the human",
|
|
28
|
+
waiting: "waiting on the human for 2m 05s",
|
|
29
|
+
steps: [
|
|
30
|
+
{ run: 1, at: "a", clock: "10:00", kind: "start", label: "started", took: "", short: "" },
|
|
31
|
+
{ run: 1, at: "b", clock: "10:00", kind: "step", label: "define done", took: "50s", short: "50s", summary: "A summary.", flags: "A flag." },
|
|
32
|
+
{ run: 1, at: "c", clock: "10:09", kind: "wait", label: "answered", took: "waited 7m 04s", short: "7m 04s", answer: "approve" },
|
|
33
|
+
{ run: 1, at: "d", clock: "10:17", kind: "step", label: "plan done", took: "7m 24s, includes waiting on the human", short: "7m 24s" },
|
|
34
|
+
{ run: 1, at: "e", clock: "10:17", kind: "step", label: "breakdown asked a question", took: "5s", short: "5s", question: "Approve?", waiting: "waiting on the human for 2m 05s" },
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function find(node, id) {
|
|
39
|
+
if (node?.id === id) return node;
|
|
40
|
+
for (const child of node?.children ?? []) {
|
|
41
|
+
const found = find(child, id);
|
|
42
|
+
if (found) return found;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// The sidebar's rail goes by its width, as in Herdr's own lists.
|
|
48
|
+
const narrow = () => (find(layout(), "sidebar")?.size?.px ?? Infinity) < 160;
|
|
49
|
+
|
|
50
|
+
function parse(text) {
|
|
51
|
+
try {
|
|
52
|
+
return JSON.parse(text);
|
|
53
|
+
} catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// What a failed command said, without the name it starts its errors with.
|
|
59
|
+
const said = (r) => (r.stderr || r.stdout).trim().replace(/^entourage: /, "");
|
|
60
|
+
|
|
61
|
+
const OLD_CLI = "This entourage cannot give a card's steps as JSON. Run: entourage update";
|
|
62
|
+
// An entourage from before --json answers with its usage line, not JSON.
|
|
63
|
+
const failure = (r, what) => {
|
|
64
|
+
const text = said(r);
|
|
65
|
+
return text.startsWith("usage:") ? OLD_CLI : text || `${what} failed`;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// What is selected on this computer: the shown space's folder, and the card
|
|
69
|
+
// its shown tab is for, if it is a card's tab.
|
|
70
|
+
function selected() {
|
|
71
|
+
const space = spaces().find((s) => s.active && !s.machine) ?? null;
|
|
72
|
+
const tab = space?.tabs.find((t) => t.active) ?? null;
|
|
73
|
+
const card = tab && CARD.test(tab.name) ? tab.name.toUpperCase() : null;
|
|
74
|
+
return { folder: space?.folder ?? null, card, key: `${space?.folder ?? ""}\n${card ?? ""}` };
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export default class Steps extends View {
|
|
78
|
+
init(_props, cx) {
|
|
79
|
+
this.cmd = "entourage"; // the one on PATH, until that cannot start
|
|
80
|
+
this.projects = null; // the last listing of projects
|
|
81
|
+
this.projectsAt = 0;
|
|
82
|
+
this.key = null; // what the view on hand was read for
|
|
83
|
+
this.project = null; // the entourage project of the shown space, or null
|
|
84
|
+
this.view = null;
|
|
85
|
+
this.error = null;
|
|
86
|
+
this.busy = false;
|
|
87
|
+
this.readAt = 0;
|
|
88
|
+
this.drawn = null; // what the last redraw showed, to redraw only on a change
|
|
89
|
+
this.open = null; // the step whose lines are showing, by its time
|
|
90
|
+
if (checking()) return;
|
|
91
|
+
cx.timer.every(LOOK_MS, (cx) => this.look(cx));
|
|
92
|
+
this.look(cx);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Runs the entourage command. One that cannot run is tried again as the
|
|
96
|
+
// copy this mod is linked from: Herdr may have been started without the
|
|
97
|
+
// user's PATH. Everything this mod runs only reads, so twice is safe.
|
|
98
|
+
async entourage(args) {
|
|
99
|
+
try {
|
|
100
|
+
return await exec(this.cmd, args, { timeout: TIMEOUT_MS });
|
|
101
|
+
} catch (e) {
|
|
102
|
+
if (this.cmd !== "entourage") throw e;
|
|
103
|
+
const link = await exec("readlink", [`${appHome()}/mods/steps`]);
|
|
104
|
+
const at = link.stdout.trim();
|
|
105
|
+
if (link.code !== 0 || !at.endsWith(LINKED_AT)) throw e;
|
|
106
|
+
this.cmd = `${at.slice(0, -LINKED_AT.length)}/cli/entourage`;
|
|
107
|
+
return exec(this.cmd, args, { timeout: TIMEOUT_MS });
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Read again when another card is selected, or the one on hand is stale.
|
|
112
|
+
// Nothing is read while nobody can see the panel, and a tab that is not a
|
|
113
|
+
// card's has nothing to read again.
|
|
114
|
+
look(cx) {
|
|
115
|
+
if (this.busy || window()?.visible === false || narrow()) return;
|
|
116
|
+
const now = selected();
|
|
117
|
+
const stale = Boolean(now.card) && Date.now() - this.readAt >= REREAD_MS;
|
|
118
|
+
if (now.key === this.key && !stale) return;
|
|
119
|
+
this.busy = true;
|
|
120
|
+
cx.spawn(async (cx) => {
|
|
121
|
+
let project = null;
|
|
122
|
+
let view = null;
|
|
123
|
+
let error = null;
|
|
124
|
+
try {
|
|
125
|
+
if (!this.projects || Date.now() - this.projectsAt > PROJECTS_MS) {
|
|
126
|
+
const r = await this.entourage(["project", "ls", "--json"]);
|
|
127
|
+
const list = r.code === 0 ? parse(r.stdout)?.projects : null;
|
|
128
|
+
if (Array.isArray(list)) {
|
|
129
|
+
this.projects = list;
|
|
130
|
+
this.projectsAt = Date.now();
|
|
131
|
+
} else {
|
|
132
|
+
error = r.code === 0 ? OLD_CLI : failure(r, "entourage project ls");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
project = (this.projects ?? []).find((p) => p.folder === now.folder)?.name ?? null;
|
|
136
|
+
if (!error && project && now.card) {
|
|
137
|
+
const r = await this.entourage(["task", "log", project, now.card, "--json"]);
|
|
138
|
+
const got = r.code === 0 ? parse(r.stdout) : null;
|
|
139
|
+
if (got && Array.isArray(got.steps)) view = got;
|
|
140
|
+
else error = r.code === 0 ? OLD_CLI : failure(r, "entourage task log");
|
|
141
|
+
}
|
|
142
|
+
} catch (e) {
|
|
143
|
+
error = `Could not run entourage: ${e?.message ?? e}`;
|
|
144
|
+
}
|
|
145
|
+
this.key = now.key;
|
|
146
|
+
this.project = project;
|
|
147
|
+
this.view = view;
|
|
148
|
+
this.error = error;
|
|
149
|
+
this.readAt = Date.now();
|
|
150
|
+
this.busy = false;
|
|
151
|
+
// A redraw of a mod redraws the whole window, so only when what it
|
|
152
|
+
// shows has changed.
|
|
153
|
+
const drawn = JSON.stringify([now.key, project, view, error]);
|
|
154
|
+
if (drawn !== this.drawn) {
|
|
155
|
+
this.drawn = drawn;
|
|
156
|
+
cx.notify();
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// One hand-off, on one line: its clock, its label and the time alone. A
|
|
162
|
+
// click opens the rest of what the view says about it. `s` is a step of the
|
|
163
|
+
// view, and its kind says whether it is a wait.
|
|
164
|
+
row(s, i, t, open) {
|
|
165
|
+
const wait = s.kind === "wait";
|
|
166
|
+
const start = s.kind === "start";
|
|
167
|
+
// An entourage from before `short` gives the whole of `took` here.
|
|
168
|
+
const short = s.short ?? s.took ?? "";
|
|
169
|
+
const full = s.took && s.took !== short ? s.took : null;
|
|
170
|
+
const lines = [full, s.question, s.answer, s.reason, s.summary, s.flags ? `Flags: ${s.flags}` : null]
|
|
171
|
+
.filter(Boolean);
|
|
172
|
+
const small = (text, color) =>
|
|
173
|
+
div().pl(46).pr(4).text_size(11.5).text_color(color).whitespace_normal().child(text);
|
|
174
|
+
return v_flex().id(`step-${i}`).flex_none().px(8).py(4).gap(2).rounded(8)
|
|
175
|
+
.hover((el) => el.bg(t.hover))
|
|
176
|
+
.on_click((_e, cx) => {
|
|
177
|
+
this.open = this.open === s.at ? null : s.at;
|
|
178
|
+
cx.notify();
|
|
179
|
+
})
|
|
180
|
+
.child(h_flex().gap(8).items_center()
|
|
181
|
+
.child(div().w(38).flex_none().text_size(11.5).text_color(t.dim).child(s.clock ?? ""))
|
|
182
|
+
.child(div().flex_1().min_w(0).truncate()
|
|
183
|
+
.text_color(wait ? t.blocked : start ? t.muted : t.foreground).child(s.label ?? ""))
|
|
184
|
+
.child(div().flex_none().text_size(11.5).text_color(wait ? t.blocked : t.dim).child(short)))
|
|
185
|
+
// A question still waiting shows whether or not the step is open.
|
|
186
|
+
.when(Boolean(s.waiting), (el) => el.child(small(s.waiting, t.blocked)))
|
|
187
|
+
.when(open, (el) => el.children(lines.map((text) => small(text, t.muted))));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
render() {
|
|
191
|
+
const t = theme();
|
|
192
|
+
if (narrow()) return v_flex().size_full().bg(t.chrome);
|
|
193
|
+
const sample = checking();
|
|
194
|
+
const now = selected();
|
|
195
|
+
const view = sample ? SAMPLE : this.view;
|
|
196
|
+
const note = (text, color) =>
|
|
197
|
+
div().px(8).py(6).text_size(12).text_color(color).whitespace_normal().child(text);
|
|
198
|
+
const items = [];
|
|
199
|
+
// The latest run only: a card written up twice keeps both in its log.
|
|
200
|
+
const steps = (view?.steps ?? []).filter((s) => s.run === view.run);
|
|
201
|
+
const rows = () => {
|
|
202
|
+
// Where the card stands, as the view words it.
|
|
203
|
+
if (view.state) items.push(note(view.state, view.waiting ? t.blocked : t.dim));
|
|
204
|
+
steps.forEach((s, i) => items.push(this.row(s, i, t, sample || this.open === s.at)));
|
|
205
|
+
};
|
|
206
|
+
if (sample) rows();
|
|
207
|
+
else if (!now.card) items.push(note("Select a card's tab to see its steps.", t.dim));
|
|
208
|
+
else if (now.key !== this.key) items.push(note("Loading…", t.dim));
|
|
209
|
+
else if (this.error) items.push(note(this.error, t.blocked));
|
|
210
|
+
else if (!this.project) items.push(note("This space is not an entourage project.", t.dim));
|
|
211
|
+
else if (steps.length === 0) items.push(note(`No hand-offs recorded for ${now.card} yet.`, t.dim));
|
|
212
|
+
else rows();
|
|
213
|
+
return v_flex().size_full().min_h(0).bg(t.chrome).text_size(13)
|
|
214
|
+
.child(h_flex().h(31).flex_none().pl(16).pr(14).items_center().justify_between()
|
|
215
|
+
.text_size(11.5).text_color(t.dim)
|
|
216
|
+
.child("Steps")
|
|
217
|
+
.child(div().child(now.card ?? "")))
|
|
218
|
+
.child(v_flex().id("step-list").flex_1().min_h(0).px(8).pb(14)
|
|
219
|
+
.overflow_y_scrollbar().mode("always").children(items));
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "place": "none", "title": "Steps" }
|
package/package.json
CHANGED
package/prompts/task-new.md
CHANGED
|
@@ -3,7 +3,7 @@ Write up Linear card {card} so that it is ready to build. This session is in the
|
|
|
3
3
|
Start with the sdlc-define skill. Each skill ends by recording a hand-off with `entourage task handoff {project} {card}`, as the skill describes. Record each one before you start the next skill, even though you carry straight on: the hand-offs are how I see how each step ended. You are driving this run, so act on the `status` you recorded:
|
|
4
4
|
|
|
5
5
|
- `done`: go straight on to the step in `next`, without waiting for me. `plan` is the sdlc-plan skill and `breakdown` is the sdlc-breakdown skill.
|
|
6
|
-
- `needs-human`: wait for my answer, then carry on with the same skill.
|
|
6
|
+
- `needs-human`: wait for my answer. When it comes, record my answer as the skill describes, then carry on with the same skill.
|
|
7
7
|
- `failed`: stop there. Don't start the next skill.
|
|
8
8
|
|
|
9
9
|
If I ask for a change when I'm approving, sdlc-breakdown tells you which skill makes it. When that skill hands off, go back to sdlc-breakdown, not on to `next`.
|
|
@@ -171,6 +171,7 @@ summary: <one to three sentences on what you did>
|
|
|
171
171
|
flags: <what the human should know but wasn't asked>
|
|
172
172
|
question: <one question>
|
|
173
173
|
options: <the answers you expect, your recommendation first, separated by " | ">
|
|
174
|
+
answer: <what the human said, in a few words>
|
|
174
175
|
reason: <what went wrong, and what you already tried>
|
|
175
176
|
EOF
|
|
176
177
|
```
|
|
@@ -181,12 +182,13 @@ EOF
|
|
|
181
182
|
|---|---|---|
|
|
182
183
|
| `done` | This step's work is on the card and you have read it back | `phase`, `status`, `next`, `summary`, and `flags` if there are any |
|
|
183
184
|
| `needs-human` | You can't go on without an answer or an approval | `phase`, `status`, `question`, `options`, and `summary` if it helps them answer |
|
|
185
|
+
| `answered` | The human has replied to a `needs-human` hand-off | `phase`, `status`, `answer` |
|
|
184
186
|
| `failed` | Something is missing or went wrong, and this skill tells you to stop or doesn't cover it | `phase`, `status`, `reason` |
|
|
185
187
|
|
|
186
188
|
- **If the command refuses the block, fix what it names and run it again.** If it can't record at all, because the command is missing, you are not in an entourage project, or it says the hand-off was not recorded, write the block in your message instead and carry on. Don't make a project or install anything to get it to run.
|
|
187
189
|
- **When you stop for the human, end your message with the block the command printed.** Above it goes only what the human needs and can't read on the card: a section you could not write there, or the summary they approve from.
|
|
188
190
|
- **Wherever this skill says to ask, tell or stop, use the block.** An ask is `needs-human`. Something to tell goes in `flags`. A stop because something is missing or went wrong is `failed`.
|
|
189
|
-
- **`needs-human` is a pause, not an ending.** Wait for the answer,
|
|
191
|
+
- **`needs-human` is a pause, not an ending.** Wait for the answer. When it comes, record it before anything else, as a hand-off with `status: answered` and what they said in a few words. That is how the time spent waiting on them is told from your own work. Then carry on with this step. The step is over only at `done` or `failed`.
|
|
190
192
|
- **Ask one question per block.** If you have two, ask first the one whose answer could change the other. The human can always answer in their own words, so `options` are suggestions.
|
|
191
193
|
- **After `done`, this step is over.** Record the hand-off before anything else. If another step sent you here to revise this section, go back to that step and ignore `next`. Otherwise go on to the step in `next` only if you were asked to run more than this one step, and if you weren't, stop there.
|
|
192
194
|
- **After `failed`, change nothing more.** Leave the card as it is for the human.
|
|
@@ -131,6 +131,7 @@ summary: <one to three sentences on what you did>
|
|
|
131
131
|
flags: <what the human should know but wasn't asked>
|
|
132
132
|
question: <one question>
|
|
133
133
|
options: <the answers you expect, your recommendation first, separated by " | ">
|
|
134
|
+
answer: <what the human said, in a few words>
|
|
134
135
|
reason: <what went wrong, and what you already tried>
|
|
135
136
|
EOF
|
|
136
137
|
```
|
|
@@ -141,12 +142,13 @@ EOF
|
|
|
141
142
|
|---|---|---|
|
|
142
143
|
| `done` | This step's work is on the card and you have read it back | `phase`, `status`, `next`, `summary`, and `flags` if there are any |
|
|
143
144
|
| `needs-human` | You can't go on without an answer or an approval | `phase`, `status`, `question`, `options`, and `summary` if it helps them answer |
|
|
145
|
+
| `answered` | The human has replied to a `needs-human` hand-off | `phase`, `status`, `answer` |
|
|
144
146
|
| `failed` | Something is missing or went wrong, and this skill tells you to stop or doesn't cover it | `phase`, `status`, `reason` |
|
|
145
147
|
|
|
146
148
|
- **If the command refuses the block, fix what it names and run it again.** If it can't record at all, because the command is missing, you are not in an entourage project, or it says the hand-off was not recorded, write the block in your message instead and carry on. Don't make a project or install anything to get it to run.
|
|
147
149
|
- **When you stop for the human, end your message with the block the command printed.** Above it goes only what the human needs and can't read on the card: a section you could not write there, or the summary they approve from.
|
|
148
150
|
- **Wherever this skill says to ask, tell or stop, use the block.** An ask is `needs-human`. Something to tell goes in `flags`. A stop because something is missing or went wrong is `failed`.
|
|
149
|
-
- **`needs-human` is a pause, not an ending.** Wait for the answer,
|
|
151
|
+
- **`needs-human` is a pause, not an ending.** Wait for the answer. When it comes, record it before anything else, as a hand-off with `status: answered` and what they said in a few words. That is how the time spent waiting on them is told from your own work. Then carry on with this step. The step is over only at `done` or `failed`.
|
|
150
152
|
- **Ask one question per block.** If you have two, ask first the one whose answer could change the other. The human can always answer in their own words, so `options` are suggestions.
|
|
151
153
|
- **After `done`, this step is over.** Record the hand-off before anything else. If another step sent you here to revise this section, go back to that step and ignore `next`. Otherwise go on to the step in `next` only if you were asked to run more than this one step, and if you weren't, stop there.
|
|
152
154
|
- **After `failed`, change nothing more.** Leave the card as it is for the human.
|
|
@@ -127,6 +127,7 @@ summary: <one to three sentences on what you did>
|
|
|
127
127
|
flags: <what the human should know but wasn't asked>
|
|
128
128
|
question: <one question>
|
|
129
129
|
options: <the answers you expect, your recommendation first, separated by " | ">
|
|
130
|
+
answer: <what the human said, in a few words>
|
|
130
131
|
reason: <what went wrong, and what you already tried>
|
|
131
132
|
EOF
|
|
132
133
|
```
|
|
@@ -137,12 +138,13 @@ EOF
|
|
|
137
138
|
|---|---|---|
|
|
138
139
|
| `done` | This step's work is on the card and you have read it back | `phase`, `status`, `next`, `summary`, and `flags` if there are any |
|
|
139
140
|
| `needs-human` | You can't go on without an answer or an approval | `phase`, `status`, `question`, `options`, and `summary` if it helps them answer |
|
|
141
|
+
| `answered` | The human has replied to a `needs-human` hand-off | `phase`, `status`, `answer` |
|
|
140
142
|
| `failed` | Something is missing or went wrong, and this skill tells you to stop or doesn't cover it | `phase`, `status`, `reason` |
|
|
141
143
|
|
|
142
144
|
- **If the command refuses the block, fix what it names and run it again.** If it can't record at all, because the command is missing, you are not in an entourage project, or it says the hand-off was not recorded, write the block in your message instead and carry on. Don't make a project or install anything to get it to run.
|
|
143
145
|
- **When you stop for the human, end your message with the block the command printed.** Above it goes only what the human needs and can't read on the card: a section you could not write there, or the summary they approve from.
|
|
144
146
|
- **Wherever this skill says to ask, tell or stop, use the block.** An ask is `needs-human`. Something to tell goes in `flags`. A stop because something is missing or went wrong is `failed`.
|
|
145
|
-
- **`needs-human` is a pause, not an ending.** Wait for the answer,
|
|
147
|
+
- **`needs-human` is a pause, not an ending.** Wait for the answer. When it comes, record it before anything else, as a hand-off with `status: answered` and what they said in a few words. That is how the time spent waiting on them is told from your own work. Then carry on with this step. The step is over only at `done` or `failed`.
|
|
146
148
|
- **Ask one question per block.** If you have two, ask first the one whose answer could change the other. The human can always answer in their own words, so `options` are suggestions.
|
|
147
149
|
- **After `done`, this step is over.** Record the hand-off before anything else. If another step sent you here to revise this section, go back to that step and ignore `next`. Otherwise go on to the step in `next` only if you were asked to run more than this one step, and if you weren't, stop there.
|
|
148
150
|
- **After `failed`, change nothing more.** Leave the card as it is for the human.
|