Skip to content

feat: add supervised worktrees to Agenttrail Kitchen - #22

Merged
Ivory2024 merged 6 commits into
mainfrom
fm/firstmate-agenttrail-kitchen-autowatch-helper
Sep 25, 2026
Merged

Ivory2024 merged 6 commits into
mainfrom
fm/firstmate-agenttrail-kitchen-autowatch-helper

Conversation

@Ivory2024

Copy link
Copy Markdown
Owner

Intent

Build a helper so every worktree firstmate is currently supervising can be added to the agenttrail-kitchen dashboard on demand, without hand-specifying each project path one at a time.

What Changed

  • Add an on-demand helper that gathers supervised worktrees from the fleet snapshot, prioritizes working and validating tasks, deduplicates paths, and caps the dashboard list at 12 projects.
  • Extend snapshot path data to include active secondmate child worktrees and support unbounded secondmate and registry reads for complete selection.

Risk Assessment

✅ Low: The helper filters missing worktrees, deduplicates before applying the confirmed 12-project cap, includes secondmate child worktrees, and refuses snapshots that disclose relevant omissions; the changed tests exercise the selector’s observable output.

Testing

Ran the focused selection test, covering the 12-project cap, priority ordering, unusable and duplicate paths, and composite child IDs. Checked for the Herdr executable and found it unavailable. Did not run the helper against live fleet state or launch the dashboard, and gathered no reviewer-visible live artifact.

  • Live validation: ⚠️ inconclusive - 0 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Run the helper to pass currently supervised worktree paths to Agenttrail Kitchen ⏸️ untested no The herdr executable is missing from PATH, preventing setup of the required isolated named Herdr lab session. Make Herdr available on PATH in this environment, then rerun through `bin/fm-herdr-lab.s…
Keep missing or duplicate worktree paths from consuming any of the 12 project slots ⏸️ untested no The herdr executable is missing from PATH, preventing the required live isolated lab run. Make Herdr available on PATH and rerun through bin/fm-herdr-lab.sh.
Include supervised secondmate child worktrees and avoid silently omitting candidates beyond snapshot bounds ⏸️ untested no The herdr executable is missing from PATH, preventing the required live isolated lab run. Make Herdr available on PATH and rerun through bin/fm-herdr-lab.sh.
  • Outcome: ⚠️ 2 warnings across 2 runs (5m43s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed (3) ✅
  • 🚨 bin/fm-agenttrail-kitchen.sh:26 - The helper caps task rows at 12 before validating or deduplicating worktree paths, so a missing path or multiple tasks sharing one path can consume slots and exclude another existing worktree. This also contradicts the required criterion: “every worktree firstmate is currently supervising can be added.” The conflicting implementation is the 12-project cap and .[0:$limit] selection (lines 5, 26–29), applied before path checks at lines 52–62. Please confirm whether 12 is a required Agenttrail Kitchen limit; otherwise the selection needs to include every distinct existing supervised worktree.

🔧 Fix applied.
2 errors still open:

  • 🚨 bin/fm-agenttrail-kitchen.sh:26 - The helper caps task rows at 12 before validating or deduplicating worktree paths, so a missing path or multiple tasks sharing one path can consume slots and exclude another existing worktree. This also contradicts the required criterion: “every worktree firstmate is currently supervising can be added.” The conflicting implementation is the 12-project cap and .[0:$limit] selection (lines 5, 26–29), applied before path checks at lines 52–62. Please confirm whether 12 is a required Agenttrail Kitchen limit; otherwise the selection needs to include every distinct existing supervised worktree.
  • 🚨 bin/fm-agenttrail-kitchen.sh:65 - The helper still omits active child worktrees supervised through secondmates. The required criterion is “every worktree firstmate is currently supervising can be added.” fm-bearings-snapshot.sh --all-in-flight represents those children with composite IDs such as secondmate-id/child-id, while its paths array contains only top-level task IDs. This lookup therefore finds no path for those children, and the helper never passes them to Agenttrail Kitchen. The round-2 path-filtering fix did not address this sibling representation. Confirm whether secondmate-supervised worktrees are included in the requirement; if so, the input must provide their paths and the helper must map them before selection. Related site: bin/fm-agenttrail-kitchen.sh:62 (task lookup by child ID).

🔧 Fix applied.
3 errors still open:

  • 🚨 bin/fm-agenttrail-kitchen.sh:26 - The helper caps task rows at 12 before validating or deduplicating worktree paths, so a missing path or multiple tasks sharing one path can consume slots and exclude another existing worktree. This also contradicts the required criterion: “every worktree firstmate is currently supervising can be added.” The conflicting implementation is the 12-project cap and .[0:$limit] selection (lines 5, 26–29), applied before path checks at lines 52–62. Please confirm whether 12 is a required Agenttrail Kitchen limit; otherwise the selection needs to include every distinct existing supervised worktree.
  • 🚨 bin/fm-agenttrail-kitchen.sh:65 - The helper still omits active child worktrees supervised through secondmates. The required criterion is “every worktree firstmate is currently supervising can be added.” fm-bearings-snapshot.sh --all-in-flight represents those children with composite IDs such as secondmate-id/child-id, while its paths array contains only top-level task IDs. This lookup therefore finds no path for those children, and the helper never passes them to Agenttrail Kitchen. The round-2 path-filtering fix did not address this sibling representation. Confirm whether secondmate-supervised worktrees are included in the requirement; if so, the input must provide their paths and the helper must map them before selection. Related site: bin/fm-agenttrail-kitchen.sh:62 (task lookup by child ID).
  • 🚨 bin/fm-agenttrail-kitchen.sh:51 - The current --all-in-flight call still inherits snapshot bounds for registered secondmates and each secondmate’s active children. With more than 20 registered secondmates, or more than 20 active children in a home, later supervised worktrees are absent from .in_flight and .paths; if earlier entries have no usable worktree, they cannot fill an available slot. The helper also ignores the snapshot’s omitted indicators, so this omission is silent. This contradicts the required criterion: “every worktree firstmate is currently supervising can be added.” Changed sites: bin/fm-agenttrail-kitchen.sh:51 (bounded snapshot call and ignored omissions); bin/fm-bearings-snapshot.sh:646 (paths only cover the bounded active-child list). Please authorize how this helper should obtain an unbounded candidate set while retaining the confirmed 12-project limit.

🔧 Fix applied.
✅ Re-checked - no issues remain.

⚠️ **Test** - 2 warnings
  • 🚨 bin/fm-agenttrail-kitchen.sh - The helper’s real --dry-run fails while building the candidate list: jq reports $paths is not defined, then the helper exits with “no existing in-flight worktrees to add.” This blocks demonstrating the requested on-demand dashboard workflow.
  • 🚨 live validation verdict: no-go (1 of 3 scenarios were driven live against the product); failed: Run the helper to produce dashboard project arguments from currently supervised worktrees
  • Live validation: ❌ no-go - 1 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Run the helper to produce dashboard project arguments from currently supervised worktrees ❌ fail live Agenttrail Kitchen dry-run artifact
Selection prioritizes working and validating tasks, applies the 12-project cap, and deduplicates paths ⏸️ untested no The prior payload records this only as a fixture-based test; it does not establish a live result.
Selection resolves composite secondmate child IDs to their worktree paths ⏸️ untested no The prior payload records this only as a fixture-based test; it does not establish a live result.
  • tests/fm-agenttrail-kitchen.test.sh
  • bin/fm-agenttrail-kitchen.sh --dry-run

🔧 Fix applied.
2 warnings still open:

  • ⚠️ bin/fm-agenttrail-kitchen.sh - The live helper workflow could not be demonstrated. herdr is not on PATH, so I could not provision the required named lab session. Running the helper against live fleet state would not provide the required isolated environment. Provide a Herdr executable on PATH in this environment and rerun the live validation.
  • ⚠️ live validation verdict: inconclusive (0 of 3 scenarios were driven live against the product); untested: Run the helper to pass currently supervised worktree paths to Agenttrail Kitchen, Keep missing or duplicate worktree paths from consuming any of the 12 project slots, Include supervised secondmate child worktrees and avoid silently omitting candidates beyond snapshot bounds
  • Live validation: ⚠️ inconclusive - 0 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Run the helper to pass currently supervised worktree paths to Agenttrail Kitchen ⏸️ untested no The herdr executable is missing from PATH, preventing setup of the required isolated named Herdr lab session. Make Herdr available on PATH in this environment, then rerun through `bin/fm-herdr-lab.s…
