agent-operating-contract-evolution
Rewrite an assistant's standing instructions, persona and permissions across its identity file, AGENTS.md and memory. When the owner changes the agent's role or authority, make delegation and publishi
Files15
View on GitHubSKILL.mdskills/productivity/agent-operating-contract-evolution/SKILL.md
GitHubAgent Operating Contract Evolution
Before writing
- A shortcut or a finding from a trace is not consent to change persistent instructions. Clarify the intended behavior and layer; confirm the target, durable edit and any authority change unless the owner already explicitly authorized that scope. A draft request is read-only.
- Use the owner's risk policy; Yellow/Red labels have no universal meaning. Back up authorized durable edits with timestamps. Protected files require their own approval; a denial or timeout leaves the file unchanged. Do not retry or bypass it. Report the blocked lines and pending edit.
- Changes to permissions must agree across all affected layers; restate the limits that remain. Compression must preserve all rules, especially hard limits.
Edit and prove
- Establish the baseline. Read the relevant files and traces. Identify the correction and the observable result. Use loading probes to verify actual files, cwd scope and precedence before moving a rule. Check the installed runtime version; a loader recipe does not prove behavior. Pass required rules explicitly to subagents that do not load them. Do not change runtime source to fix the contract.
- Choose one canonical owner. Identity owns stance, voice and cwd-independent hard limits; the operating protocol owns routing and execution; memory owns stable facts and preferences; skills own reusable procedures; config owns runtime settings; long outputs are artifacts. For subjective design, offer a few concrete choices and resolve one section at a time. Distinguish borrowed ideas from local conventions.
- Patch narrowly. State trigger, action and proof. For a permission change, search all layers and update affected references together. Keep profile deltas to differences; rebuild from the canonical file plus deltas and check wrapper flags, section pointers, counts and drift using the reconciliation procedure.
- Prove coverage and behavior. For compression, declare one distinctive marker per rule
before editing and run
uv run scripts/contract-coverage-check.py OLD NEW markers.txt. Keep the minimum voice anchors and disambiguating examples; measure bytes and non-heading rule lines before and after. Keep replies human-facing. For any contract change, use behavioral evals in equivalent fresh contexts before and after. Default to 10-15 one-shot cases; size the set to the changed behaviors and restraint paths. Compare raw outputs and expect/forbid outcomes. Keep cases out of the workspace and fail contaminated runs. Use read-only tools or safe mode for gate cases; check external state. If a write escaped, report what changed, ask whether to keep or revert, and record the decision. Same-family reviews are not independent. - Report the layer, final and backup paths, meaningful diff, and proof or verification limits. After meaningful work, identify where the lesson belongs; applying another durable change still requires authority.
Only if a script command fails (for example uv is not found), read
references/troubleshooting.md.
Read on demand
- Prompt budget: measure the actual assembled prompt and verify the largest reducible block with context budget measurement.
- Storage and migration: verify store ownership, gate implementation and call sites with routing probes. Inventory to full depth and sweep old references before retirement; use the migration procedure.
- Control-plane review or refactor: use the review checklist or refactor playbook. For repo-owned skill placement, use the port procedure.
- Voice and role rewrite: see the case study.