verify-enum-values

Validate enum string literals against backend/src/main/kotlin/com/werewolf/model/Enums.kt.

Updated Jun 25, 2025
One-click install
npx skills add https://github.com/wangdaqian08/werewolf-simple --skill verify-enum-values
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: verify-enum-values
Source: https://github.com/wangdaqian08/werewolf-simple/tree/main/.claude/skills/verify-enum-values
Command: npx skills add https://github.com/wangdaqian08/werewolf-simple --skill verify-enum-values

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents silent bugs caused by enum string literals drifting across code, scripts, tests, and documentation. It helps you verify that every value you write matches the backend source of truth before it causes runtime rejection or hard-to-trace failures.

Core Features & Use Cases

  • Source-of-Truth Checking: Confirms literals against backend/src/main/kotlin/com/werewolf/model/Enums.kt before use.
  • Cross-File Parity: Helps keep Kotlin enums, dispatchers, handlers, database constraints, frontend types, CLI wrappers, and docs aligned.
  • Safe Renames: Supports renaming enum values without breaking gameplay logic or external references.
  • Use Case: Before changing a werewolf action, phase, or role value, use this Skill to verify the exact literal and update every dependent layer consistently.

Quick Start

Use the verify-enum-values skill to confirm the exact enum literal you plan to add or change against backend/src/main/kotlin/com/werewolf/model/Enums.kt before editing any related code or documentation.

Frequently Asked Questions about verify-enum-values

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

FAQPage Schema
How do I prevent enum string drift in Kotlin before it breaks my build?

You prevent enum string drift by validating literals against the backend source of truth in Enums.kt before writing them. This cross-file parity checking ensures Kotlin enums, dispatchers, handlers, and frontend types stay aligned.

What is the best way to rename an enum value across game logic and documentation without breaking references?

Renaming an enum value safely requires verifying the exact literal against backend Enums.kt first, then updating every dependent layer consistently. This prevents runtime rejection and hard-to-trace failures across dispatchers, handlers, and CLI wrappers.

Why does my frontend type cause a runtime rejection when it references a werewolf game phase?

Runtime rejection occurs when frontend types experience enum string drift from the backend Enums.kt source of truth. Validating action types, phases, and roles literals before editing code prevents these silent bugs caused by mismatched string values.

How do I validate action types and role literals against backend Enums.kt before editing code?

You validate action types and role literals by checking them against backend/src/main/kotlin/com/werewolf/model/Enums.kt before editing any related code or documentation. This confirms the exact literal and maintains cross-file parity across all layers.

Can I use this enum validation for shell scripts and CLI wrappers, or is it only for Kotlin code?

You can use this enum validation for shell scripts and CLI wrappers, not just Kotlin code. It verifies that any string literal referencing action types, phases, roles, statuses, vote contexts, or win conditions matches the backend source of truth.

When do I need to check enum parity across database constraints and documentation?

You need to check enum parity across database constraints and documentation before changing any werewolf action, phase, or role value. Validating literals against backend Enums.kt ensures every dependent layer stays aligned and prevents silent bugs.