ai-delivery-workflow 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/docs/CLI-PARAMETER-REFERENCE.zh-CN.md +1 -0
  2. package/docs/FILE-REFERENCE.zh-CN.md +2 -2
  3. package/docs/PROJECT-MANUAL.zh-CN.md +9 -0
  4. package/lib/project-bootstrap.mjs +83 -0
  5. package/package.json +1 -1
  6. package/skills/ai-delivery-assemble-release/SKILL.md +4 -0
  7. package/skills/ai-delivery-bootstrap/SKILL.md +3 -1
  8. package/skills/ai-delivery-checkpoint-task/SKILL.md +2 -0
  9. package/skills/ai-delivery-close-version/SKILL.md +2 -0
  10. package/skills/ai-delivery-define-product/SKILL.md +2 -0
  11. package/skills/ai-delivery-deploy-production/SKILL.md +2 -0
  12. package/skills/ai-delivery-design-architecture/SKILL.md +2 -0
  13. package/skills/ai-delivery-design-experience/SKILL.md +2 -0
  14. package/skills/ai-delivery-design-tests/SKILL.md +2 -0
  15. package/skills/ai-delivery-develop-iteration/SKILL.md +2 -0
  16. package/skills/ai-delivery-evolve-workflow/SKILL.md +2 -0
  17. package/skills/ai-delivery-execute-work-package/SKILL.md +2 -0
  18. package/skills/ai-delivery-manage-standards/SKILL.md +2 -0
  19. package/skills/ai-delivery-orchestrate/SKILL.md +2 -0
  20. package/skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/bootstrap/bootstrap.mjs +7 -2
  21. package/skills/ai-delivery-orchestrate/references/codebase-document-contract.md +3 -1
  22. package/skills/ai-delivery-orchestrate/references/communication-confirmation-contract.md +17 -0
  23. package/skills/ai-delivery-orchestrate-release/SKILL.md +2 -0
  24. package/skills/ai-delivery-plan-iteration/SKILL.md +2 -0
  25. package/skills/ai-delivery-prepare-platform/SKILL.md +2 -0
  26. package/skills/ai-delivery-prepare-release/SKILL.md +2 -0
  27. package/skills/ai-delivery-review-change/SKILL.md +2 -0
  28. package/skills/ai-delivery-validate-artifacts/SKILL.md +2 -0
  29. package/skills/ai-delivery-verify-candidate/SKILL.md +2 -0
  30. package/skills/ai-delivery-verify-production/SKILL.md +4 -0
@@ -58,6 +58,7 @@ npx ai-delivery-workflow@0.4.0 doctor .
58
58
  | `repair` | 追加独立的前向归档失效事务;原归档证据保持逐字节不变。 | 视参数而定 |
59
59
  | `inspect` | 只读识别工作区、两套 Git、安装完整性、正式状态和任务恢复建议。 | 否 |
60
60
  | `bootstrap` | 根据只读检查决定初始化缺失工作流、恢复 Agent 责任任务或停在用户/外部输入边界。 | 视路由而定 |
61
+ | `node .workflow/tools/bootstrap/bootstrap.mjs project-index` | 从代码仓库 `docs/CODEBASE_INDEX.md` 生成工作流仓库内的 `codebase-index.yaml` 派生投影,并记录源文件 checksum。 | 是;输出路径必须在代码仓库之外 |
61
62
  | `doctor` | 校验受管文件 checksum、Skill、Hook、CLI、Workflow Manager、必需目录和持久项目配置;排除本地 runtime。 | 否 |
62
63
  | `codegraph setup` | 对权威代码仓关闭 CodeGraph telemetry、按当前 `CODEGRAPH_DIR` 登记本地 ignore 并显式初始化索引;不安装 CLI 或全局 MCP。 | 是;`--dry-run` 时否 |
63
64
  | `codegraph sync` | 增量同步已有 CodeGraph 索引并重新验证索引目标。 | 是;`--dry-run` 时否 |
@@ -79,7 +79,7 @@
79
79
  | `lib/mock-system.mjs` | Microcks 项目适配器;固定镜像版本与 digest,管理并在健康失败时清理 loopback 易失容器,隔离 `external-dependencies.yaml` 与 `product-backends.yaml`,校验 OpenAPI/AsyncAPI operation、channel、具名 scenario 与 dispatcher 输入,并通过 multipart 本地 API 同步合同。 |
