跳至內容
瀏覽文件

Markdown

九類文件使用 YAML 前置資料命名空間:

---
langdrift:
  type: prd
  schema_version: 1
  id: PRD-001
  title: Product Vision dashboard
  owners: [user_42]
  research: [RES-002]
  vision_targets: [VT-001]
---
 
# Product Vision dashboard
 
Rich Markdown context remains in the body.

解析後的酬載為:

{
  metadata: ArtifactMetadata
  body: string
}

type、schema_version、id、title 和 owners 為必填。 ID 是不含空白字元的非空字串;owners 是識別碼,而非內嵌的使用者個人資料。

選用的結構化中繼資料包含:

  • description、summary、status、scope 和 tags
  • deciders、questions 和時間戳記
  • research、prds、specs 和 vision_targets 等具型別的關係陣列
  • 一般的 references、supersedes 和 superseded_by
  • external 供應商身分

langdrift 內的未知欄位會遭拒絕。 langdrift 命名空間之外的根層級 YAML 不是協定中繼資料,parseArtifact 會忽略它。

剖析器規則

除了選用的 UTF-8 位元組順序記號外,檔案必須以前置資料分隔符開頭。 剖析器會拒絕格式錯誤的 YAML、自訂標籤、重複鍵、別名,以及不符合結構定義的中繼資料。

本文緊接在結束分隔符之後。 Unicode 和原始換行格式會保留,本文文字不會執行。 標題、文字敘述和檔名不會提供身分或補足缺少的中繼資料;關係也只取自結構化中繼資料。

Record 和 Drift Event 封套不使用此 Markdown 包裝。 它們直接從 JSON 驗證。

在 GitHub 編輯此頁