Skip to main content

Multi-Agent Serial Pipeline with Cursor + Git Worktree

Practice Log
@ Wing

A complete walkthrough of triggering multiple Sub-agents via a single prompt to form an automated serial pipeline for parallel multi-task development

Tool: Cursor + Git Worktree

Practice Log: Multi-Agent Serial Pipeline with Cursor + Git Worktree

Core stack: Cursor | Git Worktree | Opus 4.6 & Codex-5.3

Core goal: Use a single prompt to trigger multiple sub-agents into an automated serial workflow, enabling parallel development across multiple tasks.

Current proposal: openspec/changes/redesign-skill-card-vertical

Automated Serial Workflow (Agent Pipeline)

  • Note: Do not use a SubAgent for any step that does not explicitly ask for one.

0 TASK 0: Proposal review

  • Model: Gemini-3.1-pro
  • Task: Use the openspec-review-specs skill.
  • Focus: Review proposal completeness, key data flows, and property/interface alignment.

1 TASK 1: Architect review

  • Model: Opus 4.6
  • Task: Review and improve the proposal from an architect's perspective. Use the neversight-skills_feed-system-architect skill.
  • Focus: Examine the system design, look for reuse opportunities, and make sure the solution is robust.

2 TASK 2: Implementation

  • Model: Opus 4.6
  • Task: Run /opsx/apply directly to turn the refined proposal into code.

3 TASK 3: Code review

  • Model: Codex-5.3 (model switch)
  • Task:
    • Run git commit to save the initial implementation.
    • Review the current commit strictly against the proposal.
    • This phase is read-only: do not modify code, so the review remains objective.

4 SubAgent 4: Auto-refinement

  • Model: Opus 4.6 (switch back)
  • Task: Ingest the review report from Agent 3, then update and fix the implementation based on the feedback.

5 SubAgent 5: Archiving

  • Model: Opus 4.6
  • Task:
    • Run /opsx/archive to archive the proposal status.
    • Run the final git commit to close the loop for this feature.

Bottleneck Review and Optimization

The current pipeline is highly automated, but the total runtime is still a bit long.

  • Optimization idea: The current sub-agent responsibilities are too fine-grained. A next step is to reduce granularity by merging highly cohesive tasks, such as combining architect review and implementation into one larger agent step, or combining auto-refinement and archiving. This reduces communication overhead from model switching and context passing, which should improve total execution speed.

Share

Let's Build Together

Follow our socials and join the community for the latest updates

WeChat QR Code

Scan to join WeChat group