80
80
  | `lib/mock-scenario-pack.mjs` | Mock Scenario Pack 冻结器;绑定 Prototype revision、全部 Review Scene 唯一映射、受管 UI 实际导出物及其协议/场景 inventory、合同和脱敏证据 checksum,执行人工 candidate checksum 确认并拒绝覆盖不可变 Pack。 |
81
81
  | `lib/project-repair.mjs` | 归档完整性前向修复器;校验人工 actor、原因和证据,追加 checksum 链式失效事务并保留原归档字节。 |
82
- | `lib/project-bootstrap.mjs` | 只读扫描仓库并分类五种项目状态;识别代码、技术、Git、正式工作流和 runtime;为新接入项目生成草稿基线、文件清单、上下文索引、接入评估和引导计划;中断项目直接路由 checkpoint。 |
82
+ | `lib/project-bootstrap.mjs` | 只读扫描仓库并分类五种项目状态;识别代码、技术、Git、正式工作流和 runtime;为新接入项目生成草稿基线、文件清单、上下文索引、接入评估和引导计划;从代码仓库 `docs/CODEBASE_INDEX.md` 生成带 checksum 的工作流仓库机器投影;中断项目直接路由 checkpoint。 |
83
83
  | `lib/yaml-runtime.mjs` | 为发行包和安装后的项目内 Bootstrap 运行时解析 YAML;优先使用包依赖,项目内回退到状态 CLI 的 vendored YAML。 |
84
84
  | `lib/delivery-state.mjs` | 正式状态公共命令实现;管理物料、节点、Gate、候选、发布和可信历史锚点,提供 revision、锁、原子写、checksum、例行/增量/全历史校验。 |
85
85
  | `lib/evolution.mjs` | 项目级自进化公共命令实现;管理反馈、提案、风险、扩展版本、批准、trial、Hook 调度、回退和 promotion bundle。 |
@@ -189,7 +189,7 @@
189
189
  | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/hooks/hook-event.mjs` | 完整项目模板中的 Hook 记录器副本;与 checkpoint skill 的脚本保持一致,供整体模板审阅。 |
190
190
  | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/state/state.mjs` | 安装后正式状态 CLI wrapper;使用 vendored YAML 调用统一状态模块。 |
191
191
  | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/evolution/evolve.mjs` | 安装后 Evolution CLI wrapper;复用状态运行时 vendored YAML 并调用统一 Evolution 模块。 |
192
- | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/bootstrap/bootstrap.mjs` | 安装后自主入口 wrapper;提供不依赖全局命令的只读识别和引导上下文生成。 |
192
+ | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/bootstrap/bootstrap.mjs` | 安装后自主入口 wrapper;提供不依赖全局命令的只读识别、引导上下文生成和 `project-index` 机器投影命令。 |
193
193
  | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/evolution/index.yaml` | 初始自进化索引,schema 1;不伪造反馈、提案或扩展。 |
194
194
  | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/manager/manager.mjs` | 安装后 Workflow Manager wrapper;从受管 runtime 调用同一应用服务。 |
195
195
  | `skills/ai-delivery-orchestrate/assets/project-template/.workflow/tools/manager/start.cmd` | Windows CMD Manager 启动入口。 |
@@ -262,6 +262,7 @@ npx ai-delivery-workflow@latest upgrade .
262
262
  | `ai-delivery inspect [project]` | 否 | 输出机器可读的项目、代码、流程和运行时状态。 |
263
263
  | `ai-delivery bootstrap [project]` | 视状态而定 | 初始化空项目或存量项目上下文,或把中断项目路由到恢复。 |
264
264
  | `ai-delivery bootstrap [project] --dry-run` | 否 | 预览引导动作。 |
265
+ | `node .workflow/tools/bootstrap/bootstrap.mjs project-index [project] [--output <path>]` | 是(写入工作流仓库) | 读取代码仓库唯一事实源 `docs/CODEBASE_INDEX.md`,生成带 `source_checksum` 的 `.workflow/delivery/bootstrap/codebase-index.yaml` 机器投影;投影不得写回代码仓库。 |
265
266
  | `ai-delivery doctor [project]` | 否 | 校验发行包表面、安装清单、关键 skills、Hook、运行时和持久项目文件;排除 `.workflow/delivery/runtime`,状态 inspect 使用 16 MiB 有界缓冲并验证 JSON 协议,Git attributes 使用有界批次检查。 |
266
267
  | `ai-delivery codegraph setup [project]` | 是 | 显式关闭 telemetry,并为配置中的代码仓初始化本地 CodeGraph 索引。 |
267
268
  | `ai-delivery codegraph setup [project] --dry-run` | 否 | 只读验证 `CODEGRAPH_DIR`、索引文件与 Git 边界,只调用 `codegraph --version`,并输出 telemetry、local exclude 和初始化计划。 |
@@ -308,6 +309,14 @@ Page 决定和修改要求绑定精确 Revision、Page/Scene 及 checksum。修
308
309
  node .workflow/tools/bootstrap/bootstrap.mjs inspect
309
310
  ```
