{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":["blog-author","blog-share"]},"type":"markdown"},"seo":{"title":"Treasure AI Studio Project機能セットアップガイド - 一貫したAI動作のためのコンテクスト維持","description":"Treasure AI StudioのProject機能を使って、チャットセッション間で共通のコンテクストを維持し、一貫したAIエージェントの動作を実現し、構造化されたデータスキーマとビジネスルールによって出力の揺らぎを防ぐ方法を学びます。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@type":"BlogPosting","headline":"Treasure AI Studio Project機能セットアップガイド - 一貫したAI動作のためのコンテクスト維持","image":"https://docs.treasure.ai/blog/images/project-setup/01-project-creation.png","datePublished":"2026-05-20","inLanguage":"ja","author":[{"@type":"Person","name":"Koshi Nakamura"}],"publisher":{"@type":"Organization","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.treasure.ai/ja/blog/treasure-ai-studio-project-setup"}},"image":"/assets/01-project-creation.718098d1e86dc3c92dc3ddf3d8e4716d322c8f1bf2007416bd78bf8f9fcbc004.94e46156.png"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"treasure-ai-studio-project機能セットアップガイド","__idx":0},"children":["Treasure AI Studio: Project機能セットアップガイド"]},{"$$mdtype":"Tag","name":"BlogAuthor","attributes":{"name":"Koshi Nakamura","date":"2026-05-20","image":"/assets/default.416e2ccda21c12d40a43f43bc53adffb2ae15dab198bd54da325c0d1f43da13d.978384e4.png"},"children":[]},{"$$mdtype":"Tag","name":"BlogShare","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"project機能とは","__idx":1},"children":["Project機能とは"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["AIプロダクトを使っていて、同じプロンプトなのに結果が異なるということや、意図した結果が得られないということがあると思います。"," ","これは、多くの場合AIはなにかを実行するまではその実行内容に関するコンテクストを十分に持っていないことと、ふるまいが確率的であるということに起因します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI Studioでは様々なスキルが用意されており、すぐにご利用いただけますが、あなたのビジネスの文脈や分析したいデータの情報、分析時のルールをクエリの実行や何かのアウトプットを作らせる前に参照できる状態にしておくことで、より一貫した品質と、期待する出力を得ることができるようになります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI StudioのProject機能は、チャットセッション間で",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["共通の前提知識を維持"]},"する仕組みです。データスキーマ、ビジネスルール、過去の設計判断などをプロジェクトに保存することで、毎回同じ説明を繰り返す必要がなくなります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このブログでは、Projectの使い方の例を紹介します。あなたのビジネスやデータの状況に応じて内容は適宜書き換えてご利用ください。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"フォルダ構造の例","__idx":2},"children":["フォルダ構造の例"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例えば以下のような構成はエージェントにとって読みやすい構造です："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"/home/agent/projects/<your-project-name>/\n│\n├── CLAUDE.md                     # プロジェクト設定ファイル（@importで他ファイルを参照）\n│\n├── skills/\n│   ├── data-schema.md            # テーブル・カラム定義\n│   └── business-rules.md         # KPI定義・命名規則・業務ルール\n│\n└── memory/\n    ├── MEMORY.md                 # インデックスファイル\n    └── decisions.md              # 設計判断の記録\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"各ファイルの役割","__idx":3},"children":["各ファイルの役割"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"ファイル"},"children":["ファイル"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"用途"},"children":["用途"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["CLAUDE.md"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロジェクト全体の設定。skills/とmemory/を",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@import"]},"で読み込む"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["skills/data-schema.md"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["利用可能なテーブル、カラム、データ型の定義"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["skills/business-rules.md"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["KPIの計算式、許可された軸・指標、命名規則"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["memory/MEMORY.md"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["記憶のインデックス（自動生成）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["memory/decisions.md"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["過去の設計判断や注意事項を記録"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"セットアップ手順","__idx":4},"children":["セットアップ手順"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-projectを作成","__idx":5},"children":["Step 1: Projectを作成"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure AI Studioにログイン"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["左サイドバーから ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"Projects\""]}," をクリック"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"New Project\""]}," をクリック"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["プロジェクト名を入力（例: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customer-journey-analysis"]},"）"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/01-project-creation.718098d1e86dc3c92dc3ddf3d8e4716d322c8f1bf2007416bd78bf8f9fcbc004.94e46156.png","alt":"Project作成画面"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-フォルダ構造を作成","__idx":6},"children":["Step 2: フォルダ構造を作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["新規Projectでは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/home/agent/projects/<your-project-name>/"]}," が自動的に作成されます。ただし、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skills/"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["memory/"]}," のサブフォルダは自動では作成されないため、別途作成が必要です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Project内のチャットでTAISに以下のように指示するだけで作成できます："]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["「このプロジェクト内に ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skills/"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["memory/"]}," フォルダを作成してください。」"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["または、以下のコマンドを直接実行することで、確実かつ素早く作成することもできます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"mkdir -p /home/agent/projects/<your-project-name>/skills\nmkdir -p /home/agent/projects/<your-project-name>/memory\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/02-file-tree.8e60c11488aba292cda236718d8a756fe2d4c7c6f339fb2350331bb74b9602f9.94e46156.png","alt":"Project内のファイルツリー表示"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-skillsdata-schemamd-を作成","__idx":7},"children":["Step 3: skills/data-schema.md を作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["データスキーマを明確に定義することで、AIが正しいテーブル・カラムを参照できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"markdown","header":{"controls":{"copy":{}}},"source":"# Data Schema\n\n## テーブル一覧\n\n### members（会員テーブル）\n| カラム | 型 | 説明 |\n|--------|-----|------|\n| member_id | STRING | 会員ID（PK） |\n| age_group | STRING | 年代（'20s', '30s', '40s', '50s+') |\n| member_stage | STRING | 会員ステージ（'bronze', 'silver', 'gold', 'platinum') |\n| registered_at | TIMESTAMP | 登録日時 |\n\n### card_transactions（カード利用履歴）\n| カラム | 型 | 説明 |\n|--------|-----|------|\n| transaction_id | STRING | 取引ID（PK） |\n| member_id | STRING | 会員ID（FK: members） |\n| amount | DECIMAL | 利用金額 |\n| transaction_date | DATE | 利用日 |\n| category | STRING | カテゴリ |\n\n## 許可されたテーブル\n\nAIが参照できるのは以下のテーブルのみ：\n- members\n- card_transactions\n\n**それ以外のテーブルへのアクセスは禁止**\n","lang":"markdown"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-4-skillsbusiness-rulesmd-を作成","__idx":8},"children":["Step 4: skills/business-rules.md を作成"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ビジネスルールを固定化することで、AIによる「誤った解釈」を防ぎます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"markdown","header":{"controls":{"copy":{}}},"source":"# Business Rules\n\n## 許可された軸（ディメンション）\n\n| 軸名 | 対応カラム | 許可値 |\n|------|-----------|--------|\n| 年代 | age_group | '20s', '30s', '40s', '50s+' |\n| 会員ステージ | member_stage | 'bronze', 'silver', 'gold', 'platinum' |\n\n## 許可された指標（メトリクス）\n\n| 指標名 | 計算式 | 説明 |\n|--------|--------|------|\n| カード利用金額 | SUM(amount) | 期間内の合計利用金額 |\n| 利用回数 | COUNT(transaction_id) | 期間内の取引回数 |\n| 平均利用金額 | AVG(amount) | 1回あたり平均利用額 |\n\n## 期間指定ルール\n\n- 「直近3ヶ月」→ `WHERE transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 3 MONTH)`\n- 「2024年」→ `WHERE YEAR(transaction_date) = 2024`\n\n**ユーザーが未定義の指標や期間を指定した場合は、SQLを生成せずエラーメッセージを返す**\n","lang":"markdown"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-5-claudemdを設定","__idx":9},"children":["Step 5: CLAUDE.mdを設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CLAUDE.md"]}," は全セッションで読み込まれる設定ファイルです。Treasure AI Studio上に直接編集できるエディターはないため、Project内のチャットでTAISに以下のように指示してください："]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["「このプロジェクトの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CLAUDE.md"]}," に以下の内容を書き込んでください："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["{以下の内容を貼り付けてください}」"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"markdown","header":{"controls":{"copy":{}}},"source":"# Project: Customer Journey Analysis\n\nこのプロジェクトでは、顧客行動データからジャーニー分析を行います。\n\n## Data Schema\n@import skills/data-schema.md\n\n## Business Rules  \n@import skills/business-rules.md\n\n## Guidelines\n\n- **AIの役割**: ユーザーの自然言語リクエストから条件（年代、期間、指標）を抽出\n- **システムの役割**: 事前定義されたSQLテンプレートに条件を差し込んで実行\n- SQLの構造（JOIN、GROUP BY、集計ロジック）は固定化されており、AIが自由に変更してはいけない\n","lang":"markdown"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["補足"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@import"]}," はプロジェクト内の全ファイルを自動で読み込むわけではありません。ここに明示的に指定したファイルだけをロードします。Step 3・4で作成したファイルのパスと一致していることを確認してください。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/03-claude-md-import.ef315c1f71bb1edc1deb796d10b4fca54f246bac2a2bddcf1be1f5e51fd4a6e0.94e46156.png","alt":"CLAUDE.mdの編集画面"},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"aiの役割を制限する設計思想","__idx":10},"children":["AIの役割を制限する設計思想"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["この固定化アプローチの核心は、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["AIに任せる部分と任せない部分を明確に分離"]},"することです。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"-aiに任せる部分解釈設定","__idx":11},"children":["✅ AIに任せる部分（解釈・設定）"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ユーザーの自然言語リクエストから条件を抽出"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「年代別」「直近3ヶ月」などの条件を適切な値にマッピング"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["事前定義された「6つの業務メニュー」から適切なシナリオを判定"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"-aiに任せない部分ロジック構築","__idx":12},"children":["❌ AIに任せない部分（ロジック構築）"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["参照するテーブルやJOIN方法を毎回自由に決める"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["新しいKPIや独自の計算式を勝手に作成する"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["定義されていないカラムや属性を使う"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ルール外のSQLを生成してそのまま実行する"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ベストプラクティス","__idx":13},"children":["ベストプラクティス"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-sqlテンプレートの型固定化","__idx":14},"children":["1. SQLテンプレートの型固定化"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これは",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["任意"]},"のテクニックです。最初から必須ではありませんが、以下のような状況になったときに活用すると効果的です："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["同じ質問をしても集計結果がセッションごとにブレる"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["特定の分析が繰り返し失敗する"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["特定の条件のレコードを毎回集計から除外したい"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skills/business-rules.md"]}," にSQLテンプレートを記載することで、AIが参照する構造を固定化し、より安定したクエリ生成が期待できます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"markdown","header":{"controls":{"copy":{}}},"source":"## クロス集計SQLテンプレート\n\n```sql\nSELECT\n  {縦軸},\n  {横軸},\n  {集計指標}\nFROM {決められた参照表}\nWHERE {決められた期間条件}\nGROUP BY {縦軸}, {横軸}\n```\n\n**{} 部分のみをAIが差し替える。それ以外は変更不可**\n","lang":"markdown"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-マスター定義による3段階のガードレール","__idx":15},"children":["2. マスター定義による3段階のガードレール"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の「3つの防波堤」を実装します。バリデーションルールのブロックを ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CLAUDE.md"]}," にコピーして追記してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["防波堤1: データ範囲の限定"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["業務シナリオごとに参照可能なテーブルを物理的に制限"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["例: クロス集計Agentには ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["members"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card_transactions"]}," のみアクセス許可"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["防波堤2: マスター定義済み項目のみ利用"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AIは独自解釈せず、事前定義した「軸・属性マスター」とユーザー指示をマッピングするのみ"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["防波堤3: 定義外リクエストの実行停止"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["指定項目が存在しない、条件が曖昧、想定外の組み合わせ → SQL生成せず停止し、ユーザーにガイドを返す"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Project内のチャットでTAISに以下のように指示してください："]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["「このプロジェクトの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CLAUDE.md"]}," の末尾に以下の内容を追記してください："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["{以下の内容を貼り付けてください}」"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"markdown","header":{"controls":{"copy":{}}},"source":"## バリデーションルール\n\n実行前に以下をチェック：\n1. 抽出した「年代」「会員ステージ」が許可された軸マスターに存在するか？\n2. 「カード利用金額」が定義済み指標か？\n3. 期間「直近3ヶ月」が許可された範囲か？\n4. 外部エクスポートは許可された形式か？\n\n**1つでもNGなら実行停止し、ユーザーに差し戻す**\n","lang":"markdown"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-memorydecisionsmd-で設計判断を記録","__idx":16},"children":["3. memory/decisions.md で設計判断を記録"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["（任意）"]}," このファイルは新規プロジェクトでは必須ではありません。運用が始まり、ルールの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["「なぜそうなったか」"]}," という背景・経緯を残したくなったときに活用してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["decisions.md"]}," に記録すると有効なケース："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["特定の計算方法を選んだ理由"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["過去の分析で失敗したこととその対処"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["スキーマやルールファイルには書けない文脈的な情報"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["注意点：ルールそのものが変わった場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["decisions.md"]}," に追記するのではなく、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["business-rules.md"]}," や ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data-schema.md"]}," 本体を更新してください。また、記載が増えすぎるとAIが部分的に無視することがあるため、重要な判断のみを簡潔に残すことを推奨します。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"markdown","header":{"controls":{"copy":{}}},"source":"# Design Decisions\n\n## 2026-05-20: 「平均」の計算を member 単位に統一\n\n**背景**: 当初は transaction 単位で AVG(amount) を計算していたが、営業部から「会員単位の平均」が必要と指摘。\n\n**決定**: \n- `AVG(amount)` → `SUM(amount) / COUNT(DISTINCT member_id)`\n- business-rules.md の指標定義を更新\n\n**理由**: 1人で100回利用した場合と100人が1回ずつ利用した場合を区別するため\n","lang":"markdown"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"まとめ","__idx":17},"children":["まとめ"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI StudioのProject機能を使うことで、以下のような点でより便利に製品をご利用いただける方法を紹介しました："]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["一貫性"]},": 全チャットで同じデータスキーマ・ビジネスルールを共有"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["安全性"]},": AIの自由度を制限し、誤ったSQL生成を構造的に防止"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["効率性"]},": 毎回の説明が不要になり、施策スピードが向上"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]}]},"headings":[{"value":"Treasure AI Studio: Project機能セットアップガイド","id":"treasure-ai-studio-project機能セットアップガイド","depth":1},{"value":"Project機能とは","id":"project機能とは","depth":2},{"value":"フォルダ構造の例","id":"フォルダ構造の例","depth":2},{"value":"各ファイルの役割","id":"各ファイルの役割","depth":3},{"value":"セットアップ手順","id":"セットアップ手順","depth":2},{"value":"Step 1: Projectを作成","id":"step-1-projectを作成","depth":3},{"value":"Step 2: フォルダ構造を作成","id":"step-2-フォルダ構造を作成","depth":3},{"value":"Step 3: skills/data-schema.md を作成","id":"step-3-skillsdata-schemamd-を作成","depth":3},{"value":"Step 4: skills/business-rules.md を作成","id":"step-4-skillsbusiness-rulesmd-を作成","depth":3},{"value":"Step 5: CLAUDE.mdを設定","id":"step-5-claudemdを設定","depth":3},{"value":"AIの役割を制限する設計思想","id":"aiの役割を制限する設計思想","depth":2},{"value":"✅ AIに任せる部分（解釈・設定）","id":"-aiに任せる部分解釈設定","depth":3},{"value":"❌ AIに任せない部分（ロジック構築）","id":"-aiに任せない部分ロジック構築","depth":3},{"value":"ベストプラクティス","id":"ベストプラクティス","depth":2},{"value":"1. SQLテンプレートの型固定化","id":"1-sqlテンプレートの型固定化","depth":3},{"value":"2. マスター定義による3段階のガードレール","id":"2-マスター定義による3段階のガードレール","depth":3},{"value":"3. memory/decisions.md で設計判断を記録","id":"3-memorydecisionsmd-で設計判断を記録","depth":3},{"value":"まとめ","id":"まとめ","depth":2}],"frontmatter":{"title":"Treasure AI Studio Project機能セットアップガイド - 一貫したAI動作のためのコンテクスト維持","author":"Koshi","date":"2026-05-20T00:00:00.000Z","categories":["ai-studio","best-practice"],"image":"project-setup/01-project-creation.png","seo":{"title":"Treasure AI Studio Project機能セットアップガイド - 一貫したAI動作のためのコンテクスト維持","description":"Treasure AI StudioのProject機能を使って、チャットセッション間で共通のコンテクストを維持し、一貫したAIエージェントの動作を実現し、構造化されたデータスキーマとビジネスルールによって出力の揺らぎを防ぐ方法を学びます。","image":"/assets/01-project-creation.718098d1e86dc3c92dc3ddf3d8e4716d322c8f1bf2007416bd78bf8f9fcbc004.94e46156.png","jsonLd":{"@context":"https://schema.org","@type":"BlogPosting","headline":"Treasure AI Studio Project機能セットアップガイド - 一貫したAI動作のためのコンテクスト維持","image":"https://docs.treasure.ai/blog/images/project-setup/01-project-creation.png","datePublished":"2026-05-20","inLanguage":"ja","author":[{"@type":"Person","name":"Koshi Nakamura"}],"publisher":{"@type":"Organization","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://docs.treasure.ai/ja/blog/treasure-ai-studio-project-setup"}}}},"lastModified":"2026-07-16T09:03:00.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/blog/treasure-ai-studio-project-setup","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}