商业产业 Hacker News AI 2026-10-15T07:20 正文 ok 1160 words

Aidlc:面向 AI 编码 Agent 的自适应工作流引导规则

英文标题:🔶 Aidlc: Adaptive workflow steering rules for AI coding agents

AI-DLC 是一套面向 AI 编码助手的软件交付工作流框架,通过统一的、与 Harness 无关的核心,支持 Claude Code、Kiro、Codex CLI、Cursor、opencode 和 GitHub Copilot 等运行环境。该项目提供从初始化到运维的 5 个阶段、33 个步骤,以及由 14 个 Agent、审批关卡、审计记录和持久化知识组成的工作流体系。开发者可通过原生 `aidlc` 安装程序快速配置不同 Harness,无需额外安装 Bun 或 Node.js;仅在手动复制运行时时需要 Bun。项目推荐使用 Claude Opus 4.8 等具备较强推理能力的模型,并强调在执行生成式 AI 输出前应人工审查结果与成本。
打开原文相关 8 · 机会 2
media2.7 KB media1.3 KB media1.3 KB media56.5 KB

中文

AI-DLC:一个核心,多个 Harness

AI-DLC(AI-Driven Development Life Cycle,AI 驱动开发生命周期)将 AI 编码助手转化为结构化、可验证的软件交付工作流。一个与 Harness 无关的核心,可原生运行于 Claude Code、Kiro CLI、Kiro IDE、Codex CLI、Cursor、opencode 和 GitHub Copilot。

版本 许可证

下面的快速开始步骤将安装最新版稳定版 AI-DLC。

macOS、Linux 或 WSL:

curl -fsSL https://github.com/awslabs/aidlc-workflows/releases/latest/download/install.sh | sh

Windows PowerShell:

irm https://github.com/awslabs/aidlc-workflows/releases/latest/download/install.ps1 | iex

安装程序会配置 AI-DLC 所需的一切:原生 aidlc 命令以及所有 Harness 运行时。你无需安装 Bun 或 Node.js;原生安装会通过 aidlc 运行其 hooks 和命令,不会调用 bun。在 Windows 上,安装仅针对当前账户,并会自动将二进制目录注册到用户 PATH 中。请在普通 PowerShell 窗口中运行;以“以管理员身份运行”方式打开的窗口会收到警告和提示,因为以管理员身份安装的安全性较低。如果其他终端会话找不到 aidlc,请打开一个新终端。若要跳过对持久 PATH 和当前进程 PATH 的全部修改,请使用 -NoModifyPath。Windows 卸载时只会删除被记录为由安装程序管理的用户 PATH 条目。在 macOS、Linux 或 WSL 上,如有需要,请按照安装程序给出的 PATH 指示操作。

如果你希望自行管理项目文件,或无法安装原生可执行文件,可以采用手动复制方式。这是唯一需要 Bun 的路径:安装 Bun,从发布页面下载 aidlc-copy-runtime-X.Y.Z.tar.gz,并将完整的 runtime/<harness>/ 目录复制到项目中。此方式不需要原生 aidlc 命令。

在项目根目录中,选择你使用的 Harness:

cd /path/to/your-project
aidlc config --harness claude
aidlc doctor

将 claude 替换为 kiro、kiro-ide、codex、cursor、opencode 或 copilot。在未指定 --harness 的情况下运行 aidlc config,若终端可用,将启动交互式设置。如果你在一个尚未信任的项目文件夹中使用 Kiro IDE 自带终端,Kiro 会先询问你是否信任该文件夹。仅当项目属于你自己,或你已检查过项目内容时,才选择 Trust Folder & Continue,因为信任后会允许文件夹中的 .kiro hooks 在你的机器上执行命令;否则请选择 Cancel 并先审查该文件夹(参见首次运行)。

在已配置的项目中打开你的 Harness,并描述需要完成的工作:

/aidlc Build a REST API for inventory management

Codex CLI 使用 $aidlc,而不是 /aidlc。在 Kiro IDE 中,先在聊天面板的 Agent 选择器中选择 aidlc。AI-DLC 会根据请求选择工作流,询问缺失的决策事项,并在继续推进前停留在审批关卡。

有关提供商设置、信任提示和 Harness 专属前置条件,请使用下表中的指南。完整操作说明参见入门指南。

