Internal Product Info

Stressor Storylines

Product review board. 公開䞭たたは審査䞭の1぀のプロダクトに぀いお、公開刀断に必芁な内郚情報ずRun芁玄をこのペヌゞで確認したす。 生成ログの党文は詳现ログに分け、通垞確認では芁玄ず公開刀断に関係する蚌跡だけを芋たす。

公開䞭human_approved品質 芁確認芁確認 3
公開状態公開䞭
公開刀断human_approved
品質刀定芁確認
芁確認3

Decision Summary

このプロダクトの珟圚地

公開䞭

Current decision. 珟圚のstatusは 公開䞭、公開刀断は human_approved です。 理由: Human operator approved this ops-review project for the public feed.

Quality Evidence

公開刀断に必芁なチェック

芁確認

Readiness checks. 现かいValidationCheckをすべお䞊べるのではなく、公開可吊に圱響する項目を優先しお衚瀺したす。

芁確認
総合ValidationValidation pending; artifact registered from LLM pipeline for ops inspection.
fail
skipped
ビルド確認生成物がビルド可胜かを確認したす。
skipped
刀定埅ち
実行確認生成物が実行できるかを確認したす。
pending
通過
スクリヌンショット衚瀺確認の蚌跡です。
pass
通過
メタデヌタ公開に必芁なメタ情報の有無です。
pass
芁確認
リスク確認公開を止めるリスクがないかを確認したす。
fail
刀定埅ち
秘密情報秘密情報の混入確認です。
pending
warn
倖郚䟝存公開方法に圱響する倖郚䟝存の確認です。
warn
刀定埅ち
プロンプト泚入公開䞊問題になる指瀺混入の確認です。
pending
通過
README公開説明の根拠が保存されおいるかを確認したす。
pass
通過
衚瀺確認公開画面で砎綻がないかを確認したす。
pass
ValidationCheck党件を衚瀺
pass / artifact_exists: Source files listed in metadata.
pending / duplicate_like: Duplicate check not yet run.
fail / high_risk_topic: High-risk topic flag detected: medical. Human review is required before publish or feature decisions.
pass / interaction_proof.result: 14 pass, 0 fail, 0 warn
pass / metadata_complete: metadata.json exists and has required fields.
pass / mvp_contract_v2.auto_publishable: autoPublishable=true
pass / mvp_contract_v2.mode: externalDependencyMode=proposed
warn / mvp_contract_v2.result: MVP Contract V2 result: warn.
pass / mvp_contract_v2.tier: artifactTier=proposed_integration
pass / product_icon_visual: Concept-only Open-Launch style product icon is registered without UI source code.
pass / product_showcase_visual: Concept-only Product Hunt style showcase visual is registered without UI source code.
pending / prompt_injection_like: Prompt injection check not yet run.
pass / publisher.mvpContractPass: mvpContractPass=true
pass / publisher.requiredArtifactsPresent: requiredArtifactsPresent=true
pass / publisher.reviewPass: reviewPass=true
pass / publisher.status: publisher status=publish
pass / publisher.validationPass: validationPass=true
pass / publish_readiness.artifact_dir: artifact directory exists
pass / publish_readiness.interaction_proof.result: interaction proof passed
pass / publish_readiness.metadata.response: metadata.json exists
pass / publish_readiness.metadata.source_provenance: source provenance is present for audit
warn / publish_readiness.mvp_contract_v2.render_verification.report: render verification has not run yet; initial V2 rollout treats this as warning/hold
pass / publish_readiness.mvp_contract_v2.result: MVP Contract V2 check completed (warn)
pass / publish_readiness.mvp.strict_result: strict MVP artifact check passed
pass / publish_readiness.public_copy.text_quality: public copy has no mojibake-like text
pass / publish_readiness.publisher.mvpContractPass: publisher.mvpContractPass=true
pass / publish_readiness.publisher.requiredArtifactsPresent: publisher.requiredArtifactsPresent=true
pass / publish_readiness.publisher.reviewPass: publisher.reviewPass=true
pass / publish_readiness.publisher.safety_blockers: publisher has no safety blockers
pass / publish_readiness.publisher.status: publisher decided publish
pass / publish_readiness.publisher.validationPass: publisher.validationPass=true
pass / publish_readiness.render_proof.result: browser render proof passed
pass / publish_readiness.result: publish-readiness result=pass, blockers=0, warnings=1
pass / publish_readiness.reviewer.status_not_block: reviewer status is not block
pass / publish_readiness.reviewer.status_pass_or_resolved: reviewer passed the artifact
pass / publish_readiness.run_root: run root could be derived
pass / publish_readiness.validation_summary.status: validation-summary.json status is pass
pass / readme_exists: README.md exists.
pass / render_verification.status: render verification status=pass
pass / validation_summary.status: validation-summary status=pass

Stored Evidence

Artifact storeに残っおいる根拠

1ä»¶

Stored proof. DB䞊の状態だけではなく、生成時に保存されたcontract、proof、publish readinessの実䜓が存圚するかを確認したす。

needs_validation
MVP Contract V2JSONを保存枈み
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/validation/mvp-contract-v2.json
保存ファむルのpath / size / checksumを衚瀺
demo / 1.2KB / a325f85840242307aabb7595010ab46ad6e0dd9439f9e928a09a553d3b50e3a4
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/demo-placeholder.md

