dsh-launcher: Instructions file for Codex

AGENTS.md

dsh-launcher AGENTS.md is an instructions file for Codex, OpenCode from Ruler4396/dsh-launcher. It costs 2,230 tokens per session, scanned A, original, MIT.

A repository instruction file for AI coding agents working on a Windows desktop launcher. It describes required architecture, process handling, file access, and testing rules.

In plain words
What is it for?
Following repository architecture and testing requirements, locating the right modules, handling external processes and locked files, and checking changes before review.
Why use it?
It gives agents the project’s non-negotiable rules before they change code, reducing mistakes that could break process control, Windows integration, or tests.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is Ruler4396/dsh-launcher's own configuration. It tells Codex and OpenCode how to work on dsh-launcher itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dsh-launcher configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Ruler4396/dsh-launcher/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Ruler4396/dsh-launcher

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for dsh-launcher AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ruler4396/dsh-launcher/agents-md/github.svg)](https://agentmods.dev/instructions/ruler4396/dsh-launcher/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/ruler4396/dsh-launcher/agents-md"><img src="https://agentmods.dev/badge/instructions/ruler4396/dsh-launcher/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.

agentmods 80×15 button for dsh-launcher AGENTS.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,230 This file is loaded in full into every session.
When invoked 2,230 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.02230 $0.02230
Opus 5.5 $0.00892 $0.00892
Sonnet 5.5 $0.00446 $0.00446
Haiku 4.5 $0.00223 $0.00223

Measured 1mo ago against content hash a794918e7fe8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

AGENTS.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 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/taskkill) node.exe 直启 .js 入口(ADR-021:严禁 cmd.exe / .cmd shim 中间层——引号剥离/GBK 乱码/Kill 不干净三类陷阱;System32 原生 exe 如 taskkill/netstat 可直启);三必须不变:重定向 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 最后防线)
给用例分一层([Trait("Category", "RealOS")]) 逐字拼写、键名必须叫 Category(xUnit 区分大小写,拼错就静默躲过分层);一条用例只在一层跑;两个 filter 只在 scripts/test.ps1 存一份;1b 闸会红
断言"仓库里某个真实文件长什么样" 走 tests/DshShell.Tests/RepoFile.cs(找不到就抛);禁止 if (!File.Exists) return;——那句 return 就是把断言蒸发掉(2026-09-20 实测 3 条因此从未执行)
加/改 workflow 必须带 concurrency + cancel-in-progress;声称"我们有 E2E/真机回归"之前,先答出它上一次真实运行的日期(gh run list --workflow <名> --limit 1)
建本地沙盒/测试安装环境 只用仓库根 sandbox/ 下子目录(单一沙盒铁律,见 docs/00-ARCHITECTURE-GUARDRAILS-MANDATORY.md 核心约束六);禁止仓库外另建沙盒;%TEMP% 瞬态隔离用例(neg/drill/CleanData)保持不动

Read the full file on GitHub · 87 lines

Changes

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.

  1. 1mo ago Changed · -1 lines · -20 tokens per session a794918e7fe8
  2. 1mo ago Changed · +6 lines · +411 tokens per session e7dfda292e45
  3. 1mo ago Changed · +171 tokens per session 3f3bb98a1c30
  4. 2mo ago Changed · +1 lines · +163 tokens per session 456714c215e9
  5. 2mo ago First seen · 81 lines · 1,505 tokens per session scan A 7364f88d0d5e

Subscribe to this mod's changes

dsh-launcher AGENTS.md is an instructions file published in the GitHub repository Ruler4396/dsh-launcher (195 stars, last pushed 1mo ago), licensed MIT. It adds 2,230 tokens to every session, about $0.0089 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.

Related

dsh-launcher AGENTS.md compared with instructions from other repositories

dsh-launcher AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dsh-launcher AGENTS.mdRuler4396/dsh-launcherInstructions file1951mo agoMITA2,230Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file275k2d agoMITA4,313Codex, OpenCode