返回文章列表

AI-DLC 中文文档系列 01:快速入门与使用指南

lyj

AI-DLC 快速入门:介绍方法论、安装方式、主流 AI 编程工具配置、使用流程、扩展机制和故障排查。

AI-DLC(AI-Driven Development Life Cycle,AI 驱动开发生命周期)

🚀 宣布 2.0(Preview)

我们很高兴宣布 AI-DLC Workflows 2.0 Preview 版本。新版本通过把 AI agent 转化为可验证、自我纠正的工程工作流,让自主软件开发变得切实可行。你可以阅读完整规格说明,并查看 v2 branch。我们期待你的反馈;这些反馈会直接影响 GA 路线。如果你有建议,请联系或在仓库中与我们互动。

[!IMPORTANT] 生成式 AI 可能会出错。你应考虑审查所选 AI 模型和 agentic coding assistant 生成的所有输出和成本。请参阅 AWS Responsible AI Policy。

AI-DLC 是一套智能软件开发工作流,能够适应你的需求、维持质量标准,并让你始终掌控流程。要进一步了解 AI-DLC Methodology,请阅读这篇 blog 以及其中引用的 Method Definition Paper。

目录


通用步骤

  1. 从 Releases page 下载名为 ai-dlc-rules-v<release-number>.zip 的最新 release zip 文件,保存到项目目录之外的文件夹(例如 ~/Downloads)。
  2. 解压 zip。它包含一个 aidlc-rules/ 文件夹,里面有两个子目录:
    • aws-aidlc-rules/ — 核心 AI-DLC 工作流规则
    • aws-aidlc-rule-details/ — 由核心规则按条件引用的详细规则
  3. 按下方你的 coding agent 和平台对应的说明完成设置。

按平台设置


Kiro

AI-DLC 在你的项目 workspace 中使用 Kiro Steering Files。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

macOS/Linux:

mkdir -p .kiro/steering
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rules .kiro/steering/
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details .kiro/

Windows(PowerShell):

New-Item -ItemType Directory -Force -Path ".kiro\steering"
Copy-Item -Recurse "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules" ".kiro\steering\"
Copy-Item -Recurse "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details" ".kiro\"

Windows(CMD):

mkdir .kiro\steering
xcopy %USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules .kiro\steering\aws-aidlc-rules\ /E /I
xcopy %USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details .kiro\aws-aidlc-rule-details\ /E /I

你的项目应如下所示:

<project-root>/
    ├── .kiro/
    │     ├── steering/
    │     │      ├── aws-aidlc-rules/
    │     ├── aws-aidlc-rule-details/

验证规则是否已加载:

在 Kiro IDE 中验证

打开 steering files 面板,确认在 Workspace 下能看到 core-workflow 条目,如下方截图所示。

AI-DLC Rules in Kiro IDE

我们使用 Kiro IDE 的 Vibe mode 运行 AI-DLC 工作流。这确保 AI-DLC 工作流能引导 Kiro 中的开发流程。有时,Kiro 可能会提示你切换到 spec mode。遇到这类提示时选择 No,以保持在 Vibe mode。

Staying in Kiro Vibe mode

在 Kiro CLI 中验证

运行 kiro-cli,然后运行 /context show,确认存在 .kiro/steering/aws-aidlc-rules 条目。

AI-DLC Rules in Kiro CLI

Amazon Q Developer IDE Plugin/Extension

AI-DLC 在你的项目 workspace 中使用 Amazon Q Rules。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

macOS/Linux:

mkdir -p .amazonq/rules
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rules .amazonq/rules/
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details .amazonq/

Windows(PowerShell):

New-Item -ItemType Directory -Force -Path ".amazonq\rules"
Copy-Item -Recurse "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules" ".amazonq\rules\"
Copy-Item -Recurse "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details" ".amazonq\"

Windows(CMD):

mkdir .amazonq\rules
xcopy %USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules .amazonq\rules\aws-aidlc-rules\ /E /I
xcopy %USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details .amazonq\aws-aidlc-rule-details\ /E /I

你的项目应如下所示:

<project-root>/
    ├── .amazonq/
    │     ├── rules/
    │     │     ├── aws-aidlc-rules/
    │     ├── aws-aidlc-rule-details/

验证规则是否已加载:

  1. 在 Amazon Q Chat 窗口中,点击右下角的 Rules 按钮。
  2. 确认能看到 .amazonq/rules/aws-aidlc-rules 条目。
