@@ -57,7 +57,7 @@ This replaces: `yoctocolors`, `yoctomarkdown`, `yoctoselect`, and all our custom
5757
5858 ## Tools
5959
60-Six built-in tools, plus a conditional read-only image tool. Plugins may add more (see [Plugins](#plugins)).
60+Six built-in tools, plus a conditional read-only image tool.
6161
6262 ### `shell`
6363
@@ -187,74 +187,13 @@ We follow the spec's progressive disclosure model:
187187
188188 Relative paths in skills are resolved against the skill's directory. The system prompt instructions explain this to the model.
189189
190-## Plugins
191-
192-Plugins extend mini-coder itself, not just the prompt. They are the mechanism for optional capabilities that don't belong in the core — MCP servers, custom tools, integrations, alternate context-management strategies, UI/theme extensions, and other agent features.
193-
194-### Interface
195-
196-A plugin is a module that exports a function conforming to a simple interface:
197-
198-```ts
199-interface Plugin {
200- name: string;
201- description: string;
202-
203- /** Called once at startup. Returns tools to register and/or context to add. */
204- init(
205- agent: AgentContext,
206- config?: Record<string, unknown>,
207- ): Promise<PluginResult>;
208-
209- /** Called on shutdown for cleanup. */
210- destroy?(): Promise<void>;
211-}
212-
213-interface PluginResult {
214- /** Additional tools the agent can use. */
215- tools?: Tool[];
216- /** Additional context to append to the system prompt. */
217- systemPromptSuffix?: string;
218- /** Partial theme override — merged on top of the default theme. */
219- theme?: Partial<Theme>;
220-}
221-
222-interface AgentContext {
223- /** The working directory. */
224- cwd: string;
225- /** Read-only access to the current session's messages. */
226- messages: readonly Message[];
227- /** The app data directory (~/.config/mini-coder/). */
228- dataDir: string;
229-}
230-```
231-
232-### Discovery
233-
234-Plugins are declared in a config file (`~/.config/mini-coder/plugins.json` or similar). Each entry points to a module path or package name:
235-
236-```json
237-{
238- "plugins": [
239- { "name": "mcp", "module": "@mini-coder/plugin-mcp", "config": { ... } },
240- { "name": "custom", "module": "./my-plugin.ts" }
241- ]
242-}
243-```
244-
245-### Why plugins
246-
247-- **Separation of concerns**: the agent loop doesn't know about specific integrations or optional behaviors — it only sees `Tool[]` and plugin-provided context/theme extensions.
248-- **Optional complexity**: capabilities are opt-in. Users only pay for what they use.
249-- **Extensibility without bloat**: third-party tools, custom integrations, project-specific helpers, and non-core agent features all go through the same interface.
250-
251190 ## Agent loop
252191
253192 The core runtime. Streaming is the default behavior throughout the turn: user-visible state should update incrementally as the model emits text, thinking, and tool-call events, rather than waiting for whole responses to complete. This is what happens while the agent is active:
254193
255194 1. **User submits a message** — the input text (plus any embedded images or skill bodies from `/skill:name`) becomes a pi-ai `UserMessage`. It is appended to the session's message history, rendered in the UI immediately, and persisted to the DB.
256195
257-2. **Build context** — construct a pi-ai `Context`: the system prompt (see [System prompt](#system-prompt)), the full message history, and the registered tool definitions (built-in + plugin tools). The prompt context snapshot is loaded once at startup or another explicit reload boundary and then reused across turns so provider prompt caching stays effective. It is refreshed only at boundaries such as `/new` or CWD change.
196+2. **Build context** — construct a pi-ai `Context`: the system prompt (see [System prompt](#system-prompt)), the full message history, and the registered tool definitions. The prompt context snapshot is loaded once at startup or another explicit reload boundary and then reused across turns so provider prompt caching stays effective. It is refreshed only at boundaries such as `/new` or CWD change.
258197
259198 3. **Stream to LLM** — call `streamSimple(model, context, options)` from pi-ai. Iterate over the event stream:
260199 - `text_delta` / `thinking_delta` / `toolcall_delta` → update the in-progress assistant message and the UI incrementally (stream raw markdown text, show thinking if enabled, accumulate tool call arguments as they arrive).
@@ -263,7 +202,7 @@ The core runtime. Streaming is the default behavior throughout the turn: user-vi
263202 - `error` → display error in the log, return to the input prompt.
264203
265204 4. **Tool execution** — when the LLM requests tool calls:
266- - Execute each tool call. For `shell`: run the command, capture output, truncate if needed. For `read`: read the requested file slice and include continuation guidance when needed. For `grep`: run the structured ripgrep search and return parsed match data. For `edit`: perform the replacement. For `todoWrite`: apply the incremental todo changes and return the full current list. For `todoRead`: return the full current list. For `readImage`: read and base64-encode the file. For plugin tools: del …
205+ - Execute each tool call. For `shell`: run the command, capture output, truncate if needed. For `read`: read the requested file slice and include continuation guidance when needed. For `grep`: run the structured ripgrep search and return parsed match data. For `edit`: perform the replacement. For `todoWrite`: apply the incremental todo changes and return the full current list. For `todoRead`: return the full current list. For `readImage`: read and base64-encode the file.
267206 - Each result becomes a `ToolResultMessage` appended to history and DB (same turn number).
268207 - After all tool results are appended, if queued steering messages exist go to step 6; otherwise loop back to step 2 (re-stream with the updated context).
269208
@@ -287,7 +226,7 @@ The core runtime. Streaming is the default behavior throughout the turn: user-vi
287226
288227 **No step limit** — the loop runs until the model stops (`stopReason: "stop"`) or the user interrupts. There is no maximum number of tool calls per turn.
289228
290-**Context limit** — mini-coder does not implement built-in context compaction. The status bar still estimates current context usage for the next request, but automatic history summarization is not a core feature. If compaction or summarization is added, it should be optional and plugin-provided rather than hardwired into the core, since users disagree about whether automatic compaction is desirable.
229+**Context limit** — mini-coder does not implement built-in context compaction. The status bar still estimates current context usage for the next request, but automatic history summarization is not a core feature. If compaction or summarization is added, it should stay optional rather than hardwired into the core, since users disagree about whether automatic compaction is desirable.
291230
292231 ## Architecture
293232
@@ -299,9 +238,8 @@ src/
299238 agent.ts — the core agent loop
300239 tools.ts — built-in tool implementations
301240 skills.ts — agentskills.io discovery, parsing, catalog
302- prompt.ts — system prompt construction (core prompt + AGENTS.md + skills + plugins + environment)
241+ prompt.ts — system prompt construction (core prompt + AGENTS.md + skills + environment)
303242 session.ts — SQLite session persistence
304- plugins.ts — plugin loader and lifecycle
305243 git.ts — git state gathering
306244 ui.ts — cel-tui UI (layout, rendering, state)
307245 types.ts — shared types
@@ -380,7 +318,7 @@ The current environment is:
380318 - Delegate when you are orchestarting a large to-do/plan execution.
381319 ```
382320
383-AGENTS.md content, skills catalog, and plugin suffixes are appended after this core prompt in that order.
321+AGENTS.md content and the skills catalog are appended after this core prompt in that order.
384322
385323 **AGENTS.md** (when present):
386324
@@ -413,7 +351,7 @@ Environment block notes:
413351 - The `Read Image` line is omitted when the active model does not support image input.
414352 - The OS value is normalized to `linux`, `mac`, or `docker`.
415353 - The static core prompt text should remain identical across turns.
416-- AGENTS.md content, skills, plugin suffixes, and the git snapshot are stable within a session, changing only on `/new` or CWD change.
354+- AGENTS.md content, skills, and the git snapshot are stable within a session, changing only on `/new` or CWD change.
417355 - Rebuilding the prompt for later turns must reuse that same session-start snapshot so provider prompt caching keeps working.
418356
419357 Git state is gathered when the session prompt context is loaded (startup, `/new`, or CWD change), not after each turn, via fast git commands:
@@ -494,7 +432,7 @@ VStack({ height: "100%" }, [
494432
495433 ### Theme
496434
497-All UI colors are defined in a single `Theme` object. The UI never hardcodes colors — it reads from the active theme. Plugins can return a `Partial<Theme>` in their `PluginResult` to override any color. Multiple plugin overrides are merged left-to-right (last wins).
435+All UI colors are defined in a single `Theme` object. The UI never hardcodes colors — it reads from the active theme. When theme overrides are applied, they merge left-to-right (last wins).
498436
499437 ```ts
500438 interface StatusTone {
@@ -596,7 +534,6 @@ Tool blocks share a common frame: a left border (`│`) plus a compact header pi
596534 - **Tool calls — edit**: rendered in the shared tool frame. The in-progress tool-call preview shows the target path followed by the streamed `oldText` and `newText` bodies. Old text is styled as removed and new text as added, but the preview does not render literal `-`/`+` diff prefixes. The preview body uses [verbose tool rendering](#verbose-tool-rendering). Successful results render a compact confirmation block (`edit <-` plus the file path); errors render the returned error text.
597535 - **Tool calls — todoWrite / todoRead**: rendered in the shared tool frame. Successful results render the full current todo list as a structured themed checklist with status markers (`[ ]`, `[~]`, `[x]`). This checklist is always shown in full and never truncated, regardless of `/verbose`. Errors render the returned error text.
598536 - **Tool calls — readImage**: rendered in the shared tool frame. The assistant tool call streams the path as it arrives. Successful results render a compact result block (`read image <-` plus the file path) rather than rendering the image itself.
599-- **Tool calls — plugin tools**: rendered in the shared tool frame, prefixed with plugin/tool name when available.
600537 - **UI messages**: internal app messages such as `/help` output, OAuth progress, `/fork` notices, and other session-local notices. They are rendered in the conversation log, persisted with the session, excluded from model context, and do not participate in conversational turn numbering. `/help` output renders as syntax-highlighted raw markdown so headings, lists, and inline code stay scannable while preserving the literal markdown markers. `/todo` output is also UI-only, but it renders using the …
601538 - **Errors**: one-line summary, styled distinctly.
602539
@@ -755,13 +692,6 @@ Representative entry shapes:
755692 │ screenshots/failing-layout.png
756693 ```
757694
758-**Plugin tool**
759-
760-```text
761- │ mcp/search <-
762- │ session persistence sqlite turn numbering
763-```
764-
765695 **UI message**
766696
767697 ```text
@@ -848,7 +778,7 @@ add tests for undo_
848778 | `/login` | Interactive OAuth login. Shows a selector with available OAuth providers and their login status (logged in / not logged in). Selecting a provider starts the browser-based OAuth flow. Uses pi-ai's OAuth registry. Credentials are persisted to the app data directory and used for provider discovery on subsequent launches. …
849779 | `/logout` | Interactive OAuth logout. Shows a selector with logged-in OAuth providers. Selecting one clears its saved credentials. …
850780 | `/effort` | Interactive effort selector. Shows the four reasoning levels (`low`, `medium`, `high`, `xhigh`) with the current level highlighted. Updates the status bar immediately, and the selected effort is persisted immediately as the user's global default. The session record's `effort` field is not updated (it reflects the initial choice, like `/model`). …
851-| `/help` | List available commands, including the current on/off state of `/reasoning` and `/verbose`, plus loaded AGENTS.md files, discovered skills, and active plugins. …
781+| `/help` | List available commands, including the current on/off state of `/reasoning` and `/verbose`, plus loaded AGENTS.md files and discovered skills. …
852782
853783 Commands are discoverable when the input starts with `/`: pressing `Tab` in that state switches from file-path autocomplete to interactive command select/filter.
854784
@@ -921,7 +851,7 @@ On launch, mini-coder:
921851 - `defaultEffort`: if valid, use it; otherwise fall back to `medium`.
922852 - `showReasoning`: if present, use it; otherwise fall back to `true`.
923853 - `verbose`: if present, use it; otherwise fall back to `false`.
924-5. Loads AGENTS.md files, skills, plugins.
854+5. Loads AGENTS.md files and skills.
925855 6. Selects the launch mode:
926856 - Interactive TUI when `stdin` and `stdout` are both TTYs and `-p` was not provided.
927857 - Headless one-shot mode otherwise.