Skip to content

Add 'disabled' field to Rule config #3

@panyam

Description

@panyam

Summary

Add a disabled (or enabled) boolean field to the Rule configuration so individual rules can be toggled off
without commenting/uncommenting YAML blocks.

Motivation

When a .devloop.yaml has rules that are useful but not always needed (e.g., test runners alongside service
runners), the only way to disable them today is to comment out the entire rule block. This is error-prone and
clutters the config.

A simple disabled: true field would let users keep the full rule definition in place and toggle it on/off
cleanly.

Example

rules:
  - name: "backend"
    # ...runs normally...

  - name: "backend-test"
    disabled: true          # <-- skipped by orchestrator
    debounce_delay: 5000ms
    watch:
      - action: "include"
        patterns: ["src/test/**/*.java", "src/main/**/*.java"]
    commands:
      - "mvn test -q"

Suggested Implementation

1. Proto: Add bool disabled = 19; to the Rule message in protos/devloop/v1/models.proto
2. Config parsing: Map disabled YAML field to the proto field during config load
3. Orchestrator: Skip RuleRunner creation for rules where disabled == true
4. Status: devloop status could show disabled rules as DISABLED rather than hiding them entirely
5. CLI: Optionally support devloop enable <rule> / devloop disable <rule> for runtime toggling via the gRPC API

Alternatives Considered

- Commenting out YAML blocks (current workaround) — error-prone, hard to toggle
- Removing the rule entirely — loses the config
- Empty watch patterns — hacky, unclear intent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions