artifact-chain-assistant 0.8.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 (328) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/.claude-plugin/marketplace.json +20 -0
  3. package/.claude-plugin/plugin.json +11 -0
  4. package/.codex-plugin/plugin.json +27 -0
  5. package/.github/ISSUE_TEMPLATE/bug_report.yml +26 -0
  6. package/.github/ISSUE_TEMPLATE/feature_request.yml +19 -0
  7. package/.github/pull_request_template.md +14 -0
  8. package/.github/workflows/ci.yml +23 -0
  9. package/CHANGELOG.md +196 -0
  10. package/CODE_OF_CONDUCT.md +11 -0
  11. package/CONTRIBUTING.md +24 -0
  12. package/EXTENDED-ARTIFACT-CATALOG.md +312 -0
  13. package/EXTENDED-ARTIFACT-CATALOG.zh-CN.md +289 -0
  14. package/INSTALL.md +1340 -0
  15. package/LICENSE +186 -0
  16. package/NOTICE +18 -0
  17. package/README.md +426 -0
  18. package/README.zh-CN.md +409 -0
  19. package/SECURITY.md +19 -0
  20. package/adapters/claude/.claude-plugin/plugin.json +11 -0
  21. package/adapters/claude/EXTENDED-ARTIFACT-CATALOG.md +312 -0
  22. package/adapters/claude/EXTENDED-ARTIFACT-CATALOG.zh-CN.md +289 -0
  23. package/adapters/claude/INSTALL.md +1340 -0
  24. package/adapters/claude/agent-methods/catalog.yaml +260 -0
  25. package/adapters/claude/bin/version-lock-audit.sh +21 -0
  26. package/adapters/claude/bin/version-lock-refresh.sh +21 -0
  27. package/adapters/claude/commands/version-lock-audit.md +9 -0
  28. package/adapters/claude/commands/version-lock-refresh.md +9 -0
  29. package/adapters/claude/compatibility.json +9 -0
  30. package/adapters/claude/hooks/hooks.json +16 -0
  31. package/adapters/claude/hooks/version-lock-stop.mjs +77 -0
  32. package/adapters/claude/schemas/artifact-workflow-profile.schema.json +72 -0
  33. package/adapters/claude/scripts/batch-merge.mjs +276 -0
  34. package/adapters/claude/scripts/batch-split.mjs +184 -0
  35. package/adapters/claude/scripts/check-workflow-profile.mjs +64 -0
  36. package/adapters/claude/scripts/doctor.mjs +44 -0
  37. package/adapters/claude/scripts/lib/artifact-graph-runtime.mjs +189 -0
  38. package/adapters/claude/scripts/lib/compatibility-policy.mjs +435 -0
  39. package/adapters/claude/scripts/lib/inline-yaml-parser.mjs +216 -0
  40. package/adapters/claude/scripts/lib/method-registry-version.mjs +7 -0
  41. package/adapters/claude/scripts/lib/workflow-profile.mjs +645 -0
  42. package/adapters/claude/scripts/run-artifact-workflow.mjs +366 -0
  43. package/adapters/claude/skills/artifact-audit/SKILL.md +80 -0
  44. package/adapters/claude/skills/artifact-batch/SKILL.md +115 -0
  45. package/adapters/claude/skills/artifact-chain-bootstrap/SKILL.md +343 -0
  46. package/adapters/claude/skills/artifact-chain-maintainer/SKILL.md +167 -0
  47. package/adapters/claude/skills/artifact-generate/SKILL.md +89 -0
  48. package/adapters/claude/skills/artifact-repair/SKILL.md +124 -0
  49. package/adapters/claude/skills/artifact-review/SKILL.md +122 -0
  50. package/adapters/claude/skills/artifact-workflow-worker/SKILL.md +90 -0
  51. package/adapters/claude/skills/prd-feature/SKILL.md +68 -0
  52. package/adapters/claude/skills/prd-feature/author/SKILL.md +92 -0
  53. package/adapters/claude/skills/prd-feature/references/compose.md +43 -0
  54. package/adapters/claude/skills/prd-feature/references/inspect.md +94 -0
  55. package/adapters/claude/skills/prd-feature/references/validate.md +65 -0
  56. package/adapters/claude/skills/prd-feature/repair/SKILL.md +135 -0
  57. package/adapters/claude/skills/prd-feature/review/SKILL.md +134 -0
  58. package/adapters/claude/skills/scenario-script/SKILL.md +76 -0
  59. package/adapters/claude/skills/scenario-script/author/SKILL.md +111 -0
  60. package/adapters/claude/skills/scenario-script/references/compose.md +43 -0
  61. package/adapters/claude/skills/scenario-script/references/inspect.md +105 -0
  62. package/adapters/claude/skills/scenario-script/references/validate.md +72 -0
  63. package/adapters/claude/skills/scenario-script/repair/SKILL.md +135 -0
  64. package/adapters/claude/skills/scenario-script/review/SKILL.md +137 -0
  65. package/adapters/claude/skills/where-am-i/SKILL.md +233 -0
  66. package/adapters/claude/templates/README.md +159 -0
  67. package/adapters/claude/templates/core/decision/review-checklist.md +35 -0
  68. package/adapters/claude/templates/core/decision/starter.md +66 -0
  69. package/adapters/claude/templates/core/design/review-checklist.md +41 -0
  70. package/adapters/claude/templates/core/design/starter.md +84 -0
  71. package/adapters/claude/templates/core/e2e_test/review-checklist.md +43 -0
  72. package/adapters/claude/templates/core/e2e_test/starter.md +70 -0
  73. package/adapters/claude/templates/core/feature/review-checklist.md +29 -0
  74. package/adapters/claude/templates/core/feature/starter.md +43 -0
  75. package/adapters/claude/templates/core/scenario/review-checklist.md +29 -0
  76. package/adapters/claude/templates/core/scenario/starter.md +57 -0
  77. package/adapters/claude/templates/core/test/review-checklist.md +37 -0
  78. package/adapters/claude/templates/core/test/starter.md +70 -0
  79. package/adapters/claude/templates/extended/ADOPTION-GUIDE.md +263 -0
  80. package/adapters/claude/templates/extended/README.md +261 -0
  81. package/adapters/claude/templates/extended/agent/agent_skill/review-checklist.md +51 -0
  82. package/adapters/claude/templates/extended/agent/agent_skill/starter.md +133 -0
  83. package/adapters/claude/templates/extended/agent/hook_policy/review-checklist.md +58 -0
  84. package/adapters/claude/templates/extended/agent/hook_policy/starter.md +134 -0
  85. package/adapters/claude/templates/extended/agent/prompt_packet/review-checklist.md +54 -0
  86. package/adapters/claude/templates/extended/agent/prompt_packet/starter.md +106 -0
  87. package/adapters/claude/templates/extended/contracts/api_contract/review-checklist.md +43 -0
  88. package/adapters/claude/templates/extended/contracts/api_contract/starter.md +92 -0
  89. package/adapters/claude/templates/extended/contracts/batch_job_contract/review-checklist.md +82 -0
  90. package/adapters/claude/templates/extended/contracts/batch_job_contract/starter.md +158 -0
  91. package/adapters/claude/templates/extended/contracts/cli_contract/review-checklist.md +43 -0
  92. package/adapters/claude/templates/extended/contracts/cli_contract/starter.md +93 -0
  93. package/adapters/claude/templates/extended/contracts/data_contract/review-checklist.md +45 -0
  94. package/adapters/claude/templates/extended/contracts/data_contract/starter.md +88 -0
  95. package/adapters/claude/templates/extended/contracts/integration_contract/review-checklist.md +77 -0
  96. package/adapters/claude/templates/extended/contracts/integration_contract/starter.md +158 -0
  97. package/adapters/claude/templates/extended/contracts/ipc_contract/review-checklist.md +78 -0
  98. package/adapters/claude/templates/extended/contracts/ipc_contract/starter.md +214 -0
  99. package/adapters/claude/templates/extended/contracts/report_contract/review-checklist.md +61 -0
  100. package/adapters/claude/templates/extended/contracts/report_contract/starter.md +97 -0
  101. package/adapters/claude/templates/extended/contracts/ui_contract/review-checklist.md +70 -0
  102. package/adapters/claude/templates/extended/contracts/ui_contract/starter.md +150 -0
  103. package/adapters/claude/templates/extended/domain/database_migration/review-checklist.md +51 -0
  104. package/adapters/claude/templates/extended/domain/database_migration/starter.md +115 -0
  105. package/adapters/claude/templates/extended/domain/domain_model/review-checklist.md +43 -0
  106. package/adapters/claude/templates/extended/domain/domain_model/starter.md +83 -0
  107. package/adapters/claude/templates/extended/governance/oss_compliance/review-checklist.md +51 -0
  108. package/adapters/claude/templates/extended/governance/oss_compliance/starter.md +84 -0
  109. package/adapters/claude/templates/extended/governance/publish_skill/review-checklist.md +58 -0
  110. package/adapters/claude/templates/extended/governance/publish_skill/starter.md +172 -0
  111. package/adapters/claude/templates/extended/governance/release_policy/review-checklist.md +57 -0
  112. package/adapters/claude/templates/extended/governance/release_policy/starter.md +131 -0
  113. package/adapters/claude/templates/extended/ops/deployment_manifest/review-checklist.md +51 -0
  114. package/adapters/claude/templates/extended/ops/deployment_manifest/starter.md +117 -0
  115. package/adapters/claude/templates/extended/ops/migration_plan/review-checklist.md +63 -0
  116. package/adapters/claude/templates/extended/ops/migration_plan/starter.md +117 -0
  117. package/adapters/claude/templates/extended/ops/performance_budget/review-checklist.md +50 -0
  118. package/adapters/claude/templates/extended/ops/performance_budget/starter.md +117 -0
  119. package/adapters/claude/templates/extended/ops/runbook/review-checklist.md +51 -0
  120. package/adapters/claude/templates/extended/ops/runbook/starter.md +101 -0
  121. package/adapters/claude/templates/extended/ops/security_review/review-checklist.md +56 -0
  122. package/adapters/claude/templates/extended/ops/security_review/starter.md +125 -0
  123. package/adapters/codex/.codex-plugin/plugin.json +27 -0
  124. package/adapters/codex/EXTENDED-ARTIFACT-CATALOG.md +312 -0
  125. package/adapters/codex/EXTENDED-ARTIFACT-CATALOG.zh-CN.md +289 -0
  126. package/adapters/codex/INSTALL.md +1340 -0
  127. package/adapters/codex/agent-methods/catalog.yaml +260 -0
  128. package/adapters/codex/compatibility.json +9 -0
  129. package/adapters/codex/schemas/artifact-workflow-profile.schema.json +72 -0
  130. package/adapters/codex/scripts/batch-merge.mjs +276 -0
  131. package/adapters/codex/scripts/batch-split.mjs +184 -0
  132. package/adapters/codex/scripts/check-workflow-profile.mjs +64 -0
  133. package/adapters/codex/scripts/doctor.mjs +44 -0
  134. package/adapters/codex/scripts/lib/artifact-graph-runtime.mjs +189 -0
  135. package/adapters/codex/scripts/lib/compatibility-policy.mjs +435 -0
  136. package/adapters/codex/scripts/lib/inline-yaml-parser.mjs +216 -0
  137. package/adapters/codex/scripts/lib/method-registry-version.mjs +7 -0
  138. package/adapters/codex/scripts/lib/workflow-profile.mjs +645 -0
  139. package/adapters/codex/scripts/run-artifact-workflow.mjs +366 -0
  140. package/adapters/codex/skills/artifact-audit/SKILL.md +80 -0
  141. package/adapters/codex/skills/artifact-batch/SKILL.md +115 -0
  142. package/adapters/codex/skills/artifact-chain-bootstrap/SKILL.md +343 -0
  143. package/adapters/codex/skills/artifact-chain-maintainer/SKILL.md +167 -0
  144. package/adapters/codex/skills/artifact-generate/SKILL.md +89 -0
  145. package/adapters/codex/skills/artifact-repair/SKILL.md +124 -0
  146. package/adapters/codex/skills/artifact-review/SKILL.md +122 -0
  147. package/adapters/codex/skills/artifact-workflow-worker/SKILL.md +90 -0
  148. package/adapters/codex/skills/prd-feature/SKILL.md +68 -0
  149. package/adapters/codex/skills/prd-feature/author/SKILL.md +92 -0
  150. package/adapters/codex/skills/prd-feature/references/compose.md +43 -0
  151. package/adapters/codex/skills/prd-feature/references/inspect.md +94 -0
  152. package/adapters/codex/skills/prd-feature/references/validate.md +65 -0
  153. package/adapters/codex/skills/prd-feature/repair/SKILL.md +135 -0
  154. package/adapters/codex/skills/prd-feature/review/SKILL.md +134 -0
  155. package/adapters/codex/skills/scenario-script/SKILL.md +76 -0
  156. package/adapters/codex/skills/scenario-script/author/SKILL.md +111 -0
  157. package/adapters/codex/skills/scenario-script/references/compose.md +43 -0
  158. package/adapters/codex/skills/scenario-script/references/inspect.md +105 -0
  159. package/adapters/codex/skills/scenario-script/references/validate.md +72 -0
  160. package/adapters/codex/skills/scenario-script/repair/SKILL.md +135 -0
  161. package/adapters/codex/skills/scenario-script/review/SKILL.md +137 -0
  162. package/adapters/codex/skills/where-am-i/SKILL.md +233 -0
  163. package/adapters/codex/templates/README.md +159 -0
  164. package/adapters/codex/templates/core/decision/review-checklist.md +35 -0
  165. package/adapters/codex/templates/core/decision/starter.md +66 -0
  166. package/adapters/codex/templates/core/design/review-checklist.md +41 -0
  167. package/adapters/codex/templates/core/design/starter.md +84 -0
  168. package/adapters/codex/templates/core/e2e_test/review-checklist.md +43 -0
  169. package/adapters/codex/templates/core/e2e_test/starter.md +70 -0
  170. package/adapters/codex/templates/core/feature/review-checklist.md +29 -0
  171. package/adapters/codex/templates/core/feature/starter.md +43 -0
  172. package/adapters/codex/templates/core/scenario/review-checklist.md +29 -0
  173. package/adapters/codex/templates/core/scenario/starter.md +57 -0
  174. package/adapters/codex/templates/core/test/review-checklist.md +37 -0
  175. package/adapters/codex/templates/core/test/starter.md +70 -0
  176. package/adapters/codex/templates/extended/ADOPTION-GUIDE.md +263 -0
  177. package/adapters/codex/templates/extended/README.md +261 -0
  178. package/adapters/codex/templates/extended/agent/agent_skill/review-checklist.md +51 -0
  179. package/adapters/codex/templates/extended/agent/agent_skill/starter.md +133 -0
  180. package/adapters/codex/templates/extended/agent/hook_policy/review-checklist.md +58 -0
  181. package/adapters/codex/templates/extended/agent/hook_policy/starter.md +134 -0
  182. package/adapters/codex/templates/extended/agent/prompt_packet/review-checklist.md +54 -0
  183. package/adapters/codex/templates/extended/agent/prompt_packet/starter.md +106 -0
  184. package/adapters/codex/templates/extended/contracts/api_contract/review-checklist.md +43 -0
  185. package/adapters/codex/templates/extended/contracts/api_contract/starter.md +92 -0
  186. package/adapters/codex/templates/extended/contracts/batch_job_contract/review-checklist.md +82 -0
  187. package/adapters/codex/templates/extended/contracts/batch_job_contract/starter.md +158 -0
  188. package/adapters/codex/templates/extended/contracts/cli_contract/review-checklist.md +43 -0
  189. package/adapters/codex/templates/extended/contracts/cli_contract/starter.md +93 -0
  190. package/adapters/codex/templates/extended/contracts/data_contract/review-checklist.md +45 -0
  191. package/adapters/codex/templates/extended/contracts/data_contract/starter.md +88 -0
  192. package/adapters/codex/templates/extended/contracts/integration_contract/review-checklist.md +77 -0
  193. package/adapters/codex/templates/extended/contracts/integration_contract/starter.md +158 -0
  194. package/adapters/codex/templates/extended/contracts/ipc_contract/review-checklist.md +78 -0
  195. package/adapters/codex/templates/extended/contracts/ipc_contract/starter.md +214 -0
  196. package/adapters/codex/templates/extended/contracts/report_contract/review-checklist.md +61 -0
  197. package/adapters/codex/templates/extended/contracts/report_contract/starter.md +97 -0
  198. package/adapters/codex/templates/extended/contracts/ui_contract/review-checklist.md +70 -0
  199. package/adapters/codex/templates/extended/contracts/ui_contract/starter.md +150 -0
  200. package/adapters/codex/templates/extended/domain/database_migration/review-checklist.md +51 -0
  201. package/adapters/codex/templates/extended/domain/database_migration/starter.md +115 -0
  202. package/adapters/codex/templates/extended/domain/domain_model/review-checklist.md +43 -0
  203. package/adapters/codex/templates/extended/domain/domain_model/starter.md +83 -0
  204. package/adapters/codex/templates/extended/governance/oss_compliance/review-checklist.md +51 -0
  205. package/adapters/codex/templates/extended/governance/oss_compliance/starter.md +84 -0
  206. package/adapters/codex/templates/extended/governance/publish_skill/review-checklist.md +58 -0
  207. package/adapters/codex/templates/extended/governance/publish_skill/starter.md +172 -0
  208. package/adapters/codex/templates/extended/governance/release_policy/review-checklist.md +57 -0
  209. package/adapters/codex/templates/extended/governance/release_policy/starter.md +131 -0
  210. package/adapters/codex/templates/extended/ops/deployment_manifest/review-checklist.md +51 -0
  211. package/adapters/codex/templates/extended/ops/deployment_manifest/starter.md +117 -0
  212. package/adapters/codex/templates/extended/ops/migration_plan/review-checklist.md +63 -0
  213. package/adapters/codex/templates/extended/ops/migration_plan/starter.md +117 -0
  214. package/adapters/codex/templates/extended/ops/performance_budget/review-checklist.md +50 -0
  215. package/adapters/codex/templates/extended/ops/performance_budget/starter.md +117 -0
  216. package/adapters/codex/templates/extended/ops/runbook/review-checklist.md +51 -0
  217. package/adapters/codex/templates/extended/ops/runbook/starter.md +101 -0
  218. package/adapters/codex/templates/extended/ops/security_review/review-checklist.md +56 -0
  219. package/adapters/codex/templates/extended/ops/security_review/starter.md +125 -0
  220. package/agent-methods/catalog.yaml +260 -0
  221. package/compatibility.json +9 -0
  222. package/package.json +85 -0
  223. package/runtime/claude/version-lock-stop.mjs +77 -0
  224. package/schemas/artifact-workflow-profile.schema.json +72 -0
  225. package/scripts/batch-merge.mjs +276 -0
  226. package/scripts/batch-split.mjs +184 -0
  227. package/scripts/build-adapters.mjs +195 -0
  228. package/scripts/build-runtime-bundles.mjs +134 -0
  229. package/scripts/check-compatibility.mjs +19 -0
  230. package/scripts/check-method-registry.mjs +461 -0
  231. package/scripts/check-templates.mjs +348 -0
  232. package/scripts/check-workflow-profile.mjs +64 -0
  233. package/scripts/doctor.mjs +44 -0
  234. package/scripts/install-git-hooks.mjs +21 -0
  235. package/scripts/lib/artifact-graph-runtime.mjs +189 -0
  236. package/scripts/lib/compatibility-policy.mjs +435 -0
  237. package/scripts/lib/inline-yaml-parser.mjs +216 -0
  238. package/scripts/lib/method-registry-version.mjs +7 -0
  239. package/scripts/lib/workflow-profile.mjs +645 -0
  240. package/scripts/run-artifact-workflow.mjs +366 -0
  241. package/scripts/sync-skills.mjs +149 -0
  242. package/skills-src/artifact-audit/SKILL.md +80 -0
  243. package/skills-src/artifact-batch/SKILL.md +115 -0
  244. package/skills-src/artifact-chain-bootstrap/SKILL.md +343 -0
  245. package/skills-src/artifact-chain-maintainer/SKILL.md +167 -0
  246. package/skills-src/artifact-generate/SKILL.md +89 -0
  247. package/skills-src/artifact-repair/SKILL.md +124 -0
  248. package/skills-src/artifact-review/SKILL.md +122 -0
  249. package/skills-src/artifact-workflow-worker/SKILL.md +90 -0
  250. package/skills-src/prd-feature/SKILL.md +68 -0
  251. package/skills-src/prd-feature/author/SKILL.md +92 -0
  252. package/skills-src/prd-feature/references/compose.md +43 -0
  253. package/skills-src/prd-feature/references/inspect.md +94 -0
  254. package/skills-src/prd-feature/references/validate.md +65 -0
  255. package/skills-src/prd-feature/repair/SKILL.md +135 -0
  256. package/skills-src/prd-feature/review/SKILL.md +134 -0
  257. package/skills-src/scenario-script/SKILL.md +76 -0
  258. package/skills-src/scenario-script/author/SKILL.md +111 -0
  259. package/skills-src/scenario-script/references/compose.md +43 -0
  260. package/skills-src/scenario-script/references/inspect.md +105 -0
  261. package/skills-src/scenario-script/references/validate.md +72 -0
  262. package/skills-src/scenario-script/repair/SKILL.md +135 -0
  263. package/skills-src/scenario-script/review/SKILL.md +137 -0
  264. package/skills-src/where-am-i/SKILL.md.tpl +233 -0
  265. package/templates/README.md +159 -0
  266. package/templates/claude/marketplace.json.tpl +20 -0
  267. package/templates/claude/plugin.json.tpl +11 -0
  268. package/templates/claude/settings.json.tpl +16 -0
  269. package/templates/codex/marketplace.json.tpl +20 -0
  270. package/templates/codex/plugin.json.tpl +27 -0
  271. package/templates/core/decision/review-checklist.md +35 -0
  272. package/templates/core/decision/starter.md +66 -0
  273. package/templates/core/design/review-checklist.md +41 -0
  274. package/templates/core/design/starter.md +84 -0
  275. package/templates/core/e2e_test/review-checklist.md +43 -0
  276. package/templates/core/e2e_test/starter.md +70 -0
  277. package/templates/core/feature/review-checklist.md +29 -0
  278. package/templates/core/feature/starter.md +43 -0
  279. package/templates/core/scenario/review-checklist.md +29 -0
  280. package/templates/core/scenario/starter.md +57 -0
  281. package/templates/core/test/review-checklist.md +37 -0
  282. package/templates/core/test/starter.md +70 -0
  283. package/templates/extended/ADOPTION-GUIDE.md +263 -0
  284. package/templates/extended/README.md +261 -0
  285. package/templates/extended/agent/agent_skill/review-checklist.md +51 -0
  286. package/templates/extended/agent/agent_skill/starter.md +133 -0
  287. package/templates/extended/agent/hook_policy/review-checklist.md +58 -0
  288. package/templates/extended/agent/hook_policy/starter.md +134 -0
  289. package/templates/extended/agent/prompt_packet/review-checklist.md +54 -0
  290. package/templates/extended/agent/prompt_packet/starter.md +106 -0
  291. package/templates/extended/contracts/api_contract/review-checklist.md +43 -0
  292. package/templates/extended/contracts/api_contract/starter.md +92 -0
  293. package/templates/extended/contracts/batch_job_contract/review-checklist.md +82 -0
  294. package/templates/extended/contracts/batch_job_contract/starter.md +158 -0
  295. package/templates/extended/contracts/cli_contract/review-checklist.md +43 -0
  296. package/templates/extended/contracts/cli_contract/starter.md +93 -0
  297. package/templates/extended/contracts/data_contract/review-checklist.md +45 -0
  298. package/templates/extended/contracts/data_contract/starter.md +88 -0
  299. package/templates/extended/contracts/integration_contract/review-checklist.md +77 -0
  300. package/templates/extended/contracts/integration_contract/starter.md +158 -0
  301. package/templates/extended/contracts/ipc_contract/review-checklist.md +78 -0
  302. package/templates/extended/contracts/ipc_contract/starter.md +214 -0
  303. package/templates/extended/contracts/report_contract/review-checklist.md +61 -0
  304. package/templates/extended/contracts/report_contract/starter.md +97 -0
  305. package/templates/extended/contracts/ui_contract/review-checklist.md +70 -0
  306. package/templates/extended/contracts/ui_contract/starter.md +150 -0
  307. package/templates/extended/domain/database_migration/review-checklist.md +51 -0
  308. package/templates/extended/domain/database_migration/starter.md +115 -0
  309. package/templates/extended/domain/domain_model/review-checklist.md +43 -0
  310. package/templates/extended/domain/domain_model/starter.md +83 -0
  311. package/templates/extended/governance/oss_compliance/review-checklist.md +51 -0
  312. package/templates/extended/governance/oss_compliance/starter.md +84 -0
  313. package/templates/extended/governance/publish_skill/review-checklist.md +58 -0
  314. package/templates/extended/governance/publish_skill/starter.md +172 -0
  315. package/templates/extended/governance/release_policy/review-checklist.md +57 -0
  316. package/templates/extended/governance/release_policy/starter.md +131 -0
  317. package/templates/extended/ops/deployment_manifest/review-checklist.md +51 -0
  318. package/templates/extended/ops/deployment_manifest/starter.md +117 -0
  319. package/templates/extended/ops/migration_plan/review-checklist.md +63 -0
  320. package/templates/extended/ops/migration_plan/starter.md +117 -0
  321. package/templates/extended/ops/performance_budget/review-checklist.md +50 -0
  322. package/templates/extended/ops/performance_budget/starter.md +117 -0
  323. package/templates/extended/ops/runbook/review-checklist.md +51 -0
  324. package/templates/extended/ops/runbook/starter.md +101 -0
  325. package/templates/extended/ops/security_review/review-checklist.md +56 -0
  326. package/templates/extended/ops/security_review/starter.md +125 -0
  327. package/templates/git-hooks/pre-commit.sh +43 -0
  328. package/templates/git-hooks/pre-push.sh +22 -0
