| name | maidens-effect-jido-contracts |
| description | Build and evolve cross-runtime contracts where Effect Schema is canonical in TypeScript, JSON Schema is the interchange artifact, Elixir validates payloads, and Jido FSM transitions are preflighted before cmd/2. |
Maidens: Effect ↔ Jido Runtime Contracts
Use this skill when implementing or extending a domain contract that spans:
- Effect Schema (TypeScript)
- JSON Schema artifacts
- Elixir validation
- Jido agent/FSM execution boundaries
Core Contract Doctrine
- Effect Schema is canonical (domain typing + TS runtime validation).
- JSON Schema is the wire artifact (cross-language interchange only).
- Elixir validator enforces payload shape/types before command execution.
- FSM adjacency legality is enforced in code (JSON Schema alone cannot cleanly encode adjacency).
- Jido handles agent runtime behavior (
cmd/2, strategy transitions, directives) after preflight gates.
Required Research Path (before changes)
1) Jido context (DeepWiki + Context7)
- Query DeepWiki:
agentjido/jido
- Ask for:
cmd/2 contract, validate/2, FSM strategy transitions, core loop.
- Query Context7:
- resolve library:
/agentjido/jido
- ask for: preflight pattern before
cmd/2, strategy transition wiring.
2) Effect context
- Use Effect docs for
JSONSchema.make targets and annotation semantics.
- Canonical repo query string:
Effect-TS/effect.
3) JSON Schema semantics
- Reconfirm
default is annotation-only (not validation).
4) Elixir validator compatibility
- Check Exonerate + ex_json_schema draft/ref behavior against generated output.
Directory Pattern
src/lib/maidens/
├── core/contracts/ # reusable tooling
└── domains/contracts/<domain>/
├── ts/ # canonical Effect schemas + tests
├── scripts/ # domain artifact generation entrypoints
├── schemas/ # generated JSON schema + mermaid
└── elixir/ # validator + fsm + jido-facing modules + tests
Implementation Checklist
Provenance Tags (use in comments)
Effect Schema feature
JSON Schema contract semantics
Elixir validator behavior
Jido agent behavior/strategy
References
Use these as primary references (read directly, not summaries):
- Effect Schema JSON Schema generation:
- JSON Schema annotation semantics (
default is annotation-only):
- Jido Agent behavior (
cmd/2, validate/2, schema formats):
- Jido guides (agents + strategies + core loop):
- Jido repository (strategy/FSM examples):
- Elixir validator docs:
Evolving Notes
Append new compatibility findings to:
.pi/skills/maidens-effect-jido-contracts/LEARNINGS.md