Harness 配置 打开 调用 指南
Claude Code aidlc config --harness claude claude /aidlc 入门指南
Kiro:Kiro IDE >= 1.1.70 / Kiro CLI >= 2.24.1(v3) aidlc config --harness kiro-ide 在 Kiro IDE 中打开项目,并在聊天面板的 Agent 选择器中选择 aidlc,或运行 kiro-cli /aidlc Kiro IDE
Kiro CLI(V2)>= 2.6 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

模型提供商设置由 Harness 负责。随项目发布的配置会保留用户已选择的提供商和模型。aidlc config providers 可在受支持的项目界面中应用 Amazon Bedrock 设置,或为其他 Harness 记录手动设置。Kiro CLI 和 Kiro IDE 无需回答提供商相关问题,因为 Kiro 已提供模型访问能力。对于 Kiro CLI 2.24.1 或更高版本中的 Kiro v3 引擎,请使用 kiro-ide,该选项会将其固定;kiro 则对应 Kiro CLI(V2)(Kiro CLI说明了现有 kiro 项目如何切换)。该方法论本身与提供商无关。

AI-DLC 最适合搭配具备较强推理能力的模型。当前推荐模型为 Claude Opus 4.8。如果你无法使用 Opus,或不确定在所用 Harness 中何处设置模型和推理强度,请参阅选择模型与推理强度。

随着项目规模扩大,临时式 AI 编码会丢失上下文。AI-DLC 通过一个经审计的生命周期,将需求、决策、实现、测试和运维工作串联起来:

  • 从初始化到运维共 5 个阶段、33 个步骤
  • 14 个 Agent:11 名领域专家、2 名审查者和 1 个自适应编排器
  • 11 种工作流配置,覆盖功能开发、Bug 修复、基础设施、安全、概念验证、企业交付及其他常见工作
  • 人工审批关卡和与源代码绑定的审查证据
  • 119 类事件的审计追踪,以及持久化状态、团队知识和学习到的规则
  • 在所有受支持 Harness 中运行同一确定性引擎

从工作流配置开始,对比 Classic、Express 及专用工作流。有关架构和方法论,请参阅 AI-DLC Workflows 2.0 Specification。

重要提示

生成式 AI 可能会出错。请在采取行动前审查生成内容及其成本。参见 AWS Responsible AI Policy。

指南 适用场景
入门指南 安装、配置并运行第一个工作流
用户指南 使用工作流、配置、Agent、知识和审批关卡
Harness 指南 处理提供商、信任和运行时差异
安装与生命周期 更新、固定版本、离线安装、使用镜像或卸载
Harness 工程指南 重构步骤、Agent、规则、传感器和知识
开发与发布 让 PR 经历 AI 审查、预览测试和稳定版发布
开发者参考 修改引擎、hooks、打包或测试
  • core/ - 人工编写、与 Harness 无关的方法论和引擎
  • core/tools/ - 93 个 aidlc-*.ts 引擎和编写工具
  • harness/<name>/ - 精简的 Harness 专属清单和集成
  • plugins/<name>/ - 可选的 AIDLC 插件
  • scripts/ - 打包、二进制文件、安装程序和发布工具
  • tests/ - 冒烟、单元、集成和端到端测试
  • docs/ - 用户、Harness 工程和开发者文档
  • dist/ 和 dist-release/ - 生成的、在本地被忽略的输出

编辑 core/ 或 harness/<name>/,不要编辑生成的 dist* 输出。

安装依赖并生成全部 Harness:

bun install --frozen-lockfile
bun scripts/package.ts

常用命令:

bun scripts/package.ts <name>     # 生成一个 Harness
bun scripts/package.ts --check    # 确定性检查
bun tests/run-tests.ts --ci       # 冒烟、单元和集成测试
bun tests/run-tests.ts --release  # 完整发布验收

完整开发工作流请参阅贡献指南,如需增加另一种运行时,请参阅移植到新 Harness。

请先在项目根目录运行 aidlc doctor。常见修复方法如下:

症状 修复方法
找不到 aidlc 在 Windows 上,退出并重新打开终端应用或 IDE(安装期间已打开的应用内新标签页仍会保留旧 PATH),或者使用通过 -NoModifyPath 打印的直接命令。在 Unix 上,请按安装程序的 PATH 指示操作。
项目与运行时版本不一致 完成当前工作流,然后运行 aidlc config
Codex hooks 未运行 按照 Codex 指南所述信任项目 hooks
Bedrock 访问失败 启用已配置的模型,并验证 AWS 凭证和区域
刷新后插件步骤消失 运行 /aidlc plugin sync
刷新后的技能未生效 启动新的 Harness 会话

