AI Workflow

Configure AI to follow team standards

Overview

AI Workflow is one of AgileBuilder's core features. It lets you define the steps an AI should follow for specific tasks, ensuring the AI adheres to team standards rather than improvising.

For example: you can configure the AI to first check the template list, then get template details, and finally generate a project when creating a project.


Why AI Workflows Matter

Problems

  • AI may not execute tasks in the expected order
  • AI may skip critical steps
  • AI-generated results may not meet team standards
  • Hard to ensure consistent task execution

Solution

With well-defined workflows:

  • Specify steps the AI must follow
  • Force AI to consult team documents after specific steps
  • Ensure critical checkpoints are executed

Workflow Definition

Basic Structure

workflows:
  - name: Create Project
    trigger: "Create project" / "Generate project"
    steps:
      - action: listTemplates
        description: "View available templates"
      - action: getTemplateInfo
        description: "Get template details"
        args:
          template: "${previous.template}"
      - action: queryDocs
        resource: "docs/coding-standards"
        description: "Query coding standards"
      - action: generateProject
        description: "Generate project"

Built-in Workflows

AgileBuilder provides out-of-the-box built-in workflows:

Create Project Workflow

- name: Create Project
  trigger:
    - "Create project"
    - "Generate project"
    - "new project"
  steps:
    - action: listTemplates
      description: "View available project templates"
    - action: queryDocs
      when: "docs/*"
      description: "Query relevant team standards"
    - action: generateProject
      description: "Generate project using selected template"
    - action: runHooks
      description: "Run project initialization"

Code Review Workflow

- name: Code Review
  trigger:
    - "Review code"
    - "Check code"
  steps:
    - action: queryDocs
      resource: "docs/coding-standards"
      description: "Get coding standards"
    - action: queryDocs
      resource: "docs/best-practices"
      description: "Get best practices"
    - action: lint
      description: "Run code linting"

Custom Workflows

Create a Workflow File

Create a .agilebuilder/workflows/ directory in your workspace:

mkdir -p .agilebuilder/workflows

Define Your Workflow

Create project-workflow.yaml:

workflows:
  - name: Internal Project Creation
    trigger:
      - "Create internal project"
      - "New internal project"
    steps:
      - action: listTemplates
        filter:
          tags: ["internal", "enterprise"]
        description: "View internal templates"
      - action: queryDocs
        resource: "docs/internal-standards"
        description: "Get internal standards"
      - action: queryDocs
        resource: "docs/naming-conventions"
        description: "Get naming conventions"
      - action: generateProject
        description: "Generate project"
      - action: verify
        checks:
          - "Project structure follows standards"
          - "Required config files are included"

Triggers

Keyword Triggers

trigger:
  - "Create project"
  - "new project"
  - "generate project"

Regex Matching

trigger:
  pattern: "(create|generate)\\s*(project)"

AI Auto-Detection

AI tools can automatically determine whether to trigger a workflow based on conversation context.


Workflow Debugging

Preview Workflow

agilebuilder workflow preview project-workflow.yaml

Dry Run

agilebuilder workflow run project-workflow.yaml --dry-run

View Logs

agilebuilder workflow logs

Team Sharing

Export Workflow

agilebuilder workflow export my-workflow -o ./workflows/

Import Workflow

agilebuilder workflow import ./workflows/team-workflow.yaml

Online Sync

From the workflow configuration page, you can sync workflows to your team.


Best Practices

  1. Be clear and concise: Each step description should be unambiguous
  2. Include necessary checks: Add verification steps where critical
  3. Link to documentation: Let AI always access the latest standards
  4. Iterate continuously: Optimize workflows based on actual usage

Next Steps