Show HN:Genesis Map – 可视化你的代理的变更,查看它们可能在哪里破坏。
Show HN: Genesis Map – Visualize your agent's changes. See where they can break

原始链接: https://github.com/GenesisAgentInfra/genesis

Genesis 是一种编码代理技能,可将代码库转为业务流程图,并审查提交中的未测试或风险性改动。它可在 Claude Code 和 Codex 中用于常见语言,Python 上准确率最佳。在一项小型基准测试中,使用 Genesis 帮助代理标记了约五倍多“测试会执行但不会捕获”的改动,将误报降至约三分之一,并保持真实风险稳定;风险判定的精确率提升,并命名了更多受影响的入口点。要使用它,请用 uv 和 Git 安装,然后让代理映射项目或审查自某修订以来的改动。结果打开 `.genesis/out/latest/view.html`,`summary.md` 用于拉取请求。Genesis 不运行代码或调用模型;它会对照冻结的仓库快照检查代理编写的引用,Python 解析可能将遗漏的分支标记为部分。测试结论来自阅读测试,风险来自代理的阅读。

Genesis Map 是一项编码代理技能,可生成业务流程的流程图,并标记提交之间的风险变更和未测试代码。它帮助开发者更快地追踪 AI 生成的代码并验证代理声明,尤其在代理报告“一切正常”时。基准测试显示,它提高了测试缺口检测能力,减少了误报,同时保持了真实风险检测的相似水平。
相关文章

原文

Genesis icon   Genesis

License: Apache-2.0 GitHub stars

English  ·  简体中文

genesis-launch.mp4

Genesis turns your codebase into a business flow map and shows which of your agent's changes are untested or risky. It runs as a skill inside Claude Code and Codex, and works on projects in Python, TypeScript, JavaScript, Go, Java, Rust and most other common languages. Python gets the most accurate results.

We gave Claude Code and Codex 10 recent commits from 5 open-source Python projects and asked what a user would ask: what does this commit change, could it break anything, and do the tests cover it? Each agent answered every commit three times on its own and three times with Genesis. Every answer was scored against a reference answer built from the code and its tests before the runs.

Four measures for Claude Code and Codex, without and with Genesis. Correct test-coverage verdicts: 79% to 88% and 76% to 80%. Changes tests run but would not catch, flagged by the answer: 8% to 38% and 4% to 23%. Affected entry points named: 32% to 47% and 15% to 24%. Raised risks that are real: 44% to 64% and 54% to 72%.

With Genesis:

  • Changes that tests run but would not catch are flagged about five times as often. A test runs such a change but would still pass if it broke, like the 🟡 stock change in the example below. Claude Code flagged 8% of them on its own and 38% with Genesis. Codex flagged 4% and 23%.
  • False alarms drop to about a third, and real risks hold steady. So more of the risks an answer raises are real: 64% instead of 44% for Claude Code, 72% instead of 54% for Codex.
  • More of the entry points a change affects are named: the routes, tools and commands that reach the changed code. Claude Code went from 32% to 47%, Codex from 15% to 24%.
Claude Code + Genesis Codex + Genesis
Do the tests cover it?
Correct test-coverage verdicts 79% 88% 76% 80%
Changes tests run but would not catch, flagged 8% 38% 4% 23%
  The same changes, wrongly called covered 47% 34% 43% 30%
What does it affect?
Affected entry points named 32% 47% 15% 24%
Named entry points that are right 67% 68% 71% 54%
Could it break anything? Risks raised per review:
  Real 2.9 2.8 2.4 2.4
  False alarms, ruled out by the code 2.1 0.7 1.4 0.5
  Unclear from the code alone 1.2 0.7 0.7 0.4
Raised risks that are real 44% 64% 54% 72%

Keep in mind that the first row says less than it seems. Most changes in these commits are covered, so an answer that called every change covered would already score 82%. For Codex it is higher on only 4 of the 10 commits. The difference is in the changes tests would not catch, and even with Genesis about a third of those are still called covered. Codex names more entry points with Genesis, but a smaller share of them are right. The sample is small, 10 commits with three runs each, and the answers were scored by language-model readers, not people. Method and full results: change-analysis benchmark.

