@johngaynor/entourage 0.0.0-stage → 0.1.2
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 +96 -2
- package/cli/entourage +92 -0
- package/cli/lib/commands.sh +86 -0
- package/cli/lib/common.sh +33 -0
- package/cli/lib/links.sh +93 -0
- package/cli/lib/project.sh +172 -0
- package/cli/lib/task.sh +194 -0
- package/herdr/README.md +185 -0
- package/herdr/layouts/default.json +197 -0
- package/herdr/layouts/test.json +207 -0
- package/herdr/mods/cpu/main.js +90 -0
- package/herdr/mods/cpu/mod.json +1 -0
- package/herdr/mods/layout-switch/main.js +48 -0
- package/herdr/mods/layout-switch/mod.json +1 -0
- package/herdr/projects/template/PROJECT.md +19 -0
- package/package.json +24 -4
- package/prompts/task-new.md +14 -0
- package/skills/sdlc-breakdown/SKILL.md +178 -0
- package/skills/sdlc-define/SKILL.md +153 -0
- package/skills/sdlc-plan/SKILL.md +159 -0
package/cli/lib/task.sh
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# Tasks: a card an agent writes up, then a worktree of each repo on one
|
|
2
|
+
# branch. Sourced by cli/entourage.
|
|
3
|
+
|
|
4
|
+
# A task is one piece of work in a project, usually a Linear card. It has two
|
|
5
|
+
# commands, in the order they are used:
|
|
6
|
+
# task new an agent writes the card up, in a tab in the project's space
|
|
7
|
+
# task start a worktree of each repo on the card's branch, in a tab of its own
|
|
8
|
+
|
|
9
|
+
# A card ID is a team key and a number, like ABC-122.
|
|
10
|
+
CARD_RE='^[A-Za-z][A-Za-z0-9]*-[0-9]+$'
|
|
11
|
+
# The skills the agent writes a card up with, in the order it uses them.
|
|
12
|
+
CARD_SKILLS='sdlc-define sdlc-plan sdlc-breakdown'
|
|
13
|
+
# The agent's first message. {card} and {project} are filled in.
|
|
14
|
+
CARD_PROMPT=$REPO/prompts/task-new.md
|
|
15
|
+
# The agent a new task's tab runs: one word, a command on PATH.
|
|
16
|
+
AGENT=${ENTOURAGE_AGENT:-claude}
|
|
17
|
+
|
|
18
|
+
# Start writing a card up: a tab in the project's space, in the project's
|
|
19
|
+
# folder, running an agent whose first message names the card and the skills.
|
|
20
|
+
# It makes no branch, worktree or task folder; `task start` does that once the
|
|
21
|
+
# card has a type.
|
|
22
|
+
task_new() {
|
|
23
|
+
local name=${1:-} card=${2:-} dir skill prompt
|
|
24
|
+
dir=$(project_dir "$name")
|
|
25
|
+
[ -n "$card" ] ||
|
|
26
|
+
die "which card? Usage: entourage task new $name <card>, like: entourage task new $name ABC-122"
|
|
27
|
+
[[ $card =~ $CARD_RE ]] ||
|
|
28
|
+
die "'$card' is not a card ID like ABC-122. To make a worktree for a branch, use: entourage task start $name <type>/<description>"
|
|
29
|
+
card=$(printf '%s' "$card" | tr '[:lower:]' '[:upper:]')
|
|
30
|
+
# The agent runs in a tab, so Herdr has to be there before anything is opened.
|
|
31
|
+
require_herdr
|
|
32
|
+
herdr_running || die "Herdr is not running. Open it, then run this again."
|
|
33
|
+
command -v "$AGENT" >/dev/null 2>&1 ||
|
|
34
|
+
die "'$AGENT' is not on your PATH, so there is no agent to start. Install it, or set ENTOURAGE_AGENT to the one you use."
|
|
35
|
+
for skill in $CARD_SKILLS; do
|
|
36
|
+
[ -f "$SKILLS_HOME/$skill/SKILL.md" ] ||
|
|
37
|
+
die "the $skill skill is not in $SKILLS_HOME, so the agent could not use it. Run: entourage update"
|
|
38
|
+
done
|
|
39
|
+
[ -f "$CARD_PROMPT" ] || die "the agent's first message is missing from $CARD_PROMPT"
|
|
40
|
+
prompt=$(sed -e "s/{card}/$card/g" -e "s/{project}/$name/g" "$CARD_PROMPT")
|
|
41
|
+
|
|
42
|
+
sync_links "$dir"
|
|
43
|
+
(show_space "$name" "$dir") ||
|
|
44
|
+
die "could not show the space for '$name', so no agent was started."
|
|
45
|
+
# No `space` argument: the tab goes in the selected space, which show_space
|
|
46
|
+
# has just selected or made. argv is the agent and task is its first message.
|
|
47
|
+
herdr_app do tab.new "{\"name\":\"$card\",\"folder\":\"$(json_str "$dir")\",\"argv\":[\"$(json_str "$AGENT")\"],\"task\":\"$(json_str "$prompt")\"}" >/dev/null 2>&1 ||
|
|
48
|
+
die "could not open a tab for $card. Is Herdr open?"
|
|
49
|
+
say "Started $card in the space for '$name'"
|
|
50
|
+
say "The agent writes the card up, then asks you to approve it."
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
# `task start` makes a folder in a project's tasks/ folder, named after its
|
|
54
|
+
# branch's description, holding one git worktree per repo of the project:
|
|
55
|
+
# tasks/abc-122-short-title/api a worktree of api on feat/abc-122-short-title
|
|
56
|
+
|
|
57
|
+
# Branch names follow Conventional Branch 1.1.0 (https://conventionalbranch.org):
|
|
58
|
+
# <type>/<description>. Trunk names (main, master, develop) have no type, so
|
|
59
|
+
# they do not match.
|
|
60
|
+
BRANCH_RE='^(feature|feat|bugfix|fix|hotfix|release|chore|ai|claude|codex|copilot|cursor)/[a-z0-9]+(\.[a-z0-9]+)*(-[a-z0-9]+(\.[a-z0-9]+)*)*$'
|
|
61
|
+
|
|
62
|
+
valid_branch() { [[ ${1:-} =~ $BRANCH_RE ]]; }
|
|
63
|
+
|
|
64
|
+
# A task's name is its branch without the type.
|
|
65
|
+
task_name() { printf '%s\n' "${1#*/}"; }
|
|
66
|
+
|
|
67
|
+
has_origin() { git -C "$1" remote get-url origin >/dev/null 2>&1; }
|
|
68
|
+
resolves() { git -C "$1" rev-parse -q --verify "$2^{commit}" >/dev/null 2>&1; }
|
|
69
|
+
|
|
70
|
+
# Print the ref a repo's new task branch is cut from: the remote's default
|
|
71
|
+
# branch, or the local one in a repo with no origin.
|
|
72
|
+
base_ref() {
|
|
73
|
+
local repo=$1 ref
|
|
74
|
+
if has_origin "$repo"; then
|
|
75
|
+
ref=$(git -C "$repo" symbolic-ref -q --short refs/remotes/origin/HEAD 2>/dev/null) || ref=
|
|
76
|
+
for ref in ${ref:+"$ref"} origin/main origin/master; do
|
|
77
|
+
if resolves "$repo" "$ref"; then printf '%s\n' "$ref"; return; fi
|
|
78
|
+
done
|
|
79
|
+
fi
|
|
80
|
+
for ref in main master; do
|
|
81
|
+
if resolves "$repo" "refs/heads/$ref"; then printf '%s\n' "$ref"; return; fi
|
|
82
|
+
done
|
|
83
|
+
git -C "$repo" rev-parse --abbrev-ref HEAD
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# What the current `task start` is in the middle of making, so that it can be
|
|
87
|
+
# removed if the run fails or is interrupted. Empty when nothing is half-made.
|
|
88
|
+
UNDO_DIR='' UNDO_BRANCH=''
|
|
89
|
+
MADE=() # the repos a worktree has been started in
|
|
90
|
+
|
|
91
|
+
# Remove a half-made task. The task folder and the branch did not exist before
|
|
92
|
+
# the run (task_start checks both), so this never removes someone's work.
|
|
93
|
+
task_undo() {
|
|
94
|
+
local tdir=$UNDO_DIR branch=$UNDO_BRANCH repo
|
|
95
|
+
[ -n "$tdir" ] || return 0
|
|
96
|
+
UNDO_DIR=''
|
|
97
|
+
for repo in ${MADE[@]+"${MADE[@]}"}; do
|
|
98
|
+
git -C "$repo" worktree remove --force "$tdir/${repo##*/}" >/dev/null 2>&1 || true
|
|
99
|
+
git -C "$repo" branch -q -D "$branch" >/dev/null 2>&1 || true
|
|
100
|
+
done
|
|
101
|
+
rm -f "$tdir/CLAUDE.md" "$tdir/AGENTS.md"
|
|
102
|
+
rmdir "$tdir" 2>/dev/null || true
|
|
103
|
+
rmdir "${tdir%/*}" 2>/dev/null || true
|
|
104
|
+
[ ! -e "$tdir" ] || printf 'entourage: could not remove everything in %s\n' "$tdir" >&2
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
task_start() {
|
|
108
|
+
local name=${1:-} branch=${2:-} dir task
|
|
109
|
+
dir=$(project_dir "$name")
|
|
110
|
+
[ -n "$branch" ] ||
|
|
111
|
+
die "which branch? Usage: entourage task start $name <type>/<description> (see https://conventionalbranch.org)"
|
|
112
|
+
valid_branch "$branch" ||
|
|
113
|
+
die "'$branch' is not a branch name entourage accepts. Use <type>/<description>, like: feat/abc-122-short-title (see https://conventionalbranch.org)"
|
|
114
|
+
task=$(task_name "$branch")
|
|
115
|
+
# A task is shown as a tab, so Herdr has to be there before anything is made.
|
|
116
|
+
require_herdr
|
|
117
|
+
herdr_running || die "Herdr is not running. Open it, then run this again."
|
|
118
|
+
|
|
119
|
+
# Check everything before making anything.
|
|
120
|
+
local repos=() bases=() repo base i tdir=$dir/tasks/$task
|
|
121
|
+
while IFS= read -r repo; do repos+=("$repo"); done < <(project_repos "$dir")
|
|
122
|
+
[ "${#repos[@]}" -gt 0 ] ||
|
|
123
|
+
die "project '$name' has no repos. Add one with: entourage project add $name <path>"
|
|
124
|
+
for repo in "${repos[@]}"; do
|
|
125
|
+
is_repo "$repo" || die "$repo is missing or is not a git repo (see: entourage status)"
|
|
126
|
+
done
|
|
127
|
+
[ ! -e "$tdir" ] || die "task '$task' already exists at $tdir"
|
|
128
|
+
# Fetch first, so that the branch check below sees what is on the remote
|
|
129
|
+
# and the task starts from the latest default branch.
|
|
130
|
+
for repo in "${repos[@]}"; do
|
|
131
|
+
has_origin "$repo" || continue
|
|
132
|
+
git -C "$repo" fetch -q origin 2>/dev/null ||
|
|
133
|
+
say " warning: could not fetch ${repo##*/}; starting from what is local"
|
|
134
|
+
done
|
|
135
|
+
for repo in "${repos[@]}"; do
|
|
136
|
+
if resolves "$repo" "refs/heads/$branch" || resolves "$repo" "refs/remotes/origin/$branch"; then
|
|
137
|
+
die "branch '$branch' already exists in ${repo##*/}"
|
|
138
|
+
fi
|
|
139
|
+
base=$(base_ref "$repo" 2>/dev/null) && resolves "$repo" "$base" ||
|
|
140
|
+
die "${repo##*/} has no commit to start a branch from"
|
|
141
|
+
bases+=("$base")
|
|
142
|
+
done
|
|
143
|
+
sync_links "$dir"
|
|
144
|
+
|
|
145
|
+
say "Making task '$task' in $tdir"
|
|
146
|
+
# From here until the worktrees and links are all made, any failure or
|
|
147
|
+
# interruption removes what was made.
|
|
148
|
+
MADE=() UNDO_DIR=$tdir UNDO_BRANCH=$branch
|
|
149
|
+
trap task_undo EXIT
|
|
150
|
+
trap 'exit 130' INT
|
|
151
|
+
trap 'exit 143' TERM
|
|
152
|
+
mkdir -p "$tdir"
|
|
153
|
+
i=0
|
|
154
|
+
for repo in "${repos[@]}"; do
|
|
155
|
+
base=${bases[$i]}; i=$((i + 1))
|
|
156
|
+
# Recorded before the attempt: a failed `worktree add` can leave its branch.
|
|
157
|
+
MADE+=("$repo")
|
|
158
|
+
# --no-track: the branch is new work, not a copy of the default branch, so
|
|
159
|
+
# a plain push or pull must not go to or from it.
|
|
160
|
+
# -f: reuse a path git still has registered for a folder deleted by hand.
|
|
161
|
+
git -C "$repo" worktree add -q -f --no-track -b "$branch" "$tdir/${repo##*/}" "$base" ||
|
|
162
|
+
die "could not make a worktree in ${repo##*/}; the task was not made"
|
|
163
|
+
say " worktree ${repo##*/} (from $base)"
|
|
164
|
+
done
|
|
165
|
+
# With several repos the session starts in the task folder, so the project's
|
|
166
|
+
# doc is linked there for an agent to read.
|
|
167
|
+
if [ "${#repos[@]}" -gt 1 ]; then
|
|
168
|
+
ln -s ../../PROJECT.md "$tdir/CLAUDE.md"
|
|
169
|
+
ln -s ../../PROJECT.md "$tdir/AGENTS.md"
|
|
170
|
+
fi
|
|
171
|
+
UNDO_DIR=''
|
|
172
|
+
trap - EXIT INT TERM
|
|
173
|
+
|
|
174
|
+
# One repo: the tab starts in its worktree, where git and the repo's own
|
|
175
|
+
# docs work as usual. Several: it starts in the task folder above them.
|
|
176
|
+
local folder=$tdir
|
|
177
|
+
[ "${#repos[@]}" -gt 1 ] || folder=$tdir/${repos[0]##*/}
|
|
178
|
+
# The task exists now. If Herdr cannot show it, keep it and say where it is.
|
|
179
|
+
(show_space "$name" "$dir") ||
|
|
180
|
+
die "made the task at $folder but could not show it in Herdr. Open that folder in the project's space yourself."
|
|
181
|
+
# No `space` argument: the tab goes in the selected space, which show_space
|
|
182
|
+
# has just selected or made.
|
|
183
|
+
herdr_app do tab.new "{\"name\":\"$task\",\"folder\":\"$folder\"}" >/dev/null 2>&1 ||
|
|
184
|
+
die "made the task at $folder but could not open its tab. Is Herdr open?"
|
|
185
|
+
say "Opened task '$task' on branch $branch"
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
cmd_task() {
|
|
189
|
+
case ${1:-} in
|
|
190
|
+
new) shift; task_new "$@" ;;
|
|
191
|
+
start) shift; task_start "$@" ;;
|
|
192
|
+
*) die "usage: entourage task new <project> <card>, or: entourage task start <project> <branch> (see: entourage help)" ;;
|
|
193
|
+
esac
|
|
194
|
+
}
|
package/herdr/README.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# herdr
|
|
2
|
+
|
|
3
|
+
Shared setup for the [Herdr](https://herdr.dev) desktop app: mods (panels) and
|
|
4
|
+
layouts (whole-window arrangements of mods).
|
|
5
|
+
|
|
6
|
+
## What's here
|
|
7
|
+
|
|
8
|
+
| Path | What it is |
|
|
9
|
+
|---|---|
|
|
10
|
+
| `mods/cpu/` | Live CPU usage with a scrolling history. macOS only (reads `/usr/bin/top`). |
|
|
11
|
+
| `mods/layout-switch/` | A dropdown that shows the current layout and switches to another. |
|
|
12
|
+
| `layouts/default.json` | Herdr's own layout, plus the layout dropdown. |
|
|
13
|
+
| `layouts/test.json` | `default` plus the CPU mod in the sidebar. |
|
|
14
|
+
| `projects/template/` | The starting `PROJECT.md` for every new project. |
|
|
15
|
+
|
|
16
|
+
The skills are in [../skills/](../skills/), outside this folder. They are
|
|
17
|
+
linked into `~/.claude/skills` (`CLAUDE_CONFIG_DIR` picks another `~/.claude`)
|
|
18
|
+
by the same `entourage install` and `entourage update`.
|
|
19
|
+
|
|
20
|
+
## How it works
|
|
21
|
+
|
|
22
|
+
Herdr reads its whole interface from files in `~/.config/herdr-app`. This repo
|
|
23
|
+
holds the mods and layouts we own, and each machine symlinks them into that
|
|
24
|
+
folder. The linked files are the tracked files, so a `git pull` is all it
|
|
25
|
+
takes to update a machine.
|
|
26
|
+
|
|
27
|
+
Per-machine things stay out of the repo: the Herdr account, `settings.json`,
|
|
28
|
+
`keys.json`, and which layout is showing.
|
|
29
|
+
|
|
30
|
+
## Set up a clean machine
|
|
31
|
+
|
|
32
|
+
1. Install Herdr:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
curl -fsSL https://releases.herdr.dev/app/install.sh | sh
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This installs the Herdr app, herdr-core (which runs the terminals), and the
|
|
39
|
+
`herdr-app` and `hc` commands in `~/.local/bin`.
|
|
40
|
+
|
|
41
|
+
2. Open Herdr once and sign in. The first start creates
|
|
42
|
+
`~/.config/herdr-app` and fills it with Herdr's own mods and layouts.
|
|
43
|
+
|
|
44
|
+
3. Install entourage (needs Node):
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm install -g @johngaynor/entourage
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
4. Run the installer:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
entourage install
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
It links every mod and layout into Herdr and refreshes Herdr if it is
|
|
57
|
+
running. It is safe to re-run, and it never replaces a real file that is
|
|
58
|
+
already in Herdr's folder.
|
|
59
|
+
|
|
60
|
+
5. Pick a layout from the Layout dropdown at the top of the sidebar, or press
|
|
61
|
+
`ctrl-shift-l` to cycle. The dropdown only appears on our layouts, so the
|
|
62
|
+
first switch from Herdr's own layout is `ctrl-shift-l`.
|
|
63
|
+
|
|
64
|
+
## Keeping a machine up to date
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
entourage update
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
This reinstalls the latest entourage through npm, links any mod or layout that
|
|
71
|
+
is new, removes links to ones that were deleted, and refreshes Herdr so it
|
|
72
|
+
re-reads everything.
|
|
73
|
+
|
|
74
|
+
- **Check a machine:** `entourage status` lists each mod and layout and whether
|
|
75
|
+
it is linked.
|
|
76
|
+
- **Remove one from a machine:** delete its link in `~/.config/herdr-app/mods`
|
|
77
|
+
or `layouts`. The next `entourage update` will link it again, so remove it
|
|
78
|
+
from the repo to drop it everywhere.
|
|
79
|
+
- **Herdr updates itself:** it replaces its own shipped mods and layouts on
|
|
80
|
+
every start and leaves ours alone, because ours have different names.
|
|
81
|
+
- **Something broke the window:** `ctrl-alt-shift-escape` always returns Herdr
|
|
82
|
+
to its own default layout.
|
|
83
|
+
|
|
84
|
+
## Projects
|
|
85
|
+
|
|
86
|
+
A project is a group of repos that shows up in Herdr as one space. Only the
|
|
87
|
+
template is in this repo. Your own projects are in
|
|
88
|
+
`~/.config/entourage/projects` (`ENTOURAGE_HOME` picks another
|
|
89
|
+
`~/.config/entourage`), one folder each:
|
|
90
|
+
|
|
91
|
+
| In a project folder | What it is |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `PROJECT.md` | What the project is and what belongs in each repo. You write this. |
|
|
94
|
+
| `repos` | One repo path per line. `entourage project add` writes it; you can edit it. |
|
|
95
|
+
| `links/` | Generated: a link to each repo, named after its folder. |
|
|
96
|
+
| `tasks/` | One folder per task, holding a worktree of each repo. See [Tasks](#tasks). |
|
|
97
|
+
| `CLAUDE.md`, `AGENTS.md` | Generated: links to `PROJECT.md`, so an agent started in the space reads it. |
|
|
98
|
+
|
|
99
|
+
- **Make one:** `entourage project new <name>`, then
|
|
100
|
+
`entourage project add <name> <path>` for each repo. The repo must already
|
|
101
|
+
be cloned on this machine.
|
|
102
|
+
- **Open it:** `entourage project open <name>` rebuilds the links and shows
|
|
103
|
+
the project's space, making it if it is not open. The space's folder is the
|
|
104
|
+
project folder.
|
|
105
|
+
- **Check them:** `entourage status` reports a repo that has moved or gone,
|
|
106
|
+
and a `PROJECT.md` that is still the template. Delete the template's first
|
|
107
|
+
line once you have filled it in.
|
|
108
|
+
- **Remove a repo:** delete its line from `repos`; the next `open` drops its
|
|
109
|
+
link. To remove a project, close its space and delete its folder.
|
|
110
|
+
- **The linked repos are shared.** A repo in two projects is the same clone
|
|
111
|
+
in both, so switching branches in one changes it in the other.
|
|
112
|
+
|
|
113
|
+
## Tasks
|
|
114
|
+
|
|
115
|
+
A task is one piece of work in a project, usually a Linear card. It has two
|
|
116
|
+
commands, used in this order.
|
|
117
|
+
|
|
118
|
+
### Writing the card up
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
entourage task new <project> <card>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- **The card is its ID**, like `ABC-122`. Upper or lower case both work.
|
|
125
|
+
- **It opens a tab named after the card** in the project's space, in the
|
|
126
|
+
project folder, and starts an agent in it. The agent is `claude`;
|
|
127
|
+
`ENTOURAGE_AGENT` picks another command.
|
|
128
|
+
- **The agent's first message** is [prompts/task-new.md](../prompts/task-new.md)
|
|
129
|
+
with the card and project filled in. It tells the agent to run
|
|
130
|
+
`sdlc-define`, `sdlc-plan` and `sdlc-breakdown` in order, in that one
|
|
131
|
+
session, and to wait for your approval at the end. Edit that file to change
|
|
132
|
+
what the agent is told.
|
|
133
|
+
- **It makes no branch, worktree or task folder.** The card has no type until
|
|
134
|
+
the agent has defined it, and the type is the start of the branch name.
|
|
135
|
+
- **It checks first.** An unknown project, something that is not a card ID,
|
|
136
|
+
Herdr not running, no agent on your `PATH`, or the skills not linked into
|
|
137
|
+
`~/.claude/skills` stops it before anything is opened. Run
|
|
138
|
+
`entourage update` to link the skills.
|
|
139
|
+
|
|
140
|
+
### Starting the work
|
|
141
|
+
|
|
142
|
+
One branch, checked out as a git worktree of every repo in the project, and
|
|
143
|
+
shown as a tab in the project's space.
|
|
144
|
+
|
|
145
|
+
```sh
|
|
146
|
+
entourage task start <project> <branch>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
- **The branch is `<type>/<description>`**, following
|
|
150
|
+
[Conventional Branch](https://conventionalbranch.org): `feat/abc-122-insert-task-here`,
|
|
151
|
+
`fix/abc-140-header-bug`, `chore/update-dependencies`. Put the card's ID in
|
|
152
|
+
the description. The types are `feature`, `feat`, `bugfix`, `fix`, `hotfix`,
|
|
153
|
+
`release` and `chore`, plus `ai`, `claude`, `codex`, `copilot` and `cursor`.
|
|
154
|
+
- **The description names the task.** `feat/abc-122-insert-task-here` makes
|
|
155
|
+
the folder `tasks/abc-122-insert-task-here` and a tab of that name.
|
|
156
|
+
- **Each repo gets a worktree** at `tasks/<task>/<repo>`, on the new branch,
|
|
157
|
+
cut from the remote's default branch after a fetch. A repo that cannot be
|
|
158
|
+
fetched starts from what is local, with a warning.
|
|
159
|
+
- **The repos' own checkouts are not touched.** They stay on whatever branch
|
|
160
|
+
they were on.
|
|
161
|
+
- **Where the tab starts:** in the worktree when the project has one repo; in
|
|
162
|
+
the task folder when it has several. That folder has `CLAUDE.md` and
|
|
163
|
+
`AGENTS.md` links to the project's `PROJECT.md`.
|
|
164
|
+
- **Nothing is made unless everything can be.** A task or branch of that name
|
|
165
|
+
that already exists, a missing repo, or Herdr not running stops it first,
|
|
166
|
+
and a worktree that fails partway is undone.
|
|
167
|
+
- **Remove a task by hand for now:** in each repo run
|
|
168
|
+
`git worktree remove <project folder>/tasks/<task>/<repo>` and
|
|
169
|
+
`git branch -D <branch>`, then delete the task's folder and close its tab.
|
|
170
|
+
|
|
171
|
+
## Changing things
|
|
172
|
+
|
|
173
|
+
- Work from a git clone, not the npm install: clone the repo and run
|
|
174
|
+
`cli/entourage install` from it. A clone links Herdr to the working files and
|
|
175
|
+
updates with `git pull`. If the machine was set up through npm first, remove
|
|
176
|
+
the old links in `~/.config/herdr-app/mods` and `layouts` before installing
|
|
177
|
+
from the clone, because existing links are never replaced.
|
|
178
|
+
- Edit files in the clone, not in `~/.config/herdr-app`: the links mean they
|
|
179
|
+
are the same files.
|
|
180
|
+
- Herdr does not notice edits made through a link straight away. Run
|
|
181
|
+
`entourage update --no-pull` to refresh it without pulling.
|
|
182
|
+
- Run `herdr-app check herdr/mods/<name>` after editing a mod.
|
|
183
|
+
- Herdr's shipped layouts and mods are read-only. To build on one, clone it
|
|
184
|
+
(`herdr-app do layout.clone '{"name":"main","as":"<name>"}'`) and move the
|
|
185
|
+
clone here.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "root",
|
|
3
|
+
"cloned_from": {
|
|
4
|
+
"name": "main",
|
|
5
|
+
"version": "0.1.18"
|
|
6
|
+
},
|
|
7
|
+
"type": "row",
|
|
8
|
+
"children": [
|
|
9
|
+
{
|
|
10
|
+
"id": "sidebar",
|
|
11
|
+
"type": "column",
|
|
12
|
+
"children": [
|
|
13
|
+
{
|
|
14
|
+
"id": "brand",
|
|
15
|
+
"type": "block",
|
|
16
|
+
"content": {
|
|
17
|
+
"mod": "workspace-chrome"
|
|
18
|
+
},
|
|
19
|
+
"size": {
|
|
20
|
+
"px": 46
|
|
21
|
+
},
|
|
22
|
+
"window_drag": true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "layout-switch",
|
|
26
|
+
"type": "block",
|
|
27
|
+
"size": {
|
|
28
|
+
"px": 40
|
|
29
|
+
},
|
|
30
|
+
"content": {
|
|
31
|
+
"mod": "layout-switch"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "sidebar-lists",
|
|
36
|
+
"type": "column",
|
|
37
|
+
"children": [
|
|
38
|
+
{
|
|
39
|
+
"id": "spaces",
|
|
40
|
+
"type": "block",
|
|
41
|
+
"content": {
|
|
42
|
+
"mod": "spaces"
|
|
43
|
+
},
|
|
44
|
+
"size": {
|
|
45
|
+
"weight": 1
|
|
46
|
+
},
|
|
47
|
+
"min": 90
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "agents",
|
|
51
|
+
"type": "block",
|
|
52
|
+
"content": {
|
|
53
|
+
"mod": "agents"
|
|
54
|
+
},
|
|
55
|
+
"size": {
|
|
56
|
+
"weight": 1
|
|
57
|
+
},
|
|
58
|
+
"min": 90
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "sidebar-footer",
|
|
64
|
+
"type": "block",
|
|
65
|
+
"content": {
|
|
66
|
+
"mod": "workspace-chrome",
|
|
67
|
+
"props": {
|
|
68
|
+
"footer": true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"size": {
|
|
72
|
+
"px": 69
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"size": {
|
|
77
|
+
"px": 268
|
|
78
|
+
},
|
|
79
|
+
"min": 44,
|
|
80
|
+
"max": 480,
|
|
81
|
+
"background": "chrome",
|
|
82
|
+
"resizable": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "work",
|
|
86
|
+
"type": "column",
|
|
87
|
+
"children": [
|
|
88
|
+
{
|
|
89
|
+
"id": "tabs",
|
|
90
|
+
"type": "block",
|
|
91
|
+
"content": {
|
|
92
|
+
"mod": "tabs"
|
|
93
|
+
},
|
|
94
|
+
"size": {
|
|
95
|
+
"px": 42
|
|
96
|
+
},
|
|
97
|
+
"window_drag": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "work-body",
|
|
101
|
+
"type": "row",
|
|
102
|
+
"children": [
|
|
103
|
+
{
|
|
104
|
+
"id": "main",
|
|
105
|
+
"type": "block",
|
|
106
|
+
"content": {
|
|
107
|
+
"tab": "active",
|
|
108
|
+
"pane": {
|
|
109
|
+
"header": {
|
|
110
|
+
"content": {
|
|
111
|
+
"mod": "pane"
|
|
112
|
+
},
|
|
113
|
+
"reveal": "always",
|
|
114
|
+
"height": 30,
|
|
115
|
+
"position": "top"
|
|
116
|
+
},
|
|
117
|
+
"background": "background",
|
|
118
|
+
"border": {
|
|
119
|
+
"width": 1,
|
|
120
|
+
"color": "border"
|
|
121
|
+
},
|
|
122
|
+
"focus": {
|
|
123
|
+
"width": 1,
|
|
124
|
+
"color": "accent"
|
|
125
|
+
},
|
|
126
|
+
"radius": 10,
|
|
127
|
+
"gap": 8,
|
|
128
|
+
"lone": true
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "panel",
|
|
134
|
+
"type": "column",
|
|
135
|
+
"children": [
|
|
136
|
+
{
|
|
137
|
+
"id": "panel-body",
|
|
138
|
+
"type": "stack",
|
|
139
|
+
"children": [
|
|
140
|
+
{
|
|
141
|
+
"id": "files",
|
|
142
|
+
"type": "block",
|
|
143
|
+
"content": {
|
|
144
|
+
"mod": "files"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "changes",
|
|
149
|
+
"type": "block",
|
|
150
|
+
"content": {
|
|
151
|
+
"mod": "changes"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"active": "files"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"size": {
|
|
159
|
+
"px": 368
|
|
160
|
+
},
|
|
161
|
+
"min": 280,
|
|
162
|
+
"max": 900,
|
|
163
|
+
"hidden": true
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"padding": 8,
|
|
167
|
+
"gap": 8
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"id": "status",
|
|
171
|
+
"type": "block",
|
|
172
|
+
"content": {
|
|
173
|
+
"mod": "workspace-status"
|
|
174
|
+
},
|
|
175
|
+
"size": {
|
|
176
|
+
"px": 28
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"resizable": false
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"background": "canvas",
|
|
184
|
+
"terminal_padding": [
|
|
185
|
+
14,
|
|
186
|
+
12
|
|
187
|
+
],
|
|
188
|
+
"divider": {
|
|
189
|
+
"width": 1,
|
|
190
|
+
"color": "border"
|
|
191
|
+
},
|
|
192
|
+
"titlebar": "none",
|
|
193
|
+
"traffic_lights": [
|
|
194
|
+
12,
|
|
195
|
+
16
|
|
196
|
+
]
|
|
197
|
+
}
|