# tradememory-protocol - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for tradememory-protocol. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `skills/tradememory-bridge/SKILL.md` Claim: `clm_0003` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `skills/tradememory-bridge/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `CONTRIBUTING.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/QUICK_START.md` et al. Claim: `clm_0002` supported 0.86

## How to Start

- `curl http://localhost:8000/health` Evidence: `docs/DAILY_REFLECTION_SETUP.md` Claim: `clm_0004` supported 0.86
- `git clone https://github.com/mnemox-ai/tradememory-protocol.git` Evidence: `docs/deployment.md` Claim: `clm_0005` supported 0.86
- `curl https://mcp.mnemox.ai/api/v1/health` Evidence: `docs/deployment.md` Claim: `clm_0006` supported 0.86
- `curl -s https://mcp.mnemox.ai/api/v1/health | python -m json.tool` Evidence: `docs/deployment.md` Claim: `clm_0007` supported 0.86
- `pip install MetaTrader5 python-dotenv requests` Evidence: `docs/MT5_SYNC_SETUP.md` Claim: `clm_0008` supported 0.86
- `curl http://localhost:8000/trade/get_active` Evidence: `docs/MT5_SYNC_SETUP.md` Claim: `clm_0009` supported 0.86
- `pip install MetaTrader5` Evidence: `docs/MT5_SYNC_SETUP.md` Claim: `clm_0008` supported 0.86, `clm_0010` supported 0.86
- `pip install -r requirements.txt` Evidence: `docs/QUICK_START.md` Claim: `clm_0011` supported 0.86, `clm_0016` supported 0.86, `clm_0017` supported 0.86
- `pip install -r requirements-dashboard.txt` Evidence: `docs/QUICK_START.md` Claim: `clm_0012` supported 0.86
- `curl -sSL https://raw.githubusercontent.com/mnemox-ai/tradememory-protocol/master/scripts/install.sh | bash` Evidence: `docs/TUTORIAL_ZH.md` Claim: `clm_0013` supported 0.86

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox trial only
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox trial only
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `skills/tradememory-bridge/SKILL.md` Claim: `clm_0003` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `skills/tradememory-bridge/SKILL.md` Claim: `clm_0001` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `CONTRIBUTING.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/QUICK_START.md` et al. Claim: `clm_0002` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `docs/DAILY_REFLECTION_SETUP.md` Claim: `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `CLAUDE.md`, `skills/tradememory-bridge/SKILL.md`
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `docs/DAILY_REFLECTION_SETUP.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `CONTRIBUTING.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/QUICK_START.md` et al.
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `CLAUDE.md`, `skills/tradememory-bridge/SKILL.md`
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `CONTRIBUTING.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/QUICK_START.md` et al.
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0023` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `CONTRIBUTING.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/QUICK_START.md` et al. Claim: `clm_0024` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `skills/tradememory-bridge/SKILL.md` Claim: `clm_0001` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `CONTRIBUTING.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/QUICK_START.md` et al. Claim: `clm_0002` supported 0.86

### Context Scale

- Total files: 96
- Important-file coverage: 40/96
- Evidence index entries: 79
- Role / Skill entries: 1

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for tradememory-protocol, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat tradememory-protocol as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for tradememory-protocol, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 1 role / Skill / project-doc entries.

- **tradememory-bridge** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “tradememory-bridge”, use it for a pre-install experience first, then decide whether to install. Evidence: `skills/tradememory-bridge/SKILL.md`

## Evidence Index

- Indexed 79 evidence entries.

- **⚙️ tradememory-protocol - AI Trading Memory Made Simple** (documentation): ⚙️ tradememory-protocol - AI Trading Memory Made Simple Evidence: `README.md`
- **TradeMemory Protocol — Claude Code 指令** (documentation): TradeMemory Protocol — Claude Code 指令 Evidence: `CLAUDE.md`
- **Quick Start Guide** (documentation): Get TradeMemory Protocol running in 5 minutes. Evidence: `docs/QUICK_START.md`
- **Contributing to TradeMemory Protocol** (documentation): Contributing to TradeMemory Protocol Evidence: `CONTRIBUTING.md`
- **TradeMemory Bridge for Binance** (skill_instruction): Store Binance spot trades into persistent memory. Recall similar past trades before entering new positions. Detect behavioral biases overtrading, revenge trading . Track strategy performance across sessions. Evidence: `skills/tradememory-bridge/SKILL.md`
- **License** (source_file): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files the "Software" , to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Evidence: `LICENSE`
- **TradeMemory API Reference** (documentation): TradeMemory exposes its functionality via HTTP endpoints. Any MCP-compatible AI agent or HTTP client can use these endpoints. Evidence: `docs/API.md`
- **Architecture Overview** (documentation): Internal architecture of TradeMemory Protocol: module structure, data flow, SQLite schema, and the 3-layer memory model. Evidence: `docs/ARCHITECTURE.md`
- **Awesome Lists — Submission Tracker** (documentation): Track all awesome-mcp-servers list submissions for TradeMemory Protocol. Evidence: `docs/AWESOME_LISTS.md`
- **Before/After: The Difference Memory Makes** (documentation): Before/After: The Difference Memory Makes Evidence: `docs/BEFORE_AFTER.md`
- **Daily Reflection 自動化設定指南** (documentation): 1. 開啟「工作排程器」 Task Scheduler 2. 「建立基本工作」 3. 設定： - 名稱 ： TradeMemory Daily Reflection - 觸發程序 ：每天 - 時間 ：23:55 - 動作 ：啟動程式 - 程式： C:\OpenClawWork\tradememory-protocol\start daily reflection.bat - 條件 ：取消勾選「只有在電腦使用 AC 電源時才啟動工作」 Evidence: `docs/DAILY_REFLECTION_SETUP.md`
- **MT5 Sync Script 設定指南** (documentation): mt5 sync.py 是非侵入式監控腳本，獨立運行於 NG Gold EA 之外。 Evidence: `docs/MT5_SYNC_SETUP.md`
- **Outcome-Weighted Memory OWM : A Cognitive Memory Architecture for AI Trading Agents** (documentation): Outcome-Weighted Memory OWM : A Cognitive Memory Architecture for AI Trading Agents Evidence: `docs/OWM_FRAMEWORK.md`
- **ReflectionEngine 使用指南** (documentation): ReflectionEngine 是 TradeMemory Protocol 的核心模組，負責分析交易記錄並產生 AI 驅動的每日反思報告。 Evidence: `docs/REFLECTION_ENGINE_GUIDE.md`
- **Reflection Report Format Design** (documentation): This document defines the output format for TradeMemory's reflection reports. These reports are what users see when their agent "reflects" on its trading performance. Evidence: `docs/REFLECTION_FORMAT.md`
- **TradeMemory Data Schema** (documentation): This document describes the core data structures used in TradeMemory Protocol. All examples show actual JSON payloads that you'll work with when calling MCP tools. Evidence: `docs/SCHEMA.md`
- **TradeMemory Protocol — Complete Tutorial** (documentation): TradeMemory Protocol — Complete Tutorial Evidence: `docs/TUTORIAL.md`
- **TradeMemory Protocol — 完整教學** (documentation): 所需時間： 約 10 分鐘 前置需求： Python 3.10+、git 是否需要 API key： 不需要（demo 使用模擬資料） Evidence: `docs/TUTORIAL_ZH.md`
- **Deployment Guide — mcp.mnemox.ai** (documentation): TradeMemory Hosted API deployment using Docker Compose + Caddy auto-TLS . Evidence: `docs/deployment.md`
- **TradeMemory Hosted API Specification** (documentation): TradeMemory Hosted API Specification Evidence: `docs/hosted-api-spec.md`
- **MT5 Account Configuration** (source_file): MT5 Account Configuration Copy this file to .env and fill in your credentials Evidence: `.env.example`
- **Singleton DB — initialized on first use** (source_file): DB PATH = os.environ.get "TM HOSTED DB", "hosted/hosted.db" ⋮---- app = FastAPI ⋮---- class HostedDB ⋮---- def init self, db path: str = DB PATH ⋮---- def conn self - sqlite3.Connection ⋮---- conn = sqlite3.connect self.db path ⋮---- def init schema self ⋮---- conn = self. conn ⋮---- seed = os.environ.get "TM API KEYS", "" ⋮---- entry = entry.strip ⋮---- parts = entry.split ":" key = parts 0 account id = parts 1 if len parts 1 else "default" plan = parts 2 if len parts 2 else "free" ⋮---- def save subscriber self, email: str, source: str = "waitlist" - bool ⋮---- inserted = conn.execute "SELECT changes " .fetchone 0 ⋮---- def get subscriber count self - int ⋮---- def validate key self, api… Evidence: `hosted/server.py`
- **Pyproject** (source_file): project name = "tradememory-protocol" version = "0.4.0" description = "MCP memory system for AI trading agents. Store, recall, and learn from past trades." authors = {name = "Mnemox", email = "contact@mnemox.ai"} license = {text = "MIT"} readme = "README.md" requires-python = " =3.10" keywords = "mcp", "trading", "ai", "memory", "agent", "reflection" classifiers = "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Office/Business :: Financial", "Topic :: Scientific/Engineering :: Artificial Intelli… Evidence: `pyproject.toml`
- **Optional: MT5 integration required for mt5 sync.py** (source_file): fastapi =0.109.0 fastmcp =2.0.0 uvicorn =0.27.0 pydantic =2.5.3 pytest =7.4.4 pytest-asyncio =0.23.3 httpx =0.26.0 python-dotenv =1.0.0 requests =2.31.0 Evidence: `requirements.txt`
- **Fallback to legacy endpoint** (source_file): BINANCE API KEY = os.getenv "BINANCE API KEY", "" BINANCE API SECRET = os.getenv "BINANCE API SECRET", "" BINANCE BASE URL = os.getenv "BINANCE BASE URL", "https://api.binance.com" TRADEMEMORY API = os.getenv "TRADEMEMORY API", "http://localhost:8000" SYNC INTERVAL = int os.getenv "BINANCE SYNC INTERVAL", "60" ⋮---- WATCH SYMBOLS = ⋮---- last trade id: Dict str, int = {} ⋮---- def sign params: Dict str, Any - str ⋮---- query string = urllib.parse.urlencode params ⋮---- def binance get endpoint: str, params: Optional Dict str, Any = None, signed: bool = False - Any ⋮---- url = f"{BINANCE BASE URL}{endpoint}" params = params or {} ⋮---- headers = {"X-MBX-APIKEY": BINANCE API KEY} resp = reque… Evidence: `scripts/binance_sync.py`
- **Truncate to Discord embed limit 4096 chars** (source_file): TRADEMEMORY API = os.getenv 'TRADEMEMORY API', 'http://localhost:8000' PROJECT DIR = os.path.dirname os.path.abspath file OUTPUT DIR = os.getenv 'REFLECTION OUTPUT DIR', os.path.join PROJECT DIR, 'reflections' DISCORD WEBHOOK URL = os.getenv "DISCORD WEBHOOK URL", "" ⋮---- def send discord title: str, message: str, color: int = 0x9B59B6 ⋮---- """Send a Discord embed notification. Silently fails if no webhook configured.""" ⋮---- Truncate to Discord embed limit 4096 chars ⋮---- message = message :3997 + "..." payload = { ⋮---- def generate daily reflection target date: date = None - str ⋮---- target date = date.today ⋮---- date str = target date.isoformat ⋮---- response = requests.post ⋮----… Evidence: `scripts/daily_reflection.py`
- **Update known set also remove closed positions** (source_file): DISCORD WEBHOOK URL = os.getenv "DISCORD WEBHOOK URL", "" ⋮---- def send discord message: str, color: int = 0x00FF00 ⋮---- """Send a Discord embed notification. Silently fails if no webhook configured.""" ⋮---- payload = { ⋮---- log = logging.getLogger "mt5 sync" ⋮---- MT5 LOGIN = int os.getenv 'MT5 LOGIN', '0' MT5 PASSWORD = os.getenv 'MT5 PASSWORD', '' MT5 SERVER = os.getenv 'MT5 SERVER', '' TRADEMEMORY API = os.getenv 'TRADEMEMORY API', 'http://localhost:8000' SYNC INTERVAL = int os.getenv 'SYNC INTERVAL', '60' ⋮---- MAGIC TO STRATEGY = { ⋮---- STATE FILE = os.path.join os.path.dirname os.path.abspath file , "mt5 sync state.json" ⋮---- MT5 API TIMEOUT = 30 ⋮---- MAX CONSECUTIVE ERRORS =… Evidence: `scripts/mt5_sync.py`
- **CRITICAL: Use UTC timezone CIO fix - DEC-014** (source_file): MT5 = None ⋮---- MT5 LOGIN = int os.getenv 'MT5 LOGIN', '0' MT5 PASSWORD = os.getenv 'MT5 PASSWORD', '' MT5 SERVER = os.getenv 'MT5 SERVER', '' MT5 PATH = os.getenv 'MT5 PATH', r'C:\Program Files\MetaTrader 5\terminal64.exe' SYNC INTERVAL = int os.getenv 'SYNC INTERVAL', '60' TRADEMEMORY API = os.getenv 'TRADEMEMORY API', 'http://localhost:8000' ⋮---- MAGIC TO STRATEGY = { ⋮---- last synced position id = 0 ⋮---- def init mt5 - bool ⋮---- authorized = MT5.login login=MT5 LOGIN, password=MT5 PASSWORD, server=MT5 SERVER ⋮---- account info = MT5.account info ⋮---- def get completed positions from date: datetime - List tuple ⋮---- """ Get completed positions has both entry and exit deals since f… Evidence: `scripts/trade_adapter.py`
- **2. Cap to max lot size** (source_file): SAFE DEFAULTS = RiskConstraints ⋮---- class AdaptiveRisk ⋮---- MIN TRADES = 5 LOOKBACK DAYS = 30 ⋮---- closed = self. get closed trades symbol=symbol, strategy=strategy ⋮---- constraints = SAFE DEFAULTS.model copy ⋮---- constraints = self. combine constraints closed ⋮---- def get constraints self, agent id: str - RiskConstraints ⋮---- state = self.state manager.load state agent id raw = state.risk constraints ⋮---- constraints = self.get constraints agent id lot = proposal.lot size reasons: List str = ⋮---- 2. Cap to max lot size ⋮---- lot = constraints.max lot size ⋮---- 3. Apply global scale factor ⋮---- new lot = round lot constraints.scale factor, 2 ⋮---- lot = new lot ⋮---- 4. Apply se… Evidence: `src/tradememory/adaptive_risk.py`
- **Convert datetime if present** (source_file): class Database ⋮---- def init self, db path: str = "data/tradememory.db" ⋮---- def get connection self - sqlite3.Connection ⋮---- conn = sqlite3.connect self.db path ⋮---- def init schema self ⋮---- conn = self. get connection ⋮---- def insert trade self, trade data: Dict str, Any - bool ⋮---- def update trade outcome self, trade id: str, outcome data: Dict str, Any - bool ⋮---- """ Update trade with exit outcome. Args: trade id: Trade ID outcome data: Exit data exit price, pnl, etc. Returns: True if successful """ ⋮---- Convert datetime if present ⋮---- Build UPDATE query fields = ⋮---- query = f"UPDATE trade records SET {', '.join fields } WHERE id = :id" ⋮---- def get trade self, trade i… Evidence: `src/tradememory/db.py`
- **Create TradeRecord** (source_file): class TradeJournal ⋮---- def init self, db: Optional Database = None ⋮---- Create TradeRecord trade = TradeRecord ⋮---- Persist to database success = self.db.insert trade trade.model dump ⋮---- outcome data = { ⋮---- Optional fields ⋮---- Update database success = self.db.update trade outcome trade id, outcome data ⋮---- def get trade self, trade id: str - Optional TradeRecord ⋮---- trade data = self.db.get trade trade id ⋮---- trades data = self.db.query trades ⋮---- def get active trades self - List TradeRecord ⋮---- all trades = self.db.query trades limit=1000 ⋮---- active = Evidence: `src/tradememory/journal.py`
- **Insert directly to DB bypasses Pydantic MarketContext validation** (source_file): mcp = FastMCP "tradememory-protocol" ⋮---- db: Optional Database = None ⋮---- def get db - Database ⋮---- db = Database ⋮---- def ensure tz ts: Optional str - str ⋮---- existing = db.query semantic strategy=strategy name, symbol=symbol, limit=10 ⋮---- weight = min 2.0, abs pnl r if pnl r is not None else 1.0 confirmed = pnl 0 ⋮---- sem id = f"sem-{strategy name.lower }-{symbol.lower }-{uuid.uuid4 .hex :8 }" alpha = 1.0 + weight if confirmed else 0.0 beta = 1.0 + 0.0 if confirmed else weight ⋮---- proc id = f"proc-{strategy name.lower }-{symbol.lower }" existing = db.query procedural strategy=strategy name, symbol=symbol, limit=1 ⋮---- rec = existing 0 n = rec.get "sample size", 0 new n = n… Evidence: `src/tradememory/mcp_server.py`
- **Models** (source_file): class TradeDirection str, Enum ⋮---- LONG = "long" SHORT = "short" ⋮---- class TradeGrade str, Enum ⋮---- A = "A" B = "B" C = "C" D = "D" F = "F" ⋮---- class MarketContext BaseModel ⋮---- price: float atr: Optional float = None session: Optional str = None indicators: Dict str, Any = Field default factory=dict news sentiment: Optional float = None ⋮---- class TradeRecord BaseModel ⋮---- id: str = Field ..., description="Unique trade ID T-YYYY-NNNN " timestamp: datetime = Field ..., description="Decision timestamp UTC " symbol: str = Field ..., description="Trading instrument XAUUSD, BTCUSDT, etc. " direction: TradeDirection lot size: float strategy: str = Field ..., description="Strategy ta… Evidence: `src/tradememory/models.py`
- **Extract trade data from deals** (source_file): class MT5Connector ⋮---- def init mt5 self ⋮---- authorized = self.mt5.login login=login, password=password, server=server ⋮---- def disconnect self ⋮---- def sync trades self, agent id: str = "ng-gold-agent" - Dict str, int ⋮---- state = self.state manager.load state agent id last sync = state.warm memory.get "last mt5 sync timestamp", 0 ⋮---- from date = datetime.fromtimestamp last sync if last sync 0 else datetime 2020, 1, 1 to date = datetime.now ⋮---- history = self.mt5.history deals get from date, to date ⋮---- synced = 0 skipped = 0 errors = 0 ⋮---- positions = self. group deals by position history ⋮---- trade id = f"MT5-{position ticket}" existing = self.journal.get trade trade id ⋮… Evidence: `src/tradememory/mt5_connector.py`
- **Context** (source_file): @dataclass class ContextVector ⋮---- symbol: Optional str = None price: Optional float = None ⋮---- atr d1: Optional float = None atr h1: Optional float = None atr m5: Optional float = None atr ratio h1 d1: Optional float = None ⋮---- regime: Optional str = None volatility regime: Optional str = None ⋮---- session: Optional str = None hour utc: Optional int = None day of week: Optional int = None ⋮---- spread points: Optional float = None spread as atr pct: Optional float = None ⋮---- drawdown pct: Optional float = None consecutive losses: Optional int = None confidence: Optional float = None ⋮---- CATEGORICAL WEIGHTS = ⋮---- NUMERICAL WEIGHTS = ⋮---- def context similarity c1: ContextVecto… Evidence: `src/tradememory/owm/context.py`
- **Kelly** (source_file): valid = m for m in memories if m.data.get "pnl r" is not None ⋮---- win weights: float = 0.0 loss weights: float = 0.0 win pnl weighted: float = 0.0 loss pnl weighted: float = 0.0 ⋮---- pnl r = m.data "pnl r" w = max m.score, 0.0 ⋮---- total weight = win weights + loss weights ⋮---- p = win weights / total weight q = 1.0 - p ⋮---- b = win pnl weighted / win weights if win weights 0 else 0.0 a = loss pnl weighted / loss weights if loss weights 0 else 0.0 ⋮---- f star = float "inf" ⋮---- f star = p / a - q / b ⋮---- result = f star fractional risk appetite Evidence: `src/tradememory/owm/kelly.py`
- **Migration** (source_file): def migrate trades to episodic db - int ⋮---- conn = db. get connection ⋮---- rows = conn.execute "SELECT FROM trade records" .fetchall count = 0 now = datetime.utcnow .isoformat ⋮---- trade = dict row ⋮---- raw ctx = trade.get "market context" or "{}" ⋮---- ctx = json.loads raw ctx if isinstance raw ctx, str else raw ctx ⋮---- ctx = {} ⋮---- context json = raw ctx if isinstance raw ctx, str else json.dumps raw ctx ⋮---- regime = ctx.get "regime" session = ctx.get "session" atr d1 raw = ctx.get "atr d1" or ctx.get "atr daily" atr h1 raw = ctx.get "atr h1" or ctx.get "atr hourly" atr d1 = float atr d1 raw if atr d1 raw is not None else None atr h1 = float atr h1 raw if atr h1 raw is not None… Evidence: `src/tradememory/owm/migration.py`
- **Recall** (source_file): @dataclass class ScoredMemory ⋮---- memory id: str memory type: str score: float components: Dict str, float = field default factory=dict data: Dict str, Any = field default factory=dict ⋮---- def sigmoid x: float - float ⋮---- ex = math.exp x ⋮---- pnl r = memory.get "pnl r" ⋮---- ts = datetime.fromisoformat timestamp iso.replace "Z", "+00:00" now = datetime.now timezone.utc age days = max now - ts .total seconds / 86400.0, 0.0 ⋮---- def compute confidence factor confidence: float - float ⋮---- relevance = 0.0 ⋮---- relevance = 0.5 ⋮---- relevance = 0.3 ⋮---- relevance = -0.2 ⋮---- raw = 1.0 + alpha relevance ⋮---- aff = affective state or {} drawdown = aff.get "drawdown state", 0.0 consec… Evidence: `src/tradememory/owm/recall.py`
- **Check structure markers at least 2 of these should exist** (source_file): class ReflectionEngine ⋮---- def init self, journal: Optional TradeJournal = None ⋮---- target date = date.today ⋮---- trades = self. get trades for date target date ⋮---- metrics = self. calculate daily metrics trades ⋮---- def get trades for date self, target date: date - List TradeRecord ⋮---- all trades = self.journal.query history limit=1000 ⋮---- target str = target date.isoformat date trades = ⋮---- trade date str = trade.timestamp :10 ⋮---- trade date str = trade.timestamp.date .isoformat ⋮---- def calculate daily metrics self, trades: List TradeRecord - Dict str, Any ⋮---- total = len trades winners = sum 1 for t in trades if t.pnl and t.pnl 0 losers = sum 1 for t in trades if t.pn… Evidence: `src/tradememory/reflection.py`
- **Server** (source_file): app = FastAPI ⋮---- journal = TradeJournal state manager = StateManager reflection engine = ReflectionEngine journal=journal mt5 connector = MT5Connector journal=journal, state manager=state manager adaptive risk = AdaptiveRisk journal=journal, state manager=state manager ⋮---- class RecordDecisionRequest BaseModel ⋮---- trade id: str symbol: str direction: str lot size: float strategy: str confidence: float reasoning: str market context: Dict str, Any references: Optional List str = None ⋮---- class RecordOutcomeRequest BaseModel ⋮---- exit price: float pnl: float exit reasoning: str pnl r: Optional float = None hold duration: Optional int = None slippage: Optional float = None execution q… Evidence: `src/tradememory/server.py`
- **State** (source_file): class StateManager ⋮---- def init self, db: Optional Database = None ⋮---- def load state self, agent id: str - SessionState ⋮---- state data = self.db.load session state agent id ⋮---- new state = SessionState ⋮---- def save state self, state: SessionState - bool ⋮---- success = self.db.save session state state.model dump ⋮---- """ Update a specific warm memory entry. Args: agent id: Agent identifier key: Memory key value: Memory value Returns: True if successful """ state = self.load state agent id ⋮---- def get warm memory self, agent id: str, key: str - Optional Any ⋮---- """ Retrieve a warm memory entry. Args: agent id: Agent identifier key: Memory key Returns: Memory value or None """… Evidence: `src/tradememory/state.py`
- **Changelog** (documentation): All notable changes to this project will be documented in this file. Format follows Keep a Changelog https://keepachangelog.com/ . Evidence: `CHANGELOG.md`
- **TradeMemory Protocol — 開發路線圖** (documentation): 這是 Mnemox AI 的主線開發計畫。Claude Code 每次開新 session 時讀取此檔案，找到第一個 ❌ 任務繼續執行。完成後標記 ✅ 並 commit。 Evidence: `ROADMAP.md`
- **Security Policy** (documentation): Version Supported --------- ----------- 0.1.x Yes Evidence: `SECURITY.md`
- **TradeMemory Demo Video Script 2 min** (documentation): TradeMemory Demo Video Script 2 min Evidence: `drafts/demo-video-script.md`
- **FB Post — TradeMemory Protocol v0.3.0** (documentation): FB Post — TradeMemory Protocol v0.3.0 Evidence: `drafts/fb-v030-zh.md`
- **MQL5 Freelance 啟動包** (documentation): Sean 的 MQL5 帳號：Xuan Wai Peng（中國台灣 / 123 rating / 0 products / 0 jobs） 目標：本週拿到第一個案子 Evidence: `drafts/mql5-profile-and-proposals.md`
- **Demo Video Script — TradeMemory Protocol** (documentation): Demo Video Script — TradeMemory Protocol Evidence: `marketing/demo-script.md`
- **Forex Factory Post — TradeMemory Protocol** (documentation): Forex Factory Post — TradeMemory Protocol Evidence: `marketing/forex-factory-post.md`
- **MQL5.com Article / Forum Post — TradeMemory Protocol** (documentation): MQL5.com Article / Forum Post — TradeMemory Protocol Evidence: `marketing/mql5-post.md`
- **Reddit Post — TradeMemory Protocol** (documentation): - Subreddit: r/algotrading primary , r/metatrader5 secondary - Title: I built an open-source memory layer for AI trading agents — it remembers what works across sessions - Flair: Strategy / Infrastructure depends on subreddit Evidence: `marketing/reddit-post.md`
- **Mt5 Sync State** (structured_config): { "last synced ticket": 2351210003, "updated at": "2026-03-02T18:01:58.026461+00:00" } Evidence: `mt5_sync_state.json`
- **Daily 2026 03 01** (structured_config): { "generated at": "2026-03-01T21:41:51.792681", "period days": 30, "account": { "balance": 9811.73, "open positions": 1, "open pnl": 557.69 }, "strategy summary": { "VolBreakout": { "trades": 3, "wins": 2, "total pnl": 1656.71 }, "NG Gold": { "trades": 2, "wins": 2, "total pnl": 125.30000000000001 }, "Manual": { "trades": 4, "wins": 1, "total pnl": -152.0 } }, "open positions": { "ticket": 2351006675, "symbol": "XAUUSD", "direction": "LONG", "volume": 0.07, "open price": 5200.59, "current price": 5280.26, "profit": 557.69, "magic": 260112, "strategy": "VolBreakout", "open time": "2026-02-27T15:58:37" } , "alerts": { "level": "MEDIUM", "type": "strategy silent", "strategy": "IntradayMomentum… Evidence: `reports/daily_2026-03-01.json`
- **Weekly 2026 03 01** (structured_config): { "generated at": "2026-03-01T21:41:56.841800", "period start": "2026-02-15T21:41:56.839780", "strategy metrics": { "Manual": { "total trades": 4, "wins": 1, "losses": 3, "win rate": 0.25, "total pnl": -152.0, "profit factor": 0.27, "avg win": 55.0, "avg loss": 69.0, "expectancy": -38.0 }, "NG Gold": { "total trades": 2, "wins": 2, "losses": 0, "win rate": 1.0, "total pnl": 125.3, "profit factor": Infinity, "avg win": 62.65, "avg loss": 0, "expectancy": 62.65 }, "VolBreakout": { "total trades": 3, "wins": 2, "losses": 1, "win rate": 0.6666666666666666, "total pnl": 1656.71, "profit factor": 39.27, "avg win": 850.0, "avg loss": 43.29, "expectancy": 552.24 } }, "total trades": 9, "backtest ba… Evidence: `reports/weekly_2026-03-01.json`
- **Server** (structured_config): { "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", "name": "io.github.mnemox-ai/tradememory-protocol", "description": "MCP memory for AI trading agents. Store trades, recall similar setups, track strategy performance.", "repository": { "url": "https://github.com/mnemox-ai/tradememory-protocol", "source": "github" }, "version": "0.4.0", "packages": { "registryType": "pypi", "identifier": "tradememory-protocol", "version": "0.4.0", "transport": { "type": "stdio" }, "environmentVariables": } } Evidence: `server.json`
- **.dockerignore** (source_file): pycache / .pyc .pyo .env .db .sqlite data/ .git/ .github/ .internal/ .devcontainer/ scripts/debug/ .claude/ .pytest cache/ venv/ .egg-info/ docs/ tests/ .md !README.md LICENSE Evidence: `.dockerignore`
- **Python** (source_file): Python pycache / .py cod $py.class .so .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ .egg-info/ .installed.cfg .egg Evidence: `.gitignore`
- **.Pre Commit Config** (source_file): repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files args: '--maxkb=500' - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.4.4 hooks: - id: ruff args: --fix - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.10.0 hooks: - id: mypy additional dependencies: pydantic =2.5.3, fastapi =0.109.0 args: --ignore-missing-imports, --check-untyped-defs pass filenames: false entry: mypy src/tradememory/ Evidence: `.pre-commit-config.yaml`
- **Install system dependencies** (source_file): LABEL maintainer="Mnemox " LABEL description="TradeMemory Hosted API — Multi-tenant AI Trading Memory API" Evidence: `Dockerfile`
- **Caddyfile** (source_file): mcp.mnemox.ai { reverse proxy tradememory-api:8080 encode gzip log { output stdout } } Evidence: `deploy/Caddyfile`
- The remaining 19 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `README.md`, `CLAUDE.md`, `docs/QUICK_START.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `README.md`, `CLAUDE.md`, `docs/QUICK_START.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Project Overview and Getting Started**: importance `high`
  - source_paths: README.md, pyproject.toml, requirements.txt, .env.example, docs/QUICK_START.md
- **System Architecture and Core Components**: importance `high`
  - source_paths: src/tradememory/server.py, src/tradememory/mcp_server.py, src/tradememory/models.py, src/tradememory/db.py, src/tradememory/state.py
- **OWM Memory Framework, Reflection, and Risk**: importance `high`
  - source_paths: src/tradememory/owm/context.py, src/tradememory/owm/recall.py, src/tradememory/owm/kelly.py, src/tradememory/owm/migration.py, src/tradememory/reflection.py
- **Trading Integrations, Deployment, and Operations**: importance `high`
  - source_paths: src/tradememory/mt5_connector.py, hosted/server.py, scripts/mt5_sync.py, scripts/binance_sync.py, scripts/trade_adapter.py

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `5c278c42173f225f1b7d9814c8a3f19a4b8a65a9`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `pyproject.toml`, `requirements.txt`, `docs/API.md`, `docs/ARCHITECTURE.md`, `docs/AWESOME_LISTS.md`, `docs/BEFORE_AFTER.md`, `docs/DAILY_REFLECTION_SETUP.md`, `docs/MT5_SYNC_SETUP.md`, `docs/OWM_FRAMEWORK.md`, `docs/QUICK_START.md`, `docs/REFLECTION_ENGINE_GUIDE.md`, `docs/REFLECTION_FORMAT.md`, `docs/SCHEMA.md`, `docs/TUTORIAL.md`, `docs/TUTORIAL_ZH.md`, `docs/deployment.md`, `docs/hosted-api-spec.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Capability evidence risk requires verification

- Trigger: README/documentation is current enough for a first validation pass.
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/Eltano1985/tradememory-protocol
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/Eltano1985/tradememory-protocol
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Security or permission risk requires verification

- Trigger: no_demo
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/Eltano1985/tradememory-protocol
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Maintenance risk requires verification

- Trigger: issue_or_pr_quality=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/Eltano1985/tradememory-protocol
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Maintenance risk requires verification

- Trigger: release_recency=unknown。
- Host AI rule: Reproduce the official install and quickstart path in an isolated environment.
- Why it matters: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/Eltano1985/tradememory-protocol
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
