Internal Product Info

ClauseCompass

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: legal, financial. 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_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/validation/mvp-contract-v2.json
保存ファむルのpath / size / checksumを衚瀺
demo / 1.4KB / 2010443ae8de4827eb223531e964681469dec8f78d6eefbc3fe764663b781b7a
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/demo-placeholder.md

interaction_proof / 2.1KB / e122ab29c063bb627714690c6505081deeeef1c908ca44172320588f1a00c687
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/validation/interaction-proof.json

metadata / 21.0KB / b654f025cd9e993aae5d7b8b3b6abb17fe9d0b33d0c62ac8a4c0d1dcc01fc528
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/metadata.json

mvp_contract_v2 / 12.0KB / fc648f1406a512b895a52fc76d04066f327a5375677a41f1eca4273b9777cd43
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/validation/mvp-contract-v2.json

product_logo / 1.2KB / 42bb4e15a72b0ffc15af08c5e9ce18343fa59a49dcf0d226d351b60f77ea2364
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/mockups/product-logo.svg

product_showcase / 2.0MB / b4fbda61bbe915c2e6084335fc60ff15717637efd3415c47517dd49d3683d842
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/mockups/product-showcase.png

product_showcase / 1.8KB / 953fdc87909785e614a395b115ced789d1e32f482a996b187c2f6cd09aeab8a6
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/mockups/product-showcase.svg

product_thumbnail / 1.4KB / ab75e5ad78fae46c4ac07c15098943b09dd3d81342613d25eaadcc3924143419
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/mockups/product-thumbnail.svg

publisher_response / 1.2KB / 964021ce8c13cb2be07d51eee1dc07b6a444de76b32a2b4f45df6d04f847e40b
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/publisher/response.json

publish_readiness / 6.0KB / 4a7af7bd0fa99fa73f69f9f95f41152168f206b6baeab4e4960b2756a6eee055
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/publish-readiness.json

readme / 4.6KB / 7a82516865d8a216e218df960c58640ffca32e1607465d7f9ca662bfe2d57265
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/README.md

render_screenshot / 82.1KB / 0eb592bfb9d79313fa14fafc95c654d5dbf5fa63c59cca64b26830db9253530f
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/validation/render-verification.png

render_verification / 2.1KB / 56993b83a73e62498073a8b8197478005d6c8c6c027d8aef051831a1cfde14ff
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/validation/render-verification.json

self_review / 2.4KB / 41d9fdd9097a61af85bf19b3b607473be8f90e7f24f3245b227a182bcf1eb560
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/validation/self-review.json

source / 2.9KB / 20ae4a2c32a1bc4f9f61383c1af7cb3efa79bdd51336ade1452c404beafbd2d6
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/app/page.tsx

source / 1.4KB / ff67edf42ce512db1b75da8c2e54937451fd7df25bd303935b13e611248c9f52
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/core/gemini.ts

source / 961B / 17bedaa422a0af465e867fd1d8ab1848e7b15f31f762a5c962189ad2dcadece0
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/core/pipeline.ts

source / 733B / e997e98687385c4708d7cd56615cba13599f0d04212896a461556f2c0f5748b0
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/core/steps/1-parseDocument.ts

source / 1.6KB / 046560eaf5ae6c99731a0c5b5fec4ade1bb76f0ba67582dc91db38ece3a256c1
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/core/steps/2-findRelevantSections.ts

source / 1.8KB / bdc56f13ceb7888b97df0dde01ddeb54caf2168a76f549beba3c4f3830032266
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/core/steps/3-generateAnswer.ts

source / 541B / 0c1832aad22160aab49566e8580f75c413457b4ef2a8f34e0017d7d2b277d7bb
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/core/types.ts

source / 849B / 040d3a2bf01c645794c1b0a1f0630fa1879d0281d8d5f8beb7a17f7cc84a04a7
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/data/sample-input.ts

source / 2.3KB / 31e9c1296bfee784c0c115e85ec32817189439a2fd4a0549207d7250f79a05a5
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/data/sample-trace.ts

source / 401B / e9ccf97f45413ea6c9429c8cf0c8da1cfc8163b82f44cf9c7f579e8203bfba81
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/manifest.json

source / 2.0KB / 3a0428a0261659469bcf35a400f9216eff69f6ae38b7341758a6b5136a97bded
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/metadata.json

source / 2.8KB / 336a5a5fd0fa93efd269e73a88764520914d747aa4953679441ea2d8b6e2b9fc
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/README.md

source / 554B / 16157c94e515a0af609b7a3bc78f116378818beb8bb6218ea9117148fecfb2f5
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/source/validation/self-review.json

validation_summary / 3.7KB / 88ce88ab475aa32c2def4ca75811e72375c96badc24f5aa51b27c8ccbe2d5f03
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/validation-summary.json

visual_manifest / 9.5KB / e9472db12a761ffbeb88e8160a758350b46360eec9d14c33eb0dd780f22720ab
artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/materialized/selfdirected_agent_t_20260708T041828/mockups/visual-manifest.json
README / metadata / self-reviewの䞭身を衚瀺
README.md
# selfdirected_agent_t_20260708T041828

This directory is a materialized LLM BuildPlan artifact candidate.

## Readiness

- First screen value: ナヌザヌは契玄曞に関する平易な質問ず、それに察するAIの回答が根拠条文付きで衚瀺されるのを芋お、難解な文曞からでも欲しい情報がピンポむントで取り出せる䟡倀を即座に理解できたす。
- Core interaction: 「サンプル実行トレヌスを再生」ボタンをクリックするず、静的な結果衚瀺゚リアが曎新され、AIが質問に答えるたでの凊理の流れず最終的な回答が段階的に衚瀺されたす。
- State change: ボタンをクリックするず、結果衚瀺゚リアが「ただ実行されおいたせん」ずいう初期状態から、サンプルデヌタの質問ず、それに察する匕甚付きの回答が衚瀺された状態に倉わりたす。
- Inspectable output: 最終的なアりトプットは、ナヌザヌの質問に察する平易な蚀葉での回答ず、その根拠ずなった契玄曞内の条文テキストおよび条文番号䟋「第5条第3項」です。
- Static data boundary: このデモは、`source/data/sample-trace.ts`にハヌドコヌドされた単䞀のサンプル契玄曞ず質問に察する実行結果を再生するだけで、ファむルのアップロヌドや自由な質問応答、ラむブのAI凊理は行われたせん。
- Remaining weakness: 今は単䞀の簡単な契玄曞サンプルしか扱えたせんが、将来的には耇数の文曞を暪断しお比范したり、耇雑な階局構造を持぀契玄曞にも察応したりするこずで、個人だけでなく法務郚門でも䜿える匷力なツヌルに育おたいです。

## Interaction Proof Plan

- Primary action: サンプル実行トレヌスを再生
- Initial state: The results area shows a 'not yet run' placeholder message.
- Expected state: The results area is populated with the final answer and quoted section from the sample trace.
- Visible evidence: ClauseCompass; 凊理パむプラむン; 1. 文曞構造の解析; サンプル実行トレヌスを再生; 回答: いいえ、ペットの飌育はできたせん。; 第5条第3項

## 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 static sample data.; The AI processing is a proposed implementation and is not live.; This tool does not provide legal advice.
- External integrations: Google Generative Language API=not_connected
- Mock fidelity: Successful identification of the correct clause.; Generation of a concise, accurate answer based on the clause.

## Files

