系列导语本系列基于 Anthropic《The AI-Native SDLC Playbook》改写保留 Claude Code / Claude Tag / MCP 等原品牌名。前几篇讲了意图和设计这篇进第三阶段Build——最重的一个也是最值得啃的。《The AI-Native SDLC Playbook》相关文章链接https://blog.csdn.net/justlookxia/article/details/164093318agent 唰一下吐出大半个 diff你敢直接合吗AI-native 的 Build 阶段核心就一句话没有被接受的计划就不实现机构知识变成文件护栏跑在代码层。a) plan mode 当默认起点传统工程师读设计直接写码计划只在脑中或工单里评审看到 diff 才改。AI-native开plan mode让 Claude 产出plan.md——可以查代码、但不改代码。你审的是计划不是改完的 diff。审完提交再去实现。一份plan.md长这样# Plan: claims status self-service (from intent.md 2026-06-02) ## Files that change portal/src/claims/StatusPanel.tsx (new), claims-api/routes/status.py, claims-api/tests/test_status.py ## Order of work 1. Add the status endpoint behind existing auth. 2. Panel against the endpoint. 3. Wire into the portal nav. ## Risks The claims-core API rate-limits at 50 rps; the panel must cache. ## Proof test_status.py covers the four claim states; screenshot matches the approved mock.b) auto mode护栏成熟后默认自动计划被批准后Claude 可以进入auto mode自动改代码。前提是护栏已经调熟——CLAUDE.md、skills、hooks、测试都到位。成熟之后例常工作默认 auto-accept再配合worktrees并行推进多个特性。c) 旁注定好事实源每个 artifact 都要声明哪个系统是唯一事实源repo 为源 / 旧系统如 Jira为源通过 MCP connector 写回/ 或只放最低限度链接。不要让两份东西都算数。d) CLAUDE.md给 agent 的新人手册把新人不说就懂的上下文写进去——命令、架构、易错点。用/init生成 → 剪到一页以内→ 提交仓库根 → 凡 Claude 错两次的写进文件。# Payments service ## Commands - Build: make build - Test: make test (unit), make itest (integration, needs docker) - Lint: make lint (runs in CI; fix before pushing) ## Conventions - Java 21, Spring Boot 3. No new Lombok. - Money is always BigDecimal, never double. - Every endpoint needs an integration test in src/itest. ## Architecture - api/ holds REST controllers, core/ holds domain logic, adapters/ talks to external systems. - Kafka events are defined in schemas/; never edit generated classes. ## Things Claude gets wrong - Do not bump dependency versions; the platform team owns them. - The legacy v1/ package is frozen; changes go in v2/.e) Skills 即机构知识把我们怎么做 XX封装进SKILL.md放.claude/skills/name/或走插件分发。例如一个 API 安全审查 skill--- name: secure-api-review description: Apply the API security standard. Use whenever creating or modifying an external-facing endpoint, reviewing API code, or generating an OpenAPI spec. --- # Secure API review When you create or change an API endpoint: 1. Authentication: every endpoint requires the gateway JWT; no anonymous routes outside /health. 2. Input validation: validate request bodies against the OpenAPI schema and reject unknown fields. 3. Audit: every state-changing endpoint emits an audit event with actor, action, entity and timestamp. 4. Data classification: fields tagged pii in the schema must never appear in logs or error messages. Run scripts/check-endpoints.sh and include its output in your summary.f) Hooks构建期的确定性护栏挡住对保护路径的编辑、跑 formatter/linter、挡住密钥进 diff。被背书的 skill必须有 hook 或 PR 复查兜底。g) 并行会话与子智能体并行会话 独立的 Claude Code 实例 git worktreeclaude --worktree feature-auth。子智能体在.claude/agents/定义比如一个只验工不修的 verifier--- name: verifier description: Runs the app and checks the change works before the session reports done tools: Bash, Read --- Start the app with make run. Exercise the changed behavior and the two nearest neighboring flows. Report what you ran, what you saw, and any behavior that does not match plan.md. Do not fix anything; report only.下篇预告第 5 篇Test怎么让 agent 在把成果交给你之前自己先验收一遍——反馈回路 CI 里的持续 evals。系列文快链【AI原生研发转型·第1篇】为什么你的AI写码很快团队却还是慢【AI原生研发转型·第2篇】想法不该等人写文档用intent.md把意图一次性钉死【AI原生研发转型·第3篇】需求与设计合体一次会话出spec.md【AI原生研发转型·第4篇】没有计划不写码机构知识变成文件05-08待发布原文出处https://claude.com/blog/the-ai-native-sdlc-playbook Louis Claxton, 2026-08-21, Anthropic系列索引① 总论 · ② Plan · ③ Design · ④ Build本篇· ⑤ Test · ⑥ Deploy · ⑦ Maintain · ⑧ 番外本系列为外部技术博客的改写保留原品牌名仅供团队学习交流。