有关诊断和恢复流程,请参阅故障排查。

English / 原文

AI-DLC - one core, many harnesses

AI-DLC (AI-Driven Development Life Cycle) turns AI coding assistants into structured, verifiable software-delivery workflows. One harness-neutral core runs natively in Claude Code, Kiro CLI, Kiro IDE, Codex CLI, Cursor, opencode, and GitHub Copilot.

version license

The Quick Start below installs the latest stable AI-DLC release.

macOS, Linux, or WSL:

curl -fsSL https://github.com/awslabs/aidlc-workflows/releases/latest/download/install.sh | sh

Windows PowerShell:

irm https://github.com/awslabs/aidlc-workflows/releases/latest/download/install.ps1 | iex

The installer sets up everything AI-DLC needs: the native aidlc command and every harness runtime. You do not need to install Bun or Node.js; a native install runs its hooks and commands through aidlc and does not call bun. On Windows, it installs for the current account and automatically registers the bin directory in User PATH. Run it from a normal PowerShell window; one opened with "Run as administrator" gets a warning and a prompt, since installing as administrator is less safe. Open a new terminal if another session cannot find aidlc. To skip both persistent and current-process PATH changes, use -NoModifyPath. Windows uninstall removes only the User PATH entry recorded as installer-owned. On macOS, Linux, or WSL, follow the installer's PATH instruction if needed.

Prefer to manage the project files yourself, or cannot install a native executable? The manual-copy path is the one place Bun is needed: install Bun, download aidlc-copy-runtime-X.Y.Z.tar.gz from the release, and copy the complete runtime/<harness>/ directory into your project. This path does not require the native aidlc command.

From the project root, select the harness you use:

cd /path/to/your-project
aidlc config --harness claude
aidlc doctor

Replace claude with kiro, kiro-ide, codex, cursor, opencode, or copilot. Running aidlc config without --harness starts the interactive setup when a terminal is available. If you use Kiro IDE's own terminal in a project folder you have not trusted yet, Kiro first asks whether you trust it. Choose Trust Folder & Continue only for your own project or one you have checked, because trusting lets the folder's .kiro hooks run commands on your machine; otherwise choose Cancel and review the folder first (see First run).

Open your harness in the configured project and describe the work:

/aidlc Build a REST API for inventory management

Codex CLI uses $aidlc instead of /aidlc. In Kiro IDE, first choose aidlc in the chat panel's agent picker. AI-DLC selects a workflow from the request, asks for missing decisions, and stops at approval gates before moving forward.

For provider setup, trust prompts, and harness-specific prerequisites, use the guide in the table below. The complete walkthrough is in Getting Started.

Harness Configure Open Invoke Guide
Claude Code aidlc config --harness claude claude /aidlc Getting Started
Kiro: Kiro IDE >= 1.1.70 / Kiro CLI >= 2.24.1 (v3) aidlc config --harness kiro-ide Open the project in Kiro IDE and choose aidlc in the chat panel's agent picker, or run kiro-cli /aidlc Kiro IDE
Kiro CLI (V2) >= 2.6 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 Open Cursor or run 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 or 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. For Kiro's v3 engine on Kiro CLI 2.24.1 or later, use kiro-ide, which pins it; kiro is Kiro CLI (V2) (Kiro CLI says how an existing kiro project switches). The methodology itself is provider-independent.

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.

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.

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
  • core/ - hand-authored, harness-neutral methodology and engine
  • core/tools/ - 93 aidlc-*.ts engine and authoring tools
  • harness/<name>/ - thin, harness-specific manifests and integrations
  • plugins/<name>/ - optional AIDLC plugins
  • scripts/ - packaging, binary, installer, and release tooling
  • tests/ - smoke, unit, integration, and end-to-end tests
  • docs/ - user, harness-engineering, and developer documentation
  • dist/ and dist-release/ - generated, ignored local outputs

Edit core/ or harness/<name>/, never generated dist* output.

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.

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 Finish the active workflow, then run aidlc config
Codex hooks do not run Trust the project hooks as described in the Codex guide
Bedrock access fails Enable the configured models and verify AWS credentials and region
Plugin stages disappear after refresh Run /aidlc plugin sync
Refreshed skills do not take effect Start a new harness session

See Troubleshooting for diagnostic and recovery procedures.