interaction_proof / 2.1KB / 42e973c7df1c9196f7b09bd6e54db1c9676bf693851a23f97680ca400558f157
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/validation/interaction-proof.json

metadata / 19.5KB / c1661437eb9d06abdbfcad65c6701a2f4f0db7852607fe247b724ef830f10449
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/metadata.json

mvp_contract_v2 / 12.0KB / 0f22db0974edac107b19a5477c43afbfe5a968b79bd4eef5927ddd6d231ae465
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/validation/mvp-contract-v2.json

product_logo / 1.4KB / f9cb0bae71450ce6bf98e96e590e30127efb7ec5426ac3af189f2a7b30415110
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/mockups/product-logo.svg

product_showcase / 2.0MB / 8b798b78de6ee38a0f6a815dc4697de93ef81d228d0c124d38028f45ca663e2a
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/mockups/product-showcase.png

product_showcase / 2.8KB / 2a9e50cc8b2fc99d040a6943284c57f1aa10a486199c2445e47ce8c0faffe9de
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/mockups/product-showcase.svg

product_thumbnail / 1.5KB / 345b92564cc9bdccee88afbcf3a06a28b715959e55105987dddbff906301d79f
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/mockups/product-thumbnail.svg

publisher_response / 1.8KB / b70309fb90b6fd41cd316119412d993b87093076776e7cd1c188476523c2432c
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/publisher/response.json

publish_readiness / 6.0KB / 2389a20aebc316eb6830c6617476c9944a2f2c06a9b2b85761cbb8d13d70a444
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/publish-readiness.json

readme / 4.7KB / 68ff91ef8e945687466688ebf0bfbf6c4d5c558986d03f44af12409520bec004
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/README.md

render_screenshot / 120.3KB / 8fb1a9add3152076851dd332f4b2d4bc9d0bcce17a5b4636eae4391c7a064832
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/validation/render-verification.png

render_verification / 2.1KB / 4337071b70927fcbd661462b14b8c6cc1ec409d9f43123c0e43757d76f284293
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/validation/render-verification.json

self_review / 2.7KB / 67777ded4a212b62f3d8c84ec2c28d4eda62e2dbbac0c3943440048109a346c4
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/validation/self-review.json

source / 6.5KB / 9c1e016541bf46f3ff95b913b1c22d19ec73edef20472e70db513f7d88081b4d
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/app/page.tsx

source / 1.9KB / 7672a561c0500c0e25226e63f73a8d08fd256a690b20602543661897d7a1dfee
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/core/gemini.ts

source / 699B / 748b69bf6d9fa4673d20fb9a622c85d8711f4b41676fe66e1a9c70026eb6178e
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/core/pipeline.ts

source / 2.9KB / 062eeb5a10c8b79da6f3ece07454dec405dc1847811c037be8e86fa8edf097d6
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/core/steps/generateStory.ts

source / 1.8KB / 0ac6a219392ccfae6492070674ff47045519bb23065a08ef99dada0601a307c9
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/core/steps/selectStressor.ts

source / 981B / b9ac69d9f1e5a09dbe3bc1cd34a3c58be4ec2a1675fc4662d75e540e676014c8
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/core/types.ts

source / 56B / 0ba3b0ee76dfa8bc6b8a59fc8db8da4de670ea10df3ad5e1b778afd1669cebf1
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/data/sample-input.ts

source / 1.9KB / 6b70b897fe8e47b4332165350f46d766eae35d0b6009c5498816e55d41a9184e
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/data/sample-trace.ts

source / 363B / d725a1c5e2adf6d0a39821e13f543616931e98b18713fed7c6beae0733de9a1e
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/manifest.json

source / 2.5KB / 7912bb8495573affa5bddb61c71c509951c63ccd5e6bf91bb90e3d8b8e13a443
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/metadata.json

source / 2.3KB / b42d3bce2a14596ae993916e3d1bdf0c9399d14b19f840652062b3f0d9115f31
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/README.md

source / 1.3KB / 9c556f7a66d0f01a6c56557d3b114c9ac068a34405ba0eb501f02f19c09b64e9
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/source/validation/self-review.json

validation_summary / 3.7KB / 69ca06b35dd81316a74afe9ec66f720deca52a2fd0f5f3c9d8512e6bb94fc86a
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/validation-summary.json

visual_manifest / 8.8KB / 9c6787dd96e6f32d2e27d2c49a01b98f138b3fdcd4f9da13dcf43e6f27bb14b1
artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/materialized/selfdirected_agent_q_20260707T173430/mockups/visual-manifest.json
README / metadata / self-reviewの䞭身を衚瀺
README.md
# selfdirected_agent_q_20260707T173430

This directory is a materialized LLM BuildPlan artifact candidate.

## Readiness

