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/fence-check.sh

View on GitHub
#!/usr/bin/env bash
# fence-check.sh — verify that a commit only touches paths inside a scope fence.
# Every checkpoint or close commit is checked against the journey's fence file; out-of-fence
# paths are a VIOLATION (the PL rejects or reverts that commit — commit-level, so other
# sessions' uncommitted files in a shared worktree are never touched).
#
#   fence-check.sh --repo <path> --commit <sha> --fence <fence-file>
#   fence-check.sh --repo <path> --worktree    --fence <fence-file>   # report-only
#
# Fence file: one entry per line. Blank lines and #comments ignored.
#   dir/            -> allows everything under dir/
#   path/to/file    -> exact file
#   glob (e.g. apps/x/**/*.py or *.md) -> bash extended glob match
# Exit: 0 PASS · 3 VIOLATION (paths listed) · 2 usage/missing input.
set -euo pipefail
case "${1:-}" in
  -h|--help) sed -n '2,/^set -euo pipefail$/p' "$0" | sed '$d;s/^# \{0,1\}//'; exit 0 ;;
esac
shopt -s extglob globstar nullglob

repo="" commit="" fence="" worktree=0
while [ $# -gt 0 ]; do
  case "$1" in
    --repo)     repo="$2"; shift 2 ;;
    --commit)   commit="$2"; shift 2 ;;
    --fence)    fence="$2"; shift 2 ;;
    --worktree) worktree=1; shift ;;
    *) echo "fence-check: unknown arg $1" >&2; exit 2 ;;
  esac
done
[ -n "$repo" ] && [ -n "$fence" ] || { echo "fence-check: need --repo and --fence" >&2; exit 2; }
[ -f "$fence" ] || { echo "fence-check: fence file not found: $fence" >&2; exit 2; }
[ -n "$commit" ] || [ "$worktree" = 1 ] || { echo "fence-check: need --commit <sha> or --worktree" >&2; exit 2; }

# load fence patterns
patterns=()
while IFS= read -r line; do
  line="${line%%#*}"; line="${line#"${line%%[![:space:]]*}"}"; line="${line%"${line##*[![:space:]]}"}"
  [ -n "$line" ] && patterns+=("$line")
done < "$fence"
[ "${#patterns[@]}" -gt 0 ] || { echo "fence-check: fence file has no patterns" >&2; exit 2; }

# Component-aware glob→regex: `*` and `?` must not cross `/` (bash [[ == ]] lets * match
# slashes, so `apps/x/*.py` would approve nested out-of-scope files); `**` explicitly
# crosses directories.
glob_to_regex() { # $1=glob -> anchored ERE on stdout
  local g="$1" out="" c i
  for (( i=0; i<${#g}; i++ )); do
    c="${g:$i:1}"
    case "$c" in
      \*) if [ "${g:$((i+1)):1}" = "*" ]; then
            # `**/` = optional directory run (must also match zero dirs:
            # apps/x/**/*.py has to accept apps/x/foo.py); bare `**` = anything
            if [ "${g:$((i+2)):1}" = "/" ]; then out+="(.*/)?"; i=$((i+2)); else out+=".*"; i=$((i+1)); fi
          else out+="[^/]*"; fi ;;
      \?) out+="[^/]" ;;
      [.^\$+\(\)\[\]\{\}\|\\]) out+="\\$c" ;;
      *) out+="$c" ;;
    esac
  done
  printf '^%s$' "$out"
}

in_fence() { # $1 = repo-relative path
  local f="$1" p re
  for p in "${patterns[@]}"; do
    case "$p" in
      */) [[ "$f" == "$p"* ]] && return 0 ;;             # directory prefix
      *)  re="$(glob_to_regex "$p")"
          [[ "$f" =~ $re ]] && return 0 ;;               # exact or component-aware glob
    esac
  done
  return 1
}

if [ "$worktree" = 1 ]; then
  files="$(git -C "$repo" status --porcelain | cut -c4- | sed 's/^"\(.*\)"$/\1/')"
  label="worktree (report-only; other sessions' files may be listed)"
else
  git -C "$repo" rev-parse --verify --quiet "${commit}^{commit}" >/dev/null || {
    echo "fence-check: commit not found: $commit" >&2; exit 2; }
  # Merge commits are rejected outright: their diff-trees can be empty (an empty file list
  # would read as PASS) and an executor has no business merging.
  nparents=$(git -C "$repo" rev-list --parents -n1 "$commit" | wc -w)
  if [ "$nparents" -gt 2 ]; then
    echo "VIOLATION: commit $commit is a merge commit — executors may not merge; unchecked paths could ride in"
    exit 3
  fi
  # --root: root commits enumerate their files (else empty list = false PASS)
  # --no-renames: a rename INTO the fence must surface the out-of-fence source
  files="$(git -C "$repo" diff-tree --root --no-renames --no-commit-id --name-only -r "$commit")"
  label="commit $commit"
fi

violations=()
while IFS= read -r f; do
  [ -n "$f" ] || continue
  in_fence "$f" || violations+=("$f")
done <<< "$files"

if [ "${#violations[@]}" -eq 0 ]; then
  echo "PASS: all paths in $label are inside the fence"
  exit 0
fi
echo "VIOLATION: $label touches ${#violations[@]} out-of-fence path(s):"
printf '  %s\n' "${violations[@]}"
[ "$worktree" = 1 ] || echo "action: reject/revert this commit (it is the executor's own; a revert cannot harm parallel sessions)"
exit 3
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 CodeCodexUnverifiedInstall
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