↑ ↓ 移动 · Enter 打开 · Esc 关闭点按一个结果

案例 · nerviz-ai/bank-app

银行后端,一次一个用例

一个仅用 Nerviz 生成和开发的 clean-architecture-single-module 项目。每份规格、每份运行报告、每个提交都是公开的。

  1. 生成/init-project

    clean-architecture-single-module,20 分钟,构建通过。

    在 GitHub 上查看 →
  2. UC-001create-customer

    第一份已批准的规格,每层一个分规格。

    在 GitHub 上查看 →
  3. UC-002prune-expired-idempotency-keys

    由 jobs-architect 决定使用不带 ShedLock 的 @Scheduled:删除操作会把工作分摊到各副本。

    在 GitHub 上查看 →
  4. UC-003get-customer

    一个公开读取接口,在规格中明确记录为已接受的风险。

    在 GitHub 上查看 →
  5. UC-004initiate-kyc-verification

    第一个 Kafka 生产者,带 outbox、relay 和清理。

    在 GitHub 上查看 →
  6. UC-005record-kyc-verdict

    310 个测试,0 失败,行覆盖率 96.7%,50 分钟。

    在 GitHub 上查看 →
  7. UC-006anonymize-customer

    一个 DELETE,匿名化客户,同时保留该行及其 id。它带来项目的第一条 security filter chain:只有 DATA_PROTECTION_OFFICER 角色可以调用。

    在 GitHub 上查看 →
在 IDE 中直接打开的 bank-app
UC-005:执行器的最终报告
UC-006:/new-feature,从提示到规格获批,已剪去等待
UC-006:/new-feature-implement,逐组实现,已剪去等待
§ 项目的 CI

从第一个提交起,每次推送都经过测试

build.yml 随 /init-project 的脚手架一起生成,此后改过两次。自 2026-10-06 起共 54 次运行:51 次通过,3 次失败。统计于 2026-10-15。

  • 51次通过,共 54 次运行,全部在 GitHub Actions 上
  • 367个测试在最近一次运行中:287 个单元测试和 80 个集成测试,脚手架时为 5 个
  • 15条边界规则;最近一次运行中 doctor gate 用它们检查了 203 个源文件

build.yml,逐步解析

每个 step 检查什么,按最近一次运行经过的顺序排列。两个 job 并行运行;任何一个 step 失败,这次推送就是红的。

Step 1 / 12两个 job最近一次运行中的 0s → 5s

触发

on: push · pull_request · workflow_dispatch

每次推送到 main、每个 pull request,以及手动触发。两个 job 同时开始,各自运行在独立的 ubuntu-latest 上。

测试数,逐次运行

每根柱子是一次 build.yml 运行,按运行顺序排列。高度是 Maven 报告的测试总数:单元加集成。跳升处就是各个用例。

  • 通过
  • ✕失败
  • ◆build.yml · 修改
100200300
  1. UC-001
  2. UC-004
  3. UC-005
  4. UC-006
以表格查看全部 54 次运行
时间 (UTC)提交测试耗时结果
2026-10-06 15:56f5eaf3b chore: initial project scaffold — clean-architecture-single-module, m…5 (2 单元 · 3 集成)1m30s✓ 通过
2026-10-06 16:341a8432a docs: show the app starting and passing verify in the README5 (2 单元 · 3 集成)1m09s✓ 通过
2026-10-06 16:35523bcc3 docs: show the app starting and passing verify in the README5 (2 单元 · 3 集成)1m12s✓ 通过
2026-10-06 16:38f561bb0 Merge pull request #1 from nerviz-ai/docs/readme-run-gifs5 (2 单元 · 3 集成)53s✓ 通过
2026-10-06 16:41dd2dd2b docs: describe the CI pipeline and what it covers in the README5 (2 单元 · 3 集成)57s✓ 通过
2026-10-06 16:48badb714 Merge pull request #2 from nerviz-ai/docs/readme-ci-pipeline5 (2 单元 · 3 集成)58s✓ 通过
2026-10-07 09:0224558a5 docs(UC-001-create-customer): approved spec5 (2 单元 · 3 集成)1m02s✓ 通过
2026-10-07 09:08d62c8d4 commit audit-usage5 (2 单元 · 3 集成)1m03s✓ 通过
2026-10-07 10:240e74c8c feat(UC-001-create-customer): create customer with idempotent POST /a…113 (98 单元 · 15 集成)1m56s✓ 通过
2026-10-07 10:259861ede commit audit-usage113 (98 单元 · 15 集成)1m53s✓ 通过
2026-10-07 10:49651b779 ci: run SonarQube Cloud analysis on nerviz-ai_bank-app113 (98 单元 · 15 集成)2m25s✓ 通过
2026-10-07 10:56249c4fa docs: add SonarQube Cloud badges and public report link to README113 (98 单元 · 15 集成)2m20s✓ 通过
2026-10-07 11:06d7b62a3 chore(arch): adopt nerviz v0.17.8 and gate CI on doctor113 (98 单元 · 15 集成)2m17s✓ 通过
2026-10-07 12:3331fc27c updating readme113 (98 单元 · 15 集成)1m36s✓ 通过
2026-10-07 20:43940e578 report issue113 (98 单元 · 15 集成)2m32s✓ 通过
2026-10-07 23:13a59c52c arch-update113 (98 单元 · 15 集成)1m58s✓ 通过
2026-10-07 23:252da91cd arch-update113 (98 单元 · 15 集成)2m18s✓ 通过
2026-10-08 00:537c4e714 arch-update137 (117 单元 · 20 集成)2m11s✓ 通过
2026-10-08 01:061c966b0 chore: arch-update137 (117 单元 · 20 集成)2m04s✓ 通过
2026-10-08 08:517985d5d chore(arch): update .claude to nerviz v0.20.0137 (117 单元 · 20 集成)2m12s✓ 通过
2026-10-08 11:343061f71 arch-update137 (117 单元 · 20 集成)2m08s✓ 通过
2026-10-08 12:006e57955 chore(arch): update .claude to nerviz v0.22.0137 (117 单元 · 20 集成)2m10s✓ 通过
2026-10-08 12:240f96c8b chore: commit changes from before this run149 (126 单元 · 23 集成)2m11s✓ 通过
2026-10-08 12:264fae2c3 audit-usage149 (126 单元 · 23 集成)2m09s✓ 通过
2026-10-08 13:285068ff2 audit-usage149 (126 单元 · 23 集成)2m01s✓ 通过
2026-10-08 13:38b3c4896 build(sonar): align coverage exclusions with JaCoCo gate149 (126 单元 · 23 集成)3m06s✓ 通过
2026-10-08 22:1471015af docs(UC-004-initiate-kyc-verification): approved spec149 (126 单元 · 23 集成)2m07s✓ 通过
2026-10-08 22:198be721f audit-usage149 (126 单元 · 23 集成)2m16s✓ 通过
2026-10-09 00:297bc5c8f feat(UC-004-initiate-kyc-verification): initiate KYC verification via…260 (211 单元 · 49 集成)2m48s✓ 通过
2026-10-11 13:0531ff9e0 docs: bring README in line with the current build and CI260 (211 单元 · 49 集成)2m32s✓ 通过
2026-10-11 13:1308773e6 Merge pull request #3 from nerviz-ai/docs/readme-current-state260 (211 单元 · 49 集成)2m25s✓ 通过
2026-10-11 15:121fcda1f audit-usage260 (211 单元 · 49 集成)2m31s✓ 通过
2026-10-11 15:1413484e7 chore(arch): update .claude to nerviz v0.23.0260 (211 单元 · 49 集成)2m12s✓ 通过
2026-10-11 23:124fe0f0d chore(arch): update .claude to nerviz v0.25.1 and apply single-module…260 (211 单元 · 49 集成)2m40s✓ 通过
2026-10-12 14:49be62511 feat(UC-005-record-kyc-verdict): record KYC verdict on customer294 (235 单元 · 59 集成)2m09s✕ 失败
2026-10-12 15:230079e7c audit-usage294 (235 单元 · 59 集成)2m25s✕ 失败
2026-10-12 16:00ba4f5ad gifs294 (235 单元 · 59 集成)2m36s✕ 失败
2026-10-12 16:06a28934c chore(arch): update .claude to nerviz v0.25.3 and pass stop-gate-runs…294 (235 单元 · 59 集成)2m48s✓ 通过
2026-10-12 21:30076f6f1 chore(arch): update .claude to nerviz v0.26.0294 (235 单元 · 59 集成)3m24s✓ 通过
2026-10-12 21:5527e2456 chore(arch): update .claude to nerviz v0.27.0294 (235 单元 · 59 集成)3m20s✓ 通过
2026-10-12 23:4479fe59c chore(arch): update .claude to nerviz v0.28.0294 (235 单元 · 59 集成)2m41s✓ 通过
2026-10-13 00:129423b11 docs(UC-006-anonymize-customer): approved spec294 (235 单元 · 59 集成)2m52s✓ 通过
2026-10-13 00:51d1527eb audit-usage294 (235 单元 · 59 集成)3m24s✓ 通过
2026-10-13 01:068e8bf56 chore(arch): update .claude to nerviz v0.29.0294 (235 单元 · 59 集成)3m34s✓ 通过
2026-10-13 01:086037ed3 chore(audit-usage): remove stale report citing deleted UC-004-initiate294 (235 单元 · 59 集成)3m08s✓ 通过
2026-10-13 09:5902c4c17 feat(UC-006-anonymize-customer): anonymize a customer via DELETE /api…355 (276 单元 · 79 集成)3m56s✓ 通过
2026-10-13 10:216b55699 feat(UC-006-anonymize-customer): add local Keycloak service to docker…355 (276 单元 · 79 集成)3m03s✓ 通过
2026-10-13 15:1780564c1 build(sonar): exempt java:S4502 on SecurityConfig355 (276 单元 · 79 集成)4m09s✓ 通过
2026-10-13 22:1445fc2bb refactor(api): move REST versioning to native API versioning359 (280 单元 · 79 集成)3m26s✓ 通过
2026-10-14 12:48eb89105 chore: update .claude to nerviz v0.34.0 and apply its migrations360 (281 单元 · 79 集成)3m16s✓ 通过
2026-10-14 17:377a5c534 chore: commit pending changes366 (287 单元 · 79 集成)3m17s✓ 通过
2026-10-14 19:583187bac chore(arch): update .claude to nerviz v0.35.0366 (287 单元 · 79 集成)3m22s✓ 通过
2026-10-15 09:02c0047d8 chore(arch): update .claude to nerviz v0.36.0366 (287 单元 · 79 集成)3m18s✓ 通过
2026-10-15 21:16a3cc28a chore: commit pending changes367 (287 单元 · 80 集成)3m40s✓ 通过
bank-app 的全部运行 →
§ 代码质量

