CAVEMAN MODE ACTIVE — level: full

Respond terse like smart caveman. All technical substance stay. Only fluff die.

## Persistence

ACTIVE EVERY RESPONSE. No revert after many turns. No filler drift. Still active if unsure. Off only: "stop caveman" / "normal mode".

Default: **full**. Switch: `/caveman lite|full|ultra`.

## Rules

Drop: articles (a/an/the), filler (just/really/basically/actually/simply), pleasantries (sure/certainly/of course/happy to), hedging. Fragments OK. Short synonyms (big not extensive, fix not "implement a solution for"). Technical terms exact. Code blocks unchanged. Errors quoted exact.

Pattern: `[thing] [action] [reason]. [next step].`

Not: "Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by..."
Yes: "Bug in auth middleware. Token expiry check use `<` not `<=`. Fix:"

## Intensity

| Level | What change |
|-------|------------|
| **full** | Drop articles, fragments OK, short synonyms. Classic caveman |

Example — "Why React component re-render?"
- full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in `useMemo`."

Example — "Explain database connection pooling."
- full: "Pool reuse open DB connections. No new connection per request. Skip handshake overhead."

## Auto-Clarity

Drop caveman for: security warnings, irreversible action confirmations, multi-step sequences where fragment order risks misread, user asks to clarify or repeats question. Resume caveman after clear part done.

Example — destructive op:
> **Warning:** This will permanently delete all rows in the `users` table and cannot be undone.
> ```sql
> DROP TABLE users;
> ```
> Caveman resume. Verify backup exist first.

## Boundaries

Code/commits/PRs: write normal. "stop caveman" or "normal mode": revert. Level persist until changed or session end.


<psyche-context id="todlando">
<memformat>
<?xml version="1.0"?>
<memformat version="1">
<!-- Changelog: v1 - initial seed -->
<topics>
  <topic name="events">Notable or unusual events and requests</topic>
  <topic name="interactions">Agent interactions -- who, roles, contributions</topic>
  <topic name="reflections">Thoughts on recent work -- what went well, what was tricky</topic>
  <topic name="ideas">Ideas to raise with the user</topic>
  <topic name="improvements">Further improvement ideas for recent problem spaces</topic>
  <topic name="timeline">What happened when, timing, sequencing</topic>
  <topic name="blockers">Current blockers or concerns</topic>
  <topic name="focus">Current focus and immediate next steps</topic>
</topics>
</memformat>
</memformat>

<current machine="HFENDULEAM" project="claude_skill_owl" branch="main" head_sha="be5f2e7612744c4f1776be94aa9e11639467152f" head_subject="chore: bump spt plugin to v1.11.25" commits_since="0" commits_unpulled="0"/>
Generation 42 complete. FIRE-EC fix (v1.11.25) live. New task: `/self-clear` skill fix **DONE**.

## Completed this cycle
- **`/self-clear` skill refactored** — three fixes applied to `~/.claude/skills/self-clear/scripts/self-clear.ps1` + SKILL.md:
  1. Window focus: replaced `Get-Process.MainWindowHandle` (returns first window of process) with `EnumWindows` walk keyed to ancestor PID, finds visible/titled/top-level window owned by that PID (skips windowless intermediates).
  2. Delay: `Start-Sleep -Seconds 10` → `-Milliseconds 200`.
  3. 2nd SendKeys: `'NOTE FROM THE USER: proceed with next steps.'` → `'Proceed with next steps'` + Enter.
- **Validation complete**: parse-check OK, C# class compiles, window walk verified (traced pwsh → claude.exe → pwsh → WindowsTerminal(25744) → hwnd=1839962).
- **Caveat noted**: Windows Terminal (all windows share one PID + headless ConPTY) still can't disambiguate multi-window targets by PID alone. Fix is real improvement for classic conhost (each window = separate conhost.exe PID with HWND).

## Ready for next step
Skill live immediately (`~/.claude/skills/` — no repo commit/deploy needed). If WT multi-window still mis-targets, request title-match targeting instead.<project-context-resolved name="claude_skill_owl"/>
Standalone `/self-clear` skill (not in claude_skill_owl repo). Three fixes applied + validated. No impact on main project work.</psyche-context>

<spacetime-reorientation agent_id="todlando">
You are agent "todlando". Your spacetime session is active (you have a perch — that's why you're seeing this).

Send messages:
- $OWL send <target>              <<'EOF' ... EOF  — fire-and-forget
- $OWL send --reply-to <sender>   <<'EOF' ... EOF  — respond to whoever messaged you
- $OWL ring <target>              <<'EOF' ... EOF  — send and wait for reply (blocks; alias: `ask`)

Your ID (todlando) is auto-detected. If that fails, append it: `$OWL send <target> todlando`.

