Structs Skill Conventions

The single source for the boilerplate every skill depends on. Skills point here instead of repeating these rules. Read this once; the gameplay skills assume you know it.

This is not a gameplay skill — it has no SKILL.md and is not invoked directly. It is the shared reference the other skills link to.


Transaction flags (TX_FLAGS)

Every structsd tx structs command needs gas flags. Two named bundles are used throughout the skills:

--gas auto is mandatory. Without it, transactions fail with an out-of-gas error.

The -y rule

-y is off by default. Add it only after your commander has approved the action (see SAFETY.md). The one documented exception is compute commands (struct-build-compute, struct-ore-mine-compute, struct-ore-refine-compute, planet-raid-compute): they run for hours and auto-submit their completion transaction when no shell is attached, so they ship with -y paired with an Approval Block that surfaces consent up front. For those, the Approval Block — not the CLI prompt — is your gate.


The -- entity-ID rule

Entity IDs contain dashes (3-1, 4-5, 2-117). The CLI parser treats a leading dash as a flag prefix, so unprotected IDs cause parse errors. Always place -- after all flags and before positional ID arguments:

structsd tx structs struct-activate TX_FLAGS -- 6-10

Proof-of-work -D policy

Build, mine, refine, and raid all require proof-of-work. Difficulty decays with age, so the cheapest path is to initiate early and compute later. The -D flag (1-64) tells the compute helper to wait until difficulty drops to that level before hashing.

Full decay tables: knowledge/mechanics/building. Never block on PoW — launch compute in a background terminal and track it in memory/jobs/ (see awareness/async-operations).


Charge is per-player, not per-struct

Charge is a single shared bar per player, not a value each struct carries:

charge = CurrentBlockHeight - player.lastActionBlock

Every charge-consuming action by any of your structs (build, activate, attack, move, defense change, stealth) draws from and resets this one bar. It regenerates at 1 per block (~6 sec/block) whenever you are idle. To know whether an action can fire, query the player, not the struct.

Action costs (v0.18.0): activate 2, build-initiate 8, defense-change 1, Command Ship move 3, primary weapon 3-5, secondary weapon 3-5, stealth activate 2. Full table: knowledge/mechanics/building#charge-accumulation. The practical constraint is chaining: each action resets the bar, so a burst of actions (activating several structs, repeated attacks) must be spaced by the next action’s cost.


One transaction at a time per account

The chain tracks a sequence number per account. Submitting two transactions from the same account before the first is included causes account sequence mismatch. Wait ~6 seconds (one block) between transactions from one key. Different accounts can transact in parallel — this is the basis of multi-agent and delegation play (see structs-permissions).


Skill authoring template

Every gameplay skill follows this shape so agents can navigate any skill the same way:

---
name: structs-<domain>
description: <what it does> + explicit "Use when ..." triggers.
level: beginner | core | advanced
domain: <one-or-two words>
---

# Title

**What this is** (3-5 plain sentences a human can read).

## When to use it
Signals/triggers that make this skill apply (wire to awareness/game-loop).

## Decisions
Beginner default(s) + advanced considerations. "Decisions live in" → playbook link(s).

## Procedure
Numbered steps. TX_FLAGS / -- / -D / charge are assumed from conventions.md (one-line pointer, not repeated).

## Commands reference
Table of the CLI commands used.

## Verification
How to confirm the action actually took effect (broadcast ≠ success).

## Errors
Common failures and fixes.

## See also
At least one playbook link and one awareness link.

Frontmatter tags: level (beginner / core / advanced) drives read-order in the generated index; domain groups related skills. Keep core skills ≤ ~250 lines (streaming and guild-stack are exempt). Never copy boilerplate that lives here — link to it.


See also