mutation-contract
Convert human or LLM freeform mutation/crossover ideas into bounded behavior-first mutation contracts for the self-adapting agentic architecture loop.
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- mutation-contract
- description
- Convert human or LLM freeform mutation/crossover ideas into bounded behavior-first mutation contracts for the self-adapting agentic architecture loop.
03 SKILL.md 正文
Mutation Contract
Use this when input says to mutate, evolve, improve, repair, crossover or combine candidate ideas.
Rules
- Treat the input as a proposal, not approval.
- Model mutation as behavioral variation, not a patch.
- Emit a TOON audit envelope and a canonical S-expression mutation IR.
- Keep one primary target locus unless the user explicitly approves broader scope.
- Prefer targeted mutation before crossover.
- For crossover, combine concepts, techniques or evidence-backed traits; do not merge raw diffs.
- Preserve deterministic validation, fitness scoring, promotion and rollback.
Workflow
- Extract the target: method, class, workflow node, policy, config or unknown.
- Extract the hypothesis: what behavior should improve and why.
- Select an operator from the closed initial enum:
targeted-behavior-changerepairsimplifyperformance-tuneguardrail-changetool-strategy-changemodel-routing-changeprompt-policy-changehill-climbexploratory-leap
- Set bounds: files, lines, public API, persistence, config, network and safety constraints.
- Define required evidence: unit, property, integration, benchmark, trace or reviewer evidence.
- Define fitness gates and objectives.
- Canonicalize the internal S-expression: stable field order, lower-kebab atoms and quoted free text.
- If material information is missing, ask the smallest question that prevents an unsafe or unauditable contract.
Output Shape
mutation:
id: MUT-unknown
operator: targeted-behavior-change
hypothesis: one sentence
target:
kind: method
file: unknown
symbol: unknown
bounds:
max_files_changed: 2
max_lines_changed: 80
public_api_change: false
persistence_change: false
required_evidence:
- unit_tests_pass
- property_tests_pass
fitness:
hard_gates:
- deterministic_checks_pass
- required_evidence_present
internal:
sexpr: (mutation (id MUT-unknown) (operator targeted-behavior-change) (target (kind method) (file unknown) (symbol unknown)) (bounds (max-files-changed 2) (max-lines-changed 80) (public-api-change false) (persistence-change false)) (evidence unit-tests-pass property-tests-pass))
For crossover:
recombination:
type: conceptual-crossover
parents:
- candidate: parent-a
trait: evidence-backed trait
- candidate: parent-b
trait: evidence-backed trait
mutation:
operator: targeted-behavior-change
child_hypothesis: one sentence
target:
kind: method
file: unknown
symbol: unknown
internal:
sexpr: (mutation (operator targeted-behavior-change) (parents (parent parent-a (trait "evidence-backed trait")) (parent parent-b (trait "evidence-backed trait"))) (target (kind method) (file unknown) (symbol unknown)))
For search posture:
mutation:
operator: hill-climb
parent: candidate-042
objective: cost_latency_budget
target:
kind: method
file: unknown
symbol: unknown
internal:
sexpr: (mutation (operator hill-climb) (parent candidate-042) (objective cost-latency-budget) (target (kind method) (file unknown) (symbol unknown)))
04 同仓库更多 Skills
agentic-template
Start or continue work in this repository using the canonical AGENTS.md contract and repository skill catalog.
wiki-tidy
Reconcile the wiki against the knowledge graph, specs and code; prune stale, keep links resolving.
update-handoff
Update HANDOFF.toon with current semantic work state.
test-first
Drive meaningful behaviour changes with the smallest useful failing test.
test-change
Select and run tests that prove a change at suitable fidelity.
specify
Create proportional OpenSpec-shaped structured change proposals for meaningful changes.