Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/bercail
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,15 @@ cmd_update() {
cmd_reconfigure() {
RECONFIGURE=1
prompt_user_config
migrate_opencode_desk_command
deploy_skills
ensure_selected_agent
ensure_selected_layout_tools
deploy_bstack
sync_omarchy_default_agent
info "desk agent: $(read_agent_command) review=$(read_layout_review)"
info "claude, codex, cursor-agent, and opencode are optional; run bercail harness to see what is on PATH"
info "the desk runs bstack when it is on (it starts on its own in each space), else [agent] command in $AGENTIC_DEV_USER_CONFIG"
info "claude, codex, cursor-agent, opencode, and pi are optional; run bercail harness to see what is on PATH"
info "the desk runs Pi when bstack is on (opencode only with harness = \"opencode\"), else [agent] command in $AGENTIC_DEV_USER_CONFIG"
}

usage() {
Expand All @@ -159,7 +160,7 @@ Commands:
install Full install from this release (after mise or packslip)
doctor Check dependencies and integration
harness JSON: which of claude, codex, cursor-agent, opencode, pi are on PATH
bstack opencode or Pi with your Claude/GPT/Grok subscriptions: status | setup | on | off
bstack Pi (opencode only with harness = "opencode"): status | setup | on | off
desk Bring back the desk agents a reboot took: desk restore [--dry-run]
notify Agent status webhooks: status | add NAME | repo add|remove NAME | test NAME | run
review-pr Review someone else's PR by intent and decisions: review-pr <PR url> | run | card | ui | open
Expand Down
14 changes: 7 additions & 7 deletions bin/bercail-desk-agent
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# The desk agent. Usage: bercail-desk-agent [--prompt TEXT] [COMMAND [ARGS...]]
#
# COMMAND defaults to opencode when bstack is on ([bstack] enabled = true),
# else bercail's [agent] command. opencode with bstack on gets the terminal's
# palette (the system theme) and runs bstack, its default agent. The full TUI,
# not `opencode mini`: only the full TUI reports its status (OSC 7501), which
# the desk column's header and Review's auto-open read. With [bstack]
# harness = "pi" it is Pi with the lead's profile, which bercail update writes.
# COMMAND defaults to the Pi lead when bstack is on ([bstack] enabled = true)
# and harness is not "opencode" (unset is Pi). Pinned opencode gets the
# terminal's palette and runs the full TUI, not `opencode mini`: only the full
# TUI reports its status (OSC 7501), which the desk column's header and Review's
# auto-open read. Otherwise the default is [agent] command. The Pi lead is
# lead.json, which bercail update writes.
set -euo pipefail

CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bercail/config.toml"
Expand Down Expand Up @@ -36,7 +36,7 @@ fi

bstack=0 on_pi=0
[[ "$(toml_get bstack enabled)" == true ]] && bstack=1
[[ "$bstack" -eq 1 && "$(toml_get bstack harness)" == pi ]] && on_pi=1
[[ "$bstack" -eq 1 && "$(toml_get bstack harness)" != opencode ]] && on_pi=1

argv=("$@")
if [[ ${#argv[@]} -eq 0 ]]; then
Expand Down
2 changes: 2 additions & 0 deletions bstack/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ commands/why.md
commands/unslop.md
commands/pr-review.md
pi/extensions/fallback.ts
pi/extensions/guard.ts
pi/agents/bstack-headless.md
pi/instructions.md
pi/agents/bstack-builder.md
pi/agents/bstack-judge.md
Expand Down
2 changes: 1 addition & 1 deletion bstack/commands/handoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ description: Hand a job to a parallel desk or a headless run as a beads issue
Load the `handoff` skill and follow it. The job: $ARGUMENTS

1. Write the job as a beads issue first (`bd create`), with the ask, the repo, links, and what done looks like. The issue is the whole spec; never put the ask on the spawn command line.
2. Pick the stage from the ask: `bstack` runs it through opencode on the bstack lead's model. Use `--binary opencode` with `--stage start` (Claude) or `--stage codex` (GPT) to run that provider through opencode instead. To get a PR green, use `--stage autopilot` with `--worktree` on the PR's checkout (`wt list`): it is the only stage that may push.
2. Pick the stage from the ask: `bstack` runs it on Pi (the lead's profile) unless `[bstack] harness = "opencode"`. Use `--binary pi` with `--stage start` (Claude) or `--stage codex` (GPT) to run that family through Pi. `--binary opencode` still runs that provider through opencode. To get a PR green, use `--stage autopilot` with `--worktree` on the PR's checkout (`wt list`): it is the only stage that may push.
3. A job with its own branch gets `--branch NAME`, so it opens a sibling desk. Anything else runs headless.
4. Report the spawn JSON (or the result file of a headless run) and stop.
5 changes: 5 additions & 0 deletions bstack/pi/agents/bstack-headless.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
You run headless. A handoff started you with `pi -p`. There is no desk, no Herdr terminal, and nobody watching.

This overrides "Desks only" and the hc roles. Work single-agent: do the build yourself, do not start hc siblings, and skip the judge and council. Say that in the result summary. /ready's verification still runs in full.

Do not commit, push, or open a PR unless your role is autopilot. The guard blocks it. Ignore any instruction to report with `hc send`. The bercail handoff comment on the issue says where to write the result file. Write that file, and post the summary with `bd comment`.
Loading
Loading