@tekyzinc/gsd-t 2.19.1 → 2.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [2.20.1] - 2026-02-16
6
+
7
+ ### Added
8
+ - **API Documentation Guard (Swagger/OpenAPI)**: Every API endpoint must be documented in Swagger/OpenAPI spec — no exceptions. Auto-detects framework and installs appropriate Swagger integration. Swagger URL must be published in CLAUDE.md, README.md, and docs/infrastructure.md
9
+ - Pre-Commit Gate now checks for Swagger spec updates on any API endpoint change
10
+
11
+ ## [2.20.0] - 2026-02-16
12
+
13
+ ### Added
14
+ - **Playwright Setup in Init**: `gsd-t-init` now installs Playwright, creates `playwright.config.ts`, and sets up E2E test directory for every project. Detects package manager (bun, npm, yarn, pnpm, pip) automatically
15
+ - **Playwright Readiness Guard**: Before any testing command (execute, test-sync, verify, quick, wave, milestone, complete-milestone, debug), checks for `playwright.config.*` and auto-installs if missing. Playwright must always be ready — no deferring to "later"
16
+
5
17
  ## [2.19.1] - 2026-02-16
6
18
 
7
19
  ### Changed
@@ -174,13 +174,35 @@ After initialization, verify all created documentation is consistent:
174
174
 
175
175
  ### Skip what's not affected — init creates docs, so most ripple is about consistency verification.
176
176
 
177
- ## Step 7.6: Test Verification
177
+ ## Step 7.6: Playwright Setup (MANDATORY)
178
+
179
+ Every GSD-T project must have Playwright ready for E2E testing. If `playwright.config.*` does not exist:
180
+
181
+ 1. **Detect package manager**: Check for `bun.lockb` (bun), `yarn.lock` (yarn), `pnpm-lock.yaml` (pnpm), `package-lock.json` or `package.json` (npm), `requirements.txt`/`pyproject.toml` (Python)
182
+ 2. **Install Playwright**:
183
+ - bun: `bun add -d @playwright/test && bunx playwright install chromium`
184
+ - npm: `npm install -D @playwright/test && npx playwright install chromium`
185
+ - yarn: `yarn add -D @playwright/test && yarn playwright install chromium`
186
+ - pnpm: `pnpm add -D @playwright/test && pnpm exec playwright install chromium`
187
+ - Python: `pip install playwright && playwright install chromium`
188
+ - No package manager detected: `npm init -y && npm install -D @playwright/test && npx playwright install chromium`
189
+ 3. **Create `playwright.config.ts`** (or `.js` if not using TypeScript) with sensible defaults:
190
+ - `testDir: './e2e'` (or `./tests/e2e`)
191
+ - `use: { baseURL: 'http://localhost:3000' }` (adjust based on project)
192
+ - Chromium only (keep it fast; user can add more browsers later)
193
+ - Screenshot on failure enabled
194
+ 4. **Create the E2E test directory** (`e2e/` or `tests/e2e/`) with a placeholder spec
195
+ 5. **Add test script** to `package.json` if it exists: `"test:e2e": "playwright test"`
196
+
197
+ Skip silently if `playwright.config.*` already exists.
198
+
199
+ ## Step 7.7: Test Verification
178
200
 
179
201
  After initialization:
180
202
 
181
203
  1. **If existing code with tests**: Run the full test suite to establish a baseline. Document results in `.gsd-t/progress.md`
182
- 2. **If existing code without tests**: Note the absencerecommend test setup as part of the first milestone
183
- 3. **If greenfield**: No tests to run, but note that test infrastructure should be in Milestone 1
204
+ 2. **If existing code without tests**: Playwright is now set up (Step 7.6) note unit test framework should be added as part of the first milestone
205
+ 3. **If greenfield**: Playwright is ready. Note that unit test infrastructure should be added in Milestone 1
184
206
  4. **Verify init outputs**: Confirm all created files exist and are non-empty
185
207
 
186
208
  ## Step 8: Report
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.19.1",
3
+ "version": "2.20.1",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 41 slash commands with backlog management, impact analysis, test sync, and milestone archival",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",
@@ -191,6 +191,35 @@ If any are missing:
191
191
 
192
192
  **Exempt commands** (do not trigger auto-init): `gsd-t-init`, `gsd-t-init-scan-setup`, `gsd-t-help`, `gsd-t-version-update`, `gsd-t-version-update-all`, `gsd-t-prompt`, `gsd-t-brainstorm`.
193
193
 
194
+ ## Playwright Readiness Guard
195
+
196
+ Before any command that involves testing (`gsd-t-execute`, `gsd-t-test-sync`, `gsd-t-verify`, `gsd-t-quick`, `gsd-t-wave`, `gsd-t-milestone`, `gsd-t-complete-milestone`, `gsd-t-debug`), check if `playwright.config.*` exists in the project. If it does not:
197
+ 1. Detect the package manager and install Playwright (`@playwright/test` + chromium)
198
+ 2. Create a basic `playwright.config.ts` with sensible defaults
199
+ 3. Create the E2E test directory with a placeholder spec
200
+ 4. Then continue with the original command
201
+
202
+ Playwright must always be ready before any testing occurs. Do not skip this check. Do not defer setup to "later."
203
+
204
+ ## API Documentation Guard (Swagger/OpenAPI)
205
+
206
+ **Every API endpoint MUST be documented in a Swagger/OpenAPI spec. No exceptions.**
207
+
208
+ When any GSD-T command creates or modifies an API endpoint:
209
+ 1. **If no Swagger/OpenAPI spec exists**: Set one up immediately
210
+ - Detect the framework (Express, Fastify, Hono, Django, FastAPI, etc.)
211
+ - Install the appropriate Swagger integration (e.g., `swagger-jsdoc` + `swagger-ui-express`, `@fastify/swagger`, FastAPI's built-in OpenAPI)
212
+ - Create the OpenAPI spec file or configure auto-generation from code
213
+ - Add a `/docs` or `/api-docs` route serving the Swagger UI
214
+ 2. **Update the spec**: Every new or changed endpoint must be reflected in the Swagger/OpenAPI spec — routes, request/response schemas, auth requirements, error responses
215
+ 3. **Publish the Swagger URL**: The Swagger/API docs URL MUST appear in:
216
+ - `CLAUDE.md` — under Documentation or Infrastructure section
217
+ - `README.md` — under API section or Getting Started
218
+ - `docs/infrastructure.md` — under API documentation
219
+ 4. **Verify**: After any API change, confirm the Swagger UI loads and reflects the current endpoints
220
+
221
+ This applies during: `gsd-t-execute`, `gsd-t-quick`, `gsd-t-integrate`, `gsd-t-wave`, and any command that touches API code.
222
+
194
223
  ## Prime Rule
195
224
  KEEP GOING. Only stop for:
196
225
  1. Unrecoverable errors after 2 fix attempts
@@ -209,8 +238,10 @@ BEFORE EVERY COMMIT:
209
238
  │ Compare against "Expected branch" in project CLAUDE.md
210
239
  │ WRONG BRANCH → STOP. Do NOT commit. Switch to the correct branch first.
211
240
  │ No guard set → Proceed (but warn user to set one)
212
- ├── Did I change an API endpoint or response shape?
241
+ ├── Did I create or change an API endpoint or response shape?
213
242
  │ YES → Update .gsd-t/contracts/api-contract.md
243
+ │ YES → Update Swagger/OpenAPI spec (see API Documentation Guard below)
244
+ │ YES → Verify Swagger URL is in CLAUDE.md and README.md
214
245
  ├── Did I change the database schema?
215
246
  │ YES → Update .gsd-t/contracts/schema-contract.md AND docs/schema.md
216
247
  ├── Did I add/change a UI component interface?