parallel-phases
Execute phased plans with multiple independent tasks per phase by fanning out one agent per task, reconciling outcomes per wave, gating between phases with verify commands, and emitting a phase × outcome report. Triggers include "execute this plan", "work through these phases", "swarm over this backlog", "parallelize this plan".
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- parallel-phases
- triggers
- [ "execute this plan", "work through these phases", "swarm over this backlog", "parallelize this plan", "fan out per task" ]
- description
- Execute phased plans with multiple independent tasks per phase by fanning out one agent per task, reconciling outcomes per wave, gating between phases with verify commands, and emitting a phase × outcome report. Triggers include "execute this plan", "work through these phases", "swarm over this backlog", "parallelize this plan".
02 资源文件 2
- 参考文档manifest.json835 B
- 参考文档SKILL.meta.json143 B
03 SKILL.md 正文
Parallel Phases
What It Does
Composite skill that executes a multi-phase plan with ≥3 total tasks or ≥2 per-phase tasks by dispatching one agent per task per wave, reconciling outcomes after each wave, enforcing phase gates (type-check, test, build), and emitting a final phase × task × result report.
Replaces: sequential walk-throughs of markdown plans, manual parallel-investigate + write loops, hand-rolled reconciliation tables.
When to Use
- Plans with ≥3 independent tasks total OR ≥2 tasks in a single phase
- Tasks involve write-work (code edits, issue closure, releases, PR merges) — not read-only investigation
- You want to avoid sequential execution bottleneck + manual outcome tracking
- Source:
.claude/plans/*.md(markdown with phases + tasks), GitHub issues (via--from-issues "<query>"), or inline prompt with structured tasks
When NOT to Use
- Pure read-only investigation → use
parallel-investigate - Single task per phase → use sequential workflow or
loop - Task dependencies are complex, tightly coupled, or unknown → use
orchestratefor routing
Core Patterns
Wave-based fan-out & reconciliation:
- Phase 0 — RAG pre-flight: query knowledge graph for cached similar runs (skip if fresh run confirmed)
- Phase 1 — Ingest: parse plan source into structured
phases[]with task metadata (id, scope, dependencies, specialist, model tier) - Phase 2 — DAG analysis: assign tasks to waves using Kahn's algorithm; conflict-guard demotes tasks overlapping file scope to later waves
- Phase 2.5 — Critic gate: adversarial read-only review of wave assignments for deadlocks, missed file overlaps, underestimated scope
- Phase 3 — Pre-snapshot: capture repo state baseline (SHA, branch, issue/PR counts, release tags)
- Phase 4 — Per-phase execution: for each wave, dispatch ALL agents concurrently, reconcile per-wave (status map), run phase gate (typecheck/test/build), advance or stop
- Phase 5 — Post-snapshot: capture end state, compute deltas
- Phase 6 — Reconciliation: emit phase × task × result table, state changes, deferred/blocked tasks, gate pass rate, handoff
Per-wave reconciliation status:
DONE→ advanceDONE_WITH_CONCERNS→ advance unless correctness concernsNEEDS_CONTEXT→ re-dispatch ONCE with context; if repeats, markBLOCKEDBLOCKED→ stop phase, write handoff
Conflict resolution: If two agents in same wave touch same file, keep smaller-task-id change; demote other to fix-wave at phase end.
Rules
- Do NOT fan out write-agents over the same file/branch in one wave without
--worktrees(use conflict-guard + worktrees to isolate) - Do NOT skip per-wave reconciliation — all agents must return before next wave dispatches
- Do NOT advance past a failed phase gate (red typecheck/test/build halts the phase)
- Do NOT inherit parent chat history into sub-agent prompts (context isolation enforced)
- Phase gates auto-detect:
package.json→ npm run typecheck && npm test;Cargo.toml→ cargo check && cargo test;pyproject.toml+ pytest → pytest -q
Related Skills
parallel-investigate— read-only fan-out (use when no writes)orchestrate— meta-router; chains to this skill when ≥3 independent tasksloop— sequential when tasks share statethree-man-team— single feature (architect/builder/reviewer)subagent-driven-development— sequential same-session executionrepo-state-snapshot— integrated into phases 3 & 5verify-before-done— optional stricter post-phase gate
04 同仓库更多 Skills
token-audit
Audit historical Claude Code token usage from JSONL session files — shows total spend, cache hit rates, top costly sessions, weekly trends, and where tokens are going. Run after heavy sessions or weekly to measure optimization impact. Answers how many tokens a session used, how expensive was that session, session cost, and token usage report.
smart-model-route
Auto-classify prompt complexity via Haiku (with heuristic fallback) and inject model routing hints for Agent tool calls. Wired as a UserPromptSubmit hook — fires on every prompt, routes low tasks to Haiku, standard to Sonnet, complex to Sonnet with thorough reasoning, and critical (security/arch/migrations) to Opus. Handles model selection, for example choose model by task complexity.
smart-commands
Decision guide for when to proactively use Claude Code slash commands — /think, /model, /compact, /clear. Use when choosing whether to invoke a command before or during a task, or when a complexity-classifier hook has flagged a task as high or critical. Pairs with the complexity-classifier UserPromptSubmit hook. Answers when to compact, should I switch models, and whether to use extended thinking. Use to pick the right /model command and switch model.
spec-ship
暂无简介
spec-new
Create a committed per-feature spec under `docs/specs/YYYY-MM-DD-<slug>/{spec,tasks}.md` with frontmatter (status, created, owner, pr, tags). Promotes an ephemeral `.claude/plans/<name>.md` into a persistent, searchable artifact. Use when starting a feature that's larger than a one-shot PR.
roadmap-refresh
Regenerate `docs/roadmap.md` for a repo from all specs under `docs/specs/` + their frontmatter (status, tags, pr). Produces Now/Next/Recently-shipped sections. Run after creating / shipping a spec, or at the start of a new session for orientation.