310
311
 
312
+ 代码仓库说明索引由维护者编辑 `docs/CODEBASE_INDEX.md`。需要给 Agent 或工具快速读取时,在工作流仓库根目录执行:
313
+
314
+ ```powershell
315
+ node .workflow/tools/bootstrap/bootstrap.mjs project-index <project>
316
+ ```
317
+
318
+ 该命令只生成派生 YAML,消费者必须校验 `source_checksum`;不要直接编辑投影或把投影复制回代码仓库。
319
+
311
320
  引导器只返回以下五种状态之一:
312
321
 
313
322
  | 状态 | 含义 | 推荐动作 |
@@ -339,6 +339,89 @@ function documentationLinks(text) {
339
339
  return [...text.matchAll(/\[[^\]]*\]\(([^)]+)\)/g)].map((match) => match[1].trim());
340
340
  }
341
341
 
342
+ const INDEX_FIELD_ALIASES = new Map([
343
+ ["路径", "path"], ["文件", "path"], ["职责", "purpose"], ["用途", "purpose"],
344
+ ["主要入口", "entrypoints"], ["入口", "entrypoints"], ["关联测试", "tests"], ["测试/验证", "tests"],
345
+ ["关键依赖或被依赖模块", "dependencies"], ["允许依赖", "dependencies"], ["依赖", "dependencies"],
346
+ ["风险", "risk"], ["生成或外部维护", "generated"], ["生成", "generated"],
347
+ ["维护责任", "owner"], ["维护状态", "status"], ["状态", "status"],
348
+ ["适用代码提交", "source_commit"], ["source_commit", "source_commit"],
349
+ ["最后核对", "last_reviewed"], ["last_reviewed", "last_reviewed"],
350
+ ["正式依据", "references"], ["references", "references"],
351
+ ]);
352
+
353
+ function markdownCells(line) {
354
+ return line.split("|").slice(1, -1).map((cell) => cell.trim().replaceAll("`", ""));
355
+ }
356
+
357
+ function projectIndexRows(text) {
358
+ const rows = [];
359
+ let section = null;
360
+ let header = null;
361
+ for (const [lineIndex, line] of text.split(/\r?\n/).entries()) {
362
+ const heading = line.match(/^#{2,6}\s+(.+?)\s*#*$/);
363
+ if (heading) {
364
+ section = heading[1].trim();
365
+ header = null;
366
+ continue;
367
+ }
368
+ if (!line.trim().startsWith("|")) {
369
+ if (line.trim()) header = null;
370
+ continue;
371
+ }
372
+ const cells = markdownCells(line);
373
+ if (!cells.length || cells.every((cell) => /^:?-{3,}:?$/.test(cell))) continue;
374
+ if (cells.some((cell) => INDEX_FIELD_ALIASES.has(cell))) {
375
+ header = cells;
376
+ continue;
377
+ }
378
+ if (!header) continue;
379
+ const row = { section, source_line: lineIndex + 1 };
380
+ header.forEach((name, index) => {
381
+ const key = INDEX_FIELD_ALIASES.get(name);
382
+ if (key && cells[index] !== undefined && cells[index] !== "") row[key] = cells[index];
383
+ });
384
+ if (row.path && !/^<.*>$/.test(row.path) && row.path !== "-") rows.push(row);
385
+ }
386
+ return rows;
387
+ }
388
+
389
+ export function projectCodebaseIndex(codeRoot, outputFile = null) {
390
+ const root = path.resolve(codeRoot);
391
+ const indexFile = path.join(root, "docs", "CODEBASE_INDEX.md");
392
+ if (!fs.existsSync(indexFile)) throw new Error("docs/CODEBASE_INDEX.md does not exist");
393
+ const documentation = inspectCodebaseDocumentation(root, inspectGitRepository(root));
394
+ if (documentation.invalid.length) {
395
+ throw new Error(`CODEBASE_INDEX.md is invalid:\n${documentation.invalid.map((item) => `${item.path}: ${item.reason}`).join("\n")}`);
396
+ }
397
+ const bytes = fs.readFileSync(indexFile);
398
+ const text = bytes.toString("utf8");
399
+ const metadata = documentation.files.find((file) => file.path === "docs/CODEBASE_INDEX.md") || documentationMetadata(text);
400
+ const rows = projectIndexRows(text);
401
+ if (!rows.length) throw new Error("CODEBASE_INDEX.md contains no concrete index rows");
402
+ // The code repository is a nested child of the workflow workspace. Keep the
403
+ // derived projection beside it, never inside the code repository itself.
404
+ const defaultWorkspaceRoot = path.dirname(root);
405
+ const destination = path.resolve(outputFile || path.join(defaultWorkspaceRoot, ".workflow", "delivery", "bootstrap", "codebase-index.yaml"));
406
+ const relative = path.relative(root, destination);
407
+ if (!relative.startsWith("..") && !path.isAbsolute(relative)) {
408
+ throw new Error("machine projection must be written outside the code repository");
409
+ }
410
+ const projection = {
411
+ schema_version: 1,
412
+ projection_type: "codebase-index",
413
+ source_of_truth: "docs/CODEBASE_INDEX.md",
414
+ source_checksum: sha256File(indexFile),
415
+ source_commit: metadata.source_commit || null,
416
+ last_reviewed: metadata.last_reviewed || null,
417
+ status: documentation.status,
418
+ generated_at: new Date().toISOString(),
419
+ entries: rows,
420
+ };
421
+ atomicWrite(destination, stringifyYaml(projection, { lineWidth: 0 }));
422
+ return { output: toPosix(destination), source: "docs/CODEBASE_INDEX.md", source_checksum: projection.source_checksum, status: projection.status, entry_count: rows.length };
423
+ }
424
+
342
425
  export function inspectCodebaseDocumentation(root, git = inspectGitRepository(root)) {
343
426
  const files = [];
344
427
  const errors = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-delivery-workflow",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Project-scoped Codex skills and hooks for artifact-driven AI software delivery",
5
5
  "type": "module",
6
6
  "repository": {
@@ -5,6 +5,10 @@ description: Calculate a selected release target's continuous cumulative version
5
5
 
6
6
  # Assemble Release
7
7
 
8
+ Apply the shared confirmation protocol from `../ai-delivery-orchestrate/references/communication-confirmation-contract.md`; release-selection and material exceptions must be recorded in the release confirmation summary before they can affect the candidate.
9
+
10
+ When release material aggregation exposes a missing decision or exception, record it in the release confirmation summary and keep the candidate blocked until the owning artifact is updated.
11
+
8
12
  Produce a deterministic release selection and auditable material package. Do not approve or deploy it.
9
13
 
10
14
  ## Select The Version Closure
@@ -5,6 +5,8 @@ description: Inspect a project before normal AI delivery execution, classify emp
5
5
 
6
6
  # Bootstrap AI Delivery
7
7
 
8
+ When Bootstrap needs a business or maintainer decision, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` to create the first frontier question. Keep repository observations evidence-backed and route business intent to `01-product-shaping`.
9
+
8
10
  Establish enough verified project context to resume or begin work without relying on chat history.
9
11
 
10
12
  ## Dual-Repository Workspace
@@ -54,7 +56,7 @@ Do not replace existing product, architecture, test, or release baselines. Keep
54
56
 
55
57
  ### Codebase Handbook Discovery
56
58
 
57
- For the configured nested code repository, inspect `AGENTS.md`, `CODEBASE_GUIDE.md`, and `docs/CODEBASE_INDEX.md` as read-only maintainer documents. The report records `observed`, `approved`, or `stale`; missing files are a warning, while malformed, path-invalid, symlink, or sensitive-content findings fail closed. Compare each declared `source_commit` with the code repository HEAD. Never infer an approved rule from the generated inventory, and never overwrite these files during bootstrap or upgrade.
59
+ For the configured nested code repository, inspect `AGENTS.md`, `CODEBASE_GUIDE.md`, and `docs/CODEBASE_INDEX.md` as read-only maintainer documents. The report records `observed`, `approved`, or `stale`; missing files are a warning, while malformed, path-invalid, symlink, or sensitive-content findings fail closed. Compare each declared `source_commit` with the code repository HEAD. When a structured consumer needs navigation, run the explicit `project-index` command to generate `.workflow/delivery/bootstrap/codebase-index.yaml` from the Markdown index and verify its source checksum before use. Never infer an approved rule from the generated inventory or projection, and never overwrite the code-repository documents during bootstrap or upgrade.
58
60
 
59
61
  ## Resume Boundary
60
62
 
@@ -5,6 +5,8 @@ description: Persist, checkpoint, finish, recover, and archive version-scoped AI
5
5
 
6
6
  # Checkpoint Delivery Task
7
7
 
8
+ When a task is waiting on a user or external confirmation, persist the summary path, question ID, frontier round, and checksum from the shared communication protocol. Recovery remains zero-mutation until ownership transfers to `agent`.
9
+
8
10
  Treat explicit task snapshots as authoritative. Treat Hook events as an audit trail and heartbeat, never as proof that a stage completed.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Close an independently verified planned version without publishing
5
5
 
6
6
  # Close Planned Version
7
7
 
8
+ When closeout finds an unresolved decision or exception, validate the current `confirmation-summary.yaml` through `../ai-delivery-orchestrate/scripts/confirmation-state.mjs`; link confirmed decisions to closeout evidence and keep release intent separate.
9
+
8
10
  Finish one planned version and stop before release. Never start a release from this skill.
9
11
 
10
12
  ## Preflight
@@ -5,6 +5,8 @@ description: Discover and define a product through a guided interview, then prod
5
5
 
6
6
  # Define Product
7
7
 
8
+ Use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` for every business decision, domain term, constraint, risk, and open question. Recompute the frontier after each answer and write confirmed knowledge into the product manual or baseline before Gate A/B.
9
+
8
10
  Turn an initial idea into two human-approved baselines without inventing unresolved business decisions.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Execute R08 production deployment of one human-approved immutable r
5
5
 
6
6
  # Deploy Production
7
7
 
8
+ Production deployment questions use the shared confirmation protocol and the exact release summary. Require explicit `PRODUCTION-APPROVAL`; never infer deployment authorization from a passing candidate.
9
+
8
10
  Execute the approved plan exactly. Do not rebuild, patch, add unlisted items, change configuration ad hoc, or decide that the release succeeded.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Design and reconcile a coherent application, technical, data, secur
5
5
 
6
6
  # Design Architecture
7
7
 
8
+ Use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` for architecture decisions, quality-budget exceptions, product-impact findings, and risk acceptance. Link confirmed records to the architecture baseline or Gate before handoff.
9
+
8
10
  Use one skill with `initial` and `reconcile` modes so coupled architecture views remain consistent.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Select prototype and UI tools, define a confirmed visual system, pr
5
5
 
6
6
  # Design Experience
7
7
 
8
+ Use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` for prototype, terminal, interaction, visual-system, and product-impact decisions. A Page review or chat answer is not authoritative until its receipt and owning artifact are linked.
9
+
8
10
  Design complete user experiences for the terminals selected by product and implemented by architecture.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Validate confirmed prototype testability and define the overall rel
5
5
 
6
6
  # Design Tests
7
7
 
8
+ When test policy, quality budget, exception, or residual-risk choices need confirmation, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` and link the answer to the test contract. Proposed or deferred records never count as test approval.
9
+
8
10
  Create a durable release strategy once and detailed test inputs just in time for the next slice.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Orchestrate implementation of one planned vertical slice from an ex
5
5
 
6
6
  # Develop Iteration
7
7
 
8
+ When implementation exposes ambiguity, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` and append one record to the owning node summary. A user or external wait is zero-mutation; chat cannot expand the package scope.
9
+
8
10
  Derive technical tasks just in time. Do not predefine frontend, backend, database, or other roles unless the selected slice and architecture require them.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Record explicit workflow feedback and objective delivery signals, e
5
5
 
6
6
  # Evolve The Project Workflow
7
7
 
8
+ Workflow improvement proposals use the shared confirmation summary for explicit maintainer acceptance; an observation or AI recommendation never activates an extension by itself.
9
+
8
10
  Use the project Evolution CLI for every feedback, proposal, extension, trial, and decision state change. Never edit `.workflow/evolution/index.yaml` or registered extension state directly.
9
11
 
10
12
  ## Capture Feedback
@@ -5,6 +5,8 @@ description: Execute one architecture-constrained technical work package against
5
5
 
6
6
  # Execute Technical Work Package
7
7
 
8
+ When execution needs a behavior, scope, or risk decision, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md`, append the question to the owning summary, and wait without modifying source or formal state while ownership is `user` or `external`.
9
+
8
10
  Implement only the assigned package. Do not broaden scope, choose a different stack, approve your own change, or repair unrelated defects.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Capture, classify, approve, version, resolve, and apply durable pro
5
5
 
6
6
  # Manage Standards
7
7
 
8
+ Record proposed standards, exceptions, and maintainer decisions through the shared confirmation protocol; link confirmed `standard_decision` records to the standards baseline or approval receipt.
9
+
8
10
  Persist durable rules in the repository instead of relying on chat history. Do not silently turn a preference, suggestion, or one-time instruction into a standard.
9
11
 
10
12
  ## Artifact Location
@@ -121,3 +121,5 @@ Read [workflow-model.md](references/workflow-model.md) for the state graph, gate
121
121
  Read [formal-state-contract.md](references/formal-state-contract.md) before mutating formal state.
122
122
  Read [codebase-document-contract.md](references/codebase-document-contract.md) when creating, reviewing, or locating the code repository's `AGENTS.md`, `CODEBASE_GUIDE.md`, or `docs/CODEBASE_INDEX.md`.
123
123
  Read [communication-confirmation-contract.md](references/communication-confirmation-contract.md) when a node asks for, records, resumes, or audits a user/external decision. Validate summaries with `scripts/confirmation-state.mjs`; this index never replaces the owning product, architecture, standards, task, Gate, or formal-state artifact.
124
+
125
+ All development nodes (`00-bootstrap` through `06-version-closeout`) and release nodes (`R00` through `R10`) inherit this protocol. Each node must load its version-scoped `confirmation-summary.yaml` at preflight, keep one frontier round active, persist user/external waits as zero-mutation states, and write confirmed knowledge into the node's owning artifact before handoff.
@@ -1,13 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import path from "node:path";
4
- import { bootstrapProject, inspectProjectState } from "./project-bootstrap.mjs";
4
+ import { bootstrapProject, inspectProjectState, projectCodebaseIndex } from "./project-bootstrap.mjs";
5
5
 
6
6
  function usage() {
7
7
  return [
8
8
  "Usage:",
9
9
  " node .workflow/tools/bootstrap/bootstrap.mjs inspect [project]",
10
10
  " node .workflow/tools/bootstrap/bootstrap.mjs bootstrap [project] [--dry-run]",
11
+ " node .workflow/tools/bootstrap/bootstrap.mjs project-index [project] [--output path]",
11
12
  ].join("\n");
12
13
  }
13
14
 
@@ -17,12 +18,16 @@ try {
17
18
  if (command === "--help" || command === "help") {
18
19
  process.stdout.write(`${usage()}\n`);
19
20
  } else {
20
- const projectArg = args.find((value, index) => index > 0 && !value.startsWith("--"));
21
+ const projectArg = args.find((value, index) => index > 0 && !value.startsWith("--") && args[index - 1] !== "--output");
21
22
  const target = path.resolve(projectArg || process.cwd());
23
+ const outputIndex = args.indexOf("--output");
24
+ const output = outputIndex >= 0 ? args[outputIndex + 1] : null;
22
25
  const result = command === "inspect"
23
26
  ? inspectProjectState(target)
24
27
  : command === "bootstrap"
25
28
  ? bootstrapProject(null, target, { dryRun: args.includes("--dry-run") })
29
+ : command === "project-index"
30
+ ? projectCodebaseIndex(path.resolve(target, inspectProjectState(target).workspace?.code_repository?.path || "code"), output ? path.resolve(target, output) : null)
26
31
  : null;
27
32
  if (!result) throw new Error(`Unknown command: ${command}\n\n${usage()}`);
28
33
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
@@ -16,7 +16,7 @@ code/
16
16
  - `AGENTS.md` is a short agent entrypoint. It contains only high-priority rules and conditional pointers into the handbook and index.
17
17
  - `docs/CODEBASE_INDEX.md` is the human-readable navigation map for directories, modules, entrypoints, tests, dependencies, risks, and maintenance ownership.
18
18
 
19
- The first release uses Markdown as the source of truth. A YAML or database projection is out of scope until a real consumer and synchronization contract exist.
19
+ `docs/CODEBASE_INDEX.md` remains the single source of truth. When a CLI, CodeGraph adapter, or validator needs structured input, generate the read-only machine projection with `node .workflow/tools/bootstrap/bootstrap.mjs project-index <project>`. The projection is written to the workflow repository at `.workflow/delivery/bootstrap/codebase-index.yaml`, includes the source checksum and status, and is never edited directly or copied back into Markdown.
20
20
 
21
21
  ## Authority
22
22
 
@@ -77,6 +77,7 @@ Directory-level rows are the default. Use file-level rows for entrypoints, cross
77
77
  - A missing, stale, conflicting, or path-invalid entry must be reported before code modification relies on it.
78
78
  - Never put credentials, private keys, production data, or large source excerpts in these files.
79
79
  - `init` and `upgrade` must preserve existing code-repository documentation. Any creation or revision must be explicit, reviewable, and attributable to the owning workflow task.
80
+ - A projection with a checksum mismatch, invalid source index, or stale source commit is unusable until the Markdown source is reviewed and regenerated.
80
81
 
81
82
  ## Writing quality
82
83
 
@@ -89,3 +90,4 @@ Prefer short paragraphs, tables, links, and concrete examples. Put the answer be
89
90
  - Commands are verified from repository configuration or a recorded validation run.
90
91
  - All paths resolve inside the code repository and all status/commit metadata is current.
91
92
  - Conflicts with workflow architecture or standards are explicitly linked and not silently resolved in prose.
93
+ - Any machine consumer reads the generated projection only after verifying `source_checksum` against the current Markdown source.
@@ -37,6 +37,23 @@ Each record has a stable `confirmation_id`, a `question_id`, a `frontier_round`,
37
37
 
38
38
  The default interaction policy is one user decision per round. Multiple questions may be presented together only when they are independent, low-risk, and the summary explicitly records the grouping rationale.
39
39
 
40
+ ## All-node integration
41
+
42
+ Every formal development and release node uses this same protocol when a user or external decision is needed. The node-specific authority remains the owner shown below:
43
+
44
+ | Node | Questions and knowledge to capture | Authority / return path |
45
+ | --- | --- | --- |
46
+ | `00-bootstrap` | observed repository facts, missing context, first product frontier | Bootstrap report; business choices return to `01-product-shaping` |
47
+ | `01-product-shaping` | users, goals, scope, terminals, domain terms, business rules, priority, risk acceptance | discovery/product baseline and `GATE-A`/`GATE-B` |
48
+ | `02-solution-design` | architecture tradeoffs, UX choices, new terminals, non-functional impact, product-impact assessment | architecture/experience baseline, UX Gates, or product return |
49
+ | `03-delivery-readiness` | Slice boundaries, dependencies, environments, test policy, budget exceptions | scope manifest, test/platform contracts, or scope amend |
50
+ | `04-implementation` | behavior ambiguity, implementation constraints, risk acceptance, allowed-file changes | task evidence, approved change set, or owning-node return |
51
+ | `05-candidate-assurance` | exceptions, residual risk, test gaps, candidate acceptance | review/verification evidence or producer return |
52
+ | `06-version-closeout` | unresolved decisions, release readiness, archive exceptions | version manifest/closeout; release intent remains separate |
53
+ | `R00`-`R10` release | release intent, target selection, eligibility exceptions, production approval, deployment/rollback decisions | release artifacts, `PRODUCTION-APPROVAL`, production evidence |
54
+
55
+ At node entry, read the current summary before asking a question. After each answer, append or supersede the record, recompute the frontier, and link the decision to its authority artifact before advancing. A node may continue without a question only when its evidence proves the decision is agent-verifiable or an approved baseline is unchanged.
56
+
40
57
  ## Shared understanding
41
58
 
42
59
  Set `shared_understanding: true` only after the current frontier is empty and the user has confirmed the summary. `deferred` and `open_question` records may remain, but each must identify an owner and an idempotent `next_action`. A node must not perform an action that depends on an unresolved decision.
@@ -5,6 +5,8 @@ description: Orchestrate a production release independently from iteration deliv
5
5
 
6
6
  # Orchestrate Independent Release
7
7
 
8
+ Release nodes use the shared confirmation protocol for explicit release intent, target selection, eligibility exceptions, production approval, deployment, rollback, and archive decisions. User/external waits are zero-mutation and never replay production actions.
9
+
8
10
  Coordinate `R00` through `R10`. Never infer release intent from completed versions or start production work from normal iteration orchestration.
9
11
 
10
12
  ## Start From Explicit Intent
@@ -5,6 +5,8 @@ description: Plan an agile AI delivery iteration by prioritizing business outcom
5
5
 
6
6
  # Plan Iteration
7
7
 
8
+ When scope, priority, dependency, budget, or acceptance choices need confirmation, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` and the version-scoped `confirmation-summary.yaml`. Recompute the frontier after each answer and keep unresolved business choices out of `scope freeze`.
9
+
8
10
  Plan business capability increments. Do not pre-split work into fixed frontend, backend, database, or human-role silos.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Prepare the delivery and operations platform required to build, tes
5
5
 
6
6
  # Prepare Delivery Platform
7
7
 
8
+ When a platform, environment, dependency, cost, or risk choice needs a user or external decision, read `../ai-delivery-orchestrate/references/communication-confirmation-contract.md`, update the current `confirmation-summary.yaml`, and wait without mutation while ownership is `user` or `external`.
9
+
8
10
  Run as a parallel stream after initial architecture and join application development before independent candidate verification.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Prepare an independently verified multi-version or same-version rel
5
5
 
6
6
  # Prepare Release
7
7
 
8
+ Use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md` for release intent, target selection, exception, rollback, and external-side-effect questions. Version completion never substitutes for explicit release intent.
9
+
8
10
  Create an auditable release package. Do not deploy production.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Independently review a technical work-package change against approv
5
5
 
6
6
  # Review Change
7
7
 
8
+ When review feedback requires an exception, risk acceptance, or scope decision, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md`; link the confirmed result to the approved `change_set_id` or return it to the owning producer.
9
+
8
10
  Review independently from the implementation context. Do not edit product code or approve a change with unresolved blocking findings.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Validate AI delivery artifacts, registries, baselines, CSV relation
5
5
 
6
6
  # Validate Delivery Artifacts
7
7
 
8
+ When validation finds an unresolved decision, read the version-scoped `confirmation-summary.yaml` and validate it with `../ai-delivery-orchestrate/scripts/confirmation-state.mjs`. Report the owning producer and keep the handoff blocked; validators do not decide business or risk acceptance.
9
+
8
10
  Validate contracts without repairing producer-owned content.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,8 @@ description: Independently verify an immutable iteration or release candidate ag
5
5
 
6
6
  # Verify Candidate
7
7
 
8
+ When candidate assurance needs exception, residual-risk, or release-recommendation input, use `../ai-delivery-orchestrate/references/communication-confirmation-contract.md`. Do not turn missing evidence into a confirmation; unresolved records keep the candidate `blocked`.
9
+
8
10
  Validate the assembled system independently. Never modify product code, migrations, infrastructure, or configuration while acting as verifier.
9
11
 
10
12
  ## Artifact Location
@@ -5,6 +5,10 @@ description: Independently verify an R08 production deployment, decide release s
5
5
 
6
6
  # Verify Production
7
7
 
8
+ Apply the shared confirmation protocol from `../ai-delivery-orchestrate/references/communication-confirmation-contract.md`; production exceptions and residual-risk acceptance must be recorded in the confirmation summary before closeout.
9
+
10
+ Record production verification exceptions, rollback acceptance, and residual-risk decisions in the release confirmation summary; link them to the immutable deployment evidence before closeout.
11
+
8
12
  Keep deployment execution separate from release success.
9
13
 
10
14
  ## Artifact Location