orkcore-fsm

Explain Orkid's HFSM design using FsmData, FsmInstance, and DOT visualization.

35|16|Updated Feb 10, 2013
One-click install
npx skills add https://github.com/tweakoz/orkid --skill orkcore-fsm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orkcore-fsm
Source: https://github.com/tweakoz/orkid/tree/main/.claude/skills/orkcore-fsm
Command: npx skills add https://github.com/tweakoz/orkid --skill orkcore-fsm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers and reviewers quickly understand and work with Orkid's hierarchical finite state machine (HFSM) implementation by mapping concepts to the repository's C++ headers, implementation, tests, and Python bindings.

Core Features & Use Cases

  • Shared immutable FsmData definitions and per-entity FsmInstance runtimes with state lifecycle callbacks for enter, exit, and update.
  • PredicatedTransition guard conditions, string-to-event hashing, FsmGroup multi-instance coordination, and generateDot visualization for Graphviz.
  • Use cases include implementing game object behavior, coordinating groups of agents, writing Python unit tests against the bindings, and producing DOT diagrams for debugging state transitions.

Quick Start

Ask the skill to explain how to create an FsmData, add states and predicated transitions, instantiate FsmInstance, and generate a DOT visualization.

Frequently Asked Questions about orkcore-fsm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do hierarchical finite state machines work in Orkid?

Orkid hierarchical finite state machines use shared immutable FsmData definitions with per-entity FsmInstance runtimes, supporting state lifecycle callbacks for enter, exit, and update operations.

How do I add predicated transitions to a state machine in C++?

PredicatedTransition guard conditions evaluate predicates before allowing state changes in the FsmData definition, which can be visualized as DOT diagrams using Graphviz generateDot output.

Can I test Orkid state machine behavior using Python bindings?

Python bindings expose FsmData and FsmInstance APIs, allowing developers to write unit tests that instantiate state machines, trigger string-to-event hashed events, and verify state transitions.

How do I coordinate multiple state machine instances at runtime?

FsmGroup provides multi-instance coordination, enabling runtime synchronization across multiple FsmInstance entities sharing the same immutable FsmData state definitions.

What is the best way to debug state machine transitions in Orkid?

The generateDot visualization produces Graphviz-compatible DOT diagrams mapping all states and PredicatedTransition paths, providing a visual debugging reference for transition logic.