Index of every page on this site: llms.txt
All skills
a2ui-project avatar

/coding-principles

@6bf4cc2
by A2UIa2ui-project/a2ui18k stars
1,430
Run it yourself

Enforces engineering, architecture, public API, and code quality standards distilled from human reviewer feedback across A2UI pull requests. Use when authoring new code, refactoring, addressing review feedback, or reviewing PR diffs. Don't use for release publishing or spec blueprint generation without code or PR changes.

  • 17 files
  • 75.1 KB
  • Updated 2 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/a2ui-project/a2ui/coding-principles

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

subskillstypescriptINDEX.md

≈990 tokens on demand. Your agent reads this file only when SKILL.md points to it.

TypeScript & Web Progressive Discovery Router

Use this router whenever a pull request or local change modifies TypeScript, JavaScript, CSS, or HTML files across typescript/, samples/client/{lit,angular,react}/, or tools/.


Evaluate TypeScript & Web Subskill Triggers

Inspect the TypeScript and web files in git diff main --stat and read only the subskill documents below whose activation criteria match your changes:

1. TypeScript Rigor, Strict Typing & Minification Interoperability

  • Document: typescript-closure-compiler.md
  • Activate if:
    • Any TypeScript file (*.ts, *.tsx) is added or modified.
    • Dynamic template bindings (*ngComponentOutlet, [inputs]) or protocol-derived dictionaries (this.props()['...'], Record<string, ...>) are touched.
    • Component or service class properties (input(), signal(), computed(), inject()) are declared.
    • Deprecations, conditional types, strict null checks, or type assertions (as ...) are present.
    • JSDoc annotations affecting declaration emit (@internal, @deprecated) are added to exported symbols.
    • Runtime code performs object parsing or schema discrimination (Array.isArray()).

2. Component Lifecycle, Reactive Purity & Performance

  • Document: reactive-lifecycle-performance.md
  • Activate if:
    • Reactive state is used: Angular signals (signal(), computed(), effect(), input(), input.required(), Signal<T>), React hooks (useState, useRef, useEffect), or Lit reactive properties.
    • Component lifecycle methods (connectedCallback, ngOnInit, componentDidMount) are modified.
    • Template loops or repetition directives (repeat, @for, *ngFor, .map()) are used.

3. CSS Theming, Custom Properties & Styling Architecture

  • Document: css-theming-styling.md
  • Activate if:
    • CSS styles, style blocks, or --a2ui-* CSS custom properties are added or edited.
    • Component JSDoc blocks documenting @cssprop are touched.
    • Layout dimensions, display modes, or gap properties are modified.

4. Accessibility (a11y) & Semantic HTML

  • Document: accessibility-semantics.md
  • Activate if:
    • HTML templates or JSX elements are added or modified.
    • Interactive controls (buttons, inputs, dialogs, dropdowns, choice pickers) are touched.
    • Accessibility attributes (aria-*, role, tabindex, alt) are added or edited.

5. Testing Rigor & DOM Test Environment Isolation

  • Document: testing-isolation.md
  • Activate if:
    • Any unit test (*.test.ts, *.spec.ts), integration test, mock setup, or test fixture is added or modified.
    • Catalog component implementations are modified (verify adjacent unit tests exist and cover all component primitives).

6. Yarn Workspace Tooling & Script Invocation

  • Document: yarn-workspace-tooling.md
  • Activate if:
    • package.json scripts, GitHub workflow steps, publishing workflows, or shell scripts that run Node tooling or publish packages are added or modified.
    • Test runner configuration that spawns a dev server (webServer in Playwright, Vitest, or Karma configs) is touched.
    • READMEs or documentation snippets containing npm, npx, or pnpm commands are added or edited.

7. TypeScript Public API AST Inspection (ts-morph)

  • Document: references/inspecting-typescript-public-api.md
  • Activate if:
    • Any index.ts, public-api.ts, package.json (exports), or ng-package.json is modified in @a2ui/web_core, @a2ui/angular, @a2ui/lit, @a2ui/react, or @a2ui/a2ui_agent.
    • Exported symbols or re-export barrels are added, renamed, or removed and require AST-level verification between base and head.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 6bf4cc2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "internal": true
}

README badge

README badge for a2ui-project/a2ui/coding-principles