Loading...
Loading...
Use when running the CTO flow-optimization loop — WIP scan, epic focus, triage unlabeled issues, and dispatch.
npx skill4agent add fellowship-dev/dogfooded-skills cto-heartbeatcto/cto-heartbeat org/repo [goal-context]/cto-heartbeat fellowship-dev/booster-pack
/cto-heartbeat fellowship-dev/booster-pack "focus: Vercel deployment pipeline"export GH_TOKEN=$(grep "GH_PAT_FELLOWSHIP" $HOME/projects/fellowship-dev/claude-buddy/.env | cut -d= -f2)
# Or for specific teams, use the team's token_var from crew.ymlgh label createexport REPO=$1
export GOAL_CONTEXT="${@:2}"
export GH_TOKEN=$(grep "GH_PAT_FELLOWSHIP" $HOME/projects/fellowship-dev/claude-buddy/.env | cut -d= -f2)
# Priority labels
gh label create "P0" --repo $REPO --color "b60205" --description "Production broken, revenue impact, security — fix now" 2>/dev/null || true
gh label create "P1" --repo $REPO --color "d93f0b" --description "Important but not urgent — fix this week" 2>/dev/null || true
gh label create "P2" --repo $REPO --color "fbca04" --description "Nice to have — fix when convenient" 2>/dev/null || true
# Status labels
gh label create "dispatched" --repo $REPO --color "5319e7" --description "Work sent to a crew member" 2>/dev/null || true
gh label create "blocked" --repo $REPO --color "c5def5" --description "Waiting on external input or another issue" 2>/dev/null || true# Open PRs across the repo
gh pr list --repo $REPO --state open --json number,title,labels,createdAt,url
# Issues with dispatched label (work in progress)
gh issue list --repo $REPO --label "dispatched" --state open --json number,title,labels,assignees,url
# Issues with blocked label
gh issue list --repo $REPO --label "blocked" --state open --json number,title,labels,url
# Check if any dispatched issues have associated merged PRs (work completed but label not cleaned up)
# For each dispatched issue, check if there is a recently merged PR that references itdispatchedblockeddispatched# Find which epic labels have dispatched issues
gh issue list --repo $REPO --label "dispatched" --state open --json labels --jq ".[].labels[].name" | sort -u# All open issues
gh issue list --repo $REPO --state open --json number,title,labels,body,createdAt --limit 50
# Filter: issues without P0, P1, or P2 labels (done in code/logic, not pure CLI)gh issue edit $ISSUE_NUM --repo $REPO --add-label "P1,epic-name"dispatched# Find undispatched issues in the active epic, sorted by priority
gh issue list --repo $REPO --label "$ACTIVE_EPIC" --state open --json number,title,labels --limit 20
# Filter out issues that already have "dispatched" label
# Pick the highest priority one
# Add dispatched label
gh issue edit $ISSUE_NUM --repo $REPO --add-label "dispatched"dispatchedblocked/build-train org/repo --issues N,M,...REPORT_DIR="$(git rev-parse --show-toplevel)/reports"
REPORT_PATH="$REPORT_DIR/$(date +%Y-%m-%d)-cto-heartbeat-$(echo $REPO | tr "/" "-").md"# CTO Heartbeat: [repo name]
**Date:** YYYY-MM-DD HH:MM
**Repo:** $REPO
**Active epic:** [epic name or "none"]
**Goal context:** $GOAL_CONTEXT (or "N/A")
## WIP Status
| Issue | Title | Status | Epic | Priority |
|-------|-------|--------|------|----------|
| #N | ... | dispatched / blocked / stale | epic-name | P1 |
## Actions Taken
- Closed #N (resolved by PR #M)
- Removed dispatched from #N (stale >3 days)
- Unblocked #N (blocker resolved)
## Triage
| Issue | Title | Priority | Epic |
|-------|-------|----------|------|
| #N | ... | P1 | epic-name |
## Dispatched
- **#N — [title]** (P1, epic: [name]) — dispatched for crew execution
## Blockers
- [blocker description — what is stuck and why]
## Recommendations
1. [highest priority action]
2. [second priority]QUEST_TOKEN=$(grep "^QUEST_TOKEN=" $HOME/projects/fellowship-dev/claude-buddy/.env | cut -d= -f2)
curl -s -X POST "http://127.0.0.1:4242/api/event" \
-H "Authorization: Bearer $QUEST_TOKEN" \
-H "Content-Type: application/json" \
-d "$(python3 -c "
import json
content = open('$REPORT_PATH').read()
print(json.dumps({
'source': 'commander',
'type': 'commander.report',
'title': 'CTO Heartbeat: $REPO',
'meta': {'content': content, 'report_type': 'cto-heartbeat'}
}))
")" 2>/dev/null || true| Verdict | Emoji | Label | Merge? |
|---|---|---|---|
| LGTM | ✅ | | No (heartbeat dispatches issues, not PRs) |
| REWORK | 🔄 | | No |
| BLOCKED | ⏸️ | | No |
| NEW_ISSUE | 📋 | — | Create separate issue |
| STALE | ⏰ | | No |
/cto-reviewcto