FeatureSignals

AI Janitor Quickstart

Get the AI Janitor cleaning up stale feature flags in 5 minutes. Connect a Git provider, run your first scan, and review automated cleanup recommendations — no configuration required to start.

Prerequisites

  • A FeatureSignals account with at least one project and a few feature flags
  • Admin access to a Git repository (GitHub, GitLab, or Bitbucket)
  • Your source code contains references to FeatureSignals flags

Free to start

AI Janitor is available on all plans, including Community Edition. The first 10 scans per month are free. Higher scan limits are available on Pro and Enterprise plans.
  1. 1. Open AI Janitor

    Navigate to AI Janitorin the FeatureSignals sidebar. If this is your first time, you'll see the onboarding wizard.

    No sidebar item? Make sure your account has the AI Janitor feature enabled. Contact support if you need access.

  2. 2. Connect a Git provider

    AI Janitor needs access to your source code to find flag references and generate cleanup PRs. Click Connect Repository and choose your Git provider:

    • GitHub — OAuth app authorization, 60-second setup
    • GitLab — Personal access token or OAuth
    • Bitbucket — App password or OAuth consumer

    AI Janitor requests read-only access to your repository by default. Write access is only needed if you want it to create PRs automatically. You can review and adjust permissions during setup.

    Bash
    1
    2
    3
    4
    5
    6
    7
    8
    # Permissions needed (GitHub example)
    # Read-only (required for scanning):
    #   - Repository contents (read)
    #   - Repository metadata (read)
    #   - Pull requests (read)
    #
    # Write (optional, for PR creation):
    #   - Pull requests (write)
    
  3. 3. Select repositories to scan

    After connecting your Git provider, select one or more repositories that contain references to your FeatureSignals feature flags. You can scan:

    • A single repository (start here for your first scan)
    • Multiple repositories in a project or organization
    • All repositories matching a name pattern

    Start with one repository to get familiar with the results before scaling to your entire org.

  4. 4. Run your first scan

    Click Run Scan. AI Janitor will:

    1. Analyze your flags — Identify stale candidates based on evaluation inactivity, always-on/always-off behavior, and lifecycle status.
    2. Scan your source code — Search for flag key references across your selected repositories.
    3. Generate recommendations — For each stale flag, determine whether it can be safely removed and what the active code path should be.

    First scans typically complete in 1–3 minutes depending on repository size. Subsequent scans are faster — AI Janitor caches previous analysis results.

  5. 5. Review the results

    The scan results page shows all stale flags found across your repositories. Each result includes:

    ColumnDescription
    Flag KeyThe feature flag identified as stale
    ConfidenceAI confidence score (0–100%) that the flag can be safely removed
    Statusalways_on, always_off, not_evaluated, or zombie (no code references)
    FilesNumber of source code files referencing this flag
    RecommendationWhat the AI suggests: remove, investigate, or keep

    Review before acting

    AI recommendations are suggestions — not mandates. Always review the confidence score, check the flagged files, and use your judgment before generating a cleanup PR. False positives are possible, especially for flags with complex conditional logic.
  6. 6. Generate a cleanup PR (optional)

    For flags you're confident should be removed, click Generate PR. AI Janitor will:

    1. Create a new branch in your repository
    2. Remove the flag check from each source file
    3. Preserve the active code path (the branch that was always taken)
    4. Open a pull request with a detailed description of the changes

    PR generation requires write access to your repository. If you granted read-only access, you can still see the diff and apply it manually.

Next Steps