Back to index

Experiment Plan

Two Column
Generates documents
Experiment Plan

Seen as a design

Take it with you

Copy and paste, or save a file and hand it over. For a machine with no network, one “Everything” file is enough.

Everything

experiment-plan-everything.md

Everything in this panel, including the contents behind each URL, in one Markdown file

Prompt

1.6 KB
Build an HTML document with "Experiment Plan". This layout runs, so there is no composition to rebuild — what it needs is content.

## What this layout does
Experiment Plan with explicit source values and reading conditions.

## What you have to supply
- Provide the source values, labels and decision conditions described by the schema.

## The shape of the input
- `title` — string — 結論を伝える見出し
- `subtitle` — string? — 出典・時点・母集団や仮定
- `hypothesis` — string — 検証する仮説
- `population` — string — 対象と除外条件
- `treatment` — string — 介入内容
- `comparison` — string — 比較条件
- `metric` — string — 主指標
- `success` — string — 事前に定める成功基準
- `guardrail` — string — 悪化させない指標・停止条件
- `duration` — string — 期間または必要標本数
- `owner` — string — 責任者

schema.ts holds the machine-checkable validation. Ask rather than guess when an input is missing.

## When not to use it
- Do not compare values with incompatible units, populations, or assumptions.

## How to build it
Put the input in a JSON file and run:

```bash
node scripts/render.mjs experiment-plan <input.json> --theme ink -o out.html
```

The output is one self-contained file and fetches nothing at render time.

## The source
- https://design-vault.pages.dev/designs/experiment-plan/source/template.tsx
- https://design-vault.pages.dev/designs/experiment-plan/source/schema.ts
- https://design-vault.pages.dev/designs/experiment-plan/source/sample-data.json
- https://design-vault.pages.dev/designs/experiment-plan/sample.html

Files

Template, input schema, sample data and metadata. This document was generated from those four. The generated document

template.tsx

6.7 KB

/designs/experiment-plan/source/template.tsx

Show contents
import type { ReactNode } from "react";
import type { Props } from "./schema";
function Notes({children}:{children:ReactNode}) { return <details><summary>データ・判断条件を確認</summary>{children}</details>; }

const CSS = String.raw`
.asset{font-family:var(--font-sans);color:var(--color-primary);background:var(--color-surface);max-width:var(--container-slide);margin:auto;padding:3rem 2rem;line-height:1.6;font-size:var(--text-body-sm)}
.asset *{box-sizing:border-box}.asset header{margin-bottom:2rem}.asset .eyebrow{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.08em;color:var(--color-secondary);margin-bottom:.75rem}.asset h1{font-size:var(--text-h1);font-weight:700;line-height:1.35;letter-spacing:-.025em;max-width:32em}.asset h2{font-size:var(--text-h3);font-weight:600;margin-bottom:.75rem}.asset h3{font-size:var(--text-body-md);font-weight:600}.asset .subtitle,.asset .muted{color:var(--color-secondary)}.asset .subtitle{margin-top:.75rem}.asset .number{font-variant-numeric:tabular-nums;font-family:var(--font-mono)}.asset .hero-number{font-size:var(--text-display);line-height:1.2;font-weight:700;letter-spacing:-.04em}.asset .callout{border-left:.25rem solid var(--color-tertiary);padding:1rem 1.5rem;background:var(--color-surface-subtle);margin-bottom:1.5rem}.asset .grid2{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}.asset .grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem}.asset .panel{padding:1.5rem;background:var(--color-surface-subtle);border-radius:var(--radius-md);min-width:0}.asset .rule{border-top:1px solid var(--color-outline);padding-top:1rem;margin-top:1rem}.asset .pill{display:inline-block;padding:.25rem .75rem;border:1px solid var(--color-outline);border-radius:var(--radius-full);font-size:var(--text-label)}.asset .focus{background:var(--color-tertiary-container);color:var(--color-on-tertiary-container)}.asset .dark{background:var(--color-primary);color:var(--color-on-primary)}.asset .dark .muted{color:var(--color-on-primary-container)}.asset .row{display:grid;grid-template-columns:12rem minmax(0,1fr) 6rem;gap:1rem;align-items:center;padding:.75rem 0;border-bottom:1px solid var(--color-outline)}.asset .row>*{min-width:0}.asset .track{height:1rem;position:relative;background:var(--color-neutral);border-radius:var(--radius-sm)}.asset .bar{height:100%;background:var(--color-tertiary);border-radius:var(--radius-sm)}.asset .track.tall{height:2rem}.asset .flex{display:flex;gap:1rem;align-items:center;justify-content:space-between;flex-wrap:wrap}.asset .stack>*+*{margin-top:1rem}.asset ul{list-style:disc;padding-left:1.25rem}.asset li+li{margin-top:.5rem}.asset .plot{display:block;width:100%;height:auto;overflow:visible}.asset .plot text{font-family:var(--font-sans);font-size:14px;fill:var(--color-secondary)}.asset .plot .ink{fill:var(--color-primary)}.asset .plot .axis{stroke:var(--color-outline);stroke-width:1}.asset .plot .accent{stroke:var(--color-tertiary);fill:none;stroke-width:3}.asset .legend{display:flex;gap:1.5rem;flex-wrap:wrap;font-size:var(--text-label);margin-bottom:1rem}.asset .legend b{display:inline-block;width:.75rem;height:.75rem;margin-right:.5rem}.asset .ledger{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}.asset .ledger caption{text-align:left;font-weight:600;margin:1rem 0}.asset .ledger th{font-weight:600;color:var(--color-secondary);text-align:left}.asset .ledger th,.asset .ledger td{padding:.75rem 1rem;border-bottom:1px solid var(--color-outline);vertical-align:top;overflow-wrap:anywhere}.asset .ledger th:first-child,.asset .ledger td:first-child{padding-left:0}.asset .ledger th:last-child,.asset .ledger td:last-child{padding-right:0}.asset .ledger tbody tr:hover{background:var(--color-surface-subtle)}.asset details{border-top:1px solid var(--color-outline);margin-top:1.5rem;padding-top:1rem}.asset summary{cursor:pointer;color:var(--color-secondary);padding:.5rem 0;min-height:2.75rem}.asset summary:focus-visible{outline:2px solid var(--color-tertiary);outline-offset:.25rem}.asset .small{font-size:var(--text-label)}.asset .mobile-only{display:none}.asset .horizontal-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.asset .board-column{border-top:.25rem solid var(--color-primary);padding-top:1rem;min-width:0}.asset .board-item{padding:1rem 0;border-bottom:1px solid var(--color-outline)}.asset .board-item p{margin-top:.5rem}.asset .statement{font-size:var(--text-h2);line-height:1.5;font-weight:600}.asset .meta-line{margin-top:.75rem;font-size:var(--text-label);color:var(--color-secondary)}.asset pre{white-space:pre-wrap;overflow-wrap:anywhere}.asset footer{margin-top:2rem;font-size:var(--text-label);color:var(--color-secondary)}
@media(max-width:640px){.asset{padding:1.5rem 1rem}.asset h1{font-size:var(--text-h2)}.asset header{margin-bottom:1.5rem}.asset .grid2,.asset .grid3,.asset .horizontal-list{grid-template-columns:1fr}.asset .row{grid-template-columns:minmax(0,1fr) 5rem;gap:.5rem}.asset .row>:first-child{grid-column:1/-1}.asset .desktop-only{display:none!important}.asset .mobile-only{display:block}.asset .panel{padding:1rem}.asset .ledger,.asset .ledger tbody,.asset .ledger tr,.asset .ledger td{display:block}.asset .ledger thead{display:none}.asset .ledger tr{padding:.75rem 0;border-bottom:1px solid var(--color-outline)}.asset .ledger td{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.75rem;border:0;padding:.25rem 0!important}.asset .ledger td:before{content:attr(data-label);color:var(--color-secondary);font-size:var(--text-label)}.asset .hero-number{font-size:var(--text-h1)}}
@media print{.asset{max-width:none;padding:1rem}.asset details>*{display:block}.asset summary{display:none}}
`;

export default function Template(d: Props) {

return <section className="asset asset-experiment-plan"><style>{CSS}</style><header><p className="eyebrow">EXPERIMENT PLAN</p><h1>{d.title}</h1>{d.subtitle && <p className="subtitle">{d.subtitle}</p>}</header>
<div className="callout"><p className="statement">{d.hypothesis}</p></div><div className="grid2"><article className="panel"><h2>対象と比較</h2><p>{d.population}</p><p className="rule"><strong>介入:</strong>{d.treatment}</p><p><strong>比較:</strong>{d.comparison}</p></article><article className="panel"><h2>判断条件</h2><p><strong>{d.metric}</strong></p><p className="rule">{d.success}</p><p className="rule">停止条件:{d.guardrail}</p></article></div><div className="meta-line">{d.duration} / 責任者:{d.owner}</div><Notes><p>観測後に成功基準を都合よく変えません。具体的な標本数や統計手法は、効果とばらつきから事前設計します。</p></Notes>
<footer>未実施の計画。結果を記載する場合は観測データを別に示す。</footer></section>;
}

schema.ts

846 B

/designs/experiment-plan/source/schema.ts

Show contents
import { z } from "zod";
const text = z.string().trim().min(1).max(160);
const short = z.string().trim().min(1).max(48);
const value = z.number().finite();
const positive = value.positive();

export const schema = z.object({
  title: text.describe("結論を伝える見出し"),
  subtitle: text.optional().describe("出典・時点・母集団や仮定"),
  hypothesis:text.describe("検証する仮説"),population:text.describe("対象と除外条件"),treatment:text.describe("介入内容"),comparison:text.describe("比較条件"),metric:short.describe("主指標"),success:text.describe("事前に定める成功基準"),guardrail:text.describe("悪化させない指標・停止条件"),duration:short.describe("期間または必要標本数"),owner:short.describe("責任者"),
}).strict();
export type Props = z.infer<typeof schema>;

meta.yaml

1.6 KB

/designs/experiment-plan/source/meta.yaml

Show contents
id: experiment-plan
name:
  ja: 検証計画の1枚資料
  en: Experiment Plan
purpose:
  ja: 仮説・対象・比較条件・成功基準・停止条件を、実施前に揃える。
  en: Experiment Plan with explicit source values and reading conditions.
status: published
still: ./still.png
category: operations
catalogOrder: 570
jobs:
  - plan-sequence
useCases:
  - problem-solution
layoutKinds:
  - 2-column
tags:
  - experiment-plan
  - operations
  - offline
  - responsive
whenToUse:
  - ja: 仮説・対象・比較条件・成功基準・停止条件を、実施前に揃える。
    en: Use to communicate experiment plan.
avoidWhen:
  - ja: 同じ条件・単位で比較できないデータには使わない
    en: Do not compare values with incompatible units, populations, or assumptions.
requiredInputs:
  - ja: 未実施の計画。結果を記載する場合は観測データを別に示す。
    en: Provide the source values, labels and decision conditions described by the schema.
relatedLayouts:
  - assumption-evidence
  - interval-estimates
dataSchema:
  title: string — 結論を伝える見出し
  subtitle: string? — 出典・時点・母集団や仮定
  hypothesis: string — 検証する仮説
  population: string — 対象と除外条件
  treatment: string — 介入内容
  comparison: string — 比較条件
  metric: string — 主指標
  success: string — 事前に定める成功基準
  guardrail: string — 悪化させない指標・停止条件
  duration: string — 期間または必要標本数
  owner: string — 責任者
sources: []

sample-data.json

726 B

/designs/experiment-plan/source/sample-data.json

Show contents
{
  "title": "入力支援が差戻しを減らすか、事前条件を決めて検証する",
  "subtitle": "架空サンプル|レイアウトの使用例",
  "hypothesis": "必須項目の案内により、入力不備の差戻しが減る",
  "population": "Web申込の新規顧客。代理申請は除く",
  "treatment": "入力欄の直下に具体例を表示",
  "comparison": "現行の案内文を使用する群",
  "metric": "入力不備による差戻し率",
  "success": "事前に合意した最小効果と精度を満たすこと",
  "guardrail": "完了率が低下したら停止し原因確認",
  "duration": "計画:4週間。必要標本数は別途設計",
  "owner": "業務改善チーム"
}