agentleFS
CherwaywayCherwayway/agent-context-patch/skills/evolve/SKILL.md

evolve

Skill2 starsChanged 5 months agoMITView on GitHub

Read task-relevant workspace rules, keep verified lessons through gated apply, record actual context use, maintain dated state, or explicitly check and safely update the installed Kit with $evolve update.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use instinct-export, instinct-import and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 4 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 4 projects that use this

  • AWSSkill

    map

    Map verified service capabilities against customer-provided control framework and threat model. Produces mapping-results.json, controls-catalog.md, and framework-mapping.md. Supports pluggable frameworks: CCMv4, NIST 800-53, CIS Benchmarks, ISO 27001, etc. Split into 4 focused sub-skills for better accuracy; this skill orchestrates them.

    Also in 5 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • launch52-aiSkill

    skill-create

    Create and validate Claude Code skills with proper structure, checklists, and validation scripts. Use when creating a new skill, auditing existing skills, or ensuring skills meet quality standards. Generates complete skill scaffolds with SKILL.md, check scripts, guides, and templates.

    Also in 3 projects that use this

  • qtzx06Skill

    eval

    Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.

    Also in 5 projects that use this

  • +1 more from TheKREATORS

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use hard facts, never the raw prompt, to select bodies:

    line 18
  2. Very specific:

    After verification, write only for a high-signal event: failed_verification_later_passed, explicit_user_correction, independent_qa_defect, …

    line 47
  3. Very specific:

    After a task that read bodies, record only ids that influenced planning, execution, or verification.

    line 82
  4. Distinctive:

    Use a short dated report for reviewed-and-retained decisions, not a new rule.

    line 119
  5. Distinctive:

    Never edit the managed catalog by hand or change instruction text outside it on evolve's behalf.

    line 142
  6. Very specific:

    Read that reference for init, explicit migrate-v1 and weekly details.

    line 155

“Common” is measured: kept by at least 6 in 10 of the 39 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Evolve

Kit 0.9.0, Workspace Schema 2. Read references/protocol-v2.md for normative formats and runtime/README.md for the API. Fix and verify the current task before evolving long-term context.

Read before acting

The acp-catalog block in AGENTS.md lists one hook per active rule and dated STATE. CLAUDE.md imports that same instruction file. Read matching bodies before the first edit and again when the task changes stage or scope.

Use hard facts, never the raw prompt, to select bodies:

node <skill>/runtime/cli.mjs select --stage edit --signature '{"repos":["ilands"],"paths":["ilands/migrations/481.sql"],"ops":["migration"],"skills":["cloud-sql"]}'

Skills must include the actual repo, relevant paths, and current operation in their signature; pass --stage <edit|verify|pr|deploy|analysis|eval> to keep selection focused on the active lifecycle phase instead of loading unrelated stages at once. Cross-repo work names both repos. A known repo prefix in a workspace-relative path can resolve scope; an arbitrary src/ prefix cannot. Missing repo scope is reported as repo-required, without loading other repos' bodies. Explicit ids include exactly those rules plus matching/global gates; unknown ids fail. Within the same kind and score, exact paths and skills matches outrank generic ops matches. Beyond the repo filter, any matching path, op, or skill still matches; this version does not change the scope model to AND.

Global gates come first. Selection is complete only when complete: true: INCOMPLETE / exit 1 means some matching bodies remain unread or require repo scope. Repeat with the same signature and --cursor <token> until complete; keep all pages. A changed source invalidates the cursor. An oversized rule returns rule_exceeds_budget: read its file directly or restart with a larger explicit --bytes budget. --json is a routing manifest and omits bodies; it is not a substitute for reading them. Never treat an omitted gate as satisfied. An unscoped advice is served by its hook; unscoped gates require their bodies.

Verified lesson checkpoint

After verification, write only for a high-signal event: failed_verification_later_passed, explicit_user_correction, independent_qa_defect, stale_context, first_fix_failed_then_passed. Otherwise stay silent: no proposal, no receipt. Author one JSON proposal and call apply once; proposals are audit records, not an inbox.

  • Envelope: unique id, supported trigger, fix_status: verified, and an evidence pointer. Optional observed / root_cause are at most 800 bytes. Map failed verification to verification_failure, explicit correction to user_correction; other triggers retain their names.
  • Rule: id, one-line situation + action hook (160 bytes), kind (gate, advice, fact), applies_to: {repos,paths,ops,skills}, short body (1500 bytes) with why, action, and a relative evidence pointer.
  • Operations: add, supersede with replaces, graduate with verified workspace-relative graduated_to (test/CI gate/linter/skill file) and reason, retire with reason, state_set, state_clear, profile with exact current before_hash. Keep one failure mechanism per rule; do not pack orthogonal lessons into an overcompressed rule.
  • similar_rule_exists: supersede the existing rule only when it shares the same mechanism; do not merge unrelated rules to save space. catalog_budget_exceeded: graduate rules already enforced in code/skills or retire obsolete rules before adding. --approved bypasses only similarity and catalog limits and satisfies write_policy: propose, only when a human has made that decision.
