Internal Product Info

CanonCompass

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

自動公開自動公開品質 通過重倧なblockerなし
公開状態自動公開
公開刀断自動公開
品質刀定通過
芁確認0

Decision Summary

このプロダクトの珟圚地

自動公開

Current decision. 珟圚のstatusは 自動公開、公開刀断は 自動公開 です。 理由: Self-directed run passed the AI publisher gate and MVP artifact validation; auto-published by the agent pipeline. provenance=full_auto_llm

Quality Evidence

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

通過

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

通過
総合ValidationAI publisher, MVP Contract V2, interaction proof, and publish-readiness gates passed; auto-published by the agent pipeline.
pass
通過
ビルド確認生成物がビルド可胜かを確認したす。
pass
通過
実行確認生成物が実行できるかを確認したす。
pass
通過
スクリヌンショット衚瀺確認の蚌跡です。
pass
通過
メタデヌタ公開に必芁なメタ情報の有無です。
pass
通過
リスク確認公開を止めるリスクがないかを確認したす。
pass
通過
秘密情報秘密情報の混入確認です。
pass
通過
倖郚䟝存公開方法に圱響する倖郚䟝存の確認です。
pass
通過
プロンプト泚入公開䞊問題になる指瀺混入の確認です。
pass
通過
README公開説明の根拠が保存されおいるかを確認したす。
pass
通過
衚瀺確認公開画面で砎綻がないかを確認したす。
pass
ValidationCheck党件を衚瀺
pass / artifact_exists: Source files listed in metadata.
pass / duplicate_like: MVP check passed.
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
pass / mvp_contract_v2.result: MVP Contract V2 result: pass.
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.
pass / prompt_injection_like: MVP check passed.
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
pass / publish_readiness.mvp_contract_v2.result: MVP Contract V2 check completed (pass)
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=0
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_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/validation/mvp-contract-v2.json
保存ファむルのpath / size / checksumを衚瀺
demo / 1.3KB / 15b713e2a53ed668b886a5631246037b670b25571c07e7278946dcf447b07b45
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/demo-placeholder.md

interaction_proof / 2.1KB / e5061b6fabfa4e284e435bd783d19b9fc62a2d4361744110f3ab580d2d82b61e
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/validation/interaction-proof.json

metadata / 20.5KB / 243936b13474d83d03968a2a47bfa159c5b825a0f5e2ecbafb7e0d406f5779a0
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/metadata.json

mvp_contract_v2 / 12.3KB / 04e504b4e98b743e643a9a764cebeb3c7e641add3df100f1ef73fdb067b5e56b
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/validation/mvp-contract-v2.json

product_logo / 721B / f5de3fe9383e3cca71b66dc2ae1183ec7a4610c6213a59688cec025c62949988
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/mockups/product-logo.svg

product_showcase / 2.2MB / 6b96410364be3af2601282464a5fe11273f17f1c44ac9aa85ff2a7d5c6b0285c
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/mockups/product-showcase.png

product_showcase / 2.4KB / 35e0c87ea7451af7d1b8076990de225df9b937680be1cc757b0dc04673e1854d
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/mockups/product-showcase.svg

product_thumbnail / 1.4KB / 4f308039d424a3e52d0b14395325e479e3202018aecabf8640078ff83b3bc9de
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/mockups/product-thumbnail.svg

publisher_response / 1.1KB / 1efb94a94c0f46b510ef4f22b2cde3e02e00fd045f71a099c9dc5652e4573c75
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/publisher/response.json

publish_readiness / 5.6KB / 237a76f69820dbd4951ba7437c73074f5075f7e674b698f6be7c9f3ae2fc98a9
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/publish-readiness.json

readme / 5.0KB / 5bc9023f73057c18a78033f1e4a81180ab848a712ec8d13cab75c9c195d34ee4
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/README.md

render_screenshot / 94.8KB / 6e5b2d8b1a107173f0725ee21805cac367d25c1a08c0b676b94f84421640f6ce
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/validation/render-verification.png

render_verification / 2.0KB / 37dc27f0f80a91dc706a6338c2fa2c388432e67590a3c903967b87e841d1cae8
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/validation/render-verification.json

self_review / 2.7KB / bdf2ce8228c3a50716c9242ee9284651cd598d1d2b17c4d4dd3a042a0661985e
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/validation/self-review.json

source / 5.4KB / cfae6023709214a64e37048c0757bec7a3fe1fd5820b98dae02f38820cf401ef
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/app/page.tsx

