Aidlc:為 AI 編碼代理提供自適應工作流程導向規則
Aidlc: Adaptive workflow steering rules for AI coding agents
AI‑DLC 是一個開源框架,將 AI 編碼助手轉變為可驗證的工作流程,支援 Claude Code、Kiro CLI/IDE、Codex CLI、Cursor、opencode 與 GitHub Copilot。
這個開源框架將 AI 編碼助手轉化為可驗證的工作流程,支援多個 IDE 與 CLI,並提供審核門檻與持久化狀態,方便開發者統一管理專案。
AI-DLC - 單一核心,多種介面
AI-DLC (AI-Driven Development Life Cycle) 將 AI 程式碼助理轉化為結構化、可驗證的軟體交付工作流程。單一介面無關的核心可在 Claude Code、Kiro CLI、Kiro IDE、Codex CLI、Cursor、opencode 和 GitHub Copilot 中原生執行。
下方的快速入門會安裝最新的穩定版 AI-DLC。
快速入門
1. 安裝 AI-DLC
macOS、Linux 或 WSL:
curl -fsSL https://github.com/awslabs/aidlc-workflows/releases/latest/download/install.sh | shWindows PowerShell:
irm https://github.com/awslabs/aidlc-workflows/releases/latest/download/install.ps1 | iex
安裝程式會設定 AI-DLC 所需的一切:原生 aidlc 指令與每個介面執行階段。您不需要安裝 Bun 或 Node.js;原生安裝會透過 aidlc 執行其掛鉤與指令,且不會呼叫 bun。在 Windows 上,它會為目前帳戶進行安裝,並自動將 bin 目錄註冊到使用者 PATH 中。請從一般的 PowerShell 視窗執行它;透過「以系統管理員身分執行」開啟的視窗會收到警告與提示,因為以系統管理員身分安裝較不安全。如果其他工作階段找不到 aidlc,請開啟新的終端機。若要跳過永久與目前處理程序的 PATH 變更,請使用 -NoModifyPath。Windows 解除安裝只會移除記錄為安裝程式擁有的使用者 PATH 專案。在 macOS、Linux 或 WSL 上,如有需要請遵循安裝程式的 PATH 指示。
偏好自行管理專案檔,或是無法安裝原生執行檔?手動複製路徑是唯一需要 Bun 的地方:安裝 Bun,從版本頁面下載 aidlc-copy-runtime-X.Y.Z.tar.gz,並將完整的 runtime/<harness>/ 目錄複製到您的專案中。此路徑不需要原生的 aidlc 指令。
2. 設定專案
從專案根目錄中,選擇您使用的介面:
cd /path/to/your-project
aidlc config --harness claude
aidlc doctor將 claude 替換為 kiro、kiro-ide、codex、cursor、opencode 或 copilot。當終端機可用時,在沒有 aidlc config 的情況下執行 --harness 會啟動互動式設定。如果您在尚未信任的專案資料夾中使用 Kiro IDE próprias 終端機,Kiro 會先詢問您是否信任它。請僅為您自己的專案或已檢查過的專案選擇 Trust Folder & Continue,因為信任會讓該資料夾的 .kiro 掛鉤在您的電腦上執行指令;否則請選擇 Cancel 並先檢查該資料夾(請參閱 首次執行)。
3. 啟動工作流程
在已設定的專案中開啟您的介面並描述工作:
/aidlc Build a REST API for inventory management
Codex CLI 使用 $aidlc 而非 /aidlc。在 Kiro IDE 中,請先在聊天面板的代理程式挑選器中選擇 aidlc。AI-DLC 會從請求中選擇工作流程、詢問缺少的決策,並在往前推進之前停在核準關卡處。
關於提供者設定、信任提示與介面特定先決條件,請使用下表中的指南。完整的逐步解說位於開始使用。
挑選您的介面
| 介面 | 設定 | 開啟 | 呼叫 | 指南 |
|---|---|---|---|---|
| Claude Code | aidlc config --harness claude |
claude |
/aidlc |
開始使用 |
| Kiro IDE >= 1.1.70 / Kiro CLI >= 2.24.1 (v3) | aidlc config --harness kiro-ide |
在 Kiro IDE 中開啟專案並在聊天面板的代理程式挑選器中選擇 aidlc,或執行 kiro-cli |
/aidlc |
Kiro IDE |
| Kiro CLI >= 2.6 (legacy) | aidlc config --harness kiro |
kiro-cli chat |
/aidlc |
Kiro CLI |
| Codex CLI >= 0.145.0 | aidlc config --harness codex |
codex |
$aidlc |
Codex CLI |
| Cursor | aidlc config --harness cursor |
開啟 Cursor 或執行 agent |
/aidlc |
Cursor |
| opencode >= 1.17 | aidlc config --harness opencode |
opencode |
/aidlc |
opencode |
| GitHub Copilot CLI >= 1.0.74 / VS Code >= 1.130 | aidlc config --harness copilot |
Copilot CLI 或 VS Code | /aidlc |
GitHub Copilot |
Model-provider setup belongs to the harness. Shipped project configuration
keeps the provider and model already selected by the user. aidlc config providers can apply Amazon Bedrock settings on supported project surfaces or
record manual setup for other harnesses. Kiro CLI and Kiro IDE need no provider
answer because model access comes with Kiro. On Kiro CLI 2.24.1 or later, use
kiro-ide, which pins Kiro's v3 engine; kiro is the legacy row (Kiro CLI
says how an existing kiro project switches). The methodology itself is
provider-independent.
Recommended Model
AI-DLC works best with capable reasoning models. The current recommended model is Claude Opus 4.8. If Opus is not available to you, or you are not sure where to set the model and effort on your harness, see Choosing a Model and Effort.
Why AI-DLC
Ad-hoc AI coding loses context as projects grow. AI-DLC keeps requirements, decisions, implementation, tests, and operational work connected through one audited lifecycle:
- 5 phases and 33 stages from initialization through operation
- 14 agents: 11 domain experts, 2 reviewers, and an adaptive composer
- 11 workflow profiles for features, bug fixes, infrastructure, security, proofs of concept, enterprise delivery, and other common work
- Human approval gates and source-bound review evidence
- 119-event audit trail plus persistent state, team knowledge, and learned rules
- The same deterministic engine across every supported harness
Start with Workflow Profiles to compare Classic, Express, and the focused workflows. See the AI-DLC Workflows 2.0 Specification for the architecture and methodology.
Important
Generative AI can make mistakes. Review generated output and costs before acting on them. See the AWS Responsible AI Policy.
Documentation
| Guide | Use it when |
|---|---|
| Getting Started | Installing, configuring, and running your first workflow |
| User Guide | Using workflows, profiles, agents, knowledge, and approval gates |
| Harness guides | Handling provider, trust, and runtime differences |
| Install and Lifecycle | Updating, pinning, installing offline, using mirrors, or uninstalling |
| Harness Engineer Guide | Reshaping stages, agents, rules, sensors, and knowledge |
| Development and Releases | Taking a PR through AI review, preview testing, and stable publication |
| Developer Reference | Changing the engine, hooks, packaging, or tests |
Repository Layout
core/- hand-authored, harness-neutral methodology and enginecore/tools/- 93 aidlc-*.ts engine and authoring toolsharness/<name>/- thin, harness-specific manifests and integrationsplugins/<name>/- optional AIDLC pluginsscripts/- packaging, binary, installer, and release toolingtests/- smoke, unit, integration, and end-to-end testsdocs/- user, harness-engineering, and developer documentationdist/anddist-release/- generated, ignored local outputs
Edit core/ or harness/<name>/, never generated dist* output.
Development
Install dependencies and generate every harness:
bun install --frozen-lockfile bun scripts/package.ts
Useful commands:
bun scripts/package.ts <name> # generate one harness bun scripts/package.ts --check # determinism guard bun tests/run-tests.ts --ci # smoke, unit, and integration bun tests/run-tests.ts --release # full release acceptance
See the Contributing Guide for the complete development workflow and Porting to a New Harness to add another runtime.
Troubleshooting
Run aidlc doctor from the project root first. Common fixes:
| Symptom | Fix |
|---|---|
aidlc is not found |
On Windows, quit and reopen the terminal app or IDE (a new tab inside one that was open during the install keeps the old PATH), or use the direct command printed with -NoModifyPath. On Unix, apply the installer's PATH instruction. |
| Project/runtime version skew | 完成正在進行的工作流程,然後執行 aidlc config |
| Codex 連結(hooks)未執行 | 依照 Codex guide 中的說明,信任專案連結(hooks) |
| Bedrock 存取失敗 | 啟用已設定的模型,並驗證 AWS 憑證與區域 |
| 在重新整理後外掛階段消失 | 執行 /aidlc plugin sync |
| 重新整理後的技能未生效 | 啟動一個新的 harness 會話 |
請參閱 Troubleshooting 以取得診斷與 恢復程式。