Ask HN:如何从编写代码走向使用 Agent 部署?
英文标题:🔶 Ask HN: How do you go from writing code to deploying with agents?
一位独立开发者分享了自己借助 Claude Code 完成功能开发、测试、审查与部署前验证的流程。Agent 先编写代码并生成、反复运行测试,随后开发者在 staging 环境中进行人工验收。通过外部代码审查技能进一步修复代码和测试后,再提交至主分支,并在合并前运行包含类型检查的 CI/CD。作者表示,这套流程经过多轮编码和测试迭代后,已被证明有效。
43 B
中文
我以独立开发者的方式构建产品,并在开发和测试中广泛使用 Claude Code。下面这套流程最终对我来说效果很好。
首先,Agent 编写代码。之后,它会创建测试,并通过排查失败检查、重新运行测试套件,验证所有测试都能正确通过。
其次,它会向我提供可供测试的代码以及已配置好的环境(staging)。我会检查代码是否确实能正常运行;如果不能,我们就持续修复,直到我对结果完全满意。
第三,Agent 会使用代码审查 skill 发起外部审查,通常会对代码库进行一些额外修复,并再次修正测试。
完成这些后,我们就可以提交并将该功能推送到主分支。在合并之前,我们会启动 CI/CD——这很重要,因为它会进行类型检查——并等待运行成功结束。
这就是我这里的实际流程。
简要说明:这套方案是在经历多轮编码和测试迭代后建立起来的,最终已证明它确实有效。
English / 原文
I'm building solo and am extensionally using Claude Code for development and testing. The following scheme finally works great for me.
First of all, the agent writes code. After that, it creates tests and verifies that all of them work correctly by cracking the checks and rerunning the test suite.
Secondly, it gives me the ready to test code + set up environment (stage). I'm checking that the code actually works, and if not, we are making some fixes until I'm fully satisfied with the result.
Thirdly, the agent starts an external review using skill for code review and usually makes some additional fixes to codebase and corrects tests again.
After all, we are ready to commit and push the feature to the main branch. Before merging, we start CI/CD - which is important because it does a type check - and wait until the run finishes successfully.
That's how it happens in my case.
Quick note: this plan was built after many iterations of coding and testing, and it has finally proved that it works.