查看“︁AI-Native SDLC”︁的源代码
←
AI-Native SDLC
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 1. Executive Summary & Philosophical Shift == With the deployment of advanced software engineering agents, code generation speed has accelerated exponentially, shifting the delivery bottleneck downstream to evaluation, specification gating, and deployment reviews. This framework re-architects the software engineering lifecycle to safely operationalize autonomous agents within the repository. === 1.1 Legacy SDLC vs AI-Native SDLC === {| class="wikitable" style="width:100%;" |- ! style="background:#f2f2f2;" | Dimension ! style="background:#f2f2f2;" | Legacy SDLC ! style="background:#f2f2f2;" | AI-Native SDLC |- | '''Delivery Medium''' | Cross-team meetings, Jira tickets, manual handoffs | Version-controlled markdown artifact chains |- | '''Primary Author''' | Human engineers writing all code and tests manually | AI automated generation; humans perform review & tuning |- | '''Quality Gating''' | Manual Code Review, sequential QA testing | Automated continuous evaluation (Evals) & hard hooks |} == 2. The 6-Stage Artifact-Driven Loop == AI-Native SDLC replaces traditional ticketing handoffs with a chain of continuous, version-controlled markdown documents: * '''1. Plan''' -> Artifact: <code>intent.md</code> ** '''AI Role''': Interrogates requirements dynamically to structure ambiguous business goals. ** '''Human Role''': Defines the high-level business intent and scope boundaries. * '''2. Design''' -> Artifact: <code>spec.md</code> ** '''AI Role''': Reads project architecture context to generate compliant technical specifications. ** '''Human Role''': Audits architectural alignment and resolves cross-system dependencies. * '''3. Build''' -> Artifact: <code>plan.md</code> + Code Base ** '''AI Role''': '''Plan Mode Mandate.''' Generates target files to alter and local validation strategies before modifying code. ** '''Human Role''': '''Approves or Rejects plan.md.''' AI is blocked from file modifications without explicit human unlock. * '''4. Test''' -> Artifact: Automated Test Logs ** '''AI Role''': Autonomously writes, executes, and fixes unit/integration tests in sandboxed runtimes. ** '''Human Role''': Audits edge cases and defines the absolute safety baseline. * '''5. Deploy''' -> Artifact: Audited Pull Request ** '''AI Role''': Runs automated SAST security analysis, lints, and prepares environment deployment logs. ** '''Human Role''': '''Executes final manual merge (MFA verification)''' as the absolute gatekeeper. * '''6. Maintain''' -> Artifact: Sandboxed Diagnostics ** '''AI Role''': Monitors production health and auto-generates isolated fault diagnosis reports. ** '''Human Role''': Feedback systemic constraints to Stage 1 to prevent future regression. == 3. Repository Governance Architecture (The Control Stack) == To maintain systemic stability and prevent unauthorized file modifications or security leaks, all modern repositories must enforce a three-layer boundary structure. === 3.1 Base Layer (Base): CLAUDE.md Specification === This root-level configuration dictates the runtime context for the agent. '''AI is strictly forbidden from altering this file without a manual human commit override.''' <pre> # CLAUDE.md - Engineering Standards for Agent Session ## 1. Build & Test Infrastructure - Build Command: npm run build or make compile - Test Execution: pytest tests/unit/ or npm run test ## 2. Code Style & Constraints - Language Standard: TypeScript (ES2022), Strict Null Checks enabled. - State Management: Functional purity preferred. Side effects must be isolated in service domains. ## 3. Scar Tissue (Anti-Patterns to Avoid) - FIX-001: Do NOT batch write to /api/v1/auth without resolving local token validation contexts. - FIX-002: Avoid nested async blocks in repository drivers; use explicit sequential wrappers. </pre> === 3.2 Specification Layer (Specification): Domain Skills === Guidelines for high-frequency or high-risk tasks defined programmatically: * '''Database Schema Migrations''': AI-generated migrations must include full down (rollback) scripts. * '''API Versioning Protocol''': Enforces breaking change analysis prior to altering public interfaces. === 3.3 Hard Constraints Layer (Hard Constraints): Hooks === * '''File Level Isolation''': Git hooks (pre-commit) must intercept agent access to .env, private keys, or master configurations without explicit human Multi-Factor Authentication (MFA). * '''Command Whitelisting''': Execution targets are restricted to non-destructive development commands. Destructive targets (e.g., rm -rf, raw DB drops) trigger immediate process termination. == 4. Operational Transition Roadmap == The evolution follows a strict phased approach: "Control, then Acceleration, then Full Autonomy." # '''Phase 1: Regulated Build (Weeks 1-4)''': Enforce mandatory CLAUDE.md and plan.md interactive gates globally to eliminate unauthorized multi-file sweeping regressions. # '''Phase 2: Continuous Evaluation (Months 2-3)''': Deploy '''Evals (Continuous Evaluation suites)''' to programmatically score agent output accuracy and prevent system regression during model upgrades. # '''Phase 3: Upstream Shift-Left (Months 4+)''': Integrate the entire loop from product intent (intent.md) to autonomous technical specs and real-time production self-healing. [[Category:Technical Architecture]] [[Category:R&D Efficiency]] '''AI-Native SDLC(AI原生软件开发生命周期)'''是针对大语言模型(LLM)和Agent(智能体)时代对传统软件开发流程的一次'''重构与革新'''。 随着工程智能体的普及,写代码(Build)的速度大幅提升,研发交付的瓶颈已全面转移至下游的评审、拦截、安全与发布。本规范旨在将 AI 从单纯的“辅助编码工具”升级为“研发流程的自驱动核心”,人类工程师角色全面转变为'''意图定义者(Intent Definer)'''与'''最终红线守门人(Gatekeeper)'''。 == 1. 传统 SDLC vs AI-Native SDLC 核心对比 == {| class="wikitable" style="width:100%;" |- ! style="background:#f2f2f2;" | 维度 ! style="background:#f2f2f2;" | 传统 SDLC ! style="background:#f2f2f2;" | AI-Native SDLC |- | '''流转介质''' | 跨团队会议、Jira 工单、口头交付 | 具备版本控制的文档链 |- | '''编写主体''' | 人类手动编写所有代码与测试 | AI 自动化生成,人类执行微调与审批 |- | '''质量关卡''' | 人工 Code Review、手动 QA 测试 | 自动化持续评测与硬拦截钩子 |} == 2. 六阶段制品驱动闭环 (The 6-Stage Loop) == AI-Native SDLC 废除繁琐的工单交接,转而由一套'''相互耦合、可版本控制的文档链'''驱动研发闭环: * '''1. 规划阶段 (Plan)''' -> 核心制品: <code>intent.md</code> ** '''AI 职责''': 动态追问人类,消除含糊语义,将原始想法提炼为结构化业务需求。 ** '''人类职责''': 提供核心商业意图,划定业务边界。 * '''2. 设计阶段 (Design)''' -> 核心制品: <code>spec.md</code> ** '''AI 职责''': 读取项目既有架构,自动生成符合规范的技术施工规格说明书。 ** '''人类职责''': 审计架构一致性,评估跨系统风险。 * '''3. 构建阶段 (Build)''' -> 核心制品: <code>plan.md</code> + 源码变更 ** '''AI 职责''': '''强制进入计划模式'''。在动笔修改任何代码前,必须先输出 <code>plan.md</code>,列出拟变动文件清单与本地验证策略。 ** '''人类职责''': '''审批或驳回 plan.md'''。未经人类授权,AI 禁止擅自修改任何系统文件。 * '''4. 测试阶段 (Test)''' -> 核心制品: 测试报告与覆盖率指标 ** '''AI 职责''': 自主编写测试用例,在本地沙箱运行并自我修复断言失败。 ** '''人类职责''': 定义全局安全基线,抽查边缘极端 case。 * '''5. 部署阶段 (Deploy)''' -> 核心制品: 附带审计日志的 Pull Request ** '''AI 职责''': 自动运行静态漏洞扫描(SAST)、依赖项检查、并自动准备发布描述。 ** '''人类职责''': '''执行最终的合并(MFA 审批)''',坚守最后一关。 * '''6. 维护阶段 (Maintain)''' -> 核心制品: 沙箱诊断报告 ** '''AI 职责''': 实时监控生产指标,故障发生时自动在隔离沙箱内跑诊断,反向生成新的 <code>intent.md</code>。 ** '''人类职责''': 审核故障归因,将其固化为系统长期约束。 == 3. 仓库治理架构:三层行为控制栈 == 为防止自主智能体在仓库中出现盲目乱改文件或泄露机密,所有接入托管的项目必须实施以下三层强管制: === 3.1 基础层 (Base): CLAUDE.md 标准规范 === 此文件必须放置于项目根目录下,定义 AI 在当前会话中的技术画像。'''严禁 AI 在未经人类 Commit 覆盖的情况下修改此文件。''' <pre> # CLAUDE.md - 项目研发规范与上下文指南 ## 1. 构建与测试指令 (Build & Test) - 编译项目: npm run build 或 make compile - 运行测试: pytest tests/unit/ 或 npm run test ## 2. 代码风格约束 (Code Style) - 技术栈: TypeScript (ES2022), 必须开启 Strict Null Checks。 - 状态管理: 优先采用纯函数设计,副作用必须隔离在 services 层。 ## 3. 历史伤疤日志 (Scar Tissue) - FIX-001: 绝对不要在未处理 Token 局部过期上下文的情况下,批量重写 /api/v1/auth。 - FIX-002: 避免在数据库驱动中使用嵌套的 async 块,必须使用同步包装器。 </pre> === 3.2 规范层 (Specification): 领域技能集 (Skills) === 针对高频、高风险的细分领域任务,必须沉淀为非自由发挥的、程序化的任务描述: * '''数据库 Schema 迁移规范''': 规定 AI 生成 Migration 文件时必须包含 down(回滚)脚本。 * '''API 变更协议''': 规定 AI 在修改对外接口时,必须先进行破坏性变更检查(Breaking Change Detection)。 === 3.3 红线层 (Hard Constraints): 系统级钩子 (Hooks) === * '''文件读写硬隔离''': 通过 Git 钩子(pre-commit)或系统权限,严禁 AI 在无人类二次认证(MFA)时读取 .env、私钥、或直接修改核心主干配置。 * '''命令执行白名单''': 严格限制 AI 只能执行非破坏性的命令。任何触发 rm -rf、drop table 等高危指令的行为将直接触发会话强行终止。 == 4. 落地实施路线图 == 企业流程演进应遵循“先受控、后提效、再闭环”原则,严禁一蹴而就: # '''阶段一:受控构建 (Weeks 1-4)''': 在所有核心仓库强制推行 CLAUDE.md 模板,要求开发人员在与 Agent 配对编码时,必须开启“计划模式(plan.md)”,卡住非受控的多文件胡乱修改。 # '''阶段二:持续评测与规范固化 (Months 2-3)''': 引入 '''Evals(持续评测集)'''——针对 AI 生成的代码或规格说明进行自动化质量打分,确保底层大模型升级时不会导致既有业务逻辑退化(Regression)。 # '''阶段三:全闭环左移 (Months 4+)''': 彻底打通从产品意图(intent.md)到架构设计(spec.md)的自动化转换,并在生产环境异常时实现故障自诊断回流。 [[Boardline]] [[Spec7-en]] [[分类:技术架构]] [[分类:研发效能]]
返回
AI-Native SDLC
。
导航菜单
个人工具
中文
登录
命名空间
页面
讨论
不转换
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息