docs/INTELLIGENCE.md
Economy, swarms and command workspace
RS-BLACKROCK → Economy compares the same selected goods across completed 1-, 7- or 30-day periods. The basket is a research sample, not an economy-wide inflation measure. Missing or thinly traded goods stay excluded. The page preserves exact comparison windows, immutable snapshot IDs, original source times, liquidity evidence, market structure and partial-refresh status. Its charts and assistant share the same stored result.
RS-PALANTIR → Swarms saves exact-name, prefix or assignment-bound research groups. Prefix matches do not establish a common operator. My team and allies come from the existing ownership projection. One shared public feed supplies positions and one detailed observation area; it does not reveal private inventories or global task state. Saved groups keep that feed alive while the service runs unless collection is paused. History begins with collected observations; source gaps and membership changes are explicit. Five-minute summaries retain 90 days and daily summaries through one year.
RS-PALANTIR → Command supports research planning, a simulator, and a separately paired local harness. The live adapter requires explicit pairing, operator-approved account enrollment, controller handoff, verified capabilities and a current mission approval. No live account is connected by installing or starting the observer. Simulator accounts are fictitious and visibly labeled; simulator success is not evidence of real gameplay.
The map's Squad planner opens current public candidates and camera/rally planning. Command adds local rally/target marks, advisory distance/freshness/manual priorities, exact squad selection, roles and a collapsible review drawer. Researching a swarm can prepare an exact-name selection, but only matching enrolled account grants are eligible for execution. Rally and engagement use separate previews and approvals. Editing executable fields invalidates an earlier preview. All commands remain single high-level actions per bot; no implicit re-engagement or target replacement.
Supply research links quotes, public bank previews and observed equipment to item, holder and production views in Blackrock. Returning to Command preserves the draft. Public bank evidence never establishes carried consumables or an exact supply deficit. Reference budgets are not executable order depth.
Live commands use a standalone daemon, persistent signed policies, controller leases, idempotency keys and per-bot receipts. Stop remains outside the assistant; unknown cessation is visible and quarantines affected accounts. Actual game capability certification and a bounded live pilot remain separate from local implementation tests. See docs/HARNESS.md for pairing and operator commands.
The assistant can read all three workstreams and save a strict mission preview. It cannot approve or start a mission, mutate control grants, or execute shell commands. Stopping an assistant answer does not stop a mission. The global command status bar exposes Stop all missions even with the assistant closed.
Shared interfaces
| 1 | bun scripts/intelligence.ts economy 7 core6-v1 |
| 2 | bun scripts/intelligence.ts swarms |
| 3 | bun scripts/intelligence.ts swarm GROUP_ID |
| 4 | bun scripts/intelligence.ts swarm-history GROUP_ID FROM_MS TO_MS |
| 5 | bun scripts/intelligence.ts swarm-members GROUP_ID |
| 6 | bun scripts/intelligence.ts swarm-compare GROUP_ID,GROUP_ID |
| 7 | bun scripts/intelligence.ts swarm-locations GROUP_ID |
| 8 | bun scripts/intelligence.ts swarm-candidates GROUP_ID |
| 9 | bun scripts/intelligence.ts supply-readiness supplies.json |
| 10 | bun scripts/intelligence.ts missions |
| 11 | bun scripts/intelligence.ts mission-preview draft.json |
MCP adds economy_overview, economy_snapshot, swarm_list, swarm_summary, swarm_history, mission_status, mission_preview and mission_receipts. The existing MCP entrypoint remains bun scripts/mcp.ts. Additional tools include member/evidence reads, comparison, locations, candidates, local swarm create/update/member/archive operations and supply_readiness. None exposes gameplay approval, grant changes, start or stop operations.
HTTP routes are /api/blackrock/v1/economy, /api/swarms/v1/groups and /api/missions. See /api/openapi.json and the corresponding shared TypeScript contracts. All routes retain the existing loopback/Origin boundary. Browser pairing requests, mission approval and execution additionally require a short-lived session and CSRF token. Requests use bounded structured data; game names and source content are untrusted evidence.
State and rollback
Economy tables are additive in the existing intelligence SQLite database; the economy migration first creates a consistent VACUUM INTO backup. Swarms use data/swarms.sqlite; mission simulator records use namespaced tables in the intelligence database. Never copy an open WAL database as a backup. Preserve watches, ownership, collection evidence and existing farmer processes.
Source backups and check results for this implementation are in reports/specs/pvp-economy-swarms-20261025/implementation at the repository root. These source archives are local rollback material, not a release bundle. No Git push, merge or live bot pilot is implied by implementation.