CAD-MAX: Instructions file for Codex

AGENTS.md

CAD-MAX AGENTS.md is an instructions file for Codex, OpenCode from ling5477/CAD-MAX. It costs 1,741 tokens per session, scanned A, original, MIT.

A set of instructions for coding agents working on the CAD-MAX repository, covering project facts, task limits, module boundaries, safety, testing, and Git or CI rules.

In plain words
What is it for?
Use it to guide repository changes, audits, reviews, testing, evidence recording, and decisions about which files and project phases are in scope.
Why use it?
It gives the agent one agreed source of truth and prevents unplanned changes, unsafe actions, and unsupported claims that work has passed validation.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to ling5477/CAD-MAX. 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/ling5477/CAD-MAX/dev/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/ling5477/CAD-MAX

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 CAD-MAX AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ling5477/cad-max/agents-md"><img src="https://agentmods.dev/badge/instructions/ling5477/cad-max/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,741 This file is loaded in full into every session.
When invoked 1,741 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.01741 $0.01741
Opus 5.5 $0.00696 $0.00696
Sonnet 5.5 $0.00348 $0.00348
Haiku 4.5 $0.00174 $0.00174

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

Security

Grade A, and why

CAD-MAX 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 2mo 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 · 119 lines

How it starts

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

AGENTS(CAD-MAX 开发规范)

目的:让开发者与编程代理在 CAD-MAX 中遵循同一事实源、安全边界、模块边界、验证和 Git/CI 纪律。

1. 当前事实源

  • 每轮任务先读取 docs/current/STATUS.md 顶部的 cad-max-current-authority 机器可读区块。
  • STATUS.md 是当前 Phase、下一动作和安全能力状态的唯一 authority。
  • docs/current/ROADMAP.md 只定义下一允许动作,不覆盖 STATUS.md。
  • README.md 与 docs/current/README.md 只提供入口,不复制独立的阶段判定。
  • docs/current/TESTING.md 与 docs/current/WORKLOG.md 是 append-only evidence ledger,不参与当前阶段判定。
  • docs/current/PHASE_1_AUTOCAD_CONNECTION_PLAN.md 定义 Phase 1 work-batch 顺序,但不推进 Phase。
  • scripts/docs/governance-workflow-contract.json 是 authority schema、work-batch lifecycle、evidence 命名和 hard blocker 的机器合同;checker 必须读取它,不得复制状态列表。
  • docs/current/evidence/phase-1/** 保存不可覆盖 attempt evidence,不决定当前 Phase。
  • current 文档互相冲突时,停止写操作并报告 BLOCKED / CURRENT_AUTHORITY_CONFLICT。

2. 任务边界

开始前必须明确 repository、target files、excluded files、风险和验收标准,并执行:

Get-Location
git status --short
git branch --show-current

默认规则:

  • 最小变更,不顺手重构、格式化或升级依赖。
  • 不覆盖用户已有改动。
  • review-only / audit-only 默认不修改文件。
  • 任务开始时必须明确 target files、excluded files、docs budget、expected output 与 rollback boundary。
  • 未执行的验证不得写成通过。
  • 发现额外问题只记录;仅当其阻塞当前验收时做最小修复。

3. 模块边界

  • src/python/cad_max_mcp:MCP transport、配置、后端选择、客户端安全响应。
  • contracts:语言无关 JSON Schema,不依赖 Python、.NET 或 Autodesk 类型。
  • CadMax.Contracts:C# wire contract,必须与 JSON/Python camelCase 语义一致。
  • CadMax.Bridge.Core:校验、注册、调度、超时、取消和结构化异常映射。
  • CadMax.Bridge.Host:仅限 localhost 的开发/测试 Host。
  • CadMax.AutoCAD.Plugin:未来 Autodesk Managed .NET API 边界;不得提交 Autodesk DLL。
  • Python 不得以 COM 绕过 C# Bridge 作为生产主路径。

4. 强制安全边界

  • 默认保持 readOnly=true、allowWrite=false、allowScript=false、httpHost=127.0.0.1。
  • Phase 0 不实现真实 AutoCAD 连接、DWG 读取或 DWG 修改。
  • 未实现能力必须 fail closed,不能注册成功 stub 或伪造 drawing 数据。
  • 不读取、提交或输出 .env、token、cookie、密钥、Autodesk 专有 DLL、SDK、许可证数据或完整本机路径。
  • 外部 HTTP 必须有超时、错误映射和 loopback 限制;日志不得包含原始异常消息或响应体。
  • 未来写操作必须另行通过权限、allowlist、document context、transaction、Undo、幂等和失败测试审查。

5. 文档纪律

  • Code-first:普通代码任务默认不改文档;事实、入口或操作方式变化时才同步。
  • Docs budget:
    • 普通代码任务默认不改文档;确需记录时最多向 WORKLOG.md 追加一条事实记录。
    • 测试基线变化可追加 TESTING.md 与 WORKLOG.md。
    • Phase 状态变化才允许修改 STATUS.md 与 current ROADMAP.md。
    • README.md 只在入口、架构、启动方式或阶段总状态变化时修改。
    • CI、安全、协议、Autodesk SDK、发布等高风险事项才新建专项计划。
  • current 治理文档以中文为主;代码符号、命令、协议字段和状态 token 保留英文。
  • ledger 只追加新证据,不重写历史失败;历史失败必须保留后续修复/重跑关联。
  • 修改文档后必须运行 scripts/docs/verify-docs.ps1。

Read the full file on GitHub · 119 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. 2mo ago First seen · 119 lines · 1,741 tokens per session scan A 1e1510e72d55

Subscribe to this mod's changes

CAD-MAX AGENTS.md is an instructions file published in the GitHub repository ling5477/CAD-MAX (0 stars, last pushed 18d ago), licensed MIT. It adds 1,741 tokens to every session, about $0.0070 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-31.

Related

CAD-MAX AGENTS.md compared with instructions from other repositories

CAD-MAX AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
CAD-MAX AGENTS.mdling5477/CAD-MAXInstructions file018d agoMITA1,741Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot