Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xxyoudeadpunkxx/shaping-frame-for-claude/llms.txt

Use this file to discover all available pages before exploring further.

The pre-write gate is a special case of the cognitive checkpoint that fires before Claude persists structural artifacts — modifying files, creating specs, fixing rules, writing reusable documents. It is not the center of the skill: the checkpoint operates throughout the session, tracking epistemic weight every turn regardless of whether any file is ever written. But the pre-write gate is the hardest stop in the system, because persisting a structural artifact commits the session’s assumptions to something that outlasts the conversation. Unvetted material that enters a spec, a ruleset, or a reusable document does not just influence the current turn — it becomes the foundation for future work.

Gate Format

When the gate fires, Claude emits the following block before producing any output:
Target:
Crystallized:
In motion (Tracked / Candidate):
Quarantined / Needs verification:
Decision needed:
Target — the specific artifact about to be written: a filename, spec name, rule, or document type. One line. Crystallized — elements that have been explicitly approved by OP and are safe to write. These are the only elements that can enter the artifact without surfacing. In motion (Tracked / Candidate) — elements that are gaining weight but have not yet been approved. These must be surfaced before the artifact is written if they would appear in it. Quarantined / Needs verification — elements that carry a flag preventing them from entering structural output. Quarantined material has potential but has not been vetted. Needs verification material makes factual claims that have not been confirmed by DSK, web, or tool. Decision needed — a plain statement of what OP must decide before the gate can clear. If all elements are crystallized, this field is empty and the write proceeds.

Three Outcomes

All crystallized → write

Every element that would appear in the artifact has been approved by OP. The gate clears and Claude writes. No further input from OP is required.

Mixed but non-structural → compact dossier

Some elements are still in motion, but they are not structural — they are not grounding architecture, rules, naming, or spec-level decisions. Claude proceeds and produces a compact dossier: the artifact is written with the in-motion material flagged inline so it is visible in the output. OP can review and decide without blocking the session.

AI/MP/EXT unvetted in architecture/rules/spec → stop and surface

Unvetted AI proposals, model priors, or external material are present in elements that would ground architecture, rules, naming, or spec-level decisions. Claude does not write. The gate surfaces the specific elements that require a decision before the session can proceed to output.

Additional Stopping Conditions

Two additional conditions trigger a stop regardless of whether the three-outcome check would otherwise clear:
  • Unverified technical facts grounding decisions — if a factual or technical claim carries a Needs verification flag and would be written into the artifact as a grounding assumption, the gate stops. The claim must be verified by DSK, web, or tool before it can enter the artifact.
  • Conversational residue in reusable output — if the material to be written contains phrases that reference past sessions, prior states, or embedded model-prior assumptions, the gate stops and flags the material for decontamination before writing proceeds.

Filled-In Example

A session is about to write a database migration spec. The schema version and the migration tool have been approved by OP. The connection pool size is an AI proposal that has been referenced twice without explicit approval. The rollback timeout is drawn from a model prior and carries a Quarantined flag.
Target: db-migration-v2.spec.md
Crystallized: schema version (v2), migration tool (Flyway)
In motion (Tracked / Candidate): connection pool size (AI, Tracked — referenced twice, not approved)
Quarantined / Needs verification: rollback timeout 60s (MP, Quarantined — model prior, not verified against infrastructure constraints)
Decision needed:
  1. Confirm or reject connection pool size = 10 before it enters the spec
  2. Verify rollback timeout against infrastructure limits or declare it an explicit assumption
OP responds to both items. Once the decisions are recorded, the gate re-evaluates and either clears or fires again at the corrected level.
The pre-write gate fires before persisting, not before every response. Claude produces content — analysis, proposals, comparisons, drafts — throughout the session without the gate firing. The gate is a final check before the session’s working assumptions are committed to output that will outlast the conversation. The checkpoint that operates every turn is the cognitive checkpoint; the pre-write gate is one specific case of it.

Build docs developers (and LLMs) love