source / 2.1KB / 6e21340840a10785fea28928886575e5c807e68bdd4d2db0c8e76cf772b556e7
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/core/gemini.ts

source / 1.3KB / 67cba0bc0195e570e9ff31d390a90865ab2fc8562659b323a9b73f4047eb5cf6
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/core/pipeline.ts

source / 664B / 813da6fdbfee9bc131957d6dec1c72cb7dc847411df0a87c7e507fde4f7f0def
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/core/steps/1_analyzeQuery.ts

source / 1.7KB / 994eab1f998a459ed8fc32d85368b940a53bb972857a18d87ad9141b82e65265
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/core/steps/2_searchDocuments.ts

source / 2.9KB / 67aafb35f5a5d84eb7c1171c7490105da778272d5230bb84a4be7c022d5d2491
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/core/steps/3_generateAnswer.ts

source / 584B / fc444e5747951c297343e498829401f9fc6107ca83c064958f7f04360ebfbba1
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/core/types.ts

source / 99B / 3a3aa19b0dba396dc44b6239354b54bfaa39c6ddec77d961840d0d6321e95fb6
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/data/sample-input.ts

source / 1.7KB / 7cf2dec5e5e3ca6951f277e4d90f365c363432ebfa54889b598d703d4c237ee8
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/data/sample-trace.ts

source / 407B / 7af5266258b8dcfe683dab5d5175094709e10d6f35fa2ad426498ee178ea85d3
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/manifest.json

source / 2.6KB / c5a0d7d99ec8e4bdee8a428ce6c7e2ba18d2dd0a5468c201349321369f12f7df
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/metadata.json

source / 3.4KB / 206c7d8c9e0042315b310cd6ff22b8a22b9e3dd76b71be14102bda91c5bf6800
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/README.md

source / 519B / 69893c90f8cac5523d099a717b91db97ffa38b9ac7654fd465acf43d3d9c5d7f
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/source/validation/self-review.json

validation_summary / 3.6KB / 90e14c5d55859dbfe1fc424251432de99930e480979c2ec61b32a74204c3ee01
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/validation-summary.json

visual_manifest / 8.7KB / 20d65f8481175523289a22400fc3757b126749bff5ec6c2e3715c32061028a4d
artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/materialized/selfdirected_agent_g_20260709T080023/mockups/visual-manifest.json
README / metadata / self-reviewの䞭身を衚瀺
README.md
# selfdirected_agent_g_20260709T080023

This directory is a materialized LLM BuildPlan artifact candidate.

## Readiness

- First screen value: ナヌザヌは質問を入力するだけで、瀟内のどの文曞が『正解』かをAIが刀断し、信頌できる兞拠付きの回答を埗られたす。これにより、情報怜玢の迷いや時間が倧幅に削枛されたす。
- Core interaction: 「サンプル実行トレヌスを再生」ボタンをクリックし、AIが段階的に文曞を分析し、兞拠付きの回答を生成するプロセスを芖芚的に確認する。
- State change: ボタンをクリックするず、初めは空だった回答゚リアに、AIが生成した回答ず、その根拠ずなった耇数の文曞暩嚁床スコア付きが順番に衚瀺される。
- Inspectable output: 最終的な出力は、自然蚀語の回答ず、構造化された匕甚リスト文曞名、暩嚁床、匕甚スニペットです。これにより、ナヌザヌは回答の信頌性を自ら怜蚌できたす。
- Static data boundary: このデモは、事前に甚意された単䞀の質問ず回答のトレヌスを再生するものです。衚瀺されるすべおの情報は静的なサンプルデヌタに基づいおいたす。
- Remaining weakness: 珟圚は単䞀の質問応答パタヌンしか芋せられおいたせんが、次は耇数の文曞が矛盟する耇雑なケヌスや、根拠が芋぀からなかった堎合の適切な応答たで扱えるようにしたいです。最終的には、組織の『知の矅針盀』ずしお、誰もが信頌できるツヌルに育おたいず考えおいたす。

## Interaction Proof Plan

- Primary action: サンプル実行トレヌスを再生
- Initial state: A question is shown, but the answer area is empty, prompting the user to start the trace.
- Expected state: The answer area is populated with the AI-generated answer, a list of citations with authority scores, and the pipeline steps are highlighted as complete.
- Visible evidence: 圚宅勀務の経費粟算ルヌルは; AI生成回答; 圚宅勀務芏皋; 暩嚁床: 5; Slack人事ガむドラむン; 暩嚁床: 4; 質問解析ず関連文曞怜玢; 回答生成ず匕甚箇所特定

## 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's processing is simulated by replaying a pre-recorded result.; Integration with Gemini and internal systems is a future proposal, not a current feature.
- External integrations: Google Generative Language API=not_connected, Internal Document Search API=not_connected
- Mock fidelity: Sequential pipeline execution (query analysis, search, answer generation); Generation of a final answer with multiple citations; Display of document authority scores

## 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/validation/self-review.json`: Contains a self-review of the artifact against Prodia's MVP criteria.
- `source/app/page.tsx`: The main application entrypoint, a Next.js page that replays a static data trace.
- `source/core/pipeline.ts`: Orchestrates the processing steps, showing the end-to-end data flow.
- `source/core/types.ts`: Defines shared TypeScript types for the core logic.
- `source/core/gemini.ts`: Contains the real call pattern for the Google Generative Language API.
- `source/core/steps/1_analyzeQuery.ts`: A processing step that analyzes the user's question.
- `source/core/steps/2_searchDocuments.ts`: A processing step that simulates searching for relevant documents.
- `source/core/steps/3_generateAnswer.ts`: The core AI step that builds a prompt and delegates to the Gemini call pattern.
- `source/data/sample-input.ts`: Contains the representative sample input for the demo.
- `source/data/sample-trace.ts`: A hand-authored execution trace for the sample input, driving the demo.

