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
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. 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.
Bash12345678# 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. 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. Run your first scan
Click Run Scan. AI Janitor will:
- Analyze your flags — Identify stale candidates based on evaluation inactivity, always-on/always-off behavior, and lifecycle status.
- Scan your source code — Search for flag key references across your selected repositories.
- 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. Review the results
The scan results page shows all stale flags found across your repositories. Each result includes:
Column Description Flag Key The feature flag identified as stale Confidence AI confidence score (0–100%) that the flag can be safely removed Status always_on, always_off, not_evaluated, or zombie (no code references) Files Number of source code files referencing this flag Recommendation What 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. Generate a cleanup PR (optional)
For flags you're confident should be removed, click Generate PR. AI Janitor will:
- Create a new branch in your repository
- Remove the flag check from each source file
- Preserve the active code path (the branch that was always taken)
- 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.