agentleFS
mikejhillmikejhill/agent-skills/skills/project-upgrade/SKILL.md

project-upgrade

Skill0 starsChanged 3 days agoMITView on GitHub

Bring an existing repository up to the user's current project baseline and standards, with freedom to restructure and rewrite, while proving with tests that functional behavior does not change. Run only when the user explicitly invokes it.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Run only when the user invokes this skill.

    line 16
  2. Distinctive:

    If no installed standard defines a project baseline, ask the user for one, or for sibling repositories to copy, before changing anything.

    line 25
  3. Distinctive:

    Build the safety net: before any change that can affect what users receive: production code, packaging, build, or runtime resources (Safety …

    line 32
  4. Distinctive:

    Never edit a characterization test's expected values, skip, delete, or loosen a test to get green.

    line 50

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

Project upgrade

Close every gap between this repository and the user's current standards. You have full latitude: restructure, rename internals, rewrite code for style or architecture, replace tooling. The one fixed constraint is behavior: what the project does for its users must not change, and the tests must prove it.

Run only when the user invokes this skill. Never start it on your own because a repository looks outdated.

Inputs

InputUse
Focus (optional)Free text after the invocation. "Only X" is an allowlist: nothing else is in scope. "X first" orders the work. "Skip X" or "not X" excludes a layer. With no focus, every layer is in scope.
StandardsThe baseline comes from the skills and instructions the user has installed: any that define project setup, repository layout, CI and releases, testing, architecture, documentation, branding, or language development. Read every one that applies. This skill defines no baseline of its own.

If no installed standard defines a project baseline, ask the user for one, or for sibling repositories to copy, before changing anything.

Procedure

  1. Read the standards. List the installed skills and instructions, and read each one that applies to this repository's languages, platform, and host. Note where two disagree; follow the user's explicit rules, then the more specific standard, and report the conflict.
  2. Inventory the repository. Languages, build, test and lint commands, CI, release process, docs, host settings you can read. Run the build and the full test suite and record the result and the list of tests collected as the starting point. Changes that can affect what users receive need a green build and full suite first, because a red suite cannot prove behavior is unchanged. If the baseline is red and cannot be made green without changing behavior, report the blocker and limit the run to changes that cannot affect the delivered artifact or runtime behavior, such as docs and repository files. Release and packaging workflows stay blocked.
  3. Audit. Compare every baseline layer with what exists. Write a gap list: layer, gap, planned change, and whether it needs the user (Skip rules). Follow the focus when given.
  4. Build the safety net before any change that can affect what users receive: production code, packaging, build, or runtime resources (Safety net). It lands first, in its own pull request or as the first commits of each change.
  5. Close the gaps. Group the work into pull requests as you see fit, typically one per layer or concern, ordered so each builds on merged work. Keep each reviewable. The full suite, including the new characterization tests, passes before you move from one change to the next, not only before a pull request. When a change touches test tooling or discovery, reconcile the tests collected with the recorded list; a test that silently stops running counts as deleted.
  6. Merge each pull request only under the user's own merge and review rules, and only when CI is green on its latest commit. Without such rules, open the pull requests and leave them for the user.
  7. Report (Report).

Safety net

  1. Measure coverage with the project's coverage tool, adding one in the project's ecosystem if none exists and the focus allows tooling changes; otherwise report coverage as unmeasured. Record line and branch coverage per module.
  2. For each area you will change, check that tests pin its current observable behavior: outputs, side effects, errors, exit codes, public interfaces, file and wire formats.
  3. Where they do not, add characterization tests that assert what the code does now, including quirks. Confirm each passes on the unmodified code before you change that code. Read characterization.md for techniques.
  4. A suspected bug stays as it is. Pin it with a test named or commented as current behavior, and list it in the report. Fixing it is a behavior change.
  5. For packaging or build changes, build the artifact before and after, install each into its own clean environment, run its entry points from outside the source tree, and compare its entry points, bundled resources, and essential behavior.
  6. Where behavior cannot be tested in this environment (hardware, paid services, UI with no harness), change it only where a check proves the specific transformation equivalent, such as identical compiled output or bytecode. A whitespace-only diff and automated refactors are not proof: whitespace can be significant inside literals and here-documents, and a rename can miss callers found by string or reflection. Otherwise leave that code unchanged and report the gap.

Behavior rules

  • Public interfaces stay compatible: exported APIs, CLI flags and output, configuration keys, file formats, exit codes, environment variables, and documented defaults. Internals are free to change.
  • A standard that would require a breaking change, such as a renamed package or a new minimum runtime, needs a product decision. List it and skip it.
  • Never edit a characterization test's expected values, skip, delete, or loosen a test to get green. If a test fails, the change is wrong, or the test pinned something that was not behavior; say which in the pull request.
  • Where a mutation-testing tool exists or the standards require one, run it on the modules you will change after adding characterization tests and before changing production code. Rerun it with the same configuration afterwards. If the tool cannot run on this machine (some are POSIX-only), run the project's mutation workflow on the branch before merging instead of after. A rewrite changes the set of mutants, so a lower score is a reason to inspect the new survivors; it is a regression only when a survivor shows an observable change no test catches.

Skip rules

Skip only work that needs one of these, and do everything around it:

  • The user's accounts or host permissions: creating services, changing repository or organization settings, rulesets, registries, or billing, unless the user's rules already authorize it.
  • Secrets: tokens, keys, signing identities, credentials of any kind.
  • A product decision: breaking changes, license choice, naming and branding choices, removing features, anything whose right answer depends on what the user wants.

For each skip, prepare what you can (the workflow file, the exact setting, the draft text) so the user's step is small.

Report

Reply with:

  1. Gaps closed, grouped by layer.
  2. Pull requests opened or merged, with links and CI state.
  3. Coverage before and after, and any area left unverified.
  4. Suspected bugs pinned as current behavior.
  5. What still needs the user, each with the prepared next step.

References

  • characterization.md: read when adding tests that pin current behavior, or when coverage tools are missing or misleading.

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.