jrjsmrtn/tlx/spec-audit

Claude Code and agent skill by jrjsmrtn/tlx

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Scan an Elixir/Erlang project for modules that TLX can formally specify. Covers OTP behaviours (GenServer, gen_statem, LiveView), framework extensions (Ash.StateMachine), and workflow/pipeline libraries (Reactor, Broadway). Reports spec coverage and suggests where to focus verification effort. Use when asked to audit, scan, find extractable modules, check spec coverage, or triage formal verification targets.

Install

npx vskill@latest install jrjsmrtn/tlx/spec-audit

SKILL.md

The same SKILL.md was published earlier as jrjsmrtn/tlx/spec-audit.

Spec Audit — Formal Verification Coverage Report

Scan a project to find modules that TLX extractors can process, check which already have formal specs, and prioritize verification effort.

When to Use

  • Starting formal verification on an existing project
  • After adding new modules and wondering if they need specs
  • Reviewing spec coverage before a release
  • Triaging which modules to formally specify first

Step 1: Scan for Extractable Modules

Search the project's lib/ directory for modules matching these patterns:

OTP Behaviours
PatternTypeExtractor
use GenServer or @behaviour :gen_serverGenServermix tlx.gen.from_gen_server
use GenStateMachine or @behaviour :gen_statemgen_statemmix tlx.gen.from_state_machine
use Phoenix.LiveViewLiveViewmix tlx.gen.from_live_view
.erl with -behaviour(gen_server)Erlang gen_servermix tlx.gen.from_erlang
.erl with -behaviour(gen_fsm)Erlang gen_fsmmix tlx.gen.from_erlang
Framework Extensions
PatternTypeExtractor
extensions: [AshStateMachine]Ash.StateMachinemix tlx.gen.from_ash_state_machine
Workflow & Pipeline Libraries
PatternTypeExtractor
use ReactorReactor workflowmix tlx.gen.from_reactor
use BroadwayBroadway pipelinemix tlx.gen.from_broadway
Scan commands
bash
# OTP behaviours
grep -rl "use GenServer\|@behaviour :gen_server" lib/
grep -rl "use GenStateMachine\|@behaviour :gen_statem" lib/
grep -rl "use Phoenix.LiveView\|use.*Live" lib/
grep -rl "behaviour(gen_server)\|behaviour(gen_fsm)" lib/ --include="*.erl"
# Framework extensions
grep -rl "AshStateMachine" lib/
# Workflow & pipeline
grep -rl "use Reactor" lib/
grep -rl "use Broadway" lib/

Step 2: Check Existing Spec Coverage

For each extractable module, check if a corresponding spec exists:

  1. Search specs/ directory for files with matching # Source: headers
  2. Search for defspec modules that reference the source module
  3. Check test/specs/ for refinement tests
bash
grep -rl "# Source:.*reconciler" specs/ test/
grep -rl "defspec.*Reconciler" specs/ lib/

Step 3: Generate Coverage Report

Present findings as a table:

Module Type Spec Extractor
────────────────────────────────────────────────────────────────────
MyApp.Reconciler GenServer ✓ mix tlx.gen.from_gen_server
MyApp.Orchestrator gen_statem ✓ mix tlx.gen.from_state_machine
MyApp.RegistryManager GenServer ✗ mix tlx.gen.from_gen_server
MyAppWeb.FleetLive LiveView ✗ mix tlx.gen.from_live_view
MyApp.Order Ash.SM ✗ mix tlx.gen.from_ash_state_machine
MyApp.ProvisionWorkflow Reactor ✗ mix tlx.gen.from_reactor
MyApp.IngestPipeline Broadway ✗ mix tlx.gen.from_broadway
────────────────────────────────────────────────────────────────────
Coverage: 2/7 (29%)

Step 4: Prioritize Verification Targets

Suggest which unspecified modules to target first, using these criteria:

  1. State complexity — modules with more states/transitions benefit most
  2. Concurrency — modules accessed by multiple processes need safety guarantees
  3. External calls — modules that call services/DBs have non-deterministic outcomes
  4. Incident history — modules that have had production bugs are high-priority
  5. ADR coverage — modules with ADRs already have documented design intent
  6. Workflow criticality — Reactor workflows with compensation (saga) and Broadway pipelines with strict ordering are high-value verification targets

For each recommended target, suggest the extraction command and which enrichment patterns apply:

  • State machines (GenServer, gen_statem, Ash.SM) → state invariants, forbidden transitions, liveness
  • Reactor workflows → step ordering, termination, compensation correctness
  • Broadway pipelines → concurrency bounds, batch size invariants, back-pressure

Step 5: Generate Extraction Plan

For each prioritized module, output the extraction command:

bash
mix tlx.gen.from_gen_server MyApp.RegistryManager --output specs/registry_manager_skeleton.ex
mix tlx.gen.from_live_view MyAppWeb.FleetLive --output specs/fleet_live_skeleton.ex
mix tlx.gen.from_reactor MyApp.ProvisionWorkflow --output specs/provision_workflow_skeleton.ex
mix tlx.gen.from_broadway MyApp.IngestPipeline --output specs/ingest_pipeline_skeleton.ex

Then direct the user to the formal-spec skill's Phase 2B (enrichment workflow) to complete the skeletons.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/jrjsmrtn/tlx/spec-audit/badge)](https://verified-skill.com/skills/jrjsmrtn/tlx/spec-audit)

Something wrong with this skill or its page? Tell us.