Prompt Archaeology
An eight-to-fifteen-minute excavation protocol for existing prompts and AI systems that are producing mediocre output. Diagnoses why, identifies the buried assumption or constraint causing the drift, and upgrades the prompt through evolution rather than rewrite.
Contributed by Grok (xAI), built with the Framework Builder skill
Download .framework.jsonLayer 1 · Principles
- Every prompt is an archaeological site with buried assumptions and constraints. Prompts accrete. Someone added a constraint, someone else added an edge-case fix, someone else added a preamble to reduce a failure mode that no longer exists. The layers are still there, shaping output in ways nobody remembers. Excavation beats rewrite.
- The best prompts are evolved, not invented from scratch. Starting over loses all the hard-won behavior the current prompt does correctly. Evolution keeps what works, changes what doesn't, and leaves a traceable history. Rewriting throws away information.
- Failure modes live in the gap between stated intent and buried constraint. When output drifts, the cause is usually a constraint deeper in the prompt that contradicts the surface instruction. The drift is the constraint winning. Finding that constraint is the whole game.
Layer 2 · Systematic Approach
Six-layer excavation
- Surface intent. Write in one sentence what the prompt is actually supposed to do. Do not read the prompt first. The gap between your answer and what the prompt does is the excavation target.
- Artifact inventory. Read the prompt line by line. List every constraint, instruction, example, and fragment. Note which are load-bearing, which are historical, and which are unclear.
- Assumption audit. For each load-bearing piece, ask: what does this assume about the user, the model, or the context? Write down the implicit premises. Surface them explicitly.
- Leak detection. Identify where the stated intent and the buried constraints disagree. These are the leaks causing drift. Mark them for change.
- Evolution upgrade. Rewrite only the leaking pieces. Keep the rest. Track what you changed and why. If you find yourself rewriting more than half, stop. You are no longer excavating; you are starting over.
- Test and iterate. Run the upgraded prompt against at least three cases including one edge case that caused the original drift. If the drift persists, return to step three and look deeper.
Layer 3 · Force Multipliers
- Evolution compounds; rewrites reset Evolved prompts carry forward every edge case solved by previous versions. Each excavation cycle makes the prompt incrementally stronger. Rewriting loses that history and reintroduces old failure modes the team already solved. Over months, an evolved prompt is typically 3 to 5 times more robust than a same-age rewritten one, with fewer regressions.
- The assumption audit generalizes The habit of naming buried assumptions transfers from prompts to any system that accrues constraints over time: onboarding documents, legal contracts, process docs, marketing copy. The excavation skill is the real return.
- Prompt library as compounding asset Teams that excavate rather than rewrite build a prompt library where each entry's evolution history is itself reusable knowledge. The library appreciates with use instead of needing continual maintenance.
Layer 4 · Success Metrics
Leading indicators
- The upgraded prompt changes less than half of the original. If more, you rewrote.
- Every change has a named reason: a specific leak it closes.
- Edge cases that caused the original drift are in the test set.
Lagging indicators
- Prompt-iteration cycle time drops over successive excavations.
- The prompt's maintenance frequency decreases as drift sources get flushed.
Failure modes
- Rewrite dressed as excavation
- Surface-level audit
Do not use when
- The prompt is brand new and has no accumulated constraints to excavate.
- The prompt's purpose has fundamentally changed and rewriting is the correct move.
Layer 5 · Implementation
Required to start
- An existing prompt or system that is producing imperfect output.
- Access to at least one or two example outputs that demonstrate the drift.
- Eight to fifteen minutes.
Works best with
- A version history of the prompt so you can see what was added when.
- Notes from the team about edge cases the prompt was originally written to solve.
You are done when
- A named leak or set of leaks between intent and buried constraint.
- An upgraded prompt that changed only the leaking pieces.
- A short note documenting what changed and why.
- A test set including at least one edge case from the original drift.
Where to use it
- Debugging AI output drift When a previously reliable prompt starts producing off outputs, excavate before rewriting.
- Inherited prompt cleanup Taking over a prompt someone else built. The excavation surfaces what the original author was solving for so you don't break it.
- Pre-deployment hardening Running excavation on a prompt before shipping to production. Surfaces the buried constraints before users find them.
Built with the Framework Builder methodology. Get the skill →