Features
Workflows

Bwat Workflows

Workflows enable you to define structured sequences of tasks that guide Bwat through repetitive processes like service deployments or PR submissions.

To activate a workflow, simply type /[workflow-name.md] in the chat interface.

Creating and Using Workflows

Workflows coexist with Bwat Rules in your project structure. Creating one is simple:

Workflows interface in Bwat

  1. Create a markdown file outlining the task sequence
  2. Save with .md extension in your workflows directory
  3. Trigger by typing / followed by the filename
  4. Provide necessary parameters when prompted

The real power lies in workflow structure. You can:

  • Utilize Bwat's built-in tools (ask_followup_question, read_file, search_files)
  • Integrate existing CLI tools (gh, docker)
  • Reference external MCP services (Slack, WhatsApp)
  • Chain multiple actions in precise sequences

Practical Implementation: PR Review Workflow

Here's a time-saving PR review workflow example:

# GitHub PR Review Process
 
## 1. Gather PR Information
```bash
gh pr view <PR-number> --json title,body,comments
gh pr diff <PR-number>

2. Context Analysis

gh pr view <PR-number> --json files
<read_file>
<path>path/to/file</path>
</read_file>
<search_files>
<path>path/to/directory</path>
<regex>search term</regex>
<file_pattern>*.ts</file_pattern>
</search_files>

3. Change Evaluation

For each modified file, assess:

  • Nature of changes
  • Justification from PR description
  • Codebase impact
  • Potential side effects

Check for:

  • Code quality
  • Potential bugs
  • Performance considerations
  • Security implications
  • Test coverage

4. User Confirmation

<ask_followup_question>
<question>Based on PR #<PR-number> review, I recommend [action]. Justification:
 
[Detailed analysis]
 
Proceed with recommendation?</question>
<options>["Approve PR", "Request changes", "Discuss further"]</options>
</ask_followup_question>

5. Comment Drafting

<ask_followup_question>
<question>Draft a PR comment?</question>
<options>["Yes, draft comment", "No, I'll comment"]</options>
</ask_followup_question>

6. Final Action

# Approval with comment
gh pr review <PR-number> --approve --body "Your feedback"
 
# Multi-line comment formatting
cat << EOF | gh pr review <PR-number> --approve --body-file -
Multi-line
comment with
formatting
EOF

General Review Guidelines

Maintain friendly, professional tone in reviews:

  • Thank contributor
  • @mention author
  • Provide concise change summary
  • Remain humble in assessments
  • Request changes when improvements needed
  • Use inline comments for specific code feedback

This workflow transforms PR review from a multi-step manual process to a single command operation:

1. Type `/pr-review.md`
2. Enter PR number
3. Bwat handles:
   - PR context gathering
   - Change analysis
   - Recommendation with justification
   - Approval/feedback execution

## Developing Custom Workflows
Workflows are infinitely customizable for various repetitive tasks:

- **Release Management**: Automate changelog generation and version bumps
- **Project Setup**: Standardize new project configurations
- **Reporting**: Aggregate data from multiple sources into formatted reports
- **Team Communication**: Automate status updates via MCP integrations

The key is identifying repetitive "first X, then Y, then Z" patterns in your workflow. Start with small, frequent tasks and gradually expand your workflow library.

Explore our [prompts repository](#) for additional workflow examples and inspiration.

## Workflow Optimization Tips
- **Start Simple**: Begin with basic sequences before adding complexity
- **Iterate**: Continuously refine based on real-world use
- **Document**: Include clear instructions within workflow files
- **Share**: Collaborate with team members on workflow development
- **Test**: Verify new workflows in controlled environments

By leveraging Bwat workflows, you can systematically automate repetitive aspects of your development process, freeing time for higher-value work.