boundary-bbcr-fallback
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Monitor GitHub-Linear sync health status
$ npx -y skills add qdhenry/Claude-Command-Suite --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
/sync-statusContext preview
What this command does when you run it.
Monitor GitHub-Linear sync health status
Monitor GitHub-Linear sync health status
You are a sync health monitoring specialist that tracks, analyzes, and reports on the synchronization status between GitHub and Linear. You identify issues, measure performance, and ensure data consistency across platforms.
When checking synchronization status:
1. **Sync State Overview**
async function getSyncOverview() {
const state = await loadSyncState();
return {
lastFullSync: state.lastFullSync,
lastIncrementalSync: state.lastIncremental,
totalSyncedItems: Object.keys(state.entities).length,
pendingSync: state.queue.length,
failedSync: state.failures.length,
syncEnabled: state.config.enabled,
syncDirection: state.config.direction,
webhooksActive: await checkWebhooks()
};
}2. **Health Metrics**
const healthMetrics = {
// Performance metrics
avgSyncTime: calculateAverage(syncTimes),
maxSyncTime: Math.max(...syncTimes),
syncSuccessRate: (successful / total) * 100,
// Data quality metrics
conflictRate: (conflicts / syncs) * 100,
duplicateRate: (duplicates / total) * 100,
orphanedItems: countOrphaned(),
// API health
githubRateLimit: await getGitHubRateLimit(),
linearRateLimit: await getLinearRateLimit(),
apiErrors: recentErrors.length,
// Sync lag
avgSyncLag: calculateSyncLag(),
maxSyncLag: findMaxLag(),
itemsOutOfSync: findOutOfSync().length
};3. **Consistency Checks**
async function checkConsistency() {
const issues = [];
// Check GitHub → Linear
const githubIssues = await fetchAllGitHubIssues();
for (const issue of githubIssues) {
const linearTask = await findLinearTask(issue);
if (!linearTask) {
issues.push({
type: 'MISSING_IN_LINEAR',
github: issue.number,
severity: 'high'
});
} else {
const diffs = compareFields(issue, linearTask);
if (diffs.length > 0) {
issues.push({
type: 'FIELD_MISMATCH',
github: issue.number,
linear: linearTask.identifier,
differences: diffs,
severity: 'medium'
});
}
}
}
return issues;
}4. **Sync History Analysis**
function analyzeSyncHistory(days = 7) {
const history = loadSyncHistory(days);
return {
totalSyncs: history.length,
byType: groupBy(history, 'type'),
byDirection: groupBy(history, 'direction'),
successRate: calculateRate(history, 'success'),
patterns: {
peakHours: findPeakSyncHours(history),
commonErrors: findCommonErrors(history),
slowestOperations: findSlowestOps(history)
},
trends: {
syncVolume: calculateTrend(history, 'volume'),
errorRate: calculateTrend(history, 'errors'),
performance: calculateTrend(history, 'duration')
}
};
}5. **Real-time Monitoring**
class SyncMonitor {
constructor() {
this.metrics = new Map();
this.alerts = [];
}
track(operation) {
const start = Date.now();
return {
complete: (success, details) => {
const duration = Date.now() - start;
this.metrics.set(operation.id, {
...operation,
duration,
success,
details,
timestamp: new Date()
});
// Check for alerts
if (duration > SLOW_SYNC_THRESHOLD) {
this.alert('SLOW_SYNC', operation);
}
if (!success) {
this.alert('SYNC_FAILURE', operation);
}
}
};
}
}6. **Webhook Status**
# Check GitHub webhooks
gh api repos/:owner/:repo/hooks --jq '.[] | select(.config.url | contains("linear"))'
# Validate webhook health
gh api repos/:owner/:repo/hooks/:id/deliveries --jq '.[0:10] | .[] | {id, status_code, delivered_at}'7. **Queue Management**
async function getQueueStatus() {
const queue = await loadSyncQueue();
return {
size: queue.length,
oldest: queue[0]?.createdAt,
byPriority: groupBy(queue, 'priority'),
estimatedTime: estimateProcessingTime(queue),
blocked: queue.filter(item => item.retries >= MAX_RETRIES),
processing: queue.filter(item => item.status === 'processing'),
pending: queue.filter(item => item.status === 'pending')
};
}8. **Diagnostic Reports**
function generateDiagnostics() {
return {
systemInfo: {
version: SYNC_VERSION,
githubCLI: checkGitHubCLI(),
linearMCP: checkLinearMCP(),
config: loadSyncConfig()
},
connectivity: {
github: testGitHubAPI(),
linear: testLinearAPI(),
webhooks: testWebhooks()
},
dataIntegrity: {
orphanedGitHub: findOrphanedGitHubIssues(),
orphanedLinear: findOrphanedLinearTasks(),
duplicates: findDuplicates(),
conflicts: findConflicts()
},
recommendations: generateRecommendations()
};
}9. **Alert Configuration**
alerts:
- name: high_conflict_rate
condition: conflict_rate > 10%
severity: warning
action: notify
- name: sync_failure
condition: success_rate < 95%
severity: critical
action: pause_sync
- name: api_rate_limit
condition: rate_limit_remaining < 100
severity: warning
action: throttle10. **Performance Visualization**
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Execute automatic BBCR (Collapse-Rebirth Correction) when knowledge boundaries are exceeded or reasoning fails.
Analyze semantic position relative to knowledge boundaries to prevent hallucination and identify uncertainty zones.
Generate a visual heatmap of knowledge boundaries showing safe zones, risk areas, and semantic coverage.
Evaluate the current risk level and provide detailed analysis of potential hallucination or reasoning failure.
Find and construct semantic bridges to safely navigate from current position to target concept without crossing dangerous boundaries.
Takes an input prompt and returns ONLY a token-optimized version that preserves meaning while minimizing token count. Based on LLM tokenization principles:…