본문으로 건너뛰기
cccskills
무료GitHub에 공개

cross-machine-coordination

Plan task handoffs between agents on different machines using Git to share YAML task and result files. This implementation specification describes validation, execution limits, result reporting, and GitHub Issues as an additional route for urgent requests.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Enables squad agents on different machines to share work via git-based task queuing

연동 도구GitHubAzure
설치 방법 보기

이럴 때 유용합니다

  • Designing GPU task handoffs from a laptop to a DevBox
  • Standardizing task and result files across machines
  • Designing urgent requests through labeled GitHub Issues
  • Planning timeout handling and retries for remote tasks

포함된 파일(1)

  • SKILL.md10.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Skill: Cross-Machine Coordination Pattern

Skill ID: cross-machine-coordination
Owner: Ralph (Work Monitor)
Squad Integration: All agents
Status: Specification (ready for implementation)


Overview

Enables squad agents running on different machines (laptop, DevBox, Azure VM) to securely share work, coordinate execution, and pass results without manual intervention.

Pattern: Git-based task queuing + GitHub Issues supplement


Usage

For Task Sources (Orchestrating Machine)

To assign work to DevBox:

# Create task file
cat > .squad/cross-machine/tasks/2026-03-14T1530Z-laptop-gpu-voice-clone.yaml << 'EOF'
id: gpu-voice-clone-001
source_machine: laptop-machine
target_machine: devbox
priority: high
created_at: 2026-03-14T15:30:00Z
task_type: gpu_workload
payload:
  command: "python scripts/voice-clone.py --input voice.wav --output cloned.wav"
  expected_duration_min: 15
  resources:
    gpu: true
    memory_gb: 8
status: pending
EOF

# Commit & push
git add .squad/cross-machine/tasks/
git commit -m "Cross-machine task: GPU voice cloning [squad:machine-devbox]"
git push origin main

Ralph on DevBox will:

  1. Pull the task on next cycle (5-10 min)
  2. Validate schema & command whitelist
  3. Execute the GPU workload
  4. Write result to .squad/cross-machine/results/gpu-voice-clone-001.yaml
  5. Commit & push the result

For Task Executors (DevBox, Azure VMs)

Ralph automatically watches .squad/cross-machine/tasks/ for work targeted at this machine.

On each cycle (5-10 min):

# Pseudo-code (Ralph implementation)
1. git pull origin main
2. Load all .yaml files in .squad/cross-machine/tasks/
3. Filter for status=pending AND target_machine=HOSTNAME
4. For each task:
   a. Validate schema (must have: id, source_machine, target_machine, payload)
   b. Validate command against whitelist
   c. Execute task (with timeout)
   d. Write result to .squad/cross-machine/results/{id}.yaml
   e. Commit & push result

For Urgent/Ad-Hoc Tasks

Use GitHub Issues with squad:machine-{name} label:

# Create issue
gh issue create \
  --title "GPU: Clone voice profile from sample.wav" \
  --body "Execute voice cloning on DevBox. Input: /path/to/voice-input.wav" \
  --label "squad:machine-devbox" \
  --label "urgent"

Ralph on DevBox will:

  1. Detect issue with squad:machine-devbox label
  2. Parse task from issue body
  3. Execute task
  4. Comment with result
  5. Close issue

File Formats

Task File (YAML)

Location: .squad/cross-machine/tasks/{timestamp}-{machine}-{task-id}.yaml

Required Fields:

id: {task-id}                      # Unique identifier (alphanumeric + dash)
source_machine: {hostname}         # Where task was created
target_machine: {hostname}         # Where task will execute
priority: high|normal|low          # Execution priority
created_at: 2026-03-14T15:30:00Z   # ISO 8601 timestamp
task_type: gpu_workload|script|... # Category
payload:
  command: "..."                   # Shell command to execute
  expected_duration_min: 15        # Timeout (minutes)
  resources:
    gpu: true|false
    memory_gb: 8
    cpu_cores: 4
status: pending|executing|completed|failed

Optional Fields:

description: "Human-readable task description"
timeout_override_min: 120          # Override default timeout
retry_count: 3                     # Retry failed tasks

Result File (YAML)

Location: .squad/cross-machine/results/{task-id}.yaml

id: {task-id}                          # Links back to task
target_machine: devbox                 # Executed on
completed_at: 2026-03-14T15:45:00Z    # When it finished
status: completed|failed|timeout       # Outcome
exit_code: 0                           # Shell exit code
stdout: "..."                          # Captured output
stderr: "..."                          # Captured errors
duration_seconds: 900                  # How long it took
artifacts:
  - path: "/path/to/artifacts/..."   # Location of results
    type: audio|text|model|...
    size_mb: 2.5

