ai-delivery-workflow 0.4.0 → 0.5.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 (207) hide show
  1. package/README.md +2 -2
  2. package/bin/release-check.mjs +8 -2
  3. package/docs/DUAL-REPOSITORY-WORKSPACE.zh-CN.md +13 -0
  4. package/docs/FILE-REFERENCE.zh-CN.md +11 -8
  5. package/docs/NPM-RELEASE-MANAGEMENT.zh-CN.md +2 -1
  6. package/docs/PROJECT-MANUAL.zh-CN.md +27 -5
  7. package/docs/STATE-CLI-USER-GUIDE.zh-CN.md +1 -1
  8. package/docs/adr/0006-product-line-candidate-inventory.md +20 -0
  9. package/docs/agents/domain.md +31 -6
  10. package/docs/agents/issue-tracker.md +17 -18
  11. package/docs/agents/triage-labels.md +7 -7
  12. package/docs/agents/workflow-manager-current-state.md +2 -2
  13. package/lib/npm-auth.mjs +16 -0
  14. package/package.json +1 -1
  15. package/skills/ai-delivery-assemble-release/SKILL.md +10 -8
  16. package/skills/ai-delivery-assemble-release/agents/openai.yaml +3 -3
  17. package/skills/ai-delivery-assemble-release/assets/release-candidate-manifest.yaml +16 -4
  18. package/skills/ai-delivery-assemble-release/assets/release-git-plan.yaml +96 -6
  19. package/skills/ai-delivery-assemble-release/assets/version-inclusion.csv +2 -2
  20. package/skills/ai-delivery-assemble-release/references/release-assembly-contract.md +16 -2
  21. package/skills/ai-delivery-assemble-release/scripts/plan-release.mjs +127 -3
  22. package/skills/ai-delivery-bootstrap/agents/openai.yaml +3 -3
  23. package/skills/ai-delivery-checkpoint-task/agents/openai.yaml +3 -3
  24. package/skills/ai-delivery-close-version/agents/openai.yaml +3 -3
  25. package/skills/ai-delivery-define-product/agents/openai.yaml +4 -4
  26. package/skills/ai-delivery-deploy-production/agents/openai.yaml +3 -3
  27. package/skills/ai-delivery-design-experience/agents/openai.yaml +4 -4
  28. package/skills/ai-delivery-develop-iteration/agents/openai.yaml +3 -3
  29. package/skills/ai-delivery-evolve-workflow/agents/openai.yaml +3 -3
  30. package/skills/ai-delivery-execute-test/agents/openai.yaml +4 -4
  31. package/skills/ai-delivery-execute-work-package/agents/openai.yaml +4 -4
  32. package/skills/ai-delivery-manage-git/SKILL.md +9 -7
  33. package/skills/ai-delivery-manage-git/agents/openai.yaml +3 -3
  34. package/skills/ai-delivery-manage-git/references/git-policy.md +7 -3
  35. package/skills/ai-delivery-manage-git/scripts/release-git.mjs +995 -0
  36. package/skills/ai-delivery-manage-standards/agents/openai.yaml +4 -4
  37. package/skills/ai-delivery-orchestrate/agents/openai.yaml +3 -3
  38. package/skills/ai-delivery-orchestrate/assets/project-template/AGENTS.md +5 -3
  39. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/CONTRIBUTING.md +25 -25
  40. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airbnb/DESIGN.md +545 -545
  41. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airbnb/README.md +5 -5
  42. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airtable/DESIGN.md +554 -554
  43. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/airtable/README.md +5 -5
  44. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/apple/DESIGN.md +562 -562
  45. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/apple/README.md +5 -5
  46. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/binance/DESIGN.md +634 -634
  47. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/binance/README.md +5 -5
  48. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw/DESIGN.md +544 -544
  49. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw/README.md +5 -5
  50. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw-m/DESIGN.md +503 -503
  51. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bmw-m/README.md +5 -5
  52. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bugatti/DESIGN.md +454 -454
  53. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/bugatti/README.md +5 -5
  54. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cal/DESIGN.md +542 -542
  55. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cal/README.md +5 -5
  56. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/claude/DESIGN.md +589 -589
  57. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/claude/README.md +5 -5
  58. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clay/DESIGN.md +541 -541
  59. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clay/README.md +5 -5
  60. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clickhouse/DESIGN.md +544 -544
  61. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/clickhouse/README.md +5 -5
  62. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cohere/DESIGN.md +451 -451
  63. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cohere/README.md +5 -5
  64. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/coinbase/DESIGN.md +570 -570
  65. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/coinbase/README.md +5 -5
  66. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/composio/DESIGN.md +506 -506
  67. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/composio/README.md +5 -5
  68. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cursor/DESIGN.md +537 -537
  69. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/cursor/README.md +5 -5
  70. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/dell-1996/DESIGN.md +632 -632
  71. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/dell-1996/README.md +5 -5
  72. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/elevenlabs/DESIGN.md +504 -504
  73. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/elevenlabs/README.md +5 -5
  74. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/expo/DESIGN.md +526 -526
  75. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/expo/README.md +5 -5
  76. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ferrari/DESIGN.md +531 -531
  77. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ferrari/README.md +5 -5
  78. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/figma/DESIGN.md +578 -578
  79. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/figma/README.md +5 -5
  80. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/framer/DESIGN.md +544 -544
  81. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/framer/README.md +5 -5
  82. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hashicorp/DESIGN.md +575 -575
  83. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hashicorp/README.md +5 -5
  84. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hp/DESIGN.md +670 -670
  85. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/hp/README.md +5 -5
  86. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ibm/DESIGN.md +550 -550
  87. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ibm/README.md +5 -5
  88. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/intercom/DESIGN.md +546 -546
  89. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/intercom/README.md +5 -5
  90. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/kraken/DESIGN.md +125 -125
  91. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/kraken/README.md +5 -5
  92. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lamborghini/DESIGN.md +288 -288
  93. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lamborghini/README.md +5 -5
  94. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/linear.app/DESIGN.md +548 -548
  95. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/linear.app/README.md +5 -5
  96. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lovable/DESIGN.md +298 -298
  97. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/lovable/README.md +5 -5
  98. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mastercard/DESIGN.md +365 -365
  99. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mastercard/README.md +5 -5
  100. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/meta/DESIGN.md +683 -683
  101. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/meta/README.md +5 -5
  102. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/minimax/DESIGN.md +746 -746
  103. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/minimax/README.md +5 -5
  104. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mintlify/DESIGN.md +852 -852
  105. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mintlify/README.md +5 -5
  106. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/miro/DESIGN.md +825 -825
  107. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/miro/README.md +5 -5
  108. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mistral.ai/DESIGN.md +773 -773
  109. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mistral.ai/README.md +5 -5
  110. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mongodb/DESIGN.md +767 -767
  111. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/mongodb/README.md +5 -5
  112. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nike/DESIGN.md +575 -575
  113. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nike/README.md +5 -5
  114. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nintendo-2001/DESIGN.md +649 -649
  115. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nintendo-2001/README.md +5 -5
  116. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/notion/DESIGN.md +821 -821
  117. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/notion/README.md +5 -5
  118. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nvidia/DESIGN.md +640 -640
  119. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/nvidia/README.md +5 -5
  120. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ollama/DESIGN.md +539 -539
  121. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/ollama/README.md +5 -5
  122. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/opencode.ai/DESIGN.md +521 -521
  123. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/opencode.ai/README.md +5 -5
  124. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/pinterest/DESIGN.md +597 -597
  125. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/pinterest/README.md +5 -5
  126. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/playstation/DESIGN.md +661 -661
  127. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/playstation/README.md +5 -5
  128. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/posthog/DESIGN.md +690 -690
  129. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/posthog/README.md +5 -5
  130. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/raycast/DESIGN.md +669 -669
  131. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/raycast/README.md +5 -5
  132. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/renault/DESIGN.md +589 -589
  133. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/renault/README.md +5 -5
  134. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/replicate/DESIGN.md +616 -616
  135. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/replicate/README.md +5 -5
  136. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/resend/DESIGN.md +585 -585
  137. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/resend/README.md +5 -5
  138. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/revolut/DESIGN.md +636 -636
  139. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/revolut/README.md +5 -5
  140. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/runwayml/DESIGN.md +244 -244
  141. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/runwayml/README.md +5 -5
  142. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sanity/DESIGN.md +357 -357
  143. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sanity/README.md +5 -5
  144. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sentry/DESIGN.md +551 -551
  145. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/sentry/README.md +5 -5
  146. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/shopify/DESIGN.md +516 -516
  147. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/shopify/README.md +5 -5
  148. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/slack/DESIGN.md +482 -482
  149. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spacex/DESIGN.md +363 -363
  150. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spacex/README.md +5 -5
  151. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spotify/DESIGN.md +246 -246
  152. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/spotify/README.md +5 -5
  153. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/starbucks/DESIGN.md +580 -580
  154. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/starbucks/README.md +5 -5
  155. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/stripe/DESIGN.md +487 -487
  156. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/stripe/README.md +5 -5
  157. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/supabase/DESIGN.md +462 -462
  158. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/supabase/README.md +5 -5
  159. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/superhuman/DESIGN.md +448 -448
  160. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/superhuman/README.md +5 -5
  161. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/tesla/DESIGN.md +286 -286
  162. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/tesla/README.md +5 -5
  163. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/theverge/DESIGN.md +339 -339
  164. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/theverge/README.md +5 -5
  165. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/together.ai/DESIGN.md +633 -633
  166. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/together.ai/README.md +5 -5
  167. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/uber/DESIGN.md +636 -636
  168. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/uber/README.md +5 -5
  169. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vercel/DESIGN.md +736 -736
  170. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vercel/README.md +5 -5
  171. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vodafone/DESIGN.md +538 -538
  172. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/vodafone/README.md +5 -5
  173. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/voltagent/DESIGN.md +521 -521
  174. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/voltagent/README.md +5 -5
  175. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/warp/DESIGN.md +526 -526
  176. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/warp/README.md +5 -5
  177. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/webflow/DESIGN.md +588 -588
  178. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/webflow/README.md +5 -5
  179. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wired/DESIGN.md +497 -497
  180. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wired/README.md +5 -5
  181. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wise/DESIGN.md +544 -544
  182. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/wise/README.md +5 -5
  183. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/x.ai/DESIGN.md +465 -465
  184. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/x.ai/README.md +5 -5
  185. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/zapier/DESIGN.md +537 -537
  186. package/skills/ai-delivery-orchestrate/assets/project-template/ref/ui/design-md/zapier/README.md +5 -5
  187. package/skills/ai-delivery-orchestrate/references/workflow-model.md +1 -1
  188. package/skills/ai-delivery-orchestrate-release/SKILL.md +10 -10
  189. package/skills/ai-delivery-orchestrate-release/agents/openai.yaml +4 -4
  190. package/skills/ai-delivery-orchestrate-release/assets/release-request.yaml +4 -1
  191. package/skills/ai-delivery-orchestrate-release/assets/version-selection.yaml +13 -1
  192. package/skills/ai-delivery-orchestrate-release/references/release-workflow-contract.md +14 -0
  193. package/skills/ai-delivery-plan-iteration/agents/openai.yaml +4 -4
  194. package/skills/ai-delivery-prepare-platform/agents/openai.yaml +4 -4
  195. package/skills/ai-delivery-prepare-release/SKILL.md +6 -5
  196. package/skills/ai-delivery-prepare-release/agents/openai.yaml +4 -4
  197. package/skills/ai-delivery-prepare-release/assets/release-template/release-manifest.yaml +23 -2
  198. package/skills/ai-delivery-prepare-release/references/release-contract.md +5 -1
  199. package/skills/ai-delivery-review-change/agents/openai.yaml +4 -4
  200. package/skills/ai-delivery-triage-failure/agents/openai.yaml +4 -4
  201. package/skills/ai-delivery-validate-artifacts/agents/openai.yaml +4 -4
  202. package/skills/ai-delivery-verify-candidate/agents/openai.yaml +3 -3
  203. package/skills/ai-delivery-verify-production/SKILL.md +7 -4
  204. package/skills/ai-delivery-verify-production/agents/openai.yaml +3 -3
  205. package/skills/ai-delivery-verify-production/assets/production-verification-template/production-verification.json +9 -0
  206. package/skills/ai-delivery-verify-production/assets/production-verification-template/production-verification.md +20 -0
  207. package/skills/ai-delivery-verify-production/references/production-verification-contract.md +19 -3
@@ -1,9 +1,99 @@
1
- schema_version: 1
1
+ schema_version: 2
2
2
  release_id: "REL-0001"
3
- source_tag: "version-ready/VER-0005/r1"
4
- source_commit: "<git-sha>"
5
- release_branch: "release/REL-0001-short-slug"
3
+ product_id: "PRODUCT-001"
6
4
  production_branch: "main"
7
- line_branch: "line/PRODUCT-001"
8
- merge_intermediate_tags: false
5
+ release_branch: "release/REL-0001-short-slug"
6
+ release_base:
7
+ expected_main: "<git-sha>"
8
+ captured_at: "<RFC3339>"
9
+ request_artifact: ".workflow/releases/REL-0001/R00-release-request/release-request.yaml"
10
+ target_version:
11
+ version_id: "VER-0005"
12
+ source_tag: "version-ready/VER-0005/r1"
13
+ source_commit: "<git-sha>"
14
+ source_relation_to_release_base: "incremental: target-descends-from-release-base; same-version-redeploy: target-already-in-release-base"
15
+ candidate_operation:
16
+ command: "release-git.mjs create-candidate"
17
+ required_arguments:
18
+ - "--release-id REL-0001"
19
+ - "--release-branch release/REL-0001-short-slug"
20
+ - "--expected-main <git-sha>"
21
+ - "--source-tag version-ready/VER-0005/r1"
22
+ - "--source-commit <git-sha>"
23
+ - "--receipt <path>"
24
+ - "--apply"
25
+ merge_strategy: "no-ff-single-version-ready-tag"
26
+ merge_created: true # False when a same-version target is already in the release base.
27
+ merge_intermediate_tags: false
28
+ release_candidate_commit: null
29
+ receipt_fields:
30
+ - "operation: create-release-candidate"
31
+ - "release_base_commit"
32
+ - "source_ref"
33
+ - "source_commit"
34
+ - "candidate_commit"
35
+ - "status: planned | applied | idempotent"
36
+ receipt_ref: null
37
+ status: "pending-controlled-git-operation"
38
+ promotion_operation:
39
+ command: "release-git.mjs promote"
40
+ required_arguments:
41
+ - "--release-id REL-0001"
42
+ - "--release-branch release/REL-0001-short-slug"
43
+ - "--expected-main <git-sha>"
44
+ - "--verified-release-commit <git-sha>"
45
+ - "--production-verification .workflow/releases/REL-0001/R09-production-verification/production-verification.json"
46
+ - "--receipt <path>"
47
+ - "--apply"
48
+ verified_release_commit: null
49
+ receipt_fields:
50
+ - "operation: promote-release-candidate"
51
+ - "production_verification.path"
52
+ - "production_verification.sha256"
53
+ - "old_main_head"
54
+ - "new_main_head"
55
+ - "status: planned | applied | idempotent"
56
+ receipt_ref: null
57
+ status: "pending-production-verification"
58
+ release_fix_synchronization:
59
+ line_branch: "line/PRODUCT-001"
60
+ command: "release-git.mjs sync-release-fix"
61
+ required_arguments:
62
+ - "--release-id REL-0001"
63
+ - "--source-ref release-fix/REL-0001/DEFECT-001"
64
+ - "--source-commit <git-sha>"
65
+ - "--verified-release-commit <git-sha>"
66
+ - "--expected-line <git-sha>"
67
+ - "--production-verification .workflow/releases/REL-0001/R09-production-verification/production-verification.json"
68
+ - "--candidate-inventory .workflow/releases/REL-0001/R10-release-archive/candidate-inventory.json"
69
+ - "--successor-candidate-inventory .workflow/releases/REL-0001/R10-release-archive/candidate-inventory-successor.json"
70
+ - "--receipt <path>"
71
+ - "--apply"
72
+ required_before_archive: true
73
+ expected_line: "<git-sha>"
74
+ candidate_inventory_contract:
75
+ schema_version: 2
76
+ scope: "product-line"
77
+ product_id: "PRODUCT-001"
78
+ line_branch: "line/PRODUCT-001"
79
+ root_release_id: forbidden
80
+ candidate_fields:
81
+ - "candidate_id"
82
+ - "release_id"
83
+ - "candidate_commit"
84
+ - "status"
85
+ successor_is_immutable: true
86
+ receipt_fields:
87
+ - "operation: synchronize-release-fix-to-line"
88
+ - "old_line_head"
89
+ - "new_line_head"
90
+ - "stale_candidate_ids"
91
+ - "candidate_status_updates"
92
+ - "production_verification.sha256"
93
+ - "candidate_inventory.sha256"
94
+ - "successor_candidate_inventory.path"
95
+ - "successor_candidate_inventory.sha256"
96
+ - "successor_candidate_inventory_write.status"
97
+ - "status: planned | applied | idempotent"
98
+ receipt_refs: []
9
99
  rollback_branch_allowed: false
