1---2name: tallow-expert-23description: Auto-triggers on tallow internals, architecture, extensions, configuration, or the pi framework API. Spawns the tallow-expert agent for codebase discovery. Use when this capability is needed.4---56# Tallow Expert Skill78## When This Triggers910- User asks about tallow architecture, internals, or source code11- How extensions work, their API, or how to create them12- The pi framework (ExtensionAPI, tools, commands, events, types)13- Configuration (settings.json, themes, keybindings, packages)14- How skills, agents, or prompts are loaded and discovered15- Debugging or troubleshooting tallow itself16- How the TUI, session management, or model registry works1718## Procedure1920Invoke the `tallow-expert` agent via the subagent tool:2122```json23{ "agent": "tallow-expert", "task": "<the user's question>" }24```2526The agent explores the tallow source code and returns an answer.27Relay that answer to the user.2829<!-- BEGIN GENERATED -->3031## Quick Reference3233| Component | Location |34|-----------|----------|35| Core source | `src/` (agent-runner.ts, atomic-write.ts, auth-hardening.ts, cli-auto-rebuild.ts, cli.ts, compaction-cancel-patch.ts, config.ts, extensions-global.d.ts, fatal-errors.ts, index.ts, install.ts, interactive-mode-patch.ts, model-metadata-overrides.ts, otel.ts, pid-manager.ts, pid-schema.ts, plugins.ts, process-cleanup.ts, project-trust-banner.ts, project-trust-interop.ts, project-trust.ts, runtime-path-provider.ts, runtime-provenance.ts, sdk.ts, session-migration.ts, session-utils.ts, startup-profile.ts, startup-timing.ts, streaming-yield-patch.ts, workspace-transition-interactive.ts, workspace-transition-relay.ts, workspace-transition.ts, yield-to-io.ts) |36| Extensions | `extensions/` — extension.json + index.ts each (53 bundled) |37| Skills | `skills/` — subdirs with SKILL.md |38| Agents | `agents/` — markdown with YAML frontmatter |39| Themes | `themes/` — JSON files (34 dark-only themes) |40| Forked TUI | `packages/tallow-tui/` — forked `@mariozechner/pi-tui` |41| Pi framework types | `node_modules/@mariozechner/pi-coding-agent/dist/core/extensions/types.d.ts` |42| User config | `~/.tallow/` (settings.json, auth.json, keybindings.json) |43| User extensions | `~/.tallow/extensions/` |44| User agents | `~/.tallow/agents/`, `~/.claude/agents/` |45| User skills | `~/.tallow/skills/`, `~/.claude/skills/` |46| User commands | `~/.tallow/commands/`, `~/.claude/commands/` |47| Project agents | `.tallow/agents/`, `.claude/agents/` |48| Project skills | `.tallow/skills/`, `.claude/skills/` |49| Project commands | `.tallow/commands/`, `.claude/commands/` |50| Sessions | `~/.tallow/sessions/` — per-cwd subdirs |51| Docs site | `docs/` — Astro Starlight site |5253**Agent frontmatter fields**: `tools`, `disallowedTools`, `maxTurns`, `mcpServers`, `context: fork`, `agent`, `model`5455### Extension API Surface5657Extensions export a default function receiving `ExtensionAPI` (conventionally named `pi`):5859#### Registration6061- `registerTool(tool: ToolDefinition<TParams, TDetails, TState>)` — Register a tool that the LLM can call.62- `registerCommand(name: string, options: Omit<RegisteredCommand, "name" | "sourceInfo">)` — Register a custom command.63- `registerFlag(name: string, options: object)` — Register a CLI flag.64- `registerMessageRenderer(customType: string, renderer: MessageRenderer<T>)` — Register a custom renderer for CustomMessageEntry.65- `registerProvider(name: string, config: ProviderConfig)` — Register or override a model provider.6667#### Messaging6869- `sendMessage(message: Pick<CustomMessage<T>, "customType" | "content" | "display" | "details">, options?: object)` — Send a custom message to the session.70- `appendEntry(customType: string, data?: T)` — Append a custom entry to the session for state persistence (not sent to LLM).7172#### Session7374- `setSessionName(name: string)` — Set the session display name (shown in session selector).75- `getSessionName()` — Get the current session name, if set.76- `setLabel(entryId: string, label: string)` — Set or clear a label on an entry.7778#### Tools & Model7980- `getFlag(name: string)` — Get the value of a registered CLI flag.81- `exec(command: string, args: string[], options?: ExecOptions)` — Execute a shell command.82- `getActiveTools()` — Get the list of currently active tool names.83- `getAllTools()` — Get all configured tools with parameter schema and source metadata.84- `setActiveTools(toolNames: string[])` — Set the active tools by name.85- `getCommands()` — Get available slash commands in the current session.86- `setModel(model: Model<any>)` — Set the current model.87- `getThinkingLevel()` — Get current thinking level.88- `setThinkingLevel(level: ThinkingLevel)` — Set thinking level (clamped to model capabilities).89- `unregisterProvider(name: string)` — Unregister a previously registered provider.90- `events` — Shared event bus for extension communication.9192### Events (`pi.on(event, handler)`)9394#### Session lifecycle9596| Event | Payload | Can return |97|-------|---------|------------|98| `resources_discover` | `ResourcesDiscoverEvent` | `ResourcesDiscoverResult` |99| `session_start` | `SessionStartEvent` | — |100| `session_before_switch` | `SessionBeforeSwitchEvent` | `SessionBeforeSwitchResult` |101| `session_switch` | `SessionSwitchEvent` | — |102| `session_before_fork` | `SessionBeforeForkEvent` | `SessionBeforeForkResult` |103| `session_fork` | `SessionForkEvent` | — |104| `session_before_compact` | `SessionBeforeCompactEvent` | `SessionBeforeCompactResult` |105| `session_compact` | `SessionCompactEvent` | — |106| `session_shutdown` | `SessionShutdownEvent` | — |107| `session_before_tree` | `SessionBeforeTreeEvent` | `SessionBeforeTreeResult` |108| `session_tree` | `SessionTreeEvent` | — |109110#### Agent lifecycle111112| Event | Payload | Can return |113|-------|---------|------------|114| `before_agent_start` | `BeforeAgentStartEvent` | `BeforeAgentStartEventResult` |115| `agent_start` | `AgentStartEvent` | — |116| `agent_end` | `AgentEndEvent` | — |117| `turn_start` | `TurnStartEvent` | — |118| `turn_end` | `TurnEndEvent` | — |119| `model_select` | `ModelSelectEvent` | — |120121#### Tool events122123| Event | Payload | Can return |124|-------|---------|------------|125| `tool_execution_start` | `ToolExecutionStartEvent` | — |126| `tool_execution_update` | `ToolExecutionUpdateEvent` | — |127| `tool_execution_end` | `ToolExecutionEndEvent` | — |128| `tool_call` | `ToolCallEvent` | `ToolCallEventResult` |129| `tool_result` | `ToolResultEvent` | `ToolResultEventResult` |130131#### Input & resources132133| Event | Payload | Can return |134|-------|---------|------------|135| `context` | `ContextEvent` | `ContextEventResult` |136| `user_bash` | `UserBashEvent` | `UserBashEventResult` |137| `input` | `InputEvent` | `InputEventResult` |138139#### Message streaming140141| Event | Payload | Can return |142|-------|---------|------------|143| `message_start` | `MessageStartEvent` | — |144| `message_update` | `MessageUpdateEvent` | — |145| `message_end` | `MessageEndEvent` | — |146147### ExtensionContext (`ctx` in event handlers)148149- `ui` — UI methods for user interaction150- `hasUI` — Whether UI is available (false in print/RPC mode)151- `cwd` — Current working directory152- `sessionManager` — Session manager (read-only)153- `modelRegistry` — Model registry for API key resolution154- `model` — Current model (may be undefined)155- `isIdle()` — Whether the agent is idle (not streaming)156- `signal` — The current abort signal, or undefined when the agent is not streaming.157- `abort()` — Abort the current agent operation158- `hasPendingMessages()` — Whether there are queued messages waiting159- `shutdown()` — Gracefully shutdown pi and exit.160- `getContextUsage()` — Get current context usage for the active model.161- `compact(options?: CompactOptions)` — Trigger compaction without awaiting completion.162- `getSystemPrompt()` — Get the current effective system prompt.163164### ExtensionCommandContext (`ctx` in command handlers, extends ExtensionContext)165166- `waitForIdle()` — Wait for the agent to finish streaming167- `fork(entryId: string)` — Fork from a specific entry, creating a new session file.168- `navigateTree(targetId: string, options?: object)` — Navigate to a different point in the session tree.169- `switchSession(sessionPath: string)` — Switch to a different session file.170- `reload()` — Reload extensions, skills, prompts, and themes.171172### ExtensionUIContext (`ctx.ui`)173174- `select(title: string, options: string[], opts?: ExtensionUIDialogOptions)` — Show a selector and return the user's choice.175- `confirm(title: string, message: string, opts?: ExtensionUIDialogOptions)` — Show a confirmation dialog.176- `input(title: string, placeholder?: string, opts?: ExtensionUIDialogOptions)` — Show a text input dialog.177- `notify(message: string, type?: "info" | "warning" | "error")` — Show a notification to the user.178- `onTerminalInput(handler: TerminalInputHandler)` — Listen to raw terminal input (interactive mode only).179- `setStatus(key: string, text: string)` — Set status text in the footer/status bar.180- `setWorkingMessage(message?: string)` — Set the working/loading message shown during streaming.181- `setHiddenThinkingLabel(label?: string)` — Set the label shown for hidden thinking blocks.182- `setWidget(key: string, content: string[], options?: ExtensionWidgetOptions)` — Set a widget to display above or below the editor.183- `setTitle(title: string)` — Set the terminal window/tab title.184- `pasteToEditor(text: string)` — Paste text into the editor, triggering paste handling (collapse for large content).185- `setEditorText(text: string)` — Set the text in the core input editor.186- `getEditorText()` — Get the current text from the core input editor.187- `editor(title: string, prefill?: string)` — Show a multi-line editor for text editing.188- `readonly theme` — Get the current theme for styling.189- `getAllThemes()` — Get all available themes with their names and file paths.190- `getTheme(name: string)` — Load a theme by name without switching to it.191- `setTheme(theme: string | Theme)` — Set the current theme by name or Theme object.192- `getToolsExpanded()` — Get current tool output expansion state.193- `setToolsExpanded(expanded: boolean)` — Set tool output expansion state.194195<!-- END GENERATED -->196197---198> Converted and distributed by [TomeVault](https://tomevault.io/claim/dungle-scrubs) — claim your Tome and manage your conversions.199<!-- tomevault:4.0:skill_md:2026-04-13 -->