@@ -0,0 +1,312 @@
1
+ # Extended Artifact Catalog
2
+
3
+ This document summarizes the extended artifact type catalog for `artifact-chain-assistant`. It
4
+ covers type classification, recommended paths and ID patterns, template adoption rules, and the
5
+ three-tier authority boundary between `artifact-graph`, the plugin, and target projects.
6
+
7
+ For core artifact types (`feature`, `scenario`, `decision`, `design`, `test`, `e2e_test`), see the
8
+ plugin README and INSTALL.md. This document covers opt-in types beyond the core set.
9
+
10
+ ## Three-Tier Authority Model
11
+
12
+ | Layer | Scope | Responsibility for Extended Types |
13
+ | --- | --- | --- |
14
+ | **artifact-graph** | Deterministic graph capabilities | Reads type definitions from config; indexes artifacts; provides context/packet/validate. Does **not** ship default paths or ID patterns for extended types. Types without configured paths are not indexed. |
15
+ | **artifact-chain-assistant** | General assistant guidance | Provides starter templates, profile suggestions, and generic review checklists. **Templates are guidance, not authority.** Project-local templates and review skills override plugin suggestions. |
16
+ | **Target project** | Final working method | Decides which extended types to enable; maintains config, local templates, review skills, and ID rules. **Project-local overrides plugin suggestions.** Enables new types progressively as maturity grows. |
17
+
18
+ ## Extended Artifact Type Catalog
19
+
20
+ Extended types are organized into four categories. Each type entry includes recommended paths, ID
21
+ patterns, lifecycle rules, and review checkpoints. All recommended values are **guidance** — the
22
+ project's `artifact-graph.config.yaml` is the final authority.
23
+
24
+ ### Contract Artifacts
25
+
26
+ Contract artifacts record interface agreements at system boundaries. When requirements flow from
27
+ features and scenarios into implementation, contracts are key upstream artifacts for context
28
+ assembly.
29
+
30
+ | Type | Recommended Path | Recommended ID Pattern | Lifecycle | Review Checkpoints |
31
+ | --- | --- | --- | --- | --- |
32
+ | `api_contract` | `artifacts/contracts/api/` | `API-{nnn}` or `{service}-API-{version}` | Create/update on API change; mark deprecated when API is retired | Consistency with implementation, error code coverage, version compatibility, request/response schema completeness |
33
+ | `cli_contract` | `artifacts/contracts/cli/` | `CLI-{nnn}` or `{tool}-CLI-{version}` | Create/update on CLI interface change | Command signature, parameter types, exit codes, backward compatibility, help text accuracy |
34
+ | `ui_contract` | `artifacts/contracts/ui/` | `UI-{nnn}` | Create/update on UI flow change | Interaction flows, state transitions, accessibility, error state coverage |
35
+ | `ipc_contract` | `artifacts/contracts/ipc/` | `IPC-{nnn}` | Create/update on IPC channel change | Message format, error propagation, frontend/backend boundary, serialization compatibility |
36
+ | `data_contract` | `artifacts/contracts/data/` | `DATA-{nnn}` | Create/update on data model/schema change | Field semantics, version compatibility, migration path, default value semantics |
37
+ | `report_contract` | `artifacts/contracts/report/` | `RPT-{nnn}` | Create/update on report format change | Field semantics, aggregation logic, output format, time window semantics |
38
+ | `integration_contract` | `artifacts/contracts/integration/` | `INT-{nnn}` | Create/update on external system integration change | Interface protocol, timeout, retry strategy, idempotency, error classification |
39
+ | `batch_job_contract` | `artifacts/contracts/batch/` | `BATCH-{nnn}` | Create/update on batch job change | Input/output format, schedule expression, idempotency, error handling, replay strategy |
40
+
41
+ ### Domain and Data Artifacts
42
+
43
+ Domain and data artifacts capture business concepts and technical data models. They are core
44
+ artifacts for enterprise Java and DDD projects.
45
+
46
+ | Type | Recommended Path | Recommended ID Pattern | Lifecycle | Review Checkpoints |
47
+ | --- | --- | --- | --- | --- |
48
+ | `domain_model` | `artifacts/domain/` | `DM-{nnn}` or entity name | Create/update on domain concept change | Aggregate boundaries, domain events, bounded context mapping, invariant definitions |
49
+ | `database_migration` | `artifacts/migrations/` | `MIG-{nnn}` or timestamp (e.g., `20260709-001`) | Create on schema change; mark executed after deployment | Rollback path, data compatibility, performance impact, large table change strategy |
50
+
51
+ ### Deployment and Operations Artifacts
52
+
53
+ Deployment and operations artifacts cover production environment changes, security, performance, and
54
+ operational procedures. Enable only when the project has corresponding operational processes.
55
+
56
+ | Type | Recommended Path | Recommended ID Pattern | Lifecycle | Review Checkpoints |
57
+ | --- | --- | --- | --- | --- |
58
+ | `deployment_manifest` | `artifacts/deploy/` | `DEP-{nnn}` or environment name (e.g., `DEP-prod`) | Create/update on deployment config change | Environment differences, rollback strategy, resource limits, health check configuration |
59
+ | `security_review` | `artifacts/security/` | `SEC-{nnn}` | Create/update on security review cycle or major change | Threat model coverage, fix status tracking, compliance mapping, sensitive data handling |
60
+ | `performance_budget` | `artifacts/performance/` | `PERF-{nnn}` | Create/update on performance target change | Metric baseline, threshold definition, regression detection strategy, measurement method |
61
+ | `migration_plan` | `artifacts/migrations/plan/` | `MPLAN-{nnn}` | Create on migration start; update at each phase completion | Phase division, rollback point definition, data validation strategy, parallel run period |
62
+ | `runbook` | `artifacts/runbooks/` | `RUN-{nnn}` | Create/update on operational procedure change | Step accuracy, alert correlation, responsible person, last execution date |
63
+
64
+ ### Release Governance Artifacts
65
+
66
+ Release governance artifacts cover versioning strategy, publishing workflows, and open-source
67
+ compliance. Enable only for parent repos, release governance repos, or multi-package monorepos that
68
+ own the release process.
69
+
70
+ | Type | Recommended Path | Recommended ID Pattern | Lifecycle | Review Checkpoints |
71
+ | --- | --- | --- | --- | --- |
72
+ | `release_policy` | `artifacts/governance/` | `RP-{nnn}` | Create/update on release policy change | Version semantics, release cadence, branch strategy, changelog standard, rollback plan |
73
+ | `publish_skill` | `artifacts/governance/` | `PS-{nnn}` | Create/update on publish workflow change | Publish targets, quality gates, compliance checks, error handling, rollback plan |
74
+ | `oss_compliance` | `artifacts/governance/` | `OSS-{nnn}` | Create/update on OSS compliance rule or release scope change | License policy, dependency audit, standard files, security disclosure, release exclusions |
75
+
76
+ ### Agent and Hook Artifacts
77
+
78
+ Agent and hook artifacts cover AI-assisted workflows and CI/CD gates. Enable only when the project
79
+ has corresponding files or processes.
80
+
81
+ | Type | Recommended Path | Recommended ID Pattern | Lifecycle | Review Checkpoints |
82
+ | --- | --- | --- | --- | --- |
83
+ | `agent_skill` | `artifacts/skills/` | `SKILL-{nnn}` | Create/update on skill definition change | Input/output contract, tool dependencies, permission boundary, error handling |
84
+ | `hook_policy` | `artifacts/policies/` | `HOOK-{nnn}` | Create/update on hook policy change | Trigger conditions, gate rules, bypass approval process, audit log |
85
+ | `prompt_packet` | `artifacts/packets/` | `PP-{nnn}` | Create/update on prompt template or context assembly change | Context sources, prompt clarity, token budget, output contract, testability |
86
+
87
+ ## Bootstrap Trimming Strategy
88
+
89
+ Bootstrap selects a **minimum viable profile** rather than enabling all known types.
90
+
91
+ Rules:
92
+
93
+ 1. **Core set always enabled**: `feature`, `scenario`, `decision`, `design`, `test`, `e2e_test`.
94
+ 2. **Contracts by evidence**: Enable only when the project has corresponding interface files (e.g., OpenAPI spec, CLI entry, IPC channel definition).
95
+ 3. **Domain/data by project shape**: Enterprise Java/DDD projects may enable `domain_model`; projects with databases may enable `database_migration`.
96
+ 4. **Ops by operational process**: Enable only when the project has deployment configs, security review processes, or operational manuals.
97
+ 5. **Agent/hook by local files**: Enable only when the project has `skills/`, `policies/`, or hook config files.
98
+ 6. **Progressive expansion**: As project maturity grows, add new types in `artifact-graph.config.yaml`. Existing artifacts and traceability relationships are unaffected.
99
+
100
+ After bootstrap, the enabled types, paths, and ID patterns are recorded in
101
+ `artifact-graph.config.yaml`. Deferred types and their evidence conditions are documented in the
102
+ project's artifact catalog so future expansion is a recorded decision.
103
+
104
+ ## Template Adoption
105
+
106
+ ### Template Source Rules
107
+
108
+ 1. **Plugin templates are onboarding guidance.** `artifact-chain-assistant` provides starter
109
+ templates for each extended type in `templates/extended/`, organized by category
110
+ (`contracts/`, `domain/`, `ops/`, `agent/`). Plugin templates do not determine the project's
111
+ artifact shape.
112
+ 2. **Project-local templates are authority.** When a project needs different section structures,
113
+ review standards, or naming rules, project-local templates override plugin templates.
114
+ 3. **Fallback when no template exists.** If a project enables an extended type but has no local
115
+ template, the assistant may reference the plugin starter but must note it has not been
116
+ customized.
117
+ 4. **Adoption flow.** Copy the starter template from `templates/extended/` to the project-local
118
+ `artifacts/templates/` or equivalent, then customize.
119
+
120
+ ### Template Lifecycle
121
+
122
+ 1. **Bootstrap phase**: Bootstrap skill references plugin starters to generate initial artifact
123
+ structure. Template source is recorded in `artifacts/README.md`.
124
+ 2. **Adoption phase**: Team reviews the starter, decides which sections to keep/modify/remove,
125
+ and copies to local. The customized version becomes authority.
126
+ 3. **Mature phase**: Project maintains a complete local template library. Plugin starters are
127
+ referenced only when onboarding new members or enabling new types.
128
+ 4. **Upgrade review**: When the plugin updates a starter, the project reviews the diff and
129
+ selectively merges useful changes while preserving local customizations.
130
+
131
+ ### Template Directory Layout
132
+
133
+ ```
134
+ templates/
135
+ core/ # Core artifact templates
136
+ feature/
137
+ starter.md # Drafting guidance template
138
+ review-checklist.md # Generic review checklist
139
+ scenario/
140
+ starter.md
141
+ review-checklist.md
142
+ decision/
143
+ starter.md
144
+ review-checklist.md
145
+ design/
146
+ starter.md
147
+ review-checklist.md
148
+ test/
149
+ starter.md
150
+ review-checklist.md
151
+ e2e_test/
152
+ starter.md
153
+ review-checklist.md
154
+ extended/ # Extended artifact templates (by category)
155
+ contracts/
156
+ api_contract/
157
+ starter.md
158
+ review-checklist.md
159
+ cli_contract/
160
+ starter.md
161
+ review-checklist.md
162
+ data_contract/
163
+ starter.md
164
+ review-checklist.md
165
+ ... # Other contract types follow the same structure
166
+ domain/
167
+ domain_model/
168
+ starter.md
169
+ review-checklist.md
170
+ database_migration/
171
+ starter.md
172
+ review-checklist.md
173
+ ops/
174
+ deployment_manifest/
175
+ starter.md
176
+ review-checklist.md
177
+ runbook/
178
+ starter.md
179
+ review-checklist.md
180
+ ...
181
+ governance/
182
+ release_policy/
183
+ starter.md
184
+ review-checklist.md
185
+ publish_skill/
186
+ starter.md
187
+ review-checklist.md
188
+ oss_compliance/
189
+ starter.md
190
+ review-checklist.md
191
+ agent/
192
+ agent_skill/
193
+ starter.md
194
+ review-checklist.md
195
+ hook_policy/
196
+ starter.md
197
+ review-checklist.md
198
+ prompt_packet/
199
+ starter.md
200
+ review-checklist.md
201
+ ```
202
+
203
+ Each type's `starter.md` contains the artifact structure template and minimal filling guidance.
204
+ `review-checklist.md` is the generic review checkpoint baseline. Both are **suggestions that can be
205
+ fully overridden by project-local templates**.
206
+
207
+ ## Evidence-Based Enablement
208
+
209
+ Bootstrap activates extended artifact types only when local files or directories exist:
210
+
211
+ | Type | Enablement Evidence |
212
+ | --- | --- |
213
+ | `api_contract` | OpenAPI/Swagger spec, API documentation, or REST endpoint code exists |
214
+ | `cli_contract` | CLI entry code or command definitions exist |
215
+ | `data_contract` | Data model definitions or schema files exist |
216
+ | `domain_model` | DDD aggregates, entities, or value objects exist in code |
217
+ | `database_migration` | Database schema or migration scripts exist |
218
+ | `security_review` | Security review process, security-related code, or Spring Security config exists |
219
+ | `performance_budget` | Performance test scripts, monitoring config, or performance baseline docs exist |
220
+ | `migration_plan` | Migration planning docs, architecture evolution plans, or system transition plans exist |
221
+ | `runbook` | Operational procedures or runbook documents exist |
222
+ | `deployment_manifest` | Deployment configs (K8s, Docker, etc.) exist |
223
+ | `agent_skill` | Agent skill definition files exist |
224
+ | `hook_policy` | CI/CD hook configurations exist |
225
+ | `release_policy` | Release policy docs, versioning strategy, or release process files exist |
226
+ | `publish_skill` | Publish workflow scripts, CI/CD publish pipelines, or registry configuration exists |
227
+ | `prompt_packet` | Prompt template files, context assembly configs, or AI workflow definitions exist |
228
+ | `oss_compliance` | License files, dependency audit configs, or OSS compliance process docs exist |
229
+
230
+ **Rule**: Enable a type only when local evidence exists. Do not enable because the plugin provides a
231
+ template.
232
+
233
+ ## artifact-graph Runtime Support for Custom Types
234
+
235
+ Starting with `artifact-graph` 0.3.0, config-driven custom types have full runtime support.
236
+ The extended catalog has two layers:
237
+
238
+ 1. **Implemented in artifact-chain-assistant**: starter templates, review checklists, bootstrap
239
+ recommendations, and evidence-based adoption guidance.
240
+ 2. **Implemented in artifact-graph 0.3.0+**: config-driven indexing, graph traversal, `context`,
241
+ `packet`, `validate`, `version-lock`, and `extraFields` for any registered custom type.
242
+
243
+ ### What the Runtime Provides for Custom Types
244
+
245
+ Once a type is registered in `artifact-graph.config.yaml` with `paths` and optionally
246
+ `idPatterns`, the runtime delivers:
247
+
248
+ 1. **Scanning and frontmatter parsing**: Read `types.{type}.paths` from config; scan matching
249
+ files; parse frontmatter for `id`, `title`, `status` and other standard fields. Types without
250
+ configured paths are not indexed.
251
+ 2. **Graph edges**: Custom types participate in graph traversal through `related_<type>`
252
+ frontmatter fields, `@<type> <ID>` traceability comments, and explicit relationship fields.
253
+ 3. **Target selector**: `--target <type>:<id>` works with `context`, `packet`, `packet-prompt`,
254
+ and `audit` for any type that has `target: true` in config. The ID may contain colons; only the
255
+ first colon separates type from ID. There is **no** dynamic `--{type}` flag; `--target` is the
256
+ universal entry point.
257
+ 4. **Extra fields**: Declare `extraFields` in config to index specific frontmatter fields (string,
258
+ number, boolean, enum). Undeclared fields remain in raw frontmatter but are not indexed.
259
+ 5. **Validation**: Custom types participate in ID pattern checks, dangling relation warnings, orphan
260
+ artifact warnings, and version-lock freshness checks.
261
+ 6. **Version-lock**: Custom type artifacts and their traceability edges are included in
262
+ version-lock refresh, audit, and bootstrap.
263
+
264
+ ### Capability Matrix
265
+
266
+ | Capability | Core Types | Extended Types | Notes |
267
+ | --- | --- | --- | --- |
268
+ | File indexing and ID parsing | Implemented | Implemented via config `paths` + `idPatterns` | Types without configured paths are not indexed |
269
+ | Graph traversal (upstream/downstream) | Implemented | Implemented via `related_<type>` fields and traceability comments | Strength depends on traceability annotation density |
270
+ | context/packet assembly | Implemented (`--target <type>:<id>`) | Implemented (`--target <type>:<id>`) | `--target` is the universal entry; no dynamic `--{type}` flags |
271
+ | validate | Implemented | Implemented | ID pattern checks, dangling relations, orphan warnings, lock freshness |
272
+ | version-lock | Implemented | Implemented | Custom type edges included in refresh/audit/bootstrap |
273
+ | Artifact content quality judgment | No | No | artifact-graph does not judge "good PRD" or "good contract" |
274
+ | Built-in edge rules | No | No | All edge rules come from artifact content, not type metadata |
275
+
276
+ ### Known Limitations
277
+
278
+ - **Content quality not judged**: artifact-graph validates structure and traceability, not whether
279
+ an artifact's content is well-written or complete.
280
+ - **Sparse traceability annotations**: Custom artifacts without `related_*` frontmatter fields or
281
+ implementation traceability comments will produce weak graph relationships. Mitigation:
282
+ project-local review should require traceability fields.
283
+ - **ID pattern collisions**: Multiple types using the same ID pattern can cause ambiguous graph
284
+ edges. Mitigation: use distinct ID prefixes per type (e.g., `API-`, `CLI-`).
285
+ - **Path overlaps**: Multiple types whose path globs match the same files create duplicate graph
286
+ nodes. Mitigation: use mutually exclusive path globs.
287
+ - **Loosely-coupled ops artifacts**: Some types (e.g., `runbook`, `deployment_manifest`) may have
288
+ naturally loose links to the core requirement chain. This is expected behavior, not a defect.
289
+
290
+ ## Project Shape Profiles
291
+
292
+ Nine project profiles each map to a recommended starter set and a defer-until-ready list. Profiles
293
+ are used only during bootstrap — they are not a runtime concept. The final selection is written to
294
+ `artifact-graph.config.yaml`.
295
+
296
+ | Profile | Recommended Extended Types | Deferred Types |
297
+ | --- | --- | --- |
298
+ | Docs/planning repo | None | All extended types |
299
+ | TypeScript library or CLI | `cli_contract` | Other contracts, domain, ops |
300
+ | API service | `api_contract`, `data_contract` | `domain_model`, `deployment_manifest`, `runbook`, `performance_budget` |
301
+ | Enterprise Java/Spring/JVM | `api_contract`, `data_contract`, `integration_contract`, `batch_job_contract`, `domain_model`, `database_migration`, `security_review` | `deployment_manifest`, `runbook`, `performance_budget` |
302
+ | Desktop or full-stack app | `ui_contract`, `ipc_contract`, `api_contract` | `deployment_manifest`, `runbook` |
303
+ | Agent or plugin toolkit | `agent_skill`, `hook_policy`, `prompt_packet` | Other extended types |
304
+ | Parent or release governance repo | `release_policy`, `publish_skill`, `oss_compliance` | Other extended types |
305
+ | Existing mature artifact repo | As-needed based on existing files | Types without local evidence |
306
+ | Small first-time project | None | All extended types |
307
+
308
+ ## Related Documents
309
+
310
+ - [README](README.md) — Plugin overview with full feature list
311
+ - [INSTALL.md](INSTALL.md) — Installation, bootstrap flow, and profile expansion guide
312
+ - [ADOPTION-GUIDE](https://github.com/ifoohoo/artifact-chain-assistant/blob/main/templates/extended/ADOPTION-GUIDE.md) — Step-by-step template adoption and upgrade review guide
@@ -0,0 +1,289 @@
1
+ # 扩展制品目录
2
+
3
+ [English](EXTENDED-ARTIFACT-CATALOG.md)
4
+
5
+ 本文档汇总 `artifact-chain-assistant` 的扩展制品类型目录,内容包括类型分类、推荐路径与 ID 模式、
6
+ 模板采用规则,以及 `artifact-graph`、插件与目标项目之间的三层权威边界。
7
+
8
+ 核心制品类型(`feature`、`scenario`、`decision`、`design`、`test`、`e2e_test`)见插件 README 和
9
+ INSTALL.md。本文档只介绍核心集合之外的可选类型。
10
+
11
+ ## 三层权威模型
12
+
13
+ | 层级 | 权威范围 | 对扩展制品的职责 |
14
+ |------|---------|-----------------|
15
+ | **artifact-graph** | 确定性图能力 | 从 config 读取类型定义,索引制品,提供 context/packet/validate。**不内置扩展类型的默认路径或 ID 模式。** 未配置路径的类型不会被索引。 |
16
+ | **artifact-chain-assistant** | 通用助手指导 | 提供扩展制品的入门模板、profile 建议和通用审查清单。**模板是指导,不是权威。** 项目本地模板和审查技能覆盖插件建议。 |
17
+ | **目标项目** | 最终工作法 | 决定启用哪些扩展类型,维护 config、本地模板、审查技能和 ID 规则。**项目本地覆盖插件建议。** 随成熟度提升逐步启用新类型。 |
18
+
19
+ ## 扩展制品类型目录
20
+
21
+ 扩展类型按四个类别组织。每类制品包含推荐路径、ID 模式、生命周期规则和审查要点。所有推荐值
22
+ 均为**指导**——项目的 `artifact-graph.config.yaml` 才是最终权威。
23
+
24
+ ### 一、契约类制品
25
+
26
+ 契约类制品记录系统边界上的接口约定。需求从功能、场景流向实现时,契约是上下文组装的关键上游制品。
27
+
28
+ | 制品类型 | 推荐路径 | 推荐 ID 模式 | 生命周期 | 审查要点 |
29
+ |---------|---------|-------------|---------|---------|
30
+ | `api_contract` | `artifacts/contracts/api/` | `API-{nnn}` 或 `{service}-API-{version}` | API 变更时创建/更新;废弃 API 时标记 deprecated | 与实现代码一致、覆盖错误码、版本兼容、请求/响应 schema 完整性 |
31
+ | `cli_contract` | `artifacts/contracts/cli/` | `CLI-{nnn}` 或 `{tool}-CLI-{version}` | CLI 接口变更时创建/更新 | 命令签名、参数类型、退出码、向后兼容、帮助文本准确性 |
32
+ | `ui_contract` | `artifacts/contracts/ui/` | `UI-{nnn}` | UI 流程变更时创建/更新 | 交互流程、状态转换、可访问性、错误状态覆盖 |
33
+ | `ipc_contract` | `artifacts/contracts/ipc/` | `IPC-{nnn}` | IPC 通道变更时创建/更新 | 消息格式、错误传播、前后端边界、序列化兼容 |
34
+ | `data_contract` | `artifacts/contracts/data/` | `DATA-{nnn}` | 数据模型/schema 变更时创建/更新 | 字段含义、版本兼容、迁移路径、默认值语义 |
35
+ | `report_contract` | `artifacts/contracts/report/` | `RPT-{nnn}` | 报告格式变更时创建/更新 | 字段含义、聚合逻辑、输出格式、时间窗口语义 |
36
+ | `integration_contract` | `artifacts/contracts/integration/` | `INT-{nnn}` | 外部系统集成变更时创建/更新 | 接口协议、超时、重试策略、幂等性、错误分类 |
37
+ | `batch_job_contract` | `artifacts/contracts/batch/` | `BATCH-{nnn}` | 批处理作业变更时创建/更新 | 输入/输出格式、调度表达式、幂等性、错误处理、重放策略 |
38
+
39
+ ### 二、领域与数据制品
40
+
41
+ 领域与数据制品记录业务概念和技术数据模型,是企业 Java 和 DDD 项目的核心制品。
42
+
43
+ | 制品类型 | 推荐路径 | 推荐 ID 模式 | 生命周期 | 审查要点 |
44
+ |---------|---------|-------------|---------|---------|
45
+ | `domain_model` | `artifacts/domain/` | `DM-{nnn}` 或实体名 | 领域概念变更时创建/更新 | 聚合边界、领域事件、限界上下文映射、不变量定义 |
46
+ | `database_migration` | `artifacts/migrations/` | `MIG-{nnn}` 或时间戳(如 `20260709-001`) | schema 变更时创建;上线后标记已执行 | 回滚路径、数据兼容性、性能影响、大表变更策略 |
47
+
48
+ ### 三、部署与运维制品
49
+
50
+ 部署与运维制品覆盖生产环境的变更、安全、性能和操作流程。项目具备对应运维流程时才启用。
51
+
52
+ | 制品类型 | 推荐路径 | 推荐 ID 模式 | 生命周期 | 审查要点 |
53
+ |---------|---------|-------------|---------|---------|
54
+ | `deployment_manifest` | `artifacts/deploy/` | `DEP-{nnn}` 或环境名(如 `DEP-prod`) | 部署配置变更时创建/更新 | 环境差异、回滚策略、资源限制、健康检查配置 |
55
+ | `security_review` | `artifacts/security/` | `SEC-{nnn}` | 安全审查周期或重大变更时创建/更新 | 威胁模型覆盖、修复状态跟踪、合规映射、敏感数据处理 |
56
+ | `performance_budget` | `artifacts/performance/` | `PERF-{nnn}` | 性能目标变更时创建/更新 | 指标基线、阈值定义、回归检测策略、测量方法 |
57
+ | `migration_plan` | `artifacts/migrations/plan/` | `MPLAN-{nnn}` | 迁移启动时创建;每阶段完成时更新 | 阶段划分、回滚点定义、数据验证策略、并行运行期 |
58
+ | `runbook` | `artifacts/runbooks/` | `RUN-{nnn}` | 运维流程变更时创建/更新 | 步骤准确性、告警关联、责任人、最近执行日期 |
59
+
60
+ ### 四、发布治理制品
61
+
62
+ 发布治理制品覆盖版本策略、发布工作流和开源合规。仅父工程、发布治理仓库或自身负责发布流程的多包 monorepo 才启用。
63
+
64
+ | 制品类型 | 推荐路径 | 推荐 ID 模式 | 生命周期 | 审查要点 |
65
+ |---------|---------|-------------|---------|---------|
66
+ | `release_policy` | `artifacts/governance/` | `RP-{nnn}` | 发布策略变更时创建/更新 | 版本语义、发布节奏、分支策略、变更日志规范、回滚计划 |
67
+ | `publish_skill` | `artifacts/governance/` | `PS-{nnn}` | 发布工作流变更时创建/更新 | 发布目标、质量门禁、合规检查、错误处理、回滚计划 |
68
+ | `oss_compliance` | `artifacts/governance/` | `OSS-{nnn}` | 开源合规规则或发布范围变更时创建/更新 | 许可证策略、依赖审计、标准文件、安全披露、发布排除规则 |
69
+
70
+ ### 五、Agent 与 Hook 制品
71
+
72
+ Agent 与 Hook 制品覆盖 AI 辅助工作流和 CI/CD 门禁。项目存在对应文件或流程时才启用。
73
+
74
+ | 制品类型 | 推荐路径 | 推荐 ID 模式 | 生命周期 | 审查要点 |
75
+ |---------|---------|-------------|---------|---------|
76
+ | `agent_skill` | `artifacts/skills/` | `SKILL-{nnn}` | 技能定义变更时创建/更新 | 输入/输出契约、工具依赖、权限边界、错误处理 |
77
+ | `hook_policy` | `artifacts/policies/` | `HOOK-{nnn}` | hook 策略变更时创建/更新 | 触发条件、门禁规则、绕过审批流程、审计日志 |
78
+ | `prompt_packet` | `artifacts/packets/` | `PP-{nnn}` | prompt 模板或上下文组装规则变更时创建/更新 | 上下文来源、prompt 清晰度、token 预算、输出契约、可测试性 |
79
+
80
+ ## Bootstrap 裁剪策略
81
+
82
+ bootstrap 的职责是按项目形态选出**最小可用 profile**,而不是启用所有已知类型。
83
+
84
+ 裁剪规则:
85
+
86
+ 1. **基础集合始终启用**:`feature`、`scenario`、`decision`、`design`、`test`、`e2e_test`。
87
+ 2. **契约类按证据加入**:项目本地存在对应的接口文件(如 OpenAPI spec、CLI 入口、IPC 通道定义)才启用。
88
+ 3. **领域与数据类按项目形态加入**:企业 Java/DDD 项目可启用 `domain_model`;使用数据库的项目可启用 `database_migration`。
89
+ 4. **运维类按运维流程加入**:项目有部署配置、安全审查流程或运维手册,才启用对应类型。
90
+ 5. **Agent/Hook 类按本地文件加入**:项目存在 `skills/`、`policies/` 或 hook 配置文件才启用。
91
+ 6. **发布治理类按治理证据加入**:项目存在发布策略、发布脚本或开源合规流程时,才启用 `release_policy`、`publish_skill`、`oss_compliance`。
92
+ 7. **渐进扩展**:项目成熟度提升后,可按需在 `artifact-graph.config.yaml` 中新增类型,已有制品和追溯关系不受影响。
93
+
94
+ bootstrap 执行后,启用的类型、路径和 ID 模式记录在 `artifact-graph.config.yaml` 中;延后启用的
95
+ 类型及其证据条件记录在项目制品目录中,让日后的扩展有据可查。
96
+
97
+ ## 模板采用
98
+
99
+ ### 模板来源规则
100
+
101
+ 1. **插件模板是入门指导**。`artifact-chain-assistant` 在 `templates/extended/` 下为每种扩展类型
102
+ 提供 starter 模板,按类别组织(`contracts/`、`domain/`、`ops/`、`agent/`)。插件模板不决定
103
+ 项目的制品形态。
104
+ 2. **项目本地模板是权威**。项目需要不同的章节结构、审查标准或命名规则时,本地模板覆盖插件模板。
105
+ 3. **无模板时的回退**。项目启用了某扩展类型但没有本地模板时,助手可以引用插件 starter,但必须
106
+ 提示用户该模板尚未按项目定制。
107
+ 4. **采用流程**。把 starter 模板从 `templates/extended/` 复制到项目本地的 `artifacts/templates/`
108
+ 或等价位置,定制后即成为项目权威。
109
+
110
+ ### 模板生命周期
111
+
112
+ 1. **Bootstrap 阶段**:bootstrap 技能引用插件 starter 模板生成初始制品结构,模板来源记录在
113
+ `artifacts/README.md` 中。
114
+ 2. **采用阶段**:团队审阅 starter 模板,决定各章节保留、修改还是删除,再复制到本地。定制后的
115
+ 版本成为权威。
116
+ 3. **成熟阶段**:项目本地维护完整的模板库,只在新成员上手或启用新类型时才参考插件 starter。
117
+ 4. **升级评审**:插件更新 starter 时,项目审查 diff,有选择地合入有用变更,保留本地定制。
118
+
119
+ ### 模板目录布局
120
+
121
+ ```
122
+ templates/
123
+ core/ # 核心制品模板
124
+ feature/
125
+ starter.md # 起草指引模板
126
+ review-checklist.md # 通用审查清单
127
+ scenario/
128
+ starter.md
129
+ review-checklist.md
130
+ decision/
131
+ starter.md
132
+ review-checklist.md
133
+ design/
134
+ starter.md
135
+ review-checklist.md
136
+ test/
137
+ starter.md
138
+ review-checklist.md
139
+ e2e_test/
140
+ starter.md
141
+ review-checklist.md
142
+ extended/ # 扩展制品模板(按类别组织)
143
+ contracts/
144
+ api_contract/
145
+ starter.md
146
+ review-checklist.md
147
+ cli_contract/
148
+ starter.md
149
+ review-checklist.md
150
+ data_contract/
151
+ starter.md
152
+ review-checklist.md
153
+ ... # 其他契约类型同构
154
+ domain/
155
+ domain_model/
156
+ starter.md
157
+ review-checklist.md
158
+ database_migration/
159
+ starter.md
160
+ review-checklist.md
161
+ ops/
162
+ deployment_manifest/
163
+ starter.md
164
+ review-checklist.md
165
+ runbook/
166
+ starter.md
167
+ review-checklist.md
168
+ ...
169
+ governance/
170
+ release_policy/
171
+ starter.md
172
+ review-checklist.md
173
+ publish_skill/
174
+ starter.md
175
+ review-checklist.md
176
+ oss_compliance/
177
+ starter.md
178
+ review-checklist.md
179
+ agent/
180
+ agent_skill/
181
+ starter.md
182
+ review-checklist.md
183
+ hook_policy/
184
+ starter.md
185
+ review-checklist.md
186
+ prompt_packet/
187
+ starter.md
188
+ review-checklist.md
189
+ ```
190
+
191
+ 每个类型的 `starter.md` 包含制品结构模板和最基本的填写指引,`review-checklist.md` 是通用审查
192
+ 要点的基线。两者都只是建议,项目本地可以完全覆盖。
193
+
194
+ ## 按证据启用
195
+
196
+ bootstrap 只在本地文件或目录确实存在时才启用扩展制品类型:
197
+
198
+ | 制品类型 | 启用证据 |
199
+ |---------|---------|
200
+ | `api_contract` | 存在 OpenAPI/Swagger 规范、API 文档或 REST 端点代码 |
201
+ | `cli_contract` | 存在 CLI 入口代码或命令定义 |
202
+ | `data_contract` | 存在数据模型定义或 schema 文件 |
203
+ | `domain_model` | 存在 DDD 聚合、实体或值对象代码 |
204
+ | `database_migration` | 存在数据库 schema 或迁移脚本 |
205
+ | `security_review` | 存在安全审查流程、安全相关代码或 Spring Security 配置 |
206
+ | `performance_budget` | 存在性能测试脚本、监控配置或性能基线文档 |
207
+ | `migration_plan` | 存在迁移规划文档、架构演进方案或系统过渡计划 |
208
+ | `runbook` | 存在运维流程或操作手册 |
209
+ | `deployment_manifest` | 存在部署配置(K8s、Docker 等) |
210
+ | `agent_skill` | 存在 Agent 技能定义文件 |
211
+ | `hook_policy` | 存在 CI/CD hook 配置 |
212
+ | `prompt_packet` | 存在 prompt 模板文件、上下文组装配置或 AI 工作流定义 |
213
+ | `release_policy` | 存在发布策略文档、版本策略或发布流程文件 |
214
+ | `publish_skill` | 存在发布脚本、CI/CD 发布流水线或注册中心配置 |
215
+ | `oss_compliance` | 存在许可证文件、依赖审计配置或开源合规流程文档 |
216
+
217
+ **规则**:本地证据存在才启用对应类型,不要因为插件提供了模板就启用。
218
+
219
+ ## artifact-graph 对自定义类型的运行时支持
220
+
221
+ 从 `artifact-graph` 0.3.0 起,配置驱动的自定义类型获得了完整的运行时支持。扩展制品目录分为
222
+ 两个层次:
223
+
224
+ 1. **artifact-chain-assistant 已实现**:starter 模板、审查清单、bootstrap 推荐和按证据启用指导。
225
+ 2. **artifact-graph 0.3.0+ 已实现**:对任意注册的自定义类型,提供配置驱动的索引、图遍历、
226
+ `context`、`packet`、`validate`、`version-lock` 和 `extraFields` 支持。
227
+
228
+ ### 运行时为自定义类型提供的能力
229
+
230
+ 在 `artifact-graph.config.yaml` 中注册类型(`paths` 和可选的 `idPatterns`)后,运行时提供以下能力:
231
+
232
+ 1. **扫描与 frontmatter 解析**:读取 `types.{type}.paths`,扫描匹配文件,解析 frontmatter,提取
233
+ `id`、`title`、`status` 等标准字段。未配置路径的类型不会被索引。
234
+ 2. **图边建立**:自定义类型可通过 `related_<type>` frontmatter 字段、`@<type> <ID>` 追溯注释和
235
+ 显式关系字段参与图遍历。
236
+ 3. **Target 选择器**:`--target <type>:<id>` 可用于 `context`、`packet`、`packet-prompt` 和 `audit`
237
+ 命令,适用于 config 中标记了 `target: true` 的任意类型。ID 可以包含冒号,只有第一个冒号用于
238
+ 分隔类型和 ID。注意:**没有**动态的 `--{type}` flag,`--target` 是通用入口。
239
+ 4. **额外字段**:在 config 中声明 `extraFields`,即可索引指定的 frontmatter 字段(string、number、
240
+ boolean、enum)。未声明的字段仍留在原始 frontmatter 中,但不会被索引。
241
+ 5. **验证**:自定义类型同样参与 ID 模式检查、悬空关系警告、孤立制品警告和版本锁新鲜度检查。
242
+ 6. **版本锁**:自定义类型的制品及其追溯边会纳入 version-lock 的 refresh、audit 和 bootstrap。
243
+
244
+ ### 能力矩阵
245
+
246
+ | 能力 | 核心类型 | 扩展类型 | 说明 |
247
+ |------|---------|---------|------|
248
+ | 文件索引和 ID 解析 | 已实现 | 通过 config `paths` + `idPatterns` 实现 | 未配置路径的类型不会被索引 |
249
+ | 图遍历(上游/下游) | 已实现 | 通过 `related_<type>` 字段和追溯注释实现 | 强度取决于追溯注释密度 |
250
+ | context/packet 组装 | 已实现(`--target <type>:<id>`) | 已实现(`--target <type>:<id>`) | `--target` 是通用入口;没有动态 `--{type}` flag |
251
+ | validate | 已实现 | 已实现 | ID 模式检查、悬空关系、孤立制品、锁新鲜度 |
252
+ | version-lock | 已实现 | 已实现 | 自定义类型边纳入 refresh/audit/bootstrap |
253
+ | 制品内容质量判断 | 不做 | 不做 | artifact-graph 不判断"好 PRD"或"好契约" |
254
+ | 内置边规则 | 不做 | 不做 | 所有边规则来自制品内容,不来自类型元数据 |
255
+
256
+ ### 已知限制
257
+
258
+ - **不判断内容质量**:artifact-graph 验证的是结构和追溯性,不判断制品内容写得好不好、完不完整。
259
+ - **追溯注释稀疏**:自定义制品缺少 `related_*` frontmatter 字段,或实现文件缺少追溯注释时,图
260
+ 遍历得到的关系会比较弱。缓解办法:项目本地审查中强制要求追溯字段。
261
+ - **ID 模式冲突**:多个类型使用相同的 ID 模式,可能产生有歧义的图边。缓解办法:每个类型使用
262
+ 不同的 ID 前缀(如 `API-`、`CLI-`)。
263
+ - **路径重叠**:多个类型的路径 glob 匹配到相同文件,会产生重复的图节点。缓解办法:使用互斥的
264
+ 路径 glob。
265
+ - **运维制品关联本就松散**:某些类型(如 `runbook`、`deployment_manifest`)与核心需求链的联系
266
+ 天然较弱。这是预期行为,不是缺陷。
267
+
268
+ ## 项目形态 Profile
269
+
270
+ 九种项目形态各自对应一套推荐的 starter 集合和延后启用列表。Profile 只在 bootstrap 阶段使用,
271
+ 不是运行时概念;最终选择会写入 `artifact-graph.config.yaml`。
272
+
273
+ | 项目形态 | 推荐启用的扩展类型 | 延后启用的类型 |
274
+ |---------|------------------|-------------|
275
+ | 文档/规划仓库 | 无 | 所有扩展类型 |
276
+ | TypeScript 库或 CLI | `cli_contract` | 其他契约、领域、运维 |
277
+ | API 服务 | `api_contract`、`data_contract` | `domain_model`、`deployment_manifest`、`runbook`、`performance_budget` |
278
+ | 企业级 Java/Spring/JVM | `api_contract`、`data_contract`、`integration_contract`、`batch_job_contract`、`domain_model`、`database_migration`、`security_review` | `deployment_manifest`、`runbook`、`performance_budget` |
279
+ | 桌面/全栈应用 | `ui_contract`、`ipc_contract`、`api_contract` | `deployment_manifest`、`runbook` |
280
+ | Agent/插件工具包 | `agent_skill`、`hook_policy`、`prompt_packet` | 其他扩展类型 |
281
+ | Parent/发布治理仓库 | `release_policy`、`publish_skill`、`oss_compliance` | 其他扩展类型 |
282
+ | 已有成熟制品仓库 | 按现有文件按需启用 | 无本地证据的类型 |
283
+ | 首次尝试的小型项目 | 无 | 所有扩展类型 |
284
+
285
+ ## 相关文档
286
+
287
+ - [README](README.md) — 插件概览与完整功能列表
288
+ - [INSTALL.md](INSTALL.md) — 安装、bootstrap 流程和 profile 扩展指南
289
+ - [ADOPTION-GUIDE](https://github.com/ifoohoo/artifact-chain-assistant/blob/main/templates/extended/ADOPTION-GUIDE.md) — 模板采用和升级评审的分步指南