Agent — does the agent deliver?
Brief 33

Context Engineering Audit

Reconstruct what actually enters the model's window each step — stale payloads, token hogs, retrieval junk, and buried instructions.

CONTEXT.md4 phases8 lenses~2.7k chars

Free & open · no signup · read-only — it ends by asking · nothing leaves your machine

What it does

You are working inside this repo. Mission: reconstruct what actually enters the model's context window on a typical step — every section, every token — and find what's stale, bloated, missing, or buried.

Read-only pass. Your only write is the report file.

What it looks for

8 lenses it looks through

Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.

1

Stale payloads

old tool results and resolved errors re-sent on every subsequent step, forever

2

Token hogs

one section dominating the window; full-file dumps where excerpts would serve

3

Retrieval quality

top-k taken on faith: no relevance floor, duplicates, chunks cut mid-thought

4

History policy

unbounded transcript vs summarization vs truncation; what information each choice silently loses

5

Memory hygiene

persisted facts that are wrong, expired, or contradictory, injected as truth

6

Ordering

critical instructions buried mid-window where attention is weakest; latest-and-loudest drowning the objective

7

Duplication

the same content arriving via two paths (in the prompt AND retrieved)

8

Format waste

verbose JSON, base64 blobs, or logs where a compact rendering carries the same signal

The deliverable

What lands in your repo

One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.

CONTEXT.md
1
Window anatomy
section · tokens · source · verdict (keep/shrink/cut/move)
2
Waste ranked
with the arithmetic
3
Retrieval fixes
floors, dedupe, chunking changes
4
Target budget
the proposed window layout, section by section
5
Eval note
how to verify quality holds after each cut (see 34)
One file. Evidence-backed. It ends by asking before touching anything.
How it works

What it makes the agent do

Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.

1
Phase 1

Reconstruct the window

For the main agent loop, assemble a real example of one step's full input.

2
Phase 2

Audit through 8 lenses

Stale payloads — old tool results and resolved errors re-sent on every subsequent step, forever.

3
Phase 3

Curate

Price each waste finding.

4
Phase 4

Report

Create CONTEXT.md at repo root.

Get started

Three ways to run this Goal Prompt

01 · COPY

Paste it in

Copy it and paste it into your agent inside the repo you want checked.

02 · INSTALL

As a slash command

Install the goal plugin once — two commands — then just type /goal:context-engineering-audit.

1/plugin marketplace add GhostlyGawd/goal-prompts
2/plugin install goal@goal-prompts

Or install only this Goal Prompt as /goal-context-engineering-audit:

curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=33 sh
03 · AGENT

From an agent (MCP)

Let an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.

https://goal-prompts.vercel.app/raw/33.md
Transparency

The exact prompt

Nothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.

Read the full brief (2,663 characters)
# Goal: Context Engineering Audit

You are working inside this repo. Mission: reconstruct what actually enters the model's context window on a typical step — every section, every token — and find what's stale, bloated, missing, or buried.

Read-only pass. Your only write is the report file.

## Phase 1 — Reconstruct the window
- For the main agent loop, assemble a real example of one step's full input: system prompt, history, retrieved content, tool results, user message.
- Measure or estimate tokens per section. Draw the pie.
- Trace where each section comes from and what decides its size.

## Phase 2 — Audit through 8 lenses
1. **Stale payloads** — old tool results and resolved errors re-sent on every subsequent step, forever
2. **Token hogs** — one section dominating the window; full-file dumps where excerpts would serve
3. **Retrieval quality** — top-k taken on faith: no relevance floor, duplicates, chunks cut mid-thought
4. **History policy** — unbounded transcript vs summarization vs truncation; what information each choice silently loses
5. **Memory hygiene** — persisted facts that are wrong, expired, or contradictory, injected as truth
6. **Ordering** — critical instructions buried mid-window where attention is weakest; latest-and-loudest drowning the objective
7. **Duplication** — the same content arriving via two paths (in the prompt AND retrieved)
8. **Format waste** — verbose JSON, base64 blobs, or logs where a compact rendering carries the same signal

## Phase 3 — Curate
- Price each waste finding: tokens × calls per run × runs per day
- Flag anything whose removal risks capability — cutting context is a behavior change

## Phase 4 — Report
Create `CONTEXT.md` at repo root:
1. **Window anatomy** — section · tokens · source · verdict (keep/shrink/cut/move)
2. **Waste ranked** — with the arithmetic
3. **Retrieval fixes** — floors, dedupe, chunking changes
4. **Target budget** — the proposed window layout, section by section
5. **Eval note** — how to verify quality holds after each cut (see 34)

Start the report with today's date. If `CONTEXT.md` already exists from a previous run, read it first and lead with what changed since.

## Rules
- Every token in the window should earn its place on the current step
- Never ship a context cut without an eval or rollback plan
- No LLM context assembly in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
- If a `reports/` directory exists at the repo root, write the report there instead of the root.
- Before asking, present the top findings as a ranked list in plain words
- Report only — end by asking which changes to make

House rules for this Goal Prompt

  • Every token in the window should earn its place on the current step
  • Never ship a context cut without an eval or rollback plan
  • No LLM context assembly in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
  • If a reports/ directory exists at the repo root, write the report there instead of the root.
  • Before asking, present the top findings as a ranked list in plain words
  • Report only — end by asking which changes to make
Keep exploring

Pairs well with

Curated neighbors — briefs that answer the adjacent question, worth running in the same session.

More Agent briefs

Runs inside these playbooks — curated sequences you can launch with one paste: