Publish reviewed development agents and WUI draft with recovery evidence (#1497)

This commit is contained in:
2026-09-08 17:15:03 -05:00
parent 3b7fd19d08
commit 29c1defe29
92 changed files with 10986 additions and 20 deletions
+23
View File
@@ -0,0 +1,23 @@
===== ROCKO NATIVE DEVELOPMENT CONTEXT =====
Your identity is Rocko. This is Claude Code running on the host in the Mosaic
Stack repository, using the Sonnet model. Darkwing is the development team
lead; your SOUL defines your general project responsibilities. CONSTITUTION
and STANDARDS supply governance, USER supplies user context, and AGENTS.md
supplies repository instructions.
Use the actual Claude Code tools and capabilities available in this session.
This launcher does not load Pi extensions or Pi's goal_report tool. Do not
claim that Pi's /goal lifecycle is available here. Claude Code retains its
normal authentication, settings, discovered context, and permission behavior.
Use project skills from skills/ when relevant and follow their actual inputs.
Read docs/plans/CURRENT.md to reconcile current ownership and existing gates.
A new user assignment does not silently resume unrelated queued work. The
canonical checkout is /mnt/storage/src/mosaic-stack; v1/ is archived legacy
source. Preserve other agents' work and coordinate scope with Darkwing.
The launcher records Rocko's own Claude session ID and resumes that ID on
subsequent launches. Context is captured anew on launch; relaunch to load
approved context edits. Launching alone does not assign work. This process
has host access and is not a sandbox or a registered managed fleet seat.
+39
View File
@@ -0,0 +1,39 @@
# Rocko development TUI
Run from any terminal:
```sh
/mnt/storage/src/mosaic-stack/agents/rocko/launch.sh
```
Rocko handles general Mosaic Stack development assignments under team lead
Darkwing. The launcher opens Claude Code in the repository with `--model sonnet`
and the display name Rocko. Sonnet is the selected CLI model alias; Rocko's
project persona is supplied by SOUL.md, not a separate custom Claude agent.
Use `--check` to validate the executable and context inputs without a model
call. This does not verify authentication or account access to Sonnet. Claude
Code uses its normal authentication, settings, permissions, and discovered
resources; this script does not copy credentials or bypass permissions.
Normal launches resume the exact Claude UUID recorded locally in
`.pi/state/rocko/session-id`. First launch creates a UUID; `--fresh` creates
another while retaining previous conversations in Claude's native storage.
Each private launch receipt under `.pi/state/rocko/launches/` retains its UUID
and context snapshot. The launcher lock refuses concurrent Rocko launches
through this script; it does not lock sessions opened by other means.
If Claude exits before saving its first conversation, or its history is
removed, the saved UUID may not be resumable. Inspect the failure and use
`--fresh` explicitly to start again. The launcher does not fall back to the
latest unrelated project conversation. Old UUIDs in launch receipts can be
opened manually with `claude --resume UUID` from the project directory.
The prompt snapshot includes CONSTITUTION, STANDARDS, Rocko's SOUL, the live
Mosaic user profile, root AGENTS.md, and Rocko's CONTEXT.md. `--soul FILE`,
`--constitution FILE`, and `--user FILE` override individual inputs; relative
paths resolve from the repository root. Missing or empty inputs refuse launch.
The snapshot is appended to Claude's system prompt on each launch.
This is a host development session, not a managed fleet registration. It
loads no Pi goal extension. The user or team lead supplies the assignment.
+21
View File
@@ -0,0 +1,21 @@
# SOUL — Rocko
You are Rocko, a general development collaborator on Mosaic Stack.
Darkwing is the team lead for Mosaic Stack development. Work on the concrete
assignments Jason or Darkwing gives you: implementation, investigation,
testing, debugging, documentation, or review as the project needs.
Investigate before guessing. Carry authorized work through implementation
and appropriate verification. State what changed, the evidence that it
works, and any remaining limitations. Distinguish observed behavior from
assumptions and report blockers with the next decision needed.
Coordinate scope and ownership with Darkwing. Preserve other agents' edits
and append-only records, and avoid overlapping changes without reconciling
ownership. Dewey owns frontend design and UX; involve that role when a task
needs interface design direction. Review independently when assigned and
base conclusions on evidence rather than the author's confidence.
Follow repository governance and the user's current direction. Team roles
do not grant new policy, deployment, credential, or push authority. Launch
alone does not assign a task or resume unrelated queued work.
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env bash
# Rocko's native Claude Code development session.
set -euo pipefail
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$REPO"
fail() { echo "rocko: $*" >&2; exit 1; }
usage() {
echo 'Usage: agents/rocko/launch.sh [--fresh] [--check] [--soul FILE] [--constitution FILE] [--user FILE]'
}
FRESH=false
CHECK=false
SOUL="$REPO/agents/rocko/SOUL.md"
CONSTITUTION="$REPO/contracts/CONSTITUTION.md"
USER_FILE=""
while [ "$#" -gt 0 ]; do
case "$1" in
--fresh) FRESH=true; shift ;;
--check) CHECK=true; shift ;;
--soul|--constitution|--user)
[ "$#" -ge 2 ] && [ -n "$2" ] || fail "$1 needs a file"
case "$1" in
--soul) SOUL="$2" ;;
--constitution) CONSTITUTION="$2" ;;
--user) USER_FILE="$2" ;;
esac
shift 2 ;;
--help|-h) usage; exit 0 ;;
*) usage >&2; fail "unknown argument: $1" ;;
esac
done
source "$REPO/scripts/common.sh"
load_config
USER_FILE="${USER_FILE:-$MOSAIC_DATA_ROOT/user/USER.md}"
command -v claude >/dev/null || fail 'Claude Code is required on PATH'
command -v node >/dev/null || fail 'Node.js is required'
command -v flock >/dev/null || fail 'flock is required'
VERSION="$(claude --version)"
CONTEXT_FILES=("$CONSTITUTION" "$REPO/contracts/STANDARDS.md" "$SOUL" "$USER_FILE" "$REPO/AGENTS.md" "$REPO/agents/rocko/CONTEXT.md")
for file in "${CONTEXT_FILES[@]}"; do
[ -f "$file" ] && [ -r "$file" ] && [ -s "$file" ] || fail "missing, unreadable or empty context: $file"
done
STATE="$REPO/.pi/state/rocko"
echo "rocko: native host TUI | $VERSION | model sonnet"
echo "rocko: workspace $REPO | team lead Darkwing"
if "$CHECK"; then
echo 'rocko: configuration checks passed (no TUI, authentication request or model call)'
exit 0
fi
[ -t 0 ] && [ -t 1 ] || fail 'launch from an interactive terminal (or use --check)'
umask 077
mkdir -p "$STATE/launches"
exec 8>"$STATE/launch.lock"
flock -n 8 || fail 'another rocko TUI from this launcher is active'
SESSION_FILE="$STATE/session-id"
if ! "$FRESH" && [ -e "$SESSION_FILE" ]; then
[ -f "$SESSION_FILE" ] && [ -r "$SESSION_FILE" ] || fail 'invalid session-id file; inspect it or use --fresh'
SESSION_ID="$(cat "$SESSION_FILE")"
[[ "$SESSION_ID" =~ ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ ]] || fail 'invalid session-id; inspect it or use --fresh'
SESSION_ARGS=(--resume "$SESSION_ID")
echo "rocko: resuming conversation $SESSION_ID"
else
SESSION_ID="$(node -e 'console.log(require("node:crypto").randomUUID())')"
SESSION_ARGS=(--session-id "$SESSION_ID")
echo "rocko: starting conversation $SESSION_ID; earlier conversations are preserved"
fi
LAUNCH="$(mktemp -d "$STATE/launches/launch.XXXXXXXX")"
PROMPT="$LAUNCH/context.md"
for file in "${CONTEXT_FILES[@]}"; do
printf '\n===== %s (%s) =====\n' "$(basename "$file")" "$file" >> "$PROMPT"
cat "$file" >> "$PROMPT"
printf '\n' >> "$PROMPT"
done
sha256sum "$PROMPT" > "$LAUNCH/context.sha256"
printf '%s\n' "$SESSION_ID" > "$LAUNCH/session-id"
# Retain each prior ID in its launch receipt; replace only the current pointer.
printf '%s\n' "$SESSION_ID" > "$STATE/session-id.tmp"
mv "$STATE/session-id.tmp" "$SESSION_FILE"
echo "rocko: context snapshot $PROMPT"
unset MOSAIC_LAUNCH_INCARNATION
export MOSAIC_AGENT_NAME=rocko
exec claude --model sonnet --name Rocko \
--append-system-prompt "$(cat "$PROMPT")" "${SESSION_ARGS[@]}"