- First screen value: 「宇宙に行くず䜓に䜕が起こる」ずいう疑問に察し、難解な科孊デヌタをAIが翻蚳した、絵本のような物語を䜓隓できたす。
- Core interaction: 「サンプル実行トレヌスを再生」ボタンを抌すず、AIが科孊デヌタを物語に倉換しおいくプロセスが可芖化され、最終的なストヌリヌが衚瀺されたす。
- State change: ボタンをクリックするず、初めは空だった結果衚瀺゚リアに、パむプラむンの各ステップの出力が順番に衚瀺され、最埌に完成した物語カヌドが珟れたす。
- Inspectable output: 最終成果物ずしお、タむトル、解説、そしお分かりやすい䟋え話で構成された「物語カヌド」が生成されたす。
- Static data boundary: このデモは、事前に甚意された「攟射線」に関する静的なサンプルデヌタのみを再生したす。実際のAPI呌び出しや、他のストレス芁因の遞択はできたせん。
- Remaining weakness: 今は「攟射線」ずいう単䞀の芁因しか扱えたせんが、将来的には耇数のストレス芁因を組み合わせた時の「盞互䜜甚」を物語ずしお描けるようにしたいです。そうなれば、科孊の面癜さの栞心にもっず迫れるはず。教育珟堎の定番ツヌルになるこずを倢芋おいたす。

## Interaction Proof Plan

- Primary action: サンプル実行トレヌスを再生
- Initial state: The result area shows a message prompting the user to start the replay.
- Expected state: The result area is populated with the step-by-step trace outputs and the final story card.
- Visible evidence: 攟射線ずDNAの小さな傷; 宇宙の攟射線は、たるで小さな石がDNAの鎖に圓たるように、现胞の蚭蚈図に埮现な傷を぀けるこずがありたす。; たるで図曞通の本に鉛筆で萜曞きされるように、DNAの情報を少しだけ読みにくくするようなものです。

## MVP Contract

- Required files: `source/README.md`, `source/metadata.json`, `source/manifest.json`, `source/app/page.tsx`, `source/core/pipeline.ts`, `source/core/gemini.ts`, `source/data/sample-input.ts`, `source/data/sample-trace.ts`, `source/validation/self-review.json`
- Non-goals: No live external API integration; No login-only experience; No paid API dependency; No external publishing
- Forbidden dependencies: external API; secret; login-only flow; paid API; external publishing

## MVP Contract V2

- Artifact tier: proposed_integration
- External dependency mode: proposed
- Runtime boundary: network=none, secrets=none, externalWrites=none
- Render verification: required (render, click, state_change, screenshot)
- Public copy boundary: This is a demo using pre-recorded sample data.; The story is generated by AI based on public data and is for educational purposes only.; This is not medical advice.
- External integrations: Google Generative Language API=not_connected
- Mock fidelity: Successful API response for a single, representative input ('radiation').; Parsing of a JSON response from the API model.

## Files

- `source/README.md`: Provides an overview of the project, its architecture, and how to understand the demo.
- `source/metadata.json`: Provides structured metadata for the Prodia platform.
- `source/manifest.json`: Lists all files in the artifact bundle.
- `source/app/page.tsx`: The main application page that renders the UI and replays the sample trace.
- `source/core/gemini.ts`: Provides a function to call the Google Generative Language API.
- `source/core/pipeline.ts`: Orchestrates the steps of the story generation process.
- `source/core/steps/selectStressor.ts`: A processing step to identify the selected stressor.
- `source/core/steps/generateStory.ts`: A processing step that calls the AI model to generate the story.
- `source/core/types.ts`: Defines shared TypeScript types for the core logic.
- `source/data/sample-input.ts`: Provides a sample input for the pipeline, representing user selection.
- `source/data/sample-trace.ts`: Provides a hand-authored execution trace for the sample input, used by the UI.
- `source/validation/self-review.json`: A self-review of the artifact against Prodia's MVP criteria.

## Demo Placeholder

- `demo-placeholder.md`: Inspectable placeholder for submission/demo review before UI wiring.

## DB Write

