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
27 changes: 6 additions & 21 deletions .agent/TOKEN-DISCIPLINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,10 @@ This document captures the token-discipline rules referenced from `AGENTS.md`. T

## Token / Context Budget (multi-agent supplement)

The marker-managed `multiagent-safety` section in `AGENTS.md` ("Token / context budget" subsection) adds the following rules when multiple agents are active; reproduced here for discoverability. The canonical copy lives inside the markers in `AGENTS.md`.

Default: less word, same proof.

- For prompts about `token inefficiency`, `reviewer mode`, `minimal token overhead`, or session waste patterns, switch into low-overhead mode.
- Plan in at most 4 bullets.
- Execute by phase.
- Batch related reads and commands.
- Avoid duplicate reads and interactive loops.
- Keep outputs compact.
- Verify once per phase.
- Low output alone is not a defect. A bounded run that finishes in roughly <=10 steps is usually fine.
- Low output spread across 20+ steps with rising per-turn input is fragmentation and should be treated as context growth first.
- Startup / resume summaries stay tiny: `branch`, `task`, `blocker`, `next`, and `evidence`.
- Front-load scaffold/path discovery into one grouped inspection pass. Avoid serial `ls` / `find` / `rg` / `cat` retries that rediscover the same path state.
- Treat repeated `write_stdin`, repeated `sed` / `cat` peeks, and tiny diagnostic follow-up checks as strong negative signals.
- If a session turns fragmented, collapse back to inspect once, patch once, verify once, and summarize once.
- Tool / hook summaries stay tiny: command, status, last meaningful lines only. Drop routine hook boilerplate.
- Keep raw terminal interaction out of long-lived context. For `write_stdin` or interactive babysitting, retain only process, action sent, current result, and next action.
- Keep execution log separate from reasoning context: full commands/stdout belong in logs, while prompt context keeps only the latest 1-2 checkpoints plus the newest tool-result summary.
Core token/context-budget rules live in the always-loaded `### Token / context budget` subsection of the `multiagent-safety` block in `AGENTS.md`. Extra operational heuristics, not repeated there:

- Switch to low-overhead mode on prompts about token inefficiency, reviewer mode, minimal overhead, or session waste.
- Front-load scaffold/path discovery into one grouped inspection pass; avoid serial `ls` / `find` / `rg` / `cat` retries.
- Treat repeated `write_stdin`, `sed` / `cat` peeks, and tiny diagnostic follow-ups as strong negative signals.
- Treat local edit/commit, remote publish/PR, CI diagnosis, and cleanup as bounded phases.
- Do not spend fresh narration or approval turns on obvious safe follow-ons inside an already authorized phase unless the risk changes.
- Do not spend fresh narration or approval turns on obvious safe follow-ons inside an already authorized phase.
Loading