Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ Slack 通知には `.env` が要る (`cp .env.example .env`)。未設定でも

## 他プロジェクトとの関係

- **Investment** (`~/Documents/Claude/Projects/Investment`): 保有銘柄は
`output/report_data_*.json` の `stock.holdings` を読むだけ。module import はしない (疎結合)。
- **Investment**: 実入力ディレクトリの正は `lib/holdings.py` の `INVESTMENT_OUTPUT`。
`report_data_*.json` の `stock.holdings` を読むだけ。module import はしない (疎結合)。
Investment 側のファイルを書き換えないこと。
- **TradingCopilot**: コード共有はしない (コピー流用の慣習)。指標エンジンの移植元
→ [ADR-0001](docs/adr/0001-separate-sibling-project.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/adr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ ADR の役目。
将来の設計判断ではなく、実装に合わせて更新する比較表として管理する
- **ジャーナルの書式**([#19](https://github.com/Ries630/StockCopilot/issues/19))
— 正は `journal/README.md` にあり、ADR にすると二重管理になる
- **Investment 生成物の既定入力先**([#87](https://github.com/Ries630/StockCopilot/issues/87))
— 可逆的なローカルパス変更であり、`tests/test_holdings.py` が移転後の既定値を固定している

## 一覧

Expand Down
2 changes: 1 addition & 1 deletion lib/holdings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from lib.journal import Execution, load_executions

INVESTMENT_OUTPUT = Path("~/Documents/Claude/Projects/Investment/output").expanduser()
INVESTMENT_OUTPUT = Path("~/AgentProjects/Investment/output").expanduser()

# テクニカル分析可能な資産クラス
_ANALYZABLE_CLASSES = {"国内株式", "米国株式", "海外ETF"}
Expand Down
7 changes: 7 additions & 0 deletions tests/test_holdings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
from lib import holdings, journal


def test_investment_output_uses_agent_projects_default() -> None:
"""Investment の移転後ディレクトリを既定の入力先にする。"""
assert holdings.INVESTMENT_OUTPUT == (
Path.home() / "AgentProjects" / "Investment" / "output"
)


def _report(**overrides) -> dict:
"""テスト用の report_data 相当の dict を組み立てる。"""
data = {
Expand Down
Loading