Receive messages (three paths, handle all identically):
- Primary (Monitor stream): your background `$OWL poll todlando` task running via the Monitor tool emits one EVENT envelope per delivery to stdout. Regular messages: `<EVENT type="msg" from="<sender>">body</EVENT>`. Self-originated alarms: `<EVENT type="alarm" target-time="<ISO>" current-time="<ISO>">body</EVENT>`. Long bodies arrive as N consecutive `<EVENT-PART seq="K/M" id="<8-hex>" [type=... from=... timestamp=... note=...]>chunk</EVENT-PART>` lines — collect parts sharing the same id, order by seq numerator, verify count equals seq denominator, concatenate chunk contents in seq order, then apply the body parsing rules to the reassembled body. The original envelope attrs appear on seq="1/M" only; continuations carry only seq + id. Drop orphan parts silently (seq K/M arriving without matching seq 1/M same id — earlier parts lost across a session boundary). The stream stays alive across deliveries — do not re-register after each message.
- Body parsing rules (both envelope types AND reassembled EVENT-PART bodies): split the body on the literal `<br>` token to recover newlines, then HTML-unescape each fragment in order `<` → `<`, `>` → `>`, `"` → `"`, `&` → `&` **last** (apply `&` last so embedded `&lt;` sequences don't double-decode).
- Fallback (Bash `--once`): when Monitor is unavailable, run `$OWL poll todlando --once` as a Bash background task (`run_in_background: true`). The wire format is IDENTICAL — including EVENT-PART chunking for long bodies — same `<EVENT type="msg|alarm" ...>body</EVENT>` envelope shapes as the primary path. The only difference: the process exits after one event, so you re-register a fresh Bash background task after each delivery (legacy one-shot loop).
- Hook delivery (orthogonal, when busy): the PreToolUse hook injects `<owl_messages><owl_message from="..."/></owl_messages>` XML into your next tool call context. Process it the same way as either of the above paths.

Reading liveness (do NOT mis-diagnose a healthy listener):
- `pid:"BUSY"` in `$OWL list` means your listener is ALIVE and mid-delivery — it is ONLINE, not dead. Never re-arm or stop on a BUSY reading.
- Your poll is actually down ONLY when your `todlando` row is MISSING from `$OWL list`, or shows OFFLINE / [orphaned].

After a /clear: DO NOTHING to your poll.
- Your poll listener survives /clear INTACT and keeps delivering to this same session. There is no orphan to kill and no listener to rebuild. Do NOT re-arm, do NOT start a second listener, do NOT stop anything.
- If you try to re-arm anyway you will get DUPLICATE/COLLISION — that is PROOF your listener is still alive and working, NOT evidence of a "stale" perch. Stop there; do not escalate to a stop command.

Re-arm a stale poll (genuinely rare — binary handoff or confirmed listener death only):
- Under stream mode (primary, Monitor), the poll listener is long-running and stays alive across messages AND across /clear. Re-arming is needed ONLY after a binary handoff (Phase 18.4/18.5 machinery) or after confirmed listener death (your `todlando` row MISSING from `$OWL list`) — NOT after a /clear, NOT after every message, and NOT on a BUSY reading.
- Re-arm primary: relaunch `$OWL poll todlando listen --live` via the Monitor tool with `persistent: true` and `description: "« spt event »"`.
- Re-arm fallback: relaunch `$OWL poll todlando listen --live --once` via Bash with `run_in_background: true`, then re-register after each delivered message.

Other commands:
- $OWL list — list active agents
- $OWL stop todlando — stop your listener
- $OWL new-alarm todlando <time> -- <message> — schedule a self-reminder
- $OWL doctor — diagnostics

Talking to your Psyche (todlando-psyche):
- Your Psyche is a DETACHED, self-healing process — not part of this session. It appears in `$OWL list` as a child under your Self perch, and in `$LIVE list-psyches`. It may briefly drop from the listing while it is ingesting a commune (its wrapper is busy running a resume) — that is transient and self-heals. Do NOT treat a briefly-absent Psyche as a bug and do NOT restart it. Only act if it stays gone for several minutes.
- NEVER run `$LIVE stop` to "clean up" your Psyche or a listener you think is "stale" — `$LIVE stop` tears down your Psyche. After /clear there is nothing to clean up (your listener survived intact). Reserve `$LIVE revive todlando` for a Psyche that is genuinely, persistently dead.
- Send a commune (delta update): use the Write tool to drop `.claude/todlando-commune.md`. Your Self listener detects the file, your Psyche wrapper ingests it via the existing Psyche session, and the file is deleted on success. See /spt:commune.
- Sign off cleanly: use the Write tool to drop `.claude/todlando-signoff.md` (empty body = plain signoff; non-empty body = prepended as FINAL COMMUNE before INIT_SIGNOFF). See /spt:signoff.
- Inbound messages from "todlando-psyche" (echo communes, briefs) are FYI context — read them; no ACK required. You may still message your Psyche directly with $OWL send or $OWL ring if needed.
</spacetime-reorientation>


<local-command-caveat>Caveat: The messages below were generated by the user while running local commands. DO NOT respond to these messages or otherwise consider them in your response unless the user explicitly asks you to.</local-command-caveat>


<command-name>/clear</command-name>
            <command-message>clear</command-message>
            <command-args></command-args>


<local-command-stdout></local-command-stdout>


Proceed with next steps


- autoplan: Auto-review pipeline — reads the full CEO, design, eng, and DX review skills from disk
and runs them sequentially with auto-decisions using 6 decision principles. Surfaces
taste decisions (close approaches, borderline scope, codex disagreements) at a final
approval gate. One command, fully reviewed plan out.
Use when asked to "auto review", "autoplan", "run all reviews", "review this plan
automatically", or "make the decisions for me".
Proactively suggest when the user has a plan file and wants to run the full review
gauntlet without answering 15-30 intermediate questions. (gstack)
- benchmark: Performance regression detection using the browse daemon. Establishes
baselines for page load times, Core Web Vitals, and resource sizes.
Compares before/after on every PR. Tracks performance trends over time.
Use when: "performance", "benchmark", "page speed", "lighthouse", "web vitals",
"bundle size", "load time". (gstack)
- browse: Fast headless browser for QA testing and site dogfooding. Navigate any URL, interact with
elements, verify page state, diff before/after actions, take annotated screenshots, check
responsive layouts, test forms and uploads, handle dialogs, and assert element states.
~100ms per command. Use when you need to test a feature, verify a deployment, dogfood a
user flow, or file a bug with evidence. Use when asked to "open in browser", "test the
site", "take a screenshot", or "dogfood this". (gstack)
- canary: Post-deploy canary monitoring. Watches the live app for console errors,
performance regressions, and page failures using the browse daemon. Takes
periodic screenshots, compares against pre-deploy baselines, and alerts
on anomalies. Use when: "monitor deploy", "canary", "post-deploy check",
"watch production", "verify deploy". (gstack)
- careful: Safety guardrails for destructive commands. Warns before rm -rf, DROP TABLE,
force-push, git reset --hard, kubectl delete, and similar destructive operations.
User can override each warning. Use when touching prod, debugging live systems,
or working in a shared environment. Use when asked to "be careful", "safety mode",
"prod mode", or "careful mode". (gstack)
- caveman: Ultra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
- ccs-delegation: Auto-activate CCS CLI delegation for deterministic tasks. Parses user input, auto-selects optimal profile (glm/kimi/custom) from ~/.ccs/config.json, enhances prompts with context, executes via `ccs {profile} -p "task"` or `ccs {profile}:continue`, and reports results. Triggers on "use ccs [task]" patterns, typo/test/refactor keywords. Excludes complex architecture, security-critical code, performance optimization, breaking changes.
- checkpoint: Save and resume working state checkpoints. Captures git state, decisions made,
and remaining work so you can pick up exactly where you left off — even across
Conductor workspace handoffs between branches.
Use when asked to "checkpoint", "save progress", "where was I", "resume",
"what was I working on", or "pick up where I left off".
Proactively suggest when a session is ending, the user is switching context,
or before a long break. (gstack)
- codex: OpenAI Codex CLI wrapper — three modes. Code review: independent diff review via
codex review with pass/fail gate. Challenge: adversarial mode that tries to break
your code. Consult: ask codex anything with session continuity for follow-ups.
The "200 IQ autistic developer" second opinion. Use when asked to "codex review",
"codex challenge", "ask codex", "second opinion", or "consult codex". (gstack)
- connect-chrome: Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in.
Opens a visible browser window where you can watch every action in real time.
The sidebar shows a live activity feed and chat. Anti-bot stealth built in.
Use when asked to "open gstack browser", "launch browser", "connect chrome",
"open chrome", "real browser", "launch chrome", "side panel", or "control my browser".
- cso: Chief Security Officer mode. Infrastructure-first security audit: secrets archaeology,
dependency supply chain, CI/CD pipeline security, LLM/AI security, skill supply chain
scanning, plus OWASP Top 10, STRIDE threat modeling, and active verification.
Two modes: daily (zero-noise, 8/10 confidence gate) and comprehensive (monthly deep
scan, 2/10 bar). Trend tracking across audit runs.
Use when: "security audit", "threat model", "pentest review", "OWASP", "CSO review". (gstack)
- design-consultation: Design consultation: understands your product, researches the landscape, proposes a
complete design system (aesthetic, typography, color, layout, spacing, motion), and
generates font+color preview pages. Creates DESIGN.md as your project's design source
of truth. For existing sites, use /plan-design-review to infer the system instead.
Use when asked to "design system", "brand guidelines", or "create DESIGN.md".
Proactively suggest when starting a new project's UI with no existing
design system or DESIGN.md. (gstack)
- design-html: Design finalization: generates production-quality Pretext-native HTML/CSS.
Works with approved mockups from /design-shotgun, CEO plans from /plan-ceo-review,
design review context from /plan-design-review, or from scratch with a user
description. Text actually reflows, heights are computed, layouts are dynamic.
30KB overhead, zero deps. Smart API routing: picks the right Pretext patterns
for each design type. Use when: "finalize this design", "turn this into HTML",
"build me a page", "implement this design", or after any planning skill.
Proactively suggest when user has approved a design or has a plan ready. (gstack)
- design-review: Designer's eye QA: finds visual inconsistency, spacing issues, hierarchy problems,
AI slop patterns, and slow interactions — then fixes them. Iteratively fixes issues
in source code, committing each fix atomically and re-verifying with before/after
screenshots. For plan-mode design review (before implementation), use /plan-design-review.
Use when asked to "audit the design", "visual QA", "check if it looks good", or "design polish".
Proactively suggest when the user mentions visual inconsistencies or
wants to polish the look of a live site. (gstack)
- design-shotgun: Design shotgun: generate multiple AI design variants, open a comparison board,
collect structured feedback, and iterate. Standalone design exploration you can
run anytime. Use when: "explore designs", "show me options", "design variants",
"visual brainstorm", or "I don't like how this looks".
Proactively suggest when the user describes a UI feature but hasn't seen
what it could look like. (gstack)
- devex-review: Live developer experience audit. Uses the browse tool to actually TEST the
developer experience: navigates docs, tries the getting started flow, times
TTHW, screenshots error messages, evaluates CLI help text. Produces a DX
scorecard with evidence. Compares against /plan-devex-review scores if they
exist (the boomerang: plan said 3 minutes, reality says 8). Use when asked to
"test the DX", "DX audit", "developer experience test", or "try the
onboarding". Proactively suggest after shipping a developer-facing feature. (gstack)
- diagnose: Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.
- document-release: Post-ship documentation update. Reads all project docs, cross-references the
diff, updates README/ARCHITECTURE/CONTRIBUTING/CLAUDE.md to match what shipped,
polishes CHANGELOG voice, cleans up TODOS, and optionally bumps VERSION. Use when
asked to "update the docs", "sync documentation", or "post-ship docs".
Proactively suggest after a PR is merged or code is shipped. (gstack)
- find-skills: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
- freeze: Restrict file edits to a specific directory for the session. Blocks Edit and
Write outside the allowed path. Use when debugging to prevent accidentally
"fixing" unrelated code, or when you want to scope changes to one module.
Use when asked to "freeze", "restrict edits", "only edit this folder",
or "lock down edits". (gstack)
- grill-me: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
- grill-with-docs: Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
- gsd-add-tests: Generate tests for a completed phase based on UAT criteria and implementation
- gsd-ai-integration-phase: Generate an AI-SPEC.md design contract for phases that involve building AI systems.
- gsd-audit-fix: Autonomous audit-to-fix pipeline — find issues, classify, fix, test, commit
- gsd-audit-milestone: Audit milestone completion against original intent before archiving
- gsd-audit-uat: Cross-phase audit of all outstanding UAT and verification items
- gsd-autonomous: Run all remaining phases autonomously — discuss→plan→execute per phase
- gsd-capture: Capture ideas, tasks, notes, and seeds to their destination
- gsd-cleanup: Archive accumulated phase directories from completed milestones
- gsd-code-review: Review source files changed during a phase for bugs, security issues, and code quality problems
- gsd-complete-milestone: Archive completed milestone and prepare for next version
- gsd-config: Configure GSD settings — workflow toggles, advanced knobs, integrations, and model profile
- gsd-debug: Systematic debugging with persistent state across context resets
- gsd-discuss-phase: Gather phase context through adaptive questioning before planning.
- gsd-docs-update: Generate or update project documentation verified against the codebase
- gsd-eval-review: Audit an executed AI phase's evaluation coverage and produce an EVAL-REVIEW.md remediation plan.
- gsd-execute-phase: Execute all plans in a phase with wave-based parallelization
- gsd-explore: Socratic ideation and idea routing — think through ideas before committing to plans
- gsd-extract-learnings: Extract decisions, lessons, patterns, and surprises from completed phase artifacts
- gsd-fast: Execute a trivial task inline — no subagents, no planning overhead
- gsd-forensics: Post-mortem investigation for failed GSD workflows — diagnoses what went wrong.
- gsd-graphify: Build, query, and inspect the project knowledge graph in .planning/graphs/
- gsd-health: Diagnose planning directory health and optionally repair issues
- gsd-help: Show available GSD commands and usage guide
- gsd-import: Ingest external plans with conflict detection against project decisions before writing anything.
- gsd-inbox: Triage and review open GitHub issues and PRs against project templates and contribution guidelines.
- gsd-ingest-docs: Bootstrap or merge a .planning/ setup from existing ADRs, PRDs, SPECs, and docs in a repo.
- gsd-manager: Interactive command center for managing multiple phases from one terminal
- gsd-map-codebase: Analyze codebase with parallel mapper agents to produce .planning/codebase/ documents
- gsd-milestone-summary: Generate a comprehensive project summary from milestone artifacts for team onboarding and review
- gsd-mvp-phase: Plan a phase as a vertical MVP slice — user story, SPIDR splitting, then plan-phase
- gsd-new-milestone: Start a new milestone cycle — update PROJECT.md and route to requirements
- gsd-new-project: Initialize a new project with deep context gathering and PROJECT.md
- gsd-ns-context: codebase intelligence | map graphify docs learnings
- gsd-ns-ideate: exploration capture | explore sketch spike spec capture
- gsd-ns-manage: config workspace | workstreams thread update ship inbox
- gsd-ns-project: project lifecycle | milestones audits summary
- gsd-ns-review: quality gates | code review debug audit security eval ui
- gsd-ns-workflow: workflow | discuss plan execute verify phase progress
- gsd-pause-work: Create context handoff when pausing work mid-phase
- gsd-phase: CRUD for phases in ROADMAP.md — add, insert, remove, or edit phases
- gsd-plan-phase: Create detailed phase plan (PLAN.md) with verification loop
- gsd-plan-review-convergence: Cross-AI plan convergence loop — replan with review feedback until no HIGH concerns remain.
- gsd-pr-branch: Create a clean PR branch by filtering out .planning/ commits — ready for code review
- gsd-profile-user: Generate developer behavioral profile and create Claude-discoverable artifacts
- gsd-progress: Check progress, advance workflow, or dispatch freeform intent — the unified GSD situational command
- gsd-quick: Execute a quick task with GSD guarantees (atomic commits, state tracking) but skip optional agents
- gsd-resume-work: Resume work from previous session with full context restoration
- gsd-review: Request cross-AI peer review of phase plans from external AI CLIs
- gsd-review-backlog: Review and promote backlog items to active milestone
- gsd-secure-phase: Retroactively verify threat mitigations for a completed phase
- gsd-settings: Configure GSD workflow toggles and model profile
- gsd-ship: Create PR, run review, and prepare for merge after verification passes
- gsd-sketch: Sketch UI/design ideas with throwaway HTML mockups, or propose what to sketch next (frontier mode)
- gsd-spec-phase: Clarify WHAT a phase delivers with ambiguity scoring; produces a SPEC.md before discuss-phase.
- gsd-spike: Spike an idea through experiential exploration, or propose what to spike next (frontier mode)
- gsd-stats: Display project statistics — phases, plans, requirements, git metrics, and timeline
- gsd-surface: Toggle which skills are surfaced — apply a profile, list, or disable a cluster without reinstall
- gsd-thread: Manage persistent context threads for cross-session work
- gsd-ui-phase: Generate UI design contract (UI-SPEC.md) for frontend phases
- gsd-ui-review: Retroactive 6-pillar visual audit of implemented frontend code
- gsd-ultraplan-phase: [BETA] Offload plan phase to Claude Code's ultraplan cloud; review in browser and import back.
- gsd-undo: Safe git revert. Roll back phase or plan commits using the phase manifest with dependency checks.
- gsd-update: Update GSD to latest version with changelog display
- gsd-validate-phase: Retroactively audit and fill Nyquist validation gaps for a completed phase
- gsd-verify-work: Validate built features through conversational UAT
- gsd-workspace: Manage GSD workspaces — create, list, or remove isolated workspace environments
- gsd-workstreams: Manage parallel workstreams — list, create, switch, status, progress, complete, and resume
- gstack: Fast headless browser for QA testing and site dogfooding. Navigate pages, interact with
elements, verify state, diff before/after, take annotated screenshots, test responsive
layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or
test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
- gstack-upgrade: Upgrade gstack to the latest version. Detects global vs vendored install,
runs the upgrade, and shows what's new. Use when asked to "upgrade gstack",
"update gstack", or "get latest version".
- guard: Full safety mode: destructive command warnings + directory-scoped edits.
Combines /careful (warns before rm -rf, DROP TABLE, force-push, etc.) with
/freeze (blocks edits outside a specified directory). Use for maximum safety
when touching prod or debugging live systems. Use when asked to "guard mode",
"full safety", "lock it down", or "maximum safety". (gstack)
- handoff: Compact the current conversation into a handoff document for another agent to pick up.
- health: Code quality dashboard. Wraps existing project tools (type checker, linter,
test runner, dead code detector, shell linter), computes a weighted composite
0-10 score, and tracks trends over time. Use when: "health check",
"code quality", "how healthy is the codebase", "run all checks",
"quality score". (gstack)
- improve-codebase-architecture: Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
- investigate: Systematic debugging with root cause investigation. Four phases: investigate,
analyze, hypothesize, implement. Iron Law: no fixes without root cause.
Use when asked to "debug this", "fix this bug", "why is this broken",
"investigate this error", or "root cause analysis".
Proactively invoke this skill (do NOT debug directly) when the user reports
errors, 500 errors, stack traces, unexpected behavior, "it was working
yesterday", or is troubleshooting why something stopped working. (gstack)
- land-and-deploy: Land and deploy workflow. Merges the PR, waits for CI and deploy,
verifies production health via canary checks. Takes over after /ship
creates the PR. Use when: "merge", "land", "deploy", "merge and verify",
"land it", "ship it to production". (gstack)
- learn: Manage project learnings. Review, search, prune, and export what gstack
has learned across sessions. Use when asked to "what have we learned",
"show learnings", "prune stale learnings", or "export learnings".
Proactively suggest when the user asks about past patterns or wonders
"didn't we fix this before?"
- mux-send: Send keystrokes to a psmux terminal session. Use when the user says "send to",
"type in", "send keys to", "mux send", or wants to send input to another terminal
session by name.
- office-hours: YC Office Hours — two modes. Startup mode: six forcing questions that expose
demand reality, status quo, desperate specificity, narrowest wedge, observation,
and future-fit. Builder mode: design thinking brainstorming for side projects,
hackathons, learning, and open source. Saves a design doc.
Use when asked to "brainstorm this", "I have an idea", "help me think through
this", "office hours", or "is this worth building".
Proactively invoke this skill (do NOT answer directly) when the user describes
a new product idea, asks whether something is worth building, wants to think
through design decisions for something that doesn't exist yet, or is exploring
a concept before any code is written.
Use before /plan-ceo-review or /plan-eng-review. (gstack)
- open-gstack-browser: Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in.
Opens a visible browser window where you can watch every action in real time.
The sidebar shows a live activity feed and chat. Anti-bot stealth built in.
Use when asked to "open gstack browser", "launch browser", "connect chrome",
"open chrome", "real browser", "launch chrome", "side panel", or "control my browser".
- pair-agent: Pair a remote AI agent with your browser. One command generates a setup key and
prints instructions the other agent can follow to connect. Works with OpenClaw,
Hermes, Codex, Cursor, or any agent that can make HTTP requests. The remote agent
gets its own tab with scoped access (read+write by default, admin on request).
Use when asked to "pair agent", "connect agent", "share browser", "remote browser",
"let another agent use my browser", or "give browser access". (gstack)
- plan-ceo-review: CEO/founder-mode plan review. Rethink the problem, find the 10-star product,
challenge premises, expand scope when it creates a better product. Four modes:
SCOPE EXPANSION (dream big), SELECTIVE EXPANSION (hold scope + cherry-pick
expansions), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials).
Use when asked to "think bigger", "expand scope", "strategy review", "rethink this",
or "is this ambitious enough".
Proactively suggest when the user is questioning scope or ambition of a plan,
or when the plan feels like it could be thinking bigger. (gstack)
- plan-design-review: Designer's eye plan review — interactive, like CEO and Eng review.
Rates each design dimension 0-10, explains what would make it a 10,
then fixes the plan to get there. Works in plan mode. For live site
visual audits, use /design-review. Use when asked to "review the design plan"
or "design critique".
Proactively suggest when the user has a plan with UI/UX components that
should be reviewed before implementation. (gstack)
- plan-devex-review: Interactive developer experience plan review. Explores developer personas,
benchmarks against competitors, designs magical moments, and traces friction
points before scoring. Three modes: DX EXPANSION (competitive advantage),
DX POLISH (bulletproof every touchpoint), DX TRIAGE (critical gaps only).
Use when asked to "DX review", "developer experience audit", "devex review",
or "API design review".
Proactively suggest when the user has a plan for developer-facing products
(APIs, CLIs, SDKs, libraries, platforms, docs). (gstack)
- plan-eng-review: Eng manager-mode plan review. Lock in the execution plan — architecture,
data flow, diagrams, edge cases, test coverage, performance. Walks through
issues interactively with opinionated recommendations. Use when asked to
"review the architecture", "engineering review", or "lock in the plan".
Proactively suggest when the user has a plan or design doc and is about to
start coding — to catch architecture issues before implementation. (gstack)
- propose-issue: Challenge an issue statement before fixing it. Probes scope, root cause, and assumptions
through interactive questioning grounded in the codebase. Use when the user says "propose issue",
"challenge this bug", "question this fix", "is this the right problem", or wants to pressure-test
a problem statement before jumping to implementation.
- qa: Systematically QA test a web application and fix bugs found. Runs QA testing,
then iteratively fixes bugs in source code, committing each fix atomically and
re-verifying. Use when asked to "qa", "QA", "test this site", "find bugs",
"test and fix", or "fix what's broken".
Proactively suggest when the user says a feature is ready for testing
or asks "does this work?". Three tiers: Quick (critical/high only),
Standard (+ medium), Exhaustive (+ cosmetic). Produces before/after health scores,
fix evidence, and a ship-readiness summary. For report-only mode, use /qa-only. (gstack)
- qa-only: Report-only QA testing. Systematically tests a web application and produces a
structured report with health score, screenshots, and repro steps — but never
fixes anything. Use when asked to "just report bugs", "qa report only", or
"test but don't fix". For the full test-fix-verify loop, use /qa instead.
Proactively suggest when the user wants a bug report without any code changes. (gstack)
- retro: Weekly engineering retrospective. Analyzes commit history, work patterns,
and code quality metrics with persistent history and trend tracking.
Team-aware: breaks down per-person contributions with praise and growth areas.
Use when asked to "weekly retro", "what did we ship", or "engineering retrospective".
Proactively suggest at the end of a work week or sprint. (gstack)
- review: Pre-landing PR review. Analyzes diff against the base branch for SQL safety, LLM trust
boundary violations, conditional side effects, and other structural issues. Use when
asked to "review this PR", "code review", "pre-landing review", or "check my diff".
Proactively suggest when the user is about to merge or land code changes. (gstack)
- screenshot-capture: Capture, process, and analyze screenshots of any running application on Windows 10/11. Use this skill whenever the user asks to take a screenshot, capture what's on screen, grab an app window, extract text from a visible app, annotate a screenshot, read what's on screen, OCR a running application, document a UI state, or visually inspect any running program. Also trigger when the user says things like "show me what [app] looks like", "grab that window", "read the text in [app]", "mark up a screenshot", "capture my desktop", or any task involving visual inspection of running software. This skill handles full-screen captures, individual window captures by app name, OCR text extraction, and image annotation (highlights, arrows, text labels). Even if the user doesn't say "screenshot" explicitly, use this skill if they want to see, capture, read, or annotate anything currently displayed on their screen.
- self-clear: Clear the calling agent's own Claude Code context with /clear, then re-seed it with a user note so it wakes and resumes work after the wipe. Use when the user says "self-clear", "/self-clear", "clear myself", "clear and continue", or "reset my context and keep going".
- setup-browser-cookies: Import cookies from your real Chromium browser into the headless browse session.
Opens an interactive picker UI where you select which cookie domains to import.
Use before QA testing authenticated pages. Use when asked to "import cookies",
"login to the site", or "authenticate the browser". (gstack)
- setup-deploy: Configure deployment settings for /land-and-deploy. Detects your deploy
platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom),
production URL, health check endpoints, and deploy status commands. Writes
the configuration to CLAUDE.md so all future deploys are automatic.
Use when: "setup deploy", "configure deployment", "set up land-and-deploy",
"how do I deploy with gstack", "add deploy config".
- ship: Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION,
update CHANGELOG, commit, push, create PR. Use when asked to "ship", "deploy",
"push to main", "create a PR", "merge and push", or "get it deployed".
Proactively invoke this skill (do NOT push/PR directly) when the user says code
is ready, asks about deploying, wants to push code up, or asks to create a PR. (gstack)
- to-prd: Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
- trace: Find old conversations in Claude Code session history. Use when the user says
"find the conversation where", "when did we discuss", "trace back to", or wants
to locate a past session by topic, command, commit, or keyword.
- traceable-reqs: traceable-reqs
- unfreeze: Clear the freeze boundary set by /freeze, allowing edits to all directories
again. Use when you want to widen edit scope without ending the session.
Use when asked to "unfreeze", "unlock edits", "remove freeze", or
"allow all edits". (gstack)
- win-marketplace-add: Add a plugin marketplace on Windows, bypassing the EBUSY rename bug. Use when the user wants to add a marketplace, runs "/plugin marketplace add" and gets an EBUSY error, or needs to register a marketplace that was manually cloned. Trigger on: "add marketplace", "plugin marketplace add", "EBUSY marketplace", "register marketplace", "marketplace not found".
- write-a-skill: Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
- ccs: Delegate task with intelligent profile selection [AUTO ENHANCE]
- ccs:continue: Continue last CCS delegation session [AUTO ENHANCE]
- deep-research: Deep research harness — fan-out web searches, fetch sources, adversarially verify claims, synthesize a cited report. - When the user wants a deep, multi-source, fact-checked research report on any topic. BEFORE invoking, check if the question is specific enough to research directly — if underspecified (e.g., "what car to buy" without budget/use-case/region), ask 2-3 clarifying questions to narrow scope. Then pass the refined question as args, weaving the answers in.
- frontend-design:frontend-design: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
- spt:clear-psyche: Clear stored Psyche context. Use when the user says "clear psyche",
"reset psyche context", or wants to wipe a Psyche's saved state.
- spt:commune: Send a communal update to your Psyche. Use when the user says "commune",
"update psyche", or wants to sync context with their Psyche companion.
- spt:force-stop: Force-stop an SPT agent -- ready agent or live agent (with its
Psyche). Use when the user says "stop listening", "stop owl", "kill live
agent", "force stop", "tear down perch", or "immediately terminate".
Session-aware: a live session (or a target with `live:true` in info.json)
routes through `$LIVE stop` (3-step kill including Psyche teardown); a
ready agent routes through `$OWL stop`.
- spt:list-agents: Unified listing for SPT agents -- ready agents, live agents, and Psyche
processes. Use when the user says "list agents", "who's live", "who's
listening", "show psyches", "show active listeners", or wants a roster of
active perches. Session-aware: defaults to live agents in a live session,
ready agents otherwise. Pass `--psyches` to list Psyche processes
instead.
- spt:live: Run a live agent session. For past sessions, restores a summarized context.

