# GrainBud AI Portfolio Skill

GrainBud is a private read-only investment portfolio API. Use it to analyze the user's current confirmed holdings, reference quotes, FX estimates, account freshness, source lineage, and risk flags.

## Endpoint

- Single-link AI brief: `https://grainbud.poorlow.com/agent.md`
- AI crawler index: `https://grainbud.poorlow.com/llms.txt`
- Portfolio snapshot: `https://grainbud.poorlow.com/api/ai/portfolio/snapshot`
- OpenAPI contract: `https://grainbud.poorlow.com/api/ai/openapi`
- Required scope when auth is enabled: `portfolio:snapshot:read`

## Authentication

Authentication required: no

Preferred form:

```bash
curl -H "Authorization: Bearer <token>" "https://grainbud.poorlow.com/api/ai/portfolio/snapshot"
```

Fallback forms when the AI tool cannot send a bearer header:

```bash
curl -H "x-api-token: <token>" "https://grainbud.poorlow.com/api/ai/portfolio/snapshot"
curl "https://grainbud.poorlow.com/api/ai/portfolio/snapshot?token=<token>"
```

If authentication is disabled, call the snapshot URL directly.

## Interpretation Rules

1. Treat confirmed snapshot values as the authoritative account facts.
2. Treat external quotes, fund NAV, delayed quotes, FX conversions, and external estimates as reference estimates only.
3. Always inspect and mention risk flags, data freshness, pending import batches, stale quotes, stale FX rates, missing quote coverage, and source lineage.
4. Do not infer trades, cash transfers, cost basis, or account changes that are not present in the response.
5. Do not attempt to place orders, cancel orders, modify orders, unlock trading, or request trading credentials. This API is read-only.

## Suggested AI Workflow

1. If the AI can read one URL only, fetch `/agent.md`; it contains the current holdings table and the canonical API links.
2. If the AI can call APIs, fetch `/api/ai/manifest` to confirm the base URL and auth mode, then fetch `/api/ai/portfolio/snapshot`.
3. Summarize total exposure, account freshness, allocation, concentrated positions, currency exposure, stale/missing market data, and any pending import risk.
4. When making recommendations, clearly separate confirmed facts from external estimates.
