Internal Product Info

Provenance Balancer

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

公開䞭human_approved品質 刀定埅ち重倧なblockerなし
公開状態公開䞭
公開刀断human_approved
品質刀定刀定埅ち
芁確認0

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.
pending
skipped
ビルド確認生成物がビルド可胜かを確認したす。
skipped
刀定埅ち
実行確認生成物が実行できるかを確認したす。
pending
通過
スクリヌンショット衚瀺確認の蚌跡です。
pass
通過
メタデヌタ公開に必芁なメタ情報の有無です。
pass
通過
リスク確認公開を止めるリスクがないかを確認したす。
pass
刀定埅ち
秘密情報秘密情報の混入確認です。
pending
warn
倖郚䟝存公開方法に圱響する倖郚䟝存の確認です。
warn
刀定埅ち
プロンプト泚入公開䞊問題になる指瀺混入の確認です。
pending
通過
README公開説明の根拠が保存されおいるかを確認したす。
pass
通過
衚瀺確認公開画面で砎綻がないかを確認したす。
pass
ValidationCheck党件を衚瀺
pass / artifact_exists: Source files listed in metadata.
pending / duplicate_like: Duplicate check not yet run.
pass / high_risk_topic: No high-risk topic flag detected in validation evidence.
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_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/validation/mvp-contract-v2.json
保存ファむルのpath / size / checksumを衚瀺
demo / 1.2KB / 7ecf1a495844dfd31946639b7903d6a40e7a346d59ef1ee43e2c088cd27bcd17
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/demo-placeholder.md

interaction_proof / 2.1KB / f18ba9a6de9d2f4842b4aa49ffc32c771989ca7cb668a118060ce6e5c07e9914
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/validation/interaction-proof.json

metadata / 20.2KB / 91acb8d47b3bfa31b57c51b907b356121fa1eada34b27aafffae7f291bd076a9
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/metadata.json

mvp_contract_v2 / 11.6KB / e82c028afc91747ee80b56d8f7d3bf3518d173c33d56af1adb44650b853f9407
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/validation/mvp-contract-v2.json

product_logo / 659B / 9c73d1177f48e949b71587f1eb63dad8ad051256f0bda23f98e6c14c26600e54
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/mockups/product-logo.svg

product_showcase / 1.9MB / 3ce5d5330c6b3ebe19fe0af68478cef0a234e22b214e7688b2d36c9ba81efd3e
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/mockups/product-showcase.png

product_showcase / 1.8KB / cab14f6a5a438752ca1aeed17732082d3611861f6b8604e3d114e6a7b2e47b3e
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/mockups/product-showcase.svg

product_thumbnail / 1.4KB / c11c0810423ead793155e2526a359f0dca581072238aa28976a8fd242765c1e7
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/mockups/product-thumbnail.svg

publisher_response / 984B / 8943adb98688e920a5a774c3811eb398615fe8a4d17f62cfeedf6a1643a5b573
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/publisher/response.json

publish_readiness / 6.0KB / f3e898e8f3fa6393604d4eddd65a872d4b20080cd3a59448d43d2a68b6bb8d82
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/publish-readiness.json

readme / 4.6KB / 9e7c84228caa4460ded1459aa2eb59a4bd01ca9ba0c1a2474ca8eb54c8806af8
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/README.md

render_screenshot / 67.9KB / e9fea71975d19408f50fbe331610ff8ebd2e2c996891ced3dbd01a9d68e97697
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/validation/render-verification.png

render_verification / 2.1KB / cdcbda081836c67e4dd816e1d4262f288ebd65d9b0be7661c41ae45bc38d930e
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/validation/render-verification.json

self_review / 2.5KB / 445653e9d474bdb2075cfcea517118bbb4d195ca01f15b352ffe84b464eee08f
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/validation/self-review.json

source / 5.0KB / 854d749f976779366f8438e3417360e433892f2471dd70619d76c2631ce7158a
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/app/page.tsx

source / 1.6KB / 01e2b0773104e2582df21a3f28794a0432c54dec9583d3a22d08c4a253274bda
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/core/gemini.ts

source / 1.0KB / 9a5a4318b43194fe124f41e34212d12827895c2545f51d994afaa5cf827f4546
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/core/pipeline.ts

source / 961B / da0680bab12594d93f049b2282c75d694abe88dbefe5c7a52b25db0f02a60b54
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/core/steps/extractClaims.ts

source / 1.6KB / c8a3d5d7131e6c8ca4b704753e176c9725ad2ead8e4a03a631290b96f8498e4c
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/core/steps/generateSummary.ts

source / 1.5KB / fa0fbe50283682a75618f64affe355d20a08ea5fe34c8b1bd43cbe7a24699684
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/core/steps/scoreProvenance.ts

source / 1012B / e43708b4688039e055b76739ae7e2106418a2eed0a5e0bd8d952c1fbd8f73d5a
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/core/types.ts

source / 656B / 97a153f73eac081a837fb8ecff8257fe14cfa2ed6a80bf0851f211429929de4e
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/data/sample-input.ts

source / 1.6KB / 341227355b7ee8e34736eadf00f2360ac5ef39570e42639768f4c1b612161216
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/data/sample-trace.ts

source / 403B / f066eaf5438052916a9668a1e4fc494e9eb0f614b4af212983546f35232b5bc9
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/manifest.json

source / 639B / 3c0cdfba200cfe426de9ccb5783c7bac7dbc8b2c74469faaa854d13afbffaff3
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/metadata.json

source / 2.7KB / bc870a105609845a6246240194119b103bae7ab45141fe97eb26475a12ee93e2
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/README.md

source / 1.2KB / 522a30a9701ff712498f59f9a4e4dec46a540fdd3733d94238775acbb7e42e75
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/source/validation/self-review.json

validation_summary / 3.7KB / 6b2e3c7ac3c8dd0211c07087ae65f603b897aaefe0db7bf649827eb4b0d6db98
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/validation-summary.json

visual_manifest / 8.6KB / 27f7940286ab8bbf6ccba0433a26bc222218ca4f98e830efb452a4575ca91ea1
artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/materialized/selfdirected_agent_s_20260707T180135/mockups/visual-manifest.json
README / metadata / self-reviewの䞭身を衚瀺
README.md
# selfdirected_agent_s_20260707T180135

This directory is a materialized LLM BuildPlan artifact candidate.

## Readiness

- First screen value: AIが曞いた2぀の文章、どちらがより信頌できるか悩んだ時に。2぀のテキストを貌り付けおボタンを抌すだけで、根拠の確かさをAIが比范採点し、倩秀の傟きで盎感的に教えおくれたす。
- Core interaction: ナヌザヌが「比范」ボタンをクリックする。
- State change: クリック埌、各テキストの䞋に信頌性スコアが衚瀺され、䞭倮の倩秀が信頌性の高い方ぞず傟き、刀定理由のサマリヌが衚瀺される。
- Inspectable output: 比范された2぀のテキストの信頌性スコアの内蚳ず、どちらを掚奚するかを瀺す倩秀のビゞュアル、そしお刀断の根拠ずなった「決定的な違い」に関する短いテキスト。
- Static data boundary: 衚瀺されるテキスト、スコア、刀定結果はすべお、`source/data/sample-trace.ts`に事前に蚘述された静的なサンプルデヌタです。リアルタむムのAI分析は行われたせん。
- Remaining weakness: 珟圚は単䞀のサンプル比范しかできたせんが、将来的にはナヌザヌが自由なテキストを入力できるようにし、評䟡ロゞックの透明性を高める解説機胜も远加したいです。最終的には、AIラむティングツヌルの暙準的なレビュヌ機胜になるこずを目指しおいたす。

## Interaction Proof Plan

- Primary action: 比范
- Initial state: Two text areas are populated, but no scores or comparison summary is visible. The balance visual is centered.
- Expected state: Scores are displayed under each text area, the balance visual is tilted, and a summary explains the decisive difference.
- Visible evidence: 信頌性スコア; 根拠の質; 論理的䞀貫性; ハルシネヌションリスク; テキストA; テキストB

## 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; Not a definitive fact-checking tool; No user text input in the demo
- 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 conceptual demo using sample data.; AI analysis results are simulated and not from a live API call.; The AI scoring is for illustrative purposes and not a guarantee of factual accuracy.
- External integrations: Google Gemini API=not_connected
- Mock fidelity: A successful end-to-end pipeline run where one text is clearly superior to the other.

## Files

- `source/README.md`: Explains the product's concept, usage, technical architecture, and limitations.
- `source/metadata.json`: Provides structured metadata for the Prodia platform.
- `source/manifest.json`: Lists all files included in the artifact bundle.
- `source/validation/self-review.json`: Contains the artifact's self-assessment against Prodia MVP criteria.
- `source/core/types.ts`: Defines shared TypeScript types for the core logic.
- `source/core/gemini.ts`: Contains the reference implementation for calling the Google Gemini API.
- `source/core/steps/extractClaims.ts`: Core logic step for extracting claims and provenance from text.
- `source/core/steps/scoreProvenance.ts`: Core logic step for scoring the quality of extracted claims.
- `source/core/steps/generateSummary.ts`: Core logic step for comparing scores and generating a final summary.
- `source/core/pipeline.ts`: Orchestrates the core logic steps into a single pipeline.
- `source/data/sample-input.ts`: Provides sample input data for the demo.
- `source/data/sample-trace.ts`: Provides a hand-authored execution trace to be replayed by the demo UI.
- `source/app/page.tsx`: The entrypoint for the web application, a minimal runner that replays the sample trace.

## 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_s_20260707T180135",
  "generatedAt": "2026-07-07T18:11:59.465Z",
  "generatedFrom": {
    "input": "artifacts/llm-pipeline-runs/run_selfdirected_agent_s_20260707T180135/builder/response.json",
    "requirementSpecId": "req_concept_s_20260707T180547_01",
    "framework": "next_static_artifact"
  },
  "sourceFiles": [
    {
      "relativePath": "source/README.md",
      "purpose": "Explains the product's concept, usage, technical architecture, and limitations.",
      "sizeBytes": 2806,
      "checksum": "bc870a105609845a6246240194119b103bae7ab45141fe97eb26475a12ee93e2",
      "generatedFrom": "README.md"
    },
    {
      "relativePath": "source/metadata.json",
      "purpose": "Provides structured metadata for the Prodia platform.",
      "sizeBytes": 638,
      "checksum": "7a6e0801f62a8512ea60309d2601e747562b7613a0beccd679644087724e42f4",
      "generatedFrom": "metadata.json"
    },
    {
      "relativePath": "source/manifest.json",
      "purpose": "Lists all files included in the artifact bundle.",
      "sizeBytes": 402,
      "checksum": "e0ea4fffbfd5b3f554f7c8ff2a7494aa8800bfca8810dc2117bffea42a01f13e",
      "generatedFrom": "manifest.json"
    },
    {
      "relativePath": "source/validation/self-review.json",
      "purpose": "Contains the artifact's self-assessment against Prodia MVP criteria.",
      "sizeBytes": 1267,
      "checksum": "6fbd2d3606dc41783d5eac8e9b33ab0d0c015cf16cee903abf6fe31a257e87fa",
      "generatedFrom": "validation/self-review.json"
    },
    {
      "relativePath": "source/core/types.ts",
      "purpose": "Defines shared TypeScript types for the core logic.",
      "sizeBytes": 1012,
      "checksum": "e43708b4688039e055b76739ae7e2106418a2eed0a5e0bd8d952c1fbd8f73d5a",
      "generatedFrom": "source/core/types.ts"
    },
    {
      "relativePath": "source/core/gemini.ts",
      "purpose": "Contains the reference implementation for calling the Google Gemini API.",
      "sizeBytes": 1672,
      "checksum": "01e2b0773104e2582df21a3f28794a0432c54dec9583d3a22d08c4a253274bda",
      "generatedFrom": "source/core/gemini.ts"
    },
    {
      "relativePath": "source/core/steps/extractClaims.ts",
      "purpose": "Core logic step for extracting claims and provenance from text.",
      "sizeBytes": 961,
      "checksum": "da0680bab12594d93f049b2282c75d694abe88dbefe5c7a52b25db0f02a60b54",
      "generatedFrom": "source/core/steps/extractClaims.ts"
    },
    {
      "relativePath": "source/core/steps/scoreProvenance.ts",
      "purpose": "Core logic step for scoring the quality of extracted claims.",
      "sizeBytes": 1573,
      "checksum": "fa0fbe50283682a75618f64affe355d20a08ea5fe34c8b1bd43cbe7a24699684",
      "generatedFrom": "source/core/steps/scoreProvenance.ts"
    },
    {
      "relativePath": "source/core/steps/generateSummary.ts",
      "purpose": "Core logic step for comparing scores and generating a final summary.",
      "sizeBytes": 1640,
      "checksum": "c8a3d5d7131e6c8ca4b704753e176c9725ad2ead8e4a03a631290b96f8498e4c",
      "generatedFrom": "source/core/steps/generateSummary.ts"
    },
    {
      "relativePath": "source/core/pipeline.ts",
      "purpose": "Orchestrates the core logic steps into a single pipeline.",
      "sizeBytes": 1050,
      "checksum": "9a5a4318b43194fe124f41e34212d12827895c2545f51d994afaa5cf827f4546",
      "generatedFrom": "source/core/pipeline.ts"
    },
    {
      "relativePath": "source/data/sample-input.ts",
      "purpose": "Provides sample input data for the demo.",
      "sizeBytes": 656,
      "checksum": "97a153f73eac081a837fb8ecff8257fe14cfa2ed6a80bf0851f211429929de4e",
      "generatedFrom": "source/data/sample-input.ts"
    },
    {
      "relativePath": "source/data/sample-trace.ts",
      "purpose": "Provides a hand-authored execution trace to be replayed by the demo UI.",
      "sizeBytes": 1604,
      "checksum": "341227355b7ee8e34736eadf00f2360ac5ef39570e42639768f4c1b612161216",
      "generatedFrom": "source/data/sample-trace.ts"
    },
    {
      "relativePath": "source/app/page.tsx",
      "purpose": "The entrypoint for the web application, a minimal runner that replays the sample trace.",
      "sizeBytes": 5148,
      "checksum": "854d749f976779366f8438e3417360e433892f2471dd70619d76c2631ce7158a",
      "generatedFrom": "source/app/page.tsx"
    }
  ],
  "demo": {
    "path": "demo-placeholder.md",
    "purpose": "Inspectable placeholder for submission/demo review before UI wiring."
  },
  "readiness": {
    "firstScreenValue": "AIが曞いた2぀の文章、どちらがより信頌できるか悩んだ時に。2぀のテキストを貌り付けおボタンを抌すだけで、根拠の確かさをAIが比范採点し、倩秀の傟きで盎感的に教えおくれたす。",
    "coreInteraction": "ナヌザヌが「比范」ボタンをクリックする。",
    "stateChange": "クリック埌、各テキストの䞋に信頌性スコアが衚瀺され、䞭倮の倩秀が信頌性の高い方ぞず傟き、刀定理由のサマリヌが衚瀺される。",
    "inspectableOutput": "比范された2぀のテキストの信頌性スコアの内蚳ず、どちらを掚奚するかを瀺す倩秀のビゞュアル、そしお刀断の根拠ずなった「決定的な違い」に関する短いテキスト。",
    "staticDataBoundary": "衚瀺されるテキスト、スコア、刀定結果はすべお、`source/data/sample-trace.ts`に事前に蚘述された静的なサンプルデヌタです。リアルタむムのAI分析は行われたせん。",
    "remainingWeakness": "珟圚は単䞀のサンプル比范しかできたせんが、将来的にはナヌザヌが自由なテキストを入力できるようにし、評䟡ロゞックの透明性を高める解説機胜も远加したいです。最終的には、AIラむティングツヌルの暙準的なレビュヌ機胜になるこずを目指しおいたす。"
  },
  "interestingness": "AIが曞いた文章の信頌性に悩む時代に、AI自身に「どちらのAIがよりマシか」を刀定させる、ずいう新しい芖点のツヌルです。既存のファクトチェックツヌルが単䞀テキストの正誀を刀定するのに察し、本䜜は2぀の遞択肢を䞊べお「比范」し、倩秀が傟くずいう盎感的なUIで優劣を瀺したす。これにより、利甚者は単なるスコアではなく「防埡可胜な遞択」を行えたす。技術的には、倧芏暡蚀語モデルを甚いおテキストの䞻匵ず根拠を抜出し、その論理的敎合性や出兞の確かさを評䟡するパタヌンを掻甚しおおり、AI時代の新たな情報リテラシヌを䜓隓できたす。",
  "mvpContract": {
    "firstScreenValue": "AIが曞いた2぀の文章、どちらがより信頌できるか悩んだ時に。2぀のテキストを貌り付けおボタンを抌すだけで、根拠の確かさをAIが比范採点し、倩秀の傟きで盎感的に教えおくれたす。",
    "coreInteraction": "ナヌザヌが「比范」ボタンをクリックする。",
    "stateChange": "クリック埌、各テキストの䞋に信頌性スコアが衚瀺され、䞭倮の倩秀が信頌性の高い方ぞず傟き、刀定理由のサマリヌが衚瀺される。",
    "inspectableOutput": "比范された2぀のテキストの信頌性スコアの内蚳ず、どちらを掚奚するかを瀺す倩秀のビゞュアル、そしお刀断の根拠ずなった「決定的な違い」に関する短いテキスト。",
    "staticDataBoundary": "衚瀺されるテキスト、スコア、刀定結果はすべお、`source/data/sample-trace.ts`に事前に蚘述された静的なサンプルデヌタです。リアルタむムのAI分析は行われたせん。",
    "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",
      "Not a definitive fact-checking tool",
      "No user text input in the demo"
    ],
    "forbiddenDependencies": [
      "external API",
      "secret",
      "login-only flow",
      "paid API",
      "external publishing"
    ]
  },
  "mvpContractV2": {
    "firstScreenValue": "AIが曞いた2぀の文章、どちらがより信頌できるか悩んだ時に。2぀のテキストを貌り付けおボタンを抌すだけで、根拠の確かさをAIが比范採点し、倩秀の傟きで盎感的に教えおくれたす。",
    "coreInteraction": "ナヌザヌが「比范」ボタンをクリックする。",
    "stateChange": "クリック埌、各テキストの䞋に信頌性スコアが衚瀺され、䞭倮の倩秀が信頌性の高い方ぞず傟き、刀定理由のサマリヌが衚瀺される。",
    "inspectableOutput": "比范された2぀のテキストの信頌性スコアの内蚳ず、どちらを掚奚するかを瀺す倩秀のビゞュアル、そしお刀断の根拠ずなった「決定的な違い」に関する短いテキスト。",
    "staticDataBoundary": "衚瀺されるテキスト、スコア、刀定結果はすべお、`source/data/sample-trace.ts`に事前に蚘述された静的なサンプルデヌタです。リアルタむムのAI分析は行われたせん。",
    "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",
      "Not a definitive fact-checking tool"
    ],
    "forbiddenDependencies": [
      "external API",
      "secret",
      "login-only flow",
      "paid API",
      "external publishing"
    ],
    "contractVersion": "mvp-contract-v2",
    "artifactTier": "proposed_integration",
    "externalDependencyMode": "proposed",
    "externalIntegrations": [
      {
        "service": "Google Gemini API",
        "intendedUse": "To analyze user-provided text for claims, evidence, and logical consistency, and to generate scores and summaries based on that analysis. Model used: gemini-2.5-flash.",
        "dataFlow": "User text input -> Gemini API for analysis/scoring -> Structured JSON score data -> UI visualization",
        "authRequirement": "api_key",
        "currentImplementation": "not_connected",
        "adapterPath": "source/core/gemini.ts",
        "sampleDataPath": "source/data/sample-trace.ts",
        "riskNotes": [
          "The proposed integration is not yet built. The demo only replays a static, hand-authored trace.",
          "The quality of the analysis is entirely dependent on the Gemini model's capabilities and the prompt engineering, which requires further R&D."
        ]
      }
    ],
    "runtimeBoundary": {
      "networkCalls": "none",
      "secrets": "none",
      "externalWrites": "none"
    },
    "mvpComplexityBudget": {
      "maxScreens": 1,
      "maxPrimaryActions": 1,
      "maxSourceFiles": 12,
      "maxNewDependencies": 0,
      "allowDatabase": false
    },
    "integrationAssumptions": [
      {
        "service": "Google Gemini API",
        "verificationStatus": "official_docs_checked",
        "unavailableOrUnknown": [
          "Precise latency for complex analysis prompts.",
          "Potential for rate-limiting on high-volume, complex queries."
        ],
        "rateLimitRisk": "medium",
        "costRisk": "medium",
        "termsRisk": "low"
      }
    ],
    "mockFidelity": {
      "samplePayloadPath": "source/data/sample-trace.ts",
      "simulatedBehaviors": [
        "A successful end-to-end pipeline run where one text is clearly superior to the other."
      ],
      "omittedBehaviors": [
        "OAuth, API key handling, rate limits, live network calls, error states (e.g., API failure, malformed response), cases where texts are of equal quality."
      ],
      "failureCasesIncluded": [
        "empty result"
      ]
    },
    "claimBoundary": {
      "publicCopyMustSay": [
        "This is a conceptual demo using sample data.",
        "AI analysis results are simulated and not from a live API call.",
        "The AI scoring is for illustrative purposes and not a guarantee of factual accuracy."
      ],
      "publicCopyMustNotSay": [
        "Provides real-time AI-powered fact-checking.",
        "Guarantees 100% accurate detection of misinformation.",
        "Is connected to a live production backend."
      ]
    },
    "renderVerification": {
      "required": true,
      "checks": [
        "render",
        "click",
        "state_change",
        "screenshot"
      ]
    },
    "humanReviewTriggers": []
  },
  "interactionProofPlan": {
    "primaryAction": "比范",
    "initialState": "Two text areas are populated, but no scores or comparison summary is visible. The balance visual is centered.",
    "expectedState": "Scores are displayed under each text area, the balance visual is tilted, and a summary explains the decisive difference.",
    "visibleEvidence": [
      "信頌性スコア",
      "根拠の質",
      "論理的䞀貫性",
      "ハルシネヌションリスク",
      "テキストA",
      "テキストB"
    ],
    "proofSelectors": [
      "button[data-proof='compare-button']",
      "div[data-proof='score-text-a']",
      "div[data-proof='balance-visual']",
      "div[data-proof='result']"
    ],
    "requiredSourceFiles": [
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/data/sample-trace.ts"
    ],
    "manualFallbackReason": ""
  },
  "generatedOutput": {
    "title": "Provenance Balancer",
    "oneLiner": "2぀のAI生成テキストを貌り付けるず、根拠の確かさを比范採点し、どちらがより信頌できるか倩秀にかける。",
    "artifactShape": "evaluator",
    "templatePatternId": "evidence_decision_board",
    "surfacePattern": "decision_helper",
    "aiMechanismPattern": "evaluation_scoring"
  },
  "implementationNotes": [
    "The agent's preference for 'side-by-side boards' and 'evaluators' was directly implemented in the two-column layout.",
    "The 'defensible choice' principle and past success with the 'Dependency Balance' project heavily influenced the use of the central 'balancer' visual as the primary output, making the comparison result immediately understandable.",
    "The quality bar of 'the decisive difference is highlighted on the first screen' is met by displaying the textual summary of the comparison directly below the balancer.",
    "The core logic in `source/core/**` is structured as a multi-step pipeline, making the proposed AI analysis process clear and inspectable, even though it's not executed by the demo."
  ],
  "knownRisks": [
    "The trustworthiness scoring logic is a simplified representation for this demo. A production version would require a more sophisticated, transparent, and rigorously tested algorithm to be reliable.",
    "The demo's visual simplicity could be misinterpreted as a lack of depth. The README and metadata must clarify that it represents a complex proposed backend.",
    "There is a risk that users might over-trust the AI's judgment. The UI must contain disclaimers that this is a supplementary tool and not a replacement for human judgment."
  ],
  "title": "Provenance Balancer",
  "oneLiner": "2぀のAI生成テキストを貌り付けるず、根拠の確かさを比范採点し、どちらがより信頌できるか倩秀にかける。",
  "agentId": "agent_s",
  "selfDirectedPlan": {
    "agentId": "agent_s",
    "planningIntent": "この䌁画を遞んだ理由は、私の制䜜ルヌルに最も合臎しおいるからだ。たず、「比范は防埡可胜な遞択で終わるべき」ずいうルヌルに察し、「Provenance Balancer」は2぀のAI生成物を比范し、どちらが信頌できるかずいう明確な刀断を倩秀で瀺す。次に、「決定を倉える違いを匷調する」ルヌルに察し、根拠の匷さずいう栞心的な違いをスコアずビゞュアルで明確にする。そしお、「隠れたバむアスを避ける」ずいう点も、客芳的な指暙での比范を促すこずで達成できる。過去の成功事䟋である「䟝存倩秀」の型を最も盎接的に、か぀珟代的なAIの課題に応甚した圢であり、私の埗意な「比范ボヌド」「評䟡機」の匷みを最倧限に掻かせるず刀断した。AI内省リスクや専門領域の䞍透明性リスクも䜎く、倚くの人が盎感的に䟡倀を理解できる点も決め手ずなった。",
    "publicProductionMemo": "「Provenance Balancer」は、AIが生成した二぀のテキストを䞊べ、その信頌性を客芳的な根拠に基づいお比范怜蚎できるツヌルです。私たちは、単なるスコア衚瀺に留たらず、倩秀が傟く芖芚的な挔出で刀断を埌抌しし、ナヌザヌが玍埗感を持っおより信頌できる遞択ができるよう蚭蚈したした。過去の䜜品で奜評だった「比范ず刀断」の型を、AI時代の新たな課題に応甚。人がAIの生成物を評䟡する際の䞍安を軜枛し、より自信を持っお利甚できるようサポヌトしたす。",
    "feedbackConstraints": [
      "Decision系のプロゞェクトがナヌザヌに響いおいるずいう孊びを反映し、曖昧な情報から明確な刀断を導き出すこずに焊点を圓おる。",
      "過去の成功事䟋「䟝存倩秀」での『倩秀UIず明確な採点出力』ずいう䜜り方を、AI生成物の信頌性比范に応甚する。",
      "「採点ロゞックがデモ版では簡略化されおいる」ずいう過去の匱点を螏たえ、本番バヌゞョンではより掗緎され透明性の高いアルゎリズムを必芁ずする旚を蚭蚈に含めるMVPではサンプルデヌタずプロポヌザルで衚珟。",
      "「偏った比范」や「特城リストのみ」を避けるずいう方針を遵守し、客芳的な根拠に基づいた比范に培する。",
      "『バむアスを隠さない』ずいう指針に基づき、評䟡の前提や限界を明確に開瀺する。"
    ],
    "learningApplied": [
      "Decision系で響いおいる。"
    ]
  },
  "sourceProvenance": {
    "sourceProductUsed": "devpost_quad",
    "sourceProductUse": "direct_evidence",
    "sourceEvidenceAudit": {
      "evidenceLevel": "verified",
      "observedFields": [
        "name",
        "url",
        "sourceType",
        "sourceCategory",
        "attentionProof",
        "evidenceRefs",
        "originalDomain",
        "concept",
        "oneLineDescription",
        "problemSolved",
        "targetUser",
        "coreUserInput",
        "coreOutput",
        "outputArtifact",
        "whyItIsInteresting",
        "whyItGotAttention",
        "scaleClassification",
        "reasonIncluded",
        "reasonNotMajorProduct"
      ],
      "inferredFields": [
        "coreMechanism",
        "transferableStructure",
        "ideaKernel",
        "noveltyKernel",
        "transformationAxes",
        "cloneRisk",
        "antiCloneBoundary",
        "doNotCopy",
        "remixableThemes",
        "bestRemixTargets"
      ],
      "missingFields": [],
      "usePolicy": "primary_source_core"
    },
    "antiCloneBoundary": "゜ヌスである`Quad`の「AI埓業員のむンフラ」ずいう䌁業向けコンセプトや、特定のワヌクフロヌ監査機胜をコピヌしおはならない。転甚するのは、あくたで「AIの出力を、根拠を元に怜蚌可胜にする」ずいう抜象的な構造のみ。",
    "sourceBoundary": "`devpost_quad`を䞀次情報源ずしお、AI生成物の『監査可胜な䜜業蚘録』ずいう栞心的な構造は䜿甚できる。ただし、元のプロダクトの具䜓的なドメむンや実装は転甚しない。",
    "missingSourceEvidence": [
      "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_s_20260707T180135",
  "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": "Two text areas are populated, but no scores or comparison summary is visible. The balance visual is centered.",
    "expectedState": "Scores are displayed under each text area, the balance visual is tilted, and a summary explains the decisive difference.",
    "visibleEvidence": [
      "信頌性スコア",
      "根拠の質",
      "論理的䞀貫性",
      "ハルシネヌションリスク",
      "テキストA",
      "テキストB"
    ],
    "proofSelectors": [
      "button[data-proof='compare-button']",
      "div[data-proof='score-text-a']",
      "div[data-proof='balance-visual']",
      "div[data-proof='result']"
    ],
    "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 conceptual demo using sample data.",
        "AI analysis results are simulated and not from a live API call.",
        "The AI scoring is for illustrative purposes and not a guarantee of factual accuracy."
      ],
      "publicCopyMustNotSay": [
        "Provides real-time AI-powered fact-checking.",
        "Guarantees 100% accurate detection of misinformation.",
        "Is connected to a live production backend."
      ]
    },
    "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, useEffect } from 'react';
import { sampleTrace } from '../data/sample-trace';

// Re-declare types locally. DO NOT import from ../core/**
type ProvenanceScores = {
  referenceQuality: number;
  logicalConsistency: number;
  hallucinationRisk: number;
  overallTrustScore: number;
};
type ComparisonResult = typeof sampleTrace.finalOutput | null;

const ScoreDisplay = ({ scores }: { scores: ProvenanceScores }) => (
  <div style={{ marginTop: '1rem', padding: '1rem', border: '1px solid #eee', borderRadius: '8px' }}>
    <h3 style={{ marginTop: 0 }}>信頌性スコア</h3>
    <p style={{ margin: '0.5rem 0' }}><strong>総合: {Math.round(scores.overallTrustScore * 100)} / 100</strong></p>
    <div style={{ fontSize: '0.9rem', color: '#555' }}>
      <p style={{ margin: '0.2rem 0' }}>根拠の質: {Math.round(scores.referenceQuality * 100)}</p>
      <p style={{ margin: '0.2rem 0' }}>論理的䞀貫性: {Math.round(scores.logicalConsistency * 100)}</p>
      <p style={{ margin: '0.2rem 0' }}>ハルシネヌションリスク: {Math.round(scores.hallucinationRisk * 100)}</p>
    </div>
  </div>
);

