ds4-control: Instructions file for Codex

AGENTS.md

ds4-control AGENTS.md is an instructions file for Codex, OpenCode from notatestuser/ds4-control. It costs 2,907 tokens per session, scanned C, original, MIT.

A repository instruction guide for DS4 Control, a macOS menu-bar app that supervises a local DeepSeek V4 server on Apple Silicon. It records the app's architecture, supported model files, and development details.

In plain words
What is it for?
Use it when modifying the app's server supervision, model downloads, system metrics, chat interface, or coding-agent integration.
Why use it?
It gives coding agents the project context needed to maintain the app without assuming that it runs the AI model itself.

Instructions file for CodexOpenCode

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

This is notatestuser/ds4-control's own configuration. It tells Codex and OpenCode how to work on ds4-control 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 ds4-control configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/luke/dev26/ds4_workspace/ds4-control.

Reuse

Borrowing it

Nothing to install: this file belongs to notatestuser/ds4-control. 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/notatestuser/ds4-control/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/notatestuser/ds4-control

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 ds4-control AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/notatestuser/ds4-control/agents-md"><img src="https://agentmods.dev/badge/instructions/notatestuser/ds4-control/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,907 This file is loaded in full into every session.
When invoked 2,907 The same file — it is already loaded in full.
Security scan C 1 finding. 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.02907 $0.02907
Opus 5.5 $0.01163 $0.01163
Sonnet 5.5 $0.00581 $0.00581
Haiku 4.5 $0.00291 $0.00291

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

Security

Grade C, and why

ds4-control AGENTS.md scanned grade C with 1 finding 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 10d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- headroom:rtk-instructions -->
AGENTS.md · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DS4 Control agent notes

Purpose

A macOS menu-bar control pane for DeepSeek V4 running locally on Apple Silicon via antirez/ds4. It launches, supervises, and monitors a local ds4-server child process; lets you pick V4 Pro (0813), V4.1 Flash 1017, or V4 Flash (0731); downloads GGUF weights; shows live unified-memory / GPU / CPU / power widgets; provides a built-in chat; and can open a coding agent (pi or claude) in Terminal pointed at the local server.

It does no embedded inference — all inference is delegated to ds4-server. This app only supervises that process and surfaces system metrics + a chat/agent front end.

DeepSeek V4 release maintenance

The app pins the official Flash 0731, V4.1 Flash 1017, and Pro 0813 GGUF generations. Pro 0813's Hub LFS metadata reports exactly 464,627,334,560 bytes — the same byte size as the preview file but a different content hash — and this value is baked into Quant.ggufBytes. V4.1 Flash's exact totals, part sizes, and SHA-256 digests live in Quant (ggufBytes, downloadParts, sha256); its resident main-weight byte counts subtract the 202,758,032,400 B of disk-only Engram tables that ds4 munmaps at load.

external/ds4 is the upstream antirez/ds4 submodule, pinned to commit a1012463383a09c6d11f8164218e0ee45e267acf. THINK_MAX is applied on top via patches/ds4-think-max.patch (scripts/apply-ds4-patches.sh) because upstream still emits the official 0731/0813 high prefix for reasoning_effort: max (antirez/ds4#635); it still applies at this pin and remains 0731/Pro-only (V4.1 uses numeric reasoning effort and is unaffected). The Metal context-allocation formula, shared graph workspace, per-session graph allocations, and persistent backend-scratch bounds are rechecked against this revision before retaining the 0731/Pro Feasibility path and memory tiers. V4.1 has its own estimator (ds41_graph_bytes / ds41_memory_admit_for_host), mirrored as ds41GraphBytes + v41FixedWiredMB in Feasibility.swift, with ds41NonRoutedBytes and the two ds41Q*PrefillHeadroomBytes constants derived from the quant recipe and verified against external/ds4 source. The V4.1 graph header uses sizeof(struct ds41_graph) == 51,192, the exact non-routed tensor spans total 10,060,841,408 B, and admission enforces ds4's host 7/8 budget alongside the live wired limit. 1017 Q2 is one GGUF; MXFP4 has nine standard GGUF shards, pinned to Hub revision 9dcee51692e6540f697141fc98b097e3c96492a3. The native assembler parses and rewrites their headers, metadata, and tensor offsets; never concatenate standard shards. A shard can be reclaimed only after its tensors and assembly checkpoint are durable. Resumable incremental assembly peaks around 562 GiB plus a 1 GiB margin and produces a 467 GiB file; no Python is needed. If a future ds4 bump changes any allocator or shape assumption, re-verify Feasibility.swift and the feasibility/variant/downloader/assembler tests before release.

Read the full file on GitHub · 158 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. 10d ago Changed · +19 lines · +479 tokens per session 8011bc3818da
  2. 1mo ago First seen · 139 lines · 2,428 tokens per session scan C 1f71e5b6fc20

Subscribe to this mod's changes

ds4-control AGENTS.md is an instructions file published in the GitHub repository notatestuser/ds4-control (827 stars, last pushed 11d ago), licensed MIT. It adds 2,907 tokens to every session, about $0.0116 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-17.

Related

ds4-control AGENTS.md compared with instructions from other repositories

ds4-control AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ds4-control AGENTS.mdnotatestuser/ds4-controlInstructions file82711d agoMITC2,907Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode