Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ change it. To suggest a change here, open an issue; see
| 02 | [Too many tools will eat your context: from tool search to PTC](notes/02-tool-context.md) | `tool-budget-audit` |
| 03 | [Keeping long sessions sharp: compaction vs. memory](notes/03-compaction-memory.md) | `long-session-check`, `handoff-doc` |
| 04 | [How long should one bash command wait: from foreground blocking to background tasks](notes/04-bash-background.md) | `long-command-check` |
| 06 | [The hidden tax on every turn: what an agent puts into context](notes/06-context-tax.md) *(upcoming)* | `context-tax-audit` |
| 05 | [One small field can break the whole prefix cache](notes/05-prefix-cache.md) | `context-tax-audit` |

## Stacks

Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ AI 写代码越来越快,真正拉开差距的,是围绕 agent 的那一圈
| 02 | [工具一多,context 就爆:从 tool search 到 PTC](notes/02-tool-context.md) | `tool-budget-audit` |
| 03 | [长会话怎么不变傻:compaction 和 memory 的取舍](notes/03-compaction-memory.md) | `long-session-check`、`handoff-doc` |
| 04 | [一条 bash 命令该等多久:从前台阻塞到后台任务](notes/04-bash-background.md) | `long-command-check` |
| 06 | [每一轮都在交的隐形税:agent 往上下文里塞了什么](notes/06-context-tax.md)(即将发布) | `context-tax-audit` |
| 05 | [一个小字段,拖垮整段前缀缓存](notes/05-prefix-cache.md) | `context-tax-audit` |

## Stacks

Expand Down
21 changes: 21 additions & 0 deletions notes/05-prefix-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 05 · How does the agent know the current time?

**In one line:** the model has no clock. Stuffing `date` into the system
prompt is the most direct fix — and it breaks the prefix cache every turn.
Put session-stable `# Environment` up front; put per-turn time in
`<agent-context>` that is written into history and never rewritten; keep
precision to the minute. For each injected part, ask what breaks without it,
whether it needs every turn, how precise it must be, and whether its position
breaks the prompt cache.

**Companion skill:** `context-tax-audit` - inventory one real request, then
check necessity, frequency, precision, position and cache impact.

Plain-text checklist: [`checklists/context-tax.md`](../stacks/ronny/checklists/context-tax.md)

**Install:**

```bash
mkdir -p ~/.agents/skills
cp -R ~/mcode-stack/stacks/ronny/skills/context-tax-audit ~/.agents/skills/
```
18 changes: 0 additions & 18 deletions notes/06-context-tax.md

This file was deleted.

2 changes: 1 addition & 1 deletion notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ repository holds something you can install and run for it.
| 02 | [Too many tools will eat your context: from tool search to PTC](02-tool-context.md) | `tool-budget-audit` |
| 03 | [Keeping long sessions sharp: compaction vs. memory](03-compaction-memory.md) | `long-session-check`, `handoff-doc` |
| 04 | [How long should one bash command wait: from foreground blocking to background tasks](04-bash-background.md) | `long-command-check` |
| 06 | [The hidden tax on every turn: what an agent puts into context](06-context-tax.md) *(upcoming)* | `context-tax-audit` |
| 05 | [How does the agent know the current time?](05-prefix-cache.md) | `context-tax-audit` |

All companion skills live in [`stacks/ronny/skills/`](../stacks/ronny/skills/).
2 changes: 1 addition & 1 deletion stacks/ronny/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ronny",
"displayName": "Ronny's MCode Stack",
"version": "0.2.4",
"version": "0.2.5",
"description": "Daily workflows and self-check skills from the MiniMax Code R&D lead: independent review, subagent split checks, tool and context budget audits, long sessions, long commands, harness experiments, trajectory review, plus everyday engineering practice for code review, review comments, small PRs, change descriptions and emergency changes.",
"author": {
"name": "Ronny (MiniMax Code team)"
Expand Down
7 changes: 5 additions & 2 deletions stacks/ronny/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ronny",
"version": "0.2.4",
"version": "0.2.5",
"description": "Daily workflows and self-check skills from the MiniMax Code R&D lead: independent review, subagent split checks, tool and context budget audits, long sessions, long commands, harness experiments, trajectory review, plus everyday engineering practice for code review, review comments, small PRs, change descriptions and emergency changes.",
"author": {
"name": "Ronny (MiniMax Code team)"
Expand All @@ -14,7 +14,10 @@
"longDescription": "Daily workflows and self-check skills from the MiniMax Code R&D lead: independent review, subagent split checks, tool and context budget audits, long sessions, long commands, harness experiments, trajectory review, plus everyday engineering practice for code review, review comments, small PRs, change descriptions and emergency changes.",
"developerName": "Ronny (MiniMax Code team)",
"category": "Developer Tools",
"capabilities": ["Read", "Write"],
"capabilities": [
"Read",
"Write"
],
"websiteURL": "https://github.com/MiniMax-AI/mcode-stack/tree/main/stacks/ronny",
"defaultPrompt": [
"Review this diff from a clean context against the requirement",
Expand Down
2 changes: 1 addition & 1 deletion stacks/ronny/.minimax-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"name": "ronny",
"version": "0.2.4",
"version": "0.2.5",
"displayName": "Ronny's MCode Stack",
"description": "Daily workflows and self-check skills from the MiniMax Code R&D lead: independent review, subagent split checks, tool and context budget audits, long sessions, long commands, harness experiments, trajectory review, plus everyday engineering practice for code review, review comments, small PRs, change descriptions and emergency changes.",
"author": "Ronny (MiniMax Code team)",
Expand Down
4 changes: 2 additions & 2 deletions stacks/ronny/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ shown by `mcode plugin marketplace list`, or copy single skills into
| --- | --- | --- |
| [`independent-review`](skills/independent-review/SKILL.md) | Review a diff from a clean context: only diff, requirement and test results; structured findings verified before fixing | 01 |
| [`subagent-split-check`](skills/subagent-split-check/SKILL.md) | Decide whether work goes to a subagent or stays in the main loop; merge existing subagents back step by step | 01 |
| [`harness-experiment`](skills/harness-experiment/SKILL.md) | Run a harness change as an experiment: small eval, one change, repeated runs, flipped tasks | 01, 02, 06 |
| [`harness-experiment`](skills/harness-experiment/SKILL.md) | Run a harness change as an experiment: small eval, one change, repeated runs, flipped tasks | 01, 02, 05 |
| [`tool-budget-audit`](skills/tool-budget-audit/SKILL.md) | Measure what tools cost in context and pick between trimming, tool search and programmatic tool calling | 02 |
| [`long-session-check`](skills/long-session-check/SKILL.md) | Drop, summarize or write to file; when to compact vs. start fresh; review compaction and memory design | 03 |
| [`handoff-doc`](skills/handoff-doc/SKILL.md) | Write a hand-off doc (goal, decisions, ruled out, next step) so a new session can pick up | 01, 03 |
| [`long-command-check`](skills/long-command-check/SKILL.md) | Ten-point audit of how an agent runs long shell commands and background tasks | 04 |
| [`context-tax-audit`](skills/context-tax-audit/SKILL.md) | Inventory what is injected into every request and how it affects the prompt cache | 06 |
| [`context-tax-audit`](skills/context-tax-audit/SKILL.md) | Inventory what is injected into every request and how it affects the prompt cache | 05 |
| [`trajectory-review`](skills/trajectory-review/SKILL.md) | Review how the agent got its result, not only whether it passed | - |

### Engineering practice
Expand Down
10 changes: 4 additions & 6 deletions stacks/ronny/checklists/context-tax.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Checklist: what you inject into every request

From MCode Engineering Notes 06 (upcoming). Skill version: `skills/context-tax-audit`.
From MCode Engineering Notes 05. Skill version: `skills/context-tax-audit`.

| Item | Ask yourself |
| --- | --- |
| Inventory | Can you list everything in a request besides the user message, and how many tokens each part takes? |
| Prefix awareness | Can you point to, in one request, what is the stable prefix and what changes every turn? |
| Necessity | If you delete each part, where would the model go wrong? If you cannot say, consider deleting it. |
| Frequency | Does it need to appear in every turn and every request? Could it appear only at the start, at key points, or on change? |
| Position | Is current time (or anything else that changes) in the system prompt? Move it later — e.g. time in per-turn `<agent-context>`, not `# Environment`. |
| Frequency | Does a changing field need every turn / every request? Could it appear only at the start, at key points, or on change? |
| Precision | Does time need seconds? Do numbers need every digit? The more precise, the more it changes every turn. |
| Position | Is anything that changes placed in the system prompt or tool definitions? Move it later. |
| Don't edit history | Are reminders already written into history rewritten in later turns? |
| Request-level reminders | Reminders attached only to the end of a request are paid at full price every time. Is their frequency controlled? |
| Recovery | Does removed information disappear entirely on compaction, session resume or subagents? Who brings it back? |
| Mode consistency | Can the prompt or tool set switch mid-session? |
| Measurement | Before and after a change, do you look at cache hit rate, cost per turn and quality together? Token count alone is not enough. |
2 changes: 1 addition & 1 deletion stacks/ronny/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "ronny",
"version": "0.2.4",
"version": "0.2.5",
"description": "Daily workflows and self-check skills from the MiniMax Code R&D lead: independent review, subagent split checks, tool and context budget audits, long sessions, long commands, harness experiments, trajectory review, plus everyday engineering practice for code review, review comments, small PRs, change descriptions and emergency changes.",
"author": {
"name": "Ronny (MiniMax Code team)"
Expand Down
22 changes: 11 additions & 11 deletions stacks/ronny/skills/context-tax-audit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ environment info, the skill list, tool definitions, per-turn context blocks,
reminders. Most of it is worth paying for. The audit finds what is not, and
what is placed so that it breaks the prompt cache.

Companion to MCode Engineering Notes 06 (upcoming).
Companion to MCode Engineering Notes 05 (how the agent learns the
current time — and why stuffing `date` into the system prompt breaks the
prefix cache).
Plain-text checklist: `checklists/context-tax.md`.

## 1. Inventory one real request
Expand Down Expand Up @@ -45,26 +47,24 @@ Caches match on prefix. One changed byte invalidates everything after it.

Rules of thumb:

- Stable first, volatile last. Keep the system prompt identical for the whole
session; put time and similar fields in the per-turn message.
- Stable first, volatile last. Keep `# Environment` free of current time; put
time in per-turn `<agent-context>` (or the equivalent user-message block).
- Never rewrite reminders already in history; change only future turns.
- Use only the precision you need. A timestamp to the second guarantees every
copy differs.
- Do not switch prompt or tool set mid-session unless you mean to pay for it.

copy differs once placement is already right.
- Request-only reminders never enter the cache — control how often they fire,
but do not confuse that thrift with protecting the prefix.
## 4. Run the checklist

| Item | Question |
| --- | --- |
| Inventory | Can you list every part of a request besides the user message, with its size? |
| Prefix awareness | Can you point to the stable prefix vs what changes every turn? |
| Necessity | For each part, where does the model go wrong without it? |
| Frequency | Does it need to be in every turn or request, or only at the start, at key points, or on change? |
| Position | Is anything volatile inside the system prompt or tool definitions? (e.g. time in `# Environment`) |
| Frequency | Does a changing field need every turn / request, or only at the start, key points, or on change? |
| Precision | Does it need seconds, exact counts? Higher precision means more turn-to-turn variation. |
| Position | Is anything volatile inside the system prompt or tool definitions? |
| History | Are reminders already in history ever rewritten later? |
| Request-level reminders | Is the frequency of end-of-request reminders controlled? |
| Recovery paths | If you remove something, does it vanish entirely on compaction, session resume or subagents? Who restores it? |
| Mode consistency | Can the prompt or tool set change mid-session? |
| Measurement | Before and after a change, do you look at cache hit rate, cost per turn and task quality, not just token count? |

## Output
Expand Down
2 changes: 1 addition & 1 deletion stacks/ronny/skills/harness-experiment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Run a harness change as a controlled experiment, with a small end-t
Harness engineering moves forward by experiment. The principle:
**measure first, change one thing at a time, keep what survives testing.**

Companion to MCode Engineering Notes 01, 02 and 06.
Companion to MCode Engineering Notes 01, 02 and 05.

## 1. Before changing anything

Expand Down
Loading