From claude-swe-workflows
Orchestrates full project lifecycle: batches tickets, implements via /implement-batch, runs smoke tests, executes quality pipeline (refactor, review-arch/test/doc/release). Autonomous from tickets to release-ready code.
npx claudepluginhub chrisallenlane/claude-swe-workflows --plugin claude-swe-workflowsThis skill uses the workspace's default tool permissions.
Orchestrates an entire project from tickets to release-ready code. Implements batched tickets via `/implement-batch`, runs smoke tests, then executes a comprehensive quality pipeline. Maximizes autonomy — the andon cord is the only planned escalation path.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Orchestrates an entire project from tickets to release-ready code. Implements batched tickets via /implement-batch, runs smoke tests, then executes a comprehensive quality pipeline. Maximizes autonomy — the andon cord is the only planned escalation path.
Autonomy is the default; escalation is the exception. The goal is to complete an entire project — multiple batches of tickets, quality passes, and verification — without user intervention. When stuck, try /think-deliberate first. Only pull the andon cord when autonomous resolution has failed or is clearly futile.
The project branch is the single integration point. All work flows into the project branch. Batches merge into it, quality passes commit to it, and the user makes one decision at the end: merge or don't.
Quality is layered. Each quality pass builds on the previous one. Refactoring cleans the code so review-arch can focus on structure. Arch-review restructures so review-test can assess coverage of the final form. Doc-review documents what actually shipped. Release-review validates the whole.
Fresh eyes catch what familiarity misses. Each quality pass runs its full workflow, including any embedded sub-passes (e.g., /refactor runs its own /review-doc). Redundancy is intentional — each agent sees the project with fresh context and may catch issues that prior passes normalized.
┌──────────────────────────────────────────────────────────────┐
│ PROJECT WORKFLOW │
├──────────────────────────────────────────────────────────────┤
│ 1. Gather tickets and batching strategy │
│ 2. Discuss smoke testing procedures │
│ 3. Plan execution across batches │
│ 4. Create project branch │
│ 5. Per-batch loop: │
│ ├─ 5a. Create batch branch from project branch │
│ ├─ 5b. Run /implement-batch workflow (autonomous mode) │
│ ├─ 5c. Merge batch branch → project branch │
│ ├─ 5d. Post-merge verification │
│ └─ 5e. Clean up and checkpoint │
│ 6. Smoke testing │
│ 7. Quality pipeline: │
│ ├─ 7a. /refactor (MAXIMUM aggression) │
│ ├─ 7b. /review-arch (autonomous mode) │
│ ├─ 7c. /refactor again (conditional) │
│ ├─ 7d. /review-test │
│ ├─ 7e. /review-doc │
│ └─ 7f. /review-release │
│ 8. Final report │
└──────────────────────────────────────────────────────────────┘
Beyond the mainline workflow, the orchestrator has access to additional workflows:
/think-deliberate: Adversarial deliberation for difficult autonomous decisions. Spawns advocates to argue options before rendering a verdict. Prefer this over gut-feel decisions when stakes are high or trade-offs are unclear./bug-fix: Coordinated bug-fixing for challenging issues encountered during any phase. Handles diagnosis, reproduction, and targeted fixes.This protocol applies throughout the entire workflow. The andon cord is the escape valve for problems that cannot be resolved autonomously.
Before pulling the andon cord:
/think-deliberate to reason through optionsWhen the andon cord is pulled:
/think-deliberate results)Andon cord triggers:
Ask the user:
batch-1, batch-2; or user specifies explicit grouping)If batching is unclear: Ask. Do not guess at grouping — the user has a reason for the batch structure.
Fetch all tickets using the same tracker detection as /implement-batch (GitHub → gh, Gitea → MCP tools, etc.). Gather title, description, acceptance criteria, labels, and dependencies for each.
Ask the user: "What smoke testing should be performed after implementation? This varies by project type."
Offer examples if the user needs prompts:
Record the procedure. It will be used for:
Analyze all tickets across all batches and produce an execution plan.
Per-batch analysis:
Cross-batch analysis:
Present the plan to the user. This is the primary planned user interaction point. Include:
feat/project-<name>, with feat/batch-<name> per batchWait for user approval before proceeding.
main or master)feat/project-<descriptive-name>PROJECT_PROGRESS.md with project metadata and batch planFor each batch in the planned order:
feat/batch-<descriptive-name>/implement-batch Workflow (Autonomous Mode)Invoke the /implement-batch workflow with these autonomous overrides:
/implement-batch Step | Autonomous Override |
|---|---|
| Step 1 (receive tickets) | Pre-loaded — pass the batch's ticket list directly |
| Step 2 (detect tracker & fetch) | Normal operation |
| Step 3 (batch planning) | Orchestrator approves the plan autonomously. Review the proposed execution order. Use /think-deliberate if the ordering is unclear or if there are concerning dependency patterns. Only pull the andon cord if tickets are fundamentally incoherent. |
| Step 4 (create project branch) | Skip — already on the batch branch. The batch branch serves as /implement-batch's "project branch." Topic branches are created from it. |
| Steps 5a-5e (per-ticket loop) | Normal operation. Topic branches are created from the batch branch. Andon cord triggers cascade up to the project orchestrator. |
| Step 6 (quality passes) | Normal operation. Let /implement-batch run its own refactor + review-doc. |
| Step 7 (final review) | Orchestrator reviews autonomously. Log the summary to PROJECT_PROGRESS.md. Do not wait for user input. |
git merge --no-ff feat/batch-<name>--no-ff preserves batch branch history for claritygit branch -d feat/batch-<name>PROJECT_PROGRESS.md: mark batch as complete, record summaryExecute the smoke testing procedure established in step 2.
On issues found:
/bug-fix workflow/think-deliberate first, then andon cord if unresolvableUpdate PROJECT_PROGRESS.md with smoke test results and any fixes applied.
Run each quality pass sequentially. The orchestrator may use judgment to skip passes for trivial projects (e.g., 2 small tickets with no architectural impact may not need /review-arch). If skipping, note the reason in the final report.
Run the /refactor workflow with:
Run the /review-arch workflow with autonomous overrides:
/review-arch Step | Autonomous Override |
|---|---|
| Step 1 (scope) | Entire codebase |
| Step 2 (QA instructions) | The smoke testing procedure from step 2 |
| Step 3 (analyze) | Normal operation |
| Step 4 (present analysis) | Orchestrator reviews the analysis. Do not present to user. |
| Step 5 (iterate on plan) | Orchestrator decides what to implement. Approve items that are clearly beneficial (dead code removal, obvious naming improvements, clear function ownership fixes). For high-impact items (module dissolution, major restructuring, new module creation), use /think-deliberate to reason through the trade-offs. Defer items that seem out of scope for this project — note them in the final report as recommendations. |
| Step 6 (how to proceed) | Proceed with implementation of approved items |
| Steps 7-9 (implement + summary) | Normal operation |
| Step 10 (review-doc) | Normal operation |
Track whether review-arch made substantive changes — module restructuring, function moves, new modules. Dead code removal and naming fixes do not count. This determines whether step 7c runs.
Only run if review-arch made substantive changes in step 7b.
Run /refactor again with the same parameters as step 7a. Architectural restructuring often introduces code that benefits from tactical cleanup.
Run the /review-test workflow.
The orchestrator handles any interactive steps autonomously, applying the same pattern: implement what's clearly beneficial, /think-deliberate for judgment calls, andon cord as last resort.
Run the /review-doc workflow:
Run the /review-release workflow with autonomous overrides:
For each finding the release review surfaces:
Present comprehensive summary to user:
## Project Complete
### Batches Implemented
- Batch 1 (<name>): N tickets completed
- #12: <title> — <brief outcome>
- #15: <title> — <brief outcome>
- Batch 2 (<name>): N tickets completed
- #18: <title> — <brief outcome>
### Smoke Testing
- Result: PASS / N issues found and fixed
- [Brief description of any fixes applied]
### Quality Pipeline Results
- Refactor (pass 1): N commits, net -XXX lines
- Arch Review: N items implemented, N deferred
- Refactor (pass 2): [ran/skipped] — N commits, net -XXX lines
- Test Review: N tests added, N gaps filled
- Doc Review: N documentation updates
- Release Review: N findings resolved, N deferred
### Deferred Items
[Items the orchestrator chose not to implement, with rationale.
These are recommendations for the user to consider.]
### Statistics
- Total commits: N
- Net lines changed: +/-N
- Tests added/modified: N
- Documentation files updated: N
### Branch Status
- Project branch: feat/project-<name>
- Base branch: <main branch>
- Ready for review and merge
User decides next steps: merge to main, further work, or discard.
Maintain a progress file at the repository root throughout the workflow. This file is gitignored and serves two purposes: human-readable progress tracking and crash recovery context.
Structure:
# Project: <name>
Started: <timestamp>
Branch: feat/project-<name>
Status: <current phase>
## Configuration
- Smoke testing: <procedure summary>
- Batches: <count>
## Batch Progress
### Batch 1: <name> — COMPLETE
- Tickets: #12, #15
- Commits: N
- Summary: <brief>
### Batch 2: <name> — IN PROGRESS
- Tickets: #18, #20
- Current ticket: #20
- Status: implementing
## Quality Pipeline
- [x] Refactor (pass 1)
- [ ] Arch Review
- [ ] Refactor (pass 2)
- [ ] Test Review
- [ ] Doc Review
- [ ] Release Review
## Issues Log
- <timestamp>: <issue description and resolution>
Update at every major transition: batch start/complete, quality pass start/complete, andon cord events, smoke test results.
Sequential execution:
Context management:
PROJECT_PROGRESS.md provides durable state outside the context windowSub-workflow invocation:
/refactor, /review-arch, /review-test, /review-doc, /review-release): invoke as skills/implement-batch: invoke as a skill with autonomous overrides/think-deliberate, /bug-fix: invoke as skills when neededAbort current batch:
Abort quality pass:
/think-deliberateAbort entire workflow:
Do NOT abort for:
/implement-batch)Relationship to /implement-batch:
/implement-project is a higher-level orchestrator that runs /implement-batch for each batch of tickets/implement-batch handles the per-ticket implementation loop via /implement/implement-project adds: multi-batch coordination, smoke testing, comprehensive quality pipelineRelationship to /scope:
/scope creates tickets; /implement-project consumes them/scope to plan → organize tickets into batches → /implement-project to implementRelationship to quality passes:
/implement-project runs each quality pass as a complete workflowHierarchy:
/implement-project
├── /implement-batch (per batch)
│ ├── /implement (per ticket)
│ ├── /refactor (per-batch quality)
│ └── /review-doc (per-batch quality)
├── /refactor (project-level quality)
├── /review-arch (project-level quality)
├── /refactor (conditional second pass)
├── /review-test (project-level quality)
├── /review-doc (project-level quality)
└── /review-release (project-level quality)