AGENTS.md@apps/web/src/components/chatA

AGENTS.md@apps/web/src/components/chat from nexu-io/open-design is an AGENTS.md file: the standing instructions coding agents read in that repo.

Install it, pinned
mdr add nexu-io/open-design/apps/web/src/components/chat/AGENTS.md@git:20260907.ad09d38

Pins git:20260907.ad09d38 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
AGENTS.md file
Repository
nexu-io/open-design
Path
apps/web/src/components/chat/AGENTS.md
Versions recorded
1
Latest version
git:20260907.ad09d38, committed Sep 7, 2026
Size
6,054 bytes
Repository stars
105,776
License
Apache-2.0

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# chat 组件维护规约

本目录是 chat 面板的组件所有者。技术设计与决策依据见 `specs/current/chat-panel-next.md`;
本文只讲**怎么写、怎么改、怎么验**。改本目录任何文件前先读完。

## 0. 界面上的字一律走 i18n

执行记录的动词与状态词(读取 / 新建 / 改写 / 搜索 / 执行 / 失败 / 进行中 / 思考中 /
已完成 / 运行失败 / N 处 / 执行计划 · N 步)已经建成 `chat.record.*` 这一组 key,
19 个语言 + `types.ts` 都补齐了。**新增任何用户可见的字,同样要补满 20 个文件** ——
`types.ts` 里没有的 key 过不了 typecheck,这是这条规约的强制点。

措辞以 wangchenglong 交付稿为准,不自己改写(产品的文案逐字照用)。

## 1. 分层:东西该放哪

```
packages/components/           通用 primitive(脱离 chat 语义仍通用)
apps/web/src/components/chat/
  primitives/                  chat 原子(跨 ≥3 个业务组件复用)
  <Component>.tsx              业务组件 + 共置 <Component>.module.css
apps/web/src/runtime/chat/     纯函数领域逻辑(无 JSX、无 DOM)
```

判断顺序:

1. 这东西**离开 chat 还通用吗**?→ 是,进 `packages/components`
2. 它**被 3 个以上 chat 业务组件用**吗?→ 是,进 `chat/primitives/`
3. 它**不碰 DOM、可纯函数测试**吗?→ 是,进 `runtime/chat/`
4. 否则就是业务组件,平铺在 `chat/` 下

**禁止**把产品布局或业务工作流上提到 `packages/components`。

## 1b. 执行记录这一族共用一个 CSS Module(别拆)

`primitives/record.module.css` 一个文件同时拥有 `Foldable` / `ToolRow` / `StatusMark` /
`SayText` / `FileButton` 的样式。**这是刻意的**,不是偷懒:

设计稿里这几个的尺寸是**互相咬合**的 —— 缩进量由嵌套层数决定(壳 → todo → 子项,
一层 11px、两层 33px)、工具行要抵掉壳自己的 `-7px` 外边距、竖线的起点按各自的 0 点
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add nexu-io/open-design/apps/web/src/components/chat/AGENTS.md@sha256:dd308d4dbe959bd4

The line at the top of this page pins the label git:20260907.ad09d38, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ozrriu3ymkwuwzbt.svg)](https://markdownregistry.com/a/art_ozrriu3ymkwuwzbt)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Sep 7, 2026.

versioncommittedcommitsizeaudit
git:20260907.ad09d38 latest2026-09-07 ad09d38 6,054 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (6054 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

nexu-io/open-design · 105,776 stars · license Apache-2.0 · pushed 2026-11-04 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ozrriu3ymkwuwzbt
GET https://markdownregistry.com/api/v1/resolve?ref=nexu-io/open-design/apps/web/src/components/chat/AGENTS.md
GET https://markdownregistry.com/api/v1/blob/dd308d4dbe959bd4ce0e8a7f6dd02082a1cca113dcf9dff5ad8f7c77c3d1e9a7

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.

More from nexu-io/open-design

od-contribute SKILL.md skill
nexu-io/open-design · .claude/skills/od-contribute/SKILL.md · One-click contribution flow for OpenDesign (nexu-io/open-design) — even for non-coders. Pick one of four cards (ship a…
git:20260818.f1a0b60 · audit A · 105,776 stars
AGENTS.md@.github AGENTS.md file
nexu-io/open-design · .github/AGENTS.md
git:20261022.2ba4585 · audit A · 105,776 stars
AGENTS.md AGENTS.md file
nexu-io/open-design · AGENTS.md
git:20261020.c722773 · audit A · 105,776 stars
CLAUDE.md CLAUDE.md file
nexu-io/open-design · CLAUDE.md
git:20260430.9b57c22 · audit B · 105,776 stars
AGENTS.md@apps AGENTS.md file
nexu-io/open-design · apps/AGENTS.md
git:20260903.1d21500 · audit A · 105,776 stars
AGENTS.md@apps/closure AGENTS.md file
nexu-io/open-design · apps/closure/AGENTS.md
git:20260825.d03bf69 · audit A · 105,776 stars
AGENTS.md@apps/daemon AGENTS.md file
nexu-io/open-design · apps/daemon/AGENTS.md
git:20260818.f1a0b60 · audit A · 105,776 stars
AGENTS.md@apps/daemon/src/critique AGENTS.md file
nexu-io/open-design · apps/daemon/src/critique/AGENTS.md
git:20260718.6b90486 · audit A · 105,776 stars
sample-plugin SKILL.md skill
nexu-io/open-design · apps/daemon/tests/fixtures/plugin-fixtures/sample-plugin/SKILL.md · Phase 1 sample plugin synthesizing a SKILL.md frontmatter for backwards-compat tests.
git:20260818.f1a0b60 · audit A · 105,776 stars
AGENTS.md@apps/packaged AGENTS.md file
nexu-io/open-design · apps/packaged/AGENTS.md
git:20260821.4b48f94 · audit A · 105,776 stars
AGENTS.md@apps/web/src/components/Theater AGENTS.md file
nexu-io/open-design · apps/web/src/components/Theater/AGENTS.md
git:20260718.6b90486 · audit A · 105,776 stars
AGENTS.md@design-systems/_schema AGENTS.md file
nexu-io/open-design · design-systems/_schema/AGENTS.md
git:20260819.16fad1c · audit A · 105,776 stars

Every file in nexu-io/open-design

Browse by kind, by grade A, or by owner.