AI-DLC Rules in Q Developer IDE plugin

Cursor IDE

AI-DLC 使用 Cursor Rules 实现其智能工作流。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

选项 1:Project Rules(推荐)

Unix/Linux/macOS:

mkdir -p .cursor/rules

cat > .cursor/rules/ai-dlc-workflow.mdc << 'EOF'
---
description: "AI-DLC (AI-Driven Development Life Cycle) adaptive workflow for software development"
alwaysApply: true
---

EOF
cat ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md >> .cursor/rules/ai-dlc-workflow.mdc

mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

New-Item -ItemType Directory -Force -Path ".cursor\rules"

$frontmatter = @"
---
description: "AI-DLC (AI-Driven Development Life Cycle) adaptive workflow for software development"
alwaysApply: true
---

"@
$frontmatter | Out-File -FilePath ".cursor\rules\ai-dlc-workflow.mdc" -Encoding utf8

Get-Content "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" | Add-Content ".cursor\rules\ai-dlc-workflow.mdc"

New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

mkdir .cursor\rules

(
echo ---
echo description: "AI-DLC (AI-Driven Development Life Cycle) adaptive workflow for software development"
echo alwaysApply: true
echo ---
echo.
) > .cursor\rules\ai-dlc-workflow.mdc

type "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" >> .cursor\rules\ai-dlc-workflow.mdc

mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

选项 2:AGENTS.md(简单替代)

Unix/Linux/macOS:

cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md ./AGENTS.md
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\AGENTS.md"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\AGENTS.md"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

验证设置:

  1. 打开 Cursor Settings → Rules, Commands
  2. 在 Project Rules 下应能看到 ai-dlc-workflow
  3. 对于 AGENTS.md,它会被自动检测并应用

AI-DLC Rules in Cursor

目录结构(选项 1):

<my-project>/
├── .cursor/
│   └── rules/
│       └── ai-dlc-workflow.mdc
└── .aidlc-rule-details/
    ├── common/
    ├── inception/
    ├── construction/
    ├── extensions/
    └── operations/

Cline

AI-DLC 使用 Cline Rules 实现其智能工作流。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

选项 1:.clinerules 目录(推荐)

Unix/Linux/macOS:

mkdir -p .clinerules
cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md .clinerules/
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

New-Item -ItemType Directory -Force -Path ".clinerules"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".clinerules\"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

mkdir .clinerules
copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".clinerules\"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

选项 2:AGENTS.md(替代)

Unix/Linux/macOS:

cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md ./AGENTS.md
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\AGENTS.md"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\AGENTS.md"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

验证设置:

  1. 在 Cline 的聊天界面中,查看聊天输入框下方的 Rules popover
  2. 确认 core-workflow.md 已列出且处于 active 状态
  3. 你可以按需要使用 popover UI 开关规则文件

AI-DLC Rules in Cline

目录结构(选项 1):

<my-project>/
├── .clinerules/
│   └── core-workflow.md
└── .aidlc-rule-details/
    ├── common/
    ├── inception/
    ├── construction/
    ├── extensions/
    └── operations/

Claude Code

AI-DLC 使用 Claude Code 的项目 memory 文件(CLAUDE.md)实现其智能工作流。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

选项 1:Project Root(推荐)

Unix/Linux/macOS:

cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md ./CLAUDE.md
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\CLAUDE.md"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\CLAUDE.md"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

选项 2:.claude 目录

Unix/Linux/macOS:

mkdir -p .claude
cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md .claude/CLAUDE.md
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

New-Item -ItemType Directory -Force -Path ".claude"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".claude\CLAUDE.md"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

mkdir .claude
copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".claude\CLAUDE.md"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

验证设置:

  1. 在项目目录中启动 Claude Code(CLI:claude 或 VS Code extension)
  2. 使用 /config 命令查看当前配置
  3. 询问 Claude:"What instructions are currently active in this project?"

目录结构(选项 1):

<my-project>/
├── CLAUDE.md
└── .aidlc-rule-details/
    ├── common/
    ├── inception/
    ├── construction/
    ├── extensions/
    └── operations/

GitHub Copilot

AI-DLC 使用 GitHub Copilot custom instructions 实现其智能工作流。.github/copilot-instructions.md 文件会被自动检测,并应用到 workspace 中的所有 chat request。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

Unix/Linux/macOS:

mkdir -p .github
cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md .github/copilot-instructions.md
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

