legacy-migration

legacy-migration is a cursor rule for Cursor from RendHeaven/DocBiz-Dev-Harness. It costs 30 tokens per session (336 once invoked), scanned A, original, MIT.

A workflow for moving interfaces from an older API system to a newer one, including checking which fields and paths are still used. An API is the defined way that software exchanges data.

In plain words
What is it for?
Migrating /legacy-api/ routes to /api/ routes, simplifying response fields, documenting differences, and testing that the migration works.
Why use it?
It reduces the risk of breaking clients or carrying unused fields into the new system by requiring old and new behaviour to be compared.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

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/rendheaven/docbiz-dev-harness/legacy-migration
Clone the repo
git clone --depth 1 https://github.com/RendHeaven/DocBiz-Dev-Harness

Made for: Cursor.

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 legacy-migration

README.md
[![agentmods](https://agentmods.dev/badge/rules/rendheaven/docbiz-dev-harness/legacy-migration.svg)](https://agentmods.dev/rules/rendheaven/docbiz-dev-harness/legacy-migration)
Your own site
<a href="https://agentmods.dev/rules/rendheaven/docbiz-dev-harness/legacy-migration"><img src="https://agentmods.dev/badge/rules/rendheaven/docbiz-dev-harness/legacy-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 336 The whole file, excluding the scripts and references it only reads on demand.
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.00030 $0.00336
Opus 5 $0.00015 $0.00168
Sonnet 5 $0.00006 $0.00067
Haiku 4.5 $0.00003 $0.00034

Measured 5d ago against content hash 3322cf9708d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

legacy-migration 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 5d 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.

cursor-rules/legacy-migration.mdc · 40 lines

What it actually says

旧栈 API 迁移专项(DocBiz-Dev-Harness)

backend-workflow.mdc 的补充。适用于 /legacy-api/*/api/* 重写。

不适用

  • 仅主栈内重构
  • 纯前端调整
  • 无旧实现的新功能

流程嵌入

阶段 额外动作
1-plan 前端使用表、字段精简、复刻vs优化、归属、路径映射
2-exec 差异注释、命名、沉 shared-service
4-interface-test CASE-COMPARE-N
5-api-doc 迁移自 + 字段差异
养料/终测 路径/删字段/重命名可执行用例

字段精简

保留:前端真用、标识/状态。删除:无引用、调试字段。有疑义问人。

前端

搜 legacy 路径与 API 函数引用;整理字段清单给后端写入 interface;联调阶段切路径。

rg "legacy-api路径片段" web-app/src/api/
rg "api函数名" web-app/src/

全文:docs/migration-addon.md

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. 5d ago First seen · 40 lines · 30 tokens per session scan A 3322cf9708d9

Subscribe to this mod's changes

legacy-migration is a cursor rule published in the GitHub repository RendHeaven/DocBiz-Dev-Harness (2 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 336 once invoked, about $0.0002 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.