Skip to content

feat(watch): declarative skill-based pipelines for watch #919

Closed as not planned

Description

@tamirdresher

Summary

Allow users to define custom watch pipelines as an ordered list of skills in config, instead of writing TypeScript WatchCapabilities. The watch loop reads the pipeline definition and executes each skill as a fresh Copilot session — no drift by design.

Builds on #918 (external WatchCapability loading) as a higher-level abstraction.

Motivation

Users want to enforce workflows like issue > branch > implement > PR > review > merge without writing code. They already know how to write skills (SKILL.md files). If they could declare a pipeline as a list of skill names, the watch loop could execute them in sequence — each step in a fresh LLM session, transitions enforced by TypeScript.

This is the "no-code" version of #918's "low-code" approach. Both coexist.

Proposed Design

Config format

In config.json or squad.config.json:

{
  "pipeline": [
    { "skill": "implement-issue", "type": "copilot" },
    { "skill": "open-pr", "type": "code" },
    { "skill": "review-pr", "type": "copilot", "context": "different" },
    { "skill": "check-approval", "type": "code" },
    { "skill": "merge-if-approved", "type": "code" }
  ]
}

Step types

Type What happens Drift risk
copilot Spawn a fresh copilot session with the skill's SKILL.md as prompt context None — fresh session
code Run a deterministic code function (gh CLI commands, git ops, API checks) Zero — no LLM

Skill resolution

Each skill name resolves to .copilot/skills/{name}/SKILL.md (standard path per #430). The SKILL.md content becomes the prompt for the copilot session.

Separation of concerns

  • context: "different" means the review step gets a different prompt context than the implementation step — the reviewer doesn't see the implementer's conversation
  • Transitions between steps are TypeScript (check PR state, check approval status) — not LLM decisions
  • The pipeline runner is itself a WatchCapability (pipeline-runner), so it plugs into the existing phase system

How it differs from #918

#918 (WatchCapability) This (skill pipeline)
Write TypeScript Write markdown skills + JSON config
Full control over phase, preflight, execute Declare step order, runner handles execution
For complex capabilities (monitoring, cleanup) For workflow pipelines (issue > PR > merge)

Example user experience

  1. Write .copilot/skills/implement-issue/SKILL.md — instructions for implementing an issue
  2. Write .copilot/skills/review-pr/SKILL.md — instructions for reviewing a PR (different persona)
  3. Add "pipeline": [...] to config
  4. Run squad watch --pipeline — issues flow through the pipeline automatically

Not in scope

  • Visual pipeline editor
  • Conditional branching (if/else in pipeline) — keep it linear for v1
  • Parallel pipeline steps — sequential only for v1

Context

Follow-up to the conversation in #918. The insight: users already write skills. Let them compose skills into pipelines declaratively, and let the watch loop handle the execution mechanics.

cc @jbenami — this is the declarative version of what you described. Pipeline steps are skills (markdown), transitions are code (TypeScript). No drift because each step is a fresh copilot session.

Activity

  1. bradygaster commented on Nov 5, 2026

    @bradygaster
    Collaborator

    Closing during 2.0 board triage (owner decision). The idea is evaluated, with prior art and an opinion, in the roll-up issue #2390. Original text remains here for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvementtriagedIssue has been triagedwave:3-laterWave 3 — backlog, future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions