Orchestrate

From tetherto/qvac · View interactive version

Orchestrate is an AI agent skill from the GitHub repository tetherto/qvac. Run the full implement → test → CI → review → PR pipeline for a task. Coordinates implementer, test-writer, ci-validator, and code-reviewer agents.

How to use this skill

Skill file

Orchestrate: Full Task Pipeline

Run the complete agent pipeline for a task: branch setup, implement, test, CI validate, review, push, and create PR.

Usage

/orchestrate <task-description-or-local-file>

Accept a task description in chat or a path to a local requirements file. Include the title, acceptance criteria, file scope, and ticket reference if known.

Pipeline

Phase 0: Setup

  1. Read the task requirements supplied in chat or a local file.
  2. Identify the title, acceptance criteria, file scope, and ticket reference.
  1. Create a feature branch from main:
  1. Inform the user of the setup:

```

Task: <task-title>

Branch: <branch-name>

```

Phase 0.5: Plan

Before any implementation, create a plan for the user to approve:

  1. Read the relevant source files mentioned in the task description or likely affected by the changes
  2. Draft an implementation plan that includes:
  1. Present the plan to the user and wait for approval

Phase 1: Implement

Launch the implementer agent with the supplied requirements and the approved plan.

Implement the supplied task requirements. Follow this approved plan:

<paste the approved plan here>

Write code within scope of the plan, verify build/tests pass, and commit working changes.

Wait for completion. If the implementer reports failure (e.g., ambiguous requirements, build failures after 3 retries), stop the pipeline and report to the user.

Phase 1.5: Determine test and CI requirements

After implementation, analyze the changed files and the supplied requirements to decide what's needed next.

Run git diff --name-only main...HEAD and apply these rules:

  1. Native addon packages — if changed files match a package in the CI Package Mapping table in .agent/knowledge/ci-validation.md, CI is needed. Use the short name from that table. If multiple addon packages changed, run CI for each.
  1. SDK / TS packages (packages/sdk/**, packages/rag/**, packages/cli/**): SDK CI runs automatically via sdk-checks.yml on PR creation. No manual trigger needed.
  1. Everything else (simple libraries, docs, workflows, config, markdown) — no CI needed.

If CI is needed, inform the user which packages will be validated and why.

Determine if new tests are needed by checking:

| Signal | Tests needed? |

|---|---|

| New public API / exported functions added | Yes |

| New feature with user-facing behavior | Yes |

| Bug fix (regression test) | Yes |

| Supplied task acceptance criteria mention testable behavior | Yes |

| Refactoring with no behavior change | No |

| Documentation / config / CI workflow only | No |

| Changes already have corresponding test updates from implementer | No — skip |

Read the supplied task acceptance criteria. If they describe specific behaviors or scenarios, those should become tests.

Phase 1.75: Write Tests

If Phase 1.5 determined tests are needed, launch the test-writer agent:

Write automated tests for the changes on the current branch. Task requirements: <supplied requirements>. Focus on new public APIs, new behavior, and edge cases. Match existing test patterns.

Wait for completion. If the test-writer discovers code bugs, launch the implementer again with the bug details before proceeding.

If tests are not needed, skip to Phase 2.

Phase 2: CI Validation

If Phase 1.5 determined CI is needed:

  1. Push the current branch: git push -u origin HEAD
  2. Launch the ci-validator agent for each affected package
  3. If CI fails with code errors: go back to Phase 1 — launch implementer again with the error details
  4. If CI fails with infra errors: let ci-validator handle retries
  5. Maximum 2 implement→CI loops before stopping

If CI is not needed, skip to Phase 3.

Phase 3: Review

Launch the code-reviewer agent:

Review all changes on the current branch against main. Task requirements: <supplied requirements>. Check requirements match, bugs, conventions, security, scope, and test coverage. Fix issues directly and commit fixes.

Wait for completion. Collect the review summary.

Phase 4: Re-validate (if reviewer made fixes)

If the reviewer committed any fixes AND Phase 1.5 determined CI was needed:

  1. Re-run CI validation for the affected packages
  2. If CI passes, proceed to reporting

If no CI needed or no reviewer fixes, proceed to reporting.

Phase 5: Push and Create PR

  1. Push the branch to origin:

```bash

git push -u origin HEAD

```

  1. Determine PR type from the changed files:
  1. Create the PR using gh pr create:

```bash

gh pr create --base main --title "QVAC-123 feat: add RAG support" --body "..."

```

  1. Report the PR URL in chat.

Phase 6: Report

Produce a final summary:

Pipeline complete for task <task-title>:

Branch: <branch-name>
PR: <pr-url>

Implementation:
  - [summary from implementer]
  - Files changed: [list]

Tests:
  - [added/skipped, with reason]
  - Tests added: [count and brief descriptions]
  - Code bugs found by tests: [count or none]

CI Validation:
  - [pass/fail/skipped]
  - Packages tested: [list or "n/a — no native addon changes"]
  - Platforms: [list]

Review:
  - Issues found and fixed: [count]
  - Issues flagged but not fixed: [count, with details]

Status: [ready for human review / needs attention]

Present the final summary and completion status in chat.

Error handling

Important notes

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.