オプション
家家 Skill ドキュメント shipping-artifacts

shipping-artifacts

phuryn/pm-skills phuryn/pm-skills

アーキテクチャ、権限、シークレット、テストカバレッジマップなどの情報をAIで構築されたアプリに記録し、リリース前にレビュー可能な状態にします。

...すべて拡張します
0
更新された時間 2026年9月29日

アーティファクトの送信:AIが生成したコードをレビュー可能にするドキュメント

目的

AIエージェントはコードを高速に記述しますが、意図(システムが何を行うべきか、誰が何を許可されているか、機密情報がどこにあるか、どのルールが実際に検証されているか)に関する永続的な記録を残しません。 その記録がなければ、人間(および監査エージェント)の誰一人として、そのコードを安全にリリースできるかどうかを判断することはできません。このスキルは、レビュー可能性を回復させる少数のドキュメント群を定義するものです。

これらのドキュメントは/documentation/ディレクトリに格納され、人間のレビュー担当者と次期AIコーディングエージェントという2つの読者向けに作成されています。これらは、その後のあらゆる監査において「意図された状態」を示す要素であり、セキュリティやパフォーマンスのレビューは、コードと比較できる意図の明確さに比例してその価値が決まります。

セットの構成方法

この一連のドキュメントは固定されたリストではありません。少数のコアドキュメントに加え、その機能が存在する場合にのみ追加する条件付きドキュメントで構成されています。

  • 中核ドキュメント— レビュー可能なアプリにはすべてこれらの要素があるため、常に作成する必要があります。
  • 条件付きドキュメント— アプリに実際にその機能がある場合にのみ含めます。機能がない場合は、空のドキュメントを無理に作成するのではなく、architecture.mdに一行記述してください(「スケジュールされた作業なし —cron.md なし」)。 レビュー可能性は、正直なマップから生まれます。「Xは行わない」という記述も、そのマップの一部です。
  • ほとんどのドキュメントは、/document-app によってコードからリバースエンジニアリングされます。唯一の例外はtests.md で、これは/derive-testsによって他のドキュメントから派生されます。これは検証マップであり、サブシステムの説明ではありません。

偏執的になることなく、現状について容赦なく正直に記述してください。この作業の目的は正確なマップを作成することであり、問題がないと断言することではありません。各ドキュメントは短く、表や箇条書きを多用し、一般的な理論は省略します。

中核となるドキュメント

