360 Secure SkillHub
360 安全技能中心

agent-operating-contract-evolution

在所有者变更 agent 角色或权限时,先厘清目标与授权,再按身份文件、操作协议、记忆、技能与配置选定唯一归属做窄范围改写;通过加载范围探测、规则覆盖标记、等价新上下文中的行为评测证明改动生效,并报告路径、备份与差异。

分类:效率
wxxb789
热度 0.00
最近更新 2026-11-21 23:41:54

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add wxxb789/hoa/agent-operating-contract-evolution
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据不出本机
Metadata
name
agent-operating-contract-evolution
description
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 publishing boundaries stick across handoffs; measure prompt compression without dropping rules. Not for agent-harness-settings-parity.
metadata
{"revision":"9","areas":"software-development,work-management,self-management","targets":"runtime-agnostic","summary":"evolve an agent's identity file and operating protocol by layer, with coverage markers, behavioral evals, and load-scope probes","summary_zh":"按分层演进 agent 身份文件与操作协议:覆盖标记、行为评测、加载范围探测","kind":"entry"}

Agent 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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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