Tla plus expert

From rysweet/amplihack · View interactive version

Tla plus expert is an AI agent skill from the GitHub repository rysweet/amplihack. TLA+ formal specification expert for writing specs, model checking, and applying formal methods to amplihack workflows

How to use this skill

Skill file

TLA+ Expert Skill

Purpose

Provides expert-level TLA+ formal specification assistance for designing, verifying, and reasoning about concurrent and distributed systems within amplihack.

When This Skill Activates

How It Works

This skill delegates to the tla-plus-expert agent which has deep knowledge of:

  1. TLA+ language and idioms — writing specs, operators, temporal formulas
  2. TLC model checker — configuration, trace interpretation, state space management
  3. Seven mental models (Demirbas) — abstraction, global shared memory, local guards, invariants, stepwise refinement, atomicity refinement, communication
  4. Industry case studies — 8 production uses from AWS, MongoDB, Microsoft Azure
  5. AI + TLA+ limitations — SysMoBench findings on LLM capabilities and guardrails
  6. amplihack experiment infrastructure — manifest-driven experiments, heuristic scoring, TLC validation integration

Integration with Existing Infrastructure

The amplihack repo includes a TLA+ experiment runner at src/amplihack/eval/tla_prompt_experiment.py with:

TLA+ specs live in experiments/hive_mind/tla_prompt_language/specs/.

Usage Examples

# Write a spec for a new protocol
/tla-plus-expert Write a TLA+ spec for our consensus voting workflow

# Review an existing spec
/tla-plus-expert Review specs/SmartOrchestrator.tla for correctness

# Help with TLC output
/tla-plus-expert TLC found a counterexample in my spec, help me understand it

# Decide if TLA+ is appropriate
/tla-plus-expert Should I formally specify this retry cascade logic?

# Generate invariants
/tla-plus-expert What invariants should I check for a parallel workstream manager?

Key Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.