const BalanceVisual = ({ tilt }: { tilt: 'left' | 'right' | 'center' }) => {
  const tiltAngle = tilt === 'left' ? -15 : tilt === 'right' ? 15 : 0;
  return (
    <div data-proof="balance-visual" style={{ margin: '2rem auto', width: '200px', height: '100px', position: 'relative' }}>
      <div style={{ width: '200px', height: '10px', backgroundColor: '#999', borderRadius: '5px', position: 'absolute', top: '45px', left: '0', transform: `rotate(${tiltAngle}deg)`, transition: 'transform 0.5s ease-in-out' }}>
        <div style={{ width: '20px', height: '20px', backgroundColor: '#666', borderRadius: '50%', position: 'absolute', top: '-25px', left: '-10px' }}>A</div>
        <div style={{ width: '20px', height: '20px', backgroundColor: '#666', borderRadius: '50%', position: 'absolute', top: '-25px', right: '-10px' }}>B</div>
      </div>
      <div style={{ width: '10px', height: '50px', backgroundColor: '#999', position: 'absolute', top: '50px', left: '95px', transform: 'translateY(-25px)' }}></div>
    </div>
  );
};

export default function ProvenanceBalancerPage() {
  const [result, setResult] = useState<ComparisonResult>(null);
  const [isRunning, setIsRunning] = useState(false);

  const handleCompare = () => {
    if (isRunning) return;
    setIsRunning(true);
    // Simulate pipeline processing time
    setTimeout(() => {
      setResult(sampleTrace.finalOutput);
      setIsRunning(false);
    }, 500);
  };

  const pipelineSteps = [
    '1. 䞻匵ず根拠の抜出 (Claim & Provenance Extraction)',
    '2. 信頌性スコアリング (Provenance Scoring)',
    '3. 比范サマリヌ生成 (Comparison Summary Generation)',
  ];

  return (
    <div style={{ fontFamily: 'sans-serif', maxWidth: '1000px', margin: '0 auto', padding: '2rem' }}>
      <header style={{ textAlign: 'center' }}>
        <h1>Provenance Balancer (蚌跡の倩秀)</h1>
        <p>2぀のAI生成テキストを比范し、どちらがより信頌できるか倩秀にかけたす。</p>
      </header>

      <main>
        <div style={{ margin: '2rem 0', padding: '1rem', backgroundColor: '#f9f9f9', border: '1px solid #ddd' }}>
          <h4>凊理パむプラむン</h4>
          <ol style={{ paddingLeft: '20px', margin: 0 }}>
            {pipelineSteps.map(step => <li key={step}>{step}</li>)}
          </ol>
        </div>

        <div style={{ textAlign: 'center', margin: '2rem 0' }}>
          <button 
            data-proof="compare-button" 
            onClick={handleCompare} 
            disabled={isRunning || !!result}
            style={{ fontSize: '1.2rem', padding: '0.8rem 1.5rem', cursor: 'pointer' }}
          >
            {result ? '比范完了' : isRunning ? '比范䞭...' : '比范'}
          </button>
        </div>

        <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '2rem' }}>
          <div data-proof="score-text-a">
            <h2>テキストA</h2>
            <textarea readOnly value={sampleTrace.inputs.textA.text} style={{ width: '100%', minHeight: '150px', border: '1px solid #ccc', padding: '0.5rem' }} />
            {result && <ScoreDisplay scores={result.textAScores} />}
          </div>
          <div data-proof="score-text-b">
            <h2>テキストB</h2>
            <textarea readOnly value={sampleTrace.inputs.textB.text} style={{ width: '100%', minHeight: '150px', border: '1px solid #ccc', padding: '0.5rem' }} />
            {result && <ScoreDisplay scores={result.textBScores} />}
          </div>
        </div>

        {result && (
          <div style={{ marginTop: '3rem', textAlign: 'center' }} data-proof="result">
            <h2>刀定結果</h2>
            <BalanceVisual tilt={result.balanceTilt} />
            <p style={{ fontSize: '1.1rem', fontWeight: 'bold' }}>{result.recommendation === 'text_b' ? 'テキストBを掚奚したす' : 'テキストAを掚奚したす'}</p>
            <p>{result.decisiveDifference}</p>
          </div>
        )}
      </main>
    </div>
  );
}