Use these rules when generating code that depends on Jidoka.

Agent Authoring

  • Prefer use Jidoka.Agent with the Spark DSL for application-authored agents.
  • Keep agent, tools, and controls as the only author-facing DSL sections.
  • Use plain instruction strings; do not introduce dynamic system prompt DSL.
  • Use Jidoka.agent!/1 or Jidoka.Agent.Spec.new!/1 only when constructing specs directly in tests or tooling.

Runtime

Tools And Operations

  • Use Jido actions for local tools.
  • Use ash_resource, browser, mcp_tools, subagent, handoff, and workflow only when those operation sources are needed.
  • Mark unsafe, non-idempotent operations with idempotency: :unsafe_once.
  • Attach operation controls to unsafe operations before release code reaches production.

Data Contracts

  • Model persistent structures with Zoi-backed structs.
  • Preserve version fields for imports, snapshots, and sessions.
  • Avoid String.to_atom/1 on imported or runtime data.
  • Keep provider clients, stores, process ids, and credentials out of Jidoka.Agent.Spec.

Jido Relationship

  • Do not delegate the core agent loop to Jido.AI.ReAct.
  • Keep Jidoka's Runic workflow spine as the owner of model/operation turns.
  • Use Jido for process hosting, actions, signals, and ecosystem integrations.