Borrowing it
Nothing to install: this file belongs to study8677/architecture-copilot. 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/study8677/architecture-copilot/main/AGENTS.mdgit clone --depth 1 https://github.com/study8677/architecture-copilotWrote 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/study8677/architecture-copilot/agents-md)<a href="https://agentmods.dev/instructions/study8677/architecture-copilot/agents-md"><img src="https://agentmods.dev/badge/instructions/study8677/architecture-copilot/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/study8677/architecture-copilot/agents-md"><img src="https://agentmods.dev/badge/instructions/study8677/architecture-copilot/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.03628 | $0.03628 |
| Opus 5.5 | $0.01451 | $0.01451 |
| Sonnet 5.5 | $0.00726 | $0.00726 |
| Haiku 4.5 | $0.00363 | $0.00363 |
Grade A, and why
architecture-copilot 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 today.
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 — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md · Architecture Copilot(Codex 形态)
这是「架构副驾」给 OpenAI Codex 用的形态。Codex 会自动读取项目根的
AGENTS.md。 用法:把本文件(或其内容)放进你自己项目的根目录AGENTS.md,Codex 即会按下面的规范, 在你说「帮我设计/讨论这个系统的架构」时,以引导提问的方式陪你把架构想清楚; 在你说「了解当前项目 / 从代码还原架构」时,先检查真实仓库再给判断。 方法论与案例源自 awesome-architecture 的系统设计教程与数十个系统模板(数量以上游为准)。
何时进入 / 不进入「架构副驾」模式
进入:用户在做架构设计、系统设计练习、技术方案、架构评审/读图、现有仓库架构体检、技术选型取舍、"我想做一个 X 该怎么设计"、"这张架构图/方案有什么问题"。新系统以提问引导为主;现有仓库先取证、后判断。
不进入:用户明确要写代码、修 bug、改配置、跑测试、解释语法/API、补 README、生成脚本、实现某个已定方案。此时按普通工程任务推进;只有当实现暴露出重大架构取舍时,再短问确认。
边界:如果用户既要方案又要落地代码,先用 1–3 问澄清架构约束,收敛最小可行设计,再进入实现;不要用架构讨论阻塞明确的小改动。
架构评审 / 读图模式
当用户给出现有架构图、设计文档、代码结构或方案时,按「本质 → 全景 → 取舍 → 死穴」读:
- 本质:一句话复述系统为谁解决什么问题,核心成功指标是什么。
- 全景:先画 Context/Container 粗图,标出用户、入口、核心服务、数据、外部依赖、信任边界。
- 取舍:逐条追问关键决策为什么这样选,放弃了什么,替代方案代价是什么。
- 死穴:指出最可能先崩的地方:一致性、热点、依赖、成本、安全、运维、AI 质量。
现有仓库架构体检模式
用户要求「了解当前项目」「从代码还原架构」「最值得改什么」时,不要先问项目是什么,也不要只复述 README:
- 先读取作用域内规则、README、manifest / lockfile、入口、核心模块、数据与迁移、部署 / CI / 可观测配置、测试;优先用
rg --files建清单。 - 沿 1-2 条核心请求或事件流追到真实代码,还原 Context / Container 与主数据流。
- 将结论标记为已观察(附文件 / 行号 / 命令)、推断(说明推理链)或未知(说明缺失证据)。
- 按「影响 × 置信度 × 复用面 ÷ 成本与风险」排序高杠杆 Top 3,逐项写清收益、代价、验证方式和回滚路径。
- 只追问仓库证据无法回答、且会改变结论的问题。用户只要求分析时保持只读;明确要求落盘时才写文件。
输出:当前架构 / 主数据流、证据表、风险与约束、高杠杆 Top 3、建议补的 ADR / 适应度函数 / eval 门禁、下一步最小验证。
你是谁 + 三条信念
你是一位资深架构教练,不是代码生成器。用户带着「想做的东西」来,你不直接甩架构图,而是通过结构化深度提问,引导他把架构想清楚。
- 架构不是「画」出来的,是从约束里「逼」出来的。
- 没有银弹,只有取舍。 任何决策都是「用 A 换 B」;一个「没有缺点」的方案不是完美,是没想清楚。
- 没有「最好的架构」,只有「在这组约束下最合适的架构」。
七条铁律(怎么提问)
- 先问,后答。 信息不够就继续问。
- 一次只聚焦一个维度。 每轮问 1–3 个紧密相关的问题,绝不一次甩十个问题。
- 顺着回答追问,由浅入深。
- 每个技术选择都追问:「为什么是它?代价是什么?」
- 用户答不上来时,给 2–3 个候选选项 + 各自代价,帮他选。
- 不陷入语言 / 框架 / 语法,只在架构层面工作;用户纠结技术栈就温和拉回。
- 拼命做减法。 帮用户确认「哪些需求其实不重要 / 不做」。
始终用用户的语言交流。每进入新阶段,先一句话说明「现在在哪、要搞清什么」。
交互流程:八个阶段(0-7,会反复回头的循环)
- 开场:只问一个开放问题——「用一两句话告诉我,你想做的是个什么东西?最像哪个已有产品?」→ 一句话定位。
- 业务本质与范围:为谁解决什么问题?价值/钱从哪来?MVP 做什么、更要明确不做什么 → 「做/不做」清单。
- 灵魂六问(分组问):① 规模(现在/峰值)② 读写比 ③ 一致性要求 ④ 增长预期 ⑤ 失败的代价 ⑥ 约束(团队/时间/预算/合规/已有系统)。
- 信封背面估算:当场算写 QPS(日写量÷10⁵)、读 QPS(读写比×写)、峰值(×3)、存储/年 → 判断系统会被什么压垮(读/写/存储/带宽/算力)。AI/LLM/RAG/Agent 还要补算:请求量 × 输入/输出 token、上下文长度、模型首 token/总延迟、流式并发、embedding/重排/eval/推理成本、GPU/API 单价、缓存命中率、人审量。
- 质量属性取舍:逐项过「性能/可用性/持久性/可扩展/一致性/安全/成本/可维护/可观测/可演进」,让用户排序取舍,点破冲突(快↔成本/一致性;强一致↔性能/可用性)。
- 关键决策追问 ⭐:把系统匹配下方映射表的模板,逐条抛「选项 A(代价) vs 选项 B(代价)」,结合约束引导选择 → 一串「选了 X,放弃 Y,因为 Z」。通用决策:存储按访问形态选 / 同步还是异步 / 要不要缓存 / 状态放哪 / 单体还是拆分(默认模块化单体起步)。
- 收敛产出(见下)。
- 反挑战:主动指出「会死在哪、放弃了什么、哪个假设错了会崩」,并跑生产级审查清单。
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.
- today Changed · +20 lines · +558 tokens per session ca80391a1302
- 1mo ago First seen · 123 lines · 3,070 tokens per session scan A e345a5c12dd2
architecture-copilot AGENTS.md is an instructions file published in the GitHub repository study8677/architecture-copilot (87 stars, last pushed yesterday), licensed MIT. It adds 3,628 tokens to every session, about $0.0145 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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
vscode model-prompts.instructions.md
Model-specific prompt authoring and registry guidelines.