Security Model

Validation Pipeline

All tasks go through:

  1. Schema Validation

    • YAML structure matches spec
    • Required fields present
    • No unexpected fields (reject)
  2. Command Whitelist

    • Only approved commands allowed
    • Path validation (no ../../ escapes)
    • Environment variable sanitization
    • No inline shell operators (&&, |, >)
  3. Resource Limits

    • Timeout enforced (default: 60 min)
    • Memory cap: 16GB (adjustable)
    • CPU threads: 4 (adjustable)
    • Disk write: 100GB (adjustable)
  4. Execution Isolation

    • Runs as unprivileged user
    • Temp directory cleaned after execution
    • Network access: read-only (no outbound writes)
  5. Audit Trail

    • All executions logged to git
    • Commit signed with Ralph's key
    • Result stored immutably

Threat Mitigations

ThreatMitigation
Malicious task injectionBranch protection + PR review before merge
Credential leakagePre-commit secret scan + environment scrubbing
Resource exhaustionTimeout + memory limits
Code injectionCommand whitelist + no shell evaluation
Result tamperingGit commit history is immutable

Configuration

Ralph reads config from .squad/config.json:

{
  "cross_machine": {
    "enabled": true,
    "poll_interval_seconds": 300,
    "this_machine": "devbox",
    "max_concurrent_tasks": 2,
    "task_timeout_minutes": 60,
    "command_whitelist": [
      "python scripts/voice-clone.py",
      "python scripts/data-process.py",
      "bash scripts/cleanup.sh"
    ],
    "result_ttl_days": 30
  }
}

Examples

Example 1: GPU Voice Cloning (Laptop → DevBox)

1. Laptop creates task:

# .squad/cross-machine/tasks/2026-03-14T1530Z-laptop-gpu-001.yaml
id: gpu-voice-clone-001
source_machine: laptop-machine
target_machine: devbox
priority: high
created_at: 2026-03-14T15:30:00Z
task_type: gpu_workload
payload:
  command: "python scripts/voice-clone.py --input voice.wav --output cloned.wav"
  expected_duration_min: 15
  resources:
    gpu: true
    memory_gb: 8
status: pending

2. Laptop commits & pushes:

git add .squad/cross-machine/tasks/
git commit -m "Task: GPU voice cloning [squad:machine-devbox]"
git push origin main

3. DevBox Ralph (5 min later):

[Ralph Watch Cycle]
- Pulled origin/main
- Detected: gpu-voice-clone-001 (status: pending, target: devbox)
- Validation: ✅ Schema OK, command whitelisted
- Executing: python scripts/voice-clone.py ...
- [15 minutes of processing]
- Completed: exit code 0
- Writing result...
- Committing & pushing...

4. Laptop Ralph (next cycle) sees result:

# .squad/cross-machine/results/gpu-voice-clone-001.yaml
id: gpu-voice-clone-001
target_machine: devbox
completed_at: 2026-03-14T15:45:00Z
status: completed
exit_code: 0
stdout: "Voice cloning completed. Output written to /tmp/cloned.wav"
stderr: ""
duration_seconds: 900
artifacts:
  - path: "/path/to/artifacts/voice-clone-001/output.wav"
    type: audio
    size_mb: 2.5

Example 2: Urgent Debug Request (Human → DevBox via Issue)

Create issue:

gh issue create \
  --title "DevBox: Debug voice model failure" \
  --body "Error: Model failed to load on last run. Please check /tmp/model.log and report findings." \
  --label "squad:machine-devbox" \
  --label "urgent"

DevBox Ralph detects → executes → comments:

✅ Executed on devbox at 2026-03-14 15:47:00
Command: python scripts/debug-model.py

Result:
------
Model file: /tmp/model-v2.bin (OK)
Checksum: a1b2c3d4e5f6 (matches expected)
Memory available: 12 GB (sufficient)

ERROR FOUND: Config file permission issue
  - File: ~/.config/voice/model.yaml
  - Permissions: -rw------- (owner-only)
  - Expected: -rw-r--r-- (world-readable for service)

FIX: Run: chmod 644 ~/.config/voice/model.yaml

Error Handling

Task Execution Failures

If a task fails (exit code != 0):

  1. Result written with status: failed + exit code
  2. stderr captured in result
  3. Committed to git for audit
  4. Source machine can retry by re-pushing task with status: pending

