agentleFS
HesstasticHesstastic/fable-agent-orchestration/skills/instruction-drift-control/SKILL.md

instruction-drift-control

Skill0 starsChanged 5 months agoApache-2.0View on GitHub

Keep agent instruction files, project runbooks, and learned-fix notes single-sourced, current, and verifiable. Use when a project has AGENTS.md, CLAUDE.md, CODEX.md, README sections, skills, or fix logs that can drift apart.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when agent instructions are becoming a second, stale codebase.

    line 8
  2. Distinctive:

    Use the middle path:

    line 35
  3. Distinctive:

    Do not copy the same rule into multiple files unless a sync contract pins the duplication.

    line 59
  4. Distinctive:

    Add a small section naming file pairs that must move together:

    line 89
  5. Distinctive:

    Prefer generated discovery over hand-kept inventories.

    line 99
  6. Distinctive:

    Before a long-running agent loop starts, write:

    line 103
  7. Distinctive:

    when a human or coordinator must be pulled in.

    line 109
  8. Distinctive:

    When mining agent sessions, strip labels, private context, raw logs, secrets, and organization-specific details.

    line 120
  9. Distinctive:

    Before accepting an instruction update:

    line 126
  10. Very specific:

    every fix-log entry has Problem, Cause, Fix, and Re-check.

    line 130
  11. Distinctive:

    every drift-prone pair has a keep-in-sync line.

    line 131
  12. Distinctive:

    no secret, private path, raw transcript, or personal config is included.

    line 132
  13. Distinctive:

    No code, scripts, installer, hooks, or raw project content from that repository are vendored here.

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “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

Instruction Drift Control

Use this when agent instructions are becoming a second, stale codebase.

The goal is not more documentation. The goal is one reliable instruction surface plus small, searchable lessons that stay tied to real evidence.

Apply When

  • A repo has multiple instruction files such as AGENTS.md, CLAUDE.md, CODEX.md, .cursor/rules, skills, or README sections.
  • An agent is likely to read one file while another file contains newer rules.
  • A hard-won bug fix or workflow lesson keeps being rediscovered.
  • A long-running agent engagement needs durable state across context resets.
  • You are importing an external workflow or agent standard into a local repo.

Do Not Use When

  • The repo has one small, stable instruction file and no observed drift.
  • The task is a one-off edit with no reusable lesson.
  • The proposed entry cannot cite a real file, PR, issue, test, log, or failure.

Core Rule

Instruction drift has two common failure modes:

  • duplicate instructions in several files that slowly disagree;
  • one large instruction file that becomes too bloated to read and maintain.

Use the middle path:

  • one canonical instruction surface for current operating rules;
  • thin pointers or adapter files for tool-specific entry points;
  • separate fix-log entries for specific past bugs, gotchas, and workflow lessons;
  • explicit sync contracts for files that must change together.

Procedure

  1. Find the instruction surfaces. List files and folders that can steer an agent:

    AGENTS.md / CLAUDE.md / CODEX.md / README / skills/ / .cursor/
    project runbooks / CI workflow comments / docs/solutions/
  2. Choose the canonical surface. Pick one file as the main operating guide. Other agent-specific files should be either:

    • a pointer to the canonical file; or
    • a thin adapter that contains only tool-specific mechanics.

    Do not copy the same rule into multiple files unless a sync contract pins the duplication.

  3. Split lessons from standing rules. Standing rules belong in the canonical surface.

    Specific incidents belong in a fix log, one entry per file:

    ---
    module: <area>
    tags: [<search terms>]
    problem_type: bug | gotcha | pattern | workflow
    date: YYYY-MM-DD
    ---
    
    ## Problem
    What went wrong.
    
    ## Cause
    Why it happened.
    
    ## Fix
    What to do next time.
    
    ## Re-check
    Command or artifact that verifies the lesson still applies.
  4. Add keep-in-sync contracts. Add a small section naming file pairs that must move together:

    ## Keep in sync
    
    - Add an env var -> update `.env.example` and the config docs.
    - Change a CLI flag -> update the README command example.
    - Change a public skill id -> update `catalog.json` and README.

    Prefer generated discovery over hand-kept inventories. If a list must be maintained by hand, give it a sync contract or a test.

  5. Define the autonomous-loop contract. Before a long-running agent loop starts, write:

    • what it may touch;
    • how long or how much budget it may spend;
    • what counts as proof;
    • what it must record;
    • when a human or coordinator must be pulled in.
  6. Audit verifier decay. A check that once proved the right thing can become stale. Periodically ask:

    • does the check still exercise the real path?
    • would the old broken behavior still fail?
    • has the surrounding code moved away from the check?
    • is the proof now only a screenshot, summary, or stale log?
  7. Keep session lessons public-clean. When mining agent sessions, strip labels, private context, raw logs, secrets, and organization-specific details. Keep only the reusable procedure and the evidence anchor.

Gates

Before accepting an instruction update:

  • one canonical surface is clear;
  • duplicated rules are removed or explicitly synced;
  • every fix-log entry has Problem, Cause, Fix, and Re-check;
  • every drift-prone pair has a keep-in-sync line;
  • no secret, private path, raw transcript, or personal config is included;
  • a zero-context agent can follow the instruction without guessing.

Output

Return:

  • canonical instruction surface chosen;
  • files converted to pointers or thin adapters;
  • fix-log entries added or updated;
  • keep-in-sync contracts added;
  • verification commands or artifacts checked;
  • residual drift risks.

Attribution

This skill is an adapted, public-clean synthesis inspired by anmoln7/agent-standard-oss, MIT licensed, inspected at commit 263c7e8bbd2f337fcb1e0c352eaa2508192ce757.

No code, scripts, installer, hooks, or raw project content from that repository are vendored here. The useful public workflow primitives were rewritten for this skill database's bounded-agent and evidence-gated workflow.

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.