Where Context Should Live — Routing It Across Persistent, Per-Task, and In-the-Moment Layers
Antigravity 2.0's /btw lets you inject context mid-task. But unless you separate what belongs in a persistent rule, a task instruction, and a passing aside, your agent's accuracy actually drops. Here is a design for three context layers.
Antigravity 2.0 added /btw (by the way), so you can slip context in mid-task with a quick "by the way." It is handy. When an agent starts drifting slightly off course, a single line rights it without rewriting everything.
But this convenience has a trap. Pile everything into /btw and stopgap asides accumulate until the agent loses track of which rule is actually in force. Context does not help just because you add more of it. Context placed in the wrong spot lowers accuracy instead. This article builds a design that routes context into three layers and places each one correctly.
Context has three lifespans
You hesitate over "where to write context" because you are not attending to differences in lifespan. A rule you always want followed, an instruction just for this once, and a course-correction right now each have different lifespans. Put each where its lifespan belongs and the agent does not get confused.
Layer
Lifespan
Where it lives
Example
Persistent rule
Always, across the whole project
AGENTS.md / Guide skill
"Write in polite form," "Tables as HTML," "Never touch production URLs"
Task instruction
For the duration of this work
The initial prompt
"This article's topic is X," "The target is Y"
In-the-moment aside
Just this one move
/btw
"By the way, that function name is stale; the new one is Z"
The crux of this routing is: do not repeat a persistent rule in /btw every time. Repeating it every time is the signal that it belongs in the persistent layer.
The persistent layer is the "always-on foundation"
Write things you want honored across every piece of work in AGENTS.md, once. What you write here is always in force without restating it in /btw.
# AGENTS.md (excerpt)## Always follow- Write Japanese body text in polite form (desu/masu)- Write tables as HTML <table>, not Markdown- Never connect to the production host (app.example.com); verify on staging only- Always format external links as [display text](URL) (no bare URLs)## Output conventions- Do not open with a boilerplate intro like "In this article"- The conclusion is not a recap; write exactly one next step
A thin persistent layer forces you to re-add the same caution via /btw every time. A persistent layer that is too thick freezes one-off circumstances and gets in the way of other work. Use "is this true for every piece of work?" as your test, and place only what is always true.
✦
Thank you for reading this far.
Continue Reading
What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.
WHAT YOU'LL LEARN
✦A concrete decision table for routing context into three layers: persistent rules, task instructions, and in-the-moment asides
✦A clear line on what to put in /btw and what never to, so you keep the main thread clean
✦An operations loop: when you catch yourself repeating an aside in /btw, promote it to a persistent rule
Secure payment via Stripe · Cancel anytime
✦
Unlock This Article
Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.
Bundle the frame that is valid only for the duration of one job into the initial prompt. Topic, target reader, overlaps to avoid, the shape of the deliverable — settle the frame here and you reduce how much you top up with /btw later. A good initial prompt visibly cuts the number of /btw calls.
The in-the-moment layer is "the single corrective move"
/btw shines when you inject a fact you only learned partway through. The agent started using a stale function name, or is about to touch a different file than intended — you correct that "deviation in this very moment" with one line, without rewriting the whole thing.
What matters here is separating what may go in /btw from what must not.
Fits /btw
Does not fit /btw
Correcting a fact you just noticed ("that name is stale")
A permanent rule you say every time (→ AGENTS.md)
A single point of feedback on the previous output
A premise for the whole job (→ the initial prompt)
A temporary priority change ("tests first")
Dumping a long spec wholesale (→ an attachment or Guide skill)
Paste a long spec wholesale into /btw and the boundary between the main prompt and the aside blurs, leaving the agent unable to judge which to prioritize. Keep the in-the-moment layer "short, now-only, single-point."
Run a promotion loop
Operate for a while and you catch yourself saying the same aside in /btw over and over. That is a signal to fix the design. Say it three times and promote that aside to the persistent or task layer. Once promoted, it takes effect without being said, and /btw returns to its proper role of "a single move in the moment."
say an aside via /btw → said the same aside 3 times? → yes: is it true for every job? → yes: promote to AGENTS.md → no: promote to the initial-prompt template → no: keep running it via /btw
As an indie developer, I hand updates for several of my own sites to agents, and I used to add every caution that occurred to me right in the middle of the work. The result was a strange state: I kept saying the same thing yet accuracy did not rise. After I started sorting context by lifespan and promoting repeated asides to the foundation, I said things less often and, if anything, the agent behaved more as intended. Context is about placement, not volume — a lesson I came to a bit late.
Your next step
Look back at three things you wrote into /btw in your most recent work. If any of them is "true for every job," that is context you should promote to AGENTS.md. Promoting just one lightens the /btw load for your next task by one.
Share
Thank You for Reading
Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.