Skip to content

sno-ai/sno-station-skills / skills/T-delegation-and-work-orders/pl/skills/pl

MANUAL-ONLY — load solely when the human owner types `/pl`, uses `$pl`, or asks you to act as the Project Lead (PL). Supervise one project lane and its executor agents. A charter or dispatch means: you are an EXECUTOR, not the PL.

FileKindSize
SKILL.mdskill md61.7 KB
references/callsigns.txtmarkdown384 B
references/decision-rights.mdmarkdown4.8 KB
references/dispatch-template.mdmarkdown38.2 KB
references/pocket-card.mdmarkdown1.9 KB
references/progress-reporting-hooks.mdmarkdown2.3 KB
references/todo-template.mdmarkdown6.9 KB
scripts/agent-cli-help.tother1.2 KB
scripts/attempt-gate.shexecutablescript3.6 KB
scripts/attempt-gate.tother4.6 KB
scripts/callsign-transfer-e2e.shexecutablescript7.9 KB
scripts/callsign-worktree.tother1.7 KB
scripts/callsign.shexecutablescript15.2 KB
scripts/convergence-watch.shexecutablescript8.6 KB
scripts/core-structure.tother5.7 KB
scripts/docker-env-doctor.shexecutablescript19.4 KB
scripts/exec-sentinel.shexecutablescript5.8 KB
scripts/exec-sentinel.tother2.4 KB
scripts/exec-state.shexecutablescript20.8 KB
scripts/exec-state.tother23.1 KB
scripts/exec-trust.shscript5.3 KB
scripts/exec-trust.tother6.4 KB
scripts/executor-wall.shexecutablescript6.8 KB
scripts/executor-wall.texecutablescript9.5 KB
scripts/fence-check.shexecutablescript4.4 KB
scripts/general-env-doctor.shexecutablescript14.0 KB
scripts/general-env-doctor.tother5.8 KB
scripts/gpu-watch.shexecutablescript4.5 KB
scripts/gpu-watch.tother1.5 KB
scripts/lane-open.shexecutablescript4.1 KB
scripts/lane-open.tother3.9 KB
scripts/lane-resolve.shexecutablescript5.0 KB
scripts/lane-resolve.texecutablescript7.0 KB
scripts/log-watch.shexecutablescript10.9 KB
scripts/log-watch.texecutablescript6.8 KB
scripts/on-station-proof.texecutablescript1.9 KB
scripts/portable-paths.tother1.5 KB
scripts/roster-git.tother4.1 KB
scripts/roster-reach.tother2.8 KB
scripts/roster.shexecutablescript19.9 KB
scripts/script-running.shscript5.8 KB
scripts/script-running.tother3.7 KB
scripts/selftest/run-selftest.shexecutablescript1.2 KB
scripts/spawn-exec-generation-e2e.shexecutablescript1.9 KB
scripts/spawn-exec-help.tother2.8 KB
scripts/spawn-exec-interactive-e2e.shscript13.2 KB
scripts/spawn-exec-lane-resolve.tother3.5 KB
scripts/spawn-exec-mission-state-e2e.shscript1.8 KB
scripts/spawn-exec-on-station-e2e.shexecutablescript2.2 KB
scripts/spawn-exec-operate.tother9.4 KB
scripts/spawn-exec.shexecutablescript36.8 KB
scripts/todo-close-evidence.tother1.2 KB
scripts/todo.shexecutablescript35.5 KB
scripts/todo.tother27.9 KB

scripts/lane-open.sh

View on GitHub
#!/usr/bin/env bash
# Open one owner-supervised PL lane. Prints exactly the appended TSV row.
# Exit 64: invalid input or active lane; 65: unavailable or conflicting state.
set -Eeuo pipefail
lane_resolve="$(dirname -- "$(readlink -f -- "$0")")/lane-resolve.sh"

die() { local code="$1"; shift; printf 'lane-open: %s\n' "$*" >&2; exit "$code"; }
# Octal mode of a file, following symlinks as GNU `chmod --reference` does; BSD stat on macOS.
file_mode() { stat -L -c %a -- "$1" 2>/dev/null || stat -L -f '%Mp%Lp' -- "$1"; }

