smithery/comalice

scxml-translator

Translate SCXML test suite (.txml files in pkg/scxml_test_suite) to Go unit tests for statechart.go. Build equivalent State trees, generate table-driven tests verifying transitions/entry/exit/history. Use for conformance testing without parser.

Installation

$ npx skills add smithery/comalice --skill scxml-translator

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/comalice.

npx skills add smithery/comalice

Browse all from smithery/comalice

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Grep, Glob, Write, Edit, Bash

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,050 B
  • docs SUMMARY.md 268 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

SCXML to statechart.go Test Translator

When to Use

  • User requests SCXML test translation, conformance, or statechart validation.
  • Analyze pkg/scxmltestsuite/[num]/test*.txml → mimic in new statechartscxml[category]_test.go.

Workflow

  1. Gather Context:

- Glob pkg/scxmltestsuite/**/test*.txml - Read target .txml + statechart.go + statechart_test.go (patterns). - Grep .txml for <state>, <transition event=, <onentry><raise>, conf:pass.

  1. Map SCXML → Go State Tree:
SCXML Go
<state id=\"s1\"><transition event=\"e\" target=\"s2\"/></state> &State{ID:\"s1\", Transitions:[]*Transition{{Event:\"e\", Target:\"s2\"}}}
<onentry><raise event=\"foo\"/></onentry> OnEntry: func(ctx, ,,,) { rt.SendEvent(ctx, \"foo\") }
initial=\"s0\" Initial: states[\"s0\"]
conf:pass state Assert rt.IsInState(\"pass\")
  1. Generate Test:

- Table-driven: []struct{Name string; Root *State; Events []Event; WantPass bool} - New file: statechartscxmltests.go (no existing edits). - Helpers: buildSCXMLTree(map[string]string) func.

  1. Validate:

- Bash go test ./... -v -race - Skip unsupported (data/invoke): t.Skip(\"Needs datamodel\") - Output: Files created, coverage gaps.

Examples

Input: test144.txml (raise FIFO) Output Test:

t.Run(\"144\", func(t *testing.T) {
  // built tree with OnEntry raises
  rt.Start(ctx)
  require.True(t, rt.IsInState(\"pass\"))
})

Limitations

  • Shallow history only.
  • No data model/expr (stub guards).
  • Batch 10-20 tests/file.

Activate for all SCXML tasks. Combine w/ golang-development skill.