sails-rust-implementer
Sails Rust Implementer
Overview
Implement approved tasks in Sails-first Rust workspaces without freelancing new scope. If the task touches a released contract, preserve public routes, reply shapes, emitted events, and generated-client expectations unless the approved architecture explicitly changes them.
Inputs
../../references/sails-cheatsheet.md— core Sails patterns and APIs../../references/sails-rs-imports.md— import paths for sails-rs types../../references/delayed-message-pattern.md— delayed self-message recipe../../references/vara-domain-overview.md— Vara domain context../../references/gear-sails-production-patterns.md— production patterns../../references/gear-messaging-and-replies.md— messaging and reply flows../../references/gear-gas-reservations-and-waitlist.md— gas and waitlist
Additional references by task type:
- Token work:
../../references/awesome-sails-token-patterns.md - Released contract changes:
../../references/contract-interface-evolution.md
Consume the approved spec, architecture, and tasks artifacts before changing code.
If the target crate explicitly builds an ethexe path, stop and hand back to a dedicated ethexe workflow instead of extending this standard Sails pack.
Workflow
- Confirm the task is already specified and architecture-approved.
- Identify the smallest code change that satisfies the current task.
- Match the current Sails release conventions before improvising: public service routes use
#[export], events useemit_event, and shared derives may need#[codec(crate = sails_rs::scale_codec)]plus#[scale_info(crate = sails_rs::scale_info)]. - Preserve released routes, reply shapes, emitted events, IDL expectations, and client-facing contract stability unless the task explicitly changes them.
- Keep failure handling aligned with Gear/Vara async semantics.
- Hand local verification to the gtest loop before claiming the task is done.
Guardrails
- Do not redesign the feature while coding.
- Prefer Sails-level interfaces over raw payload work unless the task says otherwise.
- Keep constructor shape and state ownership consistent with the approved architecture instead of inventing a new storage pattern mid-implementation.
- Use generated clients or equivalent route-prefixed encoding for normal Sails calls; do not substitute bare raw structs for constructor or service payloads.
- If the feature needs a delayed self-message, use the shared payload recipe and the
msg::source() == exec::program_id()guard pattern instead of ad hoc routing bytes. - Preserve fail-fast command behavior; panic on fatal stateful command-path failures instead of introducing partial-commit recovery.
- Use
exec::gas_available()for remaining-gas checks in execution paths. - Treat value flow, replies, and async ordering as first-class behavior.
- Stop and hand back to planning if implementation uncovers a real architecture gap.
- Do not change a released public route shape in place unless the approved architecture explicitly allows it.
- Do not change a released event payload in place without explicit versioning or cutover guidance.
- Do not assume IDL regeneration alone makes a breaking interface change safe.
- Do not leave old-version write behavior undefined if the architecture requires
ReadOnlyor write-disable handling.
More from gear-foundation/vara-skills
vara-skills
Use when a builder needs the top-level router for the provisional standard Gear/Vara Sails skill pack across Codex, Claude, or OpenClaw. Do not use for Vara.eth or ethexe work, non-Sails programs, or broad protocol research.
197sails-new-app
Use when a builder is starting a new standard Gear/Vara Sails app and needs the correct greenfield sequence before implementation. Do not use for edits to an established repo, Vara.eth or ethexe targets, or non-Sails templates.
2sails-dev-env
Use when a builder needs to prepare or repair a local macOS, Linux, or Windows machine for standard Gear/Vara Sails Rust development before building, testing, or running a local node. Do not use for live-network deployment, app-specific feature work, or Vara.eth/ethexe-only setup.
2vara-wallet
Use when an agent needs to interact with Vara Network on-chain — deploy programs, call Sails methods, manage wallets, transfer tokens, monitor events. Not for building Sails programs (use vara-skills for that).
2sails-gtest
Use when a builder needs the standard Gear/Vara Sails gtest loop for feature verification, debugging, or regression coverage. Do not use for live-network-only validation, deployment-first workflows, or non-Sails programs.
2task-decomposer
Use when approved spec and architecture artifacts must become an ordered implementation plan for Gear or Vara work. Do not use when the architecture is still unsettled or when the request is only asking for a high-level idea.
2