backend-workflow

backend-workflow is a cursor rule for coding agents from RendHeaven/DocBiz-Dev-Harness. It costs 0 tokens per session (968 once invoked), scanned A, original, MIT.

A staged workflow for backend and full-stack backend work, from clarifying a request and planning tasks through implementation, review, interface testing, and API documentation. An API is the defined way that software exchanges data.

In plain words
What is it for?
Planning and building backend features, checking existing code and database changes, testing interfaces, documenting APIs, and preparing shared testing material.
Why use it?
It prevents developers from writing business code before the request and existing system are understood, and keeps review and testing evidence together.

Cursor rule

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/backend-workflow
Clone the repo
git clone --depth 1 https://github.com/RendHeaven/DocBiz-Dev-Harness

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 backend-workflow

README.md
[![agentmods](https://agentmods.dev/badge/rules/rendheaven/docbiz-dev-harness/backend-workflow.svg)](https://agentmods.dev/rules/rendheaven/docbiz-dev-harness/backend-workflow)
Your own site
<a href="https://agentmods.dev/rules/rendheaven/docbiz-dev-harness/backend-workflow"><img src="https://agentmods.dev/badge/rules/rendheaven/docbiz-dev-harness/backend-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 968 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 $0.00000 $0.00968
Opus 5 $0.00000 $0.00484
Sonnet 5 $0.00000 $0.00194
Haiku 4.5 $0.00000 $0.00097

Measured 3d ago against content hash 0163f68bd49d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backend-workflow 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 3d 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/backend-workflow.mdc · 91 lines

What it actually says

后端工作流(DocBiz-Dev-Harness)

适用范围:后端 / 全栈中的后端部分。前端见 frontend-workflow.mdc。最终 QA 见 final-test.mdc

描述新需求时,必须先产出需求文档,禁止直接写业务代码。

模板路径:features/_templates/(来自本仓库 templates/)。

流程总览

1-plan → 2-exec → 3-review → 4-interface-test → 5-api-doc
         → _shared/backend-feed.md → _shared/final-test/test-cases.md

目录结构

features/yyyyMMdd-需求简称/
├── _shared/          task-plan、养料、final-test、design-decisions、ddl-overview 等
└── {开发者标识}/     git config user.name
    ├── 1-plan/
    ├── 2-exec/       或 2-exec/plan-NN/
    ├── 3-review/
    ├── 4-interface-test/
    └── 5-api-doc/

创建目录前必须先执行 git config user.name;为空则提示用户设置。

0. 模块划分(大需求)

满足:多独立功能点、多服务、新建+迁移混合、DDL+功能混合、工时偏大 → 提议拆分,用户确认。
命名:plan-NN-{slug}.md,子目录 plan-NN/。跨模块决策写 _shared/design-decisions.md

1. plan

步骤:需求澄清 → 模块拆分确认 → 现状调研(历史扫描、代码搜索、schema、接口、迁移分析、RPC 复用、前端影响提示、邻近模块)→ 填模板 → 复杂 TASK 技术方案 → 用户确认

TASK 元信息:riskestimateradiushuman-reviewDBA-approval依赖

禁止:跳过澄清/调研、plan 阶段写业务代码、未确认假设写进 plan。

2. exec

文件:task.md、exec.md、interface.md、可选 SQL。

每 TASK:回读 plan → 完整业务逻辑(禁止空壳/TODO 占位)→ 自检 → 更新文档。

commit:[需求简称][TASK-n] 动词;DDL 加 [DDL]human-review: required 须人工放行后提交。

PATCH(全部满足):无 DDL、无新接口、≤5 文件 → 轻量 exec + 同步 api-doc;不改 plan。

3. review(进入 interface-test 前 mandatory)

模板 review-template.md。十维 A~J 全检并给风险评级。
回归清单须在 interface-test 100% 覆盖。契约变更须回写 interface、同步 backend-feed。

4. interface-test

模板 interface-test-template.md。Token:user.md。

写接口:正常、权限失败、参数错误、业务边界。读接口:正常、权限失败。
完整请求/响应;写操作查库验证。{N}.md 递增,禁止覆盖。

5. api-doc

front.md + {service}.yaml。每个字段必须有说明;示例用实测数据。

养料(backend-feed)

路径 _shared/backend-feed.md。影响 UI、统计、缓存、任务、RPC 时产出。不是 interface 复制品,不是完整用例。

协作

_shared/task-plan.md 发起人创建。interface.md 为前端唯一契约来源。

历史兼容

旧目录 3-interface-test4-api-doc 照旧读写;新需求用 4-5-

全文:docs/backend-pipeline.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. 3d ago First seen · 91 lines · 0 tokens per session scan A 0163f68bd49d

Subscribe to this mod's changes

backend-workflow is a cursor rule published in the GitHub repository RendHeaven/DocBiz-Dev-Harness (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 968 tokens. 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.