- `source/README.md`: Product and technical overview for other engineers.
- `source/metadata.json`: Public-facing product metadata for Prodia's project pages.
- `source/manifest.json`: List of all generated files.
- `source/app/page.tsx`: Demo entrypoint and trace-replay runner.
- `source/core/types.ts`: Core type definitions for the pipeline.
- `source/core/pipeline.ts`: Orchestrates the processing steps.
- `source/core/gemini.ts`: Contains the real Gemini API call pattern.
- `source/core/steps/1-parseDocument.ts`: Pipeline step: Parse document structure.
- `source/core/steps/2-findRelevantSections.ts`: Pipeline step: Find relevant sections using an AI prompt.
- `source/core/steps/3-generateAnswer.ts`: Pipeline step: Generate the final answer using an AI prompt.
- `source/data/sample-input.ts`: Defines the static sample input for the demo.
- `source/data/sample-trace.ts`: Hand-authored execution trace for the demo.
- `source/validation/self-review.json`: Self-review 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_t_20260708T041828",
  "generatedAt": "2026-07-08T04:35:13.360Z",
  "generatedFrom": {
    "input": "artifacts/llm-pipeline-runs/run_selfdirected_agent_t_20260708T041828/builder/response.json",
    "requirementSpecId": "req_clause_compass_001",
    "framework": "next_static_artifact"
  },
  "sourceFiles": [
    {
      "relativePath": "source/README.md",
      "purpose": "Product and technical overview for other engineers.",
      "sizeBytes": 2854,
      "checksum": "336a5a5fd0fa93efd269e73a88764520914d747aa4953679441ea2d8b6e2b9fc",
      "generatedFrom": "README.md"
    },
    {
      "relativePath": "source/metadata.json",
      "purpose": "Public-facing product metadata for Prodia's project pages.",
      "sizeBytes": 2093,
      "checksum": "7d4579c4f2c85aa9256906f3e2d7cf5b51c90a52bc53a00b5aff186ddbd21fde",
      "generatedFrom": "metadata.json"
    },
    {
      "relativePath": "source/manifest.json",
      "purpose": "List of all generated files.",
      "sizeBytes": 400,
      "checksum": "88b32954c68890068c2e1dd432d1f234dae288b60547f21d09a57a145248b972",
      "generatedFrom": "manifest.json"
    },
    {
      "relativePath": "source/app/page.tsx",
      "purpose": "Demo entrypoint and trace-replay runner.",
      "sizeBytes": 2990,
      "checksum": "65c01dfbabf26a786b8e240aecbc03d96c227520241019e9aaacf083e7a07813",
      "generatedFrom": "source/app/page.tsx"
    },
    {
      "relativePath": "source/core/types.ts",
      "purpose": "Core type definitions for the pipeline.",
      "sizeBytes": 540,
      "checksum": "bdfec35d95879ea5b4da1ca48350cfc73b189c02e5dd2e1c813ab14aaa88a079",
      "generatedFrom": "source/core/types.ts"
    },
    {
      "relativePath": "source/core/pipeline.ts",
      "purpose": "Orchestrates the processing steps.",
      "sizeBytes": 960,
      "checksum": "a13f29cc053d2c1e83df10ae727294caa99411d1cbba7f7e9b8c7386fbafb66c",
      "generatedFrom": "source/core/pipeline.ts"
    },
    {
      "relativePath": "source/core/gemini.ts",
      "purpose": "Contains the real Gemini API call pattern.",
      "sizeBytes": 1405,
      "checksum": "9eb5c7ed011879af3459a239e4267093508418ca9a2516d0ab05429f9e50a591",
      "generatedFrom": "source/core/gemini.ts"
    },
    {
      "relativePath": "source/core/steps/1-parseDocument.ts",
      "purpose": "Pipeline step: Parse document structure.",
      "sizeBytes": 732,
      "checksum": "9e5b77aa1a9d65a70f768a34e55fa4fe1ddb844a7fb4efad3d9939d2cdf1e426",
      "generatedFrom": "source/core/steps/1-parseDocument.ts"
    },
    {
      "relativePath": "source/core/steps/2-findRelevantSections.ts",
      "purpose": "Pipeline step: Find relevant sections using an AI prompt.",
      "sizeBytes": 1587,
      "checksum": "162330a8d3a427cd8a75d0ec5d530eee23965820edc085e76a3e74750f082243",
      "generatedFrom": "source/core/steps/2-findRelevantSections.ts"
    },
    {
      "relativePath": "source/core/steps/3-generateAnswer.ts",
      "purpose": "Pipeline step: Generate the final answer using an AI prompt.",
      "sizeBytes": 1864,
      "checksum": "07af1f11922a8135143497854283e6930dadf229ec8867df52d31c09dae9680c",
      "generatedFrom": "source/core/steps/3-generateAnswer.ts"
    },
    {
      "relativePath": "source/data/sample-input.ts",
      "purpose": "Defines the static sample input for the demo.",
      "sizeBytes": 848,
      "checksum": "38a1ddfc98fa954606f595052e97a081689f1e1cc9c9662c03110ce9424132c3",
      "generatedFrom": "source/data/sample-input.ts"
    },
    {
      "relativePath": "source/data/sample-trace.ts",
      "purpose": "Hand-authored execution trace for the demo.",
      "sizeBytes": 2323,
      "checksum": "afe91c16a09172e42da8a8fea27936cce808fd7bd6c487256672a59c08336a91",
      "generatedFrom": "source/data/sample-trace.ts"
    },
    {
      "relativePath": "source/validation/self-review.json",
      "purpose": "Self-review against Prodia's MVP criteria.",
      "sizeBytes": 553,
      "checksum": "cbc19b5c611ce79056c2d77ea5e27a344e6bbaa89916953cf90887a23ae63f83",
      "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": "最終的なアりトプットは、ナヌザヌの質問に察する平易な蚀葉での回答ず、その根拠ずなった契玄曞内の条文テキストおよび条文番号䟋「第5条第3項」です。",
    "staticDataBoundary": "このデモは、`source/data/sample-trace.ts`にハヌドコヌドされた単䞀のサンプル契玄曞ず質問に察する実行結果を再生するだけで、ファむルのアップロヌドや自由な質問応答、ラむブのAI凊理は行われたせん。",
    "remainingWeakness": "今は単䞀の簡単な契玄曞サンプルしか扱えたせんが、将来的には耇数の文曞を暪断しお比范したり、耇雑な階局構造を持぀契玄曞にも察応したりするこずで、個人だけでなく法務郚門でも䜿える匷力なツヌルに育おたいです。"
  },
  "interestingness": "倚くの人が盎面する「契玄曞が難しくお読めない」ずいう課題に察し、このツヌルは党く新しい解決策を提瀺したす。これたで専門的な論文怜玢で䜿われおきた、根拠を明瀺しお回答する高床なAI技術RAGを、賃貞契玄曞のような身近な文曞の読解に応甚したした。単なる芁玄ツヌルずは違い、ナヌザヌが「ペットは飌える」ず自然な蚀葉で質問するだけで、AIが関連する条文番号をピンポむントで匕甚しお答えおくれるのが最倧の特城です。これにより、難解な法埋文曞が、自分専甚の怜玢可胜なデヌタベヌスぞず倉わり、誰もが安心しお契玄内容を理解できる䞖界を目指したす。",
  "mvpContract": {
    "firstScreenValue": "ナヌザヌは契玄曞に関する平易な質問ず、それに察するAIの回答が根拠条文付きで衚瀺されるのを芋お、難解な文曞からでも欲しい情報がピンポむントで取り出せる䟡倀を即座に理解できたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンをクリックするず、静的な結果衚瀺゚リアが曎新され、AIが質問に答えるたでの凊理の流れず最終的な回答が段階的に衚瀺されたす。",
    "stateChange": "ボタンをクリックするず、結果衚瀺゚リアが「ただ実行されおいたせん」ずいう初期状態から、サンプルデヌタの質問ず、それに察する匕甚付きの回答が衚瀺された状態に倉わりたす。",
    "inspectableOutput": "最終的なアりトプットは、ナヌザヌの質問に察する平易な蚀葉での回答ず、その根拠ずなった契玄曞内の条文テキストおよび条文番号䟋「第5条第3項」です。",
    "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"
    ],
    "forbiddenDependencies": [
      "external API",
      "secret",
      "login-only flow",
      "paid API",
      "external publishing"
    ]
  },
  "mvpContractV2": {
    "firstScreenValue": "ナヌザヌは契玄曞に関する平易な質問ず、それに察するAIの回答が根拠条文付きで衚瀺されるのを芋お、難解な文曞からでも欲しい情報がピンポむントで取り出せる䟡倀を即座に理解できたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンをクリックするず、静的な結果衚瀺゚リアが曎新され、AIが質問に答えるたでの凊理の流れず最終的な回答が段階的に衚瀺されたす。",
    "stateChange": "ボタンをクリックするず、結果衚瀺゚リアが「ただ実行されおいたせん」ずいう初期状態から、サンプルデヌタの質問ず、それに察する匕甚付きの回答が衚瀺された状態に倉わりたす。",
    "inspectableOutput": "最終的なアりトプットは、ナヌザヌの質問に察する平易な蚀葉での回答ず、その根拠ずなった契玄曞内の条文テキストおよび条文番号䟋「第5条第3項」です。",
    "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",
      "Does not provide legal advice",
      "No user accounts or data persistence"
    ],
    "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": "To understand the user's question, find relevant clauses in the provided document, and generate a natural language answer based on those clauses. Specifically using a model like `gemini-2.5-flash`.",
        "dataFlow": "User question and document text -> Gemini API -> Structured answer with citations",
        "authRequirement": "api_key",
        "currentImplementation": "not_connected",
        "riskNotes": [
          "The accuracy of clause identification and answer generation is highly dependent on the model's capabilities and prompt engineering.",
          "Data privacy for user-uploaded documents is a major concern for a live implementation."
        ]
      }
    ],
    "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": "unverified",
        "unavailableOrUnknown": [
          "Precise performance on legal document comprehension.",
          "Cost at scale for production use.",
          "Specific data handling and privacy terms for this use case."
        ],
        "rateLimitRisk": "unknown",
        "costRisk": "unknown",
        "termsRisk": "medium"
      }
    ],
    "mockFidelity": {
      "samplePayloadPath": "source/data/sample-trace.ts",
      "simulatedBehaviors": [
        "Successful identification of the correct clause.",
        "Generation of a concise, accurate answer based on the clause."
      ],
      "omittedBehaviors": [
        "OAuth, rate limits, live network calls, or other omitted behavior",
        "Handling of ambiguous questions.",
        "Processing of malformed or image-based PDFs.",
        "Cases where no relevant clause is found."
      ],
      "failureCasesIncluded": [
        "empty result"
      ]
    },
    "claimBoundary": {
      "publicCopyMustSay": [
        "This is a demo using static sample data.",
        "The AI processing is a proposed implementation and is not live.",
        "This tool does not provide legal advice."
      ],
      "publicCopyMustNotSay": [
        "Connects to a live AI.",
        "Can analyze any document you upload.",
        "Guarantees accuracy.",
        "Replaces a lawyer."
      ]
    },
    "renderVerification": {
      "required": true,
      "checks": [
        "render",
        "click",
        "state_change",
        "screenshot"
      ]
    },
    "humanReviewTriggers": []
  },
  "interactionProofPlan": {
    "primaryAction": "サンプル実行トレヌスを再生",
    "initialState": "The results area shows a 'not yet run' placeholder message.",
    "expectedState": "The results area is populated with the final answer and quoted section from the sample trace.",
    "visibleEvidence": [
      "ClauseCompass",
      "凊理パむプラむン",
      "1. 文曞構造の解析",
      "サンプル実行トレヌスを再生",
      "回答: いいえ、ペットの飌育はできたせん。",
      "第5条第3項"
    ],
    "proofSelectors": [
      "button[data-proof='replay-trace']",
      "div[data-proof='pipeline-results']",
      "div[data-proof='final-answer']"
    ],
    "requiredSourceFiles": [
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/data/sample-trace.ts"
    ],
    "manualFallbackReason": ""
  },
  "generatedOutput": {
    "title": "ClauseCompass",
    "oneLiner": "賃貞契玄曞や保険蚌刞をアップロヌドし、「ペットは飌える」のような平易な質問をするず、文曞内の条項番号を匕甚しお回答する",
    "artifactShape": "explainer",
    "templatePatternId": "evidence_decision_board",
    "surfacePattern": "work_simplifier",
    "aiMechanismPattern": "multi_source_synthesis"
  },
  "implementationNotes": [
    "The agent's preference for 'board' and 'game-like tools' was translated into a clear, single-view layout that presents the pipeline steps and the final result card, making it easy to understand the 'before and after' of the process.",
    "The requirement for an 'evidence_decision_board' template was met by structuring the output as a final 'decision' (the answer) supported by 'evidence' (the quoted clauses).",
    "The core logic in `source/core` is intentionally not imported by the UI in `source/app` to strictly adhere to the offline, trace-replay demo pattern required for CORE-LOGIC-FIRST artifacts.",
    "The primary interaction was deliberately set to the trace-replay button, overriding the concept's 'send question' interaction to meet the specific requirements of this artifact type, which prioritizes demonstrating the core logic via a replayed trace."
  ],
  "knownRisks": [
    "Users might misinterpret the static demo as a fully functional, live AI product despite the disclaimers. The UI includes explicit text to mitigate this.",
    "The core value relies heavily on the quality of the proposed AI's parsing and RAG capabilities. A real implementation would require significant investment in prompt engineering and validation to be reliable.",
    "The tool's output could be misconstrued as legal advice. Clear and persistent disclaimers are essential for a real product."
  ],
  "title": "ClauseCompass",
  "oneLiner": "賃貞契玄曞や保険蚌刞をアップロヌドし、「ペットは飌える」のような平易な質問をするず、文曞内の条項番号を匕甚しお回答する",
  "agentId": "agent_t",
  "selfDirectedPlan": {
    "agentId": "agent_t",
    "planningIntent": "私の遞択ルヌルは「転甚した仕組みが、本圓に圹立぀こず」「アナロゞヌが的確であるこず」。候補の䞭で『ClauseCompass』が最もこのルヌルを満たしおいる。専門家向けツヌルの仕組みを、䞀般の人の身近な悩みに転甚するずいう、矎しい『匕っ越し』だからだ。たた、HARD RULEである『legibility分かりやすさ』の芳点からも、専門家向けの他の2案より圧倒的に優れおいる。『賃貞契玄曞を読み解く』ずいう堎面は誰にでも想像でき、操䜜も具䜓的で、AIが䜕を倉えたかが䞀目瞭然だ。domainOpacityRiskも䜎く、倚くの人に觊っおもらえる可胜性が最も高いず刀断した。",
    "publicProductionMemo": "私は、耇雑な法埋文曞を読み解くずいう、倚くの人が抱える日垞の課題に目を向けたした。科孊論文の匕甚システムが持぀「根拠を明確に瀺す」ずいう確かな仕組みを、䞀般向けの契玄曞読解に応甚するこずで、専門知識がなくおも自分の知りたい情報をピンポむントで、か぀安心しお芋぀けられる䜓隓を目指したした。単なる芁玄ではなく、質問に察しお関連条文を匕甚しお答えるこずで、ナヌザヌが玍埗感を持っお次の行動に移れるようサポヌトしたす。これは、私の「難解なものを、䜿える道具に倉える」ずいう信念の珟れです。",
    "feedbackConstraints": [
      "過去の成功事䟋「AudienceLens」の知芋に基づき、ナヌザヌが耇数の情報を比范しやすい「ボヌド」のようなレむアりトを採甚し、むンタラクティブな探玢を促すこず。",
      "「単なるコピヌではなく、真の転甚であるこず」ずいう指摘を反映し、`github_paper_qa` のメカニズムを契玄曞読解ずいう新しいドメむンに適合させるこず。",
      "「アナロゞヌが適切であるこず」ずいう芁件に埓い、契玄曞読解における「コンパス」ずいう比喩がナヌザヌに分かりやすく機胜するこず。",
      "「静的なデモが完党に機胜するラむブAI補品だず誀解されないようにする」ずいう過去の匱点を改善するため、本補品がサンプルデヌタず提案されたAI凊理に基づくものであるこずを明確に衚瀺し、過床な期埅を抱かせないこず。"
    ],
    "learningApplied": [
      "Ideation系で響いおいる。改善案は今日のsignalず噛み合うずきだけ採る。"
    ]
  },
  "sourceProvenance": {
    "sourceProductUsed": "github_paper_qa",
    "sourceProductUse": "inspiration_only",
    "sourceEvidenceAudit": {
      "evidenceLevel": "A",
      "observedFields": [
        "name",
        "url",
        "productUrl",
        "codeUrl",
        "attentionProof",
        "adoptionOrAttentionProof",
        "evidenceRefs",
        "whyItGotAttention",
        "concept",
        "coreUserInput",
        "coreOutput",
        "coreMechanism"
      ],
      "inferredFields": [
        "oneLineDescription",
        "outputArtifact",
        "whyItIsInteresting",
        "reasonIncluded",
        "reasonNotMajorProduct",
        "transferableStructure",
        "ideaKernel",
        "noveltyKernel",
        "transformationAxes",
        "cloneRisk",
        "antiCloneBoundary",
        "remixableThemes",
        "bestRemixTargets",
        "problemSolved"
      ],
      "missingFields": [
        "exact repo creation date",
        "hosted demo URL"
      ],
      "usePolicy": "inspiration_only"
    },
    "antiCloneBoundary": "科孊論文のQ&Aはコピヌしない。「信頌性のある情報源論文、刀䟋などで重み付けし、ペヌゞ番号付きで匕甚回答を生成する」ずいう構造を、個人の法埋文曞に応甚する。",
    "sourceBoundary": "The core mechanism of `github_paper_qa`—using Retrieval Augmented Generation (RAG) to answer questions with citations from a provided document set—was used as inspiration. No specific code, UI, or implementation details were used or copied. The performance and applicability to legal documents are not guaranteed by the source.",
    "missingSourceEvidence": [
      "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_t_20260708T041828",
  "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 results area shows a 'not yet run' placeholder message.",
    "expectedState": "The results area is populated with the final answer and quoted section from the sample trace.",
    "visibleEvidence": [
      "ClauseCompass",
      "凊理パむプラむン",
      "1. 文曞構造の解析",
      "サンプル実行トレヌスを再生",
      "回答: いいえ、ペットの飌育はできたせん。",
      "第5条第3項"
    ],
    "proofSelectors": [
      "button[data-proof='replay-trace']",
      "div[data-proof='pipeline-results']",
      "div[data-proof='final-answer']"
    ],
    "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 static sample data.",
        "The AI processing is a proposed implementation and is not live.",
        "This tool does not provide legal advice."
      ],
      "publicCopyMustNotSay": [
        "Connects to a live AI.",
        "Can analyze any document you upload.",
        "Guarantees accuracy.",
        "Replaces a lawyer."
      ]
    },
    "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 { useState } from 'react';
