Przejdź do treści
Biblioteka skilli
Programowanie · Nauka i wyjaśnianie

principles

/principles

Opisuje zasady inżynierskie projektu AutoCSS i rozstrzyga kompromisy, gdy zadanie da się rozwiązać na kilka sposobów.

Repozytorium
ai ↗
Licencja
MIT
Ostatnia zmiana repozytorium
04.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
8
Przestarzałość

Brak sygnałów. Repozytorium zmienione 04.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Opisuje zasady inżynierskie projektu AutoCSS i rozstrzyga kompromisy, gdy zadanie da się rozwiązać na kilka sposobów.

Wyzwalacze z opisu

which tool
Oryginalny opis (EN)

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.

Jak działa

  1. The thesis these principles serve — one UI, every project at once
  2. Least Power
  3. Separation of Concerns (the air-gap)
  4. DRY — one source of truth
  5. Minimum Entropy / Minimal New Code
  6. Simplicity over Complexity
  7. Universal Compatibility & Interoperability
  8. Browser-Native Accessibility (baked-in)
  9. Minimum O&M
  10. Future-Proofing — zero third-party dependencies
Sekcje z nagłówków SKILL.md, w oryginale · 133 linii, 1 798 słów
Podgląd SKILL.md
---
name: principles
description: 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.
license: MIT
metadata:
  version: "1.0.0"
---

# 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 `@layer`s 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._

- `:has()` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has
- `:empty` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:empty
- `light-dark()` — **Baseline Newly available** — https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/light-dark

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

## Reference

- MDN Web Docs (authoritative platform reference): https://developer.mozilla.org/
- W3C TR index (standards): https://www.w3.org/TR/
- W3C — Rule of Least Power: https://www.w3.org/2001/tag/doc/leastPower.html
- AutoCSS Architecture + Response Integrity Charter (canonical): https://github.com/Autocss-com/ai/blob/main/AGENTS.md

Wersje

RepozytoriumWynikLicencja
Ta strona · autocss-com/ai90MIT
ongtungduong/legion100MIT
mimshins/ork100MIT
OutlineDriven/outline-driven-development95Apache-2.0
KyrosHendrix/skills90MIT
vahaah/astack90MIT
overextended/skills90GPL-3.0
melodic-software/claude-code-plugins84MIT

Migawka bazy z 13.11.2026 · wersja paczki d4202dc76bae (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 90ds-principles
    Podaje zwięzłe zasady inżynierskie z wyzwalaczami, np. przy wymianie API, rozmiarze zmiany lub debugowaniu.
  • 85engineering-principles
    Stosuje 24 zasady inżynierskie do decyzji projektowych, implementacyjnych, testowych i pomiarowych, nazywając zasadę, która zmieniła daną decyzję.
  • 100api-design-principles
    Podaje zasady i listy kontrolne do projektowania i oceny API REST i GraphQL: kontrakty, nazewnictwo, modele błędów, paginacja, wersjonowanie i kompromisy REST kontra GraphQL.
  • 100tl-first-principles
    Pomaga przy decyzjach architektonicznych, opisując kompromisy między separacją odpowiedzialności, abstrakcją i kompozycją.
  • 100tl-first-principles
    Wyjaśnia podstawowe zasady projektowania oprogramowania, takie jak ukrywanie informacji i SSOT, z ich źródłami.
  • 100frontend-engineering-principles
    Zbiera wspólne zasady inżynierskie dla skilli FEOS: sposób myślenia, proces decyzji technicznych i mapę, którego skilla użyć.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.