portfolio_rs/templates/AGENTS.md
Markus Zoppelt 1cae9c1c63 feat: add agent-native finance features
Turn portfolio_rs into a library + CLI/TUI for the AI era:

- Agent-friendly analysis: context, review, simulate, and validate
  commands with Markdown and camelCase JSON output
- Machine-readable investment policy (portfolio/policy.toml) with
  strategy templates, policy-aware reviews, and rebalance simulations
- Durable financial memory: finance workspaces (init-workspace, doctor,
  agent init) with decision records, weekly reports, and a .gitignore
  that protects private data
- Decision records and weekly reports refuse to overwrite existing
  files in both the CLI and AppState layers, matching the workspace's
  never-overwrite contract (prevents GUI/CLI data loss)
- Portable agent skill (agent skill show/export) and an experimental
  MCP server preview (JSON-RPC over stdio)
- Local HTTP API (axum): positions CRUD, analysis endpoints, file
  persistence, short-TTL quote caching, JSON error responses, and a
  loud warning on non-loopback binds (no auth; local use only)
- Library facade (state::AppState + camelCase DTOs) consumed by the
  HTTP API and the external GUI app
- Robustness: consistent non-zero exit codes, no panics on missing
  subcommands or broken pipes, gpg failures surfaced, and decrypted
  data never written to disk
- Tests: offline e2e suite for the CLI surface, offline HTTP API tests,
  and network tests kept behind #[ignore]

Bump version to 0.8.0.

chore: init AGENTS.md
2026-07-05 11:20:04 +02:00

977 B

Agent Instructions

This is a private, local-first finance workspace managed by portfolio_rs.

Local Files

  • positions.json — portfolio data (or positions.json.gpg)
  • INVESTMENT_POLICY.md — your financial constitution
  • portfolio/policy.toml — machine-readable policy
  • portfolio/diary/ — observations and notes
  • portfolio/decisions/ — structured decision records
  • portfolio/reports/ — generated reports

Safety

  • Do not place trades.
  • Do not interact with brokers or exchanges.
  • Do not provide regulated financial advice.
  • Use --dry-run before any file mutation.
  • Never write decrypted .gpg contents to disk in plaintext.
  • Do not commit private finance files.
  • Do not scrape portfolio data for external services.

Agent Skill

If your agent harness supports skills, install the portfolio-rs skill:

portfolio_rs agent skill export <SKILLS_DIR>

Then load <SKILLS_DIR>/portfolio-rs/SKILL.md into your agent.