各エントリ:ファイル名 · 1行の目的 · 記載すべき内容 · レビュー担当者がそれをどのように活用するか。

  1. architecture.md— システムが何であり、どのように構成されているか。

    • 記載すべき内容:製品の概要+主要な仮定;技術スタック;認証/セッション/クレームのエンドツーエンドの流れ; 信頼境界(例:サービス・ロール対クライアント);「既知のリスク/仮定」の簡潔なリスト(各項目は一般的なチェックリストではなく、コード内の出現箇所を根拠とする);作成された他のすべてのドキュメントを網羅した「関連ドキュメント」インデックス。
    • レビュー担当者の利用方法:ルートドキュメント — 他のすべてのドキュメントはここから相互参照されます。
  2. flows.md— 権限と副作用が実際に発動されるジャーニー。

    • 必ず記載すべき事項:各主要フローを「アクター+前提条件+成功時の結果」として記述すること;UI → サーバー → データ → ジョブ → プロバイダー → エージェントにわたる段階的なシーケンス;各保護ステップにおける認証チェック(どのクレーム/ロール/スコープが、どのリソースに対して適用され、どのような拒否ケースが想定されるか);信頼境界の越え(ブラウザ→サーバー、サーバー→プロバイダー、ジョブ→アプリ、エージェント→ツール、ウェブフック→アプリ);各ステップが引き起こす状態変化と副作用(書き込み、キューに入れられたメール、トリガーされたジョブ、外部への呼び出し)。
    • レビュー担当者の活用:静的なpermissions.mdマトリックスでは示せない実行時の状況 —どこで、どのような順序で認可が適用され、どこでスキップ可能か。
    • PRD(製品要件定義書)に対するルール:権限、データの整合性、外部への副作用、金銭、プライバシー、または運用上の安全性に一切関与しないフローは、ここには含まれない。これはセキュリティ/運用マップであり、機能仕様書ではない。
  3. permissions.md— 誰が何を許可されているか。

    • 必ず記載すべき事項:ロール/クレーム;スコープの導出元(トークン対DB);リソース×操作×ロールのマトリックス;どのテーブルに行レベルセキュリティが適用され、どのテーブルがコードによるチェックに依存しているか。
    • レビュー担当者の用途:アクセス制御監査においてコードと比較する基準となるものです。flows.mdは動的な動作を示していますが、こちらは静的な参照資料です。
  4. variables.md— 設定とシークレット、リスクとの対応関係。

    • 記載必須事項:名前・使用先・スコープ(サーバー/クライアント)・ソース・ローテーション・リスクの表;クライアント側にシークレットがバンドルされていないことの明示的な確認;本番稼働前のチェックリスト。
    • レビュー担当者の用途:機密情報や個人識別情報(PII)の漏洩リスク領域、およびインシデント対応時のローテーション計画。
  5. tests.md— 検証マップ:文書化されたルールのうち、実際にチェックされているもの、提案されているだけのも、何もチェックされていないものを示します。

    • マップが誤って「緑」と表示されないよう、以下の3つの明確に区別されたセクションに必ず記載すること:
      • 既存のカバレッジ—現在リポジトリにあるテスト。それぞれが指定するルールに紐付けられている(マップが単なる「希望リスト」ではなく、現実を反映するようにするため)。
      • 提案中のテスト— まだ実装されていない推奨ケース。テストタイプ(自動化されたユニット/統合テスト、ガード付き実稼働環境、手動レビュー)ごとに分類。
      • ギャップ— 検証が全く行われていない文書化されたルール。これらに違反した場合に何が露呈するかという観点で優先順位付けされたもの。
    • 各行には以下の情報が含まれます:ユースケース → ルール → 期待される動作(拒否/ネガティブケースを含む) → 根拠のソース(ドキュメント+コード) → ステータス(既存/提案中/なし)。また、どのチェックがCIで必須であり、mainへのマージをゲートするかも明記します。
    • レビュー担当者向け用途:「文書化済み == 実装済み」という運用上の形 — 他のドキュメントで主張されている各ルールが、現時点で実際にテストによって裏付けられているか、提案のみか、あるいは未検証かを示します。
    • /document-app ではなく/derive-testsによって生成されます。これは、サブシステムから読み取るのではなく、他のドキュメントや既存のテストスイートから導出されるためです。

条件付きドキュメント(機能が存在する場合にのみ含める)

  1. emails.md— システムが送信するすべての通知。アプリがトランザクションメールや自動メールを送信する場合にのみ含める。

    • 必ず記載すべき事項:キュー → プロセッサ → プロバイダのパス、テンプレートおよびそれらが受け入れる変数、リトライ/バックオフの挙動、送信に失敗した際の確認先。
    • レビュー担当者の活用方法:検証されていないテンプレート入力や、個人識別情報(PII)の漏洩リスクの境界を特定する。
  2. cron.md— すべてのスケジュールされた処理と、それらを安全に運用する方法。スケジュールされたジョブやバックグラウンドジョブが存在する場合にのみ含める。

    • 記載必須事項:インベントリ表(ジョブ → スケジュール → 関数 → シークレット → 制限 → リトライ);各ジョブがいかにして冪等性を維持しているか;内部呼び出しの認証方法;直近の実行履歴の確認場所。
    • レビュアーの用途:偽造可能なトリガーや制限のないバックグラウンドジョブの発見。
  3. seo.md— シングルページアプリケーションがSEOおよびソーシャルプレビューをどのように処理するか。公開済み/インデックス登録可能、またはボット向けのルートがある場合にのみ含める。

    • 記載必須事項:プレビューの手法(静的メタデータ/プリレンダリング/エッジHTML);ルート → SEO要件 → 公開データ限定の対応表;動的メタデータのサニタイズ方法;ボットと人間のルーティングの区別。
    • レビュアーの用途:公開データ限定ルールの違反や、ボット向けルートにおけるメタデータ注入の検出。
  4. automation.md— 組み込みエージェントおよびその他の自動化パス。アプリに AI エージェント、LLM ワークフロー、ツール呼び出し、Webhook、または外部自動化が組み込まれている場合にのみ含める。

    • 自動化/エージェントごとに、以下を必ず特定すること:トリガー+所有者+自動実行か承認後のみ実行か; 読み取り可能な入力と、呼び出し可能な具体的なツール/API(ツールの利用範囲自体が厳格なガードレールとなる);制御の所在(プロンプト)と、プロンプト以外の厳格なガードレール;アプリへの出力契約(スキーマ、検証、エラー処理);アプリ側の副作用とエージェント側の提案の区別;および制御機能 — 承認ゲート、監査/タイムラインのログ記録、レート制限、再試行、キルスイッチ。
    • レビューアによる活用:隠れた自動化の経路を可視化し、エージェントが提案する内容とアプリが強制する内容との境界線を明確にする――これは、現代のAI構築型アプリにおいて最もリスクの高い領域である。

注記

  • 生成された各ドキュメントは、architecture.mdの「関連ドキュメント」セクションに自身への参照を追加するため、一連のドキュメントが常に発見可能になります。
  • 該当しない条件付きドキュメントはスキップし、無理にコンテンツを作り出すのではなく、一行でその旨を明記してください。
  • 例や完成済みのテンプレートはこれらのドキュメントには含めないでください。これらはこのシステムを説明するものであり、一般的な手法を説明するものではありません。
  • エージェントの運用コンテキストファイル(CLAUDE.md/AGENTS.md)は別の成果物であり、システムドキュメントではなく、これらのドキュメントから導き出された指示書です。これは、ここではなく、引き継ぎステップで/ship-check によって生成されます。
  • tests.mdは/derive-tests によって生成され、それ以外は/document-app によって生成されます。
  • 「更新日」の行は含めないでください。ファイルの履歴こそが真実の源です。
GitHubで見る
---
name: shipping-artifacts
description: Documents AI-built apps with architecture, permissions, secrets, and test coverage maps to make them reviewable before shipping.
---

# Shipping Artifacts: The Docs That Make AI-Built Code Reviewable

## Purpose

AI agents write code fast, but they leave no durable record of *intent* — what the system is supposed to do, who is allowed to do what, where the secrets live, which rules are actually verified. Without that record, no human (and no auditing agent) can tell whether the code is safe to ship. This skill defines the small set of documents that restore reviewability.

These docs live in `/documentation/` and are written for two readers: a human reviewer and the next AI coding agent. They are the **intended-state** half of every later audit — a security or performance review is only as good as the intent it can compare the code against.

## How the set is organized

The set is **not** a fixed list — it is a small **core** plus **conditional** docs you add only when the capability exists.

- **Core docs** — every reviewable app has these surfaces, so always produce them.
- **Conditional docs** — include one only if the app actually has that capability. If it doesn't, write a single line in `architecture.md` ("No scheduled work — no `cron.md`.") rather than inventing an empty document. Reviewability comes from an honest map, and "we don't do X" is part of the map.
- Most docs are reverse-engineered from code by `/document-app`. The one exception is `tests.md`, which is *derived from the other docs* by `/derive-tests` — it is the verification map, not a description of a subsystem.

Be brutally honest about the current state without being paranoid. The job is an accurate map, not a clean bill of health. Each doc is short, table-and-bullet heavy, and skips generic theory.

## Core documents

Each entry: file · one-line purpose · what it must capture · how a reviewer uses it.

1. **`architecture.md`** — what the system is and how it hangs together.
   - Must capture: product overview + key assumptions; tech stack; how auth/sessions/claims flow end to end; the trust boundaries (e.g. service-role vs. client); a short **Known risks / assumptions** list (each entry backed by where it shows up in the code, not a generic checklist); a "Related Documents" index of every other doc produced.
   - Reviewer use: the root document — everything else is cross-referenced from here.

2. **`flows.md`** — the journeys where permissions and side effects are actually exercised.
   - Must capture: each load-bearing flow as actor + precondition + success outcome; the step-by-step sequence across UI → server → data → jobs → providers → agents; the **authz check at each protected step** (which claim/role/scope, on which resource, and the expected *deny* case); the **trust-boundary crossings** (browser→server, server→provider, job→app, agent→tool, webhook→app); the state changes and side effects each step causes (writes, emails queued, jobs triggered, outbound calls).
   - Reviewer use: the runtime view a static `permissions.md` matrix can't show — *where* and *in what order* authorization is enforced, and where it can be skipped.
   - **Anti-PRD rule:** a flow that doesn't touch permissions, data integrity, external side effects, money, privacy, or operational safety does not belong here. This is a security/operations map, not a feature spec.

3. **`permissions.md`** — who is allowed to do what.
   - Must capture: roles/claims; where scope is derived (token vs. DB); a resource × operation × role matrix; which tables have row-level security and which rely on code-enforced checks.
   - Reviewer use: the baseline an access-control audit compares the code against. `flows.md` shows it in motion; this is the static reference.

4. **`variables.md`** — configuration and secrets, mapped to risk.
   - Must capture: a table of Name · used-by · scope (server/client) · source · rotation · risk; explicit confirmation that no secret is bundled client-side; a pre-go-live checklist.
   - Reviewer use: the secrets/PII-leak surface and the rotation plan during incident response.

5. **`tests.md`** — the verification map: which documented rules are actually checked, which are only proposed, and which are checked by nothing.
   - Must capture, in three clearly separated sections so the map can't read falsely green:
     - **Existing coverage** — tests that are in the repo *today*, each tied to the rule it pins (so the map reflects reality, not a wish-list).
     - **Proposed tests** — recommended cases not yet written, marked by **test type** (automated unit/integration · guarded live · manual review).
     - **Gaps** — documented rules with no verification at all, ranked by what crossing them exposes.
   - Each row carries: use-case → rule → expected behavior (including the deny/negative case) → evidence source (doc + code) → status (existing / proposed / none). It also notes which checks are CI-required and gate merges to `main`.
   - Reviewer use: the operational form of "documented == implemented" — it shows whether each rule the other docs claim is actually pinned by a test today, only proposed, or unverified.
   - Produced by `/derive-tests` (not `/document-app`), because it is derived from the other docs and the existing test suite rather than read off a subsystem.

## Conditional documents (include only when the capability exists)

6. **`emails.md`** — every notification the system sends. *Include only if the app sends transactional or automated email.*
   - Must capture: the queue → processor → provider path; templates and the variables they accept; retry/backoff behavior; where to look when a send fails.
   - Reviewer use: spotting unvalidated template inputs and PII exposure boundaries.

7. **`cron.md`** — all scheduled work and how to operate it safely. *Include only if scheduled or background jobs exist.*
   - Must capture: an inventory table (job → schedule → function → secrets → limits → retry); how each job stays idempotent; how internal calls authenticate; where to see last runs.
   - Reviewer use: finding forgeable triggers and unbounded background jobs.

8. **`seo.md`** — how a single-page app handles SEO and social previews. *Include only if there are public/indexable or bot-facing routes.*
   - Must capture: the preview approach (static meta / prerender / edge HTML); a route → needs-SEO → public-data-only table; how dynamic metadata is sanitized; bot-vs-human routing.
   - Reviewer use: catching public-data-only violations and metadata injection on bot routes.

9. **`automation.md`** — embedded agents and other automation paths. *Include only if the app embeds AI agents, LLM workflows, tool-calling, webhooks, or external automation.*
   - Must capture, per automation/agent: trigger + owner + whether it runs automatically or only after approval; the inputs it may read and the **exact tools/APIs it may call** (the tool surface is itself a hard guardrail); where **steering** lives (the prompt) vs. the **non-prompt hard guardrails**; the **output contract** back to the app (schema, validation, failure handling); **app-owned side effects vs. agent-owned suggestions**; and the controls — approval gates, audit/timeline logging, rate limits, retries, kill switch.
   - Reviewer use: makes hidden automation paths visible and draws the line between what an agent *proposes* and what the app *enforces* — the highest-risk surface in modern AI-built apps.

## Notes

- Each produced doc adds a reference to itself in `architecture.md` under a "Related Documents" section, so the set stays discoverable.
- Skip any conditional document that doesn't apply, and say so in one line rather than inventing content.
- Keep examples and finished templates out of these docs — they describe *this* system, not the general method.
- The agent operating-context file (`CLAUDE.md` / `AGENTS.md`) is a *different* artifact — instructions derived from these docs, not system documentation. It is produced at the handoff step by `/ship-check`, not here.
- `tests.md` is produced by `/derive-tests`; the rest are produced by `/document-app`.
- Do not include an "updated date" line; the file's history is the source of truth.

すべてのファイル

1件のファイル

shipping-artifactsをインストール

スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。

ZIPをダウンロード

リポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。

git clone https://github.com/phuryn/pm-skills/tree/main/pm-ai-shipping/skills/shipping-artifacts # Copy SKILL.md to your .claude/skills/ directory

コピー コピー
クイックセットアップ: スキルフォルダを .claude/skills/ にコピーしてください。 Claude が自動的にスキルを検出して使用します。
リポジトリ phuryn/pm-skills

関連スキル

tc-tracker
更新された時間 2026年8月27日
nuxthub
更新された時間 2026年8月23日
golang-dependency-injection
更新された時間 2026年6月29日
altimate-data-engineering-skills
更新された時間 2026年8月23日
OR