All skills
aktsmm avatar

/agentic-workflow-guide

@fb34748
by yamapanaktsmm/agent-skills26 stars
4

Design, review, and debug agent workflows, and decide when a request should use a prompt, instruction, skill, agent, or hook before escalating to multi-agent design. Use for .agent.md / .instructions.md / .prompt.md / AGENTS.md work, workflow architecture, orchestration planning, scheduled automation model allocation, or when agent workflows may be overkill. Triggers on 'agent workflow', 'create agent', 'automation models', 'ワークフロー設計', 'orchestrator'.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/agentic-workflow-guide

This session only. Nothing lands on disk.

referencesworkflow-patternsir-architecture.md

≈995 tokens on demand. Your agent reads this file only when SKILL.md points to it.

IR Architecture (Intermediate Representation)

Advanced pattern for transformation tasks with deterministic output

Back to overview.md

Overview

This advanced pattern is particularly effective for document generation, code transformation, and any task where deterministic output is critical.

Two-Stage Architecture

Input → IR (Intermediate Representation) → Output
graph LR
    A[Input] --> B[Generate IR]
    B --> C[Validate IR]
    C -->|Valid| D[Transform]
    C -->|Invalid| E[Reject/Fix]
    D --> F[Render Output]

Core Principles

Principle Description
Separation of Concerns Split responsibility: Generate, Validate, Transform, Render
Strict Validation Validate IR structure strictly; do not auto-complete missing data
Determinism Same IR → Same output. No creativity in transformation phase

Separation of Concerns

Responsibility Agent Role Creativity Level
Generate Create IR from input High (interpretation)
Validate Verify IR completeness and correctness None (rule-based)
Transform Convert IR to output format None (mechanical)
Render Format final output Low (formatting only)

IR Specification Guidelines

  1. Define allowed structure - JSON, YAML, or structured Markdown
  2. Strict schema - All required fields must be present
  3. No inference - Missing data = error, not auto-completion
  4. Version control - IR schema should be versioned

Current State In Append-Only Documents

When one document contains both current state and history, do not search the entire body for status keywords.

  1. Define explicit start and end boundaries for the current-state region.
  2. Parse only that region with an exact header/schema.
  3. Reject missing columns, wrong cell counts, and duplicate logical keys.
  4. Exclude the history region by construction, not with a growing list of old statuses.

This prevents an old pending record from being revived as current work.

When to Use

  • Document generation (specs → documentation)
  • Code transformation (one language → another)
  • Report generation (data → formatted report)
  • Template-based output (variables → filled template)

When NOT to Use

  • Creative tasks (writing, brainstorming)
  • Exploratory analysis
  • Tasks requiring adaptive responses

Implementation Example

Document Generation Workflow:

Step 1: Generate IR
  Input: User requirements
  Output: Structured document spec (JSON)

Step 2: Validate IR
  - All required sections present?
  - Data types correct?
  - References valid?
  → Reject if invalid

Step 3: Transform
  IR → Markdown/HTML/PDF
  (Deterministic, no creativity)

Step 4: Render
  Apply styling, formatting
  Output final document

Example IR Schema

{
  "document": {
    "title": "string (required)",
    "sections": [
      {
        "heading": "string (required)",
        "content": "string (required)",
        "subsections": ["array (optional)"]
      }
    ],
    "metadata": {
      "author": "string",
      "version": "string",
      "created": "ISO8601 date"
    }
  }
}

Benefits

Benefit Description
Reproducibility Same IR always produces same output
Debuggability Can inspect IR to understand failures
Testability Can unit test each stage independently
Reusability Same IR can render to multiple formats

Source: SKILL.md on GitHub

2 warnings4mo4 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill is a professional development toolkit for designing, reviewing, and managing AI agent workflows. It provides structured templates, architectural guidance, and utility scripts to help users build efficient multi-agent systems following best practices like Single Responsibility and Single Source of Truth.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    15/58 files flagged

Signed by skilld at fb34748. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 14 hours ago.

Activeupdated last week
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}
Other metadata
argument-hint
作りたい .agent.md / .instructions.md / .prompt.md / AGENTS.md、設計したい workflow、または困っている症状

README badge

README badge for aktsmm/agent-skills/agentic-workflow-guide