Execution

From masharratt/claude-flow-novice · View interactive version

Execution is an AI agent skill from the GitHub repository masharratt/claude-flow-novice. **Pattern:** Coordinator-Cached Test Execution

How to use this skill

Skill file

Test Execution Skill

Pattern: Coordinator-Cached Test Execution

Status: OPERATIONAL - Specialized for multi-agent concurrent testing

When to Use This Skill

USE when:

DO NOT USE when:

Problem Statement

Concurrent test execution causes conflicts, resource contention, and flaky results. Multiple agents running tests simultaneously creates:

Solution: Coordinator Pattern

Single Test Execution: One coordinator agent runs all tests once

Cached Results: Results stored in Redis + JSON file

Worker Reads: All other agents read cached results (never execute tests)

Implementation

Scripts Available

  1. test-coordinator-pattern.sh - Coordinator runs tests, caches to Redis
  2. test-cache-reader.sh - Workers read cached results
  3. test-concurrent-conflicts.sh - Validates coordinator pattern (20 runs)

Usage

Coordinator Agent (runs tests):

# Run tests once and cache results
./.claude/skills/test-execution/test-coordinator-pattern.sh swarm-123

Worker Agents (read cache):

# Read cached test results (waits for coordinator)
./.claude/skills/test-execution/test-cache-reader.sh swarm-123 worker-1

Validate Pattern:

# Test concurrent execution (20 cycles)
./.claude/skills/test-execution/test-concurrent-conflicts.sh

Workflow

1. Coordinator detects "run tests" signal
2. Coordinator terminates existing test processes
3. Coordinator runs: npm test -- --run --reporter=json
4. Results cached to:
   - Redis: swarm:${SWARM_ID}:tests:metadata
   - File: test-results.json
5. Workers wait for completion signal (max 5min timeout)
6. Workers read cached results
7. All agents use same test results (no conflicts)

Performance Metrics

Integration with Other Skills

Current Project Status

Active Tests: None in /src (legacy tests in /packages)

Jest Configuration: Installed (29.7.0) but not actively used

Recommendation: Skill is operational but currently unnecessary. Use npm test directly for development.

Future Use Cases

When multi-agent swarms become active and need concurrent testing:

  1. Designate one agent as test coordinator
  2. Coordinator uses test-coordinator-pattern.sh
  3. Workers use test-cache-reader.sh
  4. Validate with test-concurrent-conflicts.sh
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.