xonecas.io
64875
Mc

mini-coder / commit 77efd34

fix: correctness updates. Custom update to re-use check

xonecas2026-03-14 77efd349a80c3426393e36af7b77894d19e61818 parent add22d1

8 files changed

.agents/commands/idea-check.md+12−0
@@ -0,0 +1,12 @@
1+---
2+description: Check the codebase for correctness acording to the original idea.
3+---
4+
5+All files are relative to the current working directory.
6+
7+As we developed the project over the last weeks, we experimented with adding and removing lot's
8+of features. We need to make sure we are aligned with the idea and have completly removed all of our experiementation.
9+
10+Use ./mini-coder-idea.md, ./TODO.md as the source of truth and perform an in depth audit of the codebase and docs for correctness acording to the idea file. Indentify gaps, additions, and inconsistencies. Assume the idea and todo files are correct.
11+
12+Create/Update/Refactor ./report.md with your findings. This is a analysis task only, no changes beyond the report file.
README.md+1−1
@@ -47,7 +47,7 @@ Need more firepower? I connect to **MCP servers** over HTTP or stdio — bolt on
4747 - **Built-in web search** — set `EXA_API_KEY` and I expose `webSearch` + `webContent` tools.
4848 - **Session memory** — conversations are saved in a local SQLite database. Resume where you left off with `-c` or pick a specific session with `-r <id>`.
4949 - **Shell integration** — prefix with `!` to run shell commands inline. Use `@` to reference files in your prompt (with Tab completion).
50-- **Slash commands** — `/model` or `/models` to list/switch models, `/model effort <low|medium|high|xhigh|off>` for reasoning effort, `/reasoning [on|off]` to toggle reasoning display, `/context` to inspect or tune pruning/tool-result caps, `/plan` for read-only thinking mode, `/review` for a code review (global custom command, auto-created at `~/.agents/commands/review.md`), `/agent [name]` to set or clear an active primary agent, `/undo` to roll back a turn, `/new` for a clean session, `/mcp …
50+- **Slash commands** — `/model` or `/models` to list/switch models, `/model effort <low|medium|high|xhigh|off>` for reasoning effort, `/reasoning [on|off]` to toggle reasoning display, `/context` to inspect or tune pruning/tool-result caps, `/cache` to configure prompt caching, `/review` for a code review (global custom command, auto-created at `~/.agents/commands/review.md`), `/agent [name]` to set or clear an active primary agent, `/undo` to roll back a turn, `/new` for a clean session, `/mc …
5151
5252 - **Custom commands** — drop a `.md` file in `.agents/commands/` and it becomes a `/command`. Claude-compatible `.claude/commands/` works too. Supports argument placeholders (`$ARGUMENTS`, `$1`…`$9`) and shell interpolation (`` !`cmd` ``). Global commands live in `~/.agents/commands/` and `~/.claude/commands/`. Custom commands take precedence over built-ins. → [docs/custom-commands.md](docs/custom-commands.md)
5353 - **Custom agents** — drop a `.md` file in `.agents/agents/` or `.claude/agents/` (or `~/.agents/agents/` / `~/.claude/agents/` globally) and activate it with `/agent [name]`. Agent definitions are also exposed to subagent delegation unless `mode: primary`. `@agent-name` is supported for completion and is a useful prompt convention. → [docs/custom-agents.md](docs/custom-agents.md)
TODO.md+2−1
@@ -113,4 +113,5 @@ We need to do research first, but maybe we can leverage the hooks feature to ach
113113
114114 - model-info: in `resolveFromProviderRow`, when canonical capability exists but `contextWindow` is null, fall back to provider row context (`capability.contextWindow ?? row.contextWindow`).
115115 - subagent-runner: avoid unconditional full buffering of child `stdout`/`stderr` in `runSubagent`; capture diagnostics only on failure or via a bounded tail buffer to prevent latency/memory regressions.
116-- Subagent and shell tools are very similar, shell could do what subagent does without changes. This could be leveraged to reduce code. Subagent process runner is used for /ralph and custom commands that fork context as well, there will need to be refactored.
116+- Subagent and shell tools are very similar, shell could do what subagent does without changes. This could be leveraged to reduce code. Subagent process runner is used for custom commands that fork context as well, there will need to be refactored.
117+- `/_debug` hidden command that snapshots recent logs/db and creates a report in the cwd. For dev mostly but available to all. Do not list it anywhere, only documented here and in the code itself.
docs/custom-agents.md+0−6
@@ -39,8 +39,6 @@ Then in the REPL:
3939 review the auth module for race conditions
4040 ```
4141
42-You can also mention `@reviewer` in a prompt as a naming convention, and agent names participate in `@` tab completion alongside skills and files.
43-
4442 ## Frontmatter fields
4543
4644 | Field | Required | Description |
@@ -60,10 +58,6 @@ File references are resolved before the prompt is sent:
6058 @src/auth/session.ts check this file for issues
6159 ```
6260
63-## Tab completion
64-
65-Type `@` and press `Tab` to autocomplete agent names alongside skills and files.
66-
6761 ## Listing agents
6862
6963 ```
docs/custom-commands.md+1−2
@@ -125,8 +125,7 @@ Large models for deep analysis, small models for search and lookup.
125125
126126 ## Precedence
127127
128-Custom commands shadow built-ins. If you create `.agents/commands/plan.md`
129-it will replace the built-in `/plan` for that project. The global `/review`
128+Custom commands shadow built-ins. The global `/review`
130129 command (auto-created at `~/.agents/commands/review.md` on first run) works
131130 the same way — a local `.agents/commands/review.md` will override it.
132131
docs/mini-coder.1.md+1−4
@@ -61,9 +61,6 @@ Inside the interactive session, the following slash commands are available:
6161 **/cache gemini <off|cachedContents/...>**
6262 : Attach Google Gemini cached content.
6363
64-**/plan**
65-: Toggle read-only planning mode.
66-
6764 **/undo**
6865 : Revert the last turn and restore files.
6966
@@ -146,7 +143,7 @@ The agent has access to the following tools:
146143 * **Multi-Provider LLM Routing**: Automatically discovers API keys to route to OpenCode (Zen), Anthropic, OpenAI, Google/Gemini, or local Ollama instances.
147144 * **Session Memory**: Persists conversation history in a local SQLite database, allowing users to resume past sessions effortlessly.
148145 * **Subagent Delegation**: Includes a tool to spawn parallel instances of itself to tackle independent subtasks simultaneously (up to 10 levels deep).
149-* **Plan Mode**: A read-only thinking mode utilizing read tools + MCP, safely analyzing code without making mutations or executing shell commands.
150146 * **Model Context Protocol (MCP)**: Native support for connecting external tools via MCP servers over HTTP or stdio.
151147 * **Prompt Caching**: Configurable caching behaviors for supported providers (OpenAI, Gemini).
152148 * **Undo Functionality**: Roll back the last conversation turn, cleanly restoring previous file states and git history via snapshots.
149+ack the last conversation turn, cleanly restoring previous file states and git history via snapshots.
mini-coder-idea.md+5−5
@@ -25,7 +25,7 @@ conventions and not introduce more specs. (`.agents` / `AGENTS.md`, while also s
2525
2626 - Auto discovery of providers via ENV (Example: OPENCODE_API_KEY), or local servers (Example: ollama)
2727 - Session management and command to create new/resume/list with local sqlite file.
28-- Multi-line prompt, shift enter adds a newline. Enter sends. Rich line editing/history/image paste
28+- Rich line editing/history/image paste
2929 - Seamless shell integration with `!` in prompt input.
3030 - Reference files and skills from the working directory and global configs with `@` in prompt input, plus autocomplete for files, skills, to include in the prompt.
3131 - Press `ESC` at any point during an assistant response to interrupt it: the partial response is preserved in history with an interrupt stub appended (so the LLM retains context), and the user is returned to the prompt silently. `ctrl+c` exits forcefully. `ctrl+d` (EOF) gracefully exits.
@@ -38,15 +38,15 @@ conventions and not introduce more specs. (`.agents` / `AGENTS.md`, while also s
3838 - `subagent` tool spawns a fresh `mc` subprocess in one shot mode.
3939 - tool hooks support for supported built-in tools
4040 - Commands in CLI prompt:
41- - `/model` command allows the user to pick a model from connected providers. As well as thinking effort for the model if supported. Selection persists accross sessions.
41+ - `/model` (alias `/models`) command allows the user to pick a model from connected providers. As well as thinking effort for the model if supported. Selection persists accross sessions.
4242 - `/undo` removes the last turn from conversation history.
4343 - `/reasoning` toggles display of model reasoning output.
4444 - `/context` configures context pruning and tool-result caps.
45+ - `/cache` toggles prompt caching globally; sub-commands configure provider-specific caching (`/cache openai <in_memory|24h>`, `/cache gemini <off|cachedContents/...>`).
4546 - `/review` reviews recent changes via a global command installed at app start (`~/.agents/commands/review.md`), and can be customized or shadowed locally.
4647 - `/agent` sets or clears the active primary agent.
4748 - `/mcp` list/add/remove mcp servers. servers are stored in sqlite
4849 - `/new` starts a new session with clean context. Clean UI and fresh session display
49- - `/_debug` hidden command that snapshots recent logs/db and creates a report in the cwd. For dev mostly but available to all. Do not list it anywhere, only documented here and in the code itself.
5050 - Connect to MCP servers over Streamable HTTP / SSE fallback or stdio.
5151 - Image support in prompt input, including pasted image data URLs and pasted image file paths.
5252 - Excellent auto complete for all commands, subtituitions. The user should also be able to reference files with autocomplete wihtout including them into the prompt like `@` does with TAB
@@ -68,7 +68,7 @@ conventions and not introduce more specs. (`.agents` / `AGENTS.md`, while also s
6868 - All things Bun.js, runtime, package manager. https://bun.com/docs
6969 - Multiprovider support via https://ai-sdk.dev/docs/introduction
7070 - Colored output with https://github.com/sindresorhus/yoctocolors limitted but fast!
71-- Markdow rendering support **without sacrificing speed and performance**
71+- Markdown syntax rendering support **without sacrificing speed and performance**
7272
7373 ## Repo structure
7474
@@ -78,7 +78,7 @@ No mocked/offline-servers type of tests. Focused tests on _our_ logic. Do not te
7878 Core modules:
7979
8080 - `llm-api`: Provides the api to intereact with the provider and process the full conversation turn + tool calling.
81-- `cli`: Output/UI
81+- `cli`: Output/UI, with logical separated subfolder: user input/output and ui/etc..
8282 - `agent`: Main agent implementation
8383 - `tools`: local filesystem, shell, subagent, and web/search helpers
8484 - `session`: sqlite-backed sessions, settings, model info, and MCP server storage
src/cli/input.ts+0−8
@@ -1,7 +1,6 @@
11 import { join, relative } from "node:path";
22 import * as c from "yoctocolors";
33 import { addPromptHistory, getPromptHistory } from "../session/db/index.ts";
4-import { loadAgents } from "./agents.ts";
54 import {
65 type ImageAttachment,
76 isImageFilename,
@@ -72,13 +71,6 @@ async function getAtCompletions(
7271 if (name.includes(query)) results.push(`@${name}`);
7372 }
7473
75- // Agents: @<agent-name>
76- const agents = loadAgents(cwd);
77- for (const [name] of agents) {
78- if (results.length >= MAX) break;
79- if (name.includes(query)) results.push(`@${name}`);
80- }
81-
8274 // Files: @<relative-path> — fill remaining slots up to MAX
8375 if (results.length < MAX) {
8476 const glob = new Bun.Glob(`**/*${query}*`);