agentleFS
aradmanamnaoonaradmanamnaoon/vibe-coding-skills/skills/agent-reliability/existing-work-preservation/SKILL.md

existing-work-preservation

Skill0 starsChanged 18 days agoMITView on GitHub

Establish a known-good baseline and protect unrelated working behavior before AI edits an established project. Use before risky fixes, refactors, or broad feature work.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read applicable repository instructions before edits.

    line 20
  2. Distinctive:

    Run the smallest relevant baseline checks for behavior that must stay working.

    line 33
  3. Distinctive:

    Prefer additive/minimal patches and existing patterns over regeneration of whole modules.

    line 35
  4. Distinctive:

    After edits, compare diff size/ownership and run the same baseline checks plus new acceptance checks.

    line 36
  5. Distinctive:

    Never reset, clean, mass-reformat, or regenerate files as a shortcut when it can destroy unrelated work.

    line 46
  6. Distinctive:

    If baseline tests already fail, record their exact pre-change failures and use them to distinguish new regressions.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Purpose

Make preservation an explicit acceptance criterion for modifications to existing software.

When to activate

Work occurs in a nontrivial existing repository with known working behavior or uncommitted changes.

When not to activate

A brand-new isolated project has no prior behavior to preserve.

Preconditions

  • Read applicable repository instructions before edits.
  • Preserve unrelated working-tree changes and establish a baseline when the workflow can modify code.
  • Identify which tools and environments are actually available; do not claim unavailable checks ran.

Required inputs

  • Git status and baseline ref
  • Relevant existing tests/flows
  • Requested change surface

Workflow

  1. Inspect status/branches and identify pre-existing uncommitted files before editing.
  2. Run the smallest relevant baseline checks for behavior that must stay working.
  3. Identify stable public interfaces/data formats and high-risk adjacent flows touched by the requested change.
  4. Prefer additive/minimal patches and existing patterns over regeneration of whole modules.
  5. After edits, compare diff size/ownership and run the same baseline checks plus new acceptance checks.
  6. Investigate every baseline regression before expanding scope.
  7. Record pre-existing failures separately from new failures.

Relevant tools

Git status/diff/history, test/build/browser smoke checks.

Safety restrictions

Never reset, clean, mass-reformat, or regenerate files as a shortcut when it can destroy unrelated work.

Validation

  • Pre-existing user changes are untouched unless required and authorized by the task.
  • Relevant baseline checks do not newly regress.
  • Public/serialized contracts change only when required and documented.

Expected output

  • Baseline state
  • Protected behavior list
  • Diff preservation findings
  • Before/after validation

Failure handling

If baseline tests already fail, record their exact pre-change failures and use them to distinguish new regressions.

Completion criteria

The skill is complete only when every applicable validation item above has observed evidence or is explicitly marked not executed with the concrete blocker. Do not replace missing evidence with confidence language.

Research mapping

This skill was selected from research problems: P048, P010. See research/vibe-coding-problems.md and research/problem-evidence.csv in the Vibe Coding Skills repository.

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.