gherkin-ai 2.6.3 β†’ 2.6.4

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
6
  > **The Closed-Loop Agentic Testing & Orchestration Engine for Full-Stack Applications.**
7
- > Turn product requirements into verifiable Gherkin specifications, execute dual-stack implementations (React + Java / PHP / .NET / Python), and experiment with self-healing agent loops.
7
+ > Turn product requirements into verifiable Gherkin specifications, execute 15+ multi-stack implementations (React/Vue/Angular + Java / Kotlin / Go / Elixir / PHP / Ruby / Python / .NET / Flutter / React Native, plus gRPC & GraphQL contracts), and experiment with self-healing agent loops.
8
8
  >
9
9
  > [![CI](https://github.com/FennerEduardo/gherkin-ai-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/FennerEduardo/gherkin-ai-cli/actions/workflows/ci.yml)
10
10
  > [![Coverage Status](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)]()
@@ -15,10 +15,10 @@
15
15
 
16
16
  While basic AI spec tools only generate text prompts, `gherkin-ai` acts as an **executable contract and verification harness** between Product Intent, AI Agents (Cursor, Antigravity, Claude Code, Windsurf, Copilot), Code Implementation, and CI/CD Quality Gates:
17
17
 
18
- - πŸ€– **AI Agent Implementation Orchestration (`ghk implement`)**: Compiles `.ghkgovernance.yaml`, domain contracts (`*.contract.php`, `.ts`, `.py`, `.java`), ADRs, and Gherkin features into a copy-pasteable Master Agent Implementation Prompt.
19
- - 🐳 **Docker Container Sandbox & Host Protection (`--docker`)**: Generates stack-specific dev container environments (`mcr.microsoft.com/dotnet/sdk:8.0`, `eclipse-temurin:21-jdk-alpine`, `php:8.3-cli-alpine`, `python:3.11-slim`, `node:20-alpine`, `golang:1.22-alpine`, `ruby:3.3-alpine`) so AI agents run tests inside isolated Docker containers without polluting host OS.
18
+ - πŸ€– **AI Agent Implementation Orchestration (`ghk implement`)**: Compiles `.ghkgovernance.yaml`, domain contracts (`*.contract.php`, `.ts`, `.py`, `.java`, `.go`, `.ex`, `.kt`, `.proto`, `.graphql`), ADRs, and Gherkin features into a copy-pasteable Master Agent Implementation Prompt.
19
+ - 🐳 **Docker Container Sandbox & Host Protection (`--docker`)**: Generates stack-specific dev container environments (`mcr.microsoft.com/dotnet/sdk`, `eclipse-temurin:21`, `elixir:1.16`, `golang:1.22`, `php:8.3`, `python:3.12`, `ruby:3.3`, `node:20`) so AI agents run tests inside isolated Docker containers without polluting host OS.
20
20
  - πŸ“‹ **Feature Inventory & Developer Audit Trail (`ghk audit`)**: Auto-detects developer identity (`git config user.name`/`email`), SHA-256 spec & prompt hashes, timestamps, and execution records stored in `.ghe/inventory.json` with LRU retention limit (`maxEntries: 50`) and `--json` export for CI/CD audit pipelines.
21
- - ⚑ **Token Efficiency & Ultra-Compact Mode (`-C, --compact`)**: Uses direct `@` file pointers for on-demand context resolution (70–85% token savings vs code dumping) and provides a dense ~90-token compact prompt mode for cost-sensitive LLMs.
21
+ - ⚑ **Token Efficiency & Ultra-Compact Mode (`-C, --compact`)**: Uses direct `@` context pointers (`@.ghkgovernance.yaml`, `@features/*.feature`) for on-demand resolution to radically reduce token footprint vs. code dumping, providing an ultra-compact prompt mode for cost-sensitive LLMs.
22
22
  - 🌐 **Multilingual CLI & English Prompt Rationale (`ghk lang`)**: Full interactive CLI support in Spanish (`es`) and English (`en`). Master AI Prompts are intentionally generated in **English** for maximum BPE token density (~30% cheaper) and LLM reasoning accuracy.
23
23
  - πŸ€– **True Agentic Engine & Self-Healing (EXPERIMENTAL - `ghk verify --auto-fix` & `ghk autopilot`)**: Connects natively with LLMs (OpenAI, Anthropic, Ollama), modifies source code, intercepts test failures, and recursively applies repairs in a true **Closed-Loop**. *Note: Agentic execution is currently experimental and should be run with human supervision.*
24
24
  - 🌐 **Web Studio UI (`ghk web`)**: Launch a premium local graphical interface to interactively generate your Gherkin specifications, detect your stack, and orchestrate agent prompts visually.
@@ -41,11 +41,11 @@ npx -y gherkin-ai implement --feature ./features/01-customer-management.feature
41
41
  ## πŸš€ Quick Start Commands
42
42
 
43
43
  ```bash
44
- # 1. Generate Master AI Agent Implementation Prompt & Context Package
45
- ghk implement --feature ./features/01-customer-management.feature
44
+ # 1. Initialize Stack Architecture (Supports 14+ Stacks)
45
+ ghk init --stack=java-springboot_vue-pinia
46
46
 
47
- # 2. Generate Ultra-Compact Prompt for Low-Cost LLMs (~90 tokens)
48
- ghk implement --feature ./features/01-customer-management.feature --compact
47
+ # 2. Generate Master Agent Implementation Prompt (Docker Sandbox & Compact Mode)
48
+ ghk implement --docker -C --feature ./features/01-customer-management.feature --contract ./contracts/customer.contract.java
49
49
 
50
50
  # 3. View Feature Inventory & Developer Audit Trail History
51
51
  ghk audit
@@ -54,16 +54,17 @@ ghk audit
54
54
  ghk audit --json
55
55
 
56
56
  # 5. Configure CLI Language (English or Spanish)
57
- ghk lang --set es
57
+ ghk lang --set en
58
58
 
59
59
  # 6. Run Closed-Loop Test Verification with Auto-Fix Loop
60
- ghk verify --auto-fix
60
+ ghk verify --docker --auto-fix
61
61
  ```
62
62
 
63
63
  ---
64
64
 
65
65
  ## πŸ“– Comprehensive Documentation
66
66
 
67
+ - [Multi-Stack Evaluation Report (15 Projects)](docs/EVALUATION_REPORT.md)
67
68
  - [CLI Commands Reference Guide](docs/COMMANDS.md)
68
69
  - [Model Context Protocol (MCP) Integration Guide](docs/MCP_GUIDE.md)
69
70
  - [Closed-Loop Verification & Auto-Repair Guide](docs/USAGE_GUIDE.md)
package/docs/COMMANDS.md CHANGED
@@ -7,7 +7,7 @@ This document provides a comprehensive list of all commands available in the `gh
7
7
  ## πŸ€– Agent Orchestration & Implementation
8
8
 
9
9
  ### `ghk implement` (alias: `impl`)
10
- Generate the **AI Agent Master Implementation Prompt & Context Package** for a feature. This command compiles `.ghkgovernance.yaml`, domain contracts (`*.contract.php`, `.ts`, `.py`, `.java`), ADRs, OpenAPI specs, and docker-compose configurations into an executable AI agent package saved at `generated-specs/prompts/implement-master-prompt.md`.
10
+ Generate the **AI Agent Master Implementation Prompt & Context Package** for a feature. This command compiles `.ghkgovernance.yaml`, domain contracts (`*.contract.php`, `.ts`, `.py`, `.java`, `.go`, `.ex`, `.kt`, `.proto`, `.graphql`), ADRs, OpenAPI specs, and docker-compose configurations into an executable AI agent package saved at `generated-specs/prompts/implement-master-prompt.md`.
11
11
 
12
12
  - `-f, --feature <file>`: Path to Gherkin `.feature` file (auto-selects first feature if omitted).
13
13
  - `--docker`: Include Docker container sandbox execution instructions in the master prompt.
@@ -65,11 +65,13 @@ ghk lang --set es
65
65
  | :--- | :--- | :--- |
66
66
  | **C# / .NET** | `mcr.microsoft.com/dotnet/sdk:8.0` | `docker compose run --rm app dotnet test` |
67
67
  | **Java / Spring Boot** | `eclipse-temurin:21-jdk-alpine` | `docker compose run --rm app ./gradlew test` |
68
- | **PHP** | `php:8.3-cli-alpine` | `docker compose run --rm app vendor/bin/phpunit` |
69
- | **Python** | `python:3.11-slim` | `docker compose run --rm app pytest` |
68
+ | **Kotlin / Spring Boot**| `eclipse-temurin:21-jdk-alpine` | `docker compose run --rm app ./gradlew test` |
69
+ | **PHP / Laravel** | `php:8.3-cli-alpine` | `docker compose run --rm app vendor/bin/phpunit` |
70
+ | **Python / Django** | `python:3.12-alpine` | `docker compose run --rm app pytest` |
70
71
  | **Node / TypeScript** | `node:20-alpine` | `docker compose run --rm app npm test` |
71
- | **Go** | `golang:1.22-alpine` | `docker compose run --rm app go test ./...` |
72
- | **Ruby** | `ruby:3.3-alpine` | `docker compose run --rm app bundle exec rspec` |
72
+ | **Go / chi** | `golang:1.22-alpine` | `docker compose run --rm app go test -race ./...` |
73
+ | **Ruby / Rails** | `ruby:3.3-alpine` | `docker compose run --rm app bundle exec rspec` |
74
+ | **Elixir / Phoenix** | `elixir:1.16-alpine` | `docker compose run --rm app mix test` |
73
75
 
74
76
  ---
75
77
 
@@ -0,0 +1,91 @@
1
+ # Multi-Stack Evaluation Report & GitHub Repositories β€” `gherkin-ai` v2.6.3
2
+
3
+ **GitHub User:** `FennerEduardo`
4
+ **Total Evaluated & Published Projects:** 15 Repositories
5
+ **Frozen CLI Version:** `gherkin-ai` v2.6.3 (WSL / Windows)
6
+
7
+ ---
8
+
9
+ ## 1. Consolidated Matrix with GitHub Repositories
10
+
11
+ | Phase / ID | Project Name / Stack | GitHub Repository | Rubric Average | `ghk verify` Status |
12
+ |---|---|---|:---:|:---:|
13
+ | **Phase 0** | Baseline .NET 8 / C# Angular | [transactional-system](https://github.com/FennerEduardo/transactional-system) | **9.7 / 10** | βœ… PASSED |
14
+ | **Phase 1 (TS-01)** | Java 21 Spring Boot + Vue 3 Pinia | [ts01-java-springboot-vue](https://github.com/FennerEduardo/ts01-java-springboot-vue) | **9.5 / 10** | βœ… PASSED |
15
+ | **Phase 2 (TS-02)** | NestJS 10 + Next.js 14 App Router | [ts02-nestjs-react-nextjs](https://github.com/FennerEduardo/ts02-nestjs-react-nextjs) | **9.3 / 10** | βœ… PASSED |
16
+ | **Phase 3 (TS-03)** | .NET 8 + Angular 17 Signals | [ts03-dotnet-angular](https://github.com/FennerEduardo/ts03-dotnet-angular) | **9.7 / 10** | βœ… PASSED |
17
+ | **Phase 4 (API-03)** | Python 3.12 Django DRF + React | [ts04-django-react-auth](https://github.com/FennerEduardo/ts04-django-react-auth) | **9.2 / 10** | βœ… PASSED |
18
+ | **Phase 5 (API-04)** | Express.js 4 + Angular 17 | [ts05-express-angular-auth](https://github.com/FennerEduardo/ts05-express-angular-auth) | **9.0 / 10** | βœ… PASSED |
19
+ | **Phase 6 (TS-07)** | Go 1.22 chi router + React | [ts06-go-chi-react](https://github.com/FennerEduardo/ts06-go-chi-react) | **9.2 / 10** | βœ… PASSED |
20
+ | **Phase 7 (TS-09)** | Kotlin 1.9 Spring Boot + Vue | [ts07-kotlin-springboot-vue](https://github.com/FennerEduardo/ts07-kotlin-springboot-vue) | **9.7 / 10** | βœ… PASSED |
21
+ | **Phase 8 (API-01)** | Laravel 11 + Inertia.js Vue | [ts08-laravel-inertia-vue](https://github.com/FennerEduardo/ts08-laravel-inertia-vue) | **9.0 / 10** | βœ… PASSED |
22
+ | **Phase 9 (API-02)** | Ruby 3.3 Rails 7.1 + React | [ts09-rails-react-auth](https://github.com/FennerEduardo/ts09-rails-react-auth) | **8.7 / 10** | βœ… PASSED |
23
+ | **Phase 10 (TS-08)** | Elixir 1.16 Phoenix LiveView | [ts10-elixir-phoenix-liveview](https://github.com/FennerEduardo/ts10-elixir-phoenix-liveview) | **9.3 / 10** | βœ… PASSED |
24
+ | **Phase 11 (TS-05)** | Java Spring WebFlux + React Native Expo | [ts11-java-springboot-reactnative](https://github.com/FennerEduardo/ts11-java-springboot-reactnative) | **9.2 / 10** | βœ… PASSED |
25
+ | **Phase 12 (API-05)** | gRPC Protobuf v3 & GraphQL SDL | [ts12-grpc-graphql-contracts](https://github.com/FennerEduardo/ts12-grpc-graphql-contracts) | **9.7 / 10** | βœ… PASSED |
26
+ | **Phase 13 (TS-06)** | RabbitMQ Real + Postgres Outbox | [ts13-real-broker-saga-outbox](https://github.com/FennerEduardo/ts13-real-broker-saga-outbox) | **9.8 / 10** | βœ… PASSED |
27
+ | **Phase 14 (HARNESS)**| Security & Determinism Test Harness | [ts14-adversarial-security-harness](https://github.com/FennerEduardo/ts14-adversarial-security-harness) | **10.0 / 10** | βœ… PASSED |
28
+
29
+ ---
30
+
31
+ ## 2. Direct Links to GitHub Repositories
32
+
33
+ 1. πŸ“¦ **Baseline .NET/Angular:** [FennerEduardo/transactional-system](https://github.com/FennerEduardo/transactional-system)
34
+ 2. β˜• **TS-01 Java / Vue 3:** [FennerEduardo/ts01-java-springboot-vue](https://github.com/FennerEduardo/ts01-java-springboot-vue)
35
+ 3. πŸ’š **TS-02 NestJS / Next.js:** [FennerEduardo/ts02-nestjs-react-nextjs](https://github.com/FennerEduardo/ts02-nestjs-react-nextjs)
36
+ 4. πŸ”· **TS-03 .NET 8 / Angular 17:** [FennerEduardo/ts03-dotnet-angular](https://github.com/FennerEduardo/ts03-dotnet-angular)
37
+ 5. 🐍 **TS-04 Django DRF / React:** [FennerEduardo/ts04-django-react-auth](https://github.com/FennerEduardo/ts04-django-react-auth)
38
+ 6. πŸš€ **TS-05 Express / Angular:** [FennerEduardo/ts05-express-angular-auth](https://github.com/FennerEduardo/ts05-express-angular-auth)
39
+ 7. 🐹 **TS-06 Go chi / React:** [FennerEduardo/ts06-go-chi-react](https://github.com/FennerEduardo/ts06-go-chi-react)
40
+ 8. 🟣 **TS-07 Kotlin / Vue:** [FennerEduardo/ts07-kotlin-springboot-vue](https://github.com/FennerEduardo/ts07-kotlin-springboot-vue)
41
+ 9. πŸ”΄ **TS-08 Laravel Inertia:** [FennerEduardo/ts08-laravel-inertia-vue](https://github.com/FennerEduardo/ts08-laravel-inertia-vue)
42
+ 10. πŸ’Ž **TS-09 Rails API / React:** [FennerEduardo/ts09-rails-react-auth](https://github.com/FennerEduardo/ts09-rails-react-auth)
43
+ 11. πŸ’§ **TS-10 Elixir Phoenix:** [FennerEduardo/ts10-elixir-phoenix-liveview](https://github.com/FennerEduardo/ts10-elixir-phoenix-liveview)
44
+ 12. πŸ“± **TS-11 WebFlux / React Native:** [FennerEduardo/ts11-java-springboot-reactnative](https://github.com/FennerEduardo/ts11-java-springboot-reactnative)
45
+ 13. ⚑ **TS-12 gRPC / GraphQL:** [FennerEduardo/ts12-grpc-graphql-contracts](https://github.com/FennerEduardo/ts12-grpc-graphql-contracts)
46
+ 14. 🐰 **TS-13 Real Broker Outbox:** [FennerEduardo/ts13-real-broker-saga-outbox](https://github.com/FennerEduardo/ts13-real-broker-saga-outbox)
47
+ 15. πŸ›‘οΈ **TS-14 Security Harness:** [FennerEduardo/ts14-adversarial-security-harness](https://github.com/FennerEduardo/ts14-adversarial-security-harness)
48
+
49
+ ---
50
+
51
+ ## 3. Evaluation Findings and SDD Alignment
52
+
53
+ The evaluation of these 15 projects demonstrates significant findings regarding the CLI's role in Spec-Driven Development (SDD):
54
+
55
+ ### State-of-the-Art Architecture Alignment
56
+ The pipeline architecture (`spec β†’ contract β†’ master prompt β†’ sandbox verification β†’ audit`) is highly coherent with the state-of-the-art in spec-driven development. It closely mirrors the **Specify β†’ Plan β†’ Implement β†’ Validate** flow described in recent literature for SDD with AI agents. The core philosophy that the specification must act as the shared "source of truth" between the human developer and the AI aligns with leading conceptual frameworks (e.g., GitHub Spec Kit).
57
+
58
+ ### Broad Multi-Stack Coverage
59
+ The 14+ stack coverage is unusually ambitious for an SDD tool. While most SDD CLIs implicitly assume JS/Python ecosystems, `gherkin-ai` successfully evaluates complex and diverse paradigms, including:
60
+ - Reactive WebFlux (Java)
61
+ - OTP GenServers (Elixir / Phoenix)
62
+ - Goroutines with `chi` (Go)
63
+ - Form Requests (Laravel / PHP)
64
+ - Non-REST domain contracts (gRPC Protobuf & GraphQL SDL)
65
+
66
+ ### Accurate Stack-Specific Validation Criteria
67
+ The validation criteria enforced per stack target the exact architectural boundaries where LLMs typically hallucinate. Examples include enforcing Java Records for events, ensuring non-blocking R2DBC, verifying Elixir `defmodule` usage over `class`, and strictly requiring `go test -race`.
68
+
69
+ ### Validity of Compact Mode (`-C`)
70
+ The compact mode successfully mitigates the real-world problem of context window bloat when feeding agents. The use of context pointers (`@.ghkgovernance.yaml`, `@features/*.feature`) rather than inlining full specs is a highly valid and effective prompt engineering technique for cost-sensitive environments.
71
+
72
+ ---
73
+
74
+ ## 4. Ecosystem Positioning
75
+
76
+ `gherkin-ai` competes conceptually with **GitHub Spec Kit, Kiro, and Tessl** in the SDD layer, and with **Specmatic/Pact** in the contract verification layer.
77
+
78
+ Its declared differentiatorsβ€”executable seeds, pinned versions, and role-specialized promptsβ€”fill the exact gap identified in "spec + TDD" workflows: specifications provide the *"what"*, while the test suite provides the *"proof that it works"*.
79
+
80
+ Within Martin Fowler's SDD classification, `gherkin-ai` is positioned as **"spec-first with verification"**: the spec guides the initial generation, but the generated artifacts (code/tests) remain the long-term source of truth. This is a highly pragmatic approach for today's AI coding landscape.
81
+
82
+ ---
83
+
84
+ ## 5. Recommendations for Future Hardening
85
+
86
+ To elevate this proof-of-concept into a fully verifiable benchmark, the following methodological improvements are recommended for future evaluations:
87
+
88
+ 1. **Publish Verification Logs**: Define the `PASSED` status explicitly by publishing the raw test suite execution logs (`gradle test`, `go test -race ./...`, `mix test`, `rspec`) and coverage counts per repository, moving beyond binary assertions.
89
+ 2. **Establish Control Groups**: Introduce a control group for the same `.feature` and contract implemented (a) with raw prompting, (b) with `ghk` without `-C`, and (c) with alternative tools like Spec Kit to measure the baseline impact accurately.
90
+ 3. **Refine Token Metrics**: Provide exact token counts per stack for the base prompt vs. the `-C` compact mode, rather than aggregated percentages.
91
+ 4. **Blind Evaluation**: Separate the author from the evaluator to eliminate self-referential bias in qualitative rubric scoring (Idiomatic Quality and Architectural Veracity).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gherkin-ai",
3
- "version": "2.6.3",
3
+ "version": "2.6.4",
4
4
  "description": "Enterprise-Grade Closed-Loop Agentic Orchestration Engine & Spec-Driven Verification Framework for AI Coding Agents.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",