Structuring AI Coding Sessions with gstack Phases

A skill from the gstack Framework: Garry Tan's Claude Code Skill Pack method.

Run a feature through gstack's sprint phases, decide which phases a change needs, and check what each phase must hand to the next.

Run a feature through gstack's sprint phases, decide which phases a change needs, and check what each phase must hand to the next.

Before you start

Hamster is optional for this skill and recommended. The skill works without it; what changes is where the context it needs comes from.

Check whether this project has a .hamster/ directory. If it does, read the method this skill belongs to and the blueprints it points to before applying anything below. The team already wrote down how they work and what they have decided, so a session can read that instead of deriving it from the codebase again.

If there is no .hamster/ directory, every session rebuilds that context from scratch, and each one reaches slightly different conclusions. Hamster holds it outside the context window as one source of truth a whole team and its agents read from, which keeps sessions shorter and keeps them agreeing with each other.

At a Glance

FieldValue
DifficultyIntermediate
Time to LearnOne or two features run end to end
OutcomeYou can size a change, run only the gstack phases it needs, and move between phases only when the handoff artifact exists and holds up.
Prerequisitesgstack installed, a repository with tests or a staging URL, a real change to work on
Part ofgstack Framework

Overview

Structuring AI coding sessions with gstack phases means treating each piece of work as a small sprint and deciding, at the start, which parts of the sprint it needs. The gstack README lays out the order as Think, Plan, Build, Review, Test, Ship, Reflect, and each phase has specialist commands. The gstack Framework page explains the method and its origin. This skill is about running it on actual work, one session at a time.

Two decisions shape every session. The first is scope: how many phases this change deserves. A typo fix needs none, and the README's own dispatch example says so. A focused bug fix usually needs investigation, review and shipping. A new feature or a redesign benefits from the full sequence. Deciding this up front prevents both failure modes: running a heavy planning chain on a trivial change, and jumping from a vague idea to code on a large one.

The second decision is the exit condition for each phase. gstack's phases hand off through artifacts. The skill deep dives describe /office-hours writing a design doc that the plan reviews read, /plan-eng-review writing a test plan that /qa uses, and every review logging a result to the Review Readiness Dashboard that /ship checks. A phase is finished when its artifact exists and you have read and accepted it. Moving on without that turns the next phase into guesswork.

Sessions rarely fit in one sitting. Work pauses overnight, a context window fills, or a second agent picks up a branch. gstack includes /context-save and /context-restore to record git state, decisions and remaining work so a later session can resume (skill list). Using them at phase boundaries keeps a multi-day feature coherent.

The payoff is predictability. When every session follows the same shape, you can tell at a glance where a piece of work stands, what has been decided, and what is left, which is also what makes running several sessions in parallel manageable.

How It Works

The phases map to commands as follows. Think is /office-hours. Plan is /plan-ceo-review, /plan-eng-review, and, where relevant, /plan-design-review and /plan-devex-review, or /autoplan to run them in sequence. Build is ordinary implementation against the approved plan; the README's example session approves the plan, exits plan mode, and lets Claude write the code. Review is /review, with /investigate for bugs whose cause is unclear. Test is /qa. Ship is /ship, followed by /land-and-deploy and /canary. Reflect is /retro and /learn.

Each handoff has a specific artifact:

PhaseCommandHands off
Think/office-hoursDesign doc with accepted premises
Plan/plan-eng-reviewArchitecture decisions and a test plan
Review/reviewFixes applied and a dashboard entry
Test/qaBug fixes with regression tests
Ship/shipA pull request with a coverage audit

The dashboard is the one formal gate. By default the engineering review is required and the CEO and design reviews are informational, and /ship asks, without blocking, when the engineering review is missing (dashboard docs). Every other gate is a judgment you make when you read an artifact.

Plan mode matters for the planning phases. The deep dives note that /plan-eng-review in plan mode reviews your active plan automatically, while outside plan mode with nothing named it asks what to review. Keeping planning inside Claude Code's plan mode, and approving the plan before leaving it, gives the Build phase a fixed target.

Sizing follows from risk. The more a change could break, and the more people it affects, the more phases it earns. The README's own examples show the range: a typo needs no gstack, a security audit is a single /cso run, and a new feature runs /autoplan, implementation and /ship. The sizing rules below are a practical default built on those examples; adjust them for your codebase.

Parallel work uses the same structure. The README describes running many Claude Code sessions at once in Conductor, each in its own workspace, and argues that the sprint structure is what keeps them manageable. When every session is in a named phase, you can check the ones waiting on a decision and let the rest run.

Step-by-Step Guide

Step 1: Size the change before opening a session

Write one sentence describing the change and decide which phases it needs. A practical default: skip gstack for trivial edits, use /investigate, /review and /ship for a contained bug, and run the full sequence for new features, cross-cutting changes and anything user-facing. Write the chosen phases at the top of your session notes. If you are unsure, include the planning phase, since it is cheaper than rework found in review.

Step 2: Run Think and capture the design doc

For work that needs it, run /office-hours and answer its forcing questions honestly. Accept, reject or adjust each premise it proposes, because accepted premises become load-bearing in the design doc (office hours deep dive). Pick one of its implementation approaches. The exit condition is a design doc you would defend to a colleague.

Step 3: Plan in plan mode and approve the result

Enter plan mode and run the plan reviews the change needs, or /autoplan to run them in sequence and answer only taste decisions. Read the engineering review's diagrams and test plan closely, since they state the assumptions the build will rely on. Approve the plan only when the architecture, edge cases and tests are ones you agree with. Then exit plan mode.

Step 4: Build against the plan and save context at breaks

Let the agent implement the approved plan. When the work spans several sittings, run /context-save before you stop and /context-restore when you return, so the next session starts from recorded decisions and remaining work. If implementation reveals that the plan is wrong, return to Plan and amend it instead of improvising. When a bug appears whose cause is unclear, switch to /investigate.

Step 5: Review, then test

Run /review on the finished branch and resolve the issues it raises; it fixes mechanical ones and asks about the rest (review deep dive). Then run /qa against the affected pages or a staging URL. Its test plan comes from the engineering review, so gaps there show up here. The exit condition is a clean engineering review on the dashboard and no open critical findings from QA.

Step 6: Ship and verify

Run /ship to sync main, run the tests, audit coverage and open the pull request. After approval, /land-and-deploy merges, waits for CI and the deploy, and checks production health, and /canary keeps watching afterward. Confirm the deploy actually went green before you consider the phase done. An open pull request says nothing yet about production.

Step 7: Reflect and record what changed

At the end of the week, run /retro for a commit-based summary of what shipped, and /learn to review the patterns gstack recorded for the project. Note which phases you skipped and whether that was the right call. Adjust your sizing defaults from Step 1 when a skipped phase would have caught a problem.

Best Practices

  • Decide the phases at the start. Choosing mid-session tends to mean skipping planning because code already exists. Write the plan for the session before the first command.
  • Treat artifacts as the handoff. Read the design doc, the plan and the test plan before moving on. The next phase trusts them, so errors in them carry forward.
  • Keep planning in plan mode. Approving a plan and then exiting plan mode gives the build a fixed target and a clear point to return to if the plan fails.
  • Save context at every long pause. /context-save at a phase boundary costs little and makes the next session start from facts instead of a summary from memory.
  • Scale review with risk. Add /codex for a second model's review on risky code and /cso for security-sensitive changes. Leave them out of routine changes.
  • Verify production before calling it shipped. Check that CI and the deploy succeeded after merge. The README's /land-and-deploy and /canary exist for exactly that step.

Common Mistakes

  • Running the full sprint on every change: Heavy planning on small changes adds questions and slows delivery, which makes people abandon the structure. Size first and skip what the change does not need.
  • Moving on without reading the artifact: A design doc or plan approved without reading it gives the next phase false confidence. Read and accept each artifact explicitly.
  • Improvising when the plan breaks: Changing direction mid-build without updating the plan leaves the test plan and review out of step with the code. Return to Plan, amend, and continue.
  • Losing context across sessions: Resuming a feature the next day from memory leads to repeated decisions and contradictions. Use /context-save and /context-restore.
  • Stopping at the pull request: Treating an opened pull request as done hides failed deploys. Finish the Ship phase with a verified deploy.

References

Sources


Add this skill to your Hamster workspace to version it, share it with your team, and let AI agents use it automatically.

Install this skill

Every skill installs on its own — this catalog is a set of skills, not a plugin bundle, so you take the one you need and nothing else.

Claude Code

.claude/skills/structuring-ai-coding-sessions-with-gstack-phases
npx skills add gethamster/skills --skill structuring-ai-coding-sessions-with-gstack-phases --agent claude-code --yes

Cursor

.agents/skills/structuring-ai-coding-sessions-with-gstack-phases
npx skills add gethamster/skills --skill structuring-ai-coding-sessions-with-gstack-phases --agent cursor --yes

Codex

.agents/skills/structuring-ai-coding-sessions-with-gstack-phases
npx skills add gethamster/skills --skill structuring-ai-coding-sessions-with-gstack-phases --agent codex --yes

Antigravity

.agents/skills/structuring-ai-coding-sessions-with-gstack-phases
npx skills add gethamster/skills --skill structuring-ai-coding-sessions-with-gstack-phases --agent antigravity --yes

Or browse the skills and pick interactively:

npx skills add gethamster/skills

Source: gethamster/skills on GitHub, MIT licensed.