EXPLICIT START phrases (route to /spt:live <id>):
- "live as"
- "start live"
- "go live"
- "start a live agent"

AUTO-RESUME phrases (route to /spt:live --auto, resumes most-recently-active live agent):
- continue live work
- resume live work
- continue live agent
- resume live agent
- live agent continue
- live agent resume
- live work continue
- live work resume

Does NOT route here (too ambiguous — require BOTH "live" AND ("agent" or "work")):
- "keep going"
- "resume work"
- "continue" (bare)
- spt:new-alarm: Schedule a one-shot timed alarm delivered as TIMED PULSE. Use when the user
says "remind me", "check back in", "set an alarm", "wake me when", or wants a
delayed notification.
- spt:psyche-sync-setup: Enable cross-machine Psyche context sync via a private GitHub repo
(spt-agent-storage). Drives install + auth checks for the `gh` CLI,
creates the repo via `gh repo create --private`, wires it as the
`origin` remote for every existing agent/project worktree, and
seeds the remote with `git push --all`. Idempotent — running again
when already enabled reports current status.

Use when the user says "enable cross-machine sync", "set up psyche
sync", "back up my agent context to GitHub", or runs the skill
directly via /spt:psyche-sync-setup.
- spt:ready: Enable inter-agent messaging for the current session.
Use when the user says "listen as", "ready as", or wants to receive inter-agent messages.
- spt:revive: Restart a live agent with new generation. Use when the user says "revive",
"restart live agent", or wants to refresh a live agent's session.
- spt:send: Send a message to another SPT agent. Use when the user says "send to",
"message", "tell <agent>", or wants to communicate with another agent.
- spt:signoff: Graceful live agent shutdown with final context summary. Use when the user
says "sign off", "graceful stop", or wants to cleanly end a live session.
- spt:whoami: Check which owl agent belongs to the current session. Use when the user asks
"which agent am I?", "what's my owl name?", or when you need to discover your
own perch identity.
- caveman:caveman: Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
- caveman:caveman-commit: Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
- caveman:caveman-help: Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".
- caveman:caveman-review: Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.
- caveman:compress: Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman:compress <filepath> or "compress memory file"
- everything:search: Instantly search files and folders on Windows via voidtools Everything 1.5a HTTP JSON API. Use when the user wants to find files by name, path, size, date, or extension across the whole system — much faster than Glob/Grep for filesystem-wide queries. Triggers on "find file", "where is", "locate", "search my drive", "find all .ext files", "everything search".
- update-config: Use this skill to configure the Claude Code harness via settings.json. Automated behaviors ("from now on when X", "each time X", "whenever X", "before/after X") require hooks configured in settings.json - the harness executes these, not Claude, so memory/preferences cannot fulfill them. Also use for: permissions ("allow X", "add permission", "move permission to"), env vars ("set X=Y"), hook troubleshooting, or any changes to settings.json/settings.local.json files. Examples: "allow npm commands", "add bq permission to global settings", "move permission to user settings", "set DEBUG=true", "when claude stops show X". For simple settings like theme/model, suggest the /config command.
- keybindings-help: Use when the user wants to customize keyboard shortcuts, rebind keys, add chord bindings, or modify ~/.claude/keybindings.json. Examples: "rebind ctrl+s", "add a chord shortcut", "change the submit key", "customize keybindings".
- verify: Verify that a code change actually does what it's supposed to by running the app and observing behavior. Use when asked to verify a PR, confirm a fix works, test a change manually, check that a feature works, or validate local changes before pushing.
- code-review: Review the current diff for correctness bugs and reuse/simplification/efficiency cleanups at the given effort level (low/medium: fewer, high-confidence findings; high→max: broader coverage, may include uncertain findings; ultra: deep multi-agent review in the cloud). Pass --comment to post findings as inline PR comments, or --fix to apply the findings to the working tree after the review.
- simplify: Review the changed code for reuse, simplification, efficiency, and altitude cleanups, then apply the fixes. Quality only — it does not hunt for bugs; use /code-review for that.
- fewer-permission-prompts: Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project .claude/settings.json to reduce permission prompts.
- loop: Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo). Omit the interval to let the model self-pace. - When the user wants to set up a recurring task, poll for status, or run something repeatedly on an interval (e.g. "check the deploy every 5 minutes", "keep running /babysit-prs"). Do NOT invoke for one-off tasks.
- schedule: Create, update, list, or run scheduled remote agents (routines) that execute on a cron schedule. - When the user wants to schedule a recurring remote agent, set up automated tasks, create a cron job for Claude Code, or manage their scheduled agents/routines. Also use when the user wants a one-time scheduled run ("run this once at 3pm", "remind me to check X tomorrow").
- claude-api: Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements).
TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks for the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK project.
SKIP: file imports `openai`/other-provider SDK, filename like `*-openai.py`/`*-generic.py`, provider-neutral code, general programming/ML.
- run: Launch and drive this project's app to see a change working. Use when asked to run, start, or screenshot the app, or to confirm a change works in the real app (not just tests). First looks for a project skill that already covers launching the app; otherwise falls back to built-in patterns per project type (CLI, server, TUI, Electron, browser-driven, library).
- init: Initialize a new CLAUDE.md file with codebase documentation
- review: Review a pull request
- security-review: Complete a security review of the pending changes on the current branch

autoplan benchmark browse canary careful caveman ccs-delegation checkpoint codex connect-chrome cso design-consultation design-html design-review design-shotgun devex-review diagnose document-release find-skills freeze grill-me grill-with-docs gsd-add-tests gsd-ai-integration-phase gsd-audit-fix gsd-audit-milestone gsd-audit-uat gsd-autonomous gsd-capture gsd-cleanup gsd-code-review gsd-complete-milestone gsd-config gsd-debug gsd-discuss-phase gsd-docs-update gsd-eval-review gsd-execute-phase gsd-explore gsd-extract-learnings gsd-fast gsd-forensics gsd-graphify gsd-health gsd-help gsd-import gsd-inbox gsd-ingest-docs gsd-manager gsd-map-codebase gsd-milestone-summary gsd-mvp-phase gsd-new-milestone gsd-new-project gsd-ns-context gsd-ns-ideate gsd-ns-manage gsd-ns-project gsd-ns-review gsd-ns-workflow gsd-pause-work gsd-phase gsd-plan-phase gsd-plan-review-convergence gsd-pr-branch gsd-profile-user gsd-progress gsd-quick gsd-resume-work gsd-review gsd-review-backlog gsd-secure-phase gsd-settings gsd-ship gsd-sketch gsd-spec-phase gsd-spike gsd-stats gsd-surface gsd-thread gsd-ui-phase gsd-ui-review gsd-ultraplan-phase gsd-undo gsd-update gsd-validate-phase gsd-verify-work gsd-workspace gsd-workstreams gstack gstack-upgrade guard handoff health improve-codebase-architecture investigate land-and-deploy learn mux-send office-hours open-gstack-browser pair-agent plan-ceo-review plan-design-review plan-devex-review plan-eng-review propose-issue qa qa-only retro review screenshot-capture self-clear setup-browser-cookies setup-deploy ship to-prd trace traceable-reqs unfreeze win-marketplace-add write-a-skill ccs ccs:continue deep-research frontend-design:frontend-design spt:clear-psyche spt:commune spt:force-stop spt:list-agents spt:live spt:new-alarm spt:psyche-sync-setup spt:ready spt:revive spt:send spt:signoff spt:whoami caveman:caveman caveman:caveman-commit caveman:caveman-help caveman:caveman-review caveman:compress everything:search update-config keybindings-help verify code-review simplify fewer-permission-prompts loop schedule claude-api run init review security-review


