customType: subagent-slash-result

content: what does the tool babysit do ?

type: text

text: what does the tool babysit do ?

mode: single

agent: ollama-explain

task: what does the tool babysit do ?

status: running


content:
## Subagent result

The **`babysit`** skill is the core execution entrypoint of the `@a5c-ai/babysitter-pi` extension. It turns ad-hoc chat requests into structured, process-driven workflows orchestrated by the external **Babysitter SDK**.

**What it does**
- When you invoke `/babysit` (or `/babysitter`, `/call`, etc.), the Pi agent switches from simple tool-call mode to the Babysitter run lifecycle.
- It installs the Babysitter SDK (`@a5c-ai/babysitter-sdk`) and CLI, then executes:
  ```bash
  babysitter instructions:babysit-skill --harness pi --interactive
  ```
- This kicks off a multi-step orchestration flow that can include:
  - **Run creation** (`run:create`) with a unique run ID and state store.
  - **Process selection** — matches your request against a library of 50+ domain-specific process definitions (engineering, science, business, etc.).
  - **Requirement interviews** — gathers scope via breakpoints before proceeding.
  - **Task dispatch** — splits work into discrete tasks, executes them iteratively (`run:iterate`), and collects results.
  - **Breakpoint handling** — pauses for human approval at critical decision points (unless running `/yolo` or `--no-interactive`).
  - **Event-sourced journaling** — all actions are logged in a journal under `.a5c/runs/<runId>/`, enabling resume, replay, and inspection.

**Key parts**
- `npm/node_modules/@a5c-ai/babysitter-pi/skills/babysit/SKILL.md` — defines the skill metadata and the non-negotiable rule: *even trivial tasks must use the full Babysitter run lifecycle*.
- `skills/help/SKILL.md` — documents the broader command surface (`/call`, `/resume`, `/yolo`, `/plan`, `/forever`, `/doctor`, etc.), but all of them ultimately route through the `babysit` orchestration core.
- `extensions/index.ts` — thin Pi extension that maps slash commands (`/babysit`) to the native `/skill:babysit` flow.

**Why it exists**
The Pi agent is great for one-off coding tasks, but lacks built-in support for long-running, multi-step workflows with state recovery. Babysitter fills that gap by adding an orchestration layer on top of Pi. The `babysit` skill is the bridge: it tells Pi how to hand control to the Babysitter SDK, enforce structured processes, and maintain event-sourced state across iterations.

**Edge cases / constraints**
- The skill mandates that **all** structured or loop-like tasks go through the SDK, even if they seem trivial.
- It requires `jq` and Node.js in the environment.
- Subagents needing scratch space must use `/tmp/<descriptive-name>/`, not `.a5c/runs/<runId>/work`, and must clean up before returning.

## Child session exports

- `/home/liph/.pi/agent/sessions/--home-liph-dotfiles-pi-.pi-agent--/2026-07-24T06-05-55-700Z_019f92ba-fc74-7b34-b217-99583d070904/537fea7a/run-0/session.jsonl`

## Artifact outputs

- `/home/liph/dotfiles/pi/.pi/agent/.pi-subagents/artifacts/537fea7a_ollama-explain_0_output.md`

outputMode: inline

status: attested

level: attested

must: Return a concise result and residual risks when applicable

evidence: manual-notes residual-risks

severity: required

status: satisfied

evidence: Read npm/node_modules/@a5c-ai/babysitter-pi/skills/babysit/SKILL.md, README.md, and skills/help/SKILL.md to extract the tool's purpose, workflow, and constraints.

validationOutput: The babysit skill is an orchestration bridge that invokes the Babysitter SDK to create event-sourced, process-driven runs with tasks, breakpoints, and resume capability.

diffSummary: No files were modified; this was a read-only explanation task.

manualNotes: The tool is part of the @a5c-ai/babysitter-pi npm package installed in the Pi agent environment. Its full behavior is dynamically generated by the Babysitter CLI via `instructions:babysit-skill` rather than being hard-coded in the skill file itself.

text: find {"pattern":"**/*babysit*"}

expandedText: find {"pattern":"**/*babysit*"}

text: grep {"pattern":"babysit","path":"/home/liph/...

text: read npm/node_modules/@a5c-ai/babysitter-pi/skills/babysit/SKILL.md

text: read npm/node_modules/@a5c-ai/babysitter-pi/README.md

text: read npm/node_modules/@a5c-ai/babysitter-pi/skills/help/SKILL.md