🛟 Updated.
49b3393 parent: 9e902ec modified
.tickets/milestones.yaml +2 -2 | @@ -85,5 +85,5 @@ milestones: | ||
| 85 | 85 | state: open |
| 86 | 86 | dueOn: 2026-12-25 |
| 87 | 87 | - title: v2.2.1 |
| 88 | - state: open | |
| 89 | - description: Fixes after v2.2.0 — the compaction loop with injected user messages (ticket 289), the prefix cache under in-turn shrink (ticket 290) | |
| 88 | + state: closed | |
| 89 | + description: Fixes after v2.2.0 — compaction inside a turn on small windows (tickets 289-292) | |
| @@ -85,5 +85,5 @@ milestones: | |||
| 85 | state: open | 85 | state: open |
| 86 | dueOn: 2026-12-25 | 86 | dueOn: 2026-12-25 |
| 87 | - title: v2.2.1 | 87 | - title: v2.2.1 |
| 88 | - state: open | 88 | + state: closed |
| 89 | - description: Fixes after v2.2.0 — the compaction loop with injected user messages (ticket 289), the prefix cache under in-turn shrink (ticket 290) | 89 | + description: Fixes after v2.2.0 — compaction inside a turn on small windows (tickets 289-292) |
modified
INSTALL.LINUX.md +1 -1 | @@ -14,7 +14,7 @@ curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash | ||
| 14 | 14 | |
| 15 | 15 | ```bash |
| 16 | 16 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases |
| 17 | -VERSION=2.2.0 | |
| 17 | +VERSION=2.2.1 | |
| 18 | 18 | case "$(uname -m)" in |
| 19 | 19 | x86_64) ARCH=amd64 ;; |
| 20 | 20 | aarch64|arm64) ARCH=arm64 ;; |
| @@ -14,7 +14,7 @@ curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash | |||
| 14 | 14 | ||
| 15 | ```bash | 15 | ```bash |
| 16 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases | 16 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases |
| 17 | -VERSION=2.2.0 | 17 | +VERSION=2.2.1 |
| 18 | case "$(uname -m)" in | 18 | case "$(uname -m)" in |
| 19 | x86_64) ARCH=amd64 ;; | 19 | x86_64) ARCH=amd64 ;; |
| 20 | aarch64|arm64) ARCH=arm64 ;; | 20 | aarch64|arm64) ARCH=arm64 ;; |
modified
INSTALL.MACOS.md +4 -4 | @@ -14,7 +14,7 @@ curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash | ||
| 14 | 14 | |
| 15 | 15 | Short version: |
| 16 | 16 | ```bash |
| 17 | -VERSION=2.2.0 | |
| 17 | +VERSION=2.2.1 | |
| 18 | 18 | curl -fsSLO "https://rickub.com/bots-garden/mini-me/releases/download/v${VERSION}/mm-${VERSION}-darwin-arm64" |
| 19 | 19 | chmod +x ./mm-${VERSION}-darwin-arm64 |
| 20 | 20 | sudo rm -f /usr/local/bin/mm |
| @@ -26,7 +26,7 @@ From v1.0.5, the macOS binary is signed with a Developer ID and notarized by App | ||
| 26 | 26 | |
| 27 | 27 | ```bash |
| 28 | 28 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases |
| 29 | -VERSION=2.2.0 | |
| 29 | +VERSION=2.2.1 | |
| 30 | 30 | curl -fsSLO "https://rickub.com/bots-garden/mini-me/releases/download/v${VERSION}/mm-${VERSION}-darwin-arm64" |
| 31 | 31 | |
| 32 | 32 | # optional: check the download against the release's checksums |
| @@ -46,8 +46,8 @@ mm --version | ||
| 46 | 46 | The signature check should print: |
| 47 | 47 | |
| 48 | 48 | ``` |
| 49 | -./mm-2.2.0-darwin-arm64: valid on disk | |
| 50 | -./mm-2.2.0-darwin-arm64: satisfies its Designated Requirement | |
| 49 | +./mm-2.2.1-darwin-arm64: valid on disk | |
| 50 | +./mm-2.2.1-darwin-arm64: satisfies its Designated Requirement | |
| 51 | 51 | Identifier=com.bots-garden.mm |
| 52 | 52 | Authority=Developer ID Application: Philippe Charriere (SNLLBZP9V9) |
| 53 | 53 | TeamIdentifier=SNLLBZP9V9 |
| @@ -14,7 +14,7 @@ curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash | |||
| 14 | 14 | ||
| 15 | Short version: | 15 | Short version: |
| 16 | ```bash | 16 | ```bash |
| 17 | -VERSION=2.2.0 | 17 | +VERSION=2.2.1 |
| 18 | curl -fsSLO "https://rickub.com/bots-garden/mini-me/releases/download/v${VERSION}/mm-${VERSION}-darwin-arm64" | 18 | curl -fsSLO "https://rickub.com/bots-garden/mini-me/releases/download/v${VERSION}/mm-${VERSION}-darwin-arm64" |
| 19 | chmod +x ./mm-${VERSION}-darwin-arm64 | 19 | chmod +x ./mm-${VERSION}-darwin-arm64 |
| 20 | sudo rm -f /usr/local/bin/mm | 20 | sudo rm -f /usr/local/bin/mm |
| @@ -26,7 +26,7 @@ From v1.0.5, the macOS binary is signed with a Developer ID and notarized by App | |||
| 26 | 26 | ||
| 27 | ```bash | 27 | ```bash |
| 28 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases | 28 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases |
| 29 | -VERSION=2.2.0 | 29 | +VERSION=2.2.1 |
| 30 | curl -fsSLO "https://rickub.com/bots-garden/mini-me/releases/download/v${VERSION}/mm-${VERSION}-darwin-arm64" | 30 | curl -fsSLO "https://rickub.com/bots-garden/mini-me/releases/download/v${VERSION}/mm-${VERSION}-darwin-arm64" |
| 31 | 31 | ||
| 32 | # optional: check the download against the release's checksums | 32 | # optional: check the download against the release's checksums |
| @@ -46,8 +46,8 @@ mm --version | |||
| 46 | The signature check should print: | 46 | The signature check should print: |
| 47 | 47 | ||
| 48 | ``` | 48 | ``` |
| 49 | -./mm-2.2.0-darwin-arm64: valid on disk | 49 | +./mm-2.2.1-darwin-arm64: valid on disk |
| 50 | -./mm-2.2.0-darwin-arm64: satisfies its Designated Requirement | 50 | +./mm-2.2.1-darwin-arm64: satisfies its Designated Requirement |
| 51 | Identifier=com.bots-garden.mm | 51 | Identifier=com.bots-garden.mm |
| 52 | Authority=Developer ID Application: Philippe Charriere (SNLLBZP9V9) | 52 | Authority=Developer ID Application: Philippe Charriere (SNLLBZP9V9) |
| 53 | TeamIdentifier=SNLLBZP9V9 | 53 | TeamIdentifier=SNLLBZP9V9 |
modified
INSTALL.WINDOWS.md +1 -1 | @@ -4,7 +4,7 @@ In PowerShell (no administrator rights needed): | ||
| 4 | 4 | |
| 5 | 5 | ```powershell |
| 6 | 6 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases |
| 7 | -$Version = "2.2.0" | |
| 7 | +$Version = "2.2.1" | |
| 8 | 8 | $Arch = if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { "arm64" } else { "amd64" } |
| 9 | 9 | $Asset = "mm-$Version-windows-$Arch.exe" |
| 10 | 10 | $Base = "https://rickub.com/bots-garden/mini-me/releases/download/v$Version" |
| @@ -4,7 +4,7 @@ In PowerShell (no administrator rights needed): | |||
| 4 | 4 | ||
| 5 | ```powershell | 5 | ```powershell |
| 6 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases | 6 | # download the binary release in https://rickub.com/bots-garden/mini-me/releases |
| 7 | -$Version = "2.2.0" | 7 | +$Version = "2.2.1" |
| 8 | $Arch = if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { "arm64" } else { "amd64" } | 8 | $Arch = if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { "arm64" } else { "amd64" } |
| 9 | $Asset = "mm-$Version-windows-$Arch.exe" | 9 | $Asset = "mm-$Version-windows-$Arch.exe" |
| 10 | $Base = "https://rickub.com/bots-garden/mini-me/releases/download/v$Version" | 10 | $Base = "https://rickub.com/bots-garden/mini-me/releases/download/v$Version" |
added
demos/inkling-2-mini/.gitignore +2 -0 | new file mode 100644 | ||
| @@ -0,0 +1,2 @@ | ||
| 1 | +# The app the demo agent writes (from prompt.txt): output of a run, not part of the demo. | |
| 2 | +tickets/ | |
| new file mode 100644 | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | +# The app the demo agent writes (from prompt.txt): output of a run, not part of the demo. | ||
| 2 | +tickets/ | ||
added
demos/inkling-2-mini/.mm/.gitignore +3 -0 | new file mode 100644 | ||
| @@ -0,0 +1,3 @@ | ||
| 1 | +# Written by the agent when it runs: conversations, not to be committed. | |
| 2 | +traces/ | |
| 3 | +sessions/ | |
| new file mode 100644 | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | +# Written by the agent when it runs: conversations, not to be committed. | ||
| 2 | +traces/ | ||
| 3 | +sessions/ | ||
added
demos/inkling-2-mini/.mm/agent.yaml +202 -0 | new file mode 100644 | ||
| @@ -0,0 +1,202 @@ | ||
| 1 | +# 🐧 Nestor — a coding agent: reads and changes the project, runs commands. | |
| 2 | +# | |
| 3 | +# Written by `mm init`. Every value says why it has that value; change | |
| 4 | +# them as you watch the agent work: | |
| 5 | +# https://rickub.com/bots-garden/mini-me/blob/main/guides/agent-settings-for-small-models.md | |
| 6 | +# | |
| 7 | +# model family: other | |
| 8 | +# usage: developer | |
| 9 | +# machine: medium — a workstation, models up to about 30B | |
| 10 | +# model facts: measured on this Mac (MacBook Air M4, 32 GB) on 2026-11-29, | |
| 11 | +# razorbill 1.2.0: see the [measured] comments | |
| 12 | +# | |
| 13 | +# Needs razorbill 1.2.1 or later: before it, Inkling re-read the whole | |
| 14 | +# conversation at every turn, and a tool call reached mm only once complete. | |
| 15 | +# | |
| 16 | +# Before a session: close the heavy apps. The model takes ~16 GB; when the Mac | |
| 17 | +# swaps (watch Activity Monitor), generation falls from ~14 to a few tokens/s. | |
| 18 | +# | |
| 19 | +# Where the numbers come from (the tag before their comment): | |
| 20 | +# [guide] the settings guide's row for this machine | |
| 21 | +# [rule] a rule of thumb, not specific to this model | |
| 22 | +# [measured] measured with this model on this machine | |
| 23 | +# | |
| 24 | +# mm or mm tui started from the project root (it finds .mm/agent.yaml) | |
| 25 | + | |
| 26 | +provider: razorbill | |
| 27 | +# The model. Chosen for it (family other): sampling (temperature, top_p, | |
| 28 | +# max_tokens). Change the model and redo them together — running mm init | |
| 29 | +# again is the quick way. | |
| 30 | +model: "mlx-community/Inkling-2-Mini-oQ4e-mtp" | |
| 31 | +# No baseUrl: razorbill's defaults apply. For the record: | |
| 32 | +baseUrl: "http://127.0.0.1:7920/v1" | |
| 33 | +fallback: "http://host.docker.internal:7920/v1" # tried when baseUrl does not answer | |
| 34 | +# Nothing answers at this address: mm starts rzb serve (and rzb models pull | |
| 35 | +# when this model is missing) and stops it with the last mm session using it. | |
| 36 | +# macOS only, with mm running on the Mac itself — not in a container or a | |
| 37 | +# sandbox. A server you started yourself is never stopped. | |
| 38 | +razorbill: | |
| 39 | + autoStart: true | |
| 40 | + # config: rzb-server.yaml # rzb serve --config (relative to this file) | |
| 41 | + # serverArgs: [] # any other rzb serve flag | |
| 42 | + | |
| 43 | +# [measured] razorbill reports no window: set it, or the history is never | |
| 44 | +# compressed by size. razorbill reuses what it has already read, but reads it | |
| 45 | +# all again after a compression or a restart (~100-150 tokens/s: ~2 min at | |
| 46 | +# 16k, worse when swapping), so keep it small. | |
| 47 | +contextWindow: 16384 | |
| 48 | +# your answer: tools run without asking | |
| 49 | +yolo: true | |
| 50 | +# usage developer | |
| 51 | +bashTool: true | |
| 52 | +editTools: true | |
| 53 | +# [measured] the tool definitions are most of the first prompt (~2,900 tokens | |
| 54 | +# with all seven, ~1,600 with the four below). | |
| 55 | +# plan and ask_user are off for that reason (in the terminal, just type). | |
| 56 | +planTool: true | |
| 57 | +askUserTool: true | |
| 58 | +# razorbill has no unload route: the unload_model tool would do nothing | |
| 59 | +unloadModels: false | |
| 60 | +# no effect with razorbill (no unload route). A server mm started is stopped | |
| 61 | +# when mm exits, which frees the memory; your own server keeps it. | |
| 62 | +unloadOnExit: true | |
| 63 | +# your answer: a <name>.md or <name>/SKILL.md per skill, in .mm/skills/ — | |
| 64 | +# relative to the directory mm is started from, the project root (see | |
| 65 | +# https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/add-a-skill.md) | |
| 66 | +skillsDir: .mm/skills | |
| 67 | +# usage developer | |
| 68 | +maxTurns: 40 | |
| 69 | +# [measured] a large tool output costs ~30 s of prompt reading, and takes | |
| 70 | +# room in the window. 2026-11-29: with 8000, outputs of earlier turns kept the | |
| 71 | +# history above the compression threshold (see context: below), so 4000. | |
| 72 | +# 2026-11-30: one `cat` of web/index.html still weighed ~15k characters in | |
| 73 | +# the request, and three 5k reads in a row filled the 16k window: 2500. | |
| 74 | +maxOutput: 2500 | |
| 75 | +# [measured] time to read the prompt before the first token | |
| 76 | +firstTokenTimeout: 10m | |
| 77 | +# [measured] with razorbill 1.2.0, which sent a tool call only once complete, | |
| 78 | +# mm saw nothing while Inkling wrote a long file and cut it at 2m. Since 1.2.1 | |
| 79 | +# the call arrives as it is written, so this long limit is no longer needed: | |
| 80 | +# about 5m leaves room (keep it above bashTimeout). | |
| 81 | +# [measured] 2026-11-29: but razorbill sends nothing while it reads the | |
| 82 | +# prompt, and a 25k-token prompt without cache took more than 5 min on this | |
| 83 | +# Mac while it swapped: 5m cut it ("generation timed out (stalled)"). 10m | |
| 84 | +# until the prompt reading is shorter. | |
| 85 | +watchdogTimeout: 10m | |
| 86 | +bashTimeout: 2m | |
| 87 | + | |
| 88 | +sampling: | |
| 89 | + # [measured] reliable tool calls at 0.2 (the model's own default is 1.0) | |
| 90 | + temperature: 0.2 | |
| 91 | + # [rule] usual value for a code agent | |
| 92 | + top_p: 0.9 | |
| 93 | + # [measured] the limit counts the reasoning too, even with reasoning_effort | |
| 94 | + # none: 600 to 1,300 tokens before writing a file, once 2,500 with no call. | |
| 95 | + # A call that does not fit is cut and mm asks for smaller pieces: raise this | |
| 96 | + # if it happens often | |
| 97 | + max_tokens: 3072 | |
| 98 | + # one tool call per reply: small models run a check before the change it | |
| 99 | + # checks has landed otherwise | |
| 100 | + parallel_tool_calls: false | |
| 101 | + # [measured] same task, both successful: 4 min 55 with "none", 10 min 15 with | |
| 102 | + # "high". Inkling still reasons briefly before a tool call. Use "high" for a | |
| 103 | + # hard bug or a design question. | |
| 104 | + reasoning_effort: none | |
| 105 | + | |
| 106 | +context: | |
| 107 | + # compress the history before the window is full (settings guide, every row) | |
| 108 | + enabled: true | |
| 109 | + # 60 % of contextWindow (~9.8k tokens). 2026-11-30: at 75, the server | |
| 110 | + # counted 17k tokens where mm estimated 8k (Go, HTML and shell output are | |
| 111 | + # dense for Inkling's tokenizer, ~1.8 characters per token), and the run | |
| 112 | + # stalled. mm now scales its estimate by the server's count (ticket 291); | |
| 113 | + # 60 still leaves room for one more 2.5k-character read before the window. | |
| 114 | + threshold: 60 | |
| 115 | + # [measured] 2026-11-29: with the default 3, the compression at the start of | |
| 116 | + # a question kept ~20k tokens whole — above the threshold. mm counts every | |
| 117 | + # user message as a turn, its own notices too ("your last tool call was not | |
| 118 | + # run…", a message typed during a turn), so 3 "turns" were in fact one long | |
| 119 | + # turn of 67 messages and another of 33. mm then compressed the current | |
| 120 | + # question before every step (compressInTurn), the model lost what it had | |
| 121 | + # just read and read the same files again for 3.5 h. 1: only the last turn | |
| 122 | + # stays raw, the rest goes into the summary. Still: ask for small steps. | |
| 123 | + # (mm 2.2.1 no longer counts its own notices as turns — ticket 289 — but 1 | |
| 124 | + # is kept: on a 16k window, one finished question is enough to keep raw.) | |
| 125 | + keepLastTurns: 1 | |
| 126 | + # Where a compression INSIDE a turn brings the history down to, in % of | |
| 127 | + # contextWindow (ticket 290). The compression fires at `threshold` (60 %, | |
| 128 | + # ~9.8k tokens); it then goes down to 40 % (~6.5k), not just under 60 %. | |
| 129 | + # Why: razorbill reuses the part of the prompt it has already read, but | |
| 130 | + # every compression rewrites the prompt, so the next call is read again | |
| 131 | + # from the start — ~98 s here, against ~13 s for a call that hits the | |
| 132 | + # cache. [measured] 2026-11-30, compressing just under the threshold: | |
| 133 | + # each new read (~1.4k tokens) passed it again, 18 calls of 41 were read | |
| 134 | + # from scratch, 29.5 of the 34.5 minutes. At 40 %, two or three reads fit | |
| 135 | + # before the next compression, and those calls hit the cache. Lower keeps | |
| 136 | + # less of what the model just read (the last tool exchange always stays | |
| 137 | + # whole); 60 (= threshold) is the old behaviour. 0 = two thirds of | |
| 138 | + # threshold, the same 40 here: written out so the choice shows. | |
| 139 | + inTurnTarget: 40 | |
| 140 | + # The notes of a summary are cut at this many tokens. 2026-11-30: 5 of 6 | |
| 141 | + # in-turn summaries hit the default 1200 (they list routes and request | |
| 142 | + # shapes); mm now drops the cut line and says so, and the notes start | |
| 143 | + # with the next change to make. 1600 leaves room for the whole list. | |
| 144 | + summaryMaxTokens: 1600 | |
| 145 | + # How many times the SAME tool call (same command, same arguments) may run | |
| 146 | + # again in one turn once its result was dropped by a compression and no | |
| 147 | + # file was changed in between (ticket 292). 1 = the second identical read | |
| 148 | + # runs with a warning, the third is not run: the model gets "[mm: not run | |
| 149 | + # — … work from your notes: make the change now …]" instead of the output. | |
| 150 | + # [measured] 2026-11-30: three runs ended at maxTurns 40 with reads only, | |
| 151 | + # server.go read four times in the same ranges; the warnings were read and | |
| 152 | + # ignored. A call repeated after write_file/edit_file (go test after a fix) | |
| 153 | + # is never counted. 0 = warnings only, never refuse. 1 is also the default: | |
| 154 | + # written out so the choice shows. | |
| 155 | + rereadLimit: 1 | |
| 156 | + | |
| 157 | +sessions: | |
| 158 | + # your answer: every conversation is saved; /sessions lists them, /resume | |
| 159 | + # reopens one | |
| 160 | + enabled: true | |
| 161 | + # relative to the directory mm is started from: one folder per project | |
| 162 | + dir: .mm/sessions | |
| 163 | + | |
| 164 | +agentsMd: | |
| 165 | + # An AGENTS.md in the project directory is added to the system prompt. | |
| 166 | + enabled: true | |
| 167 | + # re-read at every turn: a longer file is left out (the banner says so) | |
| 168 | + maxChars: 8000 | |
| 169 | + | |
| 170 | +# Every request to the model and every answer, written to .mm/traces/ (one pair | |
| 171 | +# of files per call): prompt sizes, cached tokens, tool calls. Headers are not | |
| 172 | +# written; the conversation is, so do not commit them. | |
| 173 | +trace: | |
| 174 | + enabled: true | |
| 175 | + dir: .mm/traces | |
| 176 | + | |
| 177 | +acp: | |
| 178 | + name: 🐧 nestor | |
| 179 | + title: "🐧 Nestor (developer)" | |
| 180 | + | |
| 181 | +# Variables: {{date}}, {{cwd}}, {{env.NAME}}, {{config.NAME}} (a variables: section) — replaced when a conversation starts. | |
| 182 | +system: | | |
| 183 | + Your name is 🐧 Nestor. | |
| 184 | + You are a coding agent working in a terminal, in the user's project. | |
| 185 | + You have a bash tool and file tools (read_file, write_file, edit_file). | |
| 186 | + Read before you change: look at the files and run the commands that tell | |
| 187 | + you how the project works. Make the smallest change that does the job, | |
| 188 | + then run the tests or the build to check it. | |
| 189 | + Never state the output of a command you did not run in this answer. | |
| 190 | + Prefer edit_file to rewriting a file. Write a long new file in several | |
| 191 | + steps (create it, then extend it) rather than in one large call. | |
| 192 | + Show only the part of a command output you need (grep, head, tail). | |
| 193 | + | |
| 194 | +# The family of this model is not in mm's table: the sampling is a generic | |
| 195 | +# starting point — check the model card. | |
| 196 | +# The server said nothing about this model beyond its name: the settings | |
| 197 | +# come from the family table. | |
| 198 | + | |
| 199 | +# Next: skills https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/add-a-skill.md | |
| 200 | +# MCP servers https://rickub.com/bots-garden/mini-me/blob/main/docs/en/tutorials/mcp-getting-started.md | |
| 201 | +# hooks https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/guard-the-agent-with-hooks.md | |
| 202 | +# sessions https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/keep-sessions.md | |
| new file mode 100644 | |||
| @@ -0,0 +1,202 @@ | |||
| 1 | +# 🐧 Nestor — a coding agent: reads and changes the project, runs commands. | ||
| 2 | +# | ||
| 3 | +# Written by `mm init`. Every value says why it has that value; change | ||
| 4 | +# them as you watch the agent work: | ||
| 5 | +# https://rickub.com/bots-garden/mini-me/blob/main/guides/agent-settings-for-small-models.md | ||
| 6 | +# | ||
| 7 | +# model family: other | ||
| 8 | +# usage: developer | ||
| 9 | +# machine: medium — a workstation, models up to about 30B | ||
| 10 | +# model facts: measured on this Mac (MacBook Air M4, 32 GB) on 2026-11-29, | ||
| 11 | +# razorbill 1.2.0: see the [measured] comments | ||
| 12 | +# | ||
| 13 | +# Needs razorbill 1.2.1 or later: before it, Inkling re-read the whole | ||
| 14 | +# conversation at every turn, and a tool call reached mm only once complete. | ||
| 15 | +# | ||
| 16 | +# Before a session: close the heavy apps. The model takes ~16 GB; when the Mac | ||
| 17 | +# swaps (watch Activity Monitor), generation falls from ~14 to a few tokens/s. | ||
| 18 | +# | ||
| 19 | +# Where the numbers come from (the tag before their comment): | ||
| 20 | +# [guide] the settings guide's row for this machine | ||
| 21 | +# [rule] a rule of thumb, not specific to this model | ||
| 22 | +# [measured] measured with this model on this machine | ||
| 23 | +# | ||
| 24 | +# mm or mm tui started from the project root (it finds .mm/agent.yaml) | ||
| 25 | + | ||
| 26 | +provider: razorbill | ||
| 27 | +# The model. Chosen for it (family other): sampling (temperature, top_p, | ||
| 28 | +# max_tokens). Change the model and redo them together — running mm init | ||
| 29 | +# again is the quick way. | ||
| 30 | +model: "mlx-community/Inkling-2-Mini-oQ4e-mtp" | ||
| 31 | +# No baseUrl: razorbill's defaults apply. For the record: | ||
| 32 | +baseUrl: "http://127.0.0.1:7920/v1" | ||
| 33 | +fallback: "http://host.docker.internal:7920/v1" # tried when baseUrl does not answer | ||
| 34 | +# Nothing answers at this address: mm starts rzb serve (and rzb models pull | ||
| 35 | +# when this model is missing) and stops it with the last mm session using it. | ||
| 36 | +# macOS only, with mm running on the Mac itself — not in a container or a | ||
| 37 | +# sandbox. A server you started yourself is never stopped. | ||
| 38 | +razorbill: | ||
| 39 | + autoStart: true | ||
| 40 | + # config: rzb-server.yaml # rzb serve --config (relative to this file) | ||
| 41 | + # serverArgs: [] # any other rzb serve flag | ||
| 42 | + | ||
| 43 | +# [measured] razorbill reports no window: set it, or the history is never | ||
| 44 | +# compressed by size. razorbill reuses what it has already read, but reads it | ||
| 45 | +# all again after a compression or a restart (~100-150 tokens/s: ~2 min at | ||
| 46 | +# 16k, worse when swapping), so keep it small. | ||
| 47 | +contextWindow: 16384 | ||
| 48 | +# your answer: tools run without asking | ||
| 49 | +yolo: true | ||
| 50 | +# usage developer | ||
| 51 | +bashTool: true | ||
| 52 | +editTools: true | ||
| 53 | +# [measured] the tool definitions are most of the first prompt (~2,900 tokens | ||
| 54 | +# with all seven, ~1,600 with the four below). | ||
| 55 | +# plan and ask_user are off for that reason (in the terminal, just type). | ||
| 56 | +planTool: true | ||
| 57 | +askUserTool: true | ||
| 58 | +# razorbill has no unload route: the unload_model tool would do nothing | ||
| 59 | +unloadModels: false | ||
| 60 | +# no effect with razorbill (no unload route). A server mm started is stopped | ||
| 61 | +# when mm exits, which frees the memory; your own server keeps it. | ||
| 62 | +unloadOnExit: true | ||
| 63 | +# your answer: a <name>.md or <name>/SKILL.md per skill, in .mm/skills/ — | ||
| 64 | +# relative to the directory mm is started from, the project root (see | ||
| 65 | +# https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/add-a-skill.md) | ||
| 66 | +skillsDir: .mm/skills | ||
| 67 | +# usage developer | ||
| 68 | +maxTurns: 40 | ||
| 69 | +# [measured] a large tool output costs ~30 s of prompt reading, and takes | ||
| 70 | +# room in the window. 2026-11-29: with 8000, outputs of earlier turns kept the | ||
| 71 | +# history above the compression threshold (see context: below), so 4000. | ||
| 72 | +# 2026-11-30: one `cat` of web/index.html still weighed ~15k characters in | ||
| 73 | +# the request, and three 5k reads in a row filled the 16k window: 2500. | ||
| 74 | +maxOutput: 2500 | ||
| 75 | +# [measured] time to read the prompt before the first token | ||
| 76 | +firstTokenTimeout: 10m | ||
| 77 | +# [measured] with razorbill 1.2.0, which sent a tool call only once complete, | ||
| 78 | +# mm saw nothing while Inkling wrote a long file and cut it at 2m. Since 1.2.1 | ||
| 79 | +# the call arrives as it is written, so this long limit is no longer needed: | ||
| 80 | +# about 5m leaves room (keep it above bashTimeout). | ||
| 81 | +# [measured] 2026-11-29: but razorbill sends nothing while it reads the | ||
| 82 | +# prompt, and a 25k-token prompt without cache took more than 5 min on this | ||
| 83 | +# Mac while it swapped: 5m cut it ("generation timed out (stalled)"). 10m | ||
| 84 | +# until the prompt reading is shorter. | ||
| 85 | +watchdogTimeout: 10m | ||
| 86 | +bashTimeout: 2m | ||
| 87 | + | ||
| 88 | +sampling: | ||
| 89 | + # [measured] reliable tool calls at 0.2 (the model's own default is 1.0) | ||
| 90 | + temperature: 0.2 | ||
| 91 | + # [rule] usual value for a code agent | ||
| 92 | + top_p: 0.9 | ||
| 93 | + # [measured] the limit counts the reasoning too, even with reasoning_effort | ||
| 94 | + # none: 600 to 1,300 tokens before writing a file, once 2,500 with no call. | ||
| 95 | + # A call that does not fit is cut and mm asks for smaller pieces: raise this | ||
| 96 | + # if it happens often | ||
| 97 | + max_tokens: 3072 | ||
| 98 | + # one tool call per reply: small models run a check before the change it | ||
| 99 | + # checks has landed otherwise | ||
| 100 | + parallel_tool_calls: false | ||
| 101 | + # [measured] same task, both successful: 4 min 55 with "none", 10 min 15 with | ||
| 102 | + # "high". Inkling still reasons briefly before a tool call. Use "high" for a | ||
| 103 | + # hard bug or a design question. | ||
| 104 | + reasoning_effort: none | ||
| 105 | + | ||
| 106 | +context: | ||
| 107 | + # compress the history before the window is full (settings guide, every row) | ||
| 108 | + enabled: true | ||
| 109 | + # 60 % of contextWindow (~9.8k tokens). 2026-11-30: at 75, the server | ||
| 110 | + # counted 17k tokens where mm estimated 8k (Go, HTML and shell output are | ||
| 111 | + # dense for Inkling's tokenizer, ~1.8 characters per token), and the run | ||
| 112 | + # stalled. mm now scales its estimate by the server's count (ticket 291); | ||
| 113 | + # 60 still leaves room for one more 2.5k-character read before the window. | ||
| 114 | + threshold: 60 | ||
| 115 | + # [measured] 2026-11-29: with the default 3, the compression at the start of | ||
| 116 | + # a question kept ~20k tokens whole — above the threshold. mm counts every | ||
| 117 | + # user message as a turn, its own notices too ("your last tool call was not | ||
| 118 | + # run…", a message typed during a turn), so 3 "turns" were in fact one long | ||
| 119 | + # turn of 67 messages and another of 33. mm then compressed the current | ||
| 120 | + # question before every step (compressInTurn), the model lost what it had | ||
| 121 | + # just read and read the same files again for 3.5 h. 1: only the last turn | ||
| 122 | + # stays raw, the rest goes into the summary. Still: ask for small steps. | ||
| 123 | + # (mm 2.2.1 no longer counts its own notices as turns — ticket 289 — but 1 | ||
| 124 | + # is kept: on a 16k window, one finished question is enough to keep raw.) | ||
| 125 | + keepLastTurns: 1 | ||
| 126 | + # Where a compression INSIDE a turn brings the history down to, in % of | ||
| 127 | + # contextWindow (ticket 290). The compression fires at `threshold` (60 %, | ||
| 128 | + # ~9.8k tokens); it then goes down to 40 % (~6.5k), not just under 60 %. | ||
| 129 | + # Why: razorbill reuses the part of the prompt it has already read, but | ||
| 130 | + # every compression rewrites the prompt, so the next call is read again | ||
| 131 | + # from the start — ~98 s here, against ~13 s for a call that hits the | ||
| 132 | + # cache. [measured] 2026-11-30, compressing just under the threshold: | ||
| 133 | + # each new read (~1.4k tokens) passed it again, 18 calls of 41 were read | ||
| 134 | + # from scratch, 29.5 of the 34.5 minutes. At 40 %, two or three reads fit | ||
| 135 | + # before the next compression, and those calls hit the cache. Lower keeps | ||
| 136 | + # less of what the model just read (the last tool exchange always stays | ||
| 137 | + # whole); 60 (= threshold) is the old behaviour. 0 = two thirds of | ||
| 138 | + # threshold, the same 40 here: written out so the choice shows. | ||
| 139 | + inTurnTarget: 40 | ||
| 140 | + # The notes of a summary are cut at this many tokens. 2026-11-30: 5 of 6 | ||
| 141 | + # in-turn summaries hit the default 1200 (they list routes and request | ||
| 142 | + # shapes); mm now drops the cut line and says so, and the notes start | ||
| 143 | + # with the next change to make. 1600 leaves room for the whole list. | ||
| 144 | + summaryMaxTokens: 1600 | ||
| 145 | + # How many times the SAME tool call (same command, same arguments) may run | ||
| 146 | + # again in one turn once its result was dropped by a compression and no | ||
| 147 | + # file was changed in between (ticket 292). 1 = the second identical read | ||
| 148 | + # runs with a warning, the third is not run: the model gets "[mm: not run | ||
| 149 | + # — … work from your notes: make the change now …]" instead of the output. | ||
| 150 | + # [measured] 2026-11-30: three runs ended at maxTurns 40 with reads only, | ||
| 151 | + # server.go read four times in the same ranges; the warnings were read and | ||
| 152 | + # ignored. A call repeated after write_file/edit_file (go test after a fix) | ||
| 153 | + # is never counted. 0 = warnings only, never refuse. 1 is also the default: | ||
| 154 | + # written out so the choice shows. | ||
| 155 | + rereadLimit: 1 | ||
| 156 | + | ||
| 157 | +sessions: | ||
| 158 | + # your answer: every conversation is saved; /sessions lists them, /resume | ||
| 159 | + # reopens one | ||
| 160 | + enabled: true | ||
| 161 | + # relative to the directory mm is started from: one folder per project | ||
| 162 | + dir: .mm/sessions | ||
| 163 | + | ||
| 164 | +agentsMd: | ||
| 165 | + # An AGENTS.md in the project directory is added to the system prompt. | ||
| 166 | + enabled: true | ||
| 167 | + # re-read at every turn: a longer file is left out (the banner says so) | ||
| 168 | + maxChars: 8000 | ||
| 169 | + | ||
| 170 | +# Every request to the model and every answer, written to .mm/traces/ (one pair | ||
| 171 | +# of files per call): prompt sizes, cached tokens, tool calls. Headers are not | ||
| 172 | +# written; the conversation is, so do not commit them. | ||
| 173 | +trace: | ||
| 174 | + enabled: true | ||
| 175 | + dir: .mm/traces | ||
| 176 | + | ||
| 177 | +acp: | ||
| 178 | + name: 🐧 nestor | ||
| 179 | + title: "🐧 Nestor (developer)" | ||
| 180 | + | ||
| 181 | +# Variables: {{date}}, {{cwd}}, {{env.NAME}}, {{config.NAME}} (a variables: section) — replaced when a conversation starts. | ||
| 182 | +system: | | ||
| 183 | + Your name is 🐧 Nestor. | ||
| 184 | + You are a coding agent working in a terminal, in the user's project. | ||
| 185 | + You have a bash tool and file tools (read_file, write_file, edit_file). | ||
| 186 | + Read before you change: look at the files and run the commands that tell | ||
| 187 | + you how the project works. Make the smallest change that does the job, | ||
| 188 | + then run the tests or the build to check it. | ||
| 189 | + Never state the output of a command you did not run in this answer. | ||
| 190 | + Prefer edit_file to rewriting a file. Write a long new file in several | ||
| 191 | + steps (create it, then extend it) rather than in one large call. | ||
| 192 | + Show only the part of a command output you need (grep, head, tail). | ||
| 193 | + | ||
| 194 | +# The family of this model is not in mm's table: the sampling is a generic | ||
| 195 | +# starting point — check the model card. | ||
| 196 | +# The server said nothing about this model beyond its name: the settings | ||
| 197 | +# come from the family table. | ||
| 198 | + | ||
| 199 | +# Next: skills https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/add-a-skill.md | ||
| 200 | +# MCP servers https://rickub.com/bots-garden/mini-me/blob/main/docs/en/tutorials/mcp-getting-started.md | ||
| 201 | +# hooks https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/guard-the-agent-with-hooks.md | ||
| 202 | +# sessions https://rickub.com/bots-garden/mini-me/blob/main/docs/en/how-to/keep-sessions.md | ||
added
demos/inkling-2-mini/prompt.txt +54 -0 | new file mode 100644 | ||
| @@ -0,0 +1,54 @@ | ||
| 1 | +I need a web app to manage issues per project, locally, in folders. I would launch the application from a project folder, or by giving it a project path. | |
| 2 | + | |
| 3 | +- A project has several issues. | |
| 4 | +- An issue is either open or closed. | |
| 5 | +- An issue can have 0 or more labels. | |
| 6 | +- An issue can belong to 0 or 1 milestone. | |
| 7 | +- An issue can belong to 0 or 1 epic. | |
| 8 | +- An epic can contain issues from different milestones. | |
| 9 | +- An epic is either open or closed. | |
| 10 | +- A milestone is either open or closed. | |
| 11 | + | |
| 12 | +An issue has: | |
| 13 | +- a title | |
| 14 | +- a body (in Markdown) | |
| 15 | +- tasks | |
| 16 | +- comments (in Markdown) | |
| 17 | +- a creation date | |
| 18 | +- a modification date | |
| 19 | +- a closing date | |
| 20 | +- a deletion date | |
| 21 | +- a user (the creator) | |
| 22 | + | |
| 23 | +a label has a color | |
| 24 | + | |
| 25 | +an epic has a color | |
| 26 | + | |
| 27 | +a milestone has a start and a end date | |
| 28 | + | |
| 29 | +The roadmap is a table where: | |
| 30 | +- the first column lists the epics | |
| 31 | +- the other columns are the milestones, plus a "No milestone" column | |
| 32 | +- so an epic row can have several milestone columns | |
| 33 | + | |
| 34 | +It must be possible to perform CRUD actions on: | |
| 35 | +- projects | |
| 36 | +- issues | |
| 37 | +- labels | |
| 38 | +- milestones | |
| 39 | +- epics | |
| 40 | + | |
| 41 | +We will use Go and a SPA with a professional look and feel. Everything will be API-based. | |
| 42 | + | |
| 43 | +Data will be persisted as YAML in a `.tickets` subdirectory of the provided path, or of the current working directory: | |
| 44 | + | |
| 45 | +- The application will be named `tickets`. | |
| 46 | +- If the `tickets` application is started in a `./demo` folder, everything will happen in `./demo/.tickets`. | |
| 47 | +- If it is started like this: `tickets ./something/demo`, everything will happen in `./something/demo/.tickets`. | |
| 48 | +- The first time `tickets` is launched, the application suggests an unused HTTP port (which the user can change) and saves it in the configuration file. | |
| 49 | +- It also asks for the default user's handle and initializes the data (notably with default labels). | |
| 50 | +- There will be a YAML project configuration file, where project information can be entered, including an HTTP port. | |
| 51 | +- One issue corresponds to one YAML file. | |
| 52 | +- Epics are listed in one YAML file. | |
| 53 | +- Milestones are listed in one YAML file. | |
| 54 | +- Labels are listed in one YAML file. | |
| new file mode 100644 | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | +I need a web app to manage issues per project, locally, in folders. I would launch the application from a project folder, or by giving it a project path. | ||
| 2 | + | ||
| 3 | +- A project has several issues. | ||
| 4 | +- An issue is either open or closed. | ||
| 5 | +- An issue can have 0 or more labels. | ||
| 6 | +- An issue can belong to 0 or 1 milestone. | ||
| 7 | +- An issue can belong to 0 or 1 epic. | ||
| 8 | +- An epic can contain issues from different milestones. | ||
| 9 | +- An epic is either open or closed. | ||
| 10 | +- A milestone is either open or closed. | ||
| 11 | + | ||
| 12 | +An issue has: | ||
| 13 | +- a title | ||
| 14 | +- a body (in Markdown) | ||
| 15 | +- tasks | ||
| 16 | +- comments (in Markdown) | ||
| 17 | +- a creation date | ||
| 18 | +- a modification date | ||
| 19 | +- a closing date | ||
| 20 | +- a deletion date | ||
| 21 | +- a user (the creator) | ||
| 22 | + | ||
| 23 | +a label has a color | ||
| 24 | + | ||
| 25 | +an epic has a color | ||
| 26 | + | ||
| 27 | +a milestone has a start and a end date | ||
| 28 | + | ||
| 29 | +The roadmap is a table where: | ||
| 30 | +- the first column lists the epics | ||
| 31 | +- the other columns are the milestones, plus a "No milestone" column | ||
| 32 | +- so an epic row can have several milestone columns | ||
| 33 | + | ||
| 34 | +It must be possible to perform CRUD actions on: | ||
| 35 | +- projects | ||
| 36 | +- issues | ||
| 37 | +- labels | ||
| 38 | +- milestones | ||
| 39 | +- epics | ||
| 40 | + | ||
| 41 | +We will use Go and a SPA with a professional look and feel. Everything will be API-based. | ||
| 42 | + | ||
| 43 | +Data will be persisted as YAML in a `.tickets` subdirectory of the provided path, or of the current working directory: | ||
| 44 | + | ||
| 45 | +- The application will be named `tickets`. | ||
| 46 | +- If the `tickets` application is started in a `./demo` folder, everything will happen in `./demo/.tickets`. | ||
| 47 | +- If it is started like this: `tickets ./something/demo`, everything will happen in `./something/demo/.tickets`. | ||
| 48 | +- The first time `tickets` is launched, the application suggests an unused HTTP port (which the user can change) and saves it in the configuration file. | ||
| 49 | +- It also asks for the default user's handle and initializes the data (notably with default labels). | ||
| 50 | +- There will be a YAML project configuration file, where project information can be entered, including an HTTP port. | ||
| 51 | +- One issue corresponds to one YAML file. | ||
| 52 | +- Epics are listed in one YAML file. | ||
| 53 | +- Milestones are listed in one YAML file. | ||
| 54 | +- Labels are listed in one YAML file. | ||
modified
release-notes/README.md +2 -1 | @@ -4,7 +4,8 @@ One note per tag, in English (`.en.md`) and French (`.fr.md`). Rebuilt on 2026-1 | ||
| 4 | 4 | |
| 5 | 5 | | Version | Date | Summary | | |
| 6 | 6 | |---|---|---|---| |
| 7 | -| [v2.2.0](v2.2.0.en.md) | not tagged yet | Decision models by configuration, without a hook — a decider's answers added to the question, tool calls allowed or denied, tool outputs and hand-offs checked — and mm installed or upgraded in one line with `curl | bash`. | [FR](v2.2.0.fr.md) | | |
| 7 | +| [v2.2.1](v2.2.1.en.md) | not tagged yet | Long turns on small context windows: the compression inside a turn now measures what the server really reads, goes down far enough to keep the prompt cache, keeps the outline of the code it shrinks, and stops a model that reads the same files in circles. | [FR](v2.2.1.fr.md) | | |
| 8 | +| [v2.2.0](v2.2.0.en.md) | 2026-11-28 | Decision models by configuration, without a hook — a decider's answers added to the question, tool calls allowed or denied, tool outputs and hand-offs checked — and mm installed or upgraded in one line with `curl | bash`. | [FR](v2.2.0.fr.md) | | |
| 8 | 9 | | [v2.1.1](v2.1.1.en.md) | 2026-11-27 | Steer the model while it works, razorbill as a provider (started by mm on the Mac), an "Other…" answer to every question the agent asks, finished answers drawn as Markdown in the window, meta-prompts in a `[` picker, documentation shipped with an agent, and `mm help`. | [FR](v2.1.1.fr.md) | |
| 9 | 10 | | [v2.1.0](v2.1.0.en.md) | 2026-11-25 | Agents that talk to each other over A2A, llama-server started and stopped by mm, MLX-Serve as a provider, the generation speed in the status bar, long turns compressed as they go, and variables in the system prompt. | [FR](v2.1.0.fr.md) | |
| 10 | 11 | | [v2.0.0](v2.0.0.en.md) | 2026-11-20 | Built-in guardrails against the silent failures of small models: wrong paths and malformed tool calls repaired, loops, cut answers and failed edits caught and reported, diagnostics without asking, background processes tracked, and `mm -p` exits 1 when a run fails. | [FR](v2.0.0.fr.md) | |
| @@ -4,7 +4,8 @@ One note per tag, in English (`.en.md`) and French (`.fr.md`). Rebuilt on 2026-1 | |||
| 4 | 4 | ||
| 5 | | Version | Date | Summary | | | 5 | | Version | Date | Summary | | |
| 6 | |---|---|---|---| | 6 | |---|---|---|---| |
| 7 | -| [v2.2.0](v2.2.0.en.md) | not tagged yet | Decision models by configuration, without a hook — a decider's answers added to the question, tool calls allowed or denied, tool outputs and hand-offs checked — and mm installed or upgraded in one line with `curl | bash`. | [FR](v2.2.0.fr.md) | | 7 | +| [v2.2.1](v2.2.1.en.md) | not tagged yet | Long turns on small context windows: the compression inside a turn now measures what the server really reads, goes down far enough to keep the prompt cache, keeps the outline of the code it shrinks, and stops a model that reads the same files in circles. | [FR](v2.2.1.fr.md) | |
| 8 | +| [v2.2.0](v2.2.0.en.md) | 2026-11-28 | Decision models by configuration, without a hook — a decider's answers added to the question, tool calls allowed or denied, tool outputs and hand-offs checked — and mm installed or upgraded in one line with `curl | bash`. | [FR](v2.2.0.fr.md) | | ||
| 8 | | [v2.1.1](v2.1.1.en.md) | 2026-11-27 | Steer the model while it works, razorbill as a provider (started by mm on the Mac), an "Other…" answer to every question the agent asks, finished answers drawn as Markdown in the window, meta-prompts in a `[` picker, documentation shipped with an agent, and `mm help`. | [FR](v2.1.1.fr.md) | | 9 | | [v2.1.1](v2.1.1.en.md) | 2026-11-27 | Steer the model while it works, razorbill as a provider (started by mm on the Mac), an "Other…" answer to every question the agent asks, finished answers drawn as Markdown in the window, meta-prompts in a `[` picker, documentation shipped with an agent, and `mm help`. | [FR](v2.1.1.fr.md) | |
| 9 | | [v2.1.0](v2.1.0.en.md) | 2026-11-25 | Agents that talk to each other over A2A, llama-server started and stopped by mm, MLX-Serve as a provider, the generation speed in the status bar, long turns compressed as they go, and variables in the system prompt. | [FR](v2.1.0.fr.md) | | 10 | | [v2.1.0](v2.1.0.en.md) | 2026-11-25 | Agents that talk to each other over A2A, llama-server started and stopped by mm, MLX-Serve as a provider, the generation speed in the status bar, long turns compressed as they go, and variables in the system prompt. | [FR](v2.1.0.fr.md) | |
| 10 | | [v2.0.0](v2.0.0.en.md) | 2026-11-20 | Built-in guardrails against the silent failures of small models: wrong paths and malformed tool calls repaired, loops, cut answers and failed edits caught and reported, diagnostics without asking, background processes tracked, and `mm -p` exits 1 when a run fails. | [FR](v2.0.0.fr.md) | | 11 | | [v2.0.0](v2.0.0.en.md) | 2026-11-20 | Built-in guardrails against the silent failures of small models: wrong paths and malformed tool calls repaired, loops, cut answers and failed edits caught and reported, diagnostics without asking, background processes tracked, and `mm -p` exits 1 when a run fails. | [FR](v2.0.0.fr.md) | |
added
release-notes/v2.2.1.en.md +75 -0 | new file mode 100644 | ||
| @@ -0,0 +1,75 @@ | ||
| 1 | +# mini-me v2.2.1 | |
| 2 | + | |
| 3 | +*[Version française](v2.2.1.fr.md)* | |
| 4 | + | |
| 5 | +Long turns on small context windows: the compression inside a turn now measures what the server really reads, goes down far enough to keep the prompt cache, keeps the outline of the code it shrinks, and stops a model that reads the same files in circles. | |
| 6 | + | |
| 7 | +## Fixed | |
| 8 | + | |
| 9 | +These fixes come from sessions of `demos/inkling-2-mini` (Inkling-2-Mini on razorbill, a 16k window) where a long task never finished: once after 3.5 hours of the same reads (~30 cycles), once on a request the server never answered, and three times at `maxTurns` with reads only. | |
| 10 | + | |
| 11 | +### mm's own messages no longer count as questions (#289) | |
| 12 | + | |
| 13 | +mm writes some messages in your role: the notes it hands the model (a cut tool call, a reply cut at the token limit, a failed edit, a loop) and the messages you type while a turn runs. Each of them used to start a "turn" for the compression, so `keepLastTurns: 3` could keep one real question and a hundred messages around it, find nothing old to summarise, and leave the compression inside the turn to fire before every call — the 3.5-hour loop. These messages now stay in the turn they belong to. When the history before the current turn is above the threshold by itself, the turn is summarised once only, and a `🗜️ … the history before this turn is above the threshold by itself` line says so, even with `showStats: false`. | |
| 14 | + | |
| 15 | +Sessions saved before this version are split as before: start a new session to benefit from it. | |
| 16 | + | |
| 17 | +### The compression measures what the server reads (#291) | |
| 18 | + | |
| 19 | +mm estimates sizes at 3.5 characters per token; with Go, HTML and shell output Inkling-2-Mini counted about 1.8, and the request also carries the tools' schemas. In the observed session mm estimated 8.3k tokens where the server read 17.2k: the compression fired on the server's count, judged its own work with the estimate, never summarised, and sent 17k-token requests to a 16k window until the server stopped answering. | |
| 20 | + | |
| 21 | +- Every in-turn decision now scales the estimate by the ratio of the server's last count to the estimate of the same request, tools' schemas included. | |
| 22 | +- When the last four tool exchanges alone are too big, the summary keeps fewer of them (at least one). | |
| 23 | +- A request that is still larger than the window once compressed is not sent: the turn ends with `the request (about N tokens, even compressed) is larger than the context window (W), so it was not sent — …`, and the work done is kept. | |
| 24 | + | |
| 25 | +### A model that reads the same files in circles (#292) | |
| 26 | + | |
| 27 | +When the files a task needs do not fit the window together, a model reads them in chunks and, by the end, the first chunks were compressed away; it starts again. Observed: 40 tool calls, all reads, `server.go` read four times in the same ranges, no file written. | |
| 28 | + | |
| 29 | +- A shrunk tool result that holds code keeps its **outline** — functions, types, struct fields with their JSON names, HTTP routes, `fetch(` calls — instead of its first line (which was `package server`). A shrunk result is never shrunk again. | |
| 30 | +- The notes of a summary inside a turn keep the signatures, routes and types of the files read, and start with a `Next change:` line. Their header no longer tells the model to re-read files before relying on them. | |
| 31 | +- A summary cut at `summaryMaxTokens` loses its unfinished last line, ends with `- [notes cut at the length limit]`, and a `🗜️ a summary was cut at its limit (N tokens)…` line says so once per run. Five summaries of six were cut in one session. | |
| 32 | +- A tool call identical to one already run in the turn, after a compression dropped its result, gets a note in its result; from the second one in a turn, the note says to stop reading and make a first change. | |
| 33 | +- New key **`context.rereadLimit`** (default `1`): past that many re-reads of the same call, mm does **not run it** and answers `[mm: not run — this exact call already ran N times in this task …]`; a `🔁 not run: …` line shows it. A call repeated after a `write_file` or `edit_file` (`go test` after a fix) is never counted. `0` keeps the notes without refusing. | |
| 34 | + | |
| 35 | +See [How to keep a long session inside the context window](../docs/en/how-to/manage-the-context-window.md). | |
| 36 | + | |
| 37 | +## New | |
| 38 | + | |
| 39 | +### `context.inTurnTarget`: a compression that lasts (#290) | |
| 40 | + | |
| 41 | +The compression inside a turn fires at `threshold`; it used to get back just under it, so the next tool result passed it again and the turn was compressed before nearly every call. Each compression rewrites the prompt, and a server that reuses what it already read (llama.cpp, razorbill) then reads it all again. Measured on the Inkling demo: 18 calls of 41 read from scratch, about 98 s each against about 13 s for a call served by the cache — 29.5 minutes of a 34.5-minute run. | |
| 42 | + | |
| 43 | +```yaml | |
| 44 | +context: | |
| 45 | + threshold: 60 # the trigger | |
| 46 | + inTurnTarget: 40 # where a compression brings the history down to | |
| 47 | +``` | |
| 48 | + | |
| 49 | +Once it fires, the compression shrinks the older exchanges, summarises, and as a last resort shrinks the kept exchanges too (never the last one) until the history is under the target. `0` (the default) means two thirds of `threshold` (75 → 50); a target equal to `threshold` restores the previous behaviour. The price: the model keeps less of what it just read. | |
| 50 | + | |
| 51 | +See [`context` keys](../docs/en/reference/configuration.md#context-keys). | |
| 52 | + | |
| 53 | +## Not measured yet | |
| 54 | + | |
| 55 | +None of these fixes has yet been checked by a complete run of the Inkling task ("finish the front part" of a Go application). The last runs before `rereadLimit` ended at `maxTurns` with reads only, though without the stall or the endless loop; the cache gain of `inTurnTarget` is measured on the run that motivated it, not on a run with it. For such a task on a 16k window, splitting the request (first the API in a file, then each front-end file) remains the surest way. | |
| 56 | + | |
| 57 | +## Demos | |
| 58 | + | |
| 59 | +- **`demos/inkling-2-mini`** (new): Inkling-2-Mini (`mlx-community/Inkling-2-Mini-oQ4e-mtp`) on razorbill with a 16k window, given a Go issue tracker to build from `prompt.txt`. Its `agent.yaml` carries the settings this release came from, each with its measured reason: `threshold: 60`, `inTurnTarget: 40`, `summaryMaxTokens: 1600`, `rereadLimit: 1`, `maxOutput: 2500`, `keepLastTurns: 1`. | |
| 60 | + | |
| 61 | +## Documentation | |
| 62 | + | |
| 63 | +- [Context compression](../docs/en/explanation/context-compression.md): what a turn is, the floor before the turn, calibrated sizes, reading in circles, "A compression must last". | |
| 64 | +- [How to keep a long session inside the context window](../docs/en/how-to/manage-the-context-window.md): what to do with the new `🗜️`, `🔁` and "not sent" lines. | |
| 65 | +- [Configuration reference](../docs/en/reference/configuration.md#context-keys): `inTurnTarget`, `rereadLimit`, and what `keepLastTurns`, `compressInTurn` and `summaryMaxTokens` now do. | |
| 66 | +- The README links the blog, [mini-me.org](https://mini-me.org/). | |
| 67 | + | |
| 68 | +## Upgrading | |
| 69 | + | |
| 70 | +- **Replace the binary**: `curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash` on macOS and Linux, or see the install guides for [macOS](../INSTALL.MACOS.md), [Linux](../INSTALL.LINUX.md) and [Windows](../INSTALL.WINDOWS.md). | |
| 71 | +- Two behaviours change without any key in your file: a compression inside a turn now goes down to two thirds of `threshold` (set `inTurnTarget` equal to `threshold` for the previous behaviour), and the third identical read after a compression is refused (`rereadLimit: 0` to turn that off). | |
| 72 | +- A request larger than `contextWindow` once compressed is no longer sent. If your server serves more than `contextWindow` says, raise `contextWindow` to its real size. | |
| 73 | +- New messages: `🗜️ … the history before this turn is above the threshold by itself …`, `🗜️ a summary was cut at its limit (N tokens) …`, `🔁 not run: …`, and the "so it was not sent" error. | |
| 74 | +- New config error: `context.inTurnTarget must be between 0 and context.threshold`, `context.rereadLimit must be >= 0`. | |
| 75 | +- Older mm versions ignore the new keys (`inTurnTarget`, `rereadLimit`). | |
| new file mode 100644 | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | +# mini-me v2.2.1 | ||
| 2 | + | ||
| 3 | +*[Version française](v2.2.1.fr.md)* | ||
| 4 | + | ||
| 5 | +Long turns on small context windows: the compression inside a turn now measures what the server really reads, goes down far enough to keep the prompt cache, keeps the outline of the code it shrinks, and stops a model that reads the same files in circles. | ||
| 6 | + | ||
| 7 | +## Fixed | ||
| 8 | + | ||
| 9 | +These fixes come from sessions of `demos/inkling-2-mini` (Inkling-2-Mini on razorbill, a 16k window) where a long task never finished: once after 3.5 hours of the same reads (~30 cycles), once on a request the server never answered, and three times at `maxTurns` with reads only. | ||
| 10 | + | ||
| 11 | +### mm's own messages no longer count as questions (#289) | ||
| 12 | + | ||
| 13 | +mm writes some messages in your role: the notes it hands the model (a cut tool call, a reply cut at the token limit, a failed edit, a loop) and the messages you type while a turn runs. Each of them used to start a "turn" for the compression, so `keepLastTurns: 3` could keep one real question and a hundred messages around it, find nothing old to summarise, and leave the compression inside the turn to fire before every call — the 3.5-hour loop. These messages now stay in the turn they belong to. When the history before the current turn is above the threshold by itself, the turn is summarised once only, and a `🗜️ … the history before this turn is above the threshold by itself` line says so, even with `showStats: false`. | ||
| 14 | + | ||
| 15 | +Sessions saved before this version are split as before: start a new session to benefit from it. | ||
| 16 | + | ||
| 17 | +### The compression measures what the server reads (#291) | ||
| 18 | + | ||
| 19 | +mm estimates sizes at 3.5 characters per token; with Go, HTML and shell output Inkling-2-Mini counted about 1.8, and the request also carries the tools' schemas. In the observed session mm estimated 8.3k tokens where the server read 17.2k: the compression fired on the server's count, judged its own work with the estimate, never summarised, and sent 17k-token requests to a 16k window until the server stopped answering. | ||
| 20 | + | ||
| 21 | +- Every in-turn decision now scales the estimate by the ratio of the server's last count to the estimate of the same request, tools' schemas included. | ||
| 22 | +- When the last four tool exchanges alone are too big, the summary keeps fewer of them (at least one). | ||
| 23 | +- A request that is still larger than the window once compressed is not sent: the turn ends with `the request (about N tokens, even compressed) is larger than the context window (W), so it was not sent — …`, and the work done is kept. | ||
| 24 | + | ||
| 25 | +### A model that reads the same files in circles (#292) | ||
| 26 | + | ||
| 27 | +When the files a task needs do not fit the window together, a model reads them in chunks and, by the end, the first chunks were compressed away; it starts again. Observed: 40 tool calls, all reads, `server.go` read four times in the same ranges, no file written. | ||
| 28 | + | ||
| 29 | +- A shrunk tool result that holds code keeps its **outline** — functions, types, struct fields with their JSON names, HTTP routes, `fetch(` calls — instead of its first line (which was `package server`). A shrunk result is never shrunk again. | ||
| 30 | +- The notes of a summary inside a turn keep the signatures, routes and types of the files read, and start with a `Next change:` line. Their header no longer tells the model to re-read files before relying on them. | ||
| 31 | +- A summary cut at `summaryMaxTokens` loses its unfinished last line, ends with `- [notes cut at the length limit]`, and a `🗜️ a summary was cut at its limit (N tokens)…` line says so once per run. Five summaries of six were cut in one session. | ||
| 32 | +- A tool call identical to one already run in the turn, after a compression dropped its result, gets a note in its result; from the second one in a turn, the note says to stop reading and make a first change. | ||
| 33 | +- New key **`context.rereadLimit`** (default `1`): past that many re-reads of the same call, mm does **not run it** and answers `[mm: not run — this exact call already ran N times in this task …]`; a `🔁 not run: …` line shows it. A call repeated after a `write_file` or `edit_file` (`go test` after a fix) is never counted. `0` keeps the notes without refusing. | ||
| 34 | + | ||
| 35 | +See [How to keep a long session inside the context window](../docs/en/how-to/manage-the-context-window.md). | ||
| 36 | + | ||
| 37 | +## New | ||
| 38 | + | ||
| 39 | +### `context.inTurnTarget`: a compression that lasts (#290) | ||
| 40 | + | ||
| 41 | +The compression inside a turn fires at `threshold`; it used to get back just under it, so the next tool result passed it again and the turn was compressed before nearly every call. Each compression rewrites the prompt, and a server that reuses what it already read (llama.cpp, razorbill) then reads it all again. Measured on the Inkling demo: 18 calls of 41 read from scratch, about 98 s each against about 13 s for a call served by the cache — 29.5 minutes of a 34.5-minute run. | ||
| 42 | + | ||
| 43 | +```yaml | ||
| 44 | +context: | ||
| 45 | + threshold: 60 # the trigger | ||
| 46 | + inTurnTarget: 40 # where a compression brings the history down to | ||
| 47 | +``` | ||
| 48 | + | ||
| 49 | +Once it fires, the compression shrinks the older exchanges, summarises, and as a last resort shrinks the kept exchanges too (never the last one) until the history is under the target. `0` (the default) means two thirds of `threshold` (75 → 50); a target equal to `threshold` restores the previous behaviour. The price: the model keeps less of what it just read. | ||
| 50 | + | ||
| 51 | +See [`context` keys](../docs/en/reference/configuration.md#context-keys). | ||
| 52 | + | ||
| 53 | +## Not measured yet | ||
| 54 | + | ||
| 55 | +None of these fixes has yet been checked by a complete run of the Inkling task ("finish the front part" of a Go application). The last runs before `rereadLimit` ended at `maxTurns` with reads only, though without the stall or the endless loop; the cache gain of `inTurnTarget` is measured on the run that motivated it, not on a run with it. For such a task on a 16k window, splitting the request (first the API in a file, then each front-end file) remains the surest way. | ||
| 56 | + | ||
| 57 | +## Demos | ||
| 58 | + | ||
| 59 | +- **`demos/inkling-2-mini`** (new): Inkling-2-Mini (`mlx-community/Inkling-2-Mini-oQ4e-mtp`) on razorbill with a 16k window, given a Go issue tracker to build from `prompt.txt`. Its `agent.yaml` carries the settings this release came from, each with its measured reason: `threshold: 60`, `inTurnTarget: 40`, `summaryMaxTokens: 1600`, `rereadLimit: 1`, `maxOutput: 2500`, `keepLastTurns: 1`. | ||
| 60 | + | ||
| 61 | +## Documentation | ||
| 62 | + | ||
| 63 | +- [Context compression](../docs/en/explanation/context-compression.md): what a turn is, the floor before the turn, calibrated sizes, reading in circles, "A compression must last". | ||
| 64 | +- [How to keep a long session inside the context window](../docs/en/how-to/manage-the-context-window.md): what to do with the new `🗜️`, `🔁` and "not sent" lines. | ||
| 65 | +- [Configuration reference](../docs/en/reference/configuration.md#context-keys): `inTurnTarget`, `rereadLimit`, and what `keepLastTurns`, `compressInTurn` and `summaryMaxTokens` now do. | ||
| 66 | +- The README links the blog, [mini-me.org](https://mini-me.org/). | ||
| 67 | + | ||
| 68 | +## Upgrading | ||
| 69 | + | ||
| 70 | +- **Replace the binary**: `curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash` on macOS and Linux, or see the install guides for [macOS](../INSTALL.MACOS.md), [Linux](../INSTALL.LINUX.md) and [Windows](../INSTALL.WINDOWS.md). | ||
| 71 | +- Two behaviours change without any key in your file: a compression inside a turn now goes down to two thirds of `threshold` (set `inTurnTarget` equal to `threshold` for the previous behaviour), and the third identical read after a compression is refused (`rereadLimit: 0` to turn that off). | ||
| 72 | +- A request larger than `contextWindow` once compressed is no longer sent. If your server serves more than `contextWindow` says, raise `contextWindow` to its real size. | ||
| 73 | +- New messages: `🗜️ … the history before this turn is above the threshold by itself …`, `🗜️ a summary was cut at its limit (N tokens) …`, `🔁 not run: …`, and the "so it was not sent" error. | ||
| 74 | +- New config error: `context.inTurnTarget must be between 0 and context.threshold`, `context.rereadLimit must be >= 0`. | ||
| 75 | +- Older mm versions ignore the new keys (`inTurnTarget`, `rereadLimit`). | ||
added
release-notes/v2.2.1.fr.md +75 -0 | new file mode 100644 | ||
| @@ -0,0 +1,75 @@ | ||
| 1 | +# mini-me v2.2.1 | |
| 2 | + | |
| 3 | +*[English version](v2.2.1.en.md)* | |
| 4 | + | |
| 5 | +Les longs tours sur de petites fenêtres de contexte : la compression à l'intérieur d'un tour mesure ce que le serveur lit vraiment, descend assez bas pour garder le cache du prompt, garde le plan du code qu'elle réduit, et arrête un modèle qui relit les mêmes fichiers en rond. | |
| 6 | + | |
| 7 | +## Corrections | |
| 8 | + | |
| 9 | +Ces corrections viennent de sessions de `demos/inkling-2-mini` (Inkling-2-Mini sur razorbill, une fenêtre de 16k) où une longue tâche n'aboutissait jamais : une fois après 3 h 30 des mêmes lectures (~30 cycles), une fois sur une requête à laquelle le serveur n'a jamais répondu, et trois fois à `maxTurns` sans avoir fait autre chose que lire. | |
| 10 | + | |
| 11 | +### Les messages de mm ne comptent plus comme des questions (#289) | |
| 12 | + | |
| 13 | +mm écrit certains messages à votre place : les notes qu'il adresse au modèle (un appel d'outil coupé, une réponse coupée à la limite de tokens, une édition échouée, une boucle) et les messages que vous tapez pendant qu'un tour tourne. Chacun d'eux ouvrait un « tour » pour la compression, si bien que `keepLastTurns: 3` pouvait garder une seule vraie question et une centaine de messages autour, ne plus rien trouver d'ancien à résumer, et laisser la compression à l'intérieur du tour se déclencher avant chaque appel — la boucle de 3 h 30. Ces messages restent désormais dans le tour auquel ils appartiennent. Quand l'historique d'avant le tour en cours dépasse à lui seul le seuil, le tour n'est résumé qu'une fois, et une ligne `🗜️ … the history before this turn is above the threshold by itself` le dit, même avec `showStats: false`. | |
| 14 | + | |
| 15 | +Les sessions enregistrées avant cette version sont découpées comme avant : commencez une nouvelle session pour en profiter. | |
| 16 | + | |
| 17 | +### La compression mesure ce que le serveur lit (#291) | |
| 18 | + | |
| 19 | +mm estime les tailles à 3,5 caractères par token ; sur du Go, du HTML et des sorties shell, Inkling-2-Mini en comptait environ 1,8, et la requête porte aussi les schémas des outils. Dans la session observée, mm estimait 8,3k tokens là où le serveur en lisait 17,2k : la compression se déclenchait sur le compte du serveur, jugeait son propre travail avec l'estimation, ne résumait jamais, et envoyait des requêtes de 17k tokens à une fenêtre de 16k jusqu'à ce que le serveur ne réponde plus. | |
| 20 | + | |
| 21 | +- Chaque décision prise dans un tour multiplie désormais l'estimation par le rapport entre le dernier compte du serveur et l'estimation de la même requête, schémas des outils compris. | |
| 22 | +- Quand les quatre derniers échanges d'outils sont à eux seuls trop gros, le résumé en garde moins (au moins un). | |
| 23 | +- Une requête qui dépasse encore la fenêtre une fois compressée n'est pas envoyée : le tour se termine par `the request (about N tokens, even compressed) is larger than the context window (W), so it was not sent — …`, et le travail fait est conservé. | |
| 24 | + | |
| 25 | +### Un modèle qui relit les mêmes fichiers en rond (#292) | |
| 26 | + | |
| 27 | +Quand les fichiers dont une tâche a besoin ne tiennent pas ensemble dans la fenêtre, le modèle les lit par morceaux ; arrivé au bout, les premiers ont été retirés par la compression, et il recommence. Observé : 40 appels d'outils, tous des lectures, `server.go` lu quatre fois aux mêmes plages, aucun fichier écrit. | |
| 28 | + | |
| 29 | +- Un résultat d'outil réduit qui contient du code garde son **plan** — les fonctions, les types, les champs de structure avec leur nom JSON, les routes HTTP, les appels `fetch(` — au lieu de sa première ligne (qui était `package server`). Un résultat réduit ne l'est jamais une seconde fois. | |
| 30 | +- Les notes d'un résumé à l'intérieur d'un tour gardent les signatures, les routes et les types des fichiers lus, et commencent par une ligne `Next change:`. Leur en-tête ne demande plus au modèle de relire les fichiers avant de s'y fier. | |
| 31 | +- Un résumé coupé à `summaryMaxTokens` perd sa dernière ligne inachevée, se termine par `- [notes cut at the length limit]`, et une ligne `🗜️ a summary was cut at its limit (N tokens)…` le signale une fois par exécution. Cinq résumés sur six avaient été coupés dans une session. | |
| 32 | +- Un appel d'outil identique à un appel déjà lancé dans le tour, après qu'une compression a retiré son résultat, reçoit une note dans son résultat ; à partir du deuxième dans un tour, la note dit d'arrêter de lire et de faire une première modification. | |
| 33 | +- Nouvelle clé **`context.rereadLimit`** (par défaut `1`) : au-delà de ce nombre de relectures du même appel, mm **ne l'exécute pas** et répond `[mm: not run — this exact call already ran N times in this task …]` ; une ligne `🔁 not run: …` le signale. Un appel répété après un `write_file` ou un `edit_file` (`go test` après une correction) n'est jamais compté. `0` garde les notes sans refus. | |
| 34 | + | |
| 35 | +Voir [Comment garder une longue session dans la fenêtre de contexte](../docs/fr/how-to/manage-the-context-window.md). | |
| 36 | + | |
| 37 | +## Nouveautés | |
| 38 | + | |
| 39 | +### `context.inTurnTarget` : une compression qui dure (#290) | |
| 40 | + | |
| 41 | +La compression à l'intérieur d'un tour se déclenche à `threshold` ; elle redescendait juste en dessous, si bien que le résultat d'outil suivant le dépassait de nouveau et que le tour était compressé avant presque chaque appel. Chaque compression réécrit le prompt, et un serveur qui réutilise ce qu'il a déjà lu (llama.cpp, razorbill) relit alors tout. Mesuré sur la démo Inkling : 18 appels sur 41 relus depuis le début, environ 98 s chacun contre environ 13 s pour un appel servi par le cache — 29,5 minutes d'un run de 34,5. | |
| 42 | + | |
| 43 | +```yaml | |
| 44 | +context: | |
| 45 | + threshold: 60 # le déclencheur | |
| 46 | + inTurnTarget: 40 # le niveau auquel une compression ramène l'historique | |
| 47 | +``` | |
| 48 | + | |
| 49 | +Une fois déclenchée, la compression réduit les anciens échanges, résume, et en dernier recours réduit aussi les échanges conservés (jamais le dernier) jusqu'à passer sous la cible. `0` (la valeur par défaut) vaut deux tiers de `threshold` (75 → 50) ; une cible égale à `threshold` rétablit l'ancien comportement. Le prix : le modèle garde moins de ce qu'il vient de lire. | |
| 50 | + | |
| 51 | +Voir [les clés de `context`](../docs/fr/reference/configuration.md#clés-de-context). | |
| 52 | + | |
| 53 | +## Pas encore mesuré | |
| 54 | + | |
| 55 | +Aucune de ces corrections n'a encore été validée par un run complet de la tâche Inkling (« finir le front » d'une application Go). Les derniers runs avant `rereadLimit` s'arrêtaient à `maxTurns` sans avoir fait autre chose que lire, mais sans le blocage ni la boucle sans fin ; le gain de cache d'`inTurnTarget` est mesuré sur le run qui l'a motivé, pas sur un run qui l'utilise. Pour une telle tâche sur une fenêtre de 16k, découper la demande (d'abord l'API dans un fichier, puis chaque fichier du front) reste le plus sûr. | |
| 56 | + | |
| 57 | +## Démos | |
| 58 | + | |
| 59 | +- **`demos/inkling-2-mini`** (nouvelle) : Inkling-2-Mini (`mlx-community/Inkling-2-Mini-oQ4e-mtp`) sur razorbill avec une fenêtre de 16k, chargé de construire un gestionnaire de tickets en Go à partir de `prompt.txt`. Son `agent.yaml` porte les réglages d'où vient cette version, chacun avec sa raison mesurée : `threshold: 60`, `inTurnTarget: 40`, `summaryMaxTokens: 1600`, `rereadLimit: 1`, `maxOutput: 2500`, `keepLastTurns: 1`. | |
| 60 | + | |
| 61 | +## Documentation | |
| 62 | + | |
| 63 | +- [Compression du contexte](../docs/fr/explanation/context-compression.md) : ce qu'est un tour, le plancher d'avant le tour, les tailles calibrées, la lecture en rond, « Une compression doit durer ». | |
| 64 | +- [Comment garder une longue session dans la fenêtre de contexte](../docs/fr/how-to/manage-the-context-window.md) : que faire des nouvelles lignes `🗜️`, `🔁` et « not sent ». | |
| 65 | +- [Référence de configuration](../docs/fr/reference/configuration.md#clés-de-context) : `inTurnTarget`, `rereadLimit`, et ce que font désormais `keepLastTurns`, `compressInTurn` et `summaryMaxTokens`. | |
| 66 | +- Le README pointe vers le blog, [mini-me.org](https://mini-me.org/). | |
| 67 | + | |
| 68 | +## Mise à jour | |
| 69 | + | |
| 70 | +- **Remplacez le binaire** : `curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash` sur macOS et Linux, ou voyez les guides d'installation pour [macOS](../INSTALL.MACOS.md), [Linux](../INSTALL.LINUX.md) et [Windows](../INSTALL.WINDOWS.md). | |
| 71 | +- Deux comportements changent sans aucune clé dans votre fichier : une compression à l'intérieur d'un tour descend désormais aux deux tiers de `threshold` (mettez `inTurnTarget` égal à `threshold` pour l'ancien comportement), et la troisième lecture identique après une compression est refusée (`rereadLimit: 0` pour le désactiver). | |
| 72 | +- Une requête plus grande que `contextWindow` une fois compressée n'est plus envoyée. Si votre serveur sert plus que ce que dit `contextWindow`, montez `contextWindow` à sa vraie taille. | |
| 73 | +- Nouveaux messages : `🗜️ … the history before this turn is above the threshold by itself …`, `🗜️ a summary was cut at its limit (N tokens) …`, `🔁 not run: …`, et l'erreur « so it was not sent ». | |
| 74 | +- Nouvelles erreurs de configuration : `context.inTurnTarget must be between 0 and context.threshold`, `context.rereadLimit must be >= 0`. | |
| 75 | +- Les anciennes versions de mm ignorent les nouvelles clés (`inTurnTarget`, `rereadLimit`). | |
| new file mode 100644 | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | +# mini-me v2.2.1 | ||
| 2 | + | ||
| 3 | +*[English version](v2.2.1.en.md)* | ||
| 4 | + | ||
| 5 | +Les longs tours sur de petites fenêtres de contexte : la compression à l'intérieur d'un tour mesure ce que le serveur lit vraiment, descend assez bas pour garder le cache du prompt, garde le plan du code qu'elle réduit, et arrête un modèle qui relit les mêmes fichiers en rond. | ||
| 6 | + | ||
| 7 | +## Corrections | ||
| 8 | + | ||
| 9 | +Ces corrections viennent de sessions de `demos/inkling-2-mini` (Inkling-2-Mini sur razorbill, une fenêtre de 16k) où une longue tâche n'aboutissait jamais : une fois après 3 h 30 des mêmes lectures (~30 cycles), une fois sur une requête à laquelle le serveur n'a jamais répondu, et trois fois à `maxTurns` sans avoir fait autre chose que lire. | ||
| 10 | + | ||
| 11 | +### Les messages de mm ne comptent plus comme des questions (#289) | ||
| 12 | + | ||
| 13 | +mm écrit certains messages à votre place : les notes qu'il adresse au modèle (un appel d'outil coupé, une réponse coupée à la limite de tokens, une édition échouée, une boucle) et les messages que vous tapez pendant qu'un tour tourne. Chacun d'eux ouvrait un « tour » pour la compression, si bien que `keepLastTurns: 3` pouvait garder une seule vraie question et une centaine de messages autour, ne plus rien trouver d'ancien à résumer, et laisser la compression à l'intérieur du tour se déclencher avant chaque appel — la boucle de 3 h 30. Ces messages restent désormais dans le tour auquel ils appartiennent. Quand l'historique d'avant le tour en cours dépasse à lui seul le seuil, le tour n'est résumé qu'une fois, et une ligne `🗜️ … the history before this turn is above the threshold by itself` le dit, même avec `showStats: false`. | ||
| 14 | + | ||
| 15 | +Les sessions enregistrées avant cette version sont découpées comme avant : commencez une nouvelle session pour en profiter. | ||
| 16 | + | ||
| 17 | +### La compression mesure ce que le serveur lit (#291) | ||
| 18 | + | ||
| 19 | +mm estime les tailles à 3,5 caractères par token ; sur du Go, du HTML et des sorties shell, Inkling-2-Mini en comptait environ 1,8, et la requête porte aussi les schémas des outils. Dans la session observée, mm estimait 8,3k tokens là où le serveur en lisait 17,2k : la compression se déclenchait sur le compte du serveur, jugeait son propre travail avec l'estimation, ne résumait jamais, et envoyait des requêtes de 17k tokens à une fenêtre de 16k jusqu'à ce que le serveur ne réponde plus. | ||
| 20 | + | ||
| 21 | +- Chaque décision prise dans un tour multiplie désormais l'estimation par le rapport entre le dernier compte du serveur et l'estimation de la même requête, schémas des outils compris. | ||
| 22 | +- Quand les quatre derniers échanges d'outils sont à eux seuls trop gros, le résumé en garde moins (au moins un). | ||
| 23 | +- Une requête qui dépasse encore la fenêtre une fois compressée n'est pas envoyée : le tour se termine par `the request (about N tokens, even compressed) is larger than the context window (W), so it was not sent — …`, et le travail fait est conservé. | ||
| 24 | + | ||
| 25 | +### Un modèle qui relit les mêmes fichiers en rond (#292) | ||
| 26 | + | ||
| 27 | +Quand les fichiers dont une tâche a besoin ne tiennent pas ensemble dans la fenêtre, le modèle les lit par morceaux ; arrivé au bout, les premiers ont été retirés par la compression, et il recommence. Observé : 40 appels d'outils, tous des lectures, `server.go` lu quatre fois aux mêmes plages, aucun fichier écrit. | ||
| 28 | + | ||
| 29 | +- Un résultat d'outil réduit qui contient du code garde son **plan** — les fonctions, les types, les champs de structure avec leur nom JSON, les routes HTTP, les appels `fetch(` — au lieu de sa première ligne (qui était `package server`). Un résultat réduit ne l'est jamais une seconde fois. | ||
| 30 | +- Les notes d'un résumé à l'intérieur d'un tour gardent les signatures, les routes et les types des fichiers lus, et commencent par une ligne `Next change:`. Leur en-tête ne demande plus au modèle de relire les fichiers avant de s'y fier. | ||
| 31 | +- Un résumé coupé à `summaryMaxTokens` perd sa dernière ligne inachevée, se termine par `- [notes cut at the length limit]`, et une ligne `🗜️ a summary was cut at its limit (N tokens)…` le signale une fois par exécution. Cinq résumés sur six avaient été coupés dans une session. | ||
| 32 | +- Un appel d'outil identique à un appel déjà lancé dans le tour, après qu'une compression a retiré son résultat, reçoit une note dans son résultat ; à partir du deuxième dans un tour, la note dit d'arrêter de lire et de faire une première modification. | ||
| 33 | +- Nouvelle clé **`context.rereadLimit`** (par défaut `1`) : au-delà de ce nombre de relectures du même appel, mm **ne l'exécute pas** et répond `[mm: not run — this exact call already ran N times in this task …]` ; une ligne `🔁 not run: …` le signale. Un appel répété après un `write_file` ou un `edit_file` (`go test` après une correction) n'est jamais compté. `0` garde les notes sans refus. | ||
| 34 | + | ||
| 35 | +Voir [Comment garder une longue session dans la fenêtre de contexte](../docs/fr/how-to/manage-the-context-window.md). | ||
| 36 | + | ||
| 37 | +## Nouveautés | ||
| 38 | + | ||
| 39 | +### `context.inTurnTarget` : une compression qui dure (#290) | ||
| 40 | + | ||
| 41 | +La compression à l'intérieur d'un tour se déclenche à `threshold` ; elle redescendait juste en dessous, si bien que le résultat d'outil suivant le dépassait de nouveau et que le tour était compressé avant presque chaque appel. Chaque compression réécrit le prompt, et un serveur qui réutilise ce qu'il a déjà lu (llama.cpp, razorbill) relit alors tout. Mesuré sur la démo Inkling : 18 appels sur 41 relus depuis le début, environ 98 s chacun contre environ 13 s pour un appel servi par le cache — 29,5 minutes d'un run de 34,5. | ||
| 42 | + | ||
| 43 | +```yaml | ||
| 44 | +context: | ||
| 45 | + threshold: 60 # le déclencheur | ||
| 46 | + inTurnTarget: 40 # le niveau auquel une compression ramène l'historique | ||
| 47 | +``` | ||
| 48 | + | ||
| 49 | +Une fois déclenchée, la compression réduit les anciens échanges, résume, et en dernier recours réduit aussi les échanges conservés (jamais le dernier) jusqu'à passer sous la cible. `0` (la valeur par défaut) vaut deux tiers de `threshold` (75 → 50) ; une cible égale à `threshold` rétablit l'ancien comportement. Le prix : le modèle garde moins de ce qu'il vient de lire. | ||
| 50 | + | ||
| 51 | +Voir [les clés de `context`](../docs/fr/reference/configuration.md#clés-de-context). | ||
| 52 | + | ||
| 53 | +## Pas encore mesuré | ||
| 54 | + | ||
| 55 | +Aucune de ces corrections n'a encore été validée par un run complet de la tâche Inkling (« finir le front » d'une application Go). Les derniers runs avant `rereadLimit` s'arrêtaient à `maxTurns` sans avoir fait autre chose que lire, mais sans le blocage ni la boucle sans fin ; le gain de cache d'`inTurnTarget` est mesuré sur le run qui l'a motivé, pas sur un run qui l'utilise. Pour une telle tâche sur une fenêtre de 16k, découper la demande (d'abord l'API dans un fichier, puis chaque fichier du front) reste le plus sûr. | ||
| 56 | + | ||
| 57 | +## Démos | ||
| 58 | + | ||
| 59 | +- **`demos/inkling-2-mini`** (nouvelle) : Inkling-2-Mini (`mlx-community/Inkling-2-Mini-oQ4e-mtp`) sur razorbill avec une fenêtre de 16k, chargé de construire un gestionnaire de tickets en Go à partir de `prompt.txt`. Son `agent.yaml` porte les réglages d'où vient cette version, chacun avec sa raison mesurée : `threshold: 60`, `inTurnTarget: 40`, `summaryMaxTokens: 1600`, `rereadLimit: 1`, `maxOutput: 2500`, `keepLastTurns: 1`. | ||
| 60 | + | ||
| 61 | +## Documentation | ||
| 62 | + | ||
| 63 | +- [Compression du contexte](../docs/fr/explanation/context-compression.md) : ce qu'est un tour, le plancher d'avant le tour, les tailles calibrées, la lecture en rond, « Une compression doit durer ». | ||
| 64 | +- [Comment garder une longue session dans la fenêtre de contexte](../docs/fr/how-to/manage-the-context-window.md) : que faire des nouvelles lignes `🗜️`, `🔁` et « not sent ». | ||
| 65 | +- [Référence de configuration](../docs/fr/reference/configuration.md#clés-de-context) : `inTurnTarget`, `rereadLimit`, et ce que font désormais `keepLastTurns`, `compressInTurn` et `summaryMaxTokens`. | ||
| 66 | +- Le README pointe vers le blog, [mini-me.org](https://mini-me.org/). | ||
| 67 | + | ||
| 68 | +## Mise à jour | ||
| 69 | + | ||
| 70 | +- **Remplacez le binaire** : `curl -fsSL https://rickub.com/bots-garden/mini-me/raw/main/install-mm.sh | bash` sur macOS et Linux, ou voyez les guides d'installation pour [macOS](../INSTALL.MACOS.md), [Linux](../INSTALL.LINUX.md) et [Windows](../INSTALL.WINDOWS.md). | ||
| 71 | +- Deux comportements changent sans aucune clé dans votre fichier : une compression à l'intérieur d'un tour descend désormais aux deux tiers de `threshold` (mettez `inTurnTarget` égal à `threshold` pour l'ancien comportement), et la troisième lecture identique après une compression est refusée (`rereadLimit: 0` pour le désactiver). | ||
| 72 | +- Une requête plus grande que `contextWindow` une fois compressée n'est plus envoyée. Si votre serveur sert plus que ce que dit `contextWindow`, montez `contextWindow` à sa vraie taille. | ||
| 73 | +- Nouveaux messages : `🗜️ … the history before this turn is above the threshold by itself …`, `🗜️ a summary was cut at its limit (N tokens) …`, `🔁 not run: …`, et l'erreur « so it was not sent ». | ||
| 74 | +- Nouvelles erreurs de configuration : `context.inTurnTarget must be between 0 and context.threshold`, `context.rereadLimit must be >= 0`. | ||
| 75 | +- Les anciennes versions de mm ignorent les nouvelles clés (`inTurnTarget`, `rereadLimit`). | ||