The quickest way is to let your coding agent do it. Open your own project in the agent and paste:

Install Genesis by following https://raw.githubusercontent.com/GenesisAgentInfra/genesis/main/docs/install.md, then review my latest commit with it and tell me how to open the result.

Or install it yourself. You need uv and Git, on macOS or Linux:

uv tool install --python 3.12 "git+https://github.com/GenesisAgentInfra/genesis#subdirectory=packages/genesis_ci"
"$(uv tool dir --bin)/genesis" agent install --agent claude

Use --agent codex for Codex and --agent both for both. Other agents, updating, uninstalling and troubleshooting are in the install guide.

Now open your own project in Claude Code. It has to be a Git repository with at least one commit. Then ask for one of two things:

/genesis map
/genesis review main

map draws the system as it is now, so you can understand it. review shows what changed since a revision (here main) and whether a test checks it. You can also just ask in plain language.

In Codex the skill is $genesis. When it finishes, open .genesis/out/latest/view.html in a browser. The summary.md next to it is ready to paste into a pull request. The usage guide explains the page and the other files.

Say you asked your agent for guest checkout. It built that, and changed three other things on the way. Genesis draws the checkout flow and puts all four changes on it:

The first half of the Check out a cart flow: signed in or guest with an email, a stock check per item, the free-shipping threshold and the card charge, with numbered changes, their test verdicts and risk marks on the steps

What changed for shoppers Is it tested?
A card charge that times out is retried up to 3 times, with no idempotency key. A shopper can be charged twice. 🔴 No coverage found. No test makes the payment time out.
Stock is no longer held while the card is charged. Two shoppers can pay for the last unit. 🟡 Behavior not checked. Tests run this code but none buys the last unit twice.
Shoppers can check out as a guest by leaving an email. ⚪ Coverage unclear. The guest tests take their cases from a package outside the repository, so reading them does not show what they check.
Free shipping starts above $35 instead of $50. ✅ Behavior checked. Tests place orders at $34.99, $35.00 and $35.01.

These are the labels on the page. summary.md calls the same verdicts not reached, reached only, unknown and covered; the usage guide lists both.

Click a step to see what changed there, the test verdict with the note that explains it, and the code behind it:

The card charge step opened: the risk that a timed-out charge is retried with no idempotency key, and what changed

Your agent does the reading, but it doesn't get the last word. Every step it writes has to quote the lines of code it stands for, and the Genesis CLI checks each quote against a frozen snapshot of your repo. If one doesn't match, the whole description is rejected and the agent tries again. For Python, Genesis also parses the code itself, so a branch the agent skips leaves the result marked partial in summary.md. When you map a project, the page also shows "Partial" at the top. A review's page does not, so check summary.md.

In a review, Genesis finds the changes itself by comparing the two versions of the code, so the list does not depend on the agent. What each change means, its test verdict and its risks are the agent's reading. The CLI refuses a verdict only in plain cases: Behavior checked (covered) with no cited test that asserts anything, or, for Python, No coverage found (not reached) when a test calls the changed function directly. In other languages, whether a cited test asserts anything is the agent's word.

The CLI calls no model, sends nothing anywhere, and never runs your code.

  • Python gets the most accurate results, because Genesis parses it. Other languages work too: your agent reads the code and Genesis checks each step against the source, but a path the agent misses is not flagged.
  • Test verdicts come from reading your tests. Genesis doesn't run them.
  • Risks are what your agent noticed while reading. There is no rule engine.
  • Install: requirements, which flag for which agent, updating, uninstalling, and what to do when something goes wrong.
  • Use: what to ask, where the result is, how to read the page.
  • Benchmark: what was measured and the full results.
  • AGENTS.md: for a coding agent asked to install, use or change Genesis.

Questions and bug reports go to GitHub issues. Report a security problem privately, as SECURITY.md describes.

Apache-2.0. Bundled components keep their own licenses, listed in NOTICE and THIRD_PARTY_NOTICES.md. Want to help? See CONTRIBUTING.md.

联系我们 contact @ memedata.com