| name | team-lint-audit |
|---|---|
| description | Find all lint issues (ESLint suppressions, RuboCop todo entries, inline rubocop:disable comments) owned by a specific team. Use when user says "find lint issues owned by", "lint audit for team", "team lint debt", or wants to see lint suppressions for a team like Cat Crew. |
Find and summarize all lint issues owned by a given team in the app-workflow repo.
The user provides a team name (e.g. "Cat Crew"). Derive the kebab-case slug (e.g. cat-crew) for matching in ownership files.
Collect all file paths and directory prefixes owned by the team. Store this as OWNED_PATHS — every later step filters against it.
Use Grep to search .github/CODEOWNERS for lines containing the team slug (e.g. cat-crew). CODEOWNERS entries are glob patterns (e.g. /app/controllers/app/dme_orders/*). For each matching line, extract the glob pattern (first column) and expand it using Glob to get concrete file paths. Add all matched paths to OWNED_PATHS.
Use Glob to find all .codeowner files: pattern **/.codeowner. Read each file and check if it contains the team slug. When it does, the parent directory of that .codeowner file is team-owned — add that directory prefix to OWNED_PATHS.
You now have a set of concrete file paths and directory prefixes. A file belongs to the team if it matches any path in OWNED_PATHS or is under any directory prefix in OWNED_PATHS.
Read linters/eslint/eslint-suppressions.json. Inspect its structure (it may be keyed by file path or by rule — check before assuming).
For each file path in the suppressions data, check if it falls under any entry in OWNED_PATHS. Collect all matching entries.
Group results by rule name. For each rule, list affected files and violation counts.
Read .rubocop_todo.yml. Each cop entry has an Exclude list of file paths.
For each excluded file path, check if it falls under any entry in OWNED_PATHS. Collect all matching entries.
Group by cop name with file counts.
Use Grep to search for rubocop:disable in *.rb files, scoped to the directory prefixes in OWNED_PATHS. Exclude lines that also contain rubocop:enable (those are block closers, not suppressions).
Group by cop name with file and line references.
Present a summary table followed by details:
## {Team Name} Lint Issues — N total
### ESLint Suppressions (X entries, Y files)
| Rule | Files | Violations |
|---|---|---|
| rule-name | N | M |
### RuboCop Todo (X entries, Y files)
| Rule | Count | Notes |
|---|---|---|
| Cop/Name | N | Brief context |
### Inline rubocop:disable (X comments, Y files)
| Rule | Count | Where |
|---|---|---|
| Cop/Name | N | Brief location summary |
### Top Problem Areas
1. Biggest issue and where it concentrates
2. Second biggest
3. Third biggest
- ESLint suppressions:
linters/eslint/eslint-suppressions.json - RuboCop todo:
.rubocop_todo.yml - CODEOWNERS:
.github/CODEOWNERS - Distributed ownership:
**/.codeownerfiles