P

Power Bidirectional Invoker

Battle-tested command for enable, comprehensive, bidirectional, github. Includes structured workflows, validation checks, and reusable patterns for sync.

CommandClipticssyncv1.0.0MIT
0 views0 copies

Power Bidirectional Invoker

Synchronize data bidirectionally between platforms like GitHub and Linear with conflict detection, field mapping, and real-time state reconciliation for unified project management.

When to Use This Command

Run this command when...

  • You need to establish two-way synchronization between GitHub issues and Linear tasks so that updates in either platform propagate to the other automatically
  • You want to detect and resolve conflicts when the same item has been modified on both platforms since the last sync
  • Your team uses multiple project management tools and needs a unified view with consistent state across all platforms

Do NOT use this command when...

  • You need one-directional import only -- use the bulk import or issue-to-linear commands for simpler one-way transfers
  • You want to sync file contents or code between repositories -- this command handles project management items, not source code

Quick Start

# .claude/commands/power-bidirectional-invoker.md # Bidirectional sync between platforms Sync: $ARGUMENTS
# Run the command claude "power-bidirectional-invoker sync GitHub issues with Linear tasks for the backend team project"
Expected output:
- Field mapping configuration (title, status, assignee, labels)
- Conflict detection report for divergent items
- Sync execution with created/updated/skipped counts
- Conflict resolution actions applied
- Sync state checkpoint for incremental future syncs

Core Concepts

ConceptDescription
Bidirectional SyncChanges flow in both directions: GitHub to Linear and Linear to GitHub
Field MappingDefines how fields correspond between platforms (status to state, labels to tags)
Conflict DetectionIdentifies items modified on both sides since the last synchronization
Resolution StrategyRules for handling conflicts (latest wins, source priority, or manual review)
Sync CheckpointTimestamp and state snapshot enabling incremental sync on subsequent runs
Bidirectional Sync Flow:

  GitHub Issues          Linear Tasks
       |                      |
  [Read Changes]         [Read Changes]
       |                      |
  [Detect Conflicts]<------->|
       |                      |
  +----+----+                 |
  |         |                 |
 New     Conflict             |
  |      Resolution           |
  |         |                 |
  [Write to Linear]     [Write to GitHub]
       |                      |
  [Save Checkpoint]

Configuration

ParameterDefaultDescription
Source PlatformGitHubPrimary platform for conflict resolution priority
Target PlatformLinearSecondary platform in the sync pair
Conflict StrategyLatest winsHow conflicting changes are resolved
Field MapAuto-detectCustom field correspondence between platforms
Sync IntervalOn-demandManual trigger, scheduled, or webhook-driven sync

Best Practices

  1. Run a dry-run first -- execute with preview mode before committing changes to see what would be created, updated, or deleted on each platform
  2. Define field mappings explicitly -- status values differ between platforms (open/closed vs. todo/in-progress/done). Map these explicitly to avoid mismatches
  3. Set a conflict strategy upfront -- decide whether GitHub or Linear wins conflicts before running. Changing strategies mid-sync creates inconsistencies
  4. Start with a small scope -- sync a single project or label first to validate your mapping configuration before expanding to the full organization
  5. Monitor sync logs -- review the output after each sync to catch mapping errors or unexpected conflict resolutions before they compound

Common Issues

  1. Status values do not map correctly -- GitHub has open/closed while Linear has multiple states. Create an explicit mapping table that handles all intermediate states
  2. Assignee mismatches -- usernames differ between platforms. Provide a user mapping file or specify the mapping in your arguments
  3. Duplicate items created -- this happens when the sync cannot match existing items across platforms. Ensure items have cross-reference IDs or consistent titles for matching
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates