agentleFS
brandonbewsbrandonbews/pumptrack/skills/principles/SKILL.md

principles

Skill0 starsChanged 21 days agoMITView on GitHub

Coding principles to follow when writing, reviewing or checking code, and to decide which review findings matter.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ketchup, interrogate 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.
  • instructureSkill

    ketchup

    Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories

    Also in 5 projects that use this

  • jaydubya818Skill

    interrogate

    Use when a change's assumptions, evidence, or design need adversarial review.

    Also in 9 projects that use this

  • jaydubya818Skill

    show-me-your-work

    Use when long-running work needs an auditable decision and evidence log.

    Also in 8 projects that use this

  • shiwenbin1617Skill

    ketchup-video

    Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video.

    Also in 3 projects that use this

  • +8 more from jaydubya818

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 5

    Distinctive

    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:

    DRY with judgment: Keep each decision in one place, and remove duplication that would have to change together.

    line 10
  2. Distinctive:

    Guard the edges: Check and parse outside input where it enters the system, treat it as hostile there, and keep secrets out of code and logs.

    line 13
  3. Distinctive:

    Match the house style: Follow the project's stated conventions first, then the code around the change.

    line 15
  4. Distinctive:

    Test behavior: Call the code the way its users do and assert the exact result they'd see.

    line 18
  5. Distinctive:

    Docs stay true: After a change, the docs and comments it touches are still true.

    line 19

“Common” is measured: kept by at least 6 in 10 of the 18 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

Principles

  • Smallest change. Make the smallest change that solves the problem. Clear out dead code before building on it, and add nothing for cases that haven't come up.
  • Redesign, don't bolt on. Fit a new requirement in as if it had been there from the start, not as a special case beside the old design. When a new path replaces an old one, move every caller over and delete the old path in the same change.
  • DRY with judgment. Keep each decision in one place, and remove duplication that would have to change together. Leave code that only looks alike but changes for different reasons. An abstraction that's harder to read than the copies isn't a win.
  • Data shape first. Choose the data structure before writing the logic, and let it carry the rules (a state machine, a typed model, a lookup table), so wrong states and wrong uses can't be expressed. A growing if/else chain, or a flag that has to stay in sync with another, is the sign to reshape.
  • Easy to follow. A reader should quickly find where a value comes from and what can change it. Keep layers few and state local, inline wrappers that have only one caller, and keep each interface small compared with the work it hides.
  • Guard the edges. Check and parse outside input where it enters the system, treat it as hostile there, and keep secrets out of code and logs. Inside the system, trust the types and skip defensive checks.
  • Safe to rerun. Scripts, migrations, jobs and anything else that changes state and might be retried end in the same state whether they run once, twice, or again after crashing partway through.
  • Match the house style. Follow the project's stated conventions first, then the code around the change. Don't bring in your own preferences.
  • Prove it works. Before calling anything done, check the real thing by running it or reading the actual value. "It compiles" or an agent saying it works doesn't count. Work in small steps that each end in a check you can run, such as a test, and script the check when you can so others can rerun it.
  • Fix root causes. Reproduce the problem, ask why until you reach the cause, and fix it there and everywhere the same pattern appears. Don't add guards that only hide the symptom. If two fixes that rest on the same assumption both fail, question the assumption.
  • Test behavior. Call the code the way its users do and assert the exact result they'd see. Rewrite or delete any test that would still pass if the code broke.
  • Docs stay true. After a change, the docs and comments it touches are still true.
  • Code explains itself. Clarity comes from the code, not comments. Treat every comment in code you're changing, and every urge to write one, as a sign the code should be rewritten: rename, reshape or simplify it until it reads plainly. Comment only a reason that lives outside the code and can't be shown in a name, type or test, such as an outside API's quirk. Formal API docs written as doc comments follow the project's conventions. In review, a comment that explains how code works is a finding against the code.
  • Code stands alone. Code and comments never point at design docs, plans or tickets, which can be private, move or close. Name the ticket in the commit or PR instead.

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.