agentleFS
wilbeibiwilbeibi/wilbeibi-skills/skills/design-principles/SKILL.md

design-principles

Skill2 starsChanged 3 months agoMITView on GitHub

Runs named systems-design checks (single writer, never reuse a name, converge on rerun, survive the rollout, implicit state machines) when a change adds state, a new legal value of existing state, or a mechanism, touches lifecycle, delete, GC, lock, or migration code, changes a shape another process reads, or patches the same function twice. Use when the user says "triggers", "check single writer", or another principle name, or for design and lifecycle review. Do NOT use for a general diff review (use code-review), tracing what a change breaks (use blast-radius), or naming and glossary work (use domain-modeling).

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use test-driven-development.

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.
  • OpenAISkill

    test-driven-development

    Use when implementing any feature or bugfix, before writing implementation code

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 1

    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:

    When an event below happens, run its check and put the result in the same message or commit, unasked.

    line 8

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

design-principles

When an event below happens, run its check and put the result in the same message or commit, unasked. On "triggers", run every check against the current diff and design and report each as fired or not, with its result. Principle definitions: references/principles.md.

Triggers

EventCheck
New state or mechanism (table, field, status, flag, env var, process, queue, lock, retry, fence)Name its one job, the worst case without it, and the existing primitive tried first. A worst case of "slower" or "one more refetch" makes it an optimization: defer it. Never trims safety.
New transitional status or awaited attempt (pausing, flushing, a job a row waits on)attempt is not status: name the attempt and the writer of every exit, failure included. Key exits on the attempt id; never fake a terminal status to pass an ordering rule.
Phase start or milestoneRestate non-negotiable invariants and a diff budget. Stop and ask when the diff passes it, or at the first placeholder, compat branch, or out-of-scope file.
Second fix to one function or predicate, a regression from the last fix, or a change spreading past the named filesStop coding. In one sentence, name the missing owner, the name doing two jobs, or the right layer; offer one design-level alternative. If it changes design or scope, ask first.
An existing field gains a legal value or combination (non-null but empty, partly filled, two modes now mixed)List every predicate that reads it, with path:line, and what each one assumed. Split the name, or fix each reader that assumed the old set.
Reviewing lifecycle, storage, or status codeimplicit state machines: for each mutable field, file, or map with no written transition table, list states and transitions with writer (path:line) and guard. Walk happy path, attempt failure, ambiguous timeout, crash at each step, late or duplicate executor, concurrent writer, delete mid-flight. Report states with no exit, transitions with two writers, fields whose readers disagree.
Several findings at onceGroup by shared cause before fixing any, using the principles as classifier. Reproduce each at the real boundary or label it inference.
Delete, cleanup, unlink, GC, ack, or nak codeList every reader and writer of the name (late executors, crash restart, sweepers) and what proves each is done. If the name can later denote another object, fix naming first.
Periodic publisher, queue message, lock, or timed callWrite rate x hold time against the hard limit (queue cap, IOPS, library timeout) and the lock order.
Change to a shape another process or stored record readssurvive the rollout: walk old writer -> new reader, new writer -> old reader, rollback reading new data. State deploy order and the later contract step. Use blast-radius for the wider trace.
Tests for a new mechanism or fixfails at the boundary: include one case at the real boundary (real responder, production-shaped data, a fake slower than the timeout, duplicate delivery).

Output

One line per principle applied, in the final message or the commit body:

Principle: <name> → <decision it changed> → <cost accepted>

A name with no changed decision was not applied. When a trigger fired and no decision changed, write Principle: none.

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.