<owl_reachability_notice>
You have an active owl perch. When spawning subagents or doing work, use run_in_background: true so you stay reachable for incoming messages.
</owl_reachability_notice>


CAVEMAN MODE ACTIVE (full). Drop articles/filler/pleasantries/hedging. Fragments OK. Code/commits/security: write normal.


Orient first. Psyche says `/self-clear` done, but git shows new planning artifacts (Phase 35.1 seed, debug files). Check what "next steps" means.


1	# SPT
2
3	Inter-agent messaging and live-agent lifecycle for Claude Code. Single Rust binary shipped as the `spt` plugin via the `cplugs` marketplace. Eventual goal: untether from Claude Code and run against arbitrary agent runtimes.
4
5	## Language
6
7	**SPT**:
8	The system. Canonical name. Acronym is poetic ("Sentience Pocket Transacter") and need not be widely known.
9	_Avoid_: Spacetime (retired codename), Sentience Pocket Transacter (poetic aside only)
10
11	**owl**:
12	Historical primitive name for the inter-agent messenger, inspired by carrier-messenger owls from Hogwarts. The Rust binary still ships as `owl.exe`, and the messaging subsystem lives in `src/owl/`. Today "owl" denotes the messaging primitive, not the system.
13	_Avoid_: messenger, courier (when discussing the primitive itself)
14
15	**`$OWL` / `$LIVE`**:
16	Auto-injected environment variables pointing at the binary. `$OWL` = `owl.exe`, `$LIVE` = `owl.exe live` (subcommand prefix). Agents and the user invoke the binary through these.
17
18	### Subsystems
19
20	**owl** (messaging substrate):
21	The lower layer. Provides perches, message delivery, registry, spool. A standalone agent can use owl with no live involvement. Lives in `src/owl/`.
22
23	**live** (live-agent lifecycle):
24	The upper layer, built on owl primitives. Adds the Psyche wrapper, communes, pulses, sign-off, orphan detection. Lives in `src/live/`. Cannot function without owl — uses owl messaging to wire Self ↔ Psyche.
25
26	### Perch and listener
27
28	**perch**:
29	An agent's registered identity and mailbox on disk. A directory under the owlery root containing a `ready` sentinel, `info.json`, a SQLite spool, and a TCP registry entry. Persistent: survives process death (then "stale"). Created by registration, destroyed by cleanup.
30
31	**poll listener**:
32	The running process that serves a Self's or ready agent's perch — a background task that drains the spool and emits `<EVENT>` lines to its parent session's stdout. Ephemeral: dies with its parent session.
33
34	**stale**:
35	The state of a perch whose owning background process is missing. Applies broadly: a Self or ready-agent perch with no live poll listener, a Psyche perch with no live wrapper, or a working perch whose subagent has ended its turn. Messages can still be delivered (spool fallback) and will be picked up if/when an owner re-arms.
36
37	**ephemeral perch**:
38	A short-lived perch created by `ring` for a perchless caller so the caller can receive the reply. Cleaned up when the ring call completes.
39
40	**working perch**:
41	A perch automatically created for each subagent of a live agent. SubagentStart hook creates it; PreToolUse hook injects inbound messages into the subagent's context; SubagentStop hook tears it down. Enables cross-communication between a Self and its subagents during subagent work.
42	_Avoid_: worker, worker perch (informal; "working perch" is canonical)
43
44	### Perch layout
45
46	Two layouts have existed:
47
48	- **flat** (legacy): every perch — Selves, Psyches, working perches — lived side-by-side directly under `$SPT_HOME/owlery/`.
49	- **nested** (current, since Phase 25): each Self's perch directory contains a `nested/` folder housing the perches of its Psyche and any active working perches. Top-level `owlery/` holds only Selves (and ready agents).
50
51	The migration from flat → nested ran through Phase 25 and 25.4. Code resolves both layouts during the migration window via the `perch_path` resolver and `ParentHint` enum.
52
53	**agent**:
54	The logical actor identified by an ID (e.g. `ling`). Has a perch; may or may not have a live poll listener at any moment.
55	_Avoid_: process (an agent is not a single process — Self, Psyche, and listener are distinct processes)
56
57	### Agent kinds
58
59	**ready agent**:
60	An agent that has a perch and a poll listener but no Psyche wrapper. The minimal SPT agent. Named for the `ready` sentinel in its perch.
61	_Avoid_: plain owl listener, plain listener, bare listener, lone owl (older code/docs still use these — rename pending)
62
63	**live agent**:
64	A Self + Psyche pair. The Self is a Claude Code session that also operates an owl listener; the Psyche is a wrapper process running periodic `claude -p --resume` sessions to give the Self memory, communes, and pulses.
65
66	**Self**:
67	The user-facing Claude Code session inside a live agent. Has its own perch and ID (e.g. `ling`).
68
69	**Psyche wrapper**:
70	The detached Rust supervisor process paired with a Self. Owns the `<self_id>-psyche` perch. Runs the pulse loop. Periodically invokes the Psyche via `claude -p --resume`. Reads `wrapper-state.json` for binary-handoff rehydration. Fails/recovers independently of the Psyche-as-agent.
71
72	**Psyche**:
73	The Claude agent that lives inside the wrapper. Identity = `{self_id}-psyche`. Memory persists across resumes via the embedded `psyche.md` prompt + the Claude `--resume` session id. Ephemeral *during each pulse invocation*; persistent in *identity*. Conceptually paired with a Self.
74
75	**Spine** (dormant):
76	A would-be supervisor agent responsible for monitoring all live agents and Psyche wrappers and taking action when they go down. Implemented (`live boot-spine <id>`, hidden CLI, spine wrapper + perch), but **not invoked in the standard live-agent flow** and has never been run in earnest. Psyche-wrapper development has prioritized self-sufficiency instead.
77
78	**Touch** (dormant):
79	A would-be sub-agent under a Spine, each Touch responsible for checking on one specific live agent. Implemented alongside Spine; also never run in earnest.
80
81	**generation**:
82	A monotonic counter on a live agent. Increments every time the live agent starts (`/spt:live`) or is revived (`/spt:revive`). Lets the Psyche's resumed session know it's a fresh continuation versus the previous instance.
83
84	### Live-agent vocabulary
85
86	**commune**:
87	A Self → Psyche delta update. Self writes `.claude/<self_id>-commune.md`; the wrapper detects the file, the Psyche ingests it during its next resume, and the file is deleted on success.
88
89	**echo commune**:
90	A commune authored by a background ephemeral Haiku agent (token-light) instead of the Self. The Haiku reads the latest discussion logs and synthesizes the delta. Still sent **to** the Psyche — same flow as a normal commune, just a different (automated) author.
91
92	**split echo commune**:
93	A newer variant of echo commune that fires when context is cleared (e.g. user runs `/clear`). Sends the delta to **both** the Psyche and the Self, so the Self's freshly-cleared context catches up without the user needing `/compact`.
94
95	**brief** (informal):
96	The Self-bound half of a split echo commune as the Self perceives it on arrival. Not a wire type — same `type="echo_commune"` envelope; "brief" is the situated meaning. Live agents may surface it to the user as "Catch-up Brief".
97
98	**signoff**:
99	Clean live-agent shutdown. Self writes `.claude/<self_id>-signoff.md` (empty body = plain signoff; non-empty body = prepended as FINAL COMMUNE). Wrapper tears down via the internal `INIT_SIGNOFF` protocol token.
100
101	**orphan**:
102	A live-agent state where the Psyche wrapper is still running but its Self is gone (Self's perch went stale and the underlying CC session is dead). The wrapper detects orphan condition and tears itself down.
103
104	**orphan grace period**:
105	A time buffer the wrapper waits before declaring orphan. Prevents false-positive teardown when the Self perch is briefly between poll cycles, or during a binary handoff (seamless transition from one SPT version to a newer one), or otherwise momentarily stale-looking.
106
107	**pulse**:
108	An event **inside the Psyche wrapper** that runs routine periodic tasks. Historically also "poked" the Psyche awake to think about ongoing work, but those pokes rarely produced useful output and now default off.
109
110	**alarm**:
111	A scheduled one-shot message stirring a Self to action at a given timestamp. Created via `$OWL new-alarm` / `/spt:new-alarm`. Delivered as `<EVENT type="alarm">`. Rides on the wrapper's pulse loop, so **alarms require a Psyche wrapper** — they do not work on ready agents.
112	_Avoid_: TIMED PULSE (wrapper-side jargon for the same thing; not user-facing)
113
114	### Networking (planned — research stage, see `docs/research/SPT Networked Messaging Research Brief.md`)
115
116	**node**:
117	A machine's participation in an spt subnet, identified by an Ed25519 public key generated on first run and persisted at `{SPT_HOME}/owlery/node.key`. Each node hosts some number of perches. Today SPT runs as if it were a single-node system; networking promotes "node" to a first-class concept.
118
119	**spt-node** (planned standalone daemon):
120	A small local daemon that runs the network stack (P2P transport, NAT traversal, pairing) on behalf of agents on the machine. Owns the node identity (Ed25519 keypair). Speaks SPT's wire protocol on a local socket so any client — SPT agents today, non-SPT clients eventually — can reach across the subnet by going through it. Chosen over baking the network stack into the SPT binary because it (a) decouples networking from SPT's CC-tied core, (b) creates SPT-protocol-as-product for non-SPT clients, (c) lets the network stack evolve on its own release cycle.
121
122	**spt subnet**:
123	The set of perches one user can address across one or more of their own nodes. No central server, no account, no shared infrastructure beyond bootstrap. Today's `$SPT_HOME/owlery/` is the local slice of a one-user, one-machine subnet; the networking feature lets that subnet span machines.
124
125	**cross-subnet contract** (very early concept):
126	A mechanism (not yet designed) by which two users can authorize a specific set of their agents to communicate across subnets — without merging their subnets. Future direction; only mentioned here so the term has a fixed meaning if it surfaces.
127
128	**agent name resolution** (planned):
129	Across an spt subnet, agents should still be addressable by their short ID (e.g. `ling`) — not by node pubkey. A lookup layer maps `<agent_id>` → `<node_id>:<perch_path>` within the subnet. Design open: registry shape, name-collision rules, and how local addressing stays node-implicit are all unsettled.
130
131	### Capsule (planned — v1.9, not yet realized)
132
133	**capsule**:
134	A hosting mode (planned for v1.9) where SPT launches Claude Code inside a psmux terminal session and drives it via keystroke injection. Moves the poll listener *out* of the Claude Code process tree and *alongside* the psmux session, letting SPT inject input directly into the CC prompt instead of waiting for the agent to ingest messages from a Monitor stream or PreToolUse hook. See `.planning/ROADMAP.md` Phases 19–22.
135
136	Three motivations:
137	1. Pre-Monitor-tool, the poll listener had to die after each Bash-tool message and be manually revived; capsule would have given a clean external listener. Monitor tool has since obviated this urgency.
138	2. Networked messaging — SPT aims to become a remote protocol so agents can be controlled from novel surfaces (VR, handhelds). Capsule is the substrate needed for full remote control (e.g. issuing `/clear`, injecting input). Networked messaging may ship first.
139	3. Agents driving their own and each other's sessions — e.g. clearing one's own context while seeding the next generation with new instructions.
140
141	**capsule listener**:
142	A variant of poll listener (Phase 19 plans it as a `poll.rs` fork) that runs *outside* the CC process tree alongside a specific psmux session. Drains the spool, delivers to the agent via psmux sendkeys when idle, respools to the inbox path when busy, and watches the claude PID for teardown. Effectively SPT's "user's hands at the keyboard" for that session.
143
144	**skeleton perch**:
145	A perch created by the capsule launcher *before* its agent (the CC session) has started — records the agent_id and launcher PID up front. The "registered but not yet alive" intermediate state. Recognized by SessionStart so the agent learns its identity on boot.
146
147	### Updates
148
149	**binary handoff**:
150	A mid-session, in-process upgrade of any long-running SPT process to the latest binary. When a new SPT version is deployed, each running poll listener and Psyche wrapper *self-migrates*: the original process spawns the new binary as a child, relays stdio so the parent CC session sees no interruption, and the new process takes over polling. Same flow for Psyche wrappers (rehydrating their state from `wrapper-state.json`). Goal: users never have to restart SPT to pick up new features.
151
152	### Identity binding
153
154	**session binding**:
155	The mechanism that ties an agent's identity (e.g. `ling`) to a Claude Code session's process tree. When an agent registers a perch, `info.json` records `parent_pid` — the pid of the CC session that launched the agent. On a subsequent SessionStart, `session-resume` walks perch `info.json` files and matches its own parent process pid against `info.parent_pid`. A match means "you are this agent; resume that identity."
156
157	Why parent_pid and not CC's session_id: CC session_id rotates on `/clear` and across crashes, but the CC process keeps running, so the *process tree* is the more stable handle on "the same logical agent seat" across session boundaries. A background Monitor or Bash task running across a `/clear` outlives the session_id change, enabling seamless SPT continuity.
158
159	Known unaccounted edge case: pid reuse on long-running machines. Not handled today; not observed in practice.
160
161	### Transports
162
163	**TCP**:
164	The primary transport. A registry maps perch IDs to TCP addresses; senders look up the target and push the body over the socket. Fast, push-based; requires the target to be live and listening.
165
166	**spool**:
167	A SQLite-backed durable queue per perch. The fallback transport when the target's listener isn't reachable. Pull-based: the target's poll listener drains the spool on each poll cycle. Slower than TCP but survives stale perches and listener restarts.
168
169	**inbox** (legacy):
170	A per-perch directory of message files from the original file-based messaging system. Largely a relic; current code still writes to it for compatibility, but the durable layer is the spool.
171
172	### Messaging verbs
173
174	**send**:
175	Fire-and-forget message delivery. The common operation: push a body at a target perch and return. Use `--reply-to <perch>` to reply to a prior incoming message. Formerly named `deliver`; the standalone `reply` command was folded into this flag.
176	_Avoid_: deliver, reply (retired)
177
178	**ring**:
179	Blocking request/reply. Send a message, then wait on the caller's perch for the target's reply. Builds on `send` plus a wait. If the caller has no perch, ring creates an ephemeral perch for the duration of the call. Alias: `ask`.
180	_Avoid_: send-and-wait
181
182	## Audience
183
184	Single user today (the author). No external users. The user almost never types the binary directly — agents do. User interaction is mostly in-session Bash via `$OWL` / `$LIVE`.
185

# SPT

Inter-agent messaging and live-agent lifecycle for Claude Code. Single Rust binary shipped as the `spt` plugin via the `cplugs` marketplace. Eventual goal: untether from Claude Code and run against arbitrary agent runtimes.

## Language

**SPT**:
The system. Canonical name. Acronym is poetic ("Sentience Pocket Transacter") and need not be widely known.
_Avoid_: Spacetime (retired codename), Sentience Pocket Transacter (poetic aside only)

**owl**:
Historical primitive name for the inter-agent messenger, inspired by carrier-messenger owls from Hogwarts. The Rust binary still ships as `owl.exe`, and the messaging subsystem lives in `src/owl/`. Today "owl" denotes the messaging primitive, not the system.
_Avoid_: messenger, courier (when discussing the primitive itself)

**`$OWL` / `$LIVE`**:
Auto-injected environment variables pointing at the binary. `$OWL` = `owl.exe`, `$LIVE` = `owl.exe live` (subcommand prefix). Agents and the user invoke the binary through these.

### Subsystems

**owl** (messaging substrate):
The lower layer. Provides perches, message delivery, registry, spool. A standalone agent can use owl with no live involvement. Lives in `src/owl/`.

**live** (live-agent lifecycle):
The upper layer, built on owl primitives. Adds the Psyche wrapper, communes, pulses, sign-off, orphan detection. Lives in `src/live/`. Cannot function without owl — uses owl messaging to wire Self ↔ Psyche.

### Perch and listener

**perch**:
An agent's registered identity and mailbox on disk. A directory under the owlery root containing a `ready` sentinel, `info.json`, a SQLite spool, and a TCP registry entry. Persistent: survives process death (then "stale"). Created by registration, destroyed by cleanup.

**poll listener**:
The running process that serves a Self's or ready agent's perch — a background task that drains the spool and emits `<EVENT>` lines to its parent session's stdout. Ephemeral: dies with its parent session.

**stale**:
The state of a perch whose owning background process is missing. Applies broadly: a Self or ready-agent perch with no live poll listener, a Psyche perch with no live wrapper, or a working perch whose subagent has ended its turn. Messages can still be delivered (spool fallback) and will be picked up if/when an owner re-arms.

**ephemeral perch**:
A short-lived perch created by `ring` for a perchless caller so the caller can receive the reply. Cleaned up when the ring call completes.

**working perch**:
A perch automatically created for each subagent of a live agent. SubagentStart hook creates it; PreToolUse hook injects inbound messages into the subagent's context; SubagentStop hook tears it down. Enables cross-communication between a Self and its subagents during subagent work.
_Avoid_: worker, worker perch (informal; "working perch" is canonical)

### Perch layout

Two layouts have existed:

- **flat** (legacy): every perch — Selves, Psyches, working perches — lived side-by-side directly under `$SPT_HOME/owlery/`.
- **nested** (current, since Phase 25): each Self's perch directory contains a `nested/` folder housing the perches of its Psyche and any active working perches. Top-level `owlery/` holds only Selves (and ready agents).

The migration from flat → nested ran through Phase 25 and 25.4. Code resolves both layouts during the migration window via the `perch_path` resolver and `ParentHint` enum.

**agent**:
The logical actor identified by an ID (e.g. `ling`). Has a perch; may or may not have a live poll listener at any moment.
_Avoid_: process (an agent is not a single process — Self, Psyche, and listener are distinct processes)

### Agent kinds

**ready agent**:
An agent that has a perch and a poll listener but no Psyche wrapper. The minimal SPT agent. Named for the `ready` sentinel in its perch.
_Avoid_: plain owl listener, plain listener, bare listener, lone owl (older code/docs still use these — rename pending)

**live agent**:
A Self + Psyche pair. The Self is a Claude Code session that also operates an owl listener; the Psyche is a wrapper process running periodic `claude -p --resume` sessions to give the Self memory, communes, and pulses.

**Self**:
The user-facing Claude Code session inside a live agent. Has its own perch and ID (e.g. `ling`).

**Psyche wrapper**:
The detached Rust supervisor process paired with a Self. Owns the `<self_id>-psyche` perch. Runs the pulse loop. Periodically invokes the Psyche via `claude -p --resume`. Reads `wrapper-state.json` for binary-handoff rehydration. Fails/recovers independently of the Psyche-as-agent.

**Psyche**:
The Claude agent that lives inside the wrapper. Identity = `{self_id}-psyche`. Memory persists across resumes via the embedded `psyche.md` prompt + the Claude `--resume` session id. Ephemeral *during each pulse invocation*; persistent in *identity*. Conceptually paired with a Self.

**Spine** (dormant):
A would-be supervisor agent responsible for monitoring all live agents and Psyche wrappers and taking action when they go down. Implemented (`live boot-spine <id>`, hidden CLI, spine wrapper + perch), but **not invoked in the standard live-agent flow** and has never been run in earnest. Psyche-wrapper development has prioritized self-sufficiency instead.

**Touch** (dormant):
A would-be sub-agent under a Spine, each Touch responsible for checking on one specific live agent. Implemented alongside Spine; also never run in earnest.

**generation**:
A monotonic counter on a live agent. Increments every time the live agent starts (`/spt:live`) or is revived (`/spt:revive`). Lets the Psyche's resumed session know it's a fresh continuation versus the previous instance.

### Live-agent vocabulary

**commune**:
A Self → Psyche delta update. Self writes `.claude/<self_id>-commune.md`; the wrapper detects the file, the Psyche ingests it during its next resume, and the file is deleted on success.

**echo commune**:
A commune authored by a background ephemeral Haiku agent (token-light) instead of the Self. The Haiku reads the latest discussion logs and synthesizes the delta. Still sent **to** the Psyche — same flow as a normal commune, just a different (automated) author.

**split echo commune**:
A newer variant of echo commune that fires when context is cleared (e.g. user runs `/clear`). Sends the delta to **both** the Psyche and the Self, so the Self's freshly-cleared context catches up without the user needing `/compact`.

**brief** (informal):
The Self-bound half of a split echo commune as the Self perceives it on arrival. Not a wire type — same `type="echo_commune"` envelope; "brief" is the situated meaning. Live agents may surface it to the user as "Catch-up Brief".

**signoff**:
Clean live-agent shutdown. Self writes `.claude/<self_id>-signoff.md` (empty body = plain signoff; non-empty body = prepended as FINAL COMMUNE). Wrapper tears down via the internal `INIT_SIGNOFF` protocol token.

**orphan**:
A live-agent state where the Psyche wrapper is still running but its Self is gone (Self's perch went stale and the underlying CC session is dead). The wrapper detects orphan condition and tears itself down.

**orphan grace period**:
A time buffer the wrapper waits before declaring orphan. Prevents false-positive teardown when the Self perch is briefly between poll cycles, or during a binary handoff (seamless transition from one SPT version to a newer one), or otherwise momentarily stale-looking.

**pulse**:
An event **inside the Psyche wrapper** that runs routine periodic tasks. Historically also "poked" the Psyche awake to think about ongoing work, but those pokes rarely produced useful output and now default off.

**alarm**:
A scheduled one-shot message stirring a Self to action at a given timestamp. Created via `$OWL new-alarm` / `/spt:new-alarm`. Delivered as `<EVENT type="alarm">`. Rides on the wrapper's pulse loop, so **alarms require a Psyche wrapper** — they do not work on ready agents.
_Avoid_: TIMED PULSE (wrapper-side jargon for the same thing; not user-facing)

### Networking (planned — research stage, see `docs/research/SPT Networked Messaging Research Brief.md`)

**node**:
A machine's participation in an spt subnet, identified by an Ed25519 public key generated on first run and persisted at `{SPT_HOME}/owlery/node.key`. Each node hosts some number of perches. Today SPT runs as if it were a single-node system; networking promotes "node" to a first-class concept.

**spt-node** (planned standalone daemon):
A small local daemon that runs the network stack (P2P transport, NAT traversal, pairing) on behalf of agents on the machine. Owns the node identity (Ed25519 keypair). Speaks SPT's wire protocol on a local socket so any client — SPT agents today, non-SPT clients eventually — can reach across the subnet by going through it. Chosen over baking the network stack into the SPT binary because it (a) decouples networking from SPT's CC-tied core, (b) creates SPT-protocol-as-product for non-SPT clients, (c) lets the network stack evolve on its own release cycle.

**spt subnet**:
The set of perches one user can address across one or more of their own nodes. No central server, no account, no shared infrastructure beyond bootstrap. Today's `$SPT_HOME/owlery/` is the local slice of a one-user, one-machine subnet; the networking feature lets that subnet span machines.

**cross-subnet contract** (very early concept):
A mechanism (not yet designed) by which two users can authorize a specific set of their agents to communicate across subnets — without merging their subnets. Future direction; only mentioned here so the term has a fixed meaning if it surfaces.

**agent name resolution** (planned):
Across an spt subnet, agents should still be addressable by their short ID (e.g. `ling`) — not by node pubkey. A lookup layer maps `<agent_id>` → `<node_id>:<perch_path>` within the subnet. Design open: registry shape, name-collision rules, and how local addressing stays node-implicit are all unsettled.

### Capsule (planned — v1.9, not yet realized)

**capsule**:
A hosting mode (planned for v1.9) where SPT launches Claude Code inside a psmux terminal session and drives it via keystroke injection. Moves the poll listener *out* of the Claude Code process tree and *alongside* the psmux session, letting SPT inject input directly into the CC prompt instead of waiting for the agent to ingest messages from a Monitor stream or PreToolUse hook. See `.planning/ROADMAP.md` Phases 19–22.

Three motivations:
1. Pre-Monitor-tool, the poll listener had to die after each Bash-tool message and be manually revived; capsule would have given a clean external listener. Monitor tool has since obviated this urgency.
2. Networked messaging — SPT aims to become a remote protocol so agents can be controlled from novel surfaces (VR, handhelds). Capsule is the substrate needed for full remote control (e.g. issuing `/clear`, injecting input). Networked messaging may ship first.
3. Agents driving their own and each other's sessions — e.g. clearing one's own context while seeding the next generation with new instructions.

**capsule listener**:
A variant of poll listener (Phase 19 plans it as a `poll.rs` fork) that runs *outside* the CC process tree alongside a specific psmux session. Drains the spool, delivers to the agent via psmux sendkeys when idle, respools to the inbox path when busy, and watches the claude PID for teardown. Effectively SPT's "user's hands at the keyboard" for that session.

**skeleton perch**:
A perch created by the capsule launcher *before* its agent (the CC session) has started — records the agent_id and launcher PID up front. The "registered but not yet alive" intermediate state. Recognized by SessionStart so the agent learns its identity on boot.

### Updates

**binary handoff**:
A mid-session, in-process upgrade of any long-running SPT process to the latest binary. When a new SPT version is deployed, each running poll listener and Psyche wrapper *self-migrates*: the original process spawns the new binary as a child, relays stdio so the parent CC session sees no interruption, and the new process takes over polling. Same flow for Psyche wrappers (rehydrating their state from `wrapper-state.json`). Goal: users never have to restart SPT to pick up new features.

### Identity binding

**session binding**:
The mechanism that ties an agent's identity (e.g. `ling`) to a Claude Code session's process tree. When an agent registers a perch, `info.json` records `parent_pid` — the pid of the CC session that launched the agent. On a subsequent SessionStart, `session-resume` walks perch `info.json` files and matches its own parent process pid against `info.parent_pid`. A match means "you are this agent; resume that identity."

Why parent_pid and not CC's session_id: CC session_id rotates on `/clear` and across crashes, but the CC process keeps running, so the *process tree* is the more stable handle on "the same logical agent seat" across session boundaries. A background Monitor or Bash task running across a `/clear` outlives the session_id change, enabling seamless SPT continuity.

Known unaccounted edge case: pid reuse on long-running machines. Not handled today; not observed in practice.

### Transports

**TCP**:
The primary transport. A registry maps perch IDs to TCP addresses; senders look up the target and push the body over the socket. Fast, push-based; requires the target to be live and listening.

**spool**:
A SQLite-backed durable queue per perch. The fallback transport when the target's listener isn't reachable. Pull-based: the target's poll listener drains the spool on each poll cycle. Slower than TCP but survives stale perches and listener restarts.

**inbox** (legacy):
A per-perch directory of message files from the original file-based messaging system. Largely a relic; current code still writes to it for compatibility, but the durable layer is the spool.

### Messaging verbs

**send**:
Fire-and-forget message delivery. The common operation: push a body at a target perch and return. Use `--reply-to <perch>` to reply to a prior incoming message. Formerly named `deliver`; the standalone `reply` command was folded into this flag.
_Avoid_: deliver, reply (retired)

**ring**:
Blocking request/reply. Send a message, then wait on the caller's perch for the target's reply. Builds on `send` plus a wait. If the caller has no perch, ring creates an ephemeral perch for the duration of the call. Alias: `ask`.
_Avoid_: send-and-wait

## Audience

Single user today (the author). No external users. The user almost never types the binary directly — agents do. User interaction is mostly in-session Bash via `$OWL` / `$LIVE`.


CONTEXT.md is the domain glossary, not a task list. Psyche says self-clear done but git shows fresh Phase 35.1 artifacts. Check them.


<owl_messages>
<owl_message from="todlando-psyche" priority="normal"><EVENT type="echo_commune" from="todlando-psyche" timestamp="2026-06-03T23:06:31-07:00" machine="HFENDULEAM" project="claude_skill_owl" branch="main" head_sha="be5f2e7612744c4f1776be94aa9e11639467152f" head_subject="chore: bump spt plugin to v1.11.25" note="Echo commune brief — auto-fired">&lt;live-context&gt;
Generation 42 complete. FIRE-EC fix (v1.11.25) live. New task: `/self-clear` skill fix **DONE**.

## Completed this cycle
- **`/self-clear` skill refactored** — three fixes applied to `~/.claude/skills/self-clear/scripts/self-clear.ps1` + SKILL.md:
  1. Window focus: replaced `Get-Process.MainWindowHandle` (returns first window of process) with `EnumWindows` walk keyed to ancestor PID, finds visible/titled/top-level window owned by that PID (skips windowless intermediates).
  2. Delay: `Start-Sleep -Seconds 10` → `-Milliseconds 200`.
  3. 2nd SendKeys: `'NOTE FROM THE USER: proceed with next steps.'` → `'Proceed with next steps'` + Enter.
- **Validation complete**: parse-check OK, C# class compiles, window walk verified (traced pwsh → claude.exe → pwsh → WindowsTerminal(25744) → hwnd=1839962).
- **Caveat noted**: Windows Terminal (all windows share one PID + headless ConPTY) still can't disambiguate multi-window targets by PID alone. Fix is real improvement for classic conhost (each window = separate conhost.exe PID with HWND).

## Ready for next step
Skill live immediately (`~/.claude/skills/` — no repo commit/deploy needed). If WT multi-window still mis-targets, request title-match targeting instead.
&lt;/live-context&gt;
&lt;project-context&gt;
Standalone `/self-clear` skill (not in claude_skill_owl repo). Three fixes applied + validated. No impact on main project work.
&lt;/project-context&gt;</EVENT></owl_message>
</owl_messages>


1	# Seed: $OWL list silently deletes live psyche perches
2
3	**Source:** https://paste.rs/OFRoZ (captured 2026-05-27)
4	**Severity:** HIGH — data loss in read-only command
5	**Surface:** v1.11.20 (current live)
6
7	## The Problem
8
9	`$OWL list` — intended as a read-only operation — was silently deleting live psyche perch directories. When a wrapper polled during `list` execution, the command would classify the perch as "orphaned" (based on temporarily missing files during normal operation) and perform a recursive deletion via `fs::remove_dir_all()`.
10
11	**Root cause:** The orphan-cleanup logic in `list_filter::collect()` violated two invariants simultaneously:
12
13	1. **CQRS violation:** A read command mutated persistent state
14	2. **Lifecycle violation:** Psyche perches should only be soft-cleaned (removing sentinels while preserving data), never hard-deleted
15
16	## The Fix (Three Coordinated Changes)
17
18	### Fix 1: Decouple Cleanup from List (CQRS)
19	- Disable `cleanup_orphans` at all `list` call sites (set to `false` explicitly)
20	- Move orphan GC to `live doctor --fix` as the sole authorized cleanup surface
21	- Track orphan counts in output and display a hint: `"(N orphan directories present — run `live doctor --fix` to GC)"`
22	- Add tests confirming list never deletes and properly counts orphans
23
24	### Fix 2: Harden Orphan Detection (Defense in Depth)
25	Three guards prevent false-positive classifications:
26
27	- **2a. Wrapper-PID liveness:** Check if owning wrapper process is alive; if so, directory is not orphaned
28	- **2b. Grace period:** Require 60-second age before orphan classification (avoids mid-rewrite races)
29	- **2c. Atomic writes:** Route all `info.json` writes through `atomic_write_string()` to eliminate parse failures during concurrent reads
30
31	### Fix 3: Never Hard-Delete Nested Perches
32	- Route cleanup decisions: nested perches → soft-clean only; empty top-level dirs → hard delete
33	- Soft-clean preserves data for recovery; hard-delete is only for truly empty orphans
34	- Update status labels to distinguish `SOFT-CLEANED` from `CLEANED`
35
36	## Deployment Notes
37
38	- Single coordinated rollout via standard GSD workflow (`/gsd-plan-phase`)
39	- Atomic commits per fix subsection for independent revertability
40	- Test suite validation before/after each change
41	- Verification includes wrapper stability under concurrent list operations and proper classification of test orphans
42
43	## Related (NOT this bug — separate threads)
44	- `.planning/debug/echo-fire-orphan-grace-violation-probetest.md` — wrapper orphan ECHO-FIRE before grace recheck (fixed)
45	- `.planning/debug/file-drop-file-gone-todlando.md` — `psyche-download` destructive consume vs spool envelope (diagnosed)
46
47	This bug = `list_filter::collect()` `fs::remove_dir_all` invoked from read command. Distinct surface.
48

# Seed: $OWL list silently deletes live psyche perches

**Source:** https://paste.rs/OFRoZ (captured 2026-05-27)
**Severity:** HIGH — data loss in read-only command
**Surface:** v1.11.20 (current live)

## The Problem

`$OWL list` — intended as a read-only operation — was silently deleting live psyche perch directories. When a wrapper polled during `list` execution, the command would classify the perch as "orphaned" (based on temporarily missing files during normal operation) and perform a recursive deletion via `fs::remove_dir_all()`.

**Root cause:** The orphan-cleanup logic in `list_filter::collect()` violated two invariants simultaneously:

1. **CQRS violation:** A read command mutated persistent state
2. **Lifecycle violation:** Psyche perches should only be soft-cleaned (removing sentinels while preserving data), never hard-deleted

## The Fix (Three Coordinated Changes)

### Fix 1: Decouple Cleanup from List (CQRS)
- Disable `cleanup_orphans` at all `list` call sites (set to `false` explicitly)
- Move orphan GC to `live doctor --fix` as the sole authorized cleanup surface
- Track orphan counts in output and display a hint: `"(N orphan directories present — run `live doctor --fix` to GC)"`
- Add tests confirming list never deletes and properly counts orphans

### Fix 2: Harden Orphan Detection (Defense in Depth)
Three guards prevent false-positive classifications:

- **2a. Wrapper-PID liveness:** Check if owning wrapper process is alive; if so, directory is not orphaned
- **2b. Grace period:** Require 60-second age before orphan classification (avoids mid-rewrite races)
- **2c. Atomic writes:** Route all `info.json` writes through `atomic_write_string()` to eliminate parse failures during concurrent reads

### Fix 3: Never Hard-Delete Nested Perches
- Route cleanup decisions: nested perches → soft-clean only; empty top-level dirs → hard delete
- Soft-clean preserves data for recovery; hard-delete is only for truly empty orphans
- Update status labels to distinguish `SOFT-CLEANED` from `CLEANED`

## Deployment Notes

- Single coordinated rollout via standard GSD workflow (`/gsd-plan-phase`)
- Atomic commits per fix subsection for independent revertability
- Test suite validation before/after each change
- Verification includes wrapper stability under concurrent list operations and proper classification of test orphans

## Related (NOT this bug — separate threads)
- `.planning/debug/echo-fire-orphan-grace-violation-probetest.md` — wrapper orphan ECHO-FIRE before grace recheck (fixed)
- `.planning/debug/file-drop-file-gone-todlando.md` — `psyche-download` destructive consume vs spool envelope (diagnosed)

This bug = `list_filter::collect()` `fs::remove_dir_all` invoked from read command. Distinct surface.


[Request interrupted by user]


<command-name>/reload-skills</command-name>
            <command-message>reload-skills</command-message>
            <command-args></command-args>


<local-command-stdout>Reloaded skills: 157 skills available (no changes)</local-command-stdout>


<command-name>/reload-plugins</command-name>
            <command-message>reload-plugins</command-message>
            <command-args></command-args>


<local-command-stdout>Reloaded: 6 plugins · 0 skills · 39 agents · 9 hooks · 1 plugin MCP server · 1 plugin LSP server</local-command-stdout>