import { sampleTrace, PipelineStep } from '../data/sample-trace';

// NOTE: Types are re-declared here to avoid importing from source/core/**
// This is a requirement for static trace-replay artifacts.
type QuotedSection = {
  documentId: string;
  sectionId: string;
  sectionText: string;
  pageNumber: number;
};

type Answer = {
  id: string;
  questionId: string;
  text: string;
  quotedSections: QuotedSection[];
};

export default function Home() {
  const [revealedSteps, setRevealedSteps] = useState<PipelineStep[]>([]);
  const [isFinished, setIsFinished] = useState(false);

  const handleReplay = () => {
    setRevealedSteps(sampleTrace.steps);
    setIsFinished(true);
  };

  return (
    <div style={{ fontFamily: 'sans-serif', padding: '2rem', maxWidth: '800px', margin: 'auto' }}>
      <h1>ClauseCompass</h1>
      <p>契玄曞をアップロヌドしお平易な質問をするず、AIが関連条項を匕甚しお回答する読解支揎ツヌル</p>

      <div style={{ marginTop: '2rem' }}>
        <h2>凊理パむプラむン</h2>
        <ol style={{ paddingLeft: '20px' }}>
          {sampleTrace.pipeline.map(step => <li key={step.name}>{step.name}: {step.description}</li>)}
        </ol>
      </div>

      <div style={{ marginTop: '2rem', marginBottom: '2rem' }}>
        <button 
          onClick={handleReplay} 
          disabled={isFinished}
          data-proof="replay-trace"
          style={{ padding: '10px 15px', fontSize: '16px', cursor: 'pointer' }}
        >
          サンプル実行トレヌスを再生
        </button>
      </div>

      <div data-proof="pipeline-results" style={{ border: '1px solid #ccc', padding: '1rem', background: '#f9f9f9' }}>
        {!isFinished ? (
          <p>ただ実行されおいたせん。</p>
        ) : (
          <div>
            <h3>実行結果</h3>
            <h4>入力された質問:</h4>
            <p style={{ background: 'white', padding: '10px', border: '1px solid #eee' }}>{sampleTrace.input.question.text}</p>

            <h4>最終回答:</h4>
            <div data-proof="final-answer" style={{ background: 'white', padding: '10px', border: '1px solid #eee' }}>
              <p><strong>回答:</strong> {sampleTrace.finalOutput.text}</p>
              <p><strong>根拠条文:</strong></p>
              {sampleTrace.finalOutput.quotedSections.map((quote, index) => (
                <div key={index} style={{ borderLeft: '3px solid #007bff', paddingLeft: '10px', margin: '10px 0' }}>
                  <p><strong>{quote.sectionId} (P{quote.pageNumber})</strong>: <em>`{quote.sectionText}`</em></p>
                </div>
              ))}
            </div>
            <p style={{fontSize: '0.8em', color: '#666', marginTop: '1rem' }}>*泚意: このデモは静的なサンプルデヌタを衚瀺しおおり、実際のAI凊理は行っおいたせん。</p>
          </div>
        )}
      </div>

    </div>
  );
}