zoehis-code-review

zoehis-code-review is a cursor rule for Cursor from zyx379/zoehis_workflow. It costs 2,117 tokens per session, scanned A, original, MIT.

A review checklist for Java and Spring Boot changes in the ZOEHIS hospital system, including database queries, transactions, errors, and business data flows.

In plain words
What is it for?
Use it after changing Java or Spring Boot code to inspect the diff, flag violations, suggest corrections, and decide whether more changes are needed.
Why use it?
It catches unsafe exception handling, ineffective transactions, incomplete multi-table updates, and code that uses unverified database fields.

Cursor rule for Cursor

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

Good fit Use it after changing Java or Spring Boot code to inspect the diff, flag violations, suggest corrections, and decide whether more changes are needed.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/zyx379/zoehis_workflow/zoehis-code-review
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.

Clone the repo
git clone --depth 1 https://github.com/zyx379/zoehis_workflow

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 zoehis-code-review

README.md
[![agentmods](https://agentmods.dev/badge/rules/zyx379/zoehis_workflow/zoehis-code-review.svg)](https://agentmods.dev/rules/zyx379/zoehis_workflow/zoehis-code-review)
Your own site
<a href="https://agentmods.dev/rules/zyx379/zoehis_workflow/zoehis-code-review"><img src="https://agentmods.dev/badge/rules/zyx379/zoehis_workflow/zoehis-code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,117 This file is loaded in full into every session.
When invoked 2,117 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.02117 $0.02117
Opus 5 $0.01059 $0.01059
Sonnet 5 $0.00423 $0.00423
Haiku 4.5 $0.00212 $0.00212

Measured 7d ago against content hash 9f538faa9350, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

zoehis-code-review 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 7d 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.

dev/rules/zoehis-code-review.mdc · 143 lines

How it starts

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

ZOEHIS AI 局部审查(Step 8)

改动完成后、人工审查前,对 本次 diff 做局部审查并输出结论。详见 docs/workflow.md Step 8。

本规则将「Java/Spring Boot 企业级代码生成约束」转换为 审查视角 的检查清单:生成阶段该遵守的,审查阶段逐条核对是否已遵守;命中即标记 违规,给出改法,结论置为 需修改,不得放行进入 Step 9。

1. 规范与数据流

  • 命名、代码风格(dev/rules/zoehis-*.mdc
  • 池表 / 主细表 / 预交金 / 流水完整性(同 Step 7,针对改动点)

2. Java/Spring Boot 企业级规范(必查)

对新增/修改的 Java/Spring 代码逐项核查;命中任一项即标记 违规 并给出改法,不得进入 Step 9。

2.1 异常处理(强制)

  • 禁止空 catchcatch (Exception e) {} → 必须记录日志并向上抛出
  • 禁止吞 cause:禁止 throw new RuntimeException("失败") 丢原异常 → 必须 throw new RuntimeException("失败", e)
  • 必须保留原始 cause、记录完整异常日志(含堆栈 log.error("执行失败", e)
  • 禁止静默吞异常(catch 后不处理也不抛出,return 掩盖错误)

2.2 事务规范(强制)

  • @Transactional 仅标注 public 方法;禁止 private/protected 方法加事务(不生效)
  • 必须声明 rollbackFor = Exception.class,禁止依赖默认回滚(默认仅回滚 RuntimeException)
  • 禁止同类内部 self-invoke 调用本类事务方法(事务失效):改用 AOP 代理调用 / 抽取独立 Service / 注入自身代理
  • 多表写、池表删增未同事务 → 标记风险并提示

2.3 afterCommit(最高优先级)

  • 若使用 TransactionSynchronizationManager / afterCommit() / TransactionSynchronizationAdapter
  • 其中任意 DB 写(insert/update/delete/save/saveBatch/Mapper/Repository)必须 新开物理事务,满足其一:
    • @Transactional(propagation = Propagation.REQUIRES_NEW)
    • TransactionTemplate
    • ③ AOP 代理调用且代理方法声明 REQUIRES_NEW
  • 禁止 afterCommit 中直接写库而未开启新事务(主事务已提交,内部写不受控 / 事务失效)

2.4 金额计算(强制)

  • 金额字段、金额运算必须使用 BigDecimal,禁止 double/Double/float/Float
  • 禁止金额 == 比较,必须用 compareTo() / equals()
  • 禁止浮点字面量参与金额运算(如 1.1 * qtynew BigDecimal("1.1").multiply(...)

2.5 线程安全

  • 禁止共享 SimpleDateFormat(静态共享变量)→ 改用 DateTimeFormatter 或局部变量/ThreadLocal
  • 禁止共享可变 HashMap/ArrayList 等非线程安全容器(线程间复用导致数据错乱)
  • 共享对象必须保证线程安全(或改为方法局部变量)

2.6 异步任务

  • 出现 @Async 的类中,项目须存在 @EnableAsyncThreadPoolTaskExecutor 配置;缺一则 @Async 不生效 → 补全配置或移除注解
  • 异步方法内异常需有明确兜底,避免静默丢失

2.7 依赖注入

  • 统一 @RequiredArgsConstructor + 构造器注入;禁止 @Autowired 字段注入
  • 禁止在字段上直接 @Autowired(破坏不可变性与可测试性)

Read the full file on GitHub · 143 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. 7d ago First seen · 143 lines · 2,117 tokens per session scan A 9f538faa9350

Subscribe to this mod's changes

zoehis-code-review is a cursor rule published in the GitHub repository zyx379/zoehis_workflow (2 stars, last pushed 1mo ago), licensed MIT. It adds 2,117 tokens to every session, about $0.0106 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.