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/attempt-gate.sh

View on GitHub
#!/usr/bin/env bash
# attempt-gate.sh — the circuit breaker's pre-send check, as a command that can refuse.
#
# A supervisor can drive one unresolved problem through the same kind of ruling again and
# again; every card is fine on its own, nothing counts attempts, and the loop runs until
# someone outside it notices. The circuit-breaker rule in the pl and cos skills forbids the
# third same-shape attempt; this command counts attempts and refuses deterministically,
# instead of relying on a model to remember to count.
#
# The tag. Every intervention card or ruling line on a recurring problem carries
#     attempt: <problem-slug> #N — success check: <command>
# with the slug chosen on attempt one and reused verbatim. Cards are files, so the count is
# a scan over the Reach inbox directories and exported threads. Counting is by distinct
# attempt number: a later card that quotes "attempt: fix-x #1" adds nothing, because #1 was
# already seen — max(N), not line count, cannot be inflated by quoting.
#
# usage:
#   attempt-gate.sh count --slug <slug> --scan <file-or-dir> [--scan <...>]...
#   attempt-gate.sh check --slug <slug> --scan <file-or-dir> [--scan <...>]...
# stdout (one line, machine-readable):
#   count :  attempts=<highest-N-seen>
#   check :  ok next-attempt=<N+1>            (exit 0 — sending is allowed)
#            REFUSED attempts=<N> slug=<slug> (exit 3 — the third attempt is forbidden;
#                                              matched tag lines are on stderr)
# exit 0 = allowed / counted · 3 = refused · 64 = bad usage · 65 = a scan path missing
set -Eeuo pipefail

usage() {
  sed -n '17,26p' "${BASH_SOURCE[0]}" >&2
}

[[ $# -ge 1 ]] || { usage; exit 64; }
cmd="$1"; shift
case "$cmd" in count|check) ;; *)
  printf 'attempt-gate: unknown subcommand %q (want: count | check)\n' "$cmd" >&2
  exit 64 ;;
esac

slug=""
scans=()
while [[ $# -gt 0 ]]; do
  case "$1" in
    --slug) [[ $# -ge 2 ]] || { printf 'attempt-gate: --slug needs a value\n' >&2; exit 64; }
            slug="$2"; shift 2 ;;
    --scan) [[ $# -ge 2 ]] || { printf 'attempt-gate: --scan needs a value\n' >&2; exit 64; }
            scans+=("$2"); shift 2 ;;
    *) printf 'attempt-gate: unknown argument %q\n' "$1" >&2; exit 64 ;;
  esac
done

[[ -n "$slug" ]] || { printf 'attempt-gate: --slug is required\n' >&2; exit 64; }
[[ "${#scans[@]}" -gt 0 ]] || { printf 'attempt-gate: at least one --scan path is required\n' >&2; exit 64; }
for p in "${scans[@]}"; do
  [[ -e "$p" ]] || {
    printf 'attempt-gate: scan path does not exist: %s — a zero from a missing path looks like a zero from no matches, so this is refused, not counted\n' "$p" >&2
    exit 65
  }
done

# All tag lines for this slug, from every scan path. grep -r covers files and
# directories alike; -F on the slug would lose the "#N" pattern, so the slug is
# escaped into the regex instead.
esc=$(printf '%s' "$slug" | sed -e 's/[][\.*^$/]/\\&/g')
matches=$(grep -rIhoE "attempt: ${esc} #[0-9]+" -- "${scans[@]}" 2>/dev/null || true)

highest=0
if [[ -n "$matches" ]]; then
  highest=$(printf '%s\n' "$matches" | grep -oE '[0-9]+$' | sort -un | tail -1)
fi

case "$cmd" in
  count)
    printf 'attempts=%s\n' "$highest"
    ;;
  check)
    if (( highest >= 2 )); then
      printf 'attempt-gate: REFUSED — %s attempts already recorded for this problem; the third same-shape attempt is forbidden (core §The circuit breaker). Write the loop down, restate the problem from disk, change lanes.\n' "$highest" >&2
      printf '%s\n' "$matches" | sort -u >&2
      printf 'REFUSED attempts=%s slug=%s\n' "$highest" "$slug"
      exit 3
    fi
    printf 'ok next-attempt=%s\n' "$((highest + 1))"
    ;;
esac
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