ai-driven-project

A set of Chinese-language project rules for OpenSwitch that requires requirements, code changes, and documentation to stay aligned.

In plain words
What is it for?
Use it to define requirements before coding, update README or docs with changes, keep names predictable, and record important decisions.
Why use it?
It reduces undocumented behavior, unclear project boundaries, and maintenance problems in an open-source codebase.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/yaokailun/openswitch/ai-driven-project
Clone the repo
git clone --depth 1 https://github.com/YaoKaiLun/OpenSwitch

Made for: Cursor.

Per session 326 This file is loaded in full into every session.
When invoked 326 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 $0.00326 $0.00326
Opus 5 $0.00163 $0.00163
Sonnet 5 $0.00065 $0.00065
Haiku 4.5 $0.00033 $0.00033

Measured yesterday against content hash 68074ecdf487, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-driven-project 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 yesterday.

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.

.cursor/rules/ai-driven-project.mdc · 32 lines

What it actually says

OpenSwitch AI 协作规则

目标

确保 OpenSwitch 以「需求 -> 实现 -> 文档」同步推进,保证开源可读性与持续维护性。

强制要求

  • 任何功能变更都要同步更新相关文档(至少包含 README.mddocs/ 中对应文件)。
  • 新功能实现前先在 docs/ 明确需求边界与验收标准,再开始编码。
  • 默认优先最小可运行改动,避免一次性引入无验证的大范围重构。
  • 所有新增文件与目录命名保持清晰、可预测,避免临时性命名。
  • 讨论和实现中出现的新决策,需要记录在文档中,避免只存在于对话上下文。

开源可维护性要求

  • README.md 必须保持可独立理解:项目目标、能力范围、当前状态、下一步计划。
  • 对外依赖与系统约束(如 macOS API 限制)需在文档中明确说明。
  • 若行为发生变更(命令、配置、目录结构),在同一改动中更新文档。

交付前检查清单

  • 需求文档是否覆盖本次功能
  • 代码与文档是否一致
  • README 是否仍能说明项目现状
  • 是否留下可执行的下一步任务
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. yesterday First seen · 32 lines · 326 tokens per session scan A 68074ecdf487

Subscribe to this mod's changes

ai-driven-project is a cursor rule published in the GitHub repository YaoKaiLun/OpenSwitch (2 stars, last pushed 3mo ago), licensed MIT. It adds 326 tokens to every session, about $0.0016 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-31.