# Workflows

A workflow is a **predefined sequence of agent steps** that solves a specific type of problem. Workflows define which agents run, in what order, with what inputs and outputs.

## What is a workflow?

Each workflow is a YAML file that describes:

- **Steps**: ordered sequence of agent invocations
- **Agents**: which agent handles each step
- **Inputs/Outputs**: what each step receives and produces
- **Dependencies**: which steps must complete before others start

## The 15 predefined workflows

### Development workflows

| Shortcut | Workflow | Agents | Purpose |
| --- | --- | --- | --- |
| `/feature` | feature-development | professor-x, tony-stark, captain-america, dev agents, hawkeye | Build a new feature end-to-end |
| `/bugfix` | bug-fix | dev agents, hawkeye | Diagnose and fix a bug |
| `/review` | code-review-pipeline | dev agents, punisher, hawkeye | Comprehensive code review |
| `/refactor` | tech-debt-reduction | tony-stark, dev agents, hawkeye | Reduce technical debt |
| `/upgrade` | dependency-upgrade | thor, dev agents, hawkeye | Update dependencies safely |

### Release workflows

| Shortcut | Workflow | Agents | Purpose |
| --- | --- | --- | --- |
| `/release` | release-cycle | captain-america, dev agents, thor, hawkeye | Prepare and ship a release |
| `/hotfix` | hotfix-release | dev agents, thor, hawkeye | Emergency production fix |
| `/mvp` | mvp-launch | professor-x, tony-stark, dev agents, star-lord | Launch a minimum viable product |

### Process workflows

| Shortcut | Workflow | Agents | Purpose |
| --- | --- | --- | --- |
| `/sprint` | sprint-cycle | captain-america, professor-x, dev agents | Plan and run a sprint |
| `/onboard` | onboarding-project | professor-x, tony-stark, captain-america | Set up a new project |
| `/docs` | documentation-sprint | dev agents, storm | Write or update documentation |

### Marketing workflows

| Shortcut | Workflow | Agents | Purpose |
| --- | --- | --- | --- |
| `/campaign` | marketing-campaign | star-lord, loki, gamora, ms-marvel | Launch a marketing campaign |
| `/seo` | seo-content-pipeline | black-widow, storm, jean-grey | SEO content production |

### Quality workflows

| Shortcut | Workflow | Agents | Purpose |
| --- | --- | --- | --- |
| `/security` | security-audit | punisher, microchip, dev agents | Full security audit |
| `/experiment` | experimentation | beast, dev agents, hawkeye | Run an A/B test or experiment |

## Workflow structure (YAML)
Every workflow follows this structure:

```
name: feature-development

description: Build a new feature end-to-end

trigger: /feature

risk: MEDIUM

steps:

- id: spec

agent: professor-x

action: Write feature specification

inputs: [user_request]

outputs: [spec.md]

- id: plan

agent: tony-stark

action: Design technical architecture

inputs: [spec.md]

outputs: [plan.md]

depends_on: [spec]

- id: tasks

agent: captain-america

action: Break down into tasks

inputs: [spec.md, plan.md]

outputs: [tasks.md]

depends_on: [plan]

- id: implement

agent: bruce-banner

action: Implement the feature

inputs: [spec.md, plan.md, tasks.md]

outputs: [code, tests]

depends_on: [tasks]

- id: test

agent: hawkeye

action: Write and run tests

inputs: [code, spec.md]

outputs: [test-report.md]

depends_on: [implement]
```

## How dependencies work
Dependencies create a **directed acyclic graph (DAG)**. Steps without dependencies can run in parallel (when the platform supports it). Steps with `depends_on` wait for their dependencies to complete.

```
spec → plan → tasks → implement → test

↘ frontend →  ↗
```

## Inputs and outputs
Each step declares:

- **inputs**: files or data from previous steps (or `user_request` for the first step)
- **outputs**: files produced by the agent

Jarvis verifies that each output exists before proceeding to the next step. If an output is missing, the workflow pauses and alerts the user.

## Workflow manifest
During execution, Jarvis maintains a `_manifest.yaml` in the output directory that tracks:

- Current step and status
- Timestamps for each step
- Produced outputs
- Any blockers or warnings

## Custom workflows
You can create custom workflows for your team’s specific needs. See the [Custom Workflows guide](/content/docs/guides/custom-workflows/index.html) for details.
