# Check current holdings against a Kova strategy

Use only after the user asks to check current holdings against a saved strategy. Read existing Kova records freely, but require separate approval for source access, writes, and evaluation. Never trade.

## Resolve the strategy

Use the exact strategy UUID from the conversation. If absent, call `kova_list_strategies`, let the user select, and retain it. Call `kova_show_strategy` to confirm it. Never substitute by name.

## Choose a source before opening it

Inspect visible connectors, tools, and files without opening them. Identify the exact source and accounts first. If the user named them, repeat that scope and ask permission to access it. A general "yes" is not enough while the source or account scope remains unknown.

If Interactive Brokers is visible but the exact accounts are unknown, ask:

> Which exact Interactive Brokers account or accounts should this strategy cover?

Do not open it yet. After the user names the accounts, repeat them and separately ask permission to open Interactive Brokers and retrieve holdings only from them. If the user cannot identify them, ask permission only to list account names; let the user select before retrieval.

If it is not visible, ask where holdings are kept. Offer IBKR's official setup instructions for [ChatGPT](https://www.interactivebrokers.com/en/trading/ai-integrations.php) or [Claude](https://www.interactivebrokers.com/en/trading/ai-integrations.php) only when needed. Otherwise accept a recent CSV, statement PDF, screenshot, pasted holdings, or saved Kova portfolio. Recommend redacting account numbers and unrelated personal information.

Never ask for or expose brokerage credentials. Keep holdings and account data out of logs, screenshots, and unrelated files.

Identifying or connecting a source, or listing account names, is not permission to retrieve holdings. Permission to retrieve holdings is not permission to save them or create a brief. Retrieve only the approved accounts and fields relevant to the selected strategy.

## Prepare the current portfolio

The broker or user-provided source is authoritative for current holdings. Use Kova only when no fresher authorized source exists, and state its timestamp. Never evaluate a proposed or hypothetical portfolio.

Call `kova_show_portfolio` for the exact strategy. Treat `No portfolio found for this strategy` as empty. On any other failure, stop without writes or evaluation.

Confirm whether input is a complete replacement or partial update. Never infer a sale, debt repayment, removal, or zero cash from omission. For replacement, preview removals and require explicit cash or zero.

Classify supplied items before any write:

- **Regular portfolio:** clearly identified US-listed stocks, US-listed ETFs, and USD cash. Clarify symbols and quantities; never silently correct a ticker.
- **Manual assets and liabilities:** use the matching Kova tools for explicitly confirmed property, direct Bitcoin, managed accounts, other valued assets, mortgages, loans, or credit lines. Never infer a liability from an asset.
- **Needs clarification or unsupported:** resolve ambiguity or disclose what will be omitted. Do not send a raw mixed list to `kova_evaluate_portfolio`.

Partition the `kova_show_portfolio` result before building evaluation input. An asset with a UUID is a registered manual record, and every liability is registered separately. Kova includes those records automatically; never copy them into `portfolio`. An asset without a UUID belongs to the saved regular snapshot.

For a partial regular update, start from the saved regular snapshot and apply only confirmed changes. Preserve unmatched stocks, ETFs, options, cash, and UUID-less assets. Whenever you supply `portfolio`, serialize the complete final regular state as schema-valid JSON. For a manual-only update, omit `portfolio` only after the user confirms Kova should reuse the unchanged saved regular snapshot.

For a complete replacement with no regular stocks, options, cash, or UUID-less assets remaining, send this as the string-valued `portfolio` argument after replacing the timestamp: `{"schema_version":"1.0.0","stocks":[],"options":[],"cash":0,"timestamp":"<current UTC>","notes":[]}`. Never omit `portfolio` and accidentally reuse stale regular holdings.

Show a normalized summary before changing anything:

- strategy name and UUID;
- source, as-of date, included and excluded accounts, and reporting currency;
- each regular holding's identifier and quantity or value;
- manual assets and liabilities, including exact existing UUIDs; and
- ambiguities, additions, changes, removals, and retained saved records.

Ask the user to confirm the summary and scope. If manual asset or liability records must change, preview the exact fields and obtain explicit approval for those writes. That approval is not approval to evaluate. After approved writes, call `kova_show_portfolio` again and present the combined state.

## Approve and run the evaluation

Show the final regular payload separately from registered records, whether Kova reuses or replaces the saved snapshot, and any context. Explain that evaluation updates this strategy's portfolio and creates a brief. Then ask:

> This will save or update these holdings on this Kova strategy and create a brief. Should I proceed?

Only after approval, call `kova_evaluate_portfolio` with the exact strategy UUID and approved complete regular payload, or intentionally omit it to reuse the confirmed unchanged snapshot. Registered records stay outside that argument. If input changes, ask again. Keep `brief_id`; if processing, follow retry timing with `kova_show_brief`. Stop and report failure instead of polling.

When complete, faithfully summarize Kova's alignment score, key observations, and first tactical move. Do not add recommendations or change Kova's reasoning. Quote a returned Kova URL exactly; if none is returned, provide the brief ID and say Kova returned no link. Point out any brief claim that is not grounded in the saved strategy.

End with: "Kova is a discipline and reflection tool, not financial advice. It does not predict markets, decide what you should buy, or place trades. All analysis is based on your declared strategy and is provided for educational purposes only."

Kova persists the strategy and evaluated snapshots. The authorized broker or user file remains the source of current holdings. You orchestrate these systems and are not another system of record. Obtain separate authorization for any downstream action.
