ai-dial-chat
AGENTS.md501 starsChanged 15 days agoApache-2.0View on GitHub
Full tech stack, path aliases, commands, and architecture layout live in openspec/config.yaml — read it before designing or implementing features. The opsx:* skills use it as their primary context. Spec work follows the OpenSpec lifecycle: explore → propose → apply → archive (opsx:explore, opsx:propose, opsx:apply, opsx:archive). npm run validate:specs (PR gate) checks that repo paths and translation keys cited in openspec/specs/** exist, and npm run spec:impact (advisory) lists specs whose referenced files changed without the spec — see .claude/rules/docs.md "Spec…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 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.
In this repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/a11y.mdcCursor rule
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- address-current-branch-reviewSkill
- api-designSkill
- celebration-scene-ideasSkill
- code-review-and-qualitySkill
- create-ticketSkill
- dep-scanSkill
- dep-triageSkill
- dial-docsSkill
- extract-to-libSkill
- figmaSkill
- fix-cve-backportSkill
- git-shipSkill
- i18n-stringsSkill
- lean-verificationSkill
- lib-themingSkill
- monitor-ciSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- proactive-security-monitorSkill
- refactoring-auditSkill
- chat-release-notesSkill
- responsive-designSkill
- security-monitor-triagerSkill
- snyk-jira-ingestSkill
- snyk-scan-stubSkill
- snyk-triageSkill
- ui-kit-reviewSkill
- nx-generateSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 4
When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through nx (i.e.
- Very specific: line 8
NEVER guess CLI flags - always check nx_docs or --help first when unsure
- Distinctive: line 10
Use nx_docs for advanced config options, unfamiliar flags, migration guides and plugin configuration — not for basic generator syntax or …
- Very specific: line 42
Before merge (or on explicit review requests), run the five-axis quality review (code-review-and-quality skill).
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.
Files
General Guidelines for working with Nx
- For navigating/exploring the workspace, invoke the
nx-workspaceskill first - it has patterns for querying projects, targets, and dependencies - When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through
nx(i.e.nx run,nx run-many,nx affected) instead of using the underlying tooling directly - Prefix nx commands with the workspace's package manager (e.g.,
npm exec nx build,npm exec nx test) - avoids using globally installed CLI - You have access to the Nx MCP server and its tools, use them to help the user
- For Nx plugin best practices, check
node_modules/@nx/<plugin>/PLUGIN.md. Not all plugins have this file - proceed without it if unavailable. - NEVER guess CLI flags - always check nx_docs or
--helpfirst when unsure - For scaffolding tasks (creating apps, libs, project structure, setup), ALWAYS invoke the
nx-generateskill FIRST before exploring or calling MCP tools - Use nx_docs for advanced config options, unfamiliar flags, migration guides and plugin configuration — not for basic generator syntax or standard commands
Architecture context
Full tech stack, path aliases, commands, and architecture layout live in openspec/config.yaml — read it before designing or implementing features. The opsx:* skills use it as their primary context.
Spec work follows the OpenSpec lifecycle: explore → propose → apply → archive (opsx:explore, opsx:propose, opsx:apply, opsx:archive). npm run validate:specs (PR gate) checks that repo paths and translation keys cited in openspec/specs/** exist, and npm run spec:impact (advisory) lists specs whose referenced files changed without the spec — see .claude/rules/docs.md "Spec references".
Internal @epam/* libs resolve via tsconfig.base.json paths + the Nx project graph — fix @epam/* resolution errors (cannot find module, TS2307) there and in the lib's own package.json, not by hand-editing node_modules symlinks or running npm install --workspace. Use the nx-workspace skill to diagnose.
Library isolation
Libraries under libs/* must stay maximally isolated from host applications and external interfaces. A lib must not know host-owned integration details such as REST paths, /api routes, generated API clients, apps/chat/src/server-api, app contexts, auth/session/cookies, environment variables, feature flags, routing/navigation, analytics/telemetry, logging transports, persistence/storage keys and schemas, deployment/tenant/provider details, third-party SDK setup, platform bridges, or app-specific URL schemes.
Put application, backend, platform, and external-system knowledge at the application edge (apps/chat/src/server-api, app-level containers, providers, route handlers, or other app adapters). Pass data, resolved values, and behavior into libs through props, typed callbacks, or narrow interfaces. For example, a lib may accept iconUrl, resolveIconUrl, or onDownloadFile; it must not construct /api/v1/files/download?..., read app storage keys, initialize analytics, or decide navigation targets itself.
Exception: libs/chat-api-client is a generated OpenAPI client package. It may contain generated endpoint paths, DTOs, runtime transport code, and OpenAPI artifacts because that is its only purpose. Do not hand-edit generated client files or add app-specific behavior there; update the backend Swagger/OpenAPI source and regenerate with the repository OpenAPI scripts. Other hand-authored libs still must not import or wrap @epam/ai-dial-chat-api-client; apps consume it through app-level adapters such as apps/chat/src/server-api.
Second, narrower exception: libs/chat-hooks may depend on @epam/ai-dial-chat-api-client's types and operation signatures, and may contain the thin request/response logic that calling those operations requires (equivalent in shape to today's apps/chat/src/server-api/*.api.ts wrappers), because every DIAL-Core-backed chat application this library serves calls the same generated client against the same API. It may also depend on already-published, host-agnostic packages that describe DIAL Core's data shapes (@epam/ai-dial-chat-shared, @epam/ai-dial-share, @epam/ai-dial-quotations, @epam/ai-dial-source-panel, @epam/ai-dial-attachment-canvas). This exception does not extend further: libs/chat-hooks must still never construct or configure a client instance (base URL, auth headers, CSRF token) — every hook that calls DIAL Core accepts an already-configured client instance as a parameter — and must still never import app contexts, routing, auth/session/cookies, environment variables, feature flags, i18n, or UI-kit component rendering.
libs/chat-hooks holds non-rendering code only — hooks, functions, types and enums, never a component (it has no .tsx outside its tests). Two edges between chat-hooks and the feature libs are allowed on purpose, each with a limit that lint enforces:
chat-hooks→ feature libs.chat-hooksadapts DIAL Core data into the props feature libs render, so beyond the packages named above it may import a feature lib's types, enums and pure functions (today from@epam/ai-dial-catalog,@epam/ai-dial-skill-editor,@epam/ai-dial-scheduled-tasks,@epam/ai-dial-conversation-input,@epam/ai-dial-attachment-input,@epam/ai-dial-mcp-apps,@epam/ai-dial-publish-panel,@epam/ai-dial-usage-dashboard,@epam/ai-dial-projectsand@epam/ai-dial-chat-overlay). It never imports a feature lib's hook (use*) or component. The data-shape packages named above are not feature libs for this limit:chat-hooksmay call their hooks (useAttachmentCanvas,useHtmlTagAnnotationGroups).toolset-editor→chat-hooks. Among feature libs onlylibs/toolset-editorimports@epam/ai-dial-chat-hooks(getApiErrorDetailsand the toolset-auth enums). Every other feature lib takes behaviour through props and callbacks.
Three narrower exceptions — leaked third-party grid types (useGridEditingScroll), DIAL-Core response-to-display adapters in chat-hooks (the usage and scheduled-task display mappers), and the chat-hooks OAuth redirect-state sessionStorage key (TOOLSET_REDIRECT_STATE_KEY) — are defined in .claude/rules/libs.md "Narrow isolation exceptions"; they apply only there and only with a justification recorded in that change's design doc.
The boundaries lint enforces — one type:* tag per project, which kinds may import which, that only apps/chat and libs/chat-hooks import @epam/ai-dial-chat-api-client, and the two limits above — are configured in eslint.config.mjs, listed in docs/architecture.md "Module boundary rules", and proven by tools/module-boundaries.spec.mjs.
Working defaults
- Implementation work follows incremental slices with per-slice verification.
- Before merge (or on explicit review requests), run the five-axis quality review (
code-review-and-qualityskill). address-current-branch-review: fix requests do not authorize inline replies; reply only after the user explicitly asks and the pushed fix is visible in the PR.celebration-scene-ideas: include scene-specific performance budgets and use OpenSpec propose/apply when implementation is requested.- Before changing anything under
libs/*, check the library isolation rule above. Libs are also governed by.claude/rules/libs.md(manifest metadata,dependenciesvspeerDependencies, theexports/styles.csscontract, README shape, JSDoc,buildCssVarstheming) and.claude/rules/lib-styling.md— readlibs.mdbefore touching a lib manifest. A host must install one package and render without a peer laundry list or a bundler alias. - UI work is mobile-first. The named Tailwind breakpoints (
mobile,desktop) live intools/tailwind/theme.css; do not introducesmall_tablet:/large_tablet:/large_desktop:orsm:/md:/lg:/xl:prefixes. When a component must branch in JS, useuseIsMobilefrom@epam/ai-dial-chat-shared, neverwindow.innerWidth. For menu presentation only, useuseIsPhone(<768px); for bounded right overlays, useuseIsTablet(768?1279px). The scopedphone,tablet, andtablet-upvariants match these surface decisions; navigation, conversation panels, forms and page layout retainmobile/desktop.
Docs
Ground-truth design docs live in docs/; every app and lib owns a README.md that documents its public API. Use the dial-docs skill to find the one authoritative doc before changing or explaining documented behavior. When a change alters documented behavior, update that doc, any affected diagram, and docs/architecture.md when structure changes — in the same commit — then run npm run validate:docs. .claude/rules/docs.md has the full rule set and update matrix.
Cross-cutting UI rules
Details live in path-scoped rules; the short version applies everywhere:
- RTL (
.claude/rules/rtl.md): every app and lib supports Arabic and other RTL locales. Use logical Tailwind classes (ms-*,ps-*,inset-s-*,text-start,border-s-*,rounded-s-*) and CSS logical properties instead of physical ones; mirror directional icons withrtl:scale-x-[-1]; libs never read the language to decide direction. - Accessibility (
.claude/rules/a11y.md): target WCAG 2.1 AAA on all interactive UI by default; dynamic feedback goes through the kitLiveRegion, mounted before its text. - Lib strings (
i18n-stringsskill): inlibs/*every user-visible string comes from a*Labelsprop with an English default;apps/chatfills each one witht()and an enum key. - Lib colors and typography (
lib-themingskill): inlibs/*every color comes from a*Colorsprop asvar(--<prefix>-x, fallback)in the component's.module.scss, and everydial-*-textclass from a*ClassNameprop default — never hardcoded in lib JSX. - Search results (
.claude/rules/search-results-highlight.md): render matched text withHighlightfrom@epam/ai-dial-ui-kit, threading the query down assearchQuery. - UI kit (
.claude/rules/all-tsx.md): discover kit components only through the@epam/ai-dial-ui-kitMCP tools (searchEntity,getEntityDetails), never by grepping the package; always use 2.0 components over legacyDial*; passstroke={DIAL_KIT_ICON_STROKE}on every Tabler outline icon. The upgrade/breaking-change workflow is in the same file. - TypeScript (
.claude/rules/all-ts.md): no.js/.tsextensions in relative specifiers, string enums over literal unions,/* */for multi-line comments.
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
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.