Keep missing or duplicate worktree paths from consuming any of the 12 project slots ⏸️ untested no The herdr executable is missing from PATH, preventing the required live isolated lab run. Make Herdr available on PATH and rerun through bin/fm-herdr-lab.sh.
Include supervised secondmate child worktrees and avoid silently omitting candidates beyond snapshot bounds ⏸️ untested no The herdr executable is missing from PATH, preventing the required live isolated lab run. Make Herdr available on PATH and rerun through bin/fm-herdr-lab.sh.
  • tests/fm-agenttrail-kitchen.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@Ivory2024
Ivory2024 merged commit 7069aee into main Sep 25, 2026
19 checks passed
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* feat(bin): add Agenttrail Kitchen worktree helper

* no-mistakes(review): Filter valid distinct worktrees before applying the cap

* no-mistakes(review): Include secondmate child worktrees in dashboard selection

* no-mistakes(review): Lift snapshot bounds before selecting supervised worktrees

* no-mistakes(test): Bind snapshot paths in helper jq selection

* no-mistakes(document): Document Agenttrail Kitchen helper

---------

Co-authored-by: irene <irene@ireneui-MacBookPro.local>
Ivory2024 added a commit that referenced this pull request Oct 7, 2026
* feat(bin): add Agenttrail Kitchen worktree helper

* no-mistakes(review): Filter valid distinct worktrees before applying the cap

* no-mistakes(review): Include secondmate child worktrees in dashboard selection

* no-mistakes(review): Lift snapshot bounds before selecting supervised worktrees

* no-mistakes(test): Bind snapshot paths in helper jq selection

* no-mistakes(document): Document Agenttrail Kitchen helper

---------

Co-authored-by: irene <irene@ireneui-MacBookPro.local>
@Ivory2024
Ivory2024 deleted the fm/firstmate-agenttrail-kitchen-autowatch-helper branch October 10, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant