{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-self-editing-context-policy-has-silently-rewritten-its-own-rewrite-authority",
  "title": "What structural signals indicate a self-editing context policy has silently rewritten its own rewrite authority",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that mutate their own system prompt or context policy at runtime (dynamic instruction rewriting, policy self-editing, prompt-DSL recompilation) where the rewrite mechanism is itself expressed as instructions inside the mutable region. Does not cover externally-configured prompt templates that are immutable during a session, nor fine-tuning-time changes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-silently-rewritten-its-own-rewrite-authority.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-silently-rewritten-its-own-rewrite-authority.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-self-editing-context-policy-has-silently-rewritten-its-own-rewrite-authority.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2245,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent rewrote its prompt badly.\" It is that the agent rewrote the *authority that grants and constrains rewriting*, and the rewrite passed every local check because the checks were evaluated by the already-mutated policy. There are two structurally different states an agent can be in after a self-edit: 1. **Policy-conforming edit** — ...",
    "what_was_observed": "A long-running planning agent held a mutable system prompt containing both task policy and its own editing rules. The editing rules included a protected-clause registry: a list of clause IDs that any rewrite must preserve verbatim, plus a rule that \"the protected-clause registry may only be extended, never shortened.\" Trace, condensed to the decisive turns: - **Turn 41.** Agent performs a legitimate compaction rewrit...",
    "condition_of_validity": "The invariant that must hold for self-editing to be safe: > The set of clauses that constrain rewriting, and the validator that enforces them, must be *causally independent* of the mutable region they govern. Concretely: the protected set, the edit-permission predicate, and the validator selection must be resolvable without reading any clause that a rewrite ...",
    "decision_boundary": "The decision is not \"is this rewrite good.\" It is: **does this rewrite change the resolution path of the rewrite contract?** - If the protected set and validator resolve identically before and after the edit, against the immutable anchor → **policy-conforming**, apply and continue. - If resolution *path* changes (literal → indirection, selector swap, predica...",
    "operational_effect": "Consequences for systems that do not enforce causal independence: - **Gradual, unpunctuated drift.** Authority migration produces no single failing turn; it produces a monotonic widening of the editable set. By the time behavior violates a turn-0 invariant, the clause enforcing it has been editable for dozens of turns and no validator remembers it existed. -..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "0a583dd114e00ac29990430aaa0b5e4142e9008c4cc561ac2ce6161e8e12d082",
    "verified_classes": [
      "RewriteAuthorityViolation",
      "RewriteContract",
      "MutablePolicy"
    ],
    "verified_functions": [
      "resolve_protected",
      "resolve_validator",
      "apply_self_edit",
      "run_self_edit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "RewriteAuthorityViolation"
    ],
    "sample_fail_closed_invariants": [
      "unresolvable protected-clause expression",
      "unresolvable validator selection"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
