plugins/pm/skills/groom-backlog/SKILL.md
Groom Linear backlog to identify orphaned issues, incorrect project assignments, and health issues
npx skillsauth add coalesce-labs/catalyst groom-backlogInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive backlog health analysis that identifies:
# 1. Validate thoughts system (REQUIRED)
if [[ -f "scripts/validate-thoughts-setup.sh" ]]; then
./scripts/validate-thoughts-setup.sh || exit 1
else
# Inline validation if script not found
if [[ ! -d "thoughts/shared" ]]; then
echo "❌ ERROR: Thoughts system not configured"
echo "Run: ./scripts/humanlayer/init-project.sh . {project-name}"
exit 1
fi
fi
# 2. Determine script directory with fallback
if [[ -n "${CLAUDE_PLUGIN_ROOT}" ]]; then
SCRIPT_DIR="${CLAUDE_PLUGIN_ROOT}/scripts"
else
# Fallback: resolve relative to this command file
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts"
fi
# 3. Check PM plugin prerequisites
if [[ -f "${SCRIPT_DIR}/check-prerequisites.sh" ]]; then
"${SCRIPT_DIR}/check-prerequisites.sh" || exit 1
else
echo "⚠️ Prerequisites check skipped (script not found at: ${SCRIPT_DIR})"
fi
# Determine script directory with fallback
if [[ -n "${CLAUDE_PLUGIN_ROOT}" ]]; then
SCRIPT_DIR="${CLAUDE_PLUGIN_ROOT}/scripts"
else
# Fallback: resolve relative to this command file
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts"
fi
source "${SCRIPT_DIR}/pm-utils.sh"
TEAM_KEY=$(get_team_key)
Use Task tool with catalyst-dev:linear-research agent:
Prompt: "Get all backlog issues for team ${TEAM_KEY} including issues with no cycle assignment"
Model: haiku
Use Task tool with backlog-analyzer agent:
Input: Backlog issues JSON from research
Output: Structured recommendations with:
Create markdown report with sections:
Orphaned Issues (no project):
## 🏷️ Orphaned Issues (No Project Assignment)
### High Priority
- **TEAM-456**: "Add OAuth support"
- **Suggested Project**: Auth & Security
- **Reasoning**: Mentions authentication, OAuth, security tokens
- **Action**: Move to Auth project
[... more issues ...]
### Medium Priority
[... issues ...]
Misplaced Issues (wrong project):
## 🔄 Misplaced Issues (Wrong Project)
- **TEAM-123**: "Fix dashboard bug" (currently in: API)
- **Should be in**: Frontend
- **Reasoning**: UI bug, no backend changes mentioned
- **Action**: Move to Frontend project
Stale Issues (>30 days inactive):
## 🗓️ Stale Issues (No Activity >30 Days)
- **TEAM-789**: "Investigate caching" (last updated: 45 days ago)
- **Action**: Review and close, or assign to current cycle
Duplicates (similar titles):
## 🔁 Potential Duplicates
- **TEAM-111**: "User authentication bug"
- **TEAM-222**: "Authentication not working"
- **Similarity**: 85%
- **Action**: Review and merge
Missing Estimates:
## 📊 Issues Without Estimates
- TEAM-444: "Implement new feature"
- TEAM-555: "Refactor old code"
- **Action**: Add story point estimates
Present recommendations and ask user:
📋 Backlog Grooming Report Generated
Summary:
🏷️ Orphaned: 12 issues
🔄 Misplaced: 5 issues
🗓️ Stale: 8 issues
🔁 Duplicates: 3 pairs
📊 No Estimates: 15 issues
Would you like to:
1. Review detailed report (opens in editor)
2. Apply high-confidence recommendations automatically
3. Generate Linear update commands for manual execution
4. Skip (report saved for later)
If user chooses option 3, generate batch update script:
#!/usr/bin/env bash
# Backlog grooming updates - Generated from audit
# Use `linearis issues usage` and `linearis comments usage` for exact CLI syntax.
# For each recommended action, use linearis to:
# - Move tickets to projects: update with --project flag
# - Close stale issues: update status to stateMap.canceled from config, add comment
# - Re-prioritize: update with --priority flag
echo "✅ Backlog grooming updates applied"
# Save update script
UPDATE_SCRIPT="thoughts/shared/pm/reports/$(date +%Y-%m-%d)-grooming-updates.sh"
mkdir -p "$(dirname "$UPDATE_SCRIPT")"
# [script contents saved here]
chmod +x "$UPDATE_SCRIPT"
IMPORTANT: Document Storage Rules
thoughts/shared/pm/reports/thoughts/searchable/ — this is a read-only search indexREPORT_DIR="thoughts/shared/pm/reports"
mkdir -p "$REPORT_DIR"
REPORT_FILE="$REPORT_DIR/$(date +%Y-%m-%d)-backlog-grooming.md"
# Write formatted report to file
cat > "$REPORT_FILE" << EOF
# Backlog Grooming Report - $(date +%Y-%m-%d)
[... formatted report content ...]
EOF
echo "✅ Report saved: $REPORT_FILE"
# Update workflow context
if [[ -f "${SCRIPT_DIR}/workflow-context.sh" ]]; then
"${SCRIPT_DIR}/workflow-context.sh" add reports "$REPORT_FILE" null
fi
testing
Phase-agent that fixes a failing verify verdict so the pipeline self-heals instead of stalling to needs-human (CTL-653). Reads `${ORCH_DIR}/workers/<ticket>/verify.json`, fixes the `findings[]` (every severity:"high" plus the regression_risk drivers) directly via Edit/Write, commits the remediation, and emits `phase.remediate.complete.<ticket>`. The scheduler's router then re-dispatches `verify` to re-check (the verify⇄remediate cycle, cap 3). Dispatched as a `claude --bg` job by `phase-agent-dispatch`, which invokes it via slash command — hence `user-invocable: true`.
tools
--- name: phase-triage description: Phase agent that triages a Linear ticket — expands acronyms, classifies (feature/bug/docs/refactor/chore), identifies genuine blockers (a semantic second-pass over the backlog — NOT a prose scrape; CTL-838), estimates scope, writes triage.json, and posts a triage analysis comment to Linear. Triage completion is signaled by that comment plus the local triage.json — there is no `triaged` label. Emits phase.triage.complete.<TICKET> on success and phase.triage.fai
tools
Phase agent for the research step of the 9-phase orchestrator pipeline (CTL-450). Wraps /catalyst-dev:research-codebase and produces thoughts/shared/research/<date>-<ticket>.md, then emits phase.research.complete.<ticket>. Reads triage.json from the worker dir as its prior-phase artifact. Spawned via plugins/dev/scripts/phase-agent-dispatch, which invokes it via slash command — hence `user-invocable: true`.
development
Phase-agent wrapper that opens the pull request after implementation completes (CTL-449 Initiative 1 Phase 3). Delegates to `/catalyst-dev:create-pr` (which already auto-runs `describe-pr` and transitions Linear to `inReview`), then writes the PR number + URL into the phase signal file so the downstream `phase-monitor-merge` agent can read it without re-querying GitHub. Dispatched as a `claude --bg` job by `phase-agent-dispatch`, which invokes it via slash command — hence `user-invocable: true`.