AI 生成的代码,同样可以高质量

每次推送到 main,CI 的 sonar analysis step 都会把代码送到 SonarQube Cloud。报告是公开的:下面是实时徽章,以及最近一次分析的快照。

实时,来自 SonarQube Cloud打开完整报告 →
SonarQube Cloud · alert_statusSonarQube Cloud · coverageSonarQube Cloud · bugsSonarQube Cloud · vulnerabilitiesSonarQube Cloud · code_smellsSonarQube Cloud · duplicated_lines_densitySonarQube Cloud · reliability_ratingSonarQube Cloud · security_ratingSonarQube Cloud · sqale_ratingSonarQube Cloud · ncloc

这些徽章在每次加载页面时由 SonarQube Cloud 绘制。SonarQube Cloud 不允许其报告嵌入其他网站的 frame,因此完整报告在其网站上打开。 2026-10-24 23:26 UTC 的分析,提交 948c8dc。

Quality gate:Sonar way,已通过

Sonar way 是 SonarQube Cloud 的默认关卡。它评判新代码,这里指上一个版本(2026-10-07)以来的全部代码,共六项条件:

  1. 可靠性评级new_reliability_ratingA要求 ≤ A
  2. 安全性评级new_security_ratingA要求 ≤ A
  3. 可维护性评级new_maintainability_ratingA要求 ≤ A
  4. 覆盖率new_coverage96.5%要求 ≥ 80%
  5. 重复行new_duplicated_lines_density0.0%要求 ≤ 3%
  6. 已审查的安全热点new_security_hotspots_reviewed100%要求 = 100%

整个代码库

  • 0个未解决问题可靠性 0 · 安全性 0 · 可维护性 0
  • 0个待审查的安全热点
  • 0.0%重复行
  • 0 min技术债

142 个文件中共 3,946 行代码

覆盖率,对照 CI 的下限

在 CI 中,行覆盖率低于 80% 或分支覆盖率低于 70% 时,jacoco:check 会让构建失败。SonarQube Cloud 读取的是同一份 JaCoCo 报告。

  • 行CI 下限 80%96.4%
  • 分支CI 下限 70%88.8%