repo-defining-workflows

Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, goal, termination, inputs, outputs), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.

9 stars

Best use case

repo-defining-workflows is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, goal, termination, inputs, outputs), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.

Teams using repo-defining-workflows should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/repo-defining-workflows/SKILL.md --create-dirs "https://raw.githubusercontent.com/wahidyankf/open-sharia-enterprise/main/.claude/skills/repo-defining-workflows/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/repo-defining-workflows/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How repo-defining-workflows Compares

Feature / Agentrepo-defining-workflowsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, goal, termination, inputs, outputs), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Defining Workflows

## Purpose

This Skill provides comprehensive guidance for **defining workflows** - multi-agent orchestrations that coordinate multiple agents in sequence, parallel, or conditionally to accomplish complex tasks. Workflows enable reusable, validated processes.

**When to use this Skill:**

- Creating new workflow documents
- Defining multi-agent coordination patterns
- Structuring sequential or parallel agent execution
- Writing workflow acceptance criteria
- Documenting workflow parameters and inputs

## Workflow Structure

### YAML Frontmatter (Required)

```yaml
---
name: workflow-identifier
goal: What this workflow achieves
termination: Success/failure criteria
inputs:
  - name: input-name
    type: string | number | boolean | file | file-list | enum
    description: What this input is for
    required: true | false
    default: value (if not required)
  - name: max-concurrency
    type: number
    description: Maximum number of agents/tasks that can run in parallel
    required: false
    default: 2
outputs:
  - name: output-name
    type: string | number | boolean | file | file-list | enum
    description: What this output contains
    pattern: file-pattern (for file/file-list types)
---
```

**Critical YAML Syntax**: Values containing colons (`:`) must be quoted.

✅ **Good**:

```yaml
description: "Workflow name: detailed description here"
parameter: "key: value pairs"
```

❌ **Bad** (breaks YAML parsing):

```yaml
description: Workflow name: detailed description
```

### Workflow Content

````markdown
# Workflow Name

## Purpose

What this workflow accomplishes and when to use it.

## Agents Involved

- **agent-name-1**: Role and responsibility
- **agent-name-2**: Role and responsibility

## Input Parameters

| Parameter | Type   | Required | Default | Description |
| --------- | ------ | -------- | ------- | ----------- |
| param1    | string | Yes      | -       | Purpose     |
| param2    | number | No       | 5       | Purpose     |

## Execution Phases

### Phase 1: Name (Sequential)

1. Run agent-name-1 with parameters
2. Wait for completion
3. Run agent-name-2 with results from agent-name-1

### Phase 2: Name (Parallel)

Run in parallel:

- agent-name-3
- agent-name-4

Wait for all to complete before proceeding.

### Phase 3: Name (Conditional)

If condition A:

- Run agent-name-5
  Else:
- Run agent-name-6

## Success Criteria

```gherkin
Given [precondition]
When [workflow executed]
Then [expected outcome]
And [additional verification]
```
````

## Example Usage

Concrete example showing how to invoke workflow.

## Related Workflows

- workflow-name-1 - When to use together
- workflow-name-2 - Alternative approach

````

## Execution Patterns

### Sequential Execution

**When**: Steps depend on previous results.

```markdown
1. maker creates content
2. checker validates content (uses maker output)
3. fixer applies fixes (uses checker findings)
````

### Parallel Execution

**When**: Steps are independent and can run simultaneously.

```markdown
Run in parallel:

- checker-1 validates docs
- checker-2 validates code
- checker-3 validates configs

Combine results after all complete.
```

### Conditional Execution

**When**: Different paths based on conditions.

```markdown
If validation passes:

- Deploy to production
  Else:
- Create issue with findings
- Notify team
```

### Mixed Patterns

Combine sequential, parallel, and conditional:

```markdown
1. Run maker (sequential)
2. Run checkers in parallel:
   - checker-1
   - checker-2
3. Wait for all checkers
4. Conditional:
   If critical issues found:
   - STOP
   - Report to user
     Else:
   - Run fixer (sequential)
   - Deploy
```

## Standard Input Parameters

Most workflows support:

- **max-concurrency** (number, default: 2): Maximum parallel agents
- **dry-run** (boolean, default: false): Preview without executing
- **verbose** (boolean, default: false): Detailed logging

## Common Mistakes

### ❌ Mistake 1: Unquoted colons in YAML

**Wrong**:

```yaml
description: Workflow name: detailed description
```

**Right**:

```yaml
description: "Workflow name: detailed description"
```

### ❌ Mistake 2: Missing agent dependencies

**Wrong**: Parallel execution when agent-2 needs agent-1 output
**Right**: Sequential execution with explicit dependency

### ❌ Mistake 3: No success criteria

**Wrong**: Workflow without Gherkin validation criteria
**Right**: Clear Gherkin scenarios for success validation

### ❌ Mistake 4: Missing parameters documentation

**Wrong**: Undocumented parameters that users must guess
**Right**: Table with all parameters, types, defaults, descriptions

## Workflow File Naming

**Convention**: `[workflow-name].md`

**Examples**:

- `quality-gate.md` - Plan quality gate workflow
- `quality-gate.md` - Docs quality gate workflow
- `repo-rules-quality-gate.md` - Repo rules quality gate workflow

## Quality Checklist

Before publishing workflow:

- [ ] Valid YAML frontmatter (all colons quoted)
- [ ] name field matches filename
- [ ] goal is clear and concise
- [ ] termination criteria defined (success/failure)
- [ ] All inputs documented (type, required, default)
- [ ] All outputs documented (type, pattern for file outputs)
- [ ] Execution phases clearly defined
- [ ] Dependencies explicit (sequential vs parallel)
- [ ] Success criteria in Gherkin format
- [ ] Example usage provided
- [ ] Related workflows linked

## References

**Primary Convention**: [Workflow Pattern Convention](../../../repo-governance/workflows/meta/workflow-identifier.md)

**Related Conventions**:

- [Maker-Checker-Fixer Pattern](../../../repo-governance/development/pattern/maker-checker-fixer.md) - Three-stage workflow pattern
- [Acceptance Criteria Convention](../../../repo-governance/development/infra/acceptance-criteria.md) - Gherkin format

**Related Skills**:

- `repo-applying-maker-checker-fixer` - MCF workflow pattern
- `plan-writing-gherkin-criteria` - Success criteria format

---

This Skill packages workflow definition standards for creating reusable multi-agent orchestrations with clear coordination patterns. For comprehensive details, consult the primary convention document.

Related Skills

repo-understanding-repository-architecture

9
from wahidyankf/open-sharia-enterprise

Six-layer governance hierarchy (Vision → Principles → Conventions → Development → Agents → Workflows). Use when understanding repository structure, tracing rules to foundational values, explaining architectural decisions, or navigating layer relationships.

repo-syncing-with-ose-primer

9
from wahidyankf/open-sharia-enterprise

Classifier parsing, clone management, transform implementations, noise suppression, significance bucketing, report formatting, and extraction-scope enumeration for the two maker agents that sync content between `ose-public` (upstream) and `ose-primer` (downstream template). Keeps both agents aligned to a single authoritative classifier and a single per-mode report schema.

repo-practicing-trunk-based-development

9
from wahidyankf/open-sharia-enterprise

Trunk Based Development workflow - all development on main branch with small frequent commits, minimal branching, and continuous integration. Covers when branches are justified (exceptional cases only), commit patterns, feature flag usage for incomplete work, environment branch rules (deployment only), and AI agent default behavior (assume main). Essential for understanding repository git workflow and preventing unnecessary branch proliferation

repo-generating-validation-reports

9
from wahidyankf/open-sharia-enterprise

Guidelines for generating validation/audit reports with UUID chains, progressive writing, and UTC+7 timestamps

repo-assessing-criticality-confidence

9
from wahidyankf/open-sharia-enterprise

Universal classification system for checker and fixer agents using orthogonal criticality (CRITICAL/HIGH/MEDIUM/LOW importance) and confidence (HIGH/MEDIUM/FALSE_POSITIVE certainty) dimensions. Covers priority matrix (P0-P4), execution order, dual-label pattern for verification status, standardized report format, and domain-specific examples. Essential for implementing checker/fixer agents and processing audit reports

repo-applying-maker-checker-fixer

9
from wahidyankf/open-sharia-enterprise

Three-stage content quality workflow pattern (Maker creates, Checker validates, Fixer remediates) with detailed execution workflows. Use when working with content quality workflows, validation processes, audit reports, or implementing maker/checker/fixer agent roles.

nx-workspace

9
from wahidyankf/open-sharia-enterprise

Explore and understand Nx workspaces. USE WHEN answering questions about the workspace, projects, or tasks. ALSO USE WHEN an nx command fails or you need to check available targets/configuration before running a task. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What depends on library Y?', 'What targets can I run?', 'Cannot find configuration for task', 'debug nx task failure'.

nx-run-tasks

9
from wahidyankf/open-sharia-enterprise

Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.

nx-plugins

9
from wahidyankf/open-sharia-enterprise

Find and add Nx plugins. USE WHEN user wants to discover available plugins, install a new plugin, or add support for a specific framework or technology to the workspace.

nx-import

9
from wahidyankf/open-sharia-enterprise

Import, merge, or combine repositories into an Nx workspace using nx import. USE WHEN the user asks to adopt Nx across repos, move projects into a monorepo, or bring code/history from another repository.

nx-generate

9
from wahidyankf/open-sharia-enterprise

Generate code using nx generators. INVOKE IMMEDIATELY when user mentions scaffolding, setup, structure, creating apps/libs, or setting up project structure. Trigger words - scaffold, setup, create a ... app, create a ... lib, project structure, generate, add a new project. ALWAYS use this BEFORE calling nx_docs or exploring - this skill handles discovery internally.

monitor-ci

9
from wahidyankf/open-sharia-enterprise

Monitor Nx Cloud CI pipeline and handle self-healing fixes. USE WHEN user says "monitor ci", "watch ci", "ci monitor", "watch ci for this branch", "track ci", "check ci status", wants to track CI status, or needs help with self-healing CI fixes. Prefer this skill over native CI provider tools (gh, glab, etc.) for CI monitoring — it integrates with Nx Cloud self-healing which those tools cannot access.