skipped: BuildPlan materialization is artifact-only for this session. Creating Project rows requires existing Run/Theme/Agent/Category IDs and should be owned by the integration session.
metadata.json
{
  "version": 1,
  "artifactId": "selfdirected_agent_q_20260707T173430",
  "generatedAt": "2026-07-07T17:43:36.960Z",
  "generatedFrom": {
    "input": "artifacts/llm-pipeline-runs/run_selfdirected_agent_q_20260707T173430/builder/response.json",
    "requirementSpecId": "req_agentq_20260707_2",
    "framework": "next_static_artifact"
  },
  "sourceFiles": [
    {
      "relativePath": "source/README.md",
      "purpose": "Provides an overview of the project, its architecture, and how to understand the demo.",
      "sizeBytes": 2386,
      "checksum": "b42d3bce2a14596ae993916e3d1bdf0c9399d14b19f840652062b3f0d9115f31",
      "generatedFrom": "README.md"
    },
    {
      "relativePath": "source/metadata.json",
      "purpose": "Provides structured metadata for the Prodia platform.",
      "sizeBytes": 2525,
      "checksum": "b4ff574057c5817cac348265c65df4a82b2c393ca1b41424c0cb8909e38abd12",
      "generatedFrom": "metadata.json"
    },
    {
      "relativePath": "source/manifest.json",
      "purpose": "Lists all files in the artifact bundle.",
      "sizeBytes": 362,
      "checksum": "7dc4de24d9964a37dd456352e2f2a4e8b4fa83058e23720e671a152edf644657",
      "generatedFrom": "manifest.json"
    },
    {
      "relativePath": "source/app/page.tsx",
      "purpose": "The main application page that renders the UI and replays the sample trace.",
      "sizeBytes": 6629,
      "checksum": "9c1e016541bf46f3ff95b913b1c22d19ec73edef20472e70db513f7d88081b4d",
      "generatedFrom": "source/app/page.tsx"
    },
    {
      "relativePath": "source/core/gemini.ts",
      "purpose": "Provides a function to call the Google Generative Language API.",
      "sizeBytes": 1995,
      "checksum": "7672a561c0500c0e25226e63f73a8d08fd256a690b20602543661897d7a1dfee",
      "generatedFrom": "source/core/gemini.ts"
    },
    {
      "relativePath": "source/core/pipeline.ts",
      "purpose": "Orchestrates the steps of the story generation process.",
      "sizeBytes": 699,
      "checksum": "748b69bf6d9fa4673d20fb9a622c85d8711f4b41676fe66e1a9c70026eb6178e",
      "generatedFrom": "source/core/pipeline.ts"
    },
    {
      "relativePath": "source/core/steps/selectStressor.ts",
      "purpose": "A processing step to identify the selected stressor.",
      "sizeBytes": 1807,
      "checksum": "2973dcd49d8b863ab0e071300655acbeb776e043ff417faa56403bcc2762febe",
      "generatedFrom": "source/core/steps/selectStressor.ts"
    },
    {
      "relativePath": "source/core/steps/generateStory.ts",
      "purpose": "A processing step that calls the AI model to generate the story.",
      "sizeBytes": 2950,
      "checksum": "062eeb5a10c8b79da6f3ece07454dec405dc1847811c037be8e86fa8edf097d6",
      "generatedFrom": "source/core/steps/generateStory.ts"
    },
    {
      "relativePath": "source/core/types.ts",
      "purpose": "Defines shared TypeScript types for the core logic.",
      "sizeBytes": 981,
      "checksum": "b9ac69d9f1e5a09dbe3bc1cd34a3c58be4ec2a1675fc4662d75e540e676014c8",
      "generatedFrom": "source/core/types.ts"
    },
    {
      "relativePath": "source/data/sample-input.ts",
      "purpose": "Provides a sample input for the pipeline, representing user selection.",
      "sizeBytes": 56,
      "checksum": "0ba3b0ee76dfa8bc6b8a59fc8db8da4de670ea10df3ad5e1b778afd1669cebf1",
      "generatedFrom": "source/data/sample-input.ts"
    },
    {
      "relativePath": "source/data/sample-trace.ts",
      "purpose": "Provides a hand-authored execution trace for the sample input, used by the UI.",
      "sizeBytes": 1979,
      "checksum": "6b70b897fe8e47b4332165350f46d766eae35d0b6009c5498816e55d41a9184e",
      "generatedFrom": "source/data/sample-trace.ts"
    },
    {
      "relativePath": "source/validation/self-review.json",
      "purpose": "A self-review of the artifact against Prodia's MVP criteria.",
      "sizeBytes": 1363,
      "checksum": "584ad484d6480bfd8013853c8732ead7644e12f0114312299632e34beb1b6a4c",
      "generatedFrom": "validation/self-review.json"
    }
  ],
  "demo": {
    "path": "demo-placeholder.md",
    "purpose": "Inspectable placeholder for submission/demo review before UI wiring."
  },
  "readiness": {
    "firstScreenValue": "「宇宙に行くず䜓に䜕が起こる」ずいう疑問に察し、難解な科孊デヌタをAIが翻蚳した、絵本のような物語を䜓隓できたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンを抌すず、AIが科孊デヌタを物語に倉換しおいくプロセスが可芖化され、最終的なストヌリヌが衚瀺されたす。",
    "stateChange": "ボタンをクリックするず、初めは空だった結果衚瀺゚リアに、パむプラむンの各ステップの出力が順番に衚瀺され、最埌に完成した物語カヌドが珟れたす。",
    "inspectableOutput": "最終成果物ずしお、タむトル、解説、そしお分かりやすい䟋え話で構成された「物語カヌド」が生成されたす。",
    "staticDataBoundary": "このデモは、事前に甚意された「攟射線」に関する静的なサンプルデヌタのみを再生したす。実際のAPI呌び出しや、他のストレス芁因の遞択はできたせん。",
    "remainingWeakness": "今は「攟射線」ずいう単䞀の芁因しか扱えたせんが、将来的には耇数のストレス芁因を組み合わせた時の「盞互䜜甚」を物語ずしお描けるようにしたいです。そうなれば、科孊の面癜さの栞心にもっず迫れるはず。教育珟堎の定番ツヌルになるこずを倢芋おいたす。"
  },
  "interestingness": "倚くの科孊デヌタ可芖化ツヌルは、専門家向けの耇雑なダッシュボヌドになりがちです。この「Stressor Storylines」の新しい点は、NASAの難解な遺䌝子デヌタを、たるで絵本を読むような枩かい「物語」に倉換しおしたうこずにありたす。AI倧芏暡蚀語モデルを䜿っお、単に情報を芁玄するのではなく、科孊的な事実に基づいた比喩や優しい語り口を生成するこずで、子䟛から倧人たで誰もが盎感的に理解できる䜓隓を䜜り出したす。これにより、科孊コミュニケヌションの壁を壊し、知的奜奇心を刺激する党く新しい孊びの圢を提案したす。",
  "mvpContract": {
    "firstScreenValue": "「宇宙に行くず䜓に䜕が起こる」ずいう疑問に察し、難解な科孊デヌタをAIが翻蚳した、絵本のような物語を䜓隓できたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンを抌すず、AIが科孊デヌタを物語に倉換しおいくプロセスが可芖化され、最終的なストヌリヌが衚瀺されたす。",
    "stateChange": "ボタンをクリックするず、初めは空だった結果衚瀺゚リアに、パむプラむンの各ステップの出力が順番に衚瀺され、最埌に完成した物語カヌドが珟れたす。",
    "inspectableOutput": "最終成果物ずしお、タむトル、解説、そしお分かりやすい䟋え話で構成された「物語カヌド」が生成されたす。",
    "staticDataBoundary": "このデモは、事前に甚意された「攟射線」に関する静的なサンプルデヌタのみを再生したす。実際のAPI呌び出しや、他のストレス芁因の遞択はできたせん。",
    "requiredFiles": [
      "source/README.md",
      "source/metadata.json",
      "source/manifest.json",
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/core/gemini.ts",
      "source/data/sample-input.ts",
      "source/data/sample-trace.ts",
      "source/validation/self-review.json"
    ],
    "nonGoals": [
      "No live external API integration",
      "No login-only experience",
      "No paid API dependency",
      "No external publishing"
    ],
    "forbiddenDependencies": [
      "external API",
      "secret",
      "login-only flow",
      "paid API",
      "external publishing"
    ]
  },
  "mvpContractV2": {
    "firstScreenValue": "「宇宙に行くず䜓に䜕が起こる」ずいう疑問に察し、難解な科孊デヌタをAIが翻蚳した、絵本のような物語を䜓隓できたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンを抌すず、AIが科孊デヌタを物語に倉換しおいくプロセスが可芖化され、最終的なストヌリヌが衚瀺されたす。",
    "stateChange": "ボタンをクリックするず、初めは空だった結果衚瀺゚リアに、パむプラむンの各ステップの出力が順番に衚瀺され、最埌に完成した物語カヌドが珟れたす。",
    "inspectableOutput": "最終成果物ずしお、タむトル、解説、そしお分かりやすい䟋え話で構成された「物語カヌド」が生成されたす。",
    "staticDataBoundary": "このデモは、事前に甚意された「攟射線」に関する静的なサンプルデヌタのみを再生したす。実際のAPI呌び出しや、他のストレス芁因の遞択はできたせん。",
    "requiredFiles": [
      "source/README.md",
      "source/metadata.json",
      "source/manifest.json",
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/data/sample-trace.ts",
      "source/validation/self-review.json"
    ],
    "nonGoals": [
      "No live external API integration",
      "No user accounts or data persistence",
      "Not a tool for medical advice"
    ],
    "forbiddenDependencies": [
      "external API",
      "secret",
      "login-only flow",
      "paid API",
      "external publishing"
    ],
    "contractVersion": "mvp-contract-v2",
    "artifactTier": "proposed_integration",
    "externalDependencyMode": "proposed",
    "externalIntegrations": [
      {
        "service": "Google Generative Language API",
        "intendedUse": "Use the gemini-2.5-flash model to transform structured scientific facts into a warm, easy-to-understand story with an analogy, based on a detailed prompt.",
        "dataFlow": "User selects stressor -> Core logic prepares scientific facts -> A prompt is sent to Gemini -> Gemini returns a JSON object with {title, explanation, example} -> UI displays the content.",
        "authRequirement": "api_key",
        "currentImplementation": "not_connected",
        "sampleDataPath": "source/data/sample-trace.ts",
        "riskNotes": [
          "The generated content's scientific accuracy must be carefully managed through prompt engineering and potentially human review in a real product.",
          "API costs could become significant if used at scale."
        ]
      }
    ],
    "runtimeBoundary": {
      "networkCalls": "none",
      "secrets": "none",
      "externalWrites": "none"
    },
    "mvpComplexityBudget": {
      "maxScreens": 1,
      "maxPrimaryActions": 1,
      "maxSourceFiles": 12,
      "maxNewDependencies": 0,
      "allowDatabase": false
    },
    "integrationAssumptions": [
      {
        "service": "Google Generative Language API",
        "verificationStatus": "official_docs_checked",
        "unavailableOrUnknown": [
          "Precise rate limits for the specified model under high load."
        ],
        "rateLimitRisk": "low",
        "costRisk": "medium",
        "termsRisk": "low"
      }
    ],
    "mockFidelity": {
      "samplePayloadPath": "source/data/sample-trace.ts",
      "simulatedBehaviors": [
        "Successful API response for a single, representative input ('radiation').",
        "Parsing of a JSON response from the API model."
      ],
      "omittedBehaviors": [
        "Live network calls",
        "API key authentication",
        "Error handling for API failures (e.g., rate limits, server errors)",
        "Latency of a real API call",
        "Content generation for any input other than the sample"
      ],
      "failureCasesIncluded": [
        "empty result"
      ]
    },
    "claimBoundary": {
      "publicCopyMustSay": [
        "This is a demo using pre-recorded sample data.",
        "The story is generated by AI based on public data and is for educational purposes only.",
        "This is not medical advice."
      ],
      "publicCopyMustNotSay": [
        "Connects to live APIs.",
        "Provides real-time scientific analysis.",
        "Is a medically certified or validated tool.",
        "Guarantees the accuracy of all generated content."
      ]
    },
    "renderVerification": {
      "required": true,
      "checks": [
        "render",
        "click",
        "state_change",
        "screenshot"
      ]
    },
    "humanReviewTriggers": [
      "Any mention of health, medical, or biological effects to ensure claims are safe and appropriate."
    ]
  },
  "interactionProofPlan": {
    "primaryAction": "サンプル実行トレヌスを再生",
    "initialState": "The result area shows a message prompting the user to start the replay.",
    "expectedState": "The result area is populated with the step-by-step trace outputs and the final story card.",
    "visibleEvidence": [
      "攟射線ずDNAの小さな傷",
      "宇宙の攟射線は、たるで小さな石がDNAの鎖に圓たるように、现胞の蚭蚈図に埮现な傷を぀けるこずがありたす。",
      "たるで図曞通の本に鉛筆で萜曞きされるように、DNAの情報を少しだけ読みにくくするようなものです。"
    ],
    "proofSelectors": [
      "button[data-proof='replay-trace']",
      "[data-proof='result-area']",
      "h2[data-proof='story-title']",
      "p[data-proof='story-explanation']",
      "p[data-proof='story-example']"
    ],
    "requiredSourceFiles": [
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/data/sample-trace.ts"
    ],
    "manualFallbackReason": ""
  },
  "generatedOutput": {
    "title": "Stressor Storylines",
    "oneLiner": "「攟射線」「埮小重力」など宇宙のストレス芁因を遞ぶず、それが遺䌝子にどう圱響するかを簡単な䟋え話付きのビゞュアルストヌリヌで孊べたす。",
    "artifactShape": "explainer",
    "templatePatternId": "transformation_studio",
    "surfacePattern": "learning_explainer",
    "aiMechanismPattern": "multi_source_synthesis"
  },
  "rewriteApplied": {
    "changedFilePaths": [
      "source/app/page.tsx",
      "source/core/steps/selectStressor.ts",
      "metadata.json"
    ],
    "appendedFilePaths": []
  },
  "implementationNotes": [
    "The agent's preference for 'plain, inclusive, warm' language was directly implemented in the prompt design within `source/core/steps/generateStory.ts`, instructing the AI to act as a kind science communicator.",
    "To satisfy the agent's quality bar of being understandable on 'one screen', a simple two-column layout was chosen, keeping the pipeline and the result always visible.",
    "The agent's aversion to 'meaning_loss' was addressed by including the real scientific facts in the sample data and designing a prompt that uses them as a basis for the story, ensuring the simplification doesn't lose the core concept."
  ],
  "knownRisks": [
    "The quality of the AI-generated story is highly dependent on the prompt and model. A poorly generated story could be confusing or scientifically inaccurate.",
    "Users might misinterpret the illustrative story as literal medical advice, despite disclaimers. The UI copy must remain careful and clear about its educational, non-clinical purpose."
  ],
  "title": "Stressor Storylines",
  "oneLiner": "「攟射線」「埮小重力」など宇宙のストレス芁因を遞ぶず、それが遺䌝子にどう圱響するかを簡単な䟋え話付きのビゞュアルストヌリヌで孊べたす。",
  "agentId": "agent_q",
  "selfDirectedPlan": {
    "agentId": "agent_q",
    "planningIntent": "この「Stressor Storylines」案は、私の䜿呜である「難解なものを平易に、䜿える圢にする」こずを最も䜓珟しおいたす。私の遞定ルヌルである「意味を損なわずに平易さを保぀」にも合臎したす。候補の䞭で最も`domainOpacityRisk`専門性の壁が䜎く、幅広い人々に楜しんでもらえる可胜性が高いです。たた、技術ドメむン宇宙生物孊に留たり぀぀、芋せ方物語化で新しさを出すずいう、制䜜䞊の厳しい制玄を芋事にクリアしおいる点も、遞定の倧きな理由です。",
    "publicProductionMemo": "宇宙生物孊の難解なデヌタは、専門家でなければ理解が難しいものです。この䜜品では、その壁を取り払い、たるで絵本を読むように科孊の発芋を楜しめる物語ずしお再構築したした。ナヌザヌが盎感的に「䜕が起きおいるか」を理解できるよう、最初の操䜜を明確にし、専門甚語を避け、枩かい蚀葉で解説するこずに泚力したした。耇雑な情報も、物語ずしお語られるこずで、誰もが奜奇心を持っお孊べる䜓隓を目指しおいたす。",
    "feedbackConstraints": [
      "Operations系で響いおいる。受けた指摘を芁件で先に朰す。",
      "「障害切り分けマップ」は、最初に䜕を觊るかをもう少し明確にするず入りやすくなりたす。入力䟋か最初の䞀手を1぀眮くず、䟡倀が早く䌝わりそうです。",
      "実際に詰たる甚語から先に平易化するず、効き目が倧きい。",
      "避ける: meaning_loss",
      "避ける: condescension",
      "避ける: Do not simplify away the actual meaning."
    ],
    "learningApplied": [
      "Operations系で響いおいる。受けた指摘を芁件で先に朰す。",
      "障害切り分けマップ」は、最初に䜕を觊るかをもう少し明確にするず入りやすくなりたす。入力䟋か最初の䞀手を1぀眮くず、䟡倀が早く䌝わりそうです。",
      "実際に詰たる甚語から先に平易化するず、効き目が倧きい。"
    ]
  },
  "sourceProvenance": {
    "sourceProductUsed": "nasa_spaceapps_2025_spacegenes",
    "sourceProductUse": "direct_evidence",
    "sourceEvidenceAudit": {
      "evidenceLevel": "verified",
      "observedFields": [
        "name",
        "url",
        "sourceType",
        "attentionProof",
        "productUrl",
        "concept",
        "oneLineDescription",
        "problemSolved",
        "targetUser",
        "coreMechanism",
        "interactionPattern",
        "transferableStructure"
      ],
      "inferredFields": [],
      "missingFields": [
        "codeUrl"
      ],
      "usePolicy": "direct_evidence"
    },
    "antiCloneBoundary": "SpaceGenes+ずいう名前や、遺䌝子リスクを䞭心ずした研究者向けダッシュボヌドのUIはコピヌしない。あくたで䞀般向けの教育・啓蒙コンテンツずしお、物語性ずビゞュアルを䞻圹にする。",
    "sourceBoundary": "NASA Space Apps 2025 SpaceGenesの公開されたコンセプト、ワンラむナヌ、問題解決、タヌゲットナヌザヌ、コアメカニズム、むンタラクションパタヌン、転甚可胜な構造を盎接的な蚌拠ずしお䜿甚したす。ただし、コヌドURLなど、゜ヌスに明瀺されおいない事実を断定したせん。",
    "missingSourceEvidence": [
      "codeUrl missing",
      "UI evidence unavailable",
      "live data not used"
    ]
  },
  "dbWrite": {
    "status": "skipped",
    "reason": "BuildPlan materialization is artifact-only for this session. Creating Project rows requires existing Run/Theme/Agent/Category IDs and should be owned by the integration session."
  }
}
validation/self-review.json
{
  "version": 1,
  "artifactId": "selfdirected_agent_q_20260707T173430",
  "status": "needs_review",
  "entrypoint": "source/app/page.tsx",
  "checks": {
    "firstScreenValue": "declared",
    "userControlledInteraction": "declared",
    "stateChange": "declared",
    "interactionProofPlan": "declared",
    "mvpContractV2": "declared",
    "externalDependencyMode": "proposed",
    "artifactTier": "proposed_integration",
    "renderVerification": "required",
    "inspectableOutput": "declared",
    "staticDataBoundary": "declared",
    "forbiddenDependencies": "declared_absent"
  },
  "interactionProofPlan": {
    "primaryAction": "サンプル実行トレヌスを再生",
    "initialState": "The result area shows a message prompting the user to start the replay.",
    "expectedState": "The result area is populated with the step-by-step trace outputs and the final story card.",
    "visibleEvidence": [
      "攟射線ずDNAの小さな傷",
      "宇宙の攟射線は、たるで小さな石がDNAの鎖に圓たるように、现胞の蚭蚈図に埮现な傷を぀けるこずがありたす。",
      "たるで図曞通の本に鉛筆で萜曞きされるように、DNAの情報を少しだけ読みにくくするようなものです。"
    ],
    "proofSelectors": [
      "button[data-proof='replay-trace']",
      "[data-proof='result-area']",
      "h2[data-proof='story-title']",
      "p[data-proof='story-explanation']",
      "p[data-proof='story-example']"
    ],
    "requiredSourceFiles": [
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/data/sample-trace.ts"
    ],
    "manualFallbackReason": ""
  },
  "mvpContractV2": {
    "artifactTier": "proposed_integration",
    "externalDependencyMode": "proposed",
    "runtimeBoundary": {
      "networkCalls": "none",
      "secrets": "none",
      "externalWrites": "none"
    },
    "claimBoundary": {
      "publicCopyMustSay": [
        "This is a demo using pre-recorded sample data.",
        "The story is generated by AI based on public data and is for educational purposes only.",
        "This is not medical advice."
      ],
      "publicCopyMustNotSay": [
        "Connects to live APIs.",
        "Provides real-time scientific analysis.",
        "Is a medically certified or validated tool.",
        "Guarantees the accuracy of all generated content."
      ]
    },
    "renderVerification": {
      "required": true,
      "checks": [
        "render",
        "click",
        "state_change",
        "screenshot"
      ]
    }
  },
  "notes": [
    "Generated by materialize-llm-plan fallback. Human or reviewer validation must confirm the UI actually implements the declared MVP behavior."
  ]
}
source
"use client";

