agentleFS
fredfortierfredfortier/theaetetus/skills/invariant-formulation/SKILL.md

invariant-formulation

Skill1 starsChanged 3 months agoMITView on GitHub

Formulates and audits stable, enforceable properties over valid system states, transitions, and boundaries. Use when owned reasoning must become concise invariants for contracts, lifecycle, trust, persistence, recovery, concurrency, security, numeric correctness, or failure behavior. Do not use to discover missing product intent or prescribe implementation steps.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Stop with the missing premise when valid behavior cannot be stated without inventing intent.

    line 15
  2. Distinctive:

    Remove implementation details that can change without changing system meaning.

    line 24
  3. Distinctive:

    Keep an exclusion only when it follows from an invariant or closes a demonstrated drift path.

    line 26

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

Invariant Formulation

Turn an owned causal account into the fewest system truths needed to constrain valid outcomes.

Establish the subject

  1. Name the object, boundary, or transition being governed.
  2. Identify the owned premise from which the invariant follows. Use evidence-grounding when the premise depends on repository facts, external contracts, observations, or assumptions.
  3. Stop with the missing premise when valid behavior cannot be stated without inventing intent.

Formulate each invariant

  1. State the positive property that holds across every valid applicable state, transition, or externally visible outcome.
  2. Negate that property once to expose the illegal state. Do not substitute a list of forbidden files, components, or techniques.
  3. Name the boundary responsible for enforcement and the observation capable of checking it.
  4. Remove implementation details that can change without changing system meaning.
  5. Merge overlapping candidates when one stronger property preserves their meaning.
  6. Keep an exclusion only when it follows from an invariant or closes a demonstrated drift path.

Reject weak candidates

Reject a candidate that:

  • restates a task, design recipe, or current implementation;
  • describes one symptom instead of the valid state space;
  • depends on filenames, tools, or component names rather than the governed behavior;
  • cannot be checked at its responsible boundary; or
  • needs surrounding prose to reveal what must remain true.

Return

For each retained invariant, report:

  • governed subject and supporting premise;
  • valid-state property and illegal negation;
  • enforcement boundary and verification observation; and
  • behavior ruled in and ruled out.

Also report collapsed candidates and any unresolved premise. Do not authorize implementation.

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.