agentleFS
nb-99nb-99/skillektion/skills/engineering-principles/SKILL.md

engineering-principles

Skill1 starsChanged 3 months agoMITView on GitHub

Apply conditional engineering principles to code changes, test writing or review, performance testing already in scope, and substantial design, migration, operations, concurrency, or maintenance decisions.

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use component-release and release.

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.
  • Microsoft AzureSkill

    component-release

    Prepares a verifiable Agent Landing Zone UI release. Use for release branches, VERSION, changelog entries, tags, release notes, and compatibility evidence; never publish without explicit human approval.

    Also in 4 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 9 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 13

    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:

    Read always-on.md to select the concise rules relevant to a code modification.

    line 12
  2. Distinctive:

    Use when code accumulates wrappers, indirection, hidden state, or scattered answers.

    line 20
  3. Distinctive:

    Use when external data enters the system.

    line 26
  4. Distinctive:

    Use for retries, provisioning, migrations, commands, agents, and lifecycle work.

    line 32
  5. Distinctive:

    Use when concurrent workers write the same files, branches, records, or caches.

    line 38
  6. Distinctive:

    Use for migrations and multi-step delivery.

    line 44
  7. Distinctive:

    Use when replacing an internal API with no persisted-data or external-consumer compatibility requirement.

    line 50
  8. Distinctive:

    Use when a new requirement exposes a mismatch in the existing design.

    line 57
  9. Distinctive:

    Use when repeatability, scale, or auditability justifies a reusable script, codemod, generator, test harness, or delegate contract.

    line 63
  10. Distinctive:

    Use when the same correction or failure recurs.

    line 69
  11. Distinctive:

    Use when writing, changing, or reviewing tests.

    line 76
  12. Distinctive:

    Use only while conducting performance tests or benchmarks already in scope.

    line 91
  13. Distinctive:

    Use when changed behavior or an invariant is ready to exercise.

    line 102

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

Engineering Principles

This is a conditional index, not a checklist to force onto every change. Select only principles whose trigger matches the current decision. State the principle only when it materially changes the work.

Read always-on.md to select the concise rules relevant to a code modification. The sections below provide their decision triggers and additional context.

Principles

Minimize Reader Load

Use when code accumulates wrappers, indirection, hidden state, or scattered answers. Reduce the layers between a maintainer's question and the code that answers it. Keep mutable scope and required context small.

Boundary Discipline

Use when external data enters the system. Parse and validate once at the boundary, represent the valid state explicitly, then keep internal logic direct and testable.

Make Operations Idempotent

Use for retries, provisioning, migrations, commands, agents, and lifecycle work. Design repeated and partially completed runs to converge on the same end state. Detect current state before mutating it.

Separate Before Serializing Shared State

Use when concurrent workers write the same files, branches, records, or caches. First remove unnecessary sharing through ownership or partitioning. Serialize only the shared writes that remain a real invariant.

Sequence Verifiable Units

Use for migrations and multi-step delivery. Split work into units that each end in an observable valid state, order blockers first, and verify each unit before starting the next.

Migrate Callers, Then Delete Legacy APIs

Use when replacing an internal API with no persisted-data or external-consumer compatibility requirement. Migrate callers and remove the old path in the same delivery wave. When compatibility is real, make its owner and removal condition explicit instead.

Redesign From First Principles

Use when a new requirement exposes a mismatch in the existing design. Ask what the structure would be if the requirement had existed from day one, then compare that design with an incremental change before choosing.

Build The Lever

Use when repeatability, scale, or auditability justifies a reusable script, codemod, generator, test harness, or delegate contract. Build it only when its future value exceeds its maintenance cost and it is cheaper than direct work.

Encode Lessons In Structure

Use when the same correction or failure recurs. Prefer an enforceable type, test, lint, validation rule, script, repository instruction, or focused skill over another reminder. Route historical rationale to the project's established documentation or memory system.

Test Behavior, Not Implementation

Use when writing, changing, or reviewing tests. Exercise the interface callers use and assert observable results, errors, state changes, or side effects. Choose expectations from specified behavior, reviewed reference outputs, or explicit contracts, rather than computing them by calling or reimplementing the code under test. Prefer assertions that fail for a relevant defect over checks of private calls or duplicated internals.

For mocked dependencies, check meaningful payloads or resulting effects. Assert call counts when the count itself is the contract, such as a retry limit or at-most-once delivery. Keep legitimate tests, including negative, property-based, compile-time, contract, reviewed snapshot, and characterization tests, when they protect behavior or an explicit contract.

Validate Performance Measurements

Use only while conducting performance tests or benchmarks already in scope. This principle validates those measurements; it does not initiate benchmarking for ordinary implementation, design ideas, or suspected performance effects.

Confirm the intended work ran successfully. Rule out errors, cached or skipped work, unequal comparison settings, and run-to-run noise. Record the workload, settings, run count, and spread with the result. Support bottleneck claims with profiles or system counters from the measured run, not guesses from the code.

Prove It Works

Use when changed behavior or an invariant is ready to exercise. Run the narrowest executable check that covers it. For prose or non-executable metadata, inspect the resulting artifact. Avoid unrelated suites and generic final rechecking when earlier evidence still applies. State what was verified and what remains uncertain.

Completion

Select relevant principles once. The principle pass is complete when each selected principle names the concrete decision it changed and no unselected principle is added merely for ceremony.

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.