agentleFS
CloudflareKnown publishercloudflare/realtimekit-ui/AGENTS.md

realtimekit-ui

AGENTS.md68 starsChanged 2 months agoApache-2.0View on GitHub

Generated: 2026-02-25 Commit: 2557985 Branch: sm/agents-md Stencil.js Web Components UI kit for Cloudflare RealtimeKit (RTK), published as @cloudflare/realtimekit-ui. Framework wrappers for React and Angular are auto-generated by Stencil output targets on every build; the Vue wrapper is deprecated and unsupported.

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this AGENTS.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Component naming: All Stencil components use rtk- prefix.

    line 58
  2. Very specific:

    Standard prop block: Every component that needs store data declares these props in this order, each with @SyncWithStore() BEFORE @Prop():

    line 60
  3. Very specific:

    Never: add addListener without a matching removeListener in disconnectedCallback — causes memory leaks.

    line 87
  4. Very specific:

    Never: use .bind() in JSX props — react/jsx-no-bind forbids it.

    line 88
  5. Very specific:

    Never: add console.log to component code without /* eslint-disable no-console */ guards.

    line 89
  6. Very specific:

    Never: call UIElemEditor.style, .setChildrenProps(), .getChildrenProps(), .replace() — unimplemented stubs.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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
AGENTS.md

PROJECT KNOWLEDGE BASE

Generated: 2026-02-25
Commit: 2557985
Branch: sm/agents-md

OVERVIEW

Stencil.js Web Components UI kit for Cloudflare RealtimeKit (RTK), published as @cloudflare/realtimekit-ui. Framework wrappers for React and Angular are auto-generated by Stencil output targets on every build; the Vue wrapper is deprecated and unsupported.

STRUCTURE

realtimekit-ui/
├── packages/core/            # Source of truth — 136 Stencil Web Components
├── packages/react-library/   # Auto-generated React proxies (@stencil/react-output-target)
├── packages/angular-library/ # Auto-generated Angular directives (@stencil/angular-output-target)
├── packages/vue-library/     # Deprecated — not supported
├── scripts/                  # Docs generation + emoji processing
├── .github/workflows/        # CI: lint, test, release, cross-repo docs PR
└── .releaserc.js             # semantic-release config (Lerna publish after release)

WHERE TO LOOK

TaskLocation
Add/modify a componentpackages/core/src/components/rtk-<name>/
Shared library modulespackages/core/src/lib/ — audio, grid, i18n, icons, render engine, builder, addons
Utility functions + storepackages/core/src/utils/ — ~29 files; store lives in sync-with-store/
TypeScript typespackages/core/src/types/ — UIConfig, States, DesignTokens, Peer
Tailwind / CSS tokenspackages/core/src/theme/ — all colors backed by --rtk-* CSS custom props
Public API surfacepackages/core/src/exports.ts — everything consumers import
Default component treepackages/core/src/lib/default-ui-config.ts
Stencil + build configpackages/core/stencil.config.ts, packages/core/rollup.config.mjs
Release pipeline.releaserc.js + .github/workflows/release.yml

CODE MAP

SymbolTypeLocationRole
rtk-meetingWeb Componentpackages/core/src/components/rtk-meeting/Top-level shell; owns peer store, routes screens
rtk-ui-providerWeb Componentpackages/core/src/components/rtk-ui-provider/Headless store provider for composable usage
uiStore / createPeerStoreStorepackages/core/src/utils/sync-with-store/ui-store.tsReactive state; per-peer store for multi-instance
@SyncWithStore()Decoratorpackages/core/src/utils/sync-with-store/index.tsWires component props to the reactive store
Render / RenderChildrenFunctional componentspackages/core/src/lib/render/index.tsxUIConfig-driven rendering engine
createDefaultConfigFunctionpackages/core/src/lib/default-ui-config.tsReturns fresh mutable default UIConfig
RtkUiBuilderClasspackages/core/src/lib/builder/index.tsFluent API for mutating UIConfig
registerAddonsFunctionpackages/core/src/lib/addons/index.tsApplies addon plugins sequentially to a config
useLanguageFunctionpackages/core/src/lib/lang/index.tsCreates locale-aware RtkI18n lookup function
defaultIconPackObjectpackages/core/src/lib/icons/default-icon-pack.ts~70 inline SVG strings; merge-overridable
generateConfigFunctionpackages/core/src/utils/config.tsConverts legacy RTKThemePreset → UIConfig
sendNotificationFunctionpackages/core/src/utils/notification.tsFires toast notification via DOM event
useGridFunctionpackages/core/src/lib/grid.tsComputes tile dimensions/positions for N participants

