Files
cindy/docs/dev-rules/README.md
fmfsaisai a9b0957893 docs(dev-rules): cover notification-driven, remote and UI-write paths in performance rules
The 2026-11 remote stall came from a composer prompt that re-read a ~1 MB
plugin snapshot on every remote resource push. The §8 rules added by #9683
only covered local reads, missed re-reads triggered by change notifications,
and some clauses would have rejected the correct fixes in #8928, #9936 and
#9989.

engineering-conventions §8:
- Apply §8 to Desktop viewers reading another computer's data; channel
  pressure is still reviewed against server-channel-review. Mobile is
  reviewed through server-channel-review.
- §8.1: share identical reads across components, keep resident hints
  light, re-check caches after disconnect or reconnect, and treat an empty
  single-instance lookup as "cannot answer" (fall back to list() once per
  lookup, match the same instance key).
- §8.2: names do not prove a read is read-only; bound UI-triggered
  persistent writes (coalesce replace-only values, cap in-flight requests,
  confirm after commit, no writes after a failed prior read, count
  cross-device save calls, state how concurrent writers resolve).
- §8.3: hidden-but-mounted components do not keep shared reads alive;
  allow bounded retention of cache and invalidation listeners after the
  last consumer leaves; one component's mount or offline check must not
  invalidate shared data, and unknown connection state is not offline;
  accepted writes may finish after unmount; components destroyed on hide
  must restore the state users expect to keep; do not rely on
  document.visibilityState alone for hidden windows.
- §8.5: the single-instance fallback is not a new hot-path list(); handlers
  include device-link and page message handlers.
- New §8.6 for notification-driven re-reads: filter, coalesce, no
  unbounded retry, count host-side work, verify under sustained
  notifications with real presence sources.
- §8.7: budgets are baselines for existing paths; list payloads may carry
  icon references but not bytes or base64.

Also fix two #9683 rules that contradicted the merged code (per-page calls
to readLocalInstallSnapshot, icon metadata in list payloads), describe the
remote composer consent query in plugin-security §5.4, add a push-source
check and cross-references to server-channel-review, and update REVIEW.md,
the PR template and the indexes.

The clauses were checked by replaying #7924's composer prompt, the first
#8928 commit, #9936 and #9989 with an independent reviewer: the real
problems were caught and the correct designs pass.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: fmfsaisai <fmfsaisai@gmail.com>
2026-11-12 18:34:31 +08:00

4.3 KiB
Raw Permalink Blame History

工程专题

架构原则解释职责与状态如何划分,下列文档保存具体契约与操作 入口。修改相关路径前先读正文,涉及专项确认的变更尤其如此。模块内约束就近写在嵌套 AGENTS.md 或实现旁,跨模块契约在这里维护,不两处复述。

文档保留产品特有的工程选择、原因与契约,验证由类型、测试和脚本负责;整理原则见 开发工作流 §5,测试的价值与预算见工程约定。

主题 正文
Desktop、Mobile、maker-core 模块内的触发条件 Desktop、Mobile、maker-core 的嵌套 AGENTS.md;专题正文不在模块内重复
目录职责、按用户行为定位公共入口与测试、开发环境 仓库地图、环境准备
已发生过的任务体验回归、测试入口与运行命令 任务回归台账
Desktop 启动、重启与验证 桌面开发
免登录 UI 模拟数据、--mock 启动、数据正本与写入边界 UI 模拟数据
Mobile 开发、模拟器、原生配置/依赖与冷更边界 手机开发
Renderer、preload、窗口、IPC、CSP 与特权边界 Electron 进程边界
凭证、持久数据、临时文件与测试目录 本地存储
媒体生成、导入、附件、缓存、协议与回收 媒体存储
Browser Use 工具层、配方目录、外链处理与三种浏览器后端 Browser Use
数据库 schema、migration、companion 与运行期访问 数据库
模型配置架构、下发、覆盖、价格与默认值 模型配置入口、运行细则
Agent 编排、prompt、tool / MCP、事件、model 映射与 usage maker-core 与 system prompt 确认
Pi 集成、权限、配置、桥接与原生能力非退化 Pi harness
Orca 多 Agent 协同 Orca 架构
个人 IM 与官方 hook 的入站、排队、插话、交互与收尾 IM 轮次
插件基座、沙箱、权限、slot、打包、manifest、安装、读取/扫描预算与作者契约 插件安全、兼容与合并确认
插件花名册、ghost 发现链、可见性与作者契约 渐进式发现
插件持久 Library、binding、迁移、回收站与面板投影 插件 Library
客户端自动更新 更新器与 owner 确认
日志、IPC 错误、main 业务、测试价值与性能预算、客户端读取/扫描、变化通知后的刷新与界面写入、跨平台与 i18n、登记点与合并冲突 工程约定
日志采集、脱敏、上报、行格式与崩溃标记 日志上报
本地协议包、插件分发来源、device-link、relay、wire protocol 与 allowlist 协议兼容
服务器请求、订阅、同步、轮询与重试的调用方式、共享压力及缺陷审查 服务器通道调用审查
package 依赖、Main 模块加载、共用主体与桌面/Host 装配、布局树 架构原则与不变量
Settings、配置文件、偏好、运行时 profile 与能力开关 配置与 override
workdir、Agent 进程、任务数据、IPC/推送与断链恢复 远程与手机适配
托管 worktree、提交、PR、直推、review、项目知识归属与文档整理原则 开发工作流

可选的开发者高级工具

仅在维护自己的源码版 Cindy 时使用:开发者自用构建与签名交付。 这不是普通用户的安装、更新或 Push 配置前提。