@johngaynor/entourage 0.4.1-next.30 → 0.4.1-next.34
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 +20 -4
- package/cli/entourage +7 -2
- package/cli/lib/handoff.sh +3 -2
- package/cli/lib/task.sh +8 -0
- package/herdr/README.md +11 -3
- package/package.json +1 -1
- package/skills/sdlc-build/SKILL.md +158 -0
package/README.md
CHANGED
|
@@ -4,13 +4,14 @@ A collection of agent skills for the software development lifecycle (SDLC).
|
|
|
4
4
|
|
|
5
5
|
## Status
|
|
6
6
|
|
|
7
|
-
Early setup.
|
|
7
|
+
Early setup. Four skills are in, and they have had only a few runs on real cards:
|
|
8
8
|
|
|
9
9
|
| Skill | What it does |
|
|
10
10
|
|---|---|
|
|
11
11
|
| `sdlc-define` | Sets a card's type and writes its Specification |
|
|
12
12
|
| `sdlc-plan` | Reads the card and the code, and writes the Plan |
|
|
13
13
|
| `sdlc-breakdown` | Decides whether the card is one piece or several slices, then asks you to approve it |
|
|
14
|
+
| `sdlc-build` | Builds an approved card in its task: makes the change the Plan describes, runs the tests and commits, pushing nothing |
|
|
14
15
|
|
|
15
16
|
They live in [skills/](skills/). `entourage install` links them into
|
|
16
17
|
`~/.claude/skills`, so any Claude Code session on the machine can run one by
|
|
@@ -130,12 +131,27 @@ the description. The description names the task:
|
|
|
130
131
|
web/ a worktree of web on the same branch
|
|
131
132
|
```
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
Setup is off for now, while the local environment each task gets is worked
|
|
135
|
+
out. With `ENTOURAGE_SETUP=1`, a repo that has a `justfile` with a `setup`
|
|
136
|
+
recipe gets `just setup` run in the task's tab, so the checkout is ready to
|
|
137
|
+
work in. See [what a repo provides](herdr/README.md#what-a-repo-provides).
|
|
136
138
|
|
|
137
139
|
See [herdr/README.md](herdr/README.md#tasks) for the details.
|
|
138
140
|
|
|
141
|
+
To build the card, start an agent in the task's tab, such as `claude`, and
|
|
142
|
+
ask it to build the card with the `sdlc-build` skill:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
/sdlc-build ABC-122
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
It reads the card's Plan, makes the change in the task's worktrees, runs the
|
|
149
|
+
tests and commits on the task's branch. It pushes nothing and opens no pull
|
|
150
|
+
request, so the commits wait for you there. Like the write-up, it records how
|
|
151
|
+
it ended, and `task log` shows it: `done` only when the tests pass,
|
|
152
|
+
`needs-human` with a question, or `failed` with the reason. A card with no
|
|
153
|
+
Plan is not built.
|
|
154
|
+
|
|
139
155
|
To work on entourage itself, clone the repo and run `cli/entourage install`
|
|
140
156
|
from the clone instead. Run the CLI's tests with `npm test`. The cases run
|
|
141
157
|
side by side, one per processor; `ENTOURAGE_TEST_JOBS=1 npm test` runs them
|
package/cli/entourage
CHANGED
|
@@ -51,11 +51,16 @@ sdlc-define, sdlc-plan and sdlc-breakdown skills and asks you to approve it.
|
|
|
51
51
|
`task start` takes a branch, <type>/<description>, like
|
|
52
52
|
feat/abc-122-short-title (https://conventionalbranch.org). It makes a folder
|
|
53
53
|
in the project's tasks/ folder with a worktree of each repo on that branch,
|
|
54
|
-
and opens a tab for it.
|
|
55
|
-
|
|
54
|
+
and opens a tab for it. Setup is off for now: with ENTOURAGE_SETUP=1, a
|
|
55
|
+
repo with a justfile that has a `setup` recipe gets `just setup` run in that
|
|
56
|
+
tab, so the checkout is ready to work in.
|
|
56
57
|
Targets after the branch narrow the task: `app` takes only that repo, and
|
|
57
58
|
`app:athlete` sets it up for its athlete group (`just setup athlete`).
|
|
58
59
|
Join several groups with a comma: `app:athlete,coach`.
|
|
60
|
+
To build the card once its task is started, start an agent in the task's tab
|
|
61
|
+
and ask it to build the card with the sdlc-build skill (`/sdlc-build ABC-122`).
|
|
62
|
+
It makes the change the card's Plan describes, runs the tests and commits on
|
|
63
|
+
the task's branch. It pushes nothing and opens no pull request.
|
|
59
64
|
`task handoff` is run by the agent each time a step ends or pauses, and
|
|
60
65
|
when the human answers a question. It reads a handoff block on stdin (phase,
|
|
61
66
|
status, next and so on, one per line), refuses one that breaks the rules, and
|
package/cli/lib/handoff.sh
CHANGED
|
@@ -14,8 +14,9 @@ SQLITE=${ENTOURAGE_SQLITE:-sqlite3}
|
|
|
14
14
|
|
|
15
15
|
# The lines a block can have, in the order they are printed.
|
|
16
16
|
HANDOFF_KEYS='phase status next summary flags question options answer reason'
|
|
17
|
-
# The steps a block can name as its phase or as what comes next.
|
|
18
|
-
|
|
17
|
+
# The steps a block can name as its phase or as what comes next. setup and
|
|
18
|
+
# review are only names for now: nothing hands off as either of them yet.
|
|
19
|
+
HANDOFF_STEPS='define plan breakdown setup build review'
|
|
19
20
|
# A block is a summary. A line longer than this is not one, and a very long
|
|
20
21
|
# line is slow to check and too big to hand to sqlite3 as an argument.
|
|
21
22
|
HANDOFF_LINE_MAX=2000
|
package/cli/lib/task.sh
CHANGED
|
@@ -116,11 +116,19 @@ task_undo() {
|
|
|
116
116
|
# here, so that `task start` returns at once and the install is on screen
|
|
117
117
|
# where the work will happen. Nothing in this step can fail the task: by now
|
|
118
118
|
# it exists and its tab is open.
|
|
119
|
+
#
|
|
120
|
+
# Setup is off unless ENTOURAGE_SETUP is 1, while the local environment each
|
|
121
|
+
# task gets is still being worked out: a recipe that starts a whole stack
|
|
122
|
+
# should not run for every task in the meantime.
|
|
119
123
|
# $1 the task's folder $2 what `tab.new` printed $3... the task's repos
|
|
120
124
|
run_setup() {
|
|
121
125
|
local tdir=$1 tab=$2 repo name line='' term count ready=() groups i=0
|
|
122
126
|
shift 2
|
|
123
127
|
count=$#
|
|
128
|
+
if [ "${ENTOURAGE_SETUP:-}" != 1 ]; then
|
|
129
|
+
say " setup not run: it is off for now (ENTOURAGE_SETUP=1 turns it on)"
|
|
130
|
+
return 0
|
|
131
|
+
fi
|
|
124
132
|
if ! have_just; then
|
|
125
133
|
say " setup skipped: just is not installed (https://just.systems)"
|
|
126
134
|
return 0
|
package/herdr/README.md
CHANGED
|
@@ -245,8 +245,11 @@ the card up.
|
|
|
245
245
|
### Hand-offs
|
|
246
246
|
|
|
247
247
|
Each step of a write-up ends by handing off: which step it was, how it ended
|
|
248
|
-
(`done`, `needs-human` or `failed`) and what comes next.
|
|
249
|
-
|
|
248
|
+
(`done`, `needs-human` or `failed`) and what comes next. So does the build,
|
|
249
|
+
which the `sdlc-build` skill runs in a started task: it hands off as `build`,
|
|
250
|
+
`done` only when the tests pass, with `review` next. Nothing runs a review
|
|
251
|
+
yet, so the build's commits wait on the task's branch for you. The agent records
|
|
252
|
+
each hand-off itself, with the block on stdin:
|
|
250
253
|
|
|
251
254
|
```sh
|
|
252
255
|
entourage task handoff <project> <card> <<'EOF'
|
|
@@ -340,6 +343,10 @@ entourage task start <project> <branch> [<repo>[:<group>[,<group>...]] ...]
|
|
|
340
343
|
- **Where the tab starts:** in the worktree when the task has one repo; in
|
|
341
344
|
the task folder when it has several. That folder has `CLAUDE.md` and
|
|
342
345
|
`AGENTS.md` links to the project's `PROJECT.md`.
|
|
346
|
+
- **Setup is off for now**, while the local environment each task gets is
|
|
347
|
+
worked out. The output says it was not run. Set `ENTOURAGE_SETUP=1` (see
|
|
348
|
+
[entourage's variables](#entourages-variables)) to turn it on. The next
|
|
349
|
+
two points describe it when it is on, and groups in targets only matter then.
|
|
343
350
|
- **Setup runs in the tab.** For each repo that has a `setup` recipe (see
|
|
344
351
|
[What a repo provides](#what-a-repo-provides)), `just setup`, followed by
|
|
345
352
|
the target's groups if it named any, is typed into
|
|
@@ -365,7 +372,7 @@ have the same names in every repo. entourage only knows the names.
|
|
|
365
372
|
|
|
366
373
|
| Recipe | What it must do | Used by |
|
|
367
374
|
|---|---|---|
|
|
368
|
-
| `setup` | Make a fresh checkout ready to work in: install dependencies and anything else a new worktree lacks. Safe to run twice. Called with group names (`just setup athlete coach`), make ready only what those groups need, and fail with a clear message for a group the repo does not have. | `entourage task start` |
|
|
375
|
+
| `setup` | Make a fresh checkout ready to work in: install dependencies and anything else a new worktree lacks. Safe to run twice. Called with group names (`just setup athlete coach`), make ready only what those groups need, and fail with a clear message for a group the repo does not have. | `entourage task start`, when `ENTOURAGE_SETUP=1` |
|
|
369
376
|
|
|
370
377
|
```just
|
|
371
378
|
setup:
|
|
@@ -395,6 +402,7 @@ shell, or written as a `NAME=value` line in entourage's env file,
|
|
|
395
402
|
| `LINEAR_API_KEY` | Your Linear API key. `entourage linear key` writes this line for you. |
|
|
396
403
|
| `ENTOURAGE_AGENT` | The agent `task new` starts. `claude` when it is not set. |
|
|
397
404
|
| `ENTOURAGE_SQLITE` | The command that records hand-offs. `sqlite3` when it is not set. |
|
|
405
|
+
| `ENTOURAGE_SETUP` | `1` makes `task start` run each repo's `setup` recipe. Off when it is not set, for now. |
|
|
398
406
|
| `HERDR_APP_HOME` | Herdr's folder. `~/.config/herdr-app` when it is not set. |
|
|
399
407
|
| `CLAUDE_CONFIG_DIR` | Claude Code's folder, where skills are linked. `~/.claude` when it is not set. |
|
|
400
408
|
| `ENTOURAGE_HOME` | entourage's own folder. `~/.config/entourage` when it is not set. Export only: it says where the env file is, so the file cannot set it. |
|
package/package.json
CHANGED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdlc-build
|
|
3
|
+
description: Build an approved Linear card in the task that `entourage task start` made for it, by reading the card's Plan, making the change in the task's worktree, running the tests and committing on the task's branch, then recording how the build ended. Use this once a card is approved and its task started, whenever asked to build, implement or code a card in that task, even if the request only says "build ABC-123". It pushes nothing and opens no pull request.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Build a card
|
|
7
|
+
|
|
8
|
+
Build is the step after the human has approved the card. Define said what is wanted, plan said how it will be built, and breakdown cut it into pieces the human approved. Build makes the change that the Plan describes, in the task's worktree, and shows that each Done when item is true.
|
|
9
|
+
|
|
10
|
+
The human is not watching while it runs. They read the commits and the hand-off afterwards, so the commits have to match the Plan, and the hand-off has to say plainly how the build ended and what it could not show.
|
|
11
|
+
|
|
12
|
+
Build ends with commits on the task's branch. Push nothing and open no pull request. Review, pushing and the pull request come after this step.
|
|
13
|
+
|
|
14
|
+
## Before you change anything
|
|
15
|
+
|
|
16
|
+
1. Get the card. If you weren't given a card ID, ask for one.
|
|
17
|
+
2. Read the card with the Linear tools: the original description, the Specification, the Plan and the Breakdown, and the comments.
|
|
18
|
+
3. If the card has no Plan, plan hasn't run, and the card was not approved to build. Change nothing, and hand off as `failed`, saying so.
|
|
19
|
+
4. If the Breakdown cut the card into several slices, each slice is a sub-issue with a Plan of its own. Build the sub-issue, not this card. Change nothing, and hand off as `failed`, naming the sub-issue that comes first.
|
|
20
|
+
5. Check where you are. The work goes in the task's worktrees, which `entourage task start` made under the project's `tasks/` folder, one for each repo, all on the task's branch. Run `git branch --show-current` in each one. The branch has to name this card, as in `feat/abc-122-short-name`. If you are in a repo's own checkout, on its default branch, or on a branch for another card, change nothing and hand off as `failed`, saying where you are.
|
|
21
|
+
6. Run `git status` in each worktree. A new task's worktree has no changes. If one has changes that aren't yours, don't touch them: ask the human what to do with them.
|
|
22
|
+
|
|
23
|
+
## 1. Read how the repo works
|
|
24
|
+
|
|
25
|
+
Read the guidance in each worktree you will change: its `CLAUDE.md`, `AGENTS.md`, `README` and any `CONTRIBUTING` file. Look for three things:
|
|
26
|
+
|
|
27
|
+
- **How it is tested.** The command that runs the tests, and how to run only some of them.
|
|
28
|
+
- **How commits are written.** The form of a commit message, and anything a commit must never contain.
|
|
29
|
+
- **Rules for a change like this one.** A file that must not be edited by hand, a list that a new file must be added to, a version that only a release changes.
|
|
30
|
+
|
|
31
|
+
Then run the tests once, before you change anything. A test that fails now is not one you broke, and you need to know that before you start. If any fail, ask the human whether to build on top of them.
|
|
32
|
+
|
|
33
|
+
## 2. Build what the Plan says
|
|
34
|
+
|
|
35
|
+
Work through the Done when items in order, one at a time. For each one:
|
|
36
|
+
|
|
37
|
+
1. Take its test from the Plan's Tests line for that item. Write the test first where the Plan names one, and run it to see it fail for the reason you expect.
|
|
38
|
+
2. Make the change the Plan's Changes list gives for it, in the files it names. Reuse the helpers it names.
|
|
39
|
+
3. Run the test again and see it pass.
|
|
40
|
+
|
|
41
|
+
Each path in Changes starts with the repo's name, and that repo's worktree is the folder of the same name in the task. A task with one repo is its worktree.
|
|
42
|
+
|
|
43
|
+
Stay inside the Plan. The human approved this Plan, not a better one you could write now:
|
|
44
|
+
|
|
45
|
+
- **The code differs from the Plan in a detail** that changes nothing they approved, such as a helper with another name or a file that moved. Follow the code, and say so in the summary when you hand off.
|
|
46
|
+
- **The Plan can't be built as written.** Following it would change what they approved: a Done when item that can't be met, a different approach, a new dependency, or a repo the task has no worktree of. Ask the human before going any further, in a handoff block with `status: needs-human` and your recommendation first in `options`.
|
|
47
|
+
- **Something outside the Plan.** You may find a nearby bug, a missing test or a refactor that would help. Leave it alone and put it in `flags` when you hand off.
|
|
48
|
+
|
|
49
|
+
Build changes nothing on the card. The hand-off records how the build ended.
|
|
50
|
+
|
|
51
|
+
## 3. Run the tests
|
|
52
|
+
|
|
53
|
+
When every Done when item has its change, run the repo's whole test suite, in every worktree you changed. A build is done only when the tests pass.
|
|
54
|
+
|
|
55
|
+
If a test fails, find out why and fix it. Change a test only when the Plan changes what that test checks. A test made to pass by weakening it is a failure you have hidden from the human.
|
|
56
|
+
|
|
57
|
+
If the tests can't run at all, because the worktree isn't set up and something they need is missing, don't install anything to get them running. Ask the human, saying what is missing.
|
|
58
|
+
|
|
59
|
+
## 4. Commit
|
|
60
|
+
|
|
61
|
+
Commit on the task's branch, in each worktree you changed, by the repo's own rules for commits. Where the repo has none, write a Conventional Commits message whose type is the card's type, such as `feat: export orders as CSV`.
|
|
62
|
+
|
|
63
|
+
- Commit only when the tests pass.
|
|
64
|
+
- Leave nothing behind: `git status` shows no changes when you are done.
|
|
65
|
+
- Don't skip the repo's commit hooks. If a hook refuses the commit, fix what it names and commit again.
|
|
66
|
+
- Push nothing and open no pull request.
|
|
67
|
+
|
|
68
|
+
## 5. Hand off
|
|
69
|
+
|
|
70
|
+
When the commits are made and the tests pass, record the hand-off. Build is not finished until it is recorded:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
entourage task handoff <project> <card ID> <<'EOF'
|
|
74
|
+
phase: build
|
|
75
|
+
status: done
|
|
76
|
+
next: review
|
|
77
|
+
summary: <what was built, in which repos, how many commits, and that the tests pass; any detail where you followed the code rather than the Plan>
|
|
78
|
+
flags: <any Done when item you could not show to be true, and why; anything you found outside the Plan>
|
|
79
|
+
EOF
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Put your own words in place of each hint in angle brackets, and leave the `flags` line out when there is nothing to flag. Hand off as `done` only when the tests pass. When they can't be made to pass, or something is missing, hand off as `failed`, with what is wrong and what you tried in `reason`, and leave the work as it is for the human.
|
|
83
|
+
|
|
84
|
+
Review is not a skill yet, so there is no step for you to go on to.
|
|
85
|
+
|
|
86
|
+
## The handoff block
|
|
87
|
+
|
|
88
|
+
Every step of the lifecycle ends the same way, so whoever is driving it, a person or a script, can tell how the step ended without reading the whole session.
|
|
89
|
+
|
|
90
|
+
Record a hand-off every time this step ends or pauses: when the step is finished, when you need an answer, and when something has gone wrong. Record it even when you go straight on to another step, because the record is what shows this one ended. Run `entourage task handoff` with the block on stdin, one value per line:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
entourage task handoff <project> <card ID> <<'EOF'
|
|
94
|
+
phase: <this step>
|
|
95
|
+
status: <done, needs-human or failed>
|
|
96
|
+
next: <the step that follows>
|
|
97
|
+
summary: <one to three sentences on what you did>
|
|
98
|
+
flags: <what the human should know but wasn't asked>
|
|
99
|
+
question: <one question>
|
|
100
|
+
options: <the answers you expect, your recommendation first, separated by " | ">
|
|
101
|
+
answer: <what the human said, in a few words>
|
|
102
|
+
reason: <what went wrong, and what you already tried>
|
|
103
|
+
EOF
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`<project>` is the entourage project this session is in. The words in angle brackets are hints: put your own in their place. The command checks the block, records it and prints it back. Which lines you write depends on the status:
|
|
107
|
+
|
|
108
|
+
| Status | Use it when | Lines |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `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 |
|
|
111
|
+
| `needs-human` | You can't go on without an answer or an approval | `phase`, `status`, `question`, `options`, and `summary` if it helps them answer |
|
|
112
|
+
| `answered` | The human has replied to a `needs-human` hand-off | `phase`, `status`, `answer` |
|
|
113
|
+
| `failed` | Something is missing or went wrong, and this skill tells you to stop or doesn't cover it | `phase`, `status`, `reason` |
|
|
114
|
+
|
|
115
|
+
- **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.
|
|
116
|
+
- **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.
|
|
117
|
+
- **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`.
|
|
118
|
+
- **`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`.
|
|
119
|
+
- **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.
|
|
120
|
+
- **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.
|
|
121
|
+
- **After `failed`, change nothing more.** Leave the card as it is for the human.
|
|
122
|
+
|
|
123
|
+
## If something goes wrong
|
|
124
|
+
|
|
125
|
+
| When this happens | Do this |
|
|
126
|
+
|---|---|
|
|
127
|
+
| The card ID doesn't resolve | Ask the human for the ID. Don't pick a card because its title looks similar |
|
|
128
|
+
| The Linear tools aren't available | Hand off as `failed`. Don't build from memory of the card or from its title |
|
|
129
|
+
| A repo the Plan changes has no worktree in the task | Ask the human. The task may have been started with targets that left it out |
|
|
130
|
+
| A path in the Plan doesn't exist | Find the real one. If there isn't one, and the file isn't marked as new, ask the human |
|
|
131
|
+
| A test fails before you have changed anything | Ask the human whether to build on top of it. Don't fix it as part of this card |
|
|
132
|
+
| A commit hook refuses the commit | Fix what it names and commit again. Never skip the hook |
|
|
133
|
+
| The tests still fail after you have tried what you can | Hand off as `failed`, with the failing tests and what you tried. Leave the work uncommitted in the worktree |
|
|
134
|
+
|
|
135
|
+
If something fails that isn't on this list, stop and tell the human what happened. Don't work around it.
|
|
136
|
+
|
|
137
|
+
## Example
|
|
138
|
+
|
|
139
|
+
**From the card's Plan**
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
**Tests:**
|
|
143
|
+
1. Button shows for a manager: component test in `OrdersPage.test.tsx`
|
|
144
|
+
2. Columns, and one row per order: API test in `test_orders_export.py`
|
|
145
|
+
3. Same filters and range as on screen: API test with a filtered request, and a component test that the filters are passed
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**The hand-off at the end**
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
entourage task handoff shop ABC-122 <<'EOF'
|
|
152
|
+
phase: build
|
|
153
|
+
status: done
|
|
154
|
+
next: review
|
|
155
|
+
summary: Built the CSV export in api and the Download CSV button in web, in two commits. Both test suites pass. The CSV helper is csv_rows in shop/api/app/common/export.py, not csv_stream as the Plan said.
|
|
156
|
+
flags: The orders page's tests can't set its filters yet, so item 3 is shown by the API test alone. The orders list also ignores the date range on page 2, which is outside this card.
|
|
157
|
+
EOF
|
|
158
|
+
```
|