Skip to main content

Artifact 对象

Artifact 是一次 AI 工作留下的可审查产物。它可以是文档、代码、diff、报告、评审意见、决策记录、测试结果或导出的 Profile。 Artifact 让 Run 不只停留在聊天记录里。

spec 字段

字段要求说明
type必填产物类型,例如 markdowndiffprofiledecision-notes
runRef推荐产物来自哪个 Run。
stage可选产物来自哪个 stage。
contentRef可选指向文件、对象存储、git blob 或外部 URL。
summary可选产物摘要。
hash推荐内容 hash,用于复盘和完整性校验。
review可选审查状态。

最小示例

apiVersion: huoban.dev/v1alpha1
kind: Artifact
metadata:
  name: idea-review-notes
spec:
  type: decision-notes
  runRef:
    name: idea-to-spec-review-20260623
  stage: sharpen-idea
  contentRef:
    type: file
    path: artifacts/idea-review.md
  hash: sha256:...
  review:
    status: pending

status

常见 conditions:
  • ArtifactProduced
  • ArtifactIndexed
  • ArtifactReviewed
  • ArtifactRejected

设计约束

Artifact 对象不一定内联大段内容。大内容应通过 contentRef 引用,避免 status 或 Run 对象膨胀。