agentleFS
GoogleKnown publishergoogle/A2UI/.agents/skills/coding-principles/SKILL.md

coding-principles

Skill17k starsChanged 3 months agoApache-2.0View on GitHub

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.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 3

    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:

    Before modifying or implementing code in any language, consult the authoritative specifications and blueprints:

    line 18
  2. Distinctive:

    Activate if: Always applicable when authoring, preparing, or reviewing a pull request.

    line 60
  3. Distinctive:

    Read only the cross-language subskills activated in Step 2 and the language-specific subskills selected through Step 3 to evaluate your …

    line 96

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

Skill: coding-principles

Purpose: Core engineering, architecture, and code quality standards established by human reviewers across A2UI pull requests. Used by agents when authoring changes, refactoring code, addressing review feedback, or reviewing pull request diffs to maintain repository health across all languages.


Specification and Blueprint Grounding

Before modifying or implementing code in any language, consult the authoritative specifications and blueprints:

  • Protocol JSON Schemas: specification/v0_9_1/json/ and specification/v1_0/json/ define wire-format envelopes, types, and validation constraints.
  • Component Catalogs: catalogs/basic/v1/catalog.json defines standard components, properties, and function signatures.
  • Core Module Blueprint: a2ui_core.blueprint.md specifies state containers (DataModel, SurfaceModel), MessageProcessor, JSON pointer rules, auto-vivification, and error semantics.
  • Agent SDK Blueprint: a2ui_agent.blueprint.md specifies A2uiGenerator, A2uiRequestProcessor, inference format strategies, and prompt generation.
  • Framework Adapter Blueprint: a2ui_framework_adapter.blueprint.md specifies view mapping, reactive subscription lifecycles, and layout behavior.
  • Typesafe Builder Blueprint: typesafe_builder_api.blueprint.md specifies fluent builder hierarchies.
  • Reference Implementation: typescript/core/web_core/ serves as the canonical behavioral reference for edge-case resolution.

Progressive Discoverability: Two-Level Subskill Routing

Because the A2UI repository spans multiple languages (typescript/, python/, dart/, swift/) and shared specifications (specification/, catalogs/), agents must use a two-level progressive discovery workflow:

  1. Level 1 (Cross-Language Subskills): Activate language-agnostic principles that govern pull request scope, software design, public API boundaries, specification immutability, and changelogs across the entire monorepo.
  2. Level 2 (Language-Specific Routing): Route by the programming languages modified in the diff to load only the subskills and language guides relevant to those languages.

Step 1: Inspect the PR Diff

Review the modified files and categories of changes:

# In an active branch:
git diff main --stat

Identify both:

  • Cross-cutting functional areas impacted (public exports, specifications, catalogs, changelogs, PR structure).
  • Programming languages and directories touched (typescript/, python/, dart/, swift/, samples/, tools/).

Step 2: Activate Cross-Language Subskills (Language-Agnostic)

Evaluate the cross-language subskills below against the diff and read any activated document in full:

1. PR Hygiene, Atomicity, Scope Control & Software Design

  • Skill: pr-hygiene
  • Activate if: Always applicable when authoring, preparing, or reviewing a pull request.

2. Public API Boundaries, Cross-Framework Design & Changelogs

  • Document: subskills/public-api-and-cross-framework-design.md
  • Activate if:
    • Any package entrypoint or facade (index.ts, public-api.ts, package.json, __init__.py, lib/*.dart, or public Swift API), or any CHANGELOG.md is modified.
    • Any new class, function, interface, type, model, or DI token is exported.
    • Renderer APIs, registration helpers, or adapters across @a2ui/angular, @a2ui/lit, @a2ui/react, a2ui_flutter, or A2UISwiftUI are modified.
    • Imports between sibling packages change.
    • Files under specification/ or catalogs/ (schemas, catalog fixtures, or examples) are modified or added.
    • Breaking changes or public API deprecations are introduced.
    • A new source file is added (verify it has a single responsibility rather than acting as a catch-all types.* or utils.* file).

3. Updating Changelogs (CHANGELOG.md)

  • Skill: update-changelog
  • Activate if: Any CHANGELOG.md is modified or a published package's public API or consumer-observable behavior changes.

Step 3: Route by Language for Language-Dependent Principles

Inspect the file extensions and directories in git diff main --stat and follow the matching language route(s) below. Only load routers and guides for languages present in your diff:

Language / EcosystemMatching Paths & ExtensionsProgressive Discovery Target
TypeScript & Web (Lit, Angular, React, Web Core, CSS, HTML)*.ts, *.tsx, *.css, typescript/, samples/client/{lit,angular,react}/, tools/Read the TypeScript & Web router: subskills/typescript/INDEX.md to activate specific TypeScript, reactive lifecycle, CSS theming, accessibility, DOM testing, and AST public API subskills.
Python (Core, Agent SDK, Builders, Evaluators, Scripts)*.py, python/, eval/, samples/agent/, tools/, scripts/Read the Python router: subskills/python/INDEX.md to activate Python package architecture, facade conventions, typing, and verification subskills.
Swift & SwiftUI (Core, SwiftUI Adapter, iOS Sample)*.swift, swift/, Package.swiftRead the Swift & SwiftUI router: subskills/swift/INDEX.md to activate Swift target architecture, coding standards, and Testing subskills.
Dart & Flutter (Core, Agent SDK, Flutter Adapter)*.dart, dart/, samples/client/flutter/, pubspec.yamlRead the Dart & Flutter router: subskills/dart/INDEX.md to activate Dart analyzer rules, package versioning, and changelog subskills.

Step 4: Progressively Load Activated Subskills

Read only the cross-language subskills activated in Step 2 and the language-specific subskills selected through Step 3 to evaluate your code against their rationales, checklists, and examples without loading unrelated language rules into context.

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 10 mentionsJan 2026: 6 mentionsFeb 2026: 3 mentionsMar 2026: 8 mentionsApr 2026: 18 mentionsMay 2026: 22 mentionsJun 2026: 3 mentionsJul 2026: 1 mentionAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the google/A2UI repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about google/A2UI

The biggest 5 of 73 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 73

Talked about on GitHub, YouTube, Bluesky and Hacker News (73 times).

On GitHub · 50

45 more on GitHub

On YouTube · 17

12 more on YouTube

On Bluesky · 5

On Hacker News · 1

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.