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 1,505 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,505 This file is loaded in full into every session.
When invoked 1,505 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01505 $0.01505
Opus 5 $0.00753 $0.00753
Sonnet 5 $0.00301 $0.00301
Haiku 4.5 $0.00151 $0.00151

Measured 6d ago against content hash 7364f88d0d5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 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.

AGENTS.md · 81 lines

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-selftestUiTestHookE2ETests 验证 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 等 UI
  • tests/DshShell.Tests/ — 单测 + ShellLogic 契约测试 + LauncherAppScenarioTests(Headless 状态机)
  • tests/DshShell.E2E/ — 真实 GUI E2E(UIA/FlaUI)
  • scripts/test.ps1 — CI 静态断言守护神(含 shell 一致性断言,禁止削弱)

Read the full file on GitHub · 81 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. 6d 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 (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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,182 tokens

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

microsoft/vscode · 6,785 tokens

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

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens