AIRGAP StudioAIRGAP Studio

Workflows

AIRGAP Assistant automation workflow configuration

Overview

Workflows let you bundle repetitive task steps into a single automation chain for execution. Define multiple tasks in sequence, and a single run automatically processes the entire pipeline.

Workflow File Format

Workflows can be defined as a ## Workflows section within the .airgaprules file, or written in a separate .airgapworkflows file.

# .airgapworkflows

## Code Review Workflow
1. Check the list of changed files.
2. Analyze the changes in each file.
3. Report coding convention violations.
4. Identify potential bugs or performance issues.
5. Compile improvement suggestions.

## Test-Then-Commit Workflow
1. Run unit tests for the current changes.
2. If all tests pass, stage the changes.
3. Write a commit message summarizing the changes.
4. Create the commit.

Running Workflows

Mention the workflow name in the AIRGAP Assistant chat to execute it.

"Run the code review workflow"
"Process the current changes with the test-then-commit workflow"

The AI performs each step of the workflow in order, requesting user approval when necessary.

Trigger Conditions

Adding trigger conditions to a workflow causes it to automatically suggest execution in specific situations.

## Build Verification Workflow
Trigger: When the user mentions "build" or "deploy"

1. Run TypeScript compilation.
2. Perform lint checks.
3. Run unit tests.
4. Summarize the build results.

Note: Even when trigger conditions are set, the AI does not automatically execute the workflow. When conditions are detected, it first confirms with the user whether to proceed.

Writing Custom Workflows

Guidelines for writing effective workflows.

Writing Principles

  • Be specific about steps. "Review the code" is less effective than "Review variable naming conventions, error handling, and type safety."
  • Use numbered lists for order-dependent tasks.
  • Use "if ... then" statements to specify conditional branching.

Practical Workflow Examples

## Component Creation Workflow
1. Define the component name and props types.
2. Create a React functional component.
3. Apply base styles with Tailwind CSS.
4. Generate a component story (Storybook).
5. Generate a unit test file.