node <skill>/runtime/cli.mjs apply --proposal @proposal.json

Privacy, schema, per-rule size, fix verification, and profile hash gates cannot be bypassed. No raw conversation, secrets, logs, customer data, or absolute user paths in durable context. Never reuse an active or archived rule id.

Record actual use

After a task that read bodies, record only ids that influenced planning, execution, or verification. missed means relevant but found too late.

node <skill>/runtime/cli.mjs consult --consulted a,b [--missed c]

Print the returned Context use: line. Counters are cumulative self-reports, not proof of improved outcomes. For a high-value local observation, optionally add --task-ref <safe-kebab-id> --action <category>. Categories: prevented_error, changed_plan, added_verification, avoided_work, confirmed_path, flagged_stale. flagged_stale marks a current rule whose referenced code or table appears outdated so weekly maintenance can verify and graduate/supersede/retire it. This stores a bounded report with the rule-text hash, safe reference and category; no prompt or telemetry. Ordinary tasks need no extra fields. Do not infer a causal benefit from these observations alone.

State and maintenance

STATE describes temporary work, each entry expires (default 14, maximum 90 days) and has one line of at most 240 bytes. Expired entries disappear from the catalog; successful apply or expire archives them exactly once. Renew only after checking fresh evidence. PROFILE contains verified stable facts, not rules or a task-progress log. Host memory helps locate evidence; current rules, source and runtime determine current facts.

node <skill>/runtime/cli.mjs status
node <skill>/runtime/cli.mjs expire
node <skill>/runtime/cli.mjs weekly
node <skill>/runtime/cli.mjs catalog --write

Status compares stored/fresh catalog content, excluding render time; weekly shows recent growth, pending expiry, audit consistency and predecessor use. Investigate missed rules through routing, budget, scope and hook clarity before rewriting. Similarity and age are review candidates, not automatic retirement. Use a short dated report for reviewed-and-retained decisions, not a new rule. Daily maintenance expires/checks context; a weekly pass reviews semantics. An unchanged run stays quiet. Scheduling belongs to the host; the kit has no daemon.

Normal Schema 2 mutations and CLI reads share .agent-context/.lock, acquire it before reading and report contention; retry serially. Never remove another writer's lock. Hand edits must be quiescent, followed by catalog --write. Handled write failures roll back all changed files, including audit/catalog. rollback_failed retains the lock and reports failed paths: inspect/restore from known evidence before removing it. Process termination or power loss is not a crash-atomic multi-file transaction; a leftover lock requires inspection.

Commands and receipts

<skill> is the one installed entity, normally ~/.agents/skills/evolve; Claude reaches the same entity through its skill symlink. All workspace commands accept --workspace <dir> and --today YYYY-MM-DD. Default discovery is the nearest ancestor with .agent-context/config.yml, or ACP_WORKSPACE. Exit 0: ok/applied; 1: incomplete/blocked/failed/approval_required/invalid; 2: usage error. receipt formats blocked/no-candidate stages when needed.

Print only the runtime's Evolution outcome: or Context use: receipt, never lesson prose, proposal JSON or a diff. No-candidate normal tasks stay silent. Never edit the managed catalog by hand or change instruction text outside it on evolve's behalf. AGENTS.md is the shared literal source; CLAUDE.md is only an import. One shared skill entity, no divergent copies.

Explicit update, init, migration, memory bridge

For $evolve update, read references/maintenance-and-update.md first. Resolve https://github.com/Cherwayway/agent-context-patch/releases/latest to an immutable Release, verify integrity, produce the exact candidate Bootstrap UpdatePlan, and obtain approval of that exact plan hash before replacement. A Kit update does not authorize workspace edits or schema migration. New tasks load the new skill. No background version check, silent install, or telemetry.

Read that reference for init, explicit migrate-v1 and weekly details. The Claude-specific memory-sync --memory-dir <dir> [--dry-run] bridge changes a separate memory index only when explicitly requested; it is not a generic Codex/host-memory adapter. Do not run it as part of routine maintenance.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.