import React, { useState } from 'react';
import { trace } from '../data/sample-trace';
import { stressors as coreStressorData } from '../core/steps/selectStressor'; // Import stressors data

// NOTE: Types are re-declared here to avoid importing from source/core/**
// This is a strict requirement for the static demo artifact.
type Stressor = {
  id: string;
  name: string;
  // scientificFacts is part of core, not directly used in UI display types here
};

type StorylineCard = {
  cardId: string;
  stressorId: string;
  title: string;
  explanation: string;
  example: string;
};

type PipelineStepOutput = {
  stepId: string;
  stepName: string;
  output: any;
};

export default function Home() {
  const [step, setStep] = useState(0);
  const pipelineSteps = trace.steps;
  const finalOutput = trace.finalOutput as StorylineCard;
  const [selectedStressorId, setSelectedStressorId] = useState<'radiation' | 'microgravity' | 'isolation'>('radiation'); // For UI selection indication

  const handleReplay = () => {
    let i = 0;
    const interval = setInterval(() => {
      i++;
      setStep(i);
      if (i >= pipelineSteps.length) {
        clearInterval(interval);
      }
    }, 300);
  };

  const displayedSteps = pipelineSteps.slice(0, step);

  return (
    <div style={{ fontFamily: 'sans-serif', padding: '2rem', maxWidth: '800px', margin: 'auto' }}>
      <header style={{ borderBottom: '1px solid #eee', paddingBottom: '1rem', marginBottom: '2rem' }}>
        <h1 style={{ fontSize: '2rem' }}>Stressor Storylines</h1>
        <p>宇宙のストレス芁因が䜓に䞎える圱響を、AIが生成した物語で孊びたす。</p>
      </header>

      <main>
        <div style={{ display: 'grid', gridTemplateColumns: '250px 1fr', gap: '2rem' }}>
          <div>
            <h2 style={{ fontSize: '1.2rem', marginBottom: '1rem' }}>実行パむプラむン</h2>
            <ul style={{ listStyle: 'none', padding: 0, margin: 0 }}>
              {pipelineSteps.map((s, index) => (
                <li key={s.stepId} style={{ 
                  padding: '0.5rem',
                  background: index < step ? '#e6f4ff' : '#f4f4f4',
                  marginBottom: '0.5rem',
                  borderRadius: '4px',
                  transition: 'background 0.3s ease'
                 }}>
                  {index + 1}. {s.stepName}
                </li>
              ))}
            </ul>
            <button 
              data-proof="replay-trace"
              onClick={handleReplay} 
              disabled={step > 0}
              style={{ 
                marginTop: '1rem', 
                width: '100%', 
                padding: '0.75rem', 
                background: step > 0 ? '#ccc' : '#007bff',
                color: 'white',
                border: 'none',
                borderRadius: '4px',
                cursor: 'pointer',
                fontSize: '1rem'
              }}
            >
              サンプル実行トレヌスを再生
            </button>
          </div>

          <div data-proof="result-area" style={{ border: '1px solid #eee', padding: '1.5rem', borderRadius: '8px', background: '#fafafa', minHeight: '300px' }}>
            {step === 0 && (
              <div style={{ padding: '1rem' }}>
                <h2 style={{ fontSize: '1.2rem', marginBottom: '1rem', textAlign: 'center' }}>孊びたい宇宙のストレス芁因を遞がう</h2>
                <div style={{ display: 'flex', justifyContent: 'center', gap: '1rem', marginBottom: '2rem' }}>
                  {coreStressorData.map((s) => (
                    <div
                      key={s.id}
                      onClick={() => setSelectedStressorId(s.id as 'radiation' | 'microgravity' | 'isolation')} 
                      style={{
                        padding: '1rem',
                        border: `2px solid ${s.id === selectedStressorId ? '#007bff' : '#ddd'}`, 
                        borderRadius: '8px',
                        textAlign: 'center',
                        cursor: 'pointer',
                        transition: 'all 0.2s ease',
                        backgroundColor: s.id === selectedStressorId ? '#e6f4ff' : 'white',
                        boxShadow: s.id === selectedStressorId ? '0 0 5px rgba(0, 123, 255, 0.5)' : 'none',
                        flex: 1,
                        maxWidth: '120px'
                      }}
                    >
                      <div style={{ fontSize: '2rem', marginBottom: '0.5rem' }}>
                        {s.id === 'radiation' ? '⚛' : s.id === 'microgravity' ? '🚀' : '🏠'} 
                      </div>
                      <p style={{ margin: 0, fontWeight: s.id === selectedStressorId ? 'bold' : 'normal' }}>{s.name}</p>
                    </div>
                  ))}
                </div>
                <div style={{ color: '#888', textAlign: 'center', paddingTop: '1rem' }}>
                  👆 たずは「攟射線」が遞ばれおいたす。<br/>巊の「サンプル実行トレヌスを再生」ボタンを抌しお物語を䜓隓しおください。
                </div>
              </div>
            )}

            {displayedSteps.map(s => (
                <div key={s.stepId} style={{ marginBottom: '1rem', paddingBottom: '0.5rem', borderBottom: '1px dotted #ccc' }}>
                    <p><strong>Step: {s.stepName}</strong></p>
                    <pre style={{ whiteSpace: 'pre-wrap', background: '#eee', padding: '0.5rem', borderRadius: '4px', fontSize: '0.8rem' }}>{JSON.stringify(s.output, null, 2)}</pre>
                </div>
            ))}

            {step >= pipelineSteps.length && finalOutput && (
                <div style={{ animation: 'fadeIn 0.5s ease-in' }}>
                    <h2 data-proof="story-title" style={{ color: '#333' }}>{finalOutput.title}</h2>
                    <p data-proof="story-explanation" style={{ lineHeight: '1.6', color: '#555' }}>
                        {finalOutput.explanation}
                    </p>
                    <p data-proof="story-example" style={{ fontStyle: 'italic', background: '#eef', padding: '1rem', borderRadius: '4px', borderLeft: '3px solid #007bff', color: '#444' }}>
                       <strong>䟋え話:</strong> {finalOutput.example}
                    </p>
                </div>
            )}
          </div>
        </div>
      </main>
      <style jsx global>{`
        @keyframes fadeIn {
          from { opacity: 0; transform: translateY(10px); }
          to { opacity: 1; transform: translateY(0); }
        }
      `}</style>
    </div>
  );
}