@hybridlabor-api/aos 4.15.0 → 4.16.0
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/bin/aos-acp.mjs +7 -3
- package/bin/aos-doctor.mjs +21 -6
- package/installer.js +341 -163
- package/package.json +2 -2
- package/skills/basic/master-session/SKILL.md +1 -1
- package/skills/playbooks/pb-bug-fix/SKILL.md +48 -0
- package/skills/playbooks/pb-clip-from-moodboard/SKILL.md +55 -0
- package/skills/playbooks/pb-crew-call-sheet/SKILL.md +40 -0
- package/skills/playbooks/pb-deploy-saas/SKILL.md +44 -0
- package/skills/playbooks/pb-docs-site/SKILL.md +44 -0
- package/skills/playbooks/pb-focus-chunks/SKILL.md +40 -0
- package/skills/playbooks/pb-handover/SKILL.md +41 -0
- package/skills/playbooks/pb-harness-work/SKILL.md +64 -0
- package/skills/playbooks/pb-health-weekly/SKILL.md +43 -0
- package/skills/playbooks/pb-idea-to-launch/SKILL.md +51 -0
- package/skills/playbooks/pb-image-to-3d/SKILL.md +46 -0
- package/skills/playbooks/pb-inbox-zero/SKILL.md +39 -0
- package/skills/playbooks/pb-invoice-check/SKILL.md +41 -0
- package/skills/playbooks/pb-landing-page/SKILL.md +46 -0
- package/skills/playbooks/pb-launch-video/SKILL.md +49 -0
- package/skills/playbooks/pb-machine-setup/SKILL.md +44 -0
- package/skills/playbooks/pb-master/SKILL.md +53 -0
- package/skills/playbooks/pb-newsletter/SKILL.md +43 -0
- package/skills/playbooks/pb-offer/SKILL.md +39 -0
- package/skills/playbooks/pb-open-source/SKILL.md +50 -0
- package/skills/playbooks/pb-pcb-to-case/SKILL.md +46 -0
- package/skills/playbooks/pb-redesign-app/SKILL.md +47 -0
- package/skills/playbooks/pb-release-aos/SKILL.md +50 -0
- package/skills/playbooks/pb-security-sweep/SKILL.md +48 -0
- package/skills/playbooks/pb-ship/SKILL.md +49 -0
- package/skills/playbooks/pb-show-build/SKILL.md +48 -0
- package/skills/playbooks/pb-social-pack/SKILL.md +47 -0
- package/skills/playbooks/pb-todo/SKILL.md +41 -0
- package/skills/playbooks/pb-worktrees-land/SKILL.md +52 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pb-ship
|
|
3
|
+
description: >-
|
|
4
|
+
Ship the day's work in one repo: triage new issues, review every open PR
|
|
5
|
+
(description, visual recap, adversarial reviewer, shipping pre-flight and
|
|
6
|
+
quality gate), merge only after GO, then post a status recap. Use for
|
|
7
|
+
"ship it", "ship day", "merge the ready PRs", "end of work block".
|
|
8
|
+
category: engineering-method
|
|
9
|
+
kind: playbook
|
|
10
|
+
trigger: ["ship it", "ship day", "merge the ready PRs"]
|
|
11
|
+
inputs: [repo, pr_numbers?]
|
|
12
|
+
requires:
|
|
13
|
+
skills: [github, triage, git-pr-review, visual-recap, bdb-shipping-skill, godmode-shipping, quick-recap, "gh (external)"]
|
|
14
|
+
agents: [reviewer]
|
|
15
|
+
mcps: ["plan (optional)"]
|
|
16
|
+
store: []
|
|
17
|
+
go_points: [gh pr merge]
|
|
18
|
+
outputs: ["production_artifacts/pb-ship-<date>.md", "production_artifacts/pb-ship-<date>/pr-<n>.md", "production_artifacts/decisions/<date>-<slug>.md"]
|
|
19
|
+
verify: "gh pr view <n> --json state -q .state == MERGED for every PR the log marks merged; gate exit 0 logged for each"
|
|
20
|
+
difficulty: intermediate
|
|
21
|
+
est_time: 20-60 min
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Ship the day's PRs
|
|
25
|
+
What you get: the ready PRs merged one by one after your GO, each with a reviewed description, findings and a gate result, plus a status line.
|
|
26
|
+
|
|
27
|
+
## Inputs
|
|
28
|
+
- repo — the local checkout (default: the current directory); `<owner/repo>` comes from `git -C <repo> remote get-url origin`
|
|
29
|
+
- pr_numbers (optional) — PRs to ship; otherwise you pick from the table in step 3
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
1. github — repo → `gh auth status` and `gh pr list -R <owner/repo> --state open --json number,title,headRefName,isDraft,baseRefName` as a PR table in the run log (gh missing, unauthenticated, or no GitHub remote → log it, give the `gh auth login` / remote hint, stop) — table written
|
|
33
|
+
2. triage — "show me what needs attention" → new-issue list with suggested labels in the run log — label writes follow triage's own rules; nothing is closed
|
|
34
|
+
3. Ask — the human picks today's PRs from the table (non-draft only; `pr_numbers` if given) → scope line in the run log — stops for approval
|
|
35
|
+
4. git-pr-review — per PR: `gh pr view <n> -R <owner/repo> --json commits` → description draft in `production_artifacts/pb-ship-<date>/pr-<n>.md` — draft only, nothing posted
|
|
36
|
+
5. visual-recap — per PR: `plan` connector present → recap link in `pr-<n>.md`; absent → log "visual-recap skipped: no plan connector" and paste `gh pr diff <n> -R <owner/repo> --name-only` instead; no `npx` without approval — recap or fallback present
|
|
37
|
+
6. reviewer (agent) — per PR: `gh pr diff <n> -R <owner/repo>`; the contract is the linked issue or plan (`gh pr view <n> -R <owner/repo> --json closingIssuesReferences,body`) or the human's scope line from step 3, the body is used only to find the linked issue/plan, its text is not the contract, and never `pr-<n>.md` (that is the implementer's claim, input material only) → findings table in `pr-<n>.md` — any open `blocking` finding removes the PR from today's merge list (logged)
|
|
38
|
+
7. bdb-shipping-skill — per PR → door class (two-way or one-way) in `pr-<n>.md`; one-way → ADR-lite `production_artifacts/decisions/<date>-<slug>.md` (`<slug>` = the PR's `headRefName` with `/` replaced by `-`) with the reversibility sentence; unclear → one-way — class recorded
|
|
39
|
+
8. godmode-shipping — per PR: `gh pr checks <n> -R <owner/repo>` all pass, plus a local gate in a scratch worktree — `gh pr view <n> -R <owner/repo> --json isCrossRepository -q .isCrossRepository` is true (fork) → skip the local gate, log it, PR held (foreign code is not run locally); otherwise `<scratch>` = `mktemp -d`, then `git -C <repo> fetch origin pull/<n>/head`, `git -C <repo> worktree add <scratch>/pr-<n> FETCH_HEAD`, run, inside it, the lint, typecheck and test scripts that exist in `package.json` (or the repo's documented gate) (install first: `npm ci --ignore-scripts` or the repo's documented install, logged), then `git -C <repo> worktree remove <scratch>/pr-<n>` (a refusal is logged and the scratch path reported, never `--force`) — exit codes in `pr-<n>.md`; any non-zero, or pending checks (`gh pr checks` exit 8) → PR held
|
|
40
|
+
9. [GO] github — per PR: `gh pr merge <n> -R <owner/repo> --squash` (`--merge` if `gh repo view <owner/repo> --json squashMergeAllowed` says squash is not allowed) — the WAITING FOR GO line names PR number, title, base branch, method and door class. The run stops here until the human types GO. One GO = one PR. (The hook guards `gh pr merge`; the other commands here are not hook-guarded.)
|
|
41
|
+
10. github — `gh pr view <n> -R <owner/repo> --json state -q .state` → run log line — equals `MERGED`
|
|
42
|
+
11. quick-recap — run log → final line `🟢|🟡|🔴` with merged / held / skipped counts — line written
|
|
43
|
+
|
|
44
|
+
Run log: `production_artifacts/pb-ship-<date>.md` in the start directory, never committed
|
|
45
|
+
|
|
46
|
+
Rules
|
|
47
|
+
- Anything other than the literal GO (case-insensitive) is not a GO; a GO covers only that one step, one time.
|
|
48
|
+
- A failed check stops the run: write the failure into the run log and report. No silent retries.
|
|
49
|
+
- Write one run-log line per step as it completes (`N. done|skipped|failed — artifact — check result`) and `WAITING FOR GO: <step>` at each gate.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pb-show-build
|
|
3
|
+
description: >-
|
|
4
|
+
Build a show across lights (grandMA3), media (Resolume) and generative
|
|
5
|
+
visuals (TouchDesigner) from one cue list, offline first. A lane whose
|
|
6
|
+
console or app is not running is skipped and logged while the others
|
|
7
|
+
continue; the live rig is touched only after GO. Use for "build the show",
|
|
8
|
+
"cue list to grandMA3 Resolume and TouchDesigner", "show programming".
|
|
9
|
+
category: media-eventtech
|
|
10
|
+
kind: playbook
|
|
11
|
+
trigger: ["build the show", "cue list to grandMA3 Resolume and TouchDesigner", "show programming"]
|
|
12
|
+
inputs: [tracker, cue_list, fixture_list, media_folder]
|
|
13
|
+
requires:
|
|
14
|
+
skills: [godmode-eventtech, bdbmediastorm, bdb-grandma3-mcp, bdb-resolume-mcp, bdb-touchdesigner-mcp, pb-event-tracker]
|
|
15
|
+
agents: []
|
|
16
|
+
mcps: [bdb_grandma3_mcp, bdb_resolume_mcp, bdb_td_minddesigner]
|
|
17
|
+
store: []
|
|
18
|
+
go_points: [patch console, live rehearsal]
|
|
19
|
+
outputs: ["cue-sheet.md", "production_artifacts/pb-show-build-<date>.md"]
|
|
20
|
+
verify: "each available lane answers its ping; TD node errors empty; every cue in cue-sheet.md maps to a TD cue, Resolume clip or MA3 macro"
|
|
21
|
+
difficulty: advanced
|
|
22
|
+
est_time: 2-6 h
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Show build: lights, media, visuals
|
|
26
|
+
What you get: a cue sheet and a show built per lane, rehearsed offline first, with the live rig touched only after your GO. A lane that is not available is skipped, not faked.
|
|
27
|
+
|
|
28
|
+
## Inputs
|
|
29
|
+
- tracker — the pb-event-tracker output (`tracker.csv`, `brief.md`)
|
|
30
|
+
- cue_list — the cues: number, name, what happens in light, media and visuals
|
|
31
|
+
- fixture_list — fixtures with type, mode, universe and address
|
|
32
|
+
- media_folder — the clip files for Resolume
|
|
33
|
+
|
|
34
|
+
## Steps
|
|
35
|
+
1. Preflight — one probe per lane, each independent: `grandma3_ping` on `bdb_grandma3_mcp`; `resolume_ping` on `bdb_resolume_mcp`; `get_td_info` on `bdb_td_minddesigner` (pass: `connected: true`). MCP tools may be deferred in the harness: try to load the tool once via the harness tool search before declaring it missing. Tool not loaded, call errors or the pass condition fails → log "Missing MCP: `<server>` (`<tool>` unavailable). Start <the grandMA3 console or onPC|Resolume Arena|TouchDesigner> and check `mcpServers.<server>` in your harness config." and mark that lane `off`; the other lanes continue and every step below runs only for lanes marked `on`. All three `off` → stop and write nothing except the run log — each lane marked `on` or `off` in the run log
|
|
36
|
+
2. bdbmediastorm + godmode-eventtech — tracker, cue_list, fixture_list, media_folder → `cue-sheet.md`, one row per cue with its target per lane (MA3 macro, Resolume clip, TD cue; `lane off` where a lane is missing) — stops for approval
|
|
37
|
+
3. TouchDesigner lane (bdb-touchdesigner-mcp) — cue-sheet → `compose_cue_list` and `create_safety_blackout_chain`, then `get_td_node_errors` — errors empty; offline: nothing is sent to live outputs
|
|
38
|
+
4. Resolume lane (bdb-resolume-mcp) — media_folder, cue-sheet → `get_composition` compared with the clips the cue sheet names — every Resolume clip in the sheet is present in the composition, missing ones listed for the human to load (no MCP tool loads media)
|
|
39
|
+
5. [GO] patch console (grandMA3 lane) — `patch_fixture` for each fixture in fixture_list (patching only, no macro is executed here), the full fixture list named in the WAITING FOR GO line. The run stops here until the human types GO. This changes the live console, and no hook guards it, so this GO is the only guard. One GO = this one list, one time.
|
|
40
|
+
6. [GO] live rehearsal — walk the cue sheet on live outputs with `trigger_clip` and `clear_layer` (Resolume), the TD cue list and `execute_macro` for each macro in cue-sheet.md (grandMA3), only for lanes marked `on`; the cue count, the macro list and the lanes named in the WAITING FOR GO line. The run stops here until the human types GO. Light, video and projection go live, and no hook guards it, so this GO is the only guard. One GO = one rehearsal pass.
|
|
41
|
+
7. Check — every cue row in `cue-sheet.md` maps to a TD cue, Resolume clip or MA3 macro or is marked `lane off`; `get_td_node_errors` empty again after the rehearsal — mapping table and result in the run log
|
|
42
|
+
|
|
43
|
+
Run log: `production_artifacts/pb-show-build-<date>.md` in the start directory, never committed
|
|
44
|
+
|
|
45
|
+
Rules
|
|
46
|
+
- Anything other than the literal GO (case-insensitive) is not a GO; a GO covers only that one step, one time.
|
|
47
|
+
- A failed check stops the run: write the failure into the run log and report. No silent retries.
|
|
48
|
+
- Write one run-log line per step as it completes (`N. done|skipped|failed — artifact — check result`) and `WAITING FOR GO: <step>` at each gate. A lane marked `off` is logged `skipped` with its Missing MCP line.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pb-social-pack
|
|
3
|
+
description: >-
|
|
4
|
+
Turn a release or ship recap into a social pack: posts per platform where
|
|
5
|
+
every claim traces to a facts file, clip cut-downs per aspect ratio cut with
|
|
6
|
+
ffmpeg and checked with ffprobe, hand-off for publishing only after GO. Use
|
|
7
|
+
for "social pack for the release", "posts and clips for this launch",
|
|
8
|
+
"announce the release".
|
|
9
|
+
category: media-eventtech
|
|
10
|
+
kind: playbook
|
|
11
|
+
trigger: ["social pack for the release", "posts and clips for this launch", "announce the release"]
|
|
12
|
+
inputs: [recap, platforms, launch_video?, formats?]
|
|
13
|
+
requires:
|
|
14
|
+
skills: [copywriting, quick-recap, pb-ship, pb-launch-video, "ffmpeg (external)", "ffprobe (external)"]
|
|
15
|
+
agents: []
|
|
16
|
+
mcps: []
|
|
17
|
+
store: [content-engine]
|
|
18
|
+
go_points: [publish]
|
|
19
|
+
outputs: ["social/<slug>/facts.md", "social/<slug>/posts.md", "social/<slug>/clips/", "social/<slug>/publish.md", "production_artifacts/pb-social-pack-<date>.md"]
|
|
20
|
+
verify: "every post claim cites facts.md; ffprobe shows the asked WxH per clip"
|
|
21
|
+
difficulty: intermediate
|
|
22
|
+
est_time: 30-60 min
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Release social pack
|
|
26
|
+
What you get: posts per platform and clip cut-downs from your release recap, every claim traceable to a fact, handed off for publishing after your GO.
|
|
27
|
+
|
|
28
|
+
## Inputs
|
|
29
|
+
- recap — release notes, or a pb-ship / pb-release-aos run log
|
|
30
|
+
- platforms — for example LinkedIn, X, Instagram, YouTube Shorts
|
|
31
|
+
- launch_video (optional) — an mp4 from pb-launch-video; without it the pack is posts only and step 4 is skipped
|
|
32
|
+
- formats (optional) — default 9:16 (1080x1920), 1:1 (1080x1080) and 16:9 (1920x1080)
|
|
33
|
+
|
|
34
|
+
## Steps
|
|
35
|
+
1. Preflight — `test -d ~/.claude/skills/content-engine`; absent → log "content-engine not installed: copywriting fallback" and continue. With launch_video: `command -v ffmpeg` and `command -v ffprobe`; either missing → stop with "Missing tool: <name>. Install ffmpeg and rerun." and write nothing except the run log — probes answered
|
|
36
|
+
2. Ask — recap path, platforms, slug, launch_video, formats → run log — all answered, recap file exists
|
|
37
|
+
3. quick-recap — recap → `social/<slug>/facts.md`, one numbered fact per line with its source line in the recap; no fact without a source — file written
|
|
38
|
+
4. content-engine (if present) or copywriting — facts.md → `social/<slug>/posts.md` per platform, each claim tagged `[F<n>]` — every claim has a tag that exists in facts.md — stops for approval
|
|
39
|
+
5. ffmpeg — launch_video → `social/<slug>/clips/<name>_<WxH>.mp4` per format and per requested cut, for example `ffmpeg -ss <start> -t <seconds> -i <video> -vf "scale=<W>:<H>:force_original_aspect_ratio=increase,crop=<W>:<H>" -c:a copy <out>`, then `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 <out>` — ffprobe equals the asked WxH for every clip; on a mismatch stop with "clip <file> has WxH, expected ...", do not publish
|
|
40
|
+
6. [GO] publish — platforms, post texts and the full clip list shown. The run stops here until the human types GO. No publish MCP exists, so the GO releases the hand-off: posts, clips and captions in `social/<slug>/publish.md`; upload is manual unless the human named a tool in step 2 — hand-off file written
|
|
41
|
+
|
|
42
|
+
Run log: `production_artifacts/pb-social-pack-<date>.md` in the start directory, never committed
|
|
43
|
+
|
|
44
|
+
Rules
|
|
45
|
+
- Anything other than the literal GO (case-insensitive) is not a GO; a GO covers only that one step, one time.
|
|
46
|
+
- A failed check stops the run: write the failure into the run log and report. No silent retries.
|
|
47
|
+
- Write one run-log line per step as it completes (`N. done|skipped|failed — artifact — check result`) and `WAITING FOR GO: <step>` at each gate.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pb-todo
|
|
3
|
+
description: >-
|
|
4
|
+
Turn one sentence into a task line in the right to-do list, with project,
|
|
5
|
+
priority and optional due date. Use for "add a to-do", "remember to ...",
|
|
6
|
+
"put this on my list", "quick task". Nothing leaves your computer.
|
|
7
|
+
category: bdb-core
|
|
8
|
+
kind: playbook
|
|
9
|
+
trigger: ["add a to-do", "put this on my list", "quick task"]
|
|
10
|
+
inputs: [sentence, lists_folder?]
|
|
11
|
+
requires:
|
|
12
|
+
skills: [memb-skill]
|
|
13
|
+
agents: []
|
|
14
|
+
mcps: []
|
|
15
|
+
store: []
|
|
16
|
+
go_points: []
|
|
17
|
+
outputs: ["<lists>/<project>.md", "run-log.md"]
|
|
18
|
+
verify: "the approved line appears exactly once, in one list file"
|
|
19
|
+
difficulty: beginner
|
|
20
|
+
est_time: 2-5 min
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Quick to-do
|
|
24
|
+
What you get: one sentence becomes a task line in the right list, with priority and project.
|
|
25
|
+
|
|
26
|
+
## Inputs
|
|
27
|
+
- One sentence describing the task
|
|
28
|
+
- A lists folder — asked once; default `./todo/`
|
|
29
|
+
- A save folder for the run log — default `./pb-todo-<date>/`
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
1. Ask once — lists folder (and the sentence if not given) → `run-log.md` — the lists folder exists, or you confirm it may be created
|
|
33
|
+
2. Parse the sentence → task, project, priority (P1-P3), due date if one is named — anything not stated is `?`, never guessed
|
|
34
|
+
3. Pick the list file `<lists>/<project>.md` from the project — a new file only after you say yes → chosen file in `run-log.md`
|
|
35
|
+
4. Show the exact line, e.g. `- [ ] P2 task text (due 2026-10-05)`, and wait for your approval — approval logged
|
|
36
|
+
5. Append the approved line to the chosen list → the line appears exactly once in that file, and in no other list
|
|
37
|
+
6. memb-skill — optional, ask first: store the task — memory id logged; skipped and logged if memB is not installed
|
|
38
|
+
|
|
39
|
+
Nothing in this plan is sent anywhere, so there is no GO step. It only writes into the lists folder and the save folder, except the opt-in step 6 (writes memB).
|
|
40
|
+
|
|
41
|
+
Run log: `run-log.md` in the save folder. One line per step as it completes (`N. done|skipped|failed — file — check result`). If a check fails, stop, write the failure into the log and tell the user.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pb-worktrees-land
|
|
3
|
+
description: >-
|
|
4
|
+
Clean up git worktrees across your repos: list every worktree, classify it
|
|
5
|
+
as merged, remote-only, local-only or dirty, recap what each holds, and
|
|
6
|
+
remove only the merged clean ones after GO. Use for "clean up worktrees",
|
|
7
|
+
"what is in my aos-wt folders", "land my worktrees", "prune worktrees".
|
|
8
|
+
category: bdb-core
|
|
9
|
+
kind: playbook
|
|
10
|
+
trigger: ["clean up worktrees", "land my worktrees", "prune worktrees"]
|
|
11
|
+
inputs: [repos?]
|
|
12
|
+
requires:
|
|
13
|
+
skills: [using-git-worktrees, github, visual-recap, pb-ship, "gh (external)"]
|
|
14
|
+
agents: []
|
|
15
|
+
mcps: ["plan (optional)"]
|
|
16
|
+
store: []
|
|
17
|
+
go_points: [git worktree remove]
|
|
18
|
+
outputs: ["production_artifacts/pb-worktrees-land-<date>.md"]
|
|
19
|
+
verify: "git -C <repo> worktree list no longer shows any path the log marks removed; every removed branch was merged before removal"
|
|
20
|
+
difficulty: intermediate
|
|
21
|
+
est_time: 10-30 min
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Land and clean up worktrees
|
|
25
|
+
What you get: an inventory of your worktrees with a class for each, and the merged clean ones removed after your GO.
|
|
26
|
+
|
|
27
|
+
## Inputs
|
|
28
|
+
- repos (optional) — repo paths to scan; default is the current repo's main worktree (`git rev-parse --path-format=absolute --git-common-dir`, parent dir)
|
|
29
|
+
- `<owner/repo>` for each repo comes from `git -C <repo> remote get-url origin`
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
1. Ask — repos (default as above) → run log in the start directory — repo list confirmed; stops for approval
|
|
33
|
+
2. using-git-worktrees — per repo: `git -C <repo> worktree list --porcelain` → inventory table (path, branch, HEAD) in the run log — the main worktree, the worktree running this playbook, and any entry marked `locked` or `prunable` are `keep`
|
|
34
|
+
3. github — `gh auth status` (fails → log it, skip the squash predicate, only ancestry merges count); `git -C <repo> fetch origin --prune`; default branch: `default=$(git -C <repo> symbolic-ref --short refs/remotes/origin/HEAD); default=${default#origin/}` (the command prints `origin/main`) → both in the run log — fetch fails → log it, classify against the local refs, mark the table "stale"
|
|
35
|
+
4. Classify, first match wins:
|
|
36
|
+
- `dirty`: `git -C <wt> status --porcelain --ignored` shows anything other than `!!` entries; `!!` (ignored files, deleted by removal) are listed per row in the GO line
|
|
37
|
+
- detached HEAD (no `<branch>`): always `local-only`, never removed
|
|
38
|
+
- `merged`: `git -C <repo> merge-base --is-ancestor <branch> origin/<default>`, or (squash merge) `gh pr list -R <owner/repo> --head <branch> --state merged --json number,headRefOid` has a PR whose `headRefOid` equals the worktree `HEAD` (`git -C <wt> rev-parse HEAD`); a reused branch name with a different `headRefOid` does not count
|
|
39
|
+
- `remote-only`: the upstream exists and `git -C <wt> rev-list --count @{u}..HEAD` is 0 (safe on the remote, unmerged)
|
|
40
|
+
- `local-only`: everything else; commits exist only here
|
|
41
|
+
- check: every row has exactly one class plus the output of its evidence command
|
|
42
|
+
5. visual-recap — per non-merged worktree: recap link; without the `plan` connector log `git -C <wt> log --oneline origin/<default>..HEAD` and `git -C <wt> diff --stat origin/<default>...HEAD` instead — one recap or fallback per row
|
|
43
|
+
6. [GO] removal list = rows classified `merged` and not `keep`, shown in full with these exact commands per row: `git -C <repo> worktree remove <path>` (label the row `merged (empty)` when `git -C <repo> rev-parse <branch>` equals `git -C <repo> rev-parse origin/<default>`; never `--force`; git refuses dirty trees), then `git -C <repo> branch -d <branch>` (`-d` refuses squash-merged branches → log "branch kept, needs -D, human decides"; never `-D`). The run stops here until the human types GO. GO covers exactly that list, once. The hook does not guard these commands, so GO is by contract. Never remove dirty, remote-only, local-only or `keep` rows, and never use `rm -r`.
|
|
44
|
+
7. Verify — `git -C <repo> worktree list` → removed paths are gone, kept rows unchanged
|
|
45
|
+
8. Hand-off — remote-only and local-only rows → next action per row in the run log ("land via /pb-ship", or "push needs GO in that worktree") — nothing runs
|
|
46
|
+
|
|
47
|
+
Run log: `production_artifacts/pb-worktrees-land-<date>.md` in the start directory, never committed
|
|
48
|
+
|
|
49
|
+
Rules
|
|
50
|
+
- Anything other than the literal GO (case-insensitive) is not a GO; a GO covers only that one step, one time.
|
|
51
|
+
- A failed check stops the run: write the failure into the run log and report. No silent retries.
|
|
52
|
+
- Write one run-log line per step as it completes (`N. done|skipped|failed — artifact — check result`) and `WAITING FOR GO: <step>` at each gate.
|