New-Item -ItemType Directory -Force -Path ".github"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".github\copilot-instructions.md"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

mkdir .github
copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".github\copilot-instructions.md"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

验证设置:

  1. 用项目文件夹打开 VS Code
  2. 打开 Copilot Chat 面板(Cmd/Ctrl+Shift+I)
  3. 选择 Configure Chat(齿轮图标)> Chat Instructions,确认 copilot-instructions 已列出
  4. 或者在 chat 输入框中键入 /instructions 查看 active instructions

目录结构:

<my-project>/
├── .github/
│   └── copilot-instructions.md
└── .aidlc-rule-details/
    ├── common/
    ├── inception/
    ├── construction/
    ├── extensions/
    └── operations/

OpenAI Codex

AI-DLC 支持 OpenAI Codex 作为受支持 coding agent,使用 Codex AGENTS.md 约定交付其智能工作流。你在项目 root 启动会话时,Codex 会自动发现并加载 AGENTS.md。

下面命令假设你已将 zip 解压到 Downloads 文件夹,因此路径为 Downloads/aidlc-rules/。如果你使用了其他位置,请把 Downloads 替换为实际文件夹路径。

[!NOTE] Windows 用户: 如果使用 File Explorer 的 Extract All... 对话框,它默认会创建一个以 zip 命名的包装文件夹(例如 ai-dlc-rules-v0.1.8\aidlc-rules\...)。请取消/编辑该目标,使内容直接落在 Downloads\aidlc-rules\(匹配下方命令),或在每个 Downloads\ 路径前添加 ai-dlc-rules-v<version>\,其中 <version> 替换为你下载的 release 版本。

Unix/Linux/macOS:

cp ~/Downloads/aidlc-rules/aws-aidlc-rules/core-workflow.md ./AGENTS.md
mkdir -p .aidlc-rule-details
cp -R ~/Downloads/aidlc-rules/aws-aidlc-rule-details/* .aidlc-rule-details/

Windows PowerShell:

Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\AGENTS.md"
New-Item -ItemType Directory -Force -Path ".aidlc-rule-details"
Copy-Item "$env:USERPROFILE\Downloads\aidlc-rules\aws-aidlc-rule-details\*" ".aidlc-rule-details\" -Recurse

Windows CMD:

copy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rules\core-workflow.md" ".\AGENTS.md"
mkdir .aidlc-rule-details
xcopy "%USERPROFILE%\Downloads\aidlc-rules\aws-aidlc-rule-details" ".aidlc-rule-details\" /E /I

验证设置:

  1. 在项目目录中启动 Codex 会话
  2. 询问 Codex:对现有项目使用 "Using AIDLC analyze the project?",或对新项目使用 "Using Aidlc what workflow do you see"。
  3. Codex 应描述 AI-DLC 三阶段工作流(Inception → Construction → Operations)

[!NOTE] AGENTS.md 文件设计为在默认设置下适配 Codex instruction budget。如果你添加了大量项目特定内容,且 Codex 报告项目文档超过 instruction limit,可以在 Codex 配置中增大限制(例如调整 config.toml 中的 project_doc_max_bytes):

project_doc_max_bytes = 65536  # Example value; choose a limit appropriate for your project

目录结构:

<my-project>/
├── AGENTS.md
└── .aidlc-rule-details/
    ├── common/
    ├── inception/
    ├── construction/
    ├── extensions/
    └── operations/

其他 Agent

AI-DLC 可与任何支持项目级规则或 steering file 的 coding agent 配合使用。通用做法:

  1. 将 aws-aidlc-rules/ 放到你的 agent 读取项目规则的位置(请查阅该 agent 文档)。
  2. 将 aws-aidlc-rule-details/ 放在 sibling level,让规则可以引用它。

如果你的 agent 没有规则文件约定,请把两个文件夹都放在项目 root,并将 agent 指向 aws-aidlc-rules/ 作为规则目录。


使用方式

  1. 在聊天中以 "Using AI-DLC, ..." 这句话开头陈述你的意图,启动任何软件开发项目
  2. AI-DLC 工作流会自动激活,并从那里开始引导你
  3. 回答 AI-DLC 提出的结构化问题
  4. 仔细审查 AI 生成的每个计划。提供你的监督和校验
  5. 审查执行计划,了解哪些 stage 会运行
  6. 仔细审查制品并批准每个 stage,以保持掌控
  7. 所有制品都会生成在 aidlc-docs/ 目录中

三阶段自适应工作流

AI-DLC 遵循一套结构化三阶段方法,并根据项目复杂度自适应:

🔵 INCEPTION PHASE

决定要构建什么以及为什么构建

  • 需求分析和验证
  • 用户故事创建(如适用)
  • Application Design 以及为并行开发创建工作单元
  • 风险评估和复杂度评估

🟢 CONSTRUCTION PHASE

决定如何构建

  • 详细组件设计
  • 代码生成和实现
  • 构建配置和测试策略
  • 质量保证和验证

🟡 OPERATIONS PHASE

部署和监控(未来)

  • 部署自动化和基础设施
  • 监控和可观测性设置
  • 生产就绪验证

关键特性

特性 描述
Adaptive Intelligence 只执行对你具体请求有价值的 stage
Context-Aware 分析现有代码库和复杂度要求
Risk-Based 复杂变更得到全面处理,简单变更保持高效
Question-Driven 结构化多选问题写入文件,而不是聊天中
Always in Control 审查执行计划并批准每个 phase
Extensible 在核心工作流之上叠加自定义规则,例如安全、合规和组织专用规则

Extensions

AI-DLC 支持 extension 系统,允许你在核心工作流之上叠加额外规则。Extensions 是组织在 aws-aidlc-rule-details/extensions/ 下的 Markdown 文件,并按类别分组(例如 security/、testing/、resiliency/)。

Extensions 如何工作

每个 extension 由放在同一目录中的两个文件组成:

  • 一个规则文件(例如 security-baseline.md),包含该 extension 的规则。
  • 一个 opt-in 文件(例如 security-baseline.opt-in.md),包含 Requirements Analysis 期间展示给用户的结构化多选问题。

工作流启动时,AI-DLC 扫描 extensions/ 目录,并只加载 *.opt-in.md 文件。在 Requirements Analysis 期间,它会向用户展示每个 opt-in prompt。当用户选择加入时,对应规则文件会被加载(按命名约定推导:去掉 .opt-in.md 后追加 .md)。当用户选择退出时,完整规则文件永不加载。没有匹配 *.opt-in.md 文件的 extension 会始终强制执行。

一旦启用,extension 规则就是阻塞约束 — 在每个 stage 中,模型会在允许 stage 继续之前验证合规性。

内置 Extensions

extensions/ 目录随附以下内容(后续可能新增 extension):

aws-aidlc-rule-details/
└── extensions/
    ├── security/                      # Extension category
    │   └── baseline/
    │       ├── security-baseline.md          # Baseline security rules
    │       └── security-baseline.opt-in.md   # Opt-in prompt
    ├── testing/                       # Extension category
    │   └── property-based/
    │       ├── property-based-testing.md          # Property-based testing rules
    │       └── property-based-testing.opt-in.md   # Opt-in prompt
    ├── resiliency/
    │   └── baseline/
    │       ├── resiliency-baseline.md          # Baseline resiliency rules
    │       └── resiliency-baseline.opt-in.md   # Opt-in prompt

[!IMPORTANT] 安全 extension 规则是为在 AI-DLC 工作流中构建有效安全规则提供的方向性参考。每个组织都应在生产工作流中部署前,构建、定制并充分测试自己的安全规则。

韧性 extension 规则是为在 AI-DLC 工作流中构建 resilient workloads 规则提供的方向性最佳实践。每个组织都应在生产工作流中部署前,构建、定制并充分测试自己的韧性规则。

添加自己的 Extensions

你可以扩展现有类别,也可以创建全新类别。

  1. 在 extensions/ 下创建目录(例如 security/compliance/ 或 performance/baseline/)。
  2. 添加一个规则文件(例如 compliance.md)。遵循与 security-baseline.md 相同的结构:
    • 将每条规则定义为 ## Rule <PREFIX-NN>: <Title> 格式的 heading,其中 prefix 是短类别标识符,NN 是序号(例如 COMPLIANCE-01、COMPLIANCE-02)。这些 ID 会在审计日志和合规摘要中引用,因此必须在所有已加载 extension 中唯一。
    • 包含一个描述要求的 Rule 部分。
    • 包含一个带具体检查项的 Verification 部分,供模型评估。
  3. 使用 <name>.opt-in.md 命名约定添加匹配的 opt-in 文件(例如 compliance.opt-in.md)。预期格式请参阅 security-baseline.opt-in.md。省略此文件意味着该 extension 始终强制执行,用户无法退出。
  4. 默认情况下,规则是阻塞的 — 如果 verification criteria 不满足,stage 在发现解决前不能继续。

支持工具

scripts/ 目录包含增强 AI-DLC 工作流的支持工具:

AIDLC Evaluator

位置: scripts/aidlc-evaluator/

用于验证 AI-DLC workflow 变更的自动化测试和报告框架。Evaluator 提供:

  • Golden Test Cases — 用于验证的精选 baseline test case
  • Execution Framework — 运行 test case 通过 evaluation pipeline 的编排
  • Semantic Evaluation — 基于 AI 的输出正确性和完整性评估
  • Code Evaluation — 静态分析(lint、安全扫描、重复检测)
  • NFR Evaluation — 非功能需求测试(token 使用量、执行时间、跨模型一致性)
  • CI/CD Integration — 用于 PR 验证的自动化 pipeline

快速开始:

cd scripts/aidlc-evaluator
uv sync
uv run python run.py test

文档: 参阅 scripts/aidlc-evaluator/README.md


AIDLC Design Reviewer

位置: scripts/aidlc-designreview/

⚠️ 实验性功能 — AI 驱动的设计审查工具,通过 AWS Bedrock 使用 Claude 模型分析 AIDLC 设计制品。

特性:

  • Multi-Agent Review — 三个专门 AI agent(Critique、Alternatives、Gap Analysis)
  • Quality Scoring — 带可操作建议的加权严重性分析
  • 两种部署模式:
    • CLI Tool — 面向 CI/CD pipeline 的按需审查
    • Claude Code Hook — 开发期间实时审查(实验性)

安装(CLI Tool):

cd scripts/aidlc-designreview
uv sync --extra test
source .venv/bin/activate  # Linux/Mac
design-reviewer --aidlc-docs /path/to/aidlc-docs

安装(Claude Code Hook):

# From workspace root
./scripts/aidlc-designreview/tool-install/install-linux.sh      # Linux
./scripts/aidlc-designreview/tool-install/install-mac.sh        # macOS
.\scripts\aidlc-designreview\tool-install\install-windows.ps1   # Windows PowerShell

安装器会自动检测你的 workspace root,并将 hook 安装到 .claude/。

文档:


原则

这些是指导我们决策的核心原则。

  • 不重复。事实来源只存在于一个地方。如果我们为需要特定文件的新工具或格式添加支持,会从源生成它们,而不是维护单独副本。

  • 方法论优先。AI-DLC 本质上是一套方法论,而不是工具。用户不应为了开始使用而必须安装任何东西。也就是说,如果有助于用户采用或扩展方法论,我们未来也愿意接受便利工具(脚本、CLI)。

  • 可复现。规则应足够清晰,使不同模型产生相似结果。我们知道模型行为不同,但方法论应通过明确指导尽量降低差异。

  • 无关性。该方法论可与任何 IDE、agent 或模型配合使用。我们不绑定特定工具或供应商。

  • Human in the loop。关键决策需要用户明确确认。Agent 提出方案,人类批准。


前置条件

安装我们支持的 Assisted AI Coding 平台/工具之一:

平台 安装链接
Kiro Install
Kiro CLI Install
Amazon Q Developer IDE Plugin Install
Cursor IDE Install
Cline VS Code Extension Install
Claude Code CLI Install
GitHub Copilot Install + Chat

故障排查

通用问题

问题 解决方案
规则未加载 检查文件是否位于对应平台的正确位置
文件编码问题 确保文件为 UTF-8 编码
规则未在会话中应用 文件变更后启动新的 chat session
规则详情未加载 验证 .aidlc-rule-details/ 存在且包含子目录

平台专用问题

Amazon Q Developer / Kiro

  • 使用 /context show 验证规则是否已加载
  • 检查 .amazonq/rules/ 或 .kiro/steering/ 目录结构

Cursor

  • 对于 "Apply Intelligently",确保 frontmatter 中定义了 description
  • 检查 Cursor Settings → Rules,确保规则已启用
  • 如果规则过大(>500 行),拆分为多个聚焦规则

Cline

  • 检查聊天输入框下方的 Rules popover
  • 按需要使用 popover UI 开关规则文件

Claude Code

  • 使用 /config 命令查看当前配置
  • 询问 "What instructions are currently active in this project?"

GitHub Copilot

  • 选择 Configure Chat(齿轮图标)> Chat Instructions,验证 instructions 已加载
  • 在 chat 输入框中键入 /instructions 查看 active instruction files
  • 检查 .github/copilot-instructions.md 是否存在于 workspace root

Windows 上的文件路径问题

  • 在 Markdown 文件中的文件路径使用正斜杠 /
  • 带反斜杠的 Windows 路径可能无法正常工作

版本控制建议

提交到仓库:

# These should be version controlled
CLAUDE.md
AGENTS.md
.amazonq/rules/
.amazonq/aws-aidlc-rule-details/
.kiro/steering/
.kiro/aws-aidlc-rule-details/
.cursor/rules/
.clinerules/
.github/copilot-instructions.md
.aidlc-rule-details/

可选 - 添加到 .gitignore(如需要):

# Local-only settings
.claude/settings.local.json

生成的 aidlc-docs/ 参考

AI-DLC 工作流生成的所有文档制品的完整参考,请参阅 docs/GENERATED_DOCS_REFERENCE.md。


实验性:AI 辅助设置(Release 下载)

不要手工复制文件,让你的 AI agent 处理设置。这是实验性工作流 — 当前已用 Kiro、Claude code、Cursor、Antigravity 验证。

注意: 此方法要求你的 agent 具有 shell access(例如 Kiro、Claude Code、Cline)。对于没有 shell access 的 agent,请遵循上方 通用步骤 设置。

将此 prompt 粘贴到你的 AI agent:

Set up AI-DLC in this project by doing the following:

1. Download the latest AI-DLC release:
   - Use the GitHub API to find the latest release asset URL:
     curl -sL https://api.github.com/repos/awslabs/aidlc-workflows/releases/latest \
       | grep -o '"browser_download_url": *"[^"]*"' \
       | head -1 \
       | cut -d'"' -f4
   - Download the zip from that URL to /tmp/aidlc-rules.zip
   - Extract it: unzip -o /tmp/aidlc-rules.zip -d /tmp/aidlc-release
   - Copy the aidlc-rules/ folder from the extracted contents into .aidlc at the project root
   - Clean up: rm -rf /tmp/aidlc-rules.zip /tmp/aidlc-release

2. Create the appropriate rules/steering file for your IDE using the options below.
   Pick the one that matches the agent you are running in:

   - Kiro IDE or Kiro CLI     → create `.kiro/steering/ai-dlc.md`
   - Amazon Q Developer       → create `.amazonq/rules/ai-dlc.md`
   - Antigravity              → create `.agent/rules/ai-dlc.md`
   - Cursor                   → create `.cursor/rules/ai-dlc.mdc` with frontmatter:
                                  ---
                                  description: "AI-DLC workflow"
                                  alwaysApply: true
                                  ---
   - Cline                    → create `.clinerules/ai-dlc.md`
   - Claude Code              → create `CLAUDE.md`
   - GitHub Copilot           → create `.github/copilot-instructions.md`
   - Any other agent          → create `AGENTS.md`

3. The file content should be:
   When the user invokes AI-DLC, read and follow
   `.aidlc/aidlc-rules/aws-aidlc-rules/core-workflow.md` to start the workflow.

4. Add `.aidlc` to `.gitignore` unless I explicitly ask you not to.

5. Confirm what file you created and that `.aidlc` is gitignored.

Agent 会下载最新 release,为你的 IDE 创建正确配置文件,并自动将 .aidlc 目录加入 gitignore。

更新 AI-DLC — 重新运行上方 prompt。Agent 会下载最新 release 并覆盖现有 .aidlc/ 文件夹。


其他资源

资源 链接
AI-DLC Method Definition Paper Paper
AI-DLC Methodology Blog AWS Blog
AI-DLC Open-source Launch Blog AWS Blog
AI-DLC Example Walkthrough Blog AWS Blog
Amazon Q Developer Documentation Docs
Kiro CLI Documentation Docs
Cursor Rules Documentation Docs
Claude Code Documentation GitHub
GitHub Copilot Documentation Docs
Working with AI-DLC(交互模式和技巧) docs/WORKING-WITH-AIDLC.md
Contributing Guidelines CONTRIBUTING.md
Code of Conduct CODE_OF_CONDUCT.md

贡献

更多信息请参阅 CONTRIBUTING。

许可证

本库采用 MIT-0 License 授权。请参阅 LICENSE 文件。

参考链接