Stalled Tasks

If a task doesn't complete within timeout:

  1. Process killed
  2. Result written with status: timeout
  3. stderr: "Execution exceeded X minutes"
  4. Source can investigate or retry

Network Failures

If git push/pull fails:

  • Ralph retries on next cycle
  • Tasks queue locally until connectivity restored
  • No tasks lost (stored in local repo)

Monitoring & Debugging

Check Task Queue

ls -la .squad/cross-machine/tasks/
cat .squad/cross-machine/tasks/*.yaml | grep -E "^(id|status|target_machine):"

Check Results

ls -la .squad/cross-machine/results/
cat .squad/cross-machine/results/{task-id}.yaml

View Execution History

git log --oneline .squad/cross-machine/ | head -20

Monitor Ralph Cycles

tail -f .squad/log/ralph-watch.log | grep "cross-machine"

Integration with Ralph Watch

Ralph automatically includes this pattern in its watch loop:

Ralph Watch Cycle (every 5-10 min):
1. Fetch GitHub issues with squad:machine-* labels
2. Poll .squad/cross-machine/tasks/
3. For each matching task:
   - Validate
   - Execute
   - Write result
   - Commit & push
4. Update status in issue (if applicable)
5. Sleep until next cycle

No manual Ralph configuration needed — just create task files or issues with the right labels.


Migration from Manual Handoff

Before (today):

  • Laptop → user manually copies file to Teams chat
  • user pastes into target terminal
  • user copies output back
  • user pastes result manually

After (with this pattern):

  • Laptop Ralph writes task file → git push
  • DevBox Ralph auto-executes → git push result
  • Laptop Ralph auto-reads result
  • 0 human intervention needed

Future Enhancements

Potential expansions (Phase 2+):

  1. Task Priorities: Execution order based on priority field
  2. Serial Pipelines: Machine A → B → C task chains
  3. GPU Availability Polling: Query DevBox before submitting work
  4. Cost Tracking: Log resource usage per task
  5. Notification Webhooks: Alert on task completion
  6. Web Dashboard: Real-time task status visualization

Questions?

Refer to research report: research/active/cross-machine-agents/README.md

Contact: Seven (Research & Docs) or Ralph (Work Monitor)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Coordinate work across AI agents with shared rules for locating team files, recording decisions and their reasons, and requesting help. It also defines who owns revisions after a reviewer rejects an artifact.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Locate team files across separate working directories
  • Record decisions that affect other agents
  • Request input from another specialist
github/gh-aw5.4천2026년 10월 19일 업데이트

Set shared development rules for an agent team: keep specific agent names out of product code, tests, and CI configuration, verify affected tests before finishing, and record lessons learned from mistakes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Share development rules across multiple agents
  • Keep team-specific agent names out of code and tests
  • Check affected tests before declaring work complete
github/gh-aw5.4천2026년 10월 19일 업데이트

Routes requests to design, create, update, debug, or upgrade GitHub Agentic Workflows to the appropriate instructions. It helps the agent select a workflow-specific procedure and apply any additional rules defined for the repository.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Designing a new workflow through questions
  • Investigating failed runs and recurring errors
  • Upgrading workflows and addressing deprecations
github/gh-aw5.4천2026년 10월 19일 업데이트

Prepare architecture proposals before implementation so the team can agree on a direction. Organize evidence, technical choices, effects on existing work, risks, and the first release’s scope into a document with clear recommendations and decision owners.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Proposing a major architecture change
  • Replanning milestones after a foundation change
  • Comparing technical options before seeking approval
github/gh-aw5.4천2026년 10월 19일 업데이트

Update the gh-aw-firewall version used by gh-aw, rebuild generated files, and review release notes and configuration schemas, which define valid settings. It guides related code and test updates while identifying follow-up work that remains.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Updating the firewall version used by gh-aw
  • Reviewing release notes for integration changes
  • Checking configuration schema differences
github/gh-aw5.4천2026년 10월 19일 업데이트

Review git and gh operations in gh-aw workflows to check credential availability for each repository. Identify missing token handoffs, risky expansions of limited checkouts, and error handling needed where credentials are intentionally unavailable.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing git operations after repository checkout
  • Checking tokens for private cross-repository access
  • Reviewing sparse and shallow checkout changes
github/gh-aw5.4천2026년 10월 19일 업데이트

github의 스킬 모두 보기

이 스킬의 문제 신고