repo=''
lane=all
runtime=claude
while (($# > 0)); do
  case "$1" in
    --repo|--lane|--runtime)
      if (($# < 2)) || [[ -z "$2" || "$2" == --* ]]; then
        die 64 "$1 requires a value; nothing written. See --help."
      fi
      case "$1" in
        --repo) repo="$2" ;;
        --lane) lane="$2" ;;
        --runtime) runtime="$2" ;;
      esac
      shift 2 ;;
    -h|--help)
      printf '%s\n' 'usage: lane-open.sh --repo <path-or-name> [--lane <lane>] [--runtime claude|codex]' \
        'Defaults: lane=all, runtime=claude. An active lane refuses a repeat with exit 64.'
      exit 0 ;;
    *) die 64 "unknown argument: $1; nothing written. See --help." ;;
  esac
done
[[ -n "$repo" ]] || die 64 '--repo is required; nothing written. See --help.'
repo="$(basename -- "$repo")"
[[ "$repo" =~ ^[a-z0-9][a-z0-9-]{0,63}$ ]] ||
  die 64 "repository is not routable: $repo; use lowercase letters, digits and hyphens."
[[ "$lane" =~ ^[a-z0-9][a-z0-9-]{0,31}$ ]] ||
  die 64 "lane is not routable: $lane; use lowercase letters, digits and hyphens."
case "$runtime" in claude|codex) ;; *) die 64 "invalid runtime: $runtime; use claude or codex." ;; esac

registry="${PL_REGISTRY:-$HOME/.local/state/pl-registry.tsv}"
mkdir -p -- "$(dirname -- "$registry")" || die 65 "cannot create the registry directory for $registry."
# A first lane on a fresh machine starts the registry; noclobber keeps a racing writer's file.
[[ -e "$registry" ]] || (set -C; printf '%s\n' $'home_repo\tlane\treach_address\theartbeat_name\truntime\towning_cos\tstate\tnote' >"$registry") 2>/dev/null || true
registry="$(readlink -f -- "$registry")" || die 65 'cannot resolve registry; check PL_REGISTRY.'
[[ -f "$registry" ]] || die 65 "registry is missing: $registry; check PL_REGISTRY."
for dependency in flock timeout; do
  command -v "$dependency" >/dev/null || die 65 "missing $dependency; install it before opening a lane."
done

# Resolve the registry symlink before locking, as lane-resolve does for cos-claim.
exec 9>"$registry.lock"
flock -w 10 9 || die 65 "registry lock timed out: $registry; retry after the writer finishes."
header=$'home_repo\tlane\treach_address\theartbeat_name\truntime\towning_cos\tstate\tnote'
[[ "$(awk 'NF && $0 !~ /^[[:space:]]*#/ {print; exit}' "$registry")" == "$header" ]] ||
  die 65 "registry header is malformed: $registry; repair it before retrying."
awk -F '\t' 'NF && $0 !~ /^[[:space:]]*#/ && NF != 8 {exit 1}' "$registry" ||
  die 65 "registry row is malformed: $registry; repair it before retrying."
if awk -F '\t' -v repo="$repo" -v lane="$lane" '
  $1 == repo && $2 == lane && toupper($7) != "RETIRED" {found=1}
  END {exit !found}' "$registry"; then
  die 64 "active lane already exists: $repo/$lane; nothing written. Resolve it with: bash \"$lane_resolve\"."
fi

suffix="$repo"
heartbeat="$repo"
if [[ "$lane" != all ]]; then
  suffix+="-$lane"
  heartbeat+="-$lane"
fi
address="pl.$suffix@$(hostname)"
staging=''
trap '[[ -z "$staging" ]] || rm -f -- "$staging"' EXIT
staging="$(mktemp "${registry}.open.XXXXXXXXXX")"
cat -- "$registry" >"$staging"
chmod -- "$(file_mode "$registry")" "$staging"
printf -v row '%s\t%s\t%s\t%s\t%s\tunclaimed\tRUN\tLane opened by a standalone PL.' \
  "$repo" "$lane" "$address" "$heartbeat" "$runtime"
printf '%s\n' "$row" >>"$staging"

# Reach validates the address and preserves an already initialized seat.
timeout 30 sno reach init --as "$address" --name "$suffix" >/dev/null ||
  die 65 "Reach init failed for $address; registry unchanged. Inspect the seat before retrying."
mv -f -- "$staging" "$registry" ||
  die 65 "Reach seat is ready for $address but registry write failed; inspect $registry before retrying."
staging=''
printf '%s\n' "$row"
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall