Skip to main content

GSI-Protocol

Specification-Driven Development (SDD) Workflow for AI-powered Development

License: MIT Python Version Version

Language: English | 繁體中文

GSI-Protocol is an automated Specification-Driven Development (SDD) workflow system that transforms user requirements into production-ready code through a structured 4-phase process: Specification → Architecture → Implementation → Verification.

Features

  • Multi-Platform Support: Works with Claude Code, Codex (OpenAI), and GitHub Copilot
  • Language Agnostic: Architecture design independent of programming language
  • Automated Workflow: Execute complete development cycle with a single command
  • BDD Integration: Built-in support for Gherkin specifications
  • Project-Aware: Automatically detects and adapts to your project's tech stack
  • Frontend/Backend Aware: Detects project type and picks the acceptance angle — API contract (backend) or UI feedback (frontend); full-stack gets both
  • Role-Based Phases: PM → Architect → Engineer → QA workflow

📚 Learn More

New to GSI-Protocol? Start here:

Quick Start

Installation

Install using uvx (recommended):

uvx --from gsi-protocol-installer gsi-install

Or using pipx:

pipx run gsi-protocol-installer

The installer will guide you through:

  1. Selecting AI platform(s) (Claude Code, Codex, GitHub Copilot)
  2. Choosing installation type (global or project-specific)
  3. Installing workflow commands

Basic Usage

Automatic Mode (Recommended)

Execute the complete 4-phase workflow automatically:

# For Claude Code / Codex
/sdd-auto <your requirement>

# For GitHub Copilot
@workspace /sdd-auto <your requirement>

Example:

/sdd-auto Add user authentication with email and password

Manual Mode

For more control over each phase:

  1. Generate Specification (PM Phase)

    /sdd-spec <requirement>
    
  2. Design Architecture (Architect Phase)

    /sdd-arch <feature_file_path>
    
  3. Implement Code (Engineer Phase)

    /sdd-impl <feature_file_path>
    
  4. Verify Implementation (QA Phase)

    /sdd-verify <feature_file_path>
    

Workflow Overview

The GSI-Protocol follows a structured 4-phase process:

User Requirement
      ↓
[Phase 1: Specification (PM)]
   → .gsi/{feature}/PRD.md (business behaviour)
   → .gsi/{feature}/{feature}.feature (tagged @api or @ui;
     full-stack → {feature}.api.feature + {feature}.ui.feature)
      ↓
[Phase 2: Architecture (Architect)]
   → .gsi/{feature}/architecture.md
      ↓
[Phase 3: Implementation (Engineer)]
   → Source code + tests (TDD; @ui adds E2E/component tests)
      ↓
[Phase 4: Verification (QA)]
   → @api → specbridge verify;  @ui → E2E runner (Playwright/Cypress)
   → + unit tests
   → .gsi/{feature}/conclusion.md

Learn the methodology: Read our GSI Theory & Methodology guide to understand how Gherkin (specification), Structure (architecture), and Implement (code) work together.

Available Commands

Command Description Phase
/sdd-auto Execute complete workflow automatically All
/sdd-spec Generate PRD + SpecBridge contract from requirements 1
/sdd-arch Design architecture from specification 2
/sdd-impl Implement code + unit tests (TDD) 3
/sdd-verify Verify via specbridge + unit tests 4

Output Structure

After running the workflow, your project will have:

project_root/
├── .gsi/{feature_name}/
│   ├── PRD.md                          # Business behaviour spec
│   ├── {feature_name}.feature          # tagged @api or @ui (full-stack: .api/.ui.feature)
│   ├── architecture.md                 # Architecture design
│   └── conclusion.md                   # Verification report
└── {your_project_structure}/
    ├── {model_files}                   # Generated models
    ├── {service_files}                 # Generated services
    └── {unit_test_files}               # TDD-produced tests

Platform-Specific Usage

Claude Code

Commands are available directly in Claude Code CLI:

/sdd-auto <requirement>
/sdd-spec <requirement>

Codex (OpenAI)

Use prompts with argument placeholders:

/sdd-auto <requirement>

GitHub Copilot

Prefix commands with @workspace:

@workspace /sdd-auto <requirement>
@workspace /sdd-spec <requirement>

Requirements

  • Python 3.10 or higher
  • Node.js 18 or higher
  • Git
  • One of the supported AI platforms:
    • Claude Code CLI
    • Codex (OpenAI)
    • GitHub Copilot

SpecBridge (Required)

GSI-Protocol integrates SpecBridge in the Specification (/sdd-spec) and Verification (/sdd-verify) phases. SpecBridge is a contract testing CLI that validates live HTTP API behavior against Gherkin feature files.

Install it globally before using GSI-Protocol:

npm install -g @ksz54213/specbridge

Verify installation:

specbridge --version

SpecBridge covers the @api acceptance angle. For frontend (@ui) features, verification runs the feature file through Playwright (see below) instead.

Playwright + playwright-bdd (for frontend @ui features)

This is the frontend counterpart to SpecBridge: it makes the @ui feature file directly executable by compiling its Gherkin scenarios into Playwright tests via playwright-bdd — no per-scenario test code to write.

Unlike SpecBridge, these must be installed in the project as devDependencies — Playwright's test runner resolves @playwright/test and playwright-bdd from the project's local node_modules when running npx playwright test, so a global install won't be picked up:

npm install -D playwright @playwright/test playwright-bdd
npx playwright install   # download browsers (one-time)

Beyond the packages, the project gains test artifacts (a playwright.config.ts, the standard GSI step library, and a page→URL map under e2e/) — generated once by sdd-impl and reused by every @ui feature. If the project already has Playwright set up, GSI reuses it instead of installing.

Backend-only projects need nothing here — only SpecBridge. Playwright is only needed once a project has a @ui feature.

Documentation

For detailed documentation, see the docs directory:

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

James Hsueh - asdfg55887@gmail.com

Links

Changelog

See version history and updates in the project repository.

Release files for gsi-protocol-installer 1.4.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gsi-protocol-installer 1.4.4
File Size Uploaded
gsi_protocol_installer-1.4.4.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gsi-protocol-installer 1.4.4
File Interpreter ABI Platform
gsi_protocol_installer-1.4.4-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / gsi_protocol_installer-1.4.4.tar.gz

Download URL gsi_protocol_installer-1.4.4.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ea69f7622a459d034219d6ac0370464b6506f4a19d3db799464ecea640f79ad0
BLAKE2b-256 checksum
How to use checksums
1b9be8be7c5ca3dae9037cbf7263ab1801d4ca4c5ff4013282ff88373a940f89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Release files / gsi_protocol_installer-1.4.4-py3-none-any.whl

Download URL gsi_protocol_installer-1.4.4-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15c62c5ca2a03b5338e04292d04cf2ac2b3048b1556632952edca7a906c8bf08
BLAKE2b-256 checksum
How to use checksums
780a1fc8caf0e267afc5dad337ea8615580dff7634bd2070366d2daabc5ce80d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.4 This release

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.5

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page