🏆 1st Place on Product Hunt! Check it out →

Watchflow: Custom rule checks for GitHub workflows - Agentic GitHub Guardrails

Replace static GitHub protection rules with agentic guardrails. Watchflow is an open-source GitHub App that provides context-aware enforcement, going beyond binary branch protection to prevent production incidents with intelligent, explainable pre-merge checks.

tl;dr

Watchflow is an open-source GitHub App that brings context-aware governance to pull requests, check runs, and deployments. Replace static protection rules with intent-driven rules in the rules.yaml file and enforce behavior across workflows with an agentic engine that interprets GitHub events in real-time.

Introduction: Beyond Static Rules

Traditional GitHub branch protection rules are binary—they either block or allow. They stop at the merge button and don’t understand context, team dynamics, or the nuanced conditions that matter in real-world development workflows.

What if your protection rules could:

That’s what agentic GitHub guardrails enable—and that’s what Watchflow delivers.

What is Watchflow?

Watchflow is an open-source GitHub App that replaces static protection rules with agentic GitHub guardrails. It ensures consistent quality standards with smarter, context-aware protection for every repository.

Unlike traditional branch protection that ends at the merge button, Watchflow provides:

How It Started

Watchflow was born from the need to solve real problems that static GitHub protection rules couldn’t address:

Key Requirements

  1. Human-readable rules - No proprietary language or complex YAML configurations
  2. Explainable decisions - Every rule violation comes with clear reasoning
  3. Typed input - Strong typing for rule parameters and conditions
  4. Deployment behavior - Rules that understand the full deployment lifecycle
  5. Context awareness - Rules that adapt to team structure and developer roles

How Does It Work?

Watchflow uses a hybrid architecture that combines rule-based logic with AI-powered intelligence:

Architecture Overview

GitHub Events → Watchflow → Rule Engine → GitHub Checks Security | Compliance | Safety | Custom Checks

Watchflow processes GitHub events (PRs, deployments, comments) and enriches them with:

The Rule Engine evaluates rules against this enriched data, making context-aware decisions that go beyond simple yes/no checks.

Agentic GitHub Guardrails

The term “agentic” refers to Watchflow’s ability to:

This is fundamentally different from static branch protection rules that can only answer “yes” or “no” without understanding why.

What You Can Enforce

Watchflow enables four main categories of policies:

1. Security Checks

2. Compliance Checks

3. Safety Checks

4. Custom Checks

Enrichments

Watchflow enriches GitHub events with additional context:

This enriched data enables rules to make intelligent decisions that static protection rules simply cannot.

Severity Levels and Enforcement

Watchflow supports multiple enforcement actions:

Each rule can specify its severity level, allowing teams to balance enforcement with workflow flexibility.

Real Usage and Known Constraints

Common Use Cases

  1. Require Top Reviewer Approval: PRs must have approval from one of the top 5 most active reviewers
  2. Conventional Commits: Enforce commit message format (feat/fix/etc.)
  3. Code Owner Approval: Prevent direct merges to main without code owner review
  4. Weekend Deployment Protection: Block deployments on weekends unless acknowledged

Known Constraints

Natural Language Rules

One of Watchflow’s key features is the ability to define rules in natural language:

rules: - description: All pull requests must have a minimum number of approvals unless the author is a maintainer enabled: true severity: high event_types: [pull_request] parameters: min_approvals: 2

This human-readable format makes rules:

Call for Contributors and Feedback

Watchflow is open source and made with ❤️ by Warestack and the community. We welcome contributions!

Get Involved

Watchflow vs. Traditional GitHub Protection Rules

FeatureTraditional Branch ProtectionWatchflow (Agentic Guardrails)
Context AwarenessNo - binary yes/noYes - considers team, timing, history
Rule LanguageComplex YAML configurationsNatural language descriptions
ExplainabilityLimitedFull evidence and reasoning
Post-MergeStops at merge buttonMonitors full deployment lifecycle
Team-Level RulesRepository-level onlyTeam and role-based enforcement
Acknowledgment WorkflowNot supportedIntelligent ACK with context

Final Thoughts

Agentic GitHub guardrails represent the next evolution of DevOps governance. Watchflow demonstrates that protection rules don’t have to be rigid, binary, or repository-bound. They can be intelligent, context-aware, and aligned with how teams actually work.

By replacing static protection rules with agentic guardrails, teams can:

Watchflow is our contribution to the open-source community—a tool that makes agentic GitHub guardrails accessible to every team.

Ready to replace your static protection rules with agentic guardrails? Get started with Watchflow or explore the code on GitHub.


For enterprise-grade features, advanced integrations, and team management, check out Warestack—the platform that powers Watchflow and extends it with production-scale capabilities.

Warestack

About

Our story

© 2025 Warestack Inc.