Skip to content
Back to skills

Agent State Machine Integrity Auditor

ASecurity

Use when verifying finite state machine transitions, preventing illegal state jumps, eliminating duplicate finalization, and auditing execution records.

  • 7 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 9, 2026
ai-agentsbashnodetesting

Works with

  • terminal

Security analysis

A100/100

Scanned November 21, 2026

npx -y skills add Harmitx7/tribunal-kit --skill agent-state-machine-integrity-auditor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent State Machine Integrity Auditor?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent State Machine Integrity Auditor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harmitx7-agent-state-machine-integrity-auditor/badge)](https://www.skillsdirectory.com/skills/harmitx7-agent-state-machine-integrity-auditor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-state-machine-integrity-auditor
description: 'Use when verifying finite state machine transitions, preventing illegal state jumps, eliminating duplicate finalization, and auditing execution records.'
version: 1.0.0
last-updated: 2026-10-30
skills:
  - clean-code
  - error-resilience
tools: Read, Grep, Glob, Bash, Write
scripts-binding:
  - src/runtime_reliability/state_machine_engine.js
  - src/runtime_reliability/execution_state_schemas.js
  - src/runtime_reliability/index.js
inputs:
  state_transitions_log: 'array'
  execution_record: 'object'
outputs:
  illegal_transition_findings: 'array'
  terminal_state_violations: 'array'
  fsm_integrity_status: 'string'
trigger:
  - 'state machine integrity audit'
  - 'illegal state transition check'
  - 'duplicate finalization prevention'
  - 'execution lifecycle verification'
  - 'fsm transition table audit'
  - 'agent-state-machine-integrity-auditor'
---

# Agent State Machine Integrity Auditor

## Mandatory Pre-Flight Context Inspection

Before auditing state machine transitions, inspect these 5 critical parameters:

1. **Canonical State Table Alignment**: Verify that all execution states belong to the 10 canonical lifecycle states.
2. **Terminal State Immutability**: Enforce that terminal states (`SUCCEEDED`, `FAILED`, `TIMED_OUT`, `CANCELLED`, `PARTIAL`) have zero allowed outbound transitions.
3. **Duplicate Finalization Defense**: Prevent multiple conflicting terminal calls (e.g. attempting to complete an already failed or cancelled task).
4. **Transition Audit Trail**: Maintain an immutable log of state transitions with ISO timestamps, attempt numbers, and transition reasons.
5. **Fail-Closed on Unknown States**: Immediately halt execution and flag `ILLEGAL_STATE_TRANSITION` if an unrecognized state is encountered.

## Activation Boundaries

- **Activate when:** Inspecting task execution logs, testing orchestrator state management, verifying race conditions in task finalization, or auditing FSM models.
- **DO NOT activate when:** Auditing persistent disk recovery checkpoints (use `agent-recovery-and-resume-auditor`).

## Multi-Pass Execution Protocol

| Pass       | Phase                            | Core Action                                                                        | Adaptive Depth         |
| :--------- | :------------------------------- | :--------------------------------------------------------------------------------- | :--------------------- |
| **Pass 1** | **Transition Extraction**        | Extract recorded state transitions, timestamps, and caller identities.             | Fast / Standard / Deep |
| **Pass 2** | **Legal Matrix Validation**      | Compare each transition pair against `LEGAL_TRANSITIONS` rules.                    | All Modes              |
| **Pass 3** | **Terminal Mutation Check**      | Detect any attempt to transition or mutate tasks already in terminal states.       | Standard / Deep        |
| **Pass 4** | **Concurrency & Lock Audit**     | Verify that state updates are protected against concurrent interleaving.           | All Modes              |
| **Pass 5** | **Findings & FSM Certification** | Output `ILLEGAL_STATE_TRANSITION` findings with trace paths and corrective models. | Standard / Deep        |

## Verification Command

```bash
node -e "const { StateMachineEngine } = require('./src/runtime_reliability'); console.log('State machine integrity validated');"
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.