Monday, April 27, 2026

Gstack framework

 

What is gstack [https://github.com/garrytan/gstack]?
gstack is a framework designed to improve AI-driven development by shifting from a single, generalist agent to a system of specialist roles (e.g., CEO, engineer, QA, designer). By assigning specific personas to different stages of the development lifecycle, it ensures that the AI maintains focus and professional depth throughout the project

gstack’s 5-Layer Architecture:-

To prevent agents from breaking character or losing focus, gstack employs a governance system built on five distinct layers

Role Focus: Agents are given “blinders” so they only prioritize responsibilities relevant to their specific role (e.g., a QA Lead focuses solely on user flows and bug reports, ignoring unrelated data schemas)
Data Flow: Work is cumulative and modular; each specialist agent builds its output directly upon the foundation established by the previous stage in the workflow
Quality Control: A centralized checklist system tracks which roles have completed their reviews, ensuring no part of the project is neglected
Boil the Lake: This principle enforces that agents should only attempt tasks they can execute perfectly. If a task is too broad (like “boiling the ocean”), it should be broken down into smaller, manageable chunks that can be handled with 100% precision
Simplicity: To keep things understandable, the final output is boiled down into three simple takeaways: what was found, why it matters, and what to do next

GStack, created by Garry Tan (CEO of Y Combinator), is an open-source framework that transforms Claude Code (Anthropic’s agentic CLI tool) from a generic assistant into a structured “virtual software development team.”

Instead of just “prompting” an AI to write code, GStack enforces a rigorous, multi-stage software development lifecycle (SDLC) that mirrors how a high-performing YC startup operates.


1. How GStack Works Internally

GStack is built on a “Thin Harness, Fat Skills” philosophy. It doesn’t use complex, heavy code to manage the AI; instead, it uses structured Markdown files and a lightweight daemon.

  • The “Skills” System (SKILL.md): The core of GStack is a collection of “skills.” These are highly opinionated instruction sets (system prompts) that force Claude into specific personas (CEO, Staff Engineer, QA). When you run a command like /review, GStack loads that specific skill file, overriding the generic AI behavior with strict checklists and “senior-level” judgment.
  • Browser Automation (Playwright/Chromium): One of GStack’s most powerful internal components is a built-in headless browser. It allows the AI to “see” and “interact” with your app. Internally, it runs a local server that manages a persistent Chromium instance.
  • Contextual Guardrails: It uses a CLAUDE.md file at the root of your project to store persistent state—project goals, tech stack, and “lessons learned.” This prevents the AI from “wandering” or making the same mistake twice.
  • Security & Safety Layers: Internally, it includes a local ML classifier (a 22MB ONNX model) that scans every tool output for potential security leaks or prompt injections before the AI sees them.

2. Benefits Across the Development Lifecycle

GStack organizes development into distinct stages, providing specific benefits for each category you mentioned:

A. New Feature Development & Product Thinking

  • Skill: /office-hours and /plan-ceo-review.
  • Benefit: Before any code is written, GStack forces “Product Discovery.” It asks difficult “forcing questions” derived from YC partners to ensure the feature is actually worth building. It prevents “feature creep” by focusing on the “smallest useful wedge.”

B. Change Request (CR) & Refactoring

  • Skill: /plan-eng-review and /review.
  • Benefit: Instead of just applying a change, GStack performs an architectural audit. It looks at how a Change Request affects the existing codebase. For Refactoring, it identifies technical debt and ensures the new structure adheres to “clean code” principles (e.g., “Zero silent failures”).

C. Bugs, Defects & Performance

  • Skill: /debug and /test.
  • Benefit: Using the integrated browser, GStack can actually reproduce UI bugs. It doesn’t just guess; it runs the app, clicks the buttons, and confirms the fix. For Performance, the /review skill is tuned to look for N+1 queries, heavy loops, and inefficient logic.

D. Security Enhancements & Hotfixes

  • Skill: /review (Security-focused).
  • Benefit: It acts as a “paranoid code auditor.” It is specifically prompted to find XSS, SQL injection, and permission flaws. In Hotfix scenarios, its structured flow ensures that even a “quick fix” goes through a mandatory QA and Review phase, preventing regressions.

E. UI/UX

  • Skill: /plan-design-review.
  • Benefit: GStack evaluates designs on a scale of 1–10. It pushes the AI to move past “basic” UI and aims for a “10-star experience,” critiquing layout, information architecture, and accessibility.

F. DevOps & Infrastructure

  • Skill: /ship.
  • Benefit: Automates the “toilsome” part of DevOps. It handles the Git workflow—branching, committing with standardized messages, pushing, and opening Pull Requests—ensuring that every deployment follows a consistent, auditable process.

Summary: Why use it?

For a developer or a team, the primary benefit of GStack is Consistency. It moves AI coding away from “vibe-based prompting” (where you get lucky with a good answer) toward a Repeatable Process. It essentially “installs a Staff Engineer’s brain” into your CLI, ensuring that every piece of code is planned, reviewed, tested, and documented before it ever hits production.

Lets try to use the gstack for our requirement using openstack. considering we are given with the PRD.txt document that state the need of what need to be developed in terms of fullstack development.

As we are using Opencode we need to execute the given command to install gstack for setup.

git clone –single-branch –depth 1 https://github.com/garrytan/gstack.git
cd gstack
./setup –host opencode

Note:- If you want more ide to get support then please refer to the belwo url

For Opencode

Lets take first scenarios

1- New Feature Development

we will use below given command in sequence with the given prompt

“execute the below command in sequnece /office-hours → /autoplan → /plan-ceo-review → /plan-eng-review → /plan-design-review → /ship keeping in view PRD.txt placed in document folder”

2- Change Request (CR)

Lets create a login page along with user registration page that will ask for useremail id and password for registration and login purpose.
we will use the below sequence. UI screen should do validation like valid email id a used. Both email id and password should not be empty. Same with registration screen user should add both useremail id and password with about validation rule. Make sure to provide the Password update screen also to the end user if they want to update the screen.

/office-hours → /plan-ceo-review → /review → /ship

2- Bugs & Defects

execute the below command in sequence

/investigate → /review → /qa → /ship

Bug1- New user registration is failing from front end side
Bug2- Dashboard after login is not showing any data on the screen
Bug3- Create Ticket is not working giving error when executed from frontend.
Bug4- Search screen is not working
Bug5- Seting update password is not working.

3- UI/UX

Now lets add pie chart diagram below the dashboard table that will show the pie chart depending on the type of ticket status.

/design-shotgun → /design-html → /plan-design-review → /qa

Similarly you can try for other options like Security Enhancement,Security Issues (Hotfixes),Performance Enhancement,Performance Issues, Refactoring,Middleware/API Updates,Technical Debt/Refactoring AND DevOps & Infrastructure.

Source code :- https://github.com/shdhumale/siddhu-gstack.git

gstack:- https://github.com/garrytan/gstack


gstack for antigravity, opencode:- https://github.com/bulyaki/gstackplusplus

No comments: