Borrowing it
Nothing to install: this file belongs to whynusn/typetype. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/whynusn/typetype/main/AGENTS.mdgit clone --depth 1 https://github.com/whynusn/typetypeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/whynusn/typetype/agents-md)<a href="https://agentmods.dev/instructions/whynusn/typetype/agents-md"><img src="https://agentmods.dev/badge/instructions/whynusn/typetype/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/whynusn/typetype/agents-md"><img src="https://agentmods.dev/badge/instructions/whynusn/typetype/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.19976 | $0.19976 |
| Opus 5.5 | $0.07990 | $0.07990 |
| Sonnet 5.5 | $0.03995 | $0.03995 |
| Haiku 4.5 | $0.01998 | $0.01998 |
Grade A, and why
typetype AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 743 lines — stays where its author put it; the contents beside it link to each section on GitHub.
typetype 项目开发指南
📍 文档导航卡(你在这里)
本文档面向 AI 开发者,记录编码规范和已知陷阱。
| 当前文档 | 其他核心文档 | 快速链接 |
|---|---|---|
| 本文 — 开发约束、编码规范、已知陷阱 | README.md — 快速入门ARCHITECTURE.md — 架构权威 | 代码风格已知陷阱 |
🧭 AI 阅读顺序
- 本文档 §3 代码风格 + §8 已知陷阱 — 编码约束和常见坑位
- ARCHITECTURE.md — 架构分层、数据流、依赖规则
- docs/reference/README.md — 配置/QML/API 速查
- 本文档 §4-7 — 测试策略、平台权限、CI
- docs/history/ — 历史功能设计文档(已完成,仅作背景参考)
已熟悉项目后,日常开发只需查阅 §3 代码风格 + §8 已知陷阱 即可。
📚 文档维护指南
文档职责速查
| 文档 | 角色 | 什么时候更新 |
|---|---|---|
ARCHITECTURE.md |
架构事实来源 | 新增/删除文件、架构变更、新架构陷阱 |
| 本文档 | AI 开发约束与陷阱集 | 新坑位、编码规范变化、验证要求更新 |
docs/reference/* |
速查表 | 配置字段、Bridge Slot、API 端点变化 |
docs/decisions/* |
架构决策记录(ADR) | 做出重大架构决策 |
docs/history/* |
历史设计文档归档(冻结) | 完成重大功能、修复复杂 bug |
CHANGELOG.md |
发布历史 | 版本发布或用户可见变更 |
权威矩阵
摘要;完整定义(含跨维度冲突处理)见 docs/meta/README.md。
事实可靠性链:源码 > ARCHITECTURE.md > reference/* > decisions/* > AGENTS.md > guides/* > history/*
操作优先级链:AGENTS.md > guides/* > ARCHITECTURE.md > decisions/* > reference/* > history/*
修改代码后的文档更新流程
改完代码
↓
判断变更类型(见上表;逐项映射见 docs/meta/README.md § 同步规则)
↓
更新对应文档
↓
验证:运行 docs/meta/README.md § 验证清单
提交前验证清单
-
ARCHITECTURE.md目录结构与src/backend/实际文件一致 -
docs/reference/中的表格与代码一致 -
ARCHITECTURE.md陷阱覆盖最新发现 - 所有内部链接无断链
- 本文档陷阱描述准确
-
CHANGELOG.md已更新(若涉及用户可见变更)
1. 开发环境与命令
字体裁剪
| 字体 | 原始大小 | 裁剪后大小 | 减少 |
|---|---|---|---|
| HarmonyOS Sans SC Regular | 8.2 MB | 504 KB | ~94% |
| LXGW WenKai Regular | 25.4 MB | 880 KB | ~97% |
打包时使用 *-subset.ttf 而非原始字体。
💬 用户快捷操作指令
| 用户说 | AI 执行 |
|---|---|
| "项目概览" | 阅读 README 摘要 + ARCHITECTURE 一句话理解,汇总输出 |
| "同步文档" | 按"代码变更→文档更新映射"逐项检查更新 |
| "检查文档" | 运行 scripts/verify-framework.sh,汇总结果 |
| "前端冒烟" | 运行 uv run python -m ui_probe.smoke --report ui_report.json(PYTHONPATH=tools),汇总加载失败/绑定环/警告 |
| "前端快照" | 运行 python -m ui_probe.snapshot --target <qml> [--pretty],读结构化对象树(type/几何/文本/属性)判断界面实况 |
| "真机验收" | 运行 python -m ui_probe.app_run --out app_report.json,真实客户端离屏启动 + 窗口快照 + QML 消息捕获(默认只写一次性隔离 HOME,加 --no-isolate 才碰真实数据) |
| "跑场景" | 运行 python -m ui_probe.scenario --all --out scenarios.json(或 --scenario <file>),用 YAML 场景驱动真实客户端/隔离组件走核心流程(12 条 / 152 步) |
| "一键验收" | 运行 python -m ui_probe.suite --out ui_report.json,分层跑冒烟/快照/真机/场景/静态规则并汇总判定 |
| "记录决策" | 在 docs/decisions/ 创建 ADR |
| "更新 CHANGELOG" | 检查 git 提交,追加版本条目 |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 19d ago Changed · +2 lines · +407 tokens per session ef94f2011d7a
- 21d ago Changed · +94 lines · +1,574 tokens per session 08a36121ca65
- 22d ago Changed · +72 lines · +2,240 tokens per session 6300394650fb
- 2mo ago First seen · 575 lines · 15,755 tokens per session scan A 155321d12a52
typetype AGENTS.md is an instructions file published in the GitHub repository whynusn/typetype (14 stars, last pushed 19d ago), licensed MIT. It adds 19,976 tokens to every session, about $0.0799 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
typetype AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| typetype AGENTS.mdwhynusn/typetype | Instructions file | 14 | 19d ago | MIT | A | 19,976 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |