The Complete Guide to Claude Code Agent Workflows — How to Ship 600,000 Lines to Production Without Conflicts Using Superpowers + gstack + GSD
"10,000 LOC per week, 600,000 lines in 60 days." These are the real numbers Y Combinator CEO Garry Tan achieved with his workflow (per SitePoint interview, with 35% being test code). What made this possible wasn't the number of tools, but the clear separation of roles — each tool solving a different problem. gstack thinks, GSD stabilizes, and Superpowers executes. This division of roles is the entire point of combining the three frameworks.
Claude Code is an AI coding agent extensible via slash commands and a skills system. When Claude Code's skills system was standardized into a single unified format in early 2026, frameworks like Superpowers, gstack, and GSD — each focused on a specific problem — became central to the official ecosystem. The three tools address problems at different layers. Used together without a strategy, slash commands conflict and the role of each tool becomes ambiguous.
After reading this article, you'll have practical patterns for when and in what order to combine gstack, GSD, and Superpowers to reliably produce production-quality code. The framing introduced at the top — "gstack thinks, GSD stabilizes, Superpowers executes" — is revisited in the closing section alongside the CLAUDE.md declaration pattern.
Core Concepts
The Different Problems Each Framework Solves
All three tools are built on Claude Code, but each targets a completely different layer of the problem.
| Framework | Creator | Core Problem | Approach |
|---|---|---|---|
| Superpowers | Jesse Vincent | Lack of structure in AI coding | 7-stage enforced workflow + TDD |
| gstack | Garry Tan (YC) | Limits of a single cognitive mode | 23-person virtual team / role-based cognitive mode switching |
| GSD | TÂCHES team | Context rot | Spec-driven development + context isolation |
Context Rot: The phenomenon where AI response quality gradually degrades as a conversation grows longer. This is the source of the quality gap between code written in the first hour of a session versus three hours in.
Superpowers — A Pipeline That Internalizes TDD into the AI Cycle
Superpowers is a 7-stage enforced workflow tool listed on the Anthropic Claude Plugin Marketplace. When AI writes implementation code without tests first, it produces "code that looks like it works" — but there's no way to verify regressions during later refactoring. Superpowers solves this through workflow enforcement.
Brainstorm → Spec → Plan → TDD → Subagent Dev → Review → FinalizeThe key to distributed subagent execution lies in its approach: based on tests written during the TDD stage, it explores multiple implementation paths in parallel and selects the implementation that best passes the tests. This isn't simple parallelism — it's a structure where tests serve as the quality criterion.
gstack — A Role System That Operates Claude Code as a 23-Person Virtual Team
gstack works by replacing Claude Code's system prompt with a specialized context suited to a given role via slash commands. Running /security-officer switches to a prompt focused on threat modeling and vulnerability identification; switching to /staff-engineer reviews the same code from the perspective of architectural decisions and technical debt.
/product-manager # Define product scope and priorities
/staff-engineer # Architecture review
/security-officer # Threat modeling
/qa-lead # Real-browser (Playwright) automated QA
/ship # GitHub Actions-integrated deploymentRole-Based Cognitive Mode: Applying different system prompts for different roles against the same codebase. "Does this code work?" and "Is this code secure?" are different questions, and gstack automates that switch with a single command.
GSD — A Spec-Driven System That Prevents Context Rot Through Structure
GSD (Get Shit Done) eliminates context rot at the source by starting each phase as a new, independent session. When /gsd-execute-phase is run, it starts a new session with a fresh context window of up to 200K tokens, with no prior conversation history. Engineers at Amazon, Google, and Shopify are actively adopting it, and GSD v2 supports 12 runtimes beyond Claude Code, including OpenCode, Gemini CLI, Cursor, and Windsurf.
/gsd-new-project # Initialize project and create .planning/
/gsd-discuss-phase 1 # Discuss spec (save context)
/gsd-plan-phase 1 # Create execution plan
/gsd-execute-phase 1 # Implement (run in a new session)Practical Application
The three examples that follow are all based on a single hypothetical SaaS project (a subscription service with payment functionality). The Pre-build → Build → Post-build flow continues step by step.
Example 1: 3-Stage Role-Separation Pipeline (Pre-build to Post-build)
A pattern that applies each framework with a clear stage-by-stage separation. This is the most conflict-free and battle-tested combination.
[Pre-build] gstack → [Build] GSD + Superpowers → [Post-build] gstack| Stage | Framework | Key Commands | Role |
|---|---|---|---|
| Pre-build | gstack | /product-manager, /staff-engineer, /security-officer |
Scope decisions, architecture review, security threat modeling |
| Build | GSD + Superpowers | /gsd-execute-phase, Superpowers TDD pipeline |
Context-isolated implementation + test-first development |
| Post-build | gstack | /qa-lead, /ship |
Real-browser QA, CI/CD deployment |
Declaring these boundaries in CLAUDE.md prevents slash command namespace conflicts.
# CLAUDE.md — Framework Role Boundary Declarations
## gstack
- Scope: Pre-build decision-making, Post-build QA/deployment
- Active commands: /product-manager, /staff-engineer, /security-officer, /qa-lead, /ship
## GSD
- Scope: Build-stage context isolation and state management
- State storage location: .planning/
## Superpowers
- Scope: Build-stage enforced TDD pipeline
- Note: Disable interactive stages during GSD autonomous execution intervalsSlash Command Namespace: A functional unit called via
/command-namein Claude Code. When multiple frameworks use the same name, it becomes ambiguous which framework's command is being invoked. CLAUDE.md serves as the declaration file that resolves this ambiguity.
Example 2: Applying GSD Context Isolation for Payment Module Implementation
In the same SaaS project, after Pre-build design is complete, we enter the Build stage. Here's how to implement the authentication module and payment module in isolated contexts.
# Phase 1: Authentication module implementation
/gsd-discuss-phase 1 # Discuss spec → save to .planning/phase-1-spec.md
/gsd-plan-phase 1 # Decompose tasks → save to .planning/phase-1-plan.json
/gsd-execute-phase 1 # Run in new session (only auth code loaded)
# Phase 2: Payment module implementation (fully isolated context from Phase 1)
/gsd-discuss-phase 2
/gsd-plan-phase 2
/gsd-execute-phase 2 # Start new session — no auth conversation historyAn example of the .planning/phase-1-plan.json structure generated after running /gsd-plan-phase 1:
{
"phase": 1,
"title": "Authentication Module",
"tasks": [
{
"id": "auth-1",
"description": "JWT issuance and validation utilities",
"status": "pending",
"test_first": true
},
{
"id": "auth-2",
"description": "OAuth2 social login integration",
"status": "pending",
"test_first": true
}
],
"context_boundary": "phase-1-spec.md"
}Because each phase runs in an independent session, the long conversation history of the authentication module does not affect the quality of the payment module implementation.
Example 3: Resolving Conflicts Between Superpowers TDD and GSD Autonomous Execution
In the Build stage of the same SaaS project, the most common conflict pattern is Superpowers' interactive Q&A prompts blocking GSD's autonomous execution flow. This can be resolved by adjusting the execution order.
# Recommended order: Complete GSD planning → Run Superpowers TDD → Run GSD execution
# Step 1: Finalize spec and plan with GSD (interactive stages)
/gsd-discuss-phase 2 # Discuss payment module spec
/gsd-plan-phase 2 # Complete task decomposition
# Step 2: Enter Superpowers from the Plan stage
# (Brainstorm/Spec already handled by GSD — start from Plan stage)
# Sample execution output:
# ✓ Plan confirmed: 4 tasks identified
# ✓ TDD: 18 tests generated
# ✓ Subagent Dev: running 4 parallel agents...
# ✓ Review: all tests passing (18/18)
# Step 3: GSD execution (after Superpowers interactive stages are complete)
/gsd-execute-phase 2 # Implement payment module in new sessionPros and Cons Analysis
Advantages
| Item | Description |
|---|---|
| Reduced cognitive load through role separation | Since only one tool is needed per stage, the question of "what should I use right now?" disappears |
| Context rot eliminated at the source | GSD's phase isolation maintains consistent code quality even in large projects |
| Automatic test coverage | Regression bugs decrease noticeably with Superpowers' mandatory TDD |
| Security and QA perspectives built in | gstack's role switching includes security threat modeling before implementation as part of the workflow |
| Runtime flexibility | GSD v2 supports 12 runtimes, reducing dependence on Claude Code |
Disadvantages and Caveats
| Item | Description | Mitigation |
|---|---|---|
| Slash command conflicts | gstack's 28 commands may overlap in name with other framework commands | Explicitly specify each framework's responsible command scope in CLAUDE.md |
| Overhead for small tasks | A 7-stage pipeline is overkill for a simple bug fix | It is recommended to apply Superpowers only to high-complexity tasks |
| GSD v2 integration complexity | Being a TypeScript app, additional configuration is required when integrating with markdown-based frameworks | Agree on the .planning/ directory structure before starting |
| Duplicate decision-making process | When gstack handles planning, Superpowers' Brainstorm/Spec stages become redundant | After gstack Pre-build, enter Superpowers from the Plan stage |
| Interactive prompt conflicts | Superpowers' interactive prompts block the input stream during GSD autonomous execution intervals | Follow the order from Example 3 (GSD planning → Superpowers execution → GSD execution) |
Most Common Mistakes in Practice
- Applying all three tools to every task simultaneously — For small tasks, the GSD 4-command minimal workflow is sufficient on its own. It is recommended to selectively apply tools based on project complexity.
- Starting the combination without CLAUDE.md — Without declaring role boundaries, Claude Code has no way to know which framework's context to follow. It is best to write CLAUDE.md before combining frameworks.
- Inserting Superpowers' interactive stages during GSD autonomous execution — Always follow the order of completing GSD's planning stage first, then running Superpowers, and only then moving to GSD's execution stage.
Closing
The division of roles — "gstack thinks, GSD stabilizes, and Superpowers executes" — is the core of this three-framework combination, and declaring these boundaries in CLAUDE.md is the starting point for conflict-free production deployment.
Three steps you can start right now:
- Copy CLAUDE.md and start immediately — Paste the CLAUDE.md example above into your project root and modify only the
Scopefields to match your team's workflow. - Experience the GSD 4-command minimal workflow — Try processing one of your smallest current tasks through the
gsd-new-project → discuss → plan → executeflow. You'll feel the effect of context isolation right away. - Apply gstack's
/security-officerto your next PR once — Simply adding a threat modeling perspective to existing code is enough to experience how gstack's role-based cognitive mode works.
Next article: How to optimize gstack's 28 slash commands by team size (startup vs. enterprise), plus a real-world CLAUDE.md template reveal
References
- A Claude Code Skills Stack: How to Combine Superpowers, gstack, and GSD Without the Chaos | DEV Community
- Superpowers, GSD, and gstack: What Each Claude Code Framework Actually Constrains | Medium (Ewan Mak)
- Superpowers, GSD, and GSTACK: Picking the Right Framework for Your Coding Agent | Pulumi Blog
- GStack vs Superpowers vs Hermes: Which Claude Code Framework Should You Use? | MindStudio
- GStack Guide: Garry Tan's Claude Code Skill Pack | Awesome Agents
- GitHub — obra/superpowers
- GitHub — garrytan/gstack
- GitHub — gsd-build/get-shit-done
- GSD Official Site
- GStack Official Site
- Superpowers — Anthropic Claude Plugin Marketplace
- Superpowers vs GStack: Which AI Coding Skill Pack Actually Works? | Particula Tech
- GStack Tutorial: Garry Tan's Claude Code Workflow for 10K LOC/Week | SitePoint
- GSD Framework: Spec-Driven Development for Claude Code | CC for Everyone