Watchflow is a rule engine for GitHub: you define rules in YAML; we evaluate them on PR and push events and surface violations as check runs and PR comments. No custom code in the repo—just conditions and parameters that map to built-in logic. Built for maintainers who want consistent enforcement without another dashboard or “AI-powered” abstraction.
.watchflow/rules.yaml on the default branch; same mental model as branch protection and CODEOWNERS.require_linked_issue, max_lines, require_code_owner_reviewers). Optional LLM-assisted conditions (e.g. require_description_diff_alignment) are clearly documented and opt-in.X-GitHub-Delivery; handler and processor get distinct task IDs so both run and comments/check runs stay in sync.graph TD
A[GitHub Event] --> B[Webhook Router]
B --> C[Delivery ID + Payload]
C --> D[Handler: enqueue processor]
C --> E[Processor: load rules, enrich, evaluate]
E --> F[Rule Engine: conditions only]
F --> G[Violations / Pass]
G --> H[Check Run + PR Comment]
G --> I[Acknowledgment parsing on comment]
pull_request or push; router reads X-GitHub-Delivery, builds WebhookEvent with delivery_id.event_type + delivery_id + func so dedup doesn’t skip the processor..watchflow/rules.yaml from default branch (via GitHub API). If missing, creates a neutral check run and posts a welcome comment with a link to watchflow.dev (installation_id + repo).@watchflow acknowledge "reason" where the rule allows it..watchflow/rules.yaml from the repo default branch (GitHub App installation token).max_changed_lines → max_lines for MaxPrLocCondition).Rule objects with condition instances from the condition registry (parameter keys map to conditions).require_linked_issue → RequireLinkedIssueCondition, max_lines → MaxPrLocCondition, require_code_owner_reviewers → RequireCodeOwnerReviewersCondition)..github/CODEOWNERS, CODEOWNERS, or docs/CODEOWNERS) so CODEOWNERS-based conditions don’t need a local clone.hash(event_type + delivery_id + func_qualname) when delivery_id is present so handler and processor both run per delivery.DescriptionDiffAlignmentCondition) are clearly marked and gracefully degrade on failure.POST /api/v1/rules/recommend uses an agent to suggest rules from repo structure and PR history; you copy/paste or create a PR.So: enforcement is deterministic and condition-based by default; LLM-assisted conditions are opt-in and fail-open; suggestions and feasibility are agent-assisted. That keeps the hot path simple and auditable.