CONVENTIONS

Component naming: All Stencil components use rtk- prefix. Tag: rtk-foo-bar. Class: RtkFooBar. File: rtk-foo-bar.tsx. Always Shadow DOM (shadow: true).

Standard prop block: Every component that needs store data declares these props in this order, each with @SyncWithStore() BEFORE @Prop():

@SyncWithStore() @Prop() meeting: Meeting;
@SyncWithStore() @Prop() config: UIConfig = createDefaultConfig();
@SyncWithStore() @Prop() iconPack: IconPack = defaultIconPack;
@SyncWithStore() @Prop() t: RtkI18n = useLanguage();
@SyncWithStore() @Prop() states: States;
@SyncWithStore() @Prop() overrides: Overrides = defaultOverrides;

Reflected props: Visual props (size, variant, kind) use @Prop({ reflect: true }) so CSS can target :host([size='sm']).

Events: Child components emit rtkStateUpdate (singular). Only rtk-meeting / rtk-ui-provider emit rtkStatesUpdate (plural). Event names are camelCase with rtk prefix.

Tailwind variants: Custom size-sm:, size-md:, size-lg:, size-xl: variants target :host([size='X']) attributes — not standard media queries. preflight: false — Shadow DOM manages its own baseline.

Branching: PRs always target staging (NOT main). staging → pre-release publish. main → production release.

Commits: Conventional Commits enforced by commitlint + Commitizen. feat: bumps MINOR, fix: bumps PATCH. Pre-commit hook auto-runs lint:fix.

Code style: singleQuote: true, printWidth: 100, tabWidth: 2, trailingComma: 'es5'. Tailwind class order auto-sorted by Prettier.

ANTI-PATTERNS (THIS PROJECT)

  • Never emit rtkStatesUpdate from child components — only rtk-meeting does this.
  • Never omit @SyncWithStore() on standard store props (meeting, config, iconPack, t, states, overrides) in new components.
  • Never add addListener without a matching removeListener in disconnectedCallback — causes memory leaks.
  • Never use .bind() in JSX props — react/jsx-no-bind forbids it; store bound handlers as arrow-function class fields.
  • Never add console.log to component code without /* eslint-disable no-console */ guards.
  • Never export const enum without // eslint-disable-next-line @stencil-community/ban-exported-const-enums.
  • Never target main in PRs — always staging first.
  • Never call UIElemEditor.style, .setChildrenProps(), .getChildrenProps(), .replace() — unimplemented stubs.
  • Never edit files in packages/*/src/*/stencil-generated/ by hand — auto-overwritten on build.

KNOWN INCOMPLETE / WORKAROUNDS

  • rtk-broadcast-message-modal.sendMessage() — does not call any real API; shows a fake success after 2s.
  • lib/builder: UIElemEditor.style/setChildrenProps/getChildrenProps/replace are stubs that only console.log.
  • rtk-grid.tsx filterParticipants() uses overrides.videoUnsubscribed as a temp hack.
  • Vue library is deprecated and unsupported — do not add new components to packages/vue-library/lib/components.ts.
  • peerDepdendencies (misspelled) in packages/core/package.json:55 is silently ignored by npm.

COMMANDS

npm install               # Install all workspaces
npm run dev               # Dev server (core package only)
npm run build             # Build all packages
npm test                  # Stencil spec + e2e tests
npm run lint              # Lint all packages
npm run lint:fix          # Lint + auto-fix
npm run docs:generate     # Generate TypeDoc API reference markdown

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.