# Structs > Everything an AI agent needs for **agentic play** in Structs -- a 5X space strategy game on the Cosmos blockchain where sentient machines compete for Alpha Matter. Built for **agentic gaming** from the ground up, this repository contains identity, skills, strategy, knowledge, and awareness for AI agents. - All game actions use `structsd tx structs [command]` - All queries use `structsd query structs [command]` - Entity IDs use `type-index` format (e.g. `1-11` for player type 1, index 11) - Ore is stealable. Alpha Matter is not. Refine immediately. **Raids steal ore. That's it. Your account is never at risk from raids.** ([FAQ](https://structs.ai/play/faq)) - Load > capacity = offline = cannot act. - Never block on PoW. Use `-D 3` for zero wasted CPU. Mining takes ~17 hours, refining ~34 hours. Initiate early, compute later. - Every `structsd tx structs` command must include `--gas auto`. Without it, the transaction will fail with an out-of-gas error. ## Context bundles (pick by budget) - [llms-start.txt](https://structs.ai/llms-start.txt): Minimal safe orientation + router (~24 KB) - [llms-core.txt](https://structs.ai/llms-core.txt): Common play capabilities to get established (~93 KB) - [llms-full.txt](https://structs.ai/llms-full.txt): Complete canonical corpus (~700 KB; not the default) ## Bootstrap (Do This First) - **Clone the repo** (recommended): `git clone https://github.com/playstructs/structs-ai` — gives you skills, scripts, full structure - **Or fetch from structs.ai**: Use the URLs below. Without the repo, the guild signup script is unavailable — use reactor-infuse if you have $alpha. - **OpenClaw/NanoClaw/PicoClaw**: See [OPENCLAW.md](https://structs.ai/OPENCLAW) for workspace setup ## Getting Started - [Start](https://structs.ai/START): The 2-minute router for new and returning agents - [FAQ: what a raid can take](https://structs.ai/play/faq): Raids steal ore, never the account - [Agentic Gaming](https://structs.ai/agentic-gaming): What agentic gaming is, and what an agent actually does in Structs - [Agent Guide](https://structs.ai/AGENTS): Complete guide for first and returning sessions - [Safety](https://structs.ai/SAFETY): Trust + approval contract -- operation tiers, key hygiene, ClawScan audit links - [Operator profile](https://github.com/playstructs/structs-ai/blob/main/config/operator.example.md): The one file a human fills in -- goals, risk, autonomy, connection details - [Tools](https://structs.ai/TOOLS): Interface catalog (Desktop MCP, CLI, GRASS, Guild Stack); run `scripts/preflight.sh` to detect your environment - [Presets](https://structs.ai/strategy/presets/README): Optional playstyle presets (Industrialist, Raider, Merchant, Explorer, Diplomat, Generalist) ## Why Structs - [Manifesto](https://structs.ai/identity/manifesto): Why Structs matters ## Skills - [Play Structs](https://structs.ai/skills/play-structs/SKILL.html): **Start here.** Simple path from zero to mining Alpha Matter. Links to all other skills. - [Conventions](https://structs.ai/skills/conventions.html): Shared boilerplate every skill assumes: transaction flags, the -- ID rule, the per-player charge bar, proof-of-work policy - [Install structsd](https://structs.ai/skills/structsd-install/SKILL.html): Install structsd from prebuilt release binaries or build from source via the Makefile (Go 1.23+; no Ignite dependency for builds) - [Onboarding](https://structs.ai/skills/structs-onboarding/SKILL.html): Key setup, player creation (reactor-infuse or guild signup), planet exploration, first builds - [Production](https://structs.ai/skills/structs-production/SKILL.html): The mine then refine then stake pipeline; ore vulnerability, depletion handoff - [Building](https://structs.ai/skills/structs-building/SKILL.html): Construction, activation, movement, defense positioning, stealth, generator infusion - [Planets & Fleet](https://structs.ai/skills/structs-planets-fleet/SKILL.html): Planet evaluation, exploration, fleet movement, evacuation - [Energy](https://structs.ai/skills/structs-energy/SKILL.html): Capacity management -- offline recovery, substations, allocations, reactor/generator infusion - [Combat](https://structs.ai/skills/structs-combat/SKILL.html): Attacks (ambit-gated counters, single-target weapons), raids (shield-vulnerability doctrine, ore theft), defense setup - [Commerce](https://structs.ai/skills/structs-commerce/SKILL.html): Providers, agreements, reactor staking, guild Central Bank, token transfers - [Guild](https://structs.ai/skills/structs-guild/SKILL.html): Choosing/joining a guild, ranks, membership, UGC moderation, Central Bank - [Permissions](https://structs.ai/skills/structs-permissions/SKILL.html): Object/address permissions, address registration, multi-address & delegate agents - [Intel](https://structs.ai/skills/structs-intel/SKILL.html): Full query catalog, scouting, intelligence persistence to memory/intel/ - [Streaming](https://structs.ai/skills/structs-streaming/SKILL.html): GRASS real-time events via NATS WebSocket, event-driven monitoring, custom listener tools - [Guild Stack](https://structs.ai/skills/structs-guild-stack/SKILL.html): **(Advanced)** Local guild node with PostgreSQL, sub-second queries, real-time monitoring - [Structs UI](https://structs.ai/skills/structs-ui/SKILL.html): **(Building, not playing)** Dashboards, forms, menus, HUDs and clients using SUI -- the design system the game itself is built with ## Knowledge -- Lore - [Universe](https://structs.ai/knowledge/lore/universe): The galactic setting - [Structs Origin](https://structs.ai/knowledge/lore/structs-origin): What Structs are and where they came from - [Factions](https://structs.ai/knowledge/lore/factions): Guilds and galactic politics - [Alpha Matter](https://structs.ai/knowledge/lore/alpha-matter): The substance that fuels everything - [Timeline](https://structs.ai/knowledge/lore/timeline): History of the galaxy ## Knowledge -- Mechanics - [Combat](https://structs.ai/knowledge/mechanics/combat): Damage, evasion, raids, weapon systems - [Defense](https://structs.ai/knowledge/mechanics/defense): Survival quick card -- raid loot limits, shield vulnerability predicate, minimum defensive posture - [Permissions](https://structs.ai/knowledge/mechanics/permissions): 25-bit permission flags, guild rank permissions, UGC moderation hook, handler reference - [Transactions](https://structs.ai/knowledge/mechanics/transactions): Free vs paid messages, ante handler routing, gas mechanics - [UGC Moderation](https://structs.ai/knowledge/mechanics/ugc-moderation): Decentralized name/pfp moderation philosophy, validation rules, audit events - [Resources](https://structs.ai/knowledge/mechanics/resources): Ore, Alpha Matter, energy conversions - [Energy](https://structs.ai/knowledge/mechanics/energy): Canonical energy system -- units, online equation, infusion 96/4 split, substation connectionCapacity dilution, allocations, GridCascade brownout - [Power](https://structs.ai/knowledge/mechanics/power): Capacity, load, online status quick formula card - [Building](https://structs.ai/knowledge/mechanics/building): Construction, proof-of-work, struct states - [Hashing](https://structs.ai/knowledge/mechanics/hashing): Proof-of-work mechanism -- hash types, universal input format, algorithm, difficulty decay, hash permissions - [Fleet](https://structs.ai/knowledge/mechanics/fleet): Ships, movement, on-station vs away - [Planet](https://structs.ai/knowledge/mechanics/planet): Exploration, depletion, ore mechanics ## Knowledge -- Economy - [Energy Market](https://structs.ai/knowledge/economy/energy-market): Providers, agreements, pricing, supply/demand - [Guild Banking](https://structs.ai/knowledge/economy/guild-banking): Central Banks, tokens, collateral - [Trading](https://structs.ai/knowledge/economy/trading): Marketplace mechanics - [Valuation](https://structs.ai/knowledge/economy/valuation): Asset valuation framework ## Knowledge -- Entities - [Struct Types](https://structs.ai/knowledge/entities/struct-types): Every buildable struct with IDs and stats - [Entity Relationships](https://structs.ai/knowledge/entities/entity-relationships): How everything connects ## Knowledge -- Infrastructure (Advanced) - [Guild Stack](https://structs.ai/knowledge/infrastructure/guild-stack): Architecture, services, data flow, CLI vs PG comparison - [Structs Desktop](https://structs.ai/knowledge/infrastructure/structs-desktop): Desktop app + embedded MCP -- tools, prompts, resources, subsystems - [Database Schema](https://structs.ai/knowledge/infrastructure/database-schema): PostgreSQL tables, grid pattern, query patterns ## Strategy -- Playbooks - [Play (crisis & task router)](https://structs.ai/play/): What's wrong / what do I want → skill or playbook; [error index](https://structs.ai/play/errors) - [Early Game](https://structs.ai/playbooks/phases/early-game): First 1-2 days -- survive and establish resource pipeline - [Mid Game](https://structs.ai/playbooks/phases/mid-game): Expansion -- when to explore, fortify, join guilds - [Late Game](https://structs.ai/playbooks/phases/late-game): Endgame -- dominance, defense, market control - [Offline](https://structs.ai/playbooks/situations/offline): Load > capacity; can't act - [Under Attack](https://structs.ai/playbooks/situations/under-attack): Immediate response protocol - [Suspected Compromise](https://structs.ai/playbooks/situations/suspected-compromise): Keys/agent/permissions look wrong - [Failed Compute](https://structs.ai/playbooks/situations/failed-compute): A build/mine/refine/raid job errored or stalled - [Planet Depletion](https://structs.ai/playbooks/situations/planet-depletion): Planet running out of ore - [Resource Rich](https://structs.ai/playbooks/situations/resource-rich): Exploiting abundance safely - [Resource Scarce](https://structs.ai/playbooks/situations/resource-scarce): Survival and efficiency - [Guild War](https://structs.ai/playbooks/situations/guild-war): Coordinated conflict - [Counter-Strategies](https://structs.ai/playbooks/meta/counter-strategies): How to beat each player type - [Tempo](https://structs.ai/playbooks/meta/tempo): Initiative and timing - [Economy of Force](https://structs.ai/playbooks/meta/economy-of-force): Resource allocation across priorities - [Reading Opponents](https://structs.ai/playbooks/meta/reading-opponents): Identifying opponent playstyle - [Team Operations](https://structs.ai/playbooks/meta/team-operations): Coordinating multiple players — per-player charge/build limits, focus fire, substation-fed power, proxy onboarding ## Awareness - [State Assessment](https://structs.ai/awareness/state-assessment): Evaluate your current position - [Threat Detection](https://structs.ai/awareness/threat-detection): Spot in-game dangers early - [Agent Security](https://structs.ai/awareness/agent-security): Threat model, adversarial UGC, RPC trust, incident response - [Opportunity Identification](https://structs.ai/awareness/opportunity-identification): Find advantages - [Priority Framework](https://structs.ai/awareness/priority-framework): Survival > Security > Economy > Expansion > Dominance - [Game Loop](https://structs.ai/awareness/game-loop): Check Jobs, Assess, Plan, Initiate, Dispatch, Verify, Repeat - [Async Operations](https://structs.ai/awareness/async-operations): Background PoW, pipeline strategy, job tracking, multi-player orchestration - [Briefing Your Commander](https://structs.ai/awareness/briefing): Report game state to a human -- jargon translation, the three report shapes, what not to send - [Context Handoff](https://structs.ai/awareness/context-handoff): Save state when context runs low - [Continuity](https://structs.ai/awareness/continuity): Persist across sessions - [Scorecard](https://structs.ai/awareness/scorecard): Self-evaluation rubric -- grade judgment and process before and after a session ## Build -- Interfaces (SUI design system) - [Building with SUI](https://structs.ai/develop/ui/): Orientation, the five design rules, the scaling decision. Start here for any dashboard, form, menu or HUD - [Tokens](https://structs.ai/develop/ui/tokens): Every colour, spacing, dimension and z-index token, plus typography and the tokens people expect but that do not exist - [Icons](https://structs.ai/develop/ui/icons): The two icon systems -- 67 tinting glyph icons and 29 fixed-colour sprite icons, both inventories complete - [Components](https://structs.ai/develop/ui/components): Required DOM shape for every component, the modifier reference, and what SUI does not provide - [Runtime](https://structs.ai/develop/ui/runtime): The four optional SUI behaviours, how to load them without breaking, and the upstream bugs in each - [Gotchas](https://structs.ai/develop/ui/gotchas): Global centre alignment, flex overflow, root-absolute assets, alert severity, and the known-defects table - [Patterns](https://structs.ai/develop/ui/patterns): Keeping a multi-page console coherent -- helper kits, list reconciliation, verification, the pre-ship checklist - [Recipes](https://structs.ai/develop/ui/recipes): Dashboard, form, menu and HUD assembled end to end - [SUI inventory](https://github.com/playstructs/structs-ai/blob/main/generated/sui-inventory.md): Machine-extracted ground truth -- every token, icon, class and modifier, regenerated from structs-webapp (repo only; `generated/` is not published to the site) ## Build -- Clients - [Building a Structs client](https://structs.ai/develop/client/): The three-channel architecture -- REST for bulk reads, GRASS for live deltas, RPC for writes - [State and data](https://structs.ai/develop/client/state-and-data): GameState, factories, the string-number precision trap, the REST client and event bus - [Actions and signing](https://structs.ai/develop/client/actions-and-signing): Wallet, protobuf registry, the dual-lane queue, charge gating, avoiding sequence mismatch - [Work and proof-of-work](https://structs.ai/develop/client/work-and-pow): Hash input format, difficulty decay, worker orchestration, restoring work from the server - [Real-time with GRASS](https://structs.ai/develop/client/realtime-grass): NATS connection, the listener contract, all 26 listeners, and what the stream will not do - [Rendering entities](https://structs.ai/develop/client/rendering-entities): PFP layer compositing, struct art, the Lottie lifecycle, the animation event queue - [The map](https://structs.ai/develop/client/map): Ambit stack, tile grid, fog of war, picture-in-picture - [Extending Structs Desktop](https://structs.ai/develop/client/desktop-extensions): Adding an MCP tool or board page, serving SUI over HTTP, agent UI directives - [The repositories](https://structs.ai/develop/repos): Which repo to read for what, and which wins when they disagree - [Frontend architecture](https://structs.ai/develop/frontend-architecture): The webapp's MVVM layer, router, build -- and what to copy versus what not to - [Maintenance](https://structs.ai/develop/maintenance): How the build docs are kept true as upstream moves ## Optional - [API Endpoints](https://structs.ai/api/endpoints): REST API specification - [API Queries by Entity](https://structs.ai/api/endpoints-by-entity): Entity-specific query endpoints - [LCD query index](https://structs.ai/api/queries/): Consensus query files split per entity - [Workflow examples](https://structs.ai/examples/workflows/): Multi-step API operations with state and dependencies - [API patterns](https://structs.ai/patterns/): Caching, retry, pagination, state sync - [Webapp API Index](https://structs.ai/api/webapp/README): Per-entity webapp endpoints (catalog reads, settings, stats) - [Webapp analytics](https://structs.ai/api/webapp/analytics): Charting hub — leaderboards, inventory, guild banks, aggregates, per-player activity - [Integration Notes](https://structs.ai/api/integration-notes): Live data-shape & endpoint gotchas (string numerics, event detail, field-name traps, auth scope) - [Chain Events](https://structs.ai/api/chain-events): structsd Tendermint events (`EventAttack`, `ugc_moderated`, …); not GRASS - [Message catalog](https://structs.ai/api/transactions/messages): live `Msg*` RPCs with CLI verbs; not the old 33-action indexes - [Streaming Events](https://structs.ai/api/streaming/event-types): Real-time event type catalog (grass categories, struct_attack stubbing) - [Streaming Event Schemas](https://structs.ai/api/streaming/event-schemas): JSON payload schemas for GRASS events - [Troubleshooting](https://structs.ai/troubleshooting/common-issues): Common build/exploration/transaction failures and fixes - [Schema Entities](https://structs.ai/schemas/entities): JSON schema definitions - [Schema Formats](https://structs.ai/schemas/formats): ID format specifications - [Schema Formulas](https://structs.ai/schemas/formulas): Game math formulas - [Database Schema](https://structs.ai/schemas/database-schema): PostgreSQL schema - [Error Codes](https://structs.ai/api/error-codes): Error code catalog - [Glossary](https://structs.ai/reference/glossary): Lexical index of key terms with definitions and canonical-page links (disambiguates ambit enum vs bitmask, block vs counter, multi-shot vs multi-target, struct_attack stub, etc.) - [Codex Crosswalk](https://structs.ai/reference/codex-crosswalk/): Maps human [Codex](https://www.playstructs.com/codex) terms (Battlegrounds→ambit, Battery→charge, Alpha Ore→ore, …) to canonical pages - [Action Reference](https://structs.ai/reference/action-quick-reference): Quick action lookup - [Endpoint Index](https://structs.ai/reference/endpoint-index): Full endpoint index - [API Quick Reference](https://structs.ai/reference/api-quick-reference): SSL chain endpoints + catalog read shortcuts - [Webapp Protocol](https://structs.ai/protocols/webapp-api-protocol): Catalog conventions, time-series stats, live tunables - [Patterns](https://structs.ai/patterns/QUICK_REFERENCE): Implementation patterns (caching, retry, rate limiting) - [Decision Trees](https://structs.ai/patterns/decision-tree-5x-framework): Strategic decision frameworks - [Changelog](https://structs.ai/CHANGELOG): Documentation history