agentleFS
Autocss-comAutocss-com/ai/.agents/skills/principles/SKILL.md

principles

Skill1 starsChanged 2 months agoMITView on GitHub

The foundational engineering principles every AutoCSS effort obeys, one section per principle. These sit beneath the concern skills (html/css/javascript/json/…) and decide trade-offs when a task could be solved more than one way. Use when choosing an approach, justifying a design, resolving "which tool", or reviewing whether a change earns its place.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ketchup, benchmark-checklist 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

  • Xia-AtaraxiaSkill

    benchmark-checklist

    Vets performance measurements for the limiter, tuning, physical limits, errors, repeatability, relevance, and proof that timed work happened. It applies to 'check this benchmark', 'report this speedup', measured regressions, and choosing a library or configuration from numbers. It reports spread and gaps before drawing a conclusion. Not for general testing policy or choosing test oracles - use principle-testing.

    Also in 6 projects that use this

  • tristanphvnSkill

    ketchup-video

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

    Also in 3 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

  • drafaelSkill

    sharpen

    Deepen a task without broadening its scope, then rewrite its prompt. Manual invocation only; use when the user explicitly invokes sharpen or requests this prompt-sharpening workflow. Do not execute the rewritten task or decide choices the user owns.

    Also in 4 projects that use this

  • +6 more from jaydubya818

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Rule: Every fact lives in exactly one place.

    line 45
  2. Distinctive:

    Why: Every line and file is future maintenance and future risk.

    line 53
  3. Distinctive:

    Rule: Prefer the simpler construction.

    line 59
  4. Distinctive:

    Tell: if explaining the mechanism needs a diagram of layers, look for the simpler expression first.

    line 62
  5. Distinctive:

    Rule: Prefer cross-browser, browser-native accessibility features and engineer the UI to depend on them — accessibility is a load-bearing …

    line 73
  6. Distinctive:

    Shows up: no bundler/compiler, no runtime dependencies, static shell deployable anywhere.

    line 82
  7. Distinctive:

    Shows up: no npm runtime packages, no CDN scripts.

    line 89
  8. Distinctive:

    Rule: All patterns here are already established and documented in a skill.

    line 108
  9. Very specific:

    Rule: Never guess. Verify feature behavior and support against authoritative sources (MDN Web Docs + BCD, the modern-web-guidance …

    line 115

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

Concern skills say what each layer may do. These principles say how to decide when there is a choice. They are foundational to any effort that leverages the AutoCSS Architecture. When a principle and a concern skill agree, follow them. When they appear to conflict, surface it to the user — never resolve silently.

Each principle below carries: the rule, the why, how it shows up in this architecture, and the tell (how to catch a violation).

The thesis these principles serve — one UI, every project at once

AutoCSS is not one project's UI; it is every project's UI at once. One presentation layer, served once from one place, called remotely like a font or an image, rendering each back-end's data. This is the claim that makes the architecture matter, and every principle below exists to protect it.

  • The stove-pipe it dissolves. In siloed, high-security environments each project is walled off, so it is treated as law that every project starts its front-end from scratch. Frameworks only soften the restart — each project still ships an isolated copy, built independently. Because the data and data-logic differ per project, teams assume the UI must differ too, so every project rebuilds and re-owns its own front-end (and increasingly one overloaded full-stack developer owns both ends). AutoCSS rejects that assumption.
  • Why it is now possible. Native declarative browser features — :has(), :empty / :not(:empty), container and style queries, light-dark() — let a single remotely-served UI (not a copy) lay out, style, and render each project's content from the presence and shape of the data itself, with no relationship to that data. For the first time the same UI serves many unrelated back-ends without being forked.
  • What that buys. Usability, accessibility, and standards-compliance stop being per-project rework and become one shared channel of effort — fixed once, inherited by every consumer. No framework-per-project stack can match that.
  • Consistency and individuality at once. Department heads want a coherent look/feel across a department's apps while each app keeps its own identity for unique requirements. The shared UI provides the coherence; data-presence-driven rendering gives each app its individuality — both from the same source, no fork.
  • Each engineer's best work, not a watered-down average. Because presentation and data are air-gapped, UI/UX specialists spend their seniority on UI/UX and data engineers on data — neither is conscripted into the other's craft. The customer gets each person's best, and department heads staff to solve real problems instead of hoping one overloaded generalist covers everything.
  • The compounding payoff. Higher-quality apps in less time → better usability → happier, more productive users → more work done at lower total cost. Every app ships faster — a win for users, engineers, and whoever pays for the work.
  • Why the principles follow. All eggs in one basket → the basket must be the single most durable, universal thing there is: one dependency, the modern browser. One basket for everyone makes decay catastrophic → future-proofing is existential, and modern-web-guidance + MDN are how the basket stays current and correct (not optional advice). A shared UI can only be worked as its own channel if it is fully isolated from every back-end → air-gapped Separation of Concerns is the enabler, not a nicety.

Hold this as the overall context (Charter §8) on every AutoCSS response: you are never touching one project — you are touching all of them at once, which is why usability, accessibility, and standards compliance are always in force, for every consumer, all the time.

Least Power

  • Rule: For any task, use the least powerful technology that expresses the intent declaratively. Ask in order — can HTML do it? If not, can CSS? Only then JS. JS is never used for the presentation layer.
  • Why: Less powerful tools are more portable, more inspectable, harder to misuse, and outlive frameworks.
  • Shows up: semantic HTML for structure; CSS for all UI/state/visibility; JS only for data transport on the oninput lifecycle.
  • Tell: a script doing what a selector could (:has(), :empty, :checked) is a Least-Power violation — re-engineer to the lower tool.

Separation of Concerns (the air-gap)

  • Rule: Each concern is independent; a change in one produces no change in another. HTML never names a CSS class; CSS never reads JS state; JS never writes presentation; JSON never carries markup.
  • Why: Air-gapped layers can be read, tested, and replaced in isolation, and enable a strict CSP with no unsafe-* (see the security skill).
  • Shows up: the four-layer table in the architecture skill; one concern per file.
  • Tell: the architecture skill's air-gap test — if an HTML change forces a CSS/JS change, the design is wrong.

DRY — one source of truth

  • Rule: Every fact lives in exactly one place. Do not restate a rule, value, or datum that already exists elsewhere.
  • Why: Duplication drifts out of sync and doubles maintenance.
  • Shows up: canonical laws in ONE file (Autocss-com/ai AGENTS.md); PROGRESS.json as the single backlog source; design tokens as custom properties set once; the @layer order derived from <link> order, not a second master list.
  • Tell: a value or rule copied into two files — collapse to one and reference it.

Minimum Entropy / Minimal New Code

  • Rule: Adding code or files always increases entropy. The default is to add nothing. The best solution adjusts an existing behavior to meet the ask with no new code.
  • Why: Every line and file is future maintenance and future risk.
  • Shows up: new utilities/patterns/files only on explicit user instruction; prefer tuning an existing rule over writing a new one.
  • Tell: reaching for a new file/function before proving the existing ones cannot express the intent.

Simplicity over Complexity

  • Rule: Prefer the simpler construction. "Simplicity is the ultimate sophistication."
  • Why: Simple systems are readable end-to-end by any qualified person and fail in obvious ways.
  • Shows up: flat semantic markup over nested wrappers; one obvious way to do each thing; CSS Grid instead of wrapper-and-flex stacks.
  • Tell: if explaining the mechanism needs a diagram of layers, look for the simpler expression first.

Universal Compatibility & Interoperability

  • Rule: Build on web standards so the output works everywhere the platform does, and so other systems can embed it without a fight.
  • Why: Standards are the widest, longest-lived contract.
  • Shows up: keeping our own styles in low-priority @layers so a consumer's unlayered styles win by default (see the css layers reference); zero framework lock-in.
  • Tell: a construction that only works inside this app's assumptions, not as a portable static resource.

Browser-Native Accessibility (baked-in)

  • Rule: Prefer cross-browser, browser-native accessibility features and engineer the UI to depend on them — accessibility is a load-bearing part of the design, not a bolt-on.
  • Why: Native semantics and states are free, correct, and survive refactors.
  • Shows up: :focus-visible, native form control states, semantic elements, keyboard-operable state machines; honoring prefers-reduced-motion / forced-colors (see the css a11y reference).
  • Tell: a control that is invisible to keyboard/AT (e.g. a focusable element hidden with display:none) — fix so native accessibility carries it.

Minimum O&M

  • Rule: Minimize the operations-and-maintenance surface: fewer moving parts, fewer dependencies to patch, fewer build steps.
  • Why: The cheapest system to run is the one with the least to maintain.
  • Shows up: no bundler/compiler, no runtime dependencies, static shell deployable anywhere.
  • Tell: a convenience that adds an ongoing operational burden (a service to keep alive, a dependency to keep patched).

Future-Proofing — zero third-party dependencies

  • Rule: Zero third-party (non-native-browser) dependencies. Third-party = any code that cannot render natively in an evergreen browser without help.
  • Why: The platform outlives every framework; native features do not get abandoned.
  • Shows up: no npm runtime packages, no CDN scripts; self-host fonts and assets; use cutting-edge native CSS instead of libraries (anchor positioning instead of Popper, popover instead of a menu lib).
  • Tell: a CDN <link>/<script> or an npm runtime import — replace with the native capability or self-host.

Usability — for end-users AND future developers

  • Rule: Optimize for the people who use the surface daily and the developers who maintain it. Both deserve clarity.
  • Why: A system only succeeds if both audiences can work with it.
  • Shows up: data rendered as <ul>/<li> so CSS can reshape it on the user's terms (list/card views); names that describe the concern so the next developer isn't misled (see the naming skill).
  • Tell: a choice that helps the machine but confuses a person reading the code or using the app.

Reuse before Create

  • Rule: Review and reuse existing functions, patterns, and files before making new ones.
  • Why: Reuse keeps entropy low and behavior consistent.
  • Shows up: each skill catalogues the permitted utilities; check them first.
  • Tell: writing a helper that duplicates one already in assets/js/ or a pattern already in a skill.

Never New Patterns

  • Rule: All patterns here are already established and documented in a skill. If a task seems to need a new pattern, the design is wrong — re-engineer until an existing pattern fits.
  • Why: A fixed pattern vocabulary is what makes the system readable end-to-end.
  • Shows up: state machines, oninput lifecycle, data-flow rendering, @layer cascade — the whole vocabulary lives in the skills.
  • Tell: inventing a mechanism not found in any skill — stop and find the established one.

Verify and cite (standards-first)

  • Rule: Never guess. Verify feature behavior and support against authoritative sources (MDN Web Docs + BCD, the modern-web-guidance reference) and cite them. Those sources are advisory and subordinate — on any conflict, the AutoCSS rules win, but the duty to consult and reconcile is canonical.
  • Why: A claim of correctness is not correctness; the platform moves and only fresh checks catch drift.
  • Shows up: the css references' dated "Baseline & support" sections; @supports feature-detection over assumption.
  • Tell: an assertion about support or behavior with no source and no recent check.

When principles conflict

Surface the conflict to the user with the trade-off named. The user is the sole arbiter. Never pick silently, and never let one principle quietly override another without saying so.

Baseline & support

Checked against MDN as of 2026-07-16.

Canonical rules: https://github.com/Autocss-com/ai/blob/main/AGENTS.md

Reference

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.