Borrowing it
Nothing to install: this file belongs to Ruler4396/dsh-launcher. 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/Ruler4396/dsh-launcher/master/AGENTS.mdgit clone --depth 1 https://github.com/Ruler4396/dsh-launcherWrote 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/ruler4396/dsh-launcher/agents-md)<a href="https://agentmods.dev/instructions/ruler4396/dsh-launcher/agents-md"><img src="https://agentmods.dev/badge/instructions/ruler4396/dsh-launcher/agents-md.svg" alt="Measured on agentmods" 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.01505 | $0.01505 |
| Opus 5 | $0.00753 | $0.00753 |
| Sonnet 5 | $0.00301 | $0.00301 |
| Haiku 4.5 | $0.00151 | $0.00151 |
Grade A, and why
dsh-launcher 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 6d 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — 对本仓库中所有 AI Agent 的强制指示
开始任何任务前,你必须先完整阅读并遵守本文件,以及它指向的架构铁律文档。
🚨 第一优先:架构铁律(不读就动代码 = 违规)
本仓库是 dsh-launcher——一个涉及复杂进程编排、Win32 底层交互与 WebView2 渲染的 Windows 桌面启动器。
在修改任何 .cs 代码、编写测试、调整构建脚本之前,你必须先通读:
docs/00-ARCHITECTURE-GUARDRAILS-MANDATORY.md← 架构与工程维护铁律 v1.0(强制约束,非建议)docs/TESTING-GUARDRAILS.md← 测试体系铁律(SDET 强制约束,Bug 驱动复现)
这份文档是 Hard Constraints(硬约束),不是可选项。违反其中任一条款都会被 Code Review 驳回或 CI 拦截。它规定了:组合根边界、Manager 依赖方向、状态机单一真相源、进程调用的"三必须"、异常透明性、Win32 NC 消息拦截、WebView2 崩溃隔离、契约测试先行等。
测试铁律(尤其重要):禁止"Mock 幻觉"——涉及进程/文件锁/编码的测试必须补 Category=RealOS 真实 OS 交互测试;修复 P0/P1 环境 Bug 后必须写 Regression_<Bug> 零 Mock 复现测试,否则不予合并(详见 docs/TESTING-GUARDRAILS.md)。
🔥 快速合规清单(动代码前自检)
| 你将要做什么 | 必须先满足 |
|---|---|
改 Program.cs |
只允许组合根 + UI 消息泵;业务逻辑下沉到 Managers//Lifecycle//ShellLogic.cs |
| 调用外部进程(npm/node/wscript/taskkill) | cmd.exe /c 包装 + 重定向 stdout/stderr + 超时 + 超时 Kill(entireProcessTree) |
| 读可能被锁的日志文件 | FileShare.ReadWrite |
| 写核心状态文件 | ShellLogic.AtomicWrite(.tmp + File.Move),禁止裸 File.WriteAllText |
| 调用 npm/node | 用 RuntimeManager 解析的绝对路径,禁止盲目依赖 PATH |
加 catch 块 |
禁止空 catch {} / catch { return false; };区分 Warn 降级 vs Error+E9001 |
| 写任何用户可见错误弹窗 | 必须带 [E####] 错误码 |
修改 ShellLogic 纯函数 |
先补/更新 xUnit 契约测试 |
| 修改生命周期流转 | 在 LauncherAppScenarioTests 补 Headless 测试 |
| 修改窗口布局/DPI/无边框 | 用 --ui-selftest 或 UiTestHookE2ETests 验证 0px 间隙,禁肉眼 |
动 test.ps1 静态断言 |
严禁注释或削弱(God Object 最后防线) |
🧭 项目地图(定位代码)
src/DshShell/Program.cs— 组合根(仅启动 + 消息泵,业务下沉)src/DshShell/Managers/—ServiceManager/RuntimeManager/WebViewManager(互不引用,经LauncherApp注入)src/DshShell/Lifecycle/—LauncherLifecycle状态机(LifecycleState枚举 +Triggers)src/DshShell/ShellLogic.cs— 所有纯逻辑(static纯函数 + 契约测试)src/DshShell/Windows/—DshShellForm/SplashForm等 UItests/DshShell.Tests/— 单测 +ShellLogic契约测试 +LauncherAppScenarioTests(Headless 状态机)tests/DshShell.E2E/— 真实 GUI E2E(UIA/FlaUI)scripts/test.ps1— CI 静态断言守护神(含 shell 一致性断言,禁止削弱)
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.
- 6d ago First seen · 81 lines · 1,505 tokens per session scan A 7364f88d0d5e
dsh-launcher AGENTS.md is an instructions file published in the GitHub repository Ruler4396/dsh-launcher (194 stars, last pushed 2d ago), licensed MIT. It adds 1,505 tokens to every session, about $0.0075 per session on Opus 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
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.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
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).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
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.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.