xonecas.io
64875
Mc

mini-coder / commit dac6820

feat: idea alignment refactor for v1

Squash merge of feat/idea-alignment-refactor-for-v1 (23 commits):
- Remove agent personas, /context command, custom commands system
- Add /session command, /model Tab-autocomplete
- Align man page, AGENTS.md, and docs with idea spec
- Move oauth under session, remove configurable pruning modes
- Full agents.md & skills spec compliance + context:fork subagent delegation
- One-shot mode suppresses non-final output
- Context pruning and compaction per-step via middleware
- Enable colored git output, remove default shell timeout
- Short-circuit listSkillResources walk at limit
- Unified audit skill

xonecas2026-03-19 dac6820f587cf9ba7598899c996eafe69b92dffb parent 21556e0

73 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

.agents/skills/audit/SKILL.md+51−0
@@ -0,0 +1,51 @@
1+---
2+name: audit
3+description: Full codebase audit — code review, multi-provider UI testing, and combined report.
4+---
5+
6+Run a complete audit of the mini-coder implementation. Use `mini-coder-idea.md` and `TODO.md` as source of truth throughout.
7+
8+## Phase 1 — Code & Architecture Review
9+
10+Audit the codebase against `mini-coder-idea.md`:
11+
12+- Question design choices and rethink as needed while staying compliant with the original idea.
13+- Employ KISS, DRY, and YAGNI — no surprise additions or eager optimizations.
14+- Check TODO.md for known issues already tracked.
15+- Verify all documentation matches the idea file.
16+
17+Use `bun run dev` and `tmux` via shell to run one-shot and interactive sessions manually. Analyze console output and UI from a user's perspective.
18+
19+## Phase 2 — Multi-Provider UI Probe
20+
21+Run `mc` sessions across all SDK paths to capture what real users see.
22+Do NOT delegate analysis to the models under test.
23+Use `tmux` so you can test interactive sessions properly. Remember to send Enter to submit, and be careful with paste handling.
24+
25+### Models to use (one per SDK path)
26+
27+Opencode zen and Anthropic login are available in this environment.
28+Pick cheap options. Verify available models at https://opencode.ai/docs/zen/, then choose:
29+
30+- `@ai-sdk/anthropic` path → a `zen/claude-*` haiku-class model
31+- `@ai-sdk/google` path → a `zen/gemini-*` flash-class model
32+- `@ai-sdk/openai` path (responses endpoint) → a `zen/gpt-*` small low cost model
33+- `@ai-sdk/openai-compatible` path → `zen/*` or similar small low cost model
34+
35+Avoid free models due to rate limit issues.
36+Also use an Anthropic OAuth model for completeness.
37+
38+### Prompts
39+
40+Use prompts that exercise realistic multi-step, multi-turn patterns. Check the db for examples if needed.
41+
42+## Phase 3 — Report
43+
44+Write `AUDIT-REPORT.md` in the repo root with these sections:
45+
46+- **Summary** — how you tested and what you found.
47+- **Code & Architecture** — correctness issues, KISS, DRY, and YAGNI violations, idea misalignment.
48+- **UI/UX Alignment** — comparison of actual output vs mini-coder-idea.md expectations across providers.
49+- **Recommendations** — split into immediate bugs, code changes, and polish items.
50+
51+Be concise. The report is analysis only — review findings with the user before making any changes.
.agents/skills/idea-check/SKILL.md+0−17
@@ -1,17 +0,0 @@
1----
2-name: idea-check
3-description: Check the codebase for correctness acording to the original idea.
4----
5-
6-Do a complete audit the implementation of ./mini-coder-idea.md in this codebase return a final report.
7-
8-Use the shell tool and `bun run dev` to do manual tests. One shot and interactive sessions. And to analyze the console output and ui from a users perspective.
9-
10-Employ YAGNI in your review.
11-Check TODO.md for know issues already tracked.
12-
13-Question design choices and rethink as needed while staying compliant with the original idea. This includes changing UI and console output as needed. Make sure all documentation matches the idea file.
14-
15-If you think the codebase is now at a good place, check the recent commit for all changes and report the final status to the user.
16-
17-Review your findings with me before doing any changes.
.agents/skills/mini-coder-orchestrator/SKILL.md+0−0
.agents/skills/mini-coder/SKILL.md+0−3
@@ -85,9 +85,6 @@ Inside `mc`, the user can run slash commands such as:
8585 - `/model <id>` — switch models
8686 - `/model effort <low|medium|high|xhigh|off>` — set reasoning effort when supported
8787 - `/reasoning [on|off]` — toggle reasoning display
88-- `/context prune <off|balanced|aggressive>` — set pruning strategy
89-- `/context cap <off|bytes|kb>` — cap tool payload size
90-- `/cache <on|off>` — toggle prompt caching
9188 - `/undo` — remove the last conversation turn (does not revert filesystem changes)
9289 - `/new` — start a fresh session
9390 - `/mcp list` — list configured MCP servers
.agents/skills/ui-probe/SKILL.md+0−39
@@ -1,39 +0,0 @@
1----
2-name: ui-probe
3-description: Run one-shot mc sessions across all SDK paths, capture output, and write a UI/UX analysis report to UI-REPORT.md.
4----
5-
6-The goal is to capture a realistic perspective of what the users see when using mini-coder. And ensure the core idea (mini-coder-idea.md) is well executed in the output.
7-
8-Run `mc` using one cheap modern model per provider path, capture their raw terminal output, then analyse it yourself and write `UI-REPORT.md` in the repo root.
9-Do NOT delegate the report to the models under test.
10-Use `tmux` so you can test interactive sessions properly. Remember to send Enter to submit, and careful with the paste handling.
11-
12-## Models to use (one per SDK path)
13-
14-Pick cheap options. Verify available models at https://opencode.ai/docs/zen/, then choose:
15-
16-- `@ai-sdk/anthropic` path → a `zen/claude-*` haiku-class model
17-- `@ai-sdk/google` path → a `zen/gemini-*` flash-class model
18-- `@ai-sdk/openai` path (responses endpoint) → a `zen/gpt-*` small low cost model
19-- `@ai-sdk/openai-compatible` path → `zen/*` or similar small low cost model
20-
21-Avoid free models due to rate limit issues.
22-Also use a Anthropic Oauth model for completness
23-
24-## Prompt to give each model
25-
26-Use prompts that will ensure a realistic pattern, using multi steps and turns. Check the db for examples if needed.
27-
28-## Report structure for UI-REPORT.md
29-
30-Write `UI-REPORT.md` in the repo root with these sections:
31-
32-- **Summary** -- a short summary of how you tested and what your found.
33-- **Alignment with mini-coder-idea.md** -- Comparison summary, avoid using tables.
34-- **Recommendations** -- split into immediate bugs and polish items
35-
36-Don't be verbose, be concise in your report.
37-
38-Use `mini-coder-idea.md` and `TODO.md` as the source of truth for what the UI _should_ look like.
39-The report is analysis only — no code changes.
AGENTS.md+7−8
@@ -1,15 +1,14 @@
11 # Mini Coder repo for agents:
22
3-- App data folder is in `~/.config/mini-coder/`. It includes sqlite db file.
4-- Core idea is in [mini-coder-idea.md](mini-coder-idea.md). This file is managed by the user, don't edit unless asked to by the user.
3+- App data folder is in `~/.config/mini-coder/`. It includes sqlite db file and logs.
4+- Core idea is in [mini-coder-idea.md](mini-coder-idea.md). This file is managed by the user, don't edit unless asked to by the user. Treat this as the source of truth for the design/implementation.
55 - README.md is cosmetic for users, don't edit unless asked to.
6-- Write minimal tests, focused on our code's logic. Never test dependencies. Never use mock servers or stubs.
7-- Keep the repo pristine: no failing tests, no lint, no build issues, no `nolint:` comments.
8-- Use `bun run jscpd && bun run knip && bun run typecheck && bun run format && bun run lint && bun run test` to check your changes.
6+- Write minimal tests, focused on our code's logic. Never test dependencies. Never use mocks or stubs.
7+- Keep the repo pristine: no failing tests, no lint, no build issues, no `ignore`-style comments. No failing hooks.
8+- Verify your changes, you can use the shell tool and `tmux` to test as needed.
9+- Use `bun run format` to fix formatting issues.
910 - We care about performance.
10-- Don't worry about formatting issues, formatting happens automatically on mutations.
1111 - Do not inline `import` calls. Don't duplicate code. Don't leave dead code behind.
1212 - Don't make random test files, if you need to test something, write a propper unit test.
1313 - If you make temp files, clean them up when you are done.
14-- Use Conventional Commits formatting for commit messages.
15-- Never contradict or dismiss the user's statements about how the code behaves. If the user says something was working before, treat that as fact and investigate the git history to find the regression. Do not speculate that it was "always broken."
14+- Use Conventional Commits formatting for commit messages. When you commit, include the whole diff unless told otherwise.
CLAUDE.md+1−0
@@ -0,0 +1 @@
1+Read and follow the instructions in [AGENTS.md](AGENTS.md).
README.md+1−3
@@ -55,9 +55,7 @@ Use `/login` inside the REPL to authenticate via browser-based OAuth (currently
5555 - **Shell integration** — `!` prefix for inline commands, `@` to reference files with tab completion
5656 - **Web search** — `webSearch` + `webContent` tools when `EXA_API_KEY` is set
5757 - **MCP support** — connect external tool servers over HTTP or stdio
58-- **Custom commands** — drop `.md` files in `.agents/commands/` → instant `/slash` commands
59-- **Custom agents** — `.agents/agents/*.md` for specialized personas you can activate with `/agent`
60-- **Skills** — `.agents/skills/<name>/SKILL.md`, inject with `@name`
58+- **Skills** — `.agents/skills/<name>/SKILL.md`, invoke with `/skill-name` in the prompt
6159 - **`mc-edit`** — safe, exact-text file editing (no full-file rewrites)
6260 - **16 ANSI colors** — inherits your terminal theme. Always looks right.
6361
TODO.md+4−12
@@ -1,28 +1,20 @@
11 # TODO
22
3-- Codebase is hurting from fast iteration and adding/removing features as well as core fundamental changes. We need to do a large refactoring based on the updated idea and remove the extra complexity and fragments of all the experimentation we did with other features.
3+- When a shell tool call hits max timeout, the turn ends and the parent terminal is left in a broken state.
44 - CTRL+d hangs sometimes and doesn't exit.
5+- **MiniMax empty lines in one-shot** — Investigate empty text deltas. May need to skip rendering deltas that are only whitespace at stream start.
6+- **Double prompt glyph after ESC** — The `turn-complete` handler writes a newline when `!renderedVisibleOutput`, then the input loop also writes its prompt. May need coordination to avoid the double prompt.
57
68 ---
79
810 ## Polish
911
1012 - **Truncated tool commands** — Long `mc-edit` invocations truncate with `…` mid-argument (e.g. `--new '{…`). Could truncate at argument boundaries for clarity.
11-- **`sed` classification in shell icons** — `sed -n '1,200p'` (read-only) shows the `✎` write icon. Complex pipes like `grep … | sed …` show `?`. Could check for `-n`/`-i` flags, or classify `sed` as `$` (generic run).
1213
1314 ---
1415
1516 # Deferred fixes
1617
18+- `maxOutputTokens` is hardcoded at 16384 in `turn-request.ts`. Some models support higher output (e.g. Claude Opus 32k). Consider deriving from model info or making it configurable.
1719 - `/_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.
1820 - Check this skill to learn about tmux and how we can use it to run manual tests. https://raw.githubusercontent.com/obra/superpowers-lab/refs/heads/main/skills/using-tmux-for-interactive-commands/SKILL.md
19-
20----
21-
22-### LSP Diagnostics (not very important, with strong linting this is not as necessary, but we should implement asap, deferred)
23-
24-We should have a closed loop feedback for LSP diagnostics on edits/reads.
25-
26-This could potentially be a very big slowdown, waiting for updated diagnostics every edit. This also has bias downsides, stale diagnostics confuse the LLM, and can cause negative distractions.
27-
28-We need to do research first and find an approach that fits the current shell-first architecture without the performance penalties. Needs brainstorming
docs/mini-coder.1.md+35−70
@@ -46,31 +46,19 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
4646 `/model effort` *low|medium|high|xhigh|off*
4747 : Set reasoning effort.
4848
49-`/reasoning` \[*on|off*\]
50-: Toggle reasoning display.
51-
52-`/context prune` *off|balanced|aggressive*
53-: Pruning strategy.
54-
55-`/context cap` *off|bytes|kb*
56-: Tool result payload cap.
57-
58-`/cache` *on|off*
59-: Toggle prompt caching globally.
60-
61-`/cache openai` *in_memory|24h*
62-: OpenAI cache retention.
49+`/session` \[*id*\]
50+: List sessions or switch to one.
6351
64-`/cache gemini` *off|cachedContents/...*
65-: Gemini cached content.
52+`/new`
53+: Start a fresh session.
6654
6755 `/undo`
6856 : Remove last turn (does NOT revert filesystem).
6957
70-`/new`
71-: Start a fresh session.
58+`/reasoning` \[*on|off*\]
59+: Toggle reasoning display.
7260
73-`/verbose`
61+`/verbose` \[*on|off*\]
7462 : Toggle output truncation.
7563
7664 `/mcp list`
@@ -85,11 +73,8 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
8573 `/mcp remove` *name*
8674 : Remove MCP server.
8775
88-`/agent` \[*name*\]
89-: Set or clear active agent.
90-
9176 `/review`
92-: Review changes (custom command, auto-created globally).
77+: Review recent changes (global skill, auto-created at first run).
9378
9479 `/login`
9580 : Show OAuth login status.
@@ -109,10 +94,30 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
10994 ## INLINE FEATURES
11095
11196 `!` prefix
112-: Runs shell commands inline.
97+: Runs shell commands inline — output is sent to the LLM as a user message.
11398
11499 `@` prefix
115-: References files or skills (with tab completion).
100+: Embeds a file into the prompt (Tab to complete file paths).
101+
102+`/` prefix
103+: Reference a skill in the prompt (Tab to complete skill names).
104+
105+## KEYS
106+
107+`ESC`
108+: Interrupt the assistant response — partial output is preserved in history.
109+
110+`Ctrl+C`
111+: Exit forcefully.
112+
113+`Ctrl+D`
114+: Graceful exit (EOF).
115+
116+`↑` / `↓`
117+: Navigate command history.
118+
119+`Ctrl+R`
120+: Search command history.
116121
117122 ## BUILT-IN TOOLS
118123
@@ -150,46 +155,6 @@ mc-edit <path> (--old <text> | --old-file <path>) [--new <text> | --new-file <pa
150155
151156 Workflow: inspect with **shell** → edit with **mc-edit** → verify with **shell**.
152157
153-## CUSTOM COMMANDS
154-
155-Drop a `.md` file in `.agents/commands/` (local) or `~/.agents/commands/` (global) and it becomes a `/command`. Filename equals command name (`standup.md` → `/standup`).
156-
157-`.claude/commands/*.md` is also supported.
158-
159-**Frontmatter fields:**
160-
161-`description`
162-: Shown in `/help`.
163-
164-`model`
165-: Optional metadata field.
166-
167-**Argument substitution:**
168-
169-`$ARGUMENTS` expands to the full argument string; `$1`–`$9` expand to positional tokens.
170-
171-**Shell interpolation:**
172-
173-`` !`cmd` `` injects shell output at expansion time (10 s timeout).
174-
175-**Precedence:** custom commands shadow built-ins. Local overrides global.
176-
177-## CUSTOM AGENTS
178-
179-Drop a `.md` file in `.agents/agents/` (local) or `~/.agents/agents/` (global). Filename equals agent name. Activate with `/agent <name>`.
180-
181-`.claude/agents/*.md` is also supported.
182-
183-**Frontmatter fields:**
184-
185-`description`
186-: Shown in `/help`.
187-
188-`model`
189-: Optional metadata field.
190-
191-Body is the agent system prompt.
192-
193158 ## SKILLS
194159
195160 Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
@@ -206,18 +171,18 @@ Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
206171
207172 Skills are never auto-loaded. Load explicitly:
208173
209-- `@skill-name` in prompts (injects body wrapped in `<skill>` XML).
174+- `/skill-name` in prompts (injects body as a user message).
210175 - **listSkills** / **readSkill** tools at runtime.
211176
212177 Local discovery walks up from cwd to the git worktree root.
213178
214-## CONFIGURATION
179+A default **review** skill is created at `~/.agents/skills/review/SKILL.md` on first run if it doesn't exist. It can be customized or shadowed locally.
215180
216-Supports `.agents` and `.claude` layouts for commands, skills, agents, and context.
181+## CONFIGURATION
217182
218183 Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
219184
220-**Context files** (one global + one local loaded):
185+**Context files** (one global + one local loaded into the system prompt):
221186
222187 - Global: `~/.agents/AGENTS.md` → `~/.agents/CLAUDE.md`
223188 - Local: `./.agents/AGENTS.md` → `./CLAUDE.md` → `./AGENTS.md`
@@ -254,7 +219,7 @@ Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
254219 : App data directory (sessions.db, api.log, errors.log).
255220
256221 `.agents/` or `.claude/`
257-: Config directories for commands, agents, skills.
222+: Config directories for skills and context files.
258223
259224 `AGENTS.md` / `CLAUDE.md`
260225 : Project context files.
mini-coder-idea.md+10−17
@@ -17,15 +17,16 @@ Very focused on dev flow, simple setup steps and fast to coding.
1717 Elegant output that focus on the conversation with the agent and their actions. Ensure an accurate cronological conversation log that is very readable for the user. Keep a visible hierchy of actions -> results and assistant reasoning and responses.
1818 Accurate and reliable and fast core set of features.
1919 Community oriented, all of the inspirations have their own dotfile format, try to follow the existing
20-conventions and not introduce more specs. We want to do our best to support and autodiscover community config standards:
21-
22-- AGENTS.md -> https://agents.md/
23- - CLAUDE.md (same as AGENTS.md)
24-- Skills -> https://agentskills.io/client-implementation/adding-skills-support
25- - Claude skills too. They claim to follow the spec, we should only need to discover them too.
20+conventions and not introduce more specs.
2621
2722 ## Features:
2823
24+We want to do our best to support and autodiscover community config standards:
25+ - AGENTS.md -> https://agents.md/
26+ - CLAUDE.md (same as AGENTS.md)
27+ - Skills -> https://agentskills.io/client-implementation/adding-skills-support (and https://agentskills.io/client-implementation/adding-skills-support.md)
28+ - Claude skills too. They claim to follow the spec, we should only need to discover them too.
29+
2930 - Auto discovery of providers via ENV (Example: OPENCODE_API_KEY), or local servers (Example: ollama)
3031 - `/login` shows OAuth login status. `/login <provider>` starts browser-based OAuth login. `/logout <provider>` clears saved tokens. Currently supports Anthropic. (Both pi and opencode support this too)
3132 - `/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. Must have autocomplete support for ease of use when changing models
@@ -43,10 +44,11 @@ conventions and not introduce more specs. We want to do our best to support and
4344 - Shell like autocomplete for filepaths, `@` embeds a file into the prompt and autocompletes filepaths
4445
4546 - Context handling:
46- - Elegantly handles hitting max context size for the model using regular pruning.
47+ - Elegantly handles hitting max context size for the model using regular per step pruning. Stops with a conversation summary if max context is reached.
4748 - No max steps or max tool calls. user can interrupt, this is not needed.
4849 - Support prompt caching via the used sdks.
4950 - Rolling context pruning with a balanced default. (Must not break caching!)
51+ - Clear and accurate token tracking.
5052 - Recover from errors returning the user to the prompt with clear messaging
5153 - `/undo` removes the last turn from conversation history, it does not restore filesystem state.
5254
@@ -75,7 +77,7 @@ conventions and not introduce more specs. We want to do our best to support and
7577 - Skill tools show compact metadata-oriented output
7678 - Shell tool shows the command called and its output
7779 - MCP tools stay clearly distinguishable from shell work
78-- status bar like prompt, with current model/provider/session/git branch/active agent/thinking effort/context usage/token input/token output
80+- status bar like prompt, with current model/provider/session/git branch/thinking effort/context usage/token input/token output information grouped logically and human readable.
7981 - some prompt colored animation when a turn is processing. Needs to be carefully done, so it shows correctly in wait times and with clear labels
8082
8183 ## Tech stack
@@ -88,12 +90,3 @@ conventions and not introduce more specs. We want to do our best to support and
8890
8991 Clean separation of concerns, use modules to organize the app. Group logical features together for best browsability and readability of the code. Use subdirectories to group files logically.
9092 No mocked/offline-servers type of tests. Focused tests on _our_ logic. Do not test our dependencies.
91-
92-Core modules:
93-
94-- `llm-api`: Provides the api to intereact with the provider and process the full conversation turn + tool calling.
95-- `cli`: Output/UI, with logical separated subfolder: user input/output and ui/etc..
96-- `agent`: Main agent implementation
97-- `tools`: shell, skill, and web/search helpers
98-- `session`: sqlite-backed sessions, settings, model info, and MCP server storage
99-- `mcp`: handles connecting to mcp servers
src/agent/agent.ts+1−50
@@ -1,19 +1,13 @@
11 import * as c from "yoctocolors";
2-import { loadAgents } from "../cli/agents.ts";
32 import type { CommandContext } from "../cli/types.ts";
43 import type { ThinkingEffort } from "../llm-api/providers.ts";
5-import type { ContextPruningMode } from "../llm-api/turn.ts";
64 import type { ToolDef } from "../llm-api/types.ts";
75 import { connectMcpServer } from "../mcp/client.ts";
86 import {
9- getPreferredActiveAgent,
107 listMcpServers,
11- setPreferredActiveAgent,
12- setPreferredContextPruningMode,
138 setPreferredModel,
149 setPreferredShowReasoning,
1510 setPreferredThinkingEffort,
16- setPreferredToolResultPayloadCapBytes,
1711 setPreferredVerboseOutput,
1812 } from "../session/db/index.ts";
1913 import type { AgentReporter } from "./reporter.ts";
@@ -26,11 +20,8 @@ interface AgentOptions {
2620 initialThinkingEffort: ThinkingEffort | null;
2721 initialShowReasoning: boolean;
2822 initialVerboseOutput: boolean;
29- initialPruningMode: ContextPruningMode;
30- initialToolResultPayloadCapBytes: number;
3123 sessionId?: string;
3224 reporter: AgentReporter;
33- agentSystemPrompt?: string;
3425 }
3526
3627 export async function initAgent(opts: AgentOptions): Promise<{
@@ -39,7 +30,6 @@ export async function initAgent(opts: AgentOptions): Promise<{
3930 }> {
4031 const cwd = opts.cwd;
4132
42- const agents = loadAgents(cwd);
4333 const tools: ToolDef[] = buildToolSet({ cwd });
4434
4535 const mcpTools: ToolDef[] = [];
@@ -79,26 +69,9 @@ export async function initAgent(opts: AgentOptions): Promise<{
7969 initialThinkingEffort: opts.initialThinkingEffort,
8070 initialShowReasoning: opts.initialShowReasoning,
8171 initialVerboseOutput: opts.initialVerboseOutput,
82- initialPruningMode: opts.initialPruningMode,
83- initialToolResultPayloadCapBytes: opts.initialToolResultPayloadCapBytes,
8472 sessionId: opts.sessionId,
85- extraSystemPrompt: opts.agentSystemPrompt,
8673 });
8774
88- // Active agent state — name only; the system prompt is stored on runner.
89- let activeAgentName: string | null = getPreferredActiveAgent();
90- if (opts.agentSystemPrompt) {
91- activeAgentName = null;
92- } else if (activeAgentName) {
93- const agentCfg = agents.get(activeAgentName);
94- if (agentCfg) {
95- runner.extraSystemPrompt = agentCfg.systemPrompt;
96- } else {
97- activeAgentName = null;
98- setPreferredActiveAgent(null);
99- }
100- }
101-
10275 const cmdCtx: CommandContext = {
10376 get currentModel() {
10477 return runner.currentModel;
@@ -129,36 +102,14 @@ export async function initAgent(opts: AgentOptions): Promise<{
129102 runner.verboseOutput = verbose;
130103 setPreferredVerboseOutput(verbose);
131104 },
132- get pruningMode() {
133- return runner.pruningMode;
134- },
135- setPruningMode: (mode) => {
136- runner.pruningMode = mode;
137- setPreferredContextPruningMode(mode);
138- },
139- get toolResultPayloadCapBytes() {
140- return runner.toolResultPayloadCapBytes;
141- },
142- setToolResultPayloadCapBytes: (bytes) => {
143- runner.toolResultPayloadCapBytes = Math.max(0, bytes);
144- setPreferredToolResultPayloadCapBytes(runner.toolResultPayloadCapBytes);
145- },
146105 cwd,
147106
148- get activeAgent() {
149- return activeAgentName;
150- },
151- setActiveAgent: (name, systemPrompt?) => {
152- activeAgentName = name;
153- runner.extraSystemPrompt = systemPrompt;
154- setPreferredActiveAgent(name);
155- },
156-
157107 undoLastTurn: () => runner.undoLastTurn(),
158108 connectMcpServer: connectAndAddMcp,
159109 startSpinner: (label?: string) => opts.reporter.startSpinner(label),
160110 stopSpinner: () => opts.reporter.stopSpinner(),
161111 startNewSession: () => runner.startNewSession(),
112+ switchSession: (id: string) => runner.switchSession(id),
162113 };
163114
164115 return { runner, cmdCtx };
src/agent/reporter.ts+0−1
@@ -19,7 +19,6 @@ export interface StatusBarData {
1919 contextTokens: number;
2020 contextWindow: number | null;
2121 thinkingEffort?: string | null;
22- activeAgent?: string | null;
2322 showReasoning?: boolean;
2423 }
2524
src/agent/session-runner.ts+17−26
@@ -3,7 +3,7 @@ import type { ImageAttachment } from "../cli/image-types.ts";
33 import { watchForCancel } from "../cli/input.ts";
44 import type { ThinkingEffort } from "../llm-api/providers.ts";
55 import { resolveModel } from "../llm-api/providers.ts";
6-import type { ContextPruningMode, CoreMessage } from "../llm-api/turn.ts";
6+import type { CoreMessage } from "../llm-api/turn.ts";
77 import { runTurn } from "../llm-api/turn.ts";
88 import type { ToolDef } from "../llm-api/types.ts";
99 import { getMaxTurnIndex, saveMessages } from "../session/db/index.ts";
@@ -31,10 +31,7 @@ interface SessionRunnerOptions {
3131 initialThinkingEffort: ThinkingEffort | null;
3232 initialShowReasoning: boolean;
3333 initialVerboseOutput: boolean;
34- initialPruningMode: ContextPruningMode;
35- initialToolResultPayloadCapBytes: number;
3634 sessionId?: string | undefined;
37- extraSystemPrompt?: string | undefined;
3835 }
3936
4037 interface RunnerStatusInfo {
@@ -57,8 +54,6 @@ export class SessionRunner {
5754 public currentThinkingEffort: ThinkingEffort | null;
5855 public showReasoning: boolean;
5956 public verboseOutput: boolean;
60- public pruningMode: ContextPruningMode;
61- public toolResultPayloadCapBytes: number;
6257
6358 public session!: ActiveSession;
6459
@@ -68,7 +63,6 @@ export class SessionRunner {
6863 private totalIn = 0;
6964 private totalOut = 0;
7065 private lastContextTokens = 0;
71- private _extraSystemPrompt: string | undefined;
7266 private _systemPrompt: string | undefined;
7367
7468 constructor(opts: SessionRunnerOptions) {
@@ -80,21 +74,9 @@ export class SessionRunner {
8074 this.currentThinkingEffort = opts.initialThinkingEffort;
8175 this.showReasoning = opts.initialShowReasoning;
8276 this.verboseOutput = opts.initialVerboseOutput;
83- this.pruningMode = opts.initialPruningMode;
84- this.toolResultPayloadCapBytes = opts.initialToolResultPayloadCapBytes;
85- this.extraSystemPrompt = opts.extraSystemPrompt;
8677 this.initSession(opts.sessionId);
8778 }
8879
89- public get extraSystemPrompt(): string | undefined {
90- return this._extraSystemPrompt;
91- }
92-
93- public set extraSystemPrompt(value: string | undefined) {
94- this._extraSystemPrompt = value;
95- this.rebuildSystemPrompt();
96- }
97-
9880 public getStatusInfo(): RunnerStatusInfo {
9981 return {
10082 model: this.currentModel,
@@ -139,6 +121,21 @@ export class SessionRunner {
139121 this.rebuildSystemPrompt();
140122 }
141123
124+ public switchSession(id: string): boolean {
125+ const resumed = resumeSession(id);
126+ if (!resumed) return false;
127+ this.session = resumed;
128+ this.currentModel = resumed.model;
129+ this.coreHistory = [...resumed.messages];
130+ this.turnIndex = getMaxTurnIndex(resumed.id) + 1;
131+ this.totalIn = 0;
132+ this.totalOut = 0;
133+ this.lastContextTokens = 0;
134+ this.sessionTimeAnchor = new Date(resumed.createdAt).toISOString();
135+ this.rebuildSystemPrompt();
136+ return true;
137+ }
138+
142139 public addShellContext(command: string, output: string): void {
143140 const thisTurn = this.turnIndex++;
144141 const msg: CoreMessage = {
@@ -204,8 +201,6 @@ export class SessionRunner {
204201 tools: this.tools,
205202 ...(systemPrompt ? { systemPrompt } : {}),
206203 signal: abortController.signal,
207- pruningMode: this.pruningMode,
208- toolResultPayloadCapBytes: this.toolResultPayloadCapBytes,
209204 ...(this.currentThinkingEffort
210205 ? { thinkingEffort: this.currentThinkingEffort }
211206 : {}),
@@ -249,10 +244,6 @@ export class SessionRunner {
249244 this._systemPrompt = undefined;
250245 return;
251246 }
252- this._systemPrompt = buildSystemPrompt(
253- this.sessionTimeAnchor,
254- this.cwd,
255- this._extraSystemPrompt,
256- );
247+ this._systemPrompt = buildSystemPrompt(this.sessionTimeAnchor, this.cwd);
257248 }
258249 }
src/agent/system-prompt.test.ts+71−39
@@ -22,34 +22,75 @@ describe("loadLocalContextFile", () => {
2222 expect(loadLocalContextFile(tmpDir)).toBeNull();
2323 });
2424
25- it("reads .agents/AGENTS.md (highest priority)", () => {
25+ it("reads all context files when multiple exist", () => {
2626 mkdirSync(join(tmpDir, ".agents"), { recursive: true });
2727 writeFileSync(join(tmpDir, ".agents", "AGENTS.md"), "agents content");
2828 writeFileSync(join(tmpDir, "AGENTS.md"), "root content");
2929 writeFileSync(join(tmpDir, "CLAUDE.md"), "claude content");
30- expect(loadLocalContextFile(tmpDir)).toBe("agents content");
30+ const result = loadLocalContextFile(tmpDir) as string;
31+ expect(result).toContain("agents content");
32+ expect(result).toContain("claude content");
33+ expect(result).toContain("root content");
3134 });
3235
33- it("reads CLAUDE.md when .agents/AGENTS.md absent", () => {
36+ it("reads both CLAUDE.md and AGENTS.md when .agents dir absent", () => {
3437 writeFileSync(join(tmpDir, "CLAUDE.md"), "claude content");
3538 writeFileSync(join(tmpDir, "AGENTS.md"), "root content");
36- expect(loadLocalContextFile(tmpDir)).toBe("claude content");
39+ const result = loadLocalContextFile(tmpDir) as string;
40+ expect(result).toContain("claude content");
41+ expect(result).toContain("root content");
3742 });
3843
3944 it("reads AGENTS.md at root when others absent", () => {
4045 writeFileSync(join(tmpDir, "AGENTS.md"), "root content");
4146 expect(loadLocalContextFile(tmpDir)).toBe("root content");
4247 });
48+
49+ it("reads .claude/CLAUDE.md when .agents files absent", () => {
50+ mkdirSync(join(tmpDir, ".claude"), { recursive: true });
51+ writeFileSync(join(tmpDir, ".claude", "CLAUDE.md"), "claude dir content");
52+ expect(loadLocalContextFile(tmpDir)).toBe("claude dir content");
53+ });
54+
55+ it("reads .agents/CLAUDE.md when .agents/AGENTS.md absent", () => {
56+ mkdirSync(join(tmpDir, ".agents"), { recursive: true });
57+ writeFileSync(
58+ join(tmpDir, ".agents", "CLAUDE.md"),
59+ "agents claude content",
60+ );
61+ expect(loadLocalContextFile(tmpDir)).toBe("agents claude content");
62+ });
63+
64+ it("walks ancestor directories up to git root", () => {
65+ mkdirSync(join(tmpDir, ".git"), { recursive: true });
66+ writeFileSync(join(tmpDir, "AGENTS.md"), "root context");
67+ const nested = join(tmpDir, "packages", "lib", "src");
68+ mkdirSync(nested, { recursive: true });
69+ expect(loadLocalContextFile(nested)).toBe("root context");
70+ });
71+
72+ it("stops walking at git root and does not go beyond", () => {
73+ const gitRoot = join(tmpDir, "repo");
74+ mkdirSync(join(gitRoot, ".git"), { recursive: true });
75+ writeFileSync(join(tmpDir, "AGENTS.md"), "outside git");
76+ const nested = join(gitRoot, "src");
77+ mkdirSync(nested, { recursive: true });
78+ expect(loadLocalContextFile(nested)).toBeNull();
79+ });
80+
81+ it("nearest context file wins over ancestor", () => {
82+ mkdirSync(join(tmpDir, ".git"), { recursive: true });
83+ writeFileSync(join(tmpDir, "AGENTS.md"), "root context");
84+ const nested = join(tmpDir, "packages", "lib");
85+ mkdirSync(nested, { recursive: true });
86+ writeFileSync(join(nested, "AGENTS.md"), "nested context");
87+ expect(loadLocalContextFile(nested)).toBe("nested context");
88+ });
4389 });
4490
4591 describe("buildSystemPrompt", () => {
4692 it("includes base guidelines without context files", () => {
47- const prompt = buildSystemPrompt(
48- "mock-time-anchor",
49- tmpDir,
50- undefined,
51- fakeHome,
52- );
93+ const prompt = buildSystemPrompt("mock-time-anchor", tmpDir, fakeHome);
5394 expect(prompt).toContain("You are mini-coder");
5495 expect(prompt).toContain("Guidelines:");
5596 expect(prompt).not.toContain("# Project context");
@@ -58,7 +99,7 @@ describe("buildSystemPrompt", () => {
5899 expect(prompt).toContain("# Progress communication");
59100 expect(prompt).toContain("# Final response style");
60101 expect(prompt).toContain(
61- "Prefer shell for reading, searching, verification",
102+ "Inspect code and files primarily through shell commands",
62103 );
63104 expect(prompt).toContain("use shell commands that invoke `mc-edit`");
64105 expect(prompt).toContain(
@@ -72,38 +113,20 @@ describe("buildSystemPrompt", () => {
72113
73114 it("includes local context under # Project context", () => {
74115 writeFileSync(join(tmpDir, "AGENTS.md"), "local project info");
75- const prompt = buildSystemPrompt(
76- "mock-time-anchor",
77- tmpDir,
78- undefined,
79- fakeHome,
80- );
116+ const prompt = buildSystemPrompt("mock-time-anchor", tmpDir, fakeHome);
81117 expect(prompt).toContain("# Project context");
82118 expect(prompt).toContain("local project info");
83119 });
84120
85121 it("has exactly one # Project context section when local context present", () => {
86122 writeFileSync(join(tmpDir, "AGENTS.md"), "local info");
87- const prompt = buildSystemPrompt(
88- "mock-time-anchor",
89- tmpDir,
90- undefined,
91- fakeHome,
92- );
123+ const prompt = buildSystemPrompt("mock-time-anchor", tmpDir, fakeHome);
93124 const occurrences = prompt.split("# Project context").length - 1;
94125 expect(occurrences).toBe(1);
95126 });
96127
97- it("appends extraSystemPrompt after context", () => {
98- writeFileSync(join(tmpDir, "AGENTS.md"), "ctx");
99- const prompt = buildSystemPrompt("mock", tmpDir, "custom extra", fakeHome);
100- const extraIdx = prompt.indexOf("custom extra");
101- const contextIdx = prompt.indexOf("ctx");
102- expect(contextIdx).toBeLessThan(extraIdx);
103- });
104-
105128 it("includes cwd and current time in prompt", () => {
106- const prompt = buildSystemPrompt("mock", tmpDir, undefined, fakeHome);
129+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
107130 expect(prompt).toContain("Current working directory:");
108131 expect(prompt).toContain("Current date/time:");
109132 });
@@ -111,16 +134,24 @@ describe("buildSystemPrompt", () => {
111134 it("includes global context when ~/.agents/AGENTS.md present", () => {
112135 mkdirSync(join(fakeHome, ".agents"), { recursive: true });
113136 writeFileSync(join(fakeHome, ".agents", "AGENTS.md"), "global info");
114- const prompt = buildSystemPrompt("mock", tmpDir, undefined, fakeHome);
137+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
115138 expect(prompt).toContain("# Project context");
116139 expect(prompt).toContain("global info");
117140 });
118141
142+ it("includes global context from ~/.claude/CLAUDE.md", () => {
143+ mkdirSync(join(fakeHome, ".claude"), { recursive: true });
144+ writeFileSync(join(fakeHome, ".claude", "CLAUDE.md"), "claude global info");
145+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
146+ expect(prompt).toContain("# Project context");
147+ expect(prompt).toContain("claude global info");
148+ });
149+
119150 it("includes both global and local context in order (global before local)", () => {
120151 mkdirSync(join(fakeHome, ".agents"), { recursive: true });
121152 writeFileSync(join(fakeHome, ".agents", "AGENTS.md"), "global info");
122153 writeFileSync(join(tmpDir, "AGENTS.md"), "local info");
123- const prompt = buildSystemPrompt("mock", tmpDir, undefined, fakeHome);
154+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
124155 expect(prompt).toContain("global info");
125156 expect(prompt).toContain("local info");
126157 expect(prompt.indexOf("global info")).toBeLessThan(
@@ -129,7 +160,7 @@ describe("buildSystemPrompt", () => {
129160 });
130161
131162 it("does not include # Project context when neither global nor local context present", () => {
132- const prompt = buildSystemPrompt("mock", tmpDir, undefined, fakeHome);
163+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
133164 expect(prompt).not.toContain("# Project context");
134165 });
135166
@@ -141,12 +172,13 @@ describe("buildSystemPrompt", () => {
141172 "---\nname: deploy\ndescription: Deploy safely\n---\n\n# Deploy\nDetailed body",
142173 );
143174
144- const prompt = buildSystemPrompt("mock", tmpDir, undefined, fakeHome);
175+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
145176 expect(prompt).toContain("# Available skills (metadata only)");
146177 expect(prompt).toContain(
147178 "Use `listSkills` to browse and `readSkill` to load one SKILL.md on demand.",
148179 );
149- expect(prompt).toContain("- deploy: Deploy safely (local)");
180+ expect(prompt).toContain("- deploy: Deploy safely (local,");
181+ expect(prompt).toContain(".agents/skills/deploy/SKILL.md)");
150182 expect(prompt).not.toContain("Detailed body");
151183 });
152184
@@ -158,8 +190,8 @@ describe("buildSystemPrompt", () => {
158190 "---\nname: release\ndescription: Ship releases\n---\n\nRelease body",
159191 );
160192
161- const prompt = buildSystemPrompt("mock", tmpDir, undefined, fakeHome);
162- expect(prompt).toContain("- release: Ship releases (global)");
193+ const prompt = buildSystemPrompt("mock", tmpDir, fakeHome);
194+ expect(prompt).toContain("- release: Ship releases (global,");
163195 expect(prompt).not.toContain("Release body");
164196 });
165197 });
src/agent/system-prompt.ts+53−28
@@ -1,6 +1,6 @@
11 import { existsSync, readFileSync } from "node:fs";
22 import { homedir } from "node:os";
3-import { join } from "node:path";
3+import { dirname, join, resolve } from "node:path";
44 import { tildePath } from "../cli/output.ts";
55 import { loadSkillsIndex } from "../cli/skills.ts";
66
@@ -13,33 +13,60 @@ function tryReadFile(p: string): string | null {
1313 }
1414 }
1515
16+function collectFiles(...paths: string[]): string | null {
17+ const parts: string[] = [];
18+ for (const p of paths) {
19+ const content = tryReadFile(p);
20+ if (content) parts.push(content);
21+ }
22+ return parts.length > 0 ? parts.join("\n\n") : null;
23+}
24+
1625 function loadGlobalContextFile(homeDir: string): string | null {
17- const globalDir = join(homeDir, ".agents");
18- return (
19- tryReadFile(join(globalDir, "AGENTS.md")) ??
20- tryReadFile(join(globalDir, "CLAUDE.md"))
26+ return collectFiles(
27+ join(homeDir, ".agents", "AGENTS.md"),
28+ join(homeDir, ".agents", "CLAUDE.md"),
29+ join(homeDir, ".claude", "CLAUDE.md"),
2130 );
2231 }
2332
24-export function loadLocalContextFile(cwd: string): string | null {
25- return (
26- tryReadFile(join(cwd, ".agents", "AGENTS.md")) ??
27- tryReadFile(join(cwd, "CLAUDE.md")) ??
28- tryReadFile(join(cwd, "AGENTS.md"))
33+/** Try reading all context files from a single directory. */
34+function loadContextFileAt(dir: string): string | null {
35+ return collectFiles(
36+ join(dir, ".agents", "AGENTS.md"),
37+ join(dir, ".agents", "CLAUDE.md"),
38+ join(dir, ".claude", "CLAUDE.md"),
39+ join(dir, "CLAUDE.md"),
40+ join(dir, "AGENTS.md"),
2941 );
3042 }
3143
44+/**
45+ * Walk from cwd up to the git root (or just cwd if outside a repo),
46+ * returning the nearest context file found.
47+ */
48+export function loadLocalContextFile(cwd: string): string | null {
49+ const start = resolve(cwd);
50+ let current = start;
51+ while (true) {
52+ const content = loadContextFileAt(current);
53+ if (content) return content;
54+ if (existsSync(join(current, ".git"))) break;
55+ const parent = dirname(current);
56+ if (parent === current) break;
57+ current = parent;
58+ }
59+ return null;
60+}
61+
3262 const AUTONOMY = `
3363
3464 # Autonomy and persistence
3565 - You are a capable senior engineer. Once given a direction, proactively gather context and implement — don't ask for permission to start.
3666 - Carry changes through to implementation and verify they work. Don't stop halfway through a task without a good reason.
37-- Bias to action: implement with reasonable assumptions rather than asking upfront. Note any significant assumptions at the end.
3867 - Skip preamble. Don't output a plan before working — start using tools right away.
3968 - Don't ask "shall I proceed?" or "shall I start?" at the beginning of a turn. Just begin.
40-- If something is ambiguous, pick the most reasonable interpretation, do the work, and mention your interpretation in your reply.
41-- Do not guess unknown facts. Inspect files or run commands to find out.
42-- After completing a meaningful phase (e.g. analysis done, or a set of changes applied), it's fine to pause and report back rather than continuing indefinitely.
69+- Do not guess unknown facts. Inspect files and web or run commands to find out. Don't make assumptions, verify.
4370 - Avoid excessive looping: if you find yourself re-reading or re-editing the same files without clear progress, stop and summarise what's blocking you.`;
4471
4572 const SAFETY = `
@@ -65,17 +92,14 @@ const STATUS_UPDATES = `
6592 const FINAL_MESSAGE = `
6693
6794 # Final response style
68-- Default to concise output (short bullets or a brief paragraph).
95+- Default to non verbose, concise output (short bullets or a brief paragraph).
6996 - For substantial code changes, state what changed, where, and why.
7097 - Reference files with line numbers when helpful.
71-- Do not paste large file contents unless asked.
72-- If verification was run, report commands and outcomes briefly.
73-- If verification could not be run, say so clearly.`;
98+- Do not paste large file contents unless asked.`;
7499
75100 export function buildSystemPrompt(
76101 sessionTimeAnchor: string,
77102 cwd: string,
78- extraSystemPrompt?: string,
79103 /** Override home directory — used in tests to isolate global context loading. */
80104 homeDir?: string,
81105 ): string {
@@ -89,10 +113,10 @@ Current working directory: ${cwdDisplay}
89113 Current date/time: ${sessionTimeAnchor}
90114
91115 Guidelines:
92-- Be concise and precise. Avoid unnecessary preamble.
93-- Prefer small, targeted edits over large rewrites.
116+- Be concise and precise. Avoid unnecessary preamble. Don't be verbose.
94117 - Inspect code and files primarily through shell commands.
95-- Prefer shell for reading, searching, verification, and other general repo work.
118+- Use temp files to handle large content, prefer scanning over full reads.
119+- Prefer small, targeted edits over large file rewrites.
96120 - For file edits, use shell commands that invoke \`mc-edit\`.
97121 - Use the skill tools only when you need to inspect available community/project skills or load one skill body.
98122 - Make parallel tool calls when independent searches/lookups can happen concurrently.
@@ -104,6 +128,7 @@ Guidelines:
104128 - \`mc-edit\` applies one exact-text edit and fails if the expected old text is missing or ambiguous.
105129
106130 Usage: mc-edit <path> (--old <text> | --old-file <path>) [--new <text> | --new-file <path>] [--cwd <path>]
131+Outputs a diff of the changes and meta information.
107132
108133 Apply one safe exact-text edit to an existing file.
109134 - The expected old text must match exactly once.
@@ -130,15 +155,15 @@ Apply one safe exact-text edit to an existing file.
130155 if (skills.length > 0) {
131156 prompt += "\n\n# Available skills (metadata only)";
132157 prompt +=
133- "\nUse `listSkills` to browse and `readSkill` to load one SKILL.md on demand.\n";
158+ "\nUse `listSkills` to browse and `readSkill` to load one SKILL.md on demand.";
159+ prompt +=
160+ "\nWhen a skill references relative paths, resolve them against the skill directory (parent of SKILL.md).";
161+ prompt +=
162+ '\nFor complex skills that would clutter your context, consider delegating to a subagent via `mc "prompt"` in the shell tool.\n';
134163 for (const skill of skills) {
135- prompt += `\n- ${skill.name}: ${skill.description} (${skill.source})`;
164+ prompt += `\n- ${skill.name}: ${skill.description} (${skill.source}, ${skill.filePath})`;
136165 }
137166 }
138167
139- if (extraSystemPrompt) {
140- prompt += `\n\n${extraSystemPrompt}`;
141- }
142-
143168 return prompt;
144169 }
src/cli/agents.test.ts+0−104
@@ -1,104 +0,0 @@
1-import { afterEach, beforeEach, describe, expect, test } from "bun:test";
2-import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
3-import { tmpdir } from "node:os";
4-import { join } from "node:path";
5-import { loadAgents } from "./agents.ts";
6-import { terminal } from "./terminal-io.ts";
7-
8-describe("loadAgents", () => {
9- let dir: string;
10- const originalStdoutWrite = terminal.stdoutWrite.bind(terminal);
11-
12- beforeEach(() => {
13- dir = mkdtempSync(join(tmpdir(), "mc-agents-test-"));
14- terminal.stdoutWrite = () => {};
15- });
16-
17- afterEach(() => {
18- terminal.stdoutWrite = originalStdoutWrite;
19- rmSync(dir, { recursive: true, force: true });
20- });
21-
22- function writeAgent(root: string, name: string, content: string): void {
23- const agentsDir = join(root, ".agents", "agents");
24- mkdirSync(agentsDir, { recursive: true });
25- writeFileSync(join(agentsDir, `${name}.md`), content);
26- }
27-
Cut short: this commit's diff is over 1000 lines.
src/cli/agents.ts+0−36
Cut short: this commit's diff is over 1000 lines.
src/cli/bootstrap.ts+9−9
Cut short: this commit's diff is over 1000 lines.
src/cli/commands-agent.ts+0−54
Cut short: this commit's diff is over 1000 lines.
src/cli/commands-config.test.ts+2−18
Cut short: this commit's diff is over 1000 lines.
src/cli/commands-config.ts+0−61
Cut short: this commit's diff is over 1000 lines.
src/cli/commands-help.ts+4−34
Cut short: this commit's diff is over 1000 lines.
src/cli/commands-login.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/cli/commands-session.ts+28−0
Cut short: this commit's diff is over 1000 lines.
src/cli/commands.ts+110−42
Cut short: this commit's diff is over 1000 lines.
src/cli/completions.test.ts+1−16
Cut short: this commit's diff is over 1000 lines.
src/cli/completions.ts+12−33
Cut short: this commit's diff is over 1000 lines.
src/cli/config-conflicts.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/cli/custom-commands.test.ts+0−196
Cut short: this commit's diff is over 1000 lines.
src/cli/custom-commands.ts+0−129
Cut short: this commit's diff is over 1000 lines.
src/cli/error-parse.test.ts+2−2
Cut short: this commit's diff is over 1000 lines.
src/cli/error-parse.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/cli/file-refs.test.ts+17−12
Cut short: this commit's diff is over 1000 lines.
src/cli/file-refs.ts+0−21
Cut short: this commit's diff is over 1000 lines.
src/cli/frontmatter.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/cli/input-loop.ts+0−1
Cut short: this commit's diff is over 1000 lines.
src/cli/load-markdown-configs.test.ts+0−113
Cut short: this commit's diff is over 1000 lines.
src/cli/load-markdown-configs.ts+0−149
Cut short: this commit's diff is over 1000 lines.
src/cli/output.ts+12−11
Cut short: this commit's diff is over 1000 lines.
src/cli/skills.test.ts+23−9
Cut short: this commit's diff is over 1000 lines.
src/cli/skills.ts+56−30
Cut short: this commit's diff is over 1000 lines.
src/cli/status-bar.test.ts+0−4
Cut short: this commit's diff is over 1000 lines.
src/cli/status-bar.ts+0−2
Cut short: this commit's diff is over 1000 lines.
src/cli/stream-render-content.ts+16−5
Cut short: this commit's diff is over 1000 lines.
src/cli/stream-render.test.ts+1−2
Cut short: this commit's diff is over 1000 lines.
src/cli/stream-render.ts+33−26
Cut short: this commit's diff is over 1000 lines.
src/cli/tool-render.test.ts+23−0
Cut short: this commit's diff is over 1000 lines.
src/cli/tool-render.ts+4−3
Cut short: this commit's diff is over 1000 lines.
src/cli/types.ts+1−9
Cut short: this commit's diff is over 1000 lines.
src/cli/ui-audit.test.ts+0−2
Cut short: this commit's diff is over 1000 lines.
src/index.ts+9−13
Cut short: this commit's diff is over 1000 lines.
src/llm-api/model-info-fetch.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/llm-api/model-info.test.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/llm-api/model-info.ts+15−1
Cut short: this commit's diff is over 1000 lines.
src/llm-api/providers-resolve.test.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/llm-api/providers.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/llm-api/turn-context.ts+3−19
Cut short: this commit's diff is over 1000 lines.
src/llm-api/turn-prepare-messages.ts+13−41
Cut short: this commit's diff is over 1000 lines.
src/llm-api/turn-request.ts+26−24
Cut short: this commit's diff is over 1000 lines.
src/llm-api/turn.test.ts+8−8
Cut short: this commit's diff is over 1000 lines.
src/llm-api/turn.ts+0−16
Cut short: this commit's diff is over 1000 lines.
src/llm-api/types.ts+0−1
Cut short: this commit's diff is over 1000 lines.
src/session/db/settings-repo.ts+0−38
Cut short: this commit's diff is over 1000 lines.
src/session/manager.ts+10−7
Cut short: this commit's diff is over 1000 lines.
src/session/oauth/anthropic.ts+0−0
src/session/oauth/auth-storage.ts+1−1
Cut short: this commit's diff is over 1000 lines.
src/session/oauth/pkce.test.ts+0−0
src/session/oauth/pkce.ts+0−0
src/session/oauth/types.ts+0−0
src/tools/shell.ts+33−20
Cut short: this commit's diff is over 1000 lines.
src/tools/skills.test.ts+2−1
Cut short: this commit's diff is over 1000 lines.
src/tools/skills.ts+26−2
Cut short: this commit's diff is over 1000 lines.