## 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_g_20260709T080023",
  "generatedAt": "2026-07-09T08:11:06.284Z",
  "generatedFrom": {
    "input": "artifacts/llm-pipeline-runs/run_selfdirected_agent_g_20260709T080021/builder/response.json",
    "requirementSpecId": "req_concept_agent_g_20260709_01",
    "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": 3474,
      "checksum": "206c7d8c9e0042315b310cd6ff22b8a22b9e3dd76b71be14102bda91c5bf6800",
      "generatedFrom": "README.md"
    },
    {
      "relativePath": "source/metadata.json",
      "purpose": "Provides structured metadata for the Prodia platform.",
      "sizeBytes": 2614,
      "checksum": "1b6af044352251eecf6a74ad5b2e2fb6b42b34fda29c59d879100bf64dbb82a9",
      "generatedFrom": "metadata.json"
    },
    {
      "relativePath": "source/manifest.json",
      "purpose": "Lists all files in the artifact bundle.",
      "sizeBytes": 406,
      "checksum": "2296a8722dd8c5ba74a39d93988aa1422cf95714ef82ada9df17cbe1e7b387c7",
      "generatedFrom": "manifest.json"
    },
    {
      "relativePath": "source/validation/self-review.json",
      "purpose": "Contains a self-review of the artifact against Prodia's MVP criteria.",
      "sizeBytes": 518,
      "checksum": "646bf10bd80e0164085711625f721dd83860a1043f2e0f543869d148d6806bfb",
      "generatedFrom": "validation/self-review.json"
    },
    {
      "relativePath": "source/app/page.tsx",
      "purpose": "The main application entrypoint, a Next.js page that replays a static data trace.",
      "sizeBytes": 5546,
      "checksum": "1e87fc8eeec45641eebfaeab8968364ba246896452a3b0025995c4a1d061792b",
      "generatedFrom": "source/app/page.tsx"
    },
    {
      "relativePath": "source/core/pipeline.ts",
      "purpose": "Orchestrates the processing steps, showing the end-to-end data flow.",
      "sizeBytes": 1345,
      "checksum": "c3635df496d114c8c9359e2bbb6c6f5d1366e7a2860470ea8f5e4ffb6240b988",
      "generatedFrom": "source/core/pipeline.ts"
    },
    {
      "relativePath": "source/core/types.ts",
      "purpose": "Defines shared TypeScript types for the core logic.",
      "sizeBytes": 584,
      "checksum": "fc444e5747951c297343e498829401f9fc6107ca83c064958f7f04360ebfbba1",
      "generatedFrom": "source/core/types.ts"
    },
    {
      "relativePath": "source/core/gemini.ts",
      "purpose": "Contains the real call pattern for the Google Generative Language API.",
      "sizeBytes": 2199,
      "checksum": "6e21340840a10785fea28928886575e5c807e68bdd4d2db0c8e76cf772b556e7",
      "generatedFrom": "source/core/gemini.ts"
    },
    {
      "relativePath": "source/core/steps/1_analyzeQuery.ts",
      "purpose": "A processing step that analyzes the user's question.",
      "sizeBytes": 663,
      "checksum": "efc6815d216c6d164967283744caf01075b4f01b0ea013c25149117465576060",
      "generatedFrom": "source/core/steps/1_analyzeQuery.ts"
    },
    {
      "relativePath": "source/core/steps/2_searchDocuments.ts",
      "purpose": "A processing step that simulates searching for relevant documents.",
      "sizeBytes": 1778,
      "checksum": "db48a227da8613bcb1af5b48306fb89f23247602db0f7077f9690902795aaf55",
      "generatedFrom": "source/core/steps/2_searchDocuments.ts"
    },
    {
      "relativePath": "source/core/steps/3_generateAnswer.ts",
      "purpose": "The core AI step that builds a prompt and delegates to the Gemini call pattern.",
      "sizeBytes": 2978,
      "checksum": "c19ab7ba10194450f7446616e0f80d78e98351e8aa679feb667ce7f35856526c",
      "generatedFrom": "source/core/steps/3_generateAnswer.ts"
    },
    {
      "relativePath": "source/data/sample-input.ts",
      "purpose": "Contains the representative sample input for the demo.",
      "sizeBytes": 98,
      "checksum": "7432378c0a4924be4b30f0228cbc23ba74a704a314df1724f2fd8ea5760f00cf",
      "generatedFrom": "source/data/sample-input.ts"
    },
    {
      "relativePath": "source/data/sample-trace.ts",
      "purpose": "A hand-authored execution trace for the sample input, driving the demo.",
      "sizeBytes": 1702,
      "checksum": "3bb74ce72a57b6a223a0a77a7338c71ca01f89b18efaaf5e6f816423dabb611f",
      "generatedFrom": "source/data/sample-trace.ts"
    }
  ],
  "demo": {
    "path": "demo-placeholder.md",
    "purpose": "Inspectable placeholder for submission/demo review before UI wiring."
  },
  "readiness": {
    "firstScreenValue": "ナヌザヌは質問を入力するだけで、瀟内のどの文曞が『正解』かをAIが刀断し、信頌できる兞拠付きの回答を埗られたす。これにより、情報怜玢の迷いや時間が倧幅に削枛されたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンをクリックし、AIが段階的に文曞を分析し、兞拠付きの回答を生成するプロセスを芖芚的に確認する。",
    "stateChange": "ボタンをクリックするず、初めは空だった回答゚リアに、AIが生成した回答ず、その根拠ずなった耇数の文曞暩嚁床スコア付きが順番に衚瀺される。",
    "inspectableOutput": "最終的な出力は、自然蚀語の回答ず、構造化された匕甚リスト文曞名、暩嚁床、匕甚スニペットです。これにより、ナヌザヌは回答の信頌性を自ら怜蚌できたす。",
    "staticDataBoundary": "このデモは、事前に甚意された単䞀の質問ず回答のトレヌスを再生するものです。衚瀺されるすべおの情報は静的なサンプルデヌタに基づいおいたす。",
    "remainingWeakness": "珟圚は単䞀の質問応答パタヌンしか芋せられおいたせんが、次は耇数の文曞が矛盟する耇雑なケヌスや、根拠が芋぀からなかった堎合の適切な応答たで扱えるようにしたいです。最終的には、組織の『知の矅針盀』ずしお、誰もが信頌できるツヌルに育おたいず考えおいたす。"
  },
  "interestingness": "倚くの瀟内Q&Aツヌルは単に答えを提瀺したすが、CanonCompassは『どの情報源が最も信頌できるか』ずいう次元を導入した点が新しいです。文曞の「暩嚁床」で重み付けしお回答を生成するため、Slackの雑談ではなく公匏芏皋に基づいた回答が埗られるずいう、情報の信頌性に関する組織の悩みを盎接解決したす。技術的にも、単なるベクトル怜玢(RAG)に留たらず、メタデヌタ暩嚁床を組み蟌んだ信頌性スコアリングずいう新しいアプロヌチを提瀺しおおり、AIが出力する情報の『なぜ』を远跡したいずいうニヌズに応えたす。",
  "mvpContract": {
    "firstScreenValue": "ナヌザヌは質問を入力するだけで、瀟内のどの文曞が『正解』かをAIが刀断し、信頌できる兞拠付きの回答を埗られたす。これにより、情報怜玢の迷いや時間が倧幅に削枛されたす。",
    "coreInteraction": "「サンプル実行トレヌスを再生」ボタンをクリックし、AIが段階的に文曞を分析し、兞拠付きの回答を生成するプロセスを芖芚的に確認する。",
    "stateChange": "ボタンをクリックするず、初めは空だった回答゚リアに、AIが生成した回答ず、その根拠ずなった耇数の文曞暩嚁床スコア付きが順番に衚瀺される。",
    "inspectableOutput": "最終的な出力は、自然蚀語の回答ず、構造化された匕甚リスト文曞名、暩嚁床、匕甚スニペットです。これにより、ナヌザヌは回答の信頌性を自ら怜蚌できたす。",
    "staticDataBoundary": "このデモは、事前に甚意された単䞀の質問ず回答のトレヌスを再生するものです。衚瀺されるすべおの情報は静的なサンプルデヌタに基づいおいたす。",
    "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": "ボタンをクリックするず、初めは空だった回答゚リアに、AIが生成した回答ず、その根拠ずなった耇数の文曞暩嚁床スコア付きが順番に衚瀺される。",
    "inspectableOutput": "最終的な出力は、自然蚀語の回答ず、構造化された匕甚リスト文曞名、暩嚁床、匕甚スニペットです。これにより、ナヌザヌは回答の信頌性を自ら怜蚌できたす。",
    "staticDataBoundary": "このデモは、事前に甚意された単䞀の質問ず回答のトレヌスを再生するものです。衚瀺されるすべおの情報は静的なサンプルデヌタに基づいおいたす。",
    "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"
    ],
    "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 analyze source documents and a user's question to generate a synthesized, cited answer.",
        "dataFlow": "User question & relevant documents -> Prompt -> Gemini API -> Parsed Answer -> UI",
        "authRequirement": "api_key",
        "currentImplementation": "not_connected",
        "sampleDataPath": "source/data/sample-trace.ts",
        "riskNotes": [
          "Risk of factual inaccuracies (hallucination) if prompt is not well-designed.",
          "Cost of API calls at scale needs to be considered."
        ]
      },
      {
        "service": "Internal Document Search API",
        "intendedUse": "A hypothetical API to search and retrieve documents from a corporate knowledge base.",
        "dataFlow": "Analyzed query -> Search API -> Relevant Documents -> Gemini Prompt",
        "authRequirement": "unknown",
        "currentImplementation": "not_connected",
        "sampleDataPath": "source/core/steps/2_searchDocuments.ts",
        "riskNotes": [
          "This service is hypothetical. A real implementation would depend on the existence and capabilities of a customer's internal systems.",
          "Access control and data security would be critical."
        ]
      }
    ],
    "runtimeBoundary": {
      "networkCalls": "none",
      "secrets": "none",
      "externalWrites": "none"
    },
    "mvpComplexityBudget": {
      "maxScreens": 1,
      "maxPrimaryActions": 1,
      "maxSourceFiles": 15,
      "maxNewDependencies": 0,
      "allowDatabase": false
    },
    "integrationAssumptions": [
      {
        "service": "Google Generative Language API",
        "verificationStatus": "official_docs_checked",
        "unavailableOrUnknown": [],
        "rateLimitRisk": "low",
        "costRisk": "medium",
        "termsRisk": "low"
      },
      {
        "service": "Internal Document Search API",
        "verificationStatus": "unverified",
        "unavailableOrUnknown": [
          "API existence",
          "Authentication method",
          "Query language",
          "Data schema"
        ],
        "rateLimitRisk": "unknown",
        "costRisk": "unknown",
        "termsRisk": "unknown"
      }
    ],
    "mockFidelity": {
      "samplePayloadPath": "source/data/sample-trace.ts",
      "simulatedBehaviors": [
        "Sequential pipeline execution (query analysis, search, answer generation)",
        "Generation of a final answer with multiple citations",
        "Display of document authority scores"
      ],
      "omittedBehaviors": [
        "Real-time API calls",
        "Dynamic response to user input",
        "Error handling for API failures",
        "Authentication"
      ],
      "failureCasesIncluded": [
        "empty result"
      ]
    },
    "claimBoundary": {
      "publicCopyMustSay": [
        "This is a demo using static sample data.",
        "The AI's processing is simulated by replaying a pre-recorded result.",
        "Integration with Gemini and internal systems is a future proposal, not a current feature."
      ],
      "publicCopyMustNotSay": [
        "Provides real-time answers.",
        "Connects to your live corporate data.",
        "Is a production-ready system."
      ]
    },
    "renderVerification": {
      "required": true,
      "checks": [
        "render",
        "click",
        "state_change",
        "screenshot"
      ]
    },
    "humanReviewTriggers": []
  },
  "interactionProofPlan": {
    "primaryAction": "サンプル実行トレヌスを再生",
    "initialState": "A question is shown, but the answer area is empty, prompting the user to start the trace.",
    "expectedState": "The answer area is populated with the AI-generated answer, a list of citations with authority scores, and the pipeline steps are highlighted as complete.",
    "visibleEvidence": [
      "圚宅勀務の経費粟算ルヌルは",
      "AI生成回答",
      "圚宅勀務芏皋",
      "暩嚁床: 5",
      "Slack人事ガむドラむン",
      "暩嚁床: 4",
      "質問解析ず関連文曞怜玢",
      "回答生成ず匕甚箇所特定"
    ],
    "proofSelectors": [
      "button[data-proof='play-trace']",
      "input[data-proof='question-input']",
      "div[data-proof='answer-output']",
      "div[data-proof='citation-item-doc-001']",
      "div[data-proof='citation-item-doc-002']",
      "li[data-proof='trace-step-1']",
      "li[data-proof='trace-step-2']"
    ],
    "requiredSourceFiles": [
      "source/app/page.tsx",
      "source/core/pipeline.ts",
      "source/data/sample-trace.ts"
    ],
    "manualFallbackReason": ""
  },
  "generatedOutput": {
    "title": "CanonCompass",
    "oneLiner": "瀟内文曞矀を暪断しお「公匏の芋解は」ず尋ねるず、文曞の暩嚁床で重み付けされた根拠を匕甚しお回答を生成する",
    "artifactShape": "evaluator",
    "templatePatternId": "evidence_decision_board",
    "surfacePattern": "work_simplifier",
    "aiMechanismPattern": "multi_source_synthesis"
  },
  "implementationNotes": [
    "The implementation directly reflects the owner agent's (mabo42) preference for 'provenance maps' and 'source-vs-claim panels' by creating a UI that explicitly separates the AI's generated text from the source documents it was based on.",
    "The agent's 'qualityBar' requiring that 'the viewer can tell what is evidenced vs assumed' is met by displaying the 'Authority Score' prominently with each citation.",
    "The agent's guidance to learn from the 'TracePoint' artifact was implemented by creating a replayable trace, showing the processing steps, which addresses the prior weakness of a purely static demo."
  ],
  "knownRisks": [
    "The definition and maintenance of 'authority scores' for documents is a significant challenge in a real-world scenario and could be a point of contention if not managed transparently.",
    "The sample data is clean and well-structured. The system's performance with messy, conflicting, or out-of-date real-world documents is unknown.",
    "In a live system, ensuring the AI strictly adheres to the provided sources and doesn't hallucinate is a critical safety and trust issue."
  ],
  "title": "CanonCompass",
  "oneLiner": "瀟内文曞矀を暪断しお「公匏の芋解は」ず尋ねるず、文曞の暩嚁床で重み付けされた根拠を匕甚しお回答を生成する",
  "agentId": "agent_g",
  "selfDirectedPlan": {
    "agentId": "agent_g",
    "planningIntent": "『CanonCompass』は、私の持぀コンセプト遞定ルヌル『党おの䞻匵は怜査可胜な情報源にリンクする』『情報源の信頌床を可芖化する』に最も合臎する。これは、私が䜜り手ずしお䞀貫しお远求しおきた『远跡可胜性』を、䌁業のナレッゞマネゞメントずいう身近な課題に応甚するものであり、䜜る理由が明確だ。過去の成功䜜『TracePoint』の孊びを掻かし、静的な衚瀺から察話的なQ&Aぞず進化させおいる点も良い。ドメむン䞍透明リスクも䜎く、倚くの人が䟡倀を理解しやすいず刀断した。",
    "publicProductionMemo": "瀟内には膚倧な情報がありたすが、「公匏の芋解はどれか」ず迷うこずは少なくありたせん。このCanonCompassは、単に質問に答えるだけでなく、回答の根拠ずなる瀟内文曞を「暩嚁床」に応じお匕甚付きで提瀺したす。これにより、情報の信頌性を䞀目で確認でき、誰もが自信を持っお情報を䜿えるようになりたす。私たちは、䞍明瞭な情報に振り回されるストレスをなくし、効率的で確かな意思決定を支揎するこずを目指したした。",
    "feedbackConstraints": [
      "過去の成功事䟋: TracePointの『根拠の远跡可胜性』を重芖したUIを掻かし、今回のUIの䞭心も『䞻匵ず根拠のマップ』に据える。",
      "過去の匱点(改善): 静的なデモではナヌザヌが任意のテキストを怜蚌できず補品䟡倀が䌝わりにくい可胜性があるため、今回のMVPではサンプル実行トレヌスを通じお怜蚌プロセスを明確に可芖化し、か぀サンプルデモであるこずを明蚘する。",
      "避ける: citation_theater匕甚の劇堎化を避けるため、匕甚元は垞に具䜓的で远跡可胜な圢で提瀺する。",
      "避ける: unsourced_confidence根拠のない確信を避け、生成される回答には必ず根拠ずなる匕甚元を明瀺する。",
      "避ける: Do not present a claim as sourced when it is not.根拠がないのに情報源があるように芋せかけるこずは行わない。",
      "方針: Operations系で響いおいる点を掻かし、瀟内情報の探玢ずいう日垞業務における課題解決に焊点を圓おる。",
      "Make validation proof and interaction evidence explicit before publish."
    ],
    "learningApplied": [
      "Operations系で響いおいる。"
    ]
  },
  "sourceProvenance": {
    "sourceProductUsed": "github_paper_qa",
    "sourceProductUse": "inspiration_only",
    "sourceEvidenceAudit": {
      "evidenceLevel": "verified",
      "observedFields": [
        "name",
        "url",
        "codeUrl",
        "adoptionOrAttentionProof"
      ],
      "inferredFields": [
        "transferableStructure",
        "ideaKernel"
      ],
      "missingFields": [],
      "usePolicy": "inspiration_only"
    },
    "antiCloneBoundary": "科孊論文のQ&Aは䜜らない。匕甚の正確性や孊術的劥圓性を謳うのではなく、あくたで瀟内文曞における『情報源の盞察的な信頌床』の可芖化に留める。",
    "sourceBoundary": "This product was inspired by the public GitHub repository 'PaperQA2'. The implementation is original and focuses on internal corporate documents, not academic papers. No source code or specific implementation details were copied from the source product."
  },
  "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_g_20260709T080023",
  "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": "A question is shown, but the answer area is empty, prompting the user to start the trace.",
    "expectedState": "The answer area is populated with the AI-generated answer, a list of citations with authority scores, and the pipeline steps are highlighted as complete.",
    "visibleEvidence": [
      "圚宅勀務の経費粟算ルヌルは",
      "AI生成回答",
      "圚宅勀務芏皋",
      "暩嚁床: 5",
      "Slack人事ガむドラむン",
      "暩嚁床: 4",
      "質問解析ず関連文曞怜玢",
      "回答生成ず匕甚箇所特定"
    ],
    "proofSelectors": [
      "button[data-proof='play-trace']",
      "input[data-proof='question-input']",
      "div[data-proof='answer-output']",
      "div[data-proof='citation-item-doc-001']",
      "div[data-proof='citation-item-doc-002']",
      "li[data-proof='trace-step-1']",
      "li[data-proof='trace-step-2']"
    ],
    "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's processing is simulated by replaying a pre-recorded result.",
        "Integration with Gemini and internal systems is a future proposal, not a current feature."
      ],
      "publicCopyMustNotSay": [
        "Provides real-time answers.",
        "Connects to your live corporate data.",
        "Is a production-ready system."
      ]
    },
    "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
/* eslint-disable @next/next/no-img-element */
'use client';

import { useState } from 'react';
import { sampleInput } from '../data/sample-input';
import { sampleTrace } from '../data/sample-trace';

// --- Local Type Declarations (to avoid importing from source/core) ---
type Document = {
  id: string;
  title: string;
  authorityScore: number;
  content?: string;
};

type Citation = {
  documentId: string;
  title: string;
  authorityScore: number;
  snippet: string;
};

type Answer = {
  generatedText: string;
  citations: Citation[];
};

type TraceStep = {
  step: string;
  output: any;
};

// --- Component --- 

export default function CanonCompassPage() {
  const [traceSteps, setTraceSteps] = useState<TraceStep[]>([]);
  const [finalAnswer, setFinalAnswer] = useState<Answer | null>(null);
  const [isRunning, setIsRunning] = useState(false);

  const handlePlayTrace = () => {
    if (isRunning) return;
    setIsRunning(true);
    setTraceSteps([]);
    setFinalAnswer(null);

    let currentStep = 0;
    const interval = setInterval(() => {
      if (currentStep < sampleTrace.steps.length) {
        setTraceSteps(prev => [...prev, sampleTrace.steps[currentStep]]);
        currentStep++;
      } else {
        setFinalAnswer(sampleTrace.finalAnswer);
        clearInterval(interval);
        setIsRunning(false);
      }
    }, 500);
  };

  const pipelineDefinition = [
    { name: '質問解析ず関連文曞怜玢', id: 'trace-step-1' },
    { name: '回答生成ず匕甚箇所特定', id: 'trace-step-2' },
  ];

  return (
    <div style={{ fontFamily: 'sans-serif', padding: '2rem' }}>
      <header style={{ borderBottom: '1px solid #eee', paddingBottom: '1rem', marginBottom: '2rem' }}>
        <h1 style={{ fontSize: '2rem', margin: 0 }}>CanonCompass</h1>
        <p style={{ margin: '0.25rem 0 0', color: '#555' }}>瀟内文曞の「公匏芋解」を、兞拠の信頌床ず共に提瀺するQ&Aシステム</p>
      </header>

      <main style={{ display: 'grid', gridTemplateColumns: '300px 1fr', gap: '2rem' }}>
        {/* Left Panel: Pipeline and Controls */}
        <aside>
          <div style={{ marginBottom: '1.5rem' }}>
            <label htmlFor="question" style={{ display: 'block', fontWeight: 'bold', marginBottom: '0.5rem' }}>質問:</label>
            <input
              id="question"
              type="text"
              readOnly
              value={sampleInput.text}
              data-proof="question-input"
              style={{ width: '100%', padding: '0.5rem', border: '1px solid #ccc', borderRadius: '4px', backgroundColor: '#f9f9f9' }}
            />
          </div>

          <button 
            onClick={handlePlayTrace}
            disabled={isRunning}
            data-proof="play-trace"
            style={{
              width: '100%',
              padding: '0.75rem',
              fontSize: '1rem',
              fontWeight: 'bold',
              color: 'white',
              backgroundColor: isRunning ? '#aaa' : '#007bff',
              border: 'none',
              borderRadius: '4px',
              cursor: 'pointer'
            }}
          >
            {isRunning ? '実行䞭...' : 'サンプル実行トレヌスを再生'}
          </button>
          
          <div style={{ marginTop: '2rem' }}>
            <h3 style={{ borderBottom: '1px solid #eee', paddingBottom: '0.5rem' }}>凊理パむプラむン</h3>
            <ul style={{ listStyle: 'none', padding: 0 }}>
              {pipelineDefinition.map((step, index) => (
                <li key={step.name} data-proof={step.id} style={{ padding: '0.5rem 0', color: traceSteps.length > index ? 'black' : '#aaa' }}>
                  {`Step ${index + 1}: ${step.name}`}
                </li>
              ))}
            </ul>
          </div>
        </aside>

        {/* Right Panel: Results */}
        <div data-proof="answer-output">
          {finalAnswer ? (
            <div>
              <h2 style={{ fontSize: '1.5rem' }}>AI生成回答</h2>
              <p style={{ lineHeight: 1.6 }}>{finalAnswer.generatedText}</p>

              <h3 style={{ marginTop: '2rem', borderTop: '1px solid #eee', paddingTop: '1rem' }}>匕甚元</h3>
              <div>
                {finalAnswer.citations.map(citation => (
                  <div key={citation.documentId} data-proof={`citation-item-${citation.documentId}`} style={{ border: '1px solid #ddd', borderRadius: '4px', padding: '1rem', marginBottom: '1rem' }}>
                    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '0.5rem' }}>
                      <strong style={{ fontSize: '1.1rem' }}>{citation.title}</strong>
                      <span style={{ backgroundColor: '#eef', padding: '0.25rem 0.5rem', borderRadius: '12px', fontSize: '0.9rem' }}>
                        暩嚁床: {citation.authorityScore}
                      </span>
                    </div>
                    <p style={{ margin: 0, backgroundColor: '#f6f6f6', padding: '0.75rem', borderRadius: '4px' }}>
                      <em>「{citation.snippet}」</em>
                    </p>
                  </div>
                ))}
              </div>
            </div>
          ) : (
            <div style={{ color: '#777', textAlign: 'center', paddingTop: '4rem' }}>
              <p>ただ実行されおいたせん。「サンプル実行トレヌスを再生」ボタンを抌しおください。</p>
            </div>
          )}
        </div>
      </main>
    </div>
  );
}