본문으로 건너뛰기
cccskills
무료GitHub에 공개

workflow-state-machines

Use when designing, implementing, or debugging complex agentic workflows using state machine patterns. Keywords: state machine, durable execution, agent orchestration, graph-based agents, workflow checkpoints, C4 protocol.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Workflow State Machines

Overview

This skill provides a structured framework for building resilient, predictable agentic workflows using directed graph-based state machines. It emphasizes durable execution, explicit state transitions, and auditability to ensure complex agent interactions remain stable and debuggable.

When To Use

  • When orchestrating multi-step, multi-agent processes that require durability and fault tolerance.
  • When you need to integrate human-in-the-loop (HITL) checkpoints into long-running tasks.
  • When debugging non-deterministic agent behavior through state history inspection.
  • When enforcing KILO-KIT C4 Runtime Protocol stages as formal state transitions.

Core Concepts

Directed Graph Topologies

  • Nodes: Represent distinct agent actions, tool executions, or decision points.
  • Edges: Define the transition logic based on input, output, or conditions.
  • Immutable State: Workflow state is treated as immutable, with transitions resulting in new state snapshots to ensure clean history.

Durable Execution & Checkpointing

  • Workflows automatically persist the state after every transition.
  • Resumption: Failed workflows can resume precisely from the last successful node (checkpoint) without re-executing completed prior computations.

Human-in-the-Loop (HITL) Interrupts

  • Pause States: Workflows can enter a suspended state to await external input, human approval, or parameter adjustments.
  • Manual Overrides: Operators can inject or edit state data while the workflow is paused before triggering the next transition.

Time-Travel Debugging

  • All state changes are logged as events in a durable store.
  • Replay: Developers can isolate a failing branch, modify inputs, and re-execute that specific subgraph to verify fixes without running the entire workflow from scratch.

Workflow

  1. Define State Schema: Identify all necessary data attributes required for the entire lifecycle.
  2. Decompose into Nodes: Break down the process into atomic, idempotent functions.
  3. Map Edges: Implement conditional routing logic (e.g., success paths, failure paths, human-approval branches).
  4. Configure Persistence: Set up a store for state snapshots and execution history.
  5. Implement HITL Points: Add explicit breakpoints where the workflow yields control to the user.

Key Patterns

  • LangGraph Integration: Use Graph-based definitions for complex stateful loops and branching.
  • Temporal/Workflow Separation: Decouple task execution (activities) from orchestration logic (workflow).
  • C4 Protocol Mapping:
    • Brainstorming Gate → Entry Node (Validation of Intent)
    • Workflow Execution → Graph Traversal
    • Verification Gate → Terminal Validation Node (Ensures success criteria)

Quality Gates

  • Loop Prevention: Every cycle must have an exit condition or max-depth limit defined.
  • Terminal States: Every graph MUST have defined success and failure termination nodes.
  • Shared State Safety: Never share mutable state between parallel branches; always rely on state reducers or explicit state merging.
  • Idempotency: All node-level functions must be idempotent to support safe retries.

Anti-patterns

  • Unchecked Loops: Infinite recursion in agent planning steps.
  • Implicit State: Relying on global variables instead of the explicit State Schema.
  • Missing Terminal States: Workflows that hang without finishing or erroring out.
  • Heavy Side-Effects in Nodes: Side effects that are difficult to rollback or reconcile during state replay.

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

2d-games

무료

2D game development principles. Sprites, tilemaps, physics, camera.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

3d-games

무료

3D game development principles. Rendering, shaders, physics, cameras.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

aesthetic

무료

Create aesthetically beautiful interfaces following proven design principles. Use when building UI/UX, analyzing designs from inspiration sites, generating design images with ai-multimodal, implementing visual hierarchy and color theory, adding micro-interactions, or creating design documentation. Includes workflows for capturing and analyzing inspiration screenshots with chrome-devtools and ai-multimodal, iterative design image generation until aesthetic standards are met, and comprehensive design system guidance covering BEAUTIFUL (aesthetic principles), RIGHT (functionality/accessibility), SATISFYING (micro-interactions), and PEAK (storytelling) stages. Integrates with chrome-devtools, ai-multimodal, media-processing, ui-styling, and web-frameworks skills.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

Use when implementing or managing persistent, hierarchical memory systems for AI agents. Covers cross-session state, fact supersession, and self-managed memory tools to enable long-term recall and adaptive agent behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

Use when monitoring, tracing, or debugging agentic workflows in production. Keywords: observability, tracing, OpenTelemetry, Langfuse, latency, token cost, loop detection, telemetry.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

Use when building self-correcting retrieval systems for AI agents. Keywords: RAG, retrieval, Corrective RAG, Self-RAG, query decomposition, reranking, hallucination, grounding.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

VoDaiLocz/kilo-kit-mcp282026년 9월 13일 업데이트

VoDaiLocz의 스킬 모두 보기

이 스킬의 문제 신고