[← Ref](/ref/)  |  [Docs](/docs/workflow-audit.htm)  |  [Portal](/portal/)  |  [Playground](/playground/)  |  [Home](/)

# workflow_audit notes v0

このメモは、`workflow_audit` テンプレートを短く読むための補助資料です。
この JSON は **`POST /v1/receipts` 用の request template** であり、発行済み receipt そのものではありません。

## 1. Recommended sample

推奨する concrete sample は、承認フローの handoff / approval を想定した publish-safe な例です。

```json
{
  "receipt_kind": "workflow_audit",
  "input_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
  "output_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
  "params_hash": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
  "env_hash": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
  "code_ref": "git:example/repo@main#workflow_audit_v0",
  "run_id": "wf_20260325_080000",
  "tags": {
    "event_type": "approval",
    "artifact_type": "document",
    "workflow_stage": "final",
    "actor_role": "reviewer",
    "event_at": "2026-03-25T08:00:00Z",
    "template_version": "workflow_audit_v0",
    "audit_scope": "minimal"
  }
}
```

## 2. Why this shape

- `created_at` は receipt 発行時刻で、RunProof が発行後に付与します。
- `tags.event_at` は業務イベント時刻で、利用者申告または上位システム時刻です。
- `tags` は **object map が正**で、表示時のみ `key=value` のように読ませます。
- `input_hash` / `output_hash` / `params_hash` / `env_hash` を分けることで、対象・結果・条件・環境を最小情報で説明しやすくします。

## 3. What not to include

次の情報は、このテンプレートに直接入れないことを推奨します。

- 実社員名
- 実メール
- 実内部承認ID
- 内部 URL
- 機密メモ全文
- PII や秘密情報
- 添付本文やコメント全文

## 4. Minimal NG example

```json
{
  "tags": {
    "event_at": "2026-03-26T10:00:00Z",
    "employee_id": "<real internal id should not be included>",
    "internal_ticket": "<real internal ticket should not be included>",
    "private_url": "<internal url should not be included>"
  }
}
```

- 実内部IDを避けます。
- 内部 URL を避けます。
- 実在識別子ではなく `actor_role` / `workflow_stage` / `event_type` を優先します。


## Next steps

- 意味の説明に戻る → [Docs](/docs/workflow-audit.htm)
- 実際の検証結果を見る → [Portal](/portal/)
- 発行を試す → [Playground](/playground/)
- 入口に戻る → [Home](/)