@@ -1,2 +1,2 @@
1
- sequence,version_id,predecessor_version_id,candidate_id,candidate_commit,version_ready_tag,manifest_path,manifest_sha256,inclusion_type
2
- 1,VER-0001,,CAND-0001,<git-sha>,version-ready/VER-0001/r1,.workflow/iterations/VER-0001/06-version-closeout/version-manifest.yaml,<sha256>,dependency-closure
1
+ sequence,version_id,predecessor_version_id,candidate_id,candidate_commit,version_ready_tag,manifest_path,manifest_sha256,inclusion_type,release_code_role
2
+ 1,VER-0001,,CAND-0001,<git-sha>,version-ready/VER-0001/r1,.workflow/iterations/VER-0001/06-version-closeout/version-manifest.yaml,<sha256>,dependency-closure,incremental-target-tag-merged-once-or-same-version-already-reachable
@@ -1,7 +1,21 @@
1
1
  # Release Assembly Contract
2
2
 
3
- Treat the target version tag as the only code source for a release candidate. Never assemble code by merging every intermediate tag and never use a movable branch head as the source.
3
+ ## Candidate Identity
4
+
5
+ At R00, freeze the exact request-time production branch head as `expected_main`. A release candidate is not a checkout of the target Tag. For an incremental release, the controlled Git operation creates `release/<release-id>-<slug>` at that exact commit, confirms that `main` still equals it and that it is an ancestor of the selected target, then merges exactly one target `version-ready/<version-id>/rN` Tag with `--no-ff`. The resulting merge commit is the release-candidate identity. For a same-version redeploy, the selected target Tag must already be an ancestor of or equal to `expected_main`; no merge is created and the exact snapshot commit is the release-candidate identity.
6
+
7
+ The target Tag is immutable and resolves to the target version's `candidate_commit`. Never merge every intermediate Tag, use a movable branch head, or replace the single incremental target merge with cherry-picks. Intermediate versions appear only in the continuous dependency closure and material traceability. If `main` moves after R00 or before candidate acceptance, preserve the abandoned evidence as `stale` and start a new release request/snapshot; do not retarget the existing release branch.
8
+
9
+ `release-git.mjs create-candidate` receives `--release-id`, `--release-branch`, `--expected-main`, `--source-tag`, the resolved `--source-commit`, `--receipt`, and explicit `--apply`. Its receipt records `operation: create-release-candidate`, `release_id`, production branch, release branch, `release_base_commit`, `source_ref`, `source_commit`, `candidate_commit`, whether a merge was created, merge strategy, and `planned`, `applied`, or `idempotent` status. The candidate commit, not the branch's later head, is what R05 through R09 verify, approve, deploy, Tag, and ultimately promote.
10
+
11
+ ## Materials And Closure
4
12
 
5
13
  The material index is exhaustive for actual changes and contains stable item ID, category, source version, source artifact ID/path/checksum, target environment, application order, verification, and rollback/recovery action. Do not record secret values.
6
14
 
7
- Require every adjacent version in the full dependency closure through the target, including already produced history, to descend from its predecessor in both the code repository (`candidate_commit`) and workflow repository (`workflow_commit`). Production-to-target reachability alone cannot prove that an intermediate version is included. Repeat the full closure check for same-version redeploy. A production hotfix must first be synchronized into `line/<product-id>`; candidates that do not contain it are `stale`. When current production equals target, emit `same-version-redeploy`, an empty newly included range, and a fresh release identity.
15
+ Require every adjacent version in the full dependency closure through the target, including already produced history, to descend from its predecessor in both the code repository (`candidate_commit`) and workflow repository (`workflow_commit`). Production-to-target reachability alone cannot prove that an intermediate version is included. Repeat the full closure check for same-version redeploy. When current production equals target, emit `same-version-redeploy`, an empty newly included range, and a fresh release identity.
16
+
17
+ ## Release-Fix Reconciliation
18
+
19
+ Create `release-fix/<release-id>/<defect-id>` only from the active release candidate. After the corrected candidate has passed affected verification and production verification has decided `released`, freeze the R09 `production-verification.json` decision and a schema-2 R10 product-line `candidate-inventory.json` before synchronizing its fix commit into `line/<product-id>` through the protected `sync-release-fix` operation. The inventory has `scope: product-line`, `product_id`, `line_branch`, active candidate ID/commit, and all product-line candidate records. Each record retains its own `release_id`, ID, commit, and status; the root has no release ID. The operation checks that the active and verified records belong to the release being synchronized, derives stale updates instead of accepting a stale-candidate argument, and writes a separate immutable successor inventory rather than updating the source snapshot. Record its JSON receipt with the release ID, source ref/commit, verified release commit, old/new line heads, merge strategy, predecessor/successor inventory evidence bindings, derived stale candidate IDs/status updates, and status.
20
+
21
+ Invoke it with `--candidate-inventory <predecessor>` and, for `--apply`, a distinct unused `--successor-candidate-inventory <successor>`. If the fix commit is already reachable from the line, `release-git.mjs sync-release-fix` returns `status: idempotent` with unchanged old/new line heads rather than changing history, and only accepts the exact already-written successor on replay. Historical version-ready Tags and manifests remain immutable. The receipt marks every selectable candidate in the product line that does not contain a production-successful fix `stale`; it cannot be selected until recreated from current lineage. Subsequent synchronization begins from that successor inventory.
@@ -69,6 +69,7 @@ function repositoriesFromWorkspace(workspaceRoot) {
69
69
  codeRepo,
70
70
  workflowRepo: root,
71
71
  repoId,
72
+ productionBranch: value(codeSection, "default_branch") || "main",
72
73
  codeRemote: value(codeSection, "remote"),
73
74
  workflowRemote: value(workflowSection, "remote"),
74
75
  };
@@ -134,6 +135,72 @@ function validateRemoteTag(remote, tag, expectedCommit) {
134
135
  }
135
136
  }
136
137
 
138
+ function validateRemoteBranch(remote, branch, expectedCommit) {
139
+ if (!remote) return;
140
+ const reference = `refs/heads/${branch}`;
141
+ const result = spawnSync("git", ["ls-remote", "--heads", remote, reference], {
142
+ encoding: "utf8",
143
+ windowsHide: true,
144
+ });
145
+ if (result.status !== 0) {
146
+ throw new Error(`Remote branch validation failed for ${branch}: ${result.stderr.trim()}`);
147
+ }
148
+ const commits = result.stdout.split(/\r?\n/).filter(Boolean).map((line) => line.split(/\s+/)[0].toLowerCase());
149
+ if (!commits.length) throw new Error(`Remote is missing production branch ${branch}: ${remote}`);
150
+ if (!commits.includes(expectedCommit.toLowerCase())) {
151
+ throw new Error(
152
+ `Remote production branch ${branch} drifted from the captured main commit ${expectedCommit}; refresh the release request.`,
153
+ );
154
+ }
155
+ }
156
+
157
+ function validateReleaseBase(repo, branch, currentProduction, remote) {
158
+ const reference = `refs/heads/${branch}`;
159
+ const commit = git(repo, ["rev-parse", "--verify", `${reference}^{commit}`]);
160
+ validateRemoteBranch(remote, branch, commit);
161
+ if (currentProduction) {
162
+ const result = spawnSync(
163
+ "git",
164
+ ["merge-base", "--is-ancestor", currentProduction.candidate_commit, commit],
165
+ { cwd: repo, encoding: "utf8", windowsHide: true },
166
+ );
167
+ if (result.status !== 0) {
168
+ throw new Error(
169
+ `Production branch ${branch} is not descended from current production ${currentProduction.version_id}; refusing a divergent release base.`,
170
+ );
171
+ }
172
+ }
173
+ return commit;
174
+ }
175
+
176
+ function validateTargetContainsReleaseBase(repo, branch, releaseBase, target) {
177
+ if (releaseBase.toLowerCase() === String(target.candidate_commit).toLowerCase()) {
178
+ throw new Error(
179
+ `Target ${target.version_ready_tag} equals captured production branch ${branch} commit ${releaseBase}; an incremental release target must strictly descend from the R00 main snapshot.`,
180
+ );
181
+ }
182
+ const targetAlreadyReachable = spawnSync(
183
+ "git",
184
+ ["merge-base", "--is-ancestor", target.candidate_commit, releaseBase],
185
+ { cwd: repo, encoding: "utf8", windowsHide: true },
186
+ );
187
+ if (targetAlreadyReachable.status === 0) {
188
+ throw new Error(
189
+ `Target ${target.version_ready_tag} is already reachable from captured production branch ${branch} commit ${releaseBase}; an incremental release target must strictly descend from the R00 main snapshot.`,
190
+ );
191
+ }
192
+ const result = spawnSync(
193
+ "git",
194
+ ["merge-base", "--is-ancestor", releaseBase, target.candidate_commit],
195
+ { cwd: repo, encoding: "utf8", windowsHide: true },
196
+ );
197
+ if (result.status !== 0) {
198
+ throw new Error(
199
+ `Captured production branch ${branch} commit ${releaseBase} is not an ancestor of target ${target.version_ready_tag}; recreate the version candidate before release.`,
200
+ );
201
+ }
202
+ }
203
+
137
204
  function validateAdjacentAncestry(repo, selected, currentProduction, commitField, label) {
138
205
  const chain = currentProduction
139
206
  ? [currentProduction, ...selected.filter((version) => version.version_id !== currentProduction.version_id)]
@@ -199,9 +266,21 @@ export function planRelease(lineage, request, options = {}) {
199
266
  }
200
267
 
201
268
  const target = ordered[targetIndex];
269
+ const sameVersionRedeploy = targetIndex === currentIndex;
202
270
  const newlyIncluded = ordered.slice(currentIndex + 1, targetIndex + 1);
203
- const releaseEvidence = targetIndex === currentIndex ? [target] : newlyIncluded;
271
+ const releaseEvidence = sameVersionRedeploy ? [target] : newlyIncluded;
204
272
  const dependencyClosure = ordered.slice(0, targetIndex + 1);
273
+ const productionBranch = options.productionBranch || "main";
274
+ const currentProduction = currentIndex < 0 ? null : ordered[currentIndex];
275
+ let releaseBaseCommit = null;
276
+ if (!sameVersionRedeploy
277
+ && currentProduction?.candidate_commit
278
+ && target.candidate_commit
279
+ && String(currentProduction.candidate_commit).toLowerCase() === String(target.candidate_commit).toLowerCase()) {
280
+ throw new Error(
281
+ `Incremental target ${target.version_id} reuses current production ${currentProduction.version_id} candidate commit; use same-version redeploy instead.`,
282
+ );
283
+ }
205
284
  for (const version of releaseEvidence) {
206
285
  if (!ELIGIBLE_STATUSES.has(version.status)) {
207
286
  throw new Error(`Version ${version.version_id} is not eligible for release: ${version.status || "missing status"}.`);
@@ -221,6 +300,20 @@ export function planRelease(lineage, request, options = {}) {
221
300
  }
222
301
 
223
302
  if (!options.skipGit) {
303
+ releaseBaseCommit = validateReleaseBase(
304
+ path.resolve(options.repo || process.cwd()),
305
+ productionBranch,
306
+ currentProduction,
307
+ options.codeRemote || null,
308
+ );
309
+ if (!sameVersionRedeploy) {
310
+ validateTargetContainsReleaseBase(
311
+ path.resolve(options.repo || process.cwd()),
312
+ productionBranch,
313
+ releaseBaseCommit,
314
+ target,
315
+ );
316
+ }
224
317
  validateGit(
225
318
  path.resolve(options.repo || process.cwd()),
226
319
  dependencyClosure,
@@ -244,7 +337,7 @@ export function planRelease(lineage, request, options = {}) {
244
337
  target_environment: "production",
245
338
  current_production_version: currentId,
246
339
  target_version: target.version_id,
247
- mode: targetIndex === currentIndex ? "same-version-redeploy" : "incremental",
340
+ mode: sameVersionRedeploy ? "same-version-redeploy" : "incremental",
248
341
  newly_included_versions: newlyIncluded.map((version) => version.version_id),
249
342
  dependency_closure: dependencyClosure.map((version) => version.version_id),
250
343
  target: {
@@ -262,6 +355,29 @@ export function planRelease(lineage, request, options = {}) {
262
355
  requires_fresh_verification: true,
263
356
  requires_fresh_approval: true,
264
357
  rollback_strategy: "previous-immutable-image-digest",
358
+ release_base: {
359
+ branch: productionBranch,
360
+ commit: releaseBaseCommit,
361
+ status: releaseBaseCommit ? "captured" : "pending-git-validation",
362
+ target_relation: sameVersionRedeploy
363
+ ? "target-already-in-release-base"
364
+ : "target-must-descend-from-release-base",
365
+ },
366
+ release_merge: {
367
+ strategy: sameVersionRedeploy ? "target-already-in-release-base" : "no-ff-single-version-ready-tag",
368
+ source_tag: target.version_ready_tag,
369
+ source_commit: target.candidate_commit,
370
+ merge_commit: null,
371
+ merge_created: !sameVersionRedeploy,
372
+ status: "pending-controlled-git-operation",
373
+ },
374
+ release_candidate: {
375
+ commit: sameVersionRedeploy ? releaseBaseCommit : null,
376
+ identity_source: sameVersionRedeploy
377
+ ? "release-base-when-target-already-reachable"
378
+ : "release-branch-head-after-merge",
379
+ status: "pending-controlled-git-operation",
380
+ },
265
381
  };
266
382
  }
267
383
 
@@ -270,7 +386,14 @@ function main(argv) {
270
386
  const lineageFile = path.resolve(required(options, "--lineage"));
271
387
  const configured = options.get("--workspace")
272
388
  ? repositoriesFromWorkspace(options.get("--workspace"))
273
- : { codeRepo: process.cwd(), workflowRepo: process.cwd(), repoId: null, codeRemote: null, workflowRemote: null };
389
+ : {
390
+ codeRepo: process.cwd(),
391
+ workflowRepo: process.cwd(),
392
+ repoId: null,
393
+ productionBranch: "main",
394
+ codeRemote: null,
395
+ workflowRemote: null,
396
+ };
274
397
  const result = planRelease(readLineage(lineageFile), {
275
398
  release_id: required(options, "--release-id"),
276
399
  target_version: required(options, "--target"),
@@ -280,6 +403,7 @@ function main(argv) {
280
403
  repo: options.get("--repo") || configured.codeRepo,
281
404
  workflowRepo: options.get("--workflow-repo") || configured.workflowRepo,
282
405
  repoId: configured.repoId,
406
+ productionBranch: options.get("--production-branch") || configured.productionBranch || "main",
283
407
  codeRemote: configured.codeRemote,
284
408
  workflowRemote: configured.workflowRemote,
285
409
  skipGit: options.get("--skip-git") === true,
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Bootstrap AI Delivery"
3
- short_description: "Inspect project state and route the next workflow action"
1
+ interface:
2
+ display_name: "Bootstrap AI Delivery"
3
+ short_description: "Inspect project state and route the next workflow action"
4
4
  default_prompt: "Use $ai-delivery-bootstrap to inspect the dual-repository workspace, recover shared checkpoints, or initialize the minimum delivery context."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Checkpoint Delivery Task"
3
- short_description: "Persist task checkpoints, hook events, and resume context"
1
+ interface:
2
+ display_name: "Checkpoint Delivery Task"
3
+ short_description: "Persist task checkpoints, hook events, and resume context"
4
4
  default_prompt: "Use $ai-delivery-checkpoint-task to start, checkpoint, publish, finish, or recover a shared delivery task."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Close Planned Version"
3
- short_description: "Freeze a verified version as release-ready"
1
+ interface:
2
+ display_name: "Close Planned Version"
3
+ short_description: "Freeze a verified version as release-ready"
4
4
  default_prompt: "Use $ai-delivery-close-version to bind code Tag, workflow Tag, and manifest checksum without publishing."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Define Product"
3
- short_description: "Discover requirements and produce an approved product baseline"
4
- default_prompt: "Use $ai-delivery-define-product to discover and define the product baseline."
1
+ interface:
2
+ display_name: "Define Product"
3
+ short_description: "Discover requirements and produce an approved product baseline"
4
+ default_prompt: "Use $ai-delivery-define-product to discover and define the product baseline."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Deploy Production"
3
- short_description: "Deploy one approved immutable iteration version to production"
1
+ interface:
2
+ display_name: "Deploy Production"
3
+ short_description: "Deploy one approved immutable iteration version to production"
4
4
  default_prompt: "Use $ai-delivery-deploy-production to deploy the approved immutable package and record facts in the workflow repository."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Design Managed Prototypes"
3
- short_description: "Select tools and manage reviewable prototypes"
4
- default_prompt: "Use $ai-delivery-design-experience to select a prototype tool, manage pages and canvases, and close review before handoff."
1
+ interface:
2
+ display_name: "Design Managed Prototypes"
3
+ short_description: "Select tools and manage reviewable prototypes"
4
+ default_prompt: "Use $ai-delivery-design-experience to select a prototype tool, manage pages and canvases, and close review before handoff."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Develop Iteration"
3
- short_description: "Orchestrate dynamic technical work packages with TDD"
1
+ interface:
2
+ display_name: "Develop Iteration"
3
+ short_description: "Orchestrate dynamic technical work packages with TDD"
4
4
  default_prompt: "Use $ai-delivery-develop-iteration to implement the current vertical slice in the configured code repository."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "自进化工作流"
3
- short_description: "持续记录反馈、评估信号并安全演进项目级交付工作流扩展能力"
1
+ interface:
2
+ display_name: "自进化工作流"
3
+ short_description: "持续记录反馈、评估信号并安全演进项目级交付工作流扩展能力"
4
4
  default_prompt: "使用 $ai-delivery-evolve-workflow 记录当前意见并在安全点评估可验证的项目级扩展。"
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Execute Test Work"
3
- short_description: "Execute one risk-based independent test work package"
4
- default_prompt: "Use $ai-delivery-execute-test to execute the assigned independent test work package."
1
+ interface:
2
+ display_name: "Execute Test Work"
3
+ short_description: "Execute one risk-based independent test work package"
4
+ default_prompt: "Use $ai-delivery-execute-test to execute the assigned independent test work package."
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Execute Technical Work"
3
- short_description: "Implement one architecture-constrained technical work package"
4
- default_prompt: "Use $ai-delivery-execute-work-package to implement the assigned technical work package."
1
+ interface:
2
+ display_name: "Execute Technical Work"
3
+ short_description: "Implement one architecture-constrained technical work package"
4
+ default_prompt: "Use $ai-delivery-execute-work-package to implement the assigned technical work package."
@@ -27,7 +27,7 @@ Write every Git decision, transition record, scope declaration, and workflow doc
27
27
  - `line/<product-id>`: latest verified cumulative development lineage, which may remain ahead of production;
28
28
  - `version/<version-id>-<slug>`: one planned cumulative version;
29
29
  - `work/<version-id>/<task-id>-<slug>`: one dynamic technical work package;
30
- - `release/<release-id>-<slug>`: one explicit user-requested release candidate;
30
+ - `release/<release-id>-<slug>`: one explicit user-requested release candidate, created from the frozen `main` snapshot and, for incremental release, integrated with exactly one target `version-ready` Tag;
31
31
  - `release-fix/<release-id>/<defect-id>`: one isolated release-candidate correction;
32
32
  - `hotfix/<hotfix-id>-<slug>`: urgent correction from the current production Tag.
33
33
 
@@ -45,13 +45,15 @@ Reject environment branches (`dev`, `sit`, `staging`, `production`), `rollback-*
45
45
  ## Release Operations
46
46
 
47
47
  1. At planned-version closeout, create immutable code `version-ready/<version-id>/rN`, fast-forward code `line/<product-id>`, commit workflow materials, then create workflow `workflow-ready/<version-id>/rN`; stop without changing code `main`.
48
- 2. Serialize production release transitions only after explicit user release intent.
49
- 3. Create `release/<release-id>-<slug>` from the selected target's exact version-ready Tag. Never merge each intermediate Tag or build from a movable line/version branch head.
50
- 4. Apply any release-only correction on `release-fix/*`, create a new release candidate, and repeat impacted verification.
51
- 5. Freeze and Tag the exact tested release commit before production deployment. Never move or reuse a release Tag.
48
+ 2. Serialize production release transitions only after explicit user release intent. At R00, record the exact `main` commit as the production-base snapshot and hold that snapshot for the whole candidate.
49
+ 3. Create `release/<release-id>-<slug>` at the recorded `main` snapshot. At R04, for incremental release merge exactly one selected target `version-ready` Tag with `--no-ff`; the resulting merge commit is the release candidate. For same-version redeploy, require the target Tag to be already reachable from the snapshot and use the snapshot itself as the candidate without a new merge. Never merge intermediate Tags or build from a movable line/version branch head.
50
+ 4. During candidate assembly, verification, approval, and deployment, any change to `main` makes the candidate stale. Stop, preserve its evidence, and recreate the release branch and candidate from a new `main` snapshot.
51
+ 5. Apply any release-only correction on `release-fix/*` from the active candidate, merge it into a new candidate, and repeat impacted verification. Freeze and Tag the exact tested candidate before production deployment; never move or reuse a release Tag.
52
52
  6. Promote the same artifact digest through environments; Git branches do not select environment state.
53
- 7. After successful production verification, fast-forward `main` to the exact deployed commit. Same-version redeploy may leave `main` unchanged.
54
- 8. After failed deployment and image rollback, keep `main` unchanged and preserve failed release and version Tags.
53
+ 7. After successful production verification, fast-forward `main` to the exact deployed release candidate commit. Before R10 archive, synchronise every deployed `release-fix` commit into `line/<product-id>` through the protected Git operation and record a sync receipt; if the commit is already reachable from line, record an explicit no-op receipt. Candidates that omit a production-successful fix are stale.
54
+ 8. Same-version redeploy may leave `main` unchanged when it already names the deployed commit. After failed deployment or image rollback, keep `main` and `line` unchanged, preserve failed release/version Tags, and do not create a rollback branch.
55
+
56
+ Use the package-delivered `scripts/release-git.mjs` interface for these protected transitions. `create-candidate` requires `--release-id`, `--release-branch`, `--expected-main`, one `--source-tag`, its `--source-commit`, `--receipt`, and `--apply`. `promote` additionally requires `--production-verification <R09-production-verification/production-verification.json>`; the JSON must bind the release ID, `decision: released`, R00 main commit, verified candidate commit, and deployed commit. `sync-release-fix` requires that same `--production-verification`, a schema-2 product-line `--candidate-inventory <predecessor-R10 JSON>`, and, with `--apply`, a distinct unused `--successor-candidate-inventory <new-R10 JSON>`. The inventory binds `product_id`, `line_branch`, the active candidate, and every candidate's own `release_id`, commit, and status. The script, not a caller-supplied stale list, derives product-line-wide `stale_candidate_ids` and `candidate_status_updates` for selectable candidates that omit the successful fix, then writes the immutable successor inventory and binds both inventory paths and checksums in its receipt. Every action returns a structured JSON receipt; omitting `--apply` produces a zero-write plan, and an already-reconciled fix returns an explicit idempotent receipt rather than silently succeeding.
55
57
 
56
58
  ## Hotfix Operations
57
59
 
@@ -1,4 +1,4 @@
1
- interface:
2
- display_name: "Manage Delivery Git"
3
- short_description: "Manage iteration branches, worktrees, tags, and release locks"
1
+ interface:
2
+ display_name: "Manage Delivery Git"
3
+ short_description: "Manage iteration branches, worktrees, tags, and release locks"
4
4
  default_prompt: "Use $ai-delivery-manage-git to perform the required transition in the correct workflow or code repository."
@@ -23,15 +23,19 @@ Use stable delivery IDs, not human names or dynamic AI roles.
23
23
 
24
24
  ## Cumulative Version Policy
25
25
 
26
- Create every next planned version from the current product line head. Close a verified version by creating immutable `version-ready/<version-id>/rN` and fast-forwarding `line/<product-id>` to it. Historical version tags and manifests never change. A correction after closeout normally becomes the next planned version.
26
+ `product-id` is the stable product-line identity established when the project is bootstrapped. Create `line/<product-id>` once, from the current `main`, when the product begins its first planned version. Create every later planned version from the current line head. Close a verified version by creating immutable `version-ready/<version-id>/rN` and fast-forwarding `line/<product-id>` to it. Historical version tags and manifests never change. A correction after closeout normally becomes the next planned version.
27
27
 
28
28
  `main` represents current successful production, while `line/<product-id>` represents the latest verified cumulative development. The line may advance through any number of release-ready versions without changing production.
29
29
 
30
30
  ## Release Policy
31
31
 
32
- Create a release branch only after explicit user release intent. Build it from the exact target version-ready Tag. Verify every adjacent code and workflow commit edge from current production through the target; a direct production-to-target check does not prove the middle versions. Use intermediate versions for lineage and material closure, not repeated code merges.
32
+ Create a release branch only after explicit user release intent. At R00, capture the exact current `main` head as the immutable `expected_main` base. Verify every adjacent code and workflow commit edge from current production through the target; a direct production-to-target check does not prove the middle versions. The captured main commit must still be the production head. In an incremental release it must be an ancestor of the exact target immutable version-ready Tag; in a same-version redeploy the target Tag must already be an ancestor of or equal to the captured main commit.
33
33
 
34
- After successful production verification, fast-forward `main` to the deployed release commit. For same-version redeploy, record a new release ID and Tag while allowing `main` to remain unchanged.
34
+ At R04, create `release/<release-id>-<slug>` from `expected_main`. For incremental release, merge exactly one target Tag with `--no-ff` and bind all later verification, approval, deployment, and release Tags to that result merge commit. For same-version redeploy, when the target Tag is already contained by `expected_main`, bind them to the snapshot itself and record no new merge. Use intermediate versions for lineage and material closure, not repeated code merges. A main change during candidate work makes the candidate stale; preserve it and start a new R00 request rather than changing its base.
35
+
36
+ After successful production verification, fast-forward `main` only from the recorded `expected_main` to the exact deployed candidate commit. `promote` must receive the immutable R09 `production-verification.json` decision, whose `schema_version` is `1`, `operation` is `production-verification-decision`, `release_id` is exact, `decision` is `released`, and `expected_main_commit`, `verified_release_commit`, and `deployed_commit` are full immutable object IDs. The promotion receipt retains the evidence path and SHA-256. For same-version redeploy, record a new release ID and Tag while allowing `main` to remain unchanged only when it already equals the exact candidate. A failed or rolled-back release does not advance `main`.
37
+
38
+ Create a release-fix only from the active candidate. When its deployed candidate has passed production verification, synchronize the exact fix commit into `line/<product-id>` before R10 archive through the protected operation. Supply the released R09 decision and a schema-2 immutable candidate inventory scoped to that product line: `scope: product-line`, `product_id`, `line_branch`, active candidate ID/commit, and a unique `candidates` list whose records each retain `candidate_id`, `release_id`, `candidate_commit`, and `status`. The root has no `release_id`; the active and verified candidate records must belong to the operation's release ID. The operation derives, rather than accepts, stale candidates across the product-line inventory: it emits `candidate_status_updates` with `status: stale` for selectable candidates that do not contain the fix, while already `stale` or `released` candidates are not rewritten. With `--apply`, provide a distinct `--successor-candidate-inventory` path. The operation writes that successor without changing its predecessor, records its path/checksum in the receipt, and updates the successor's statuses and active candidate pointer. A later fix starts from the latest immutable successor. Record the release ID, source ref/commit, verified release commit, old/new line heads, merge strategy, evidence hashes, predecessor/successor inventories, derived stale candidate IDs/status updates, and result. If the line already contains the fix, record an explicit idempotent no-op receipt and require the exact same successor inventory.
35
39
 
36
40
  ## Environment And Rollback Policy
37
41