This repository specifies a portable acceptance-test pipeline that agents can install in a project. The pipeline turns Gherkin feature files into JSON IR, generates executable acceptance test entry points, runs those tests, and uses acceptance mutation to check whether example data is actually connected to the application under test.
Some pipeline tools are pre-supplied Go commands from this repository. Other components are project-dependent and are written by the agents responsible for installing and maintaining acceptance testing in the target project.
Acceptance mutation means mutating Gherkin example values in the specification-derived JSON IR. It does not mean conventional mutation testing of application source code.
The specification is intentionally implementation-language and project neutral.
Normal acceptance run:
feature file
-> gherkin parser
-> JSON IR
-> optional IR-DRY checker
-> acceptance entrypoint generator
-> generated test entry points
-> project test runner
Acceptance mutation run:
feature file
-> gherkin parser
-> base JSON IR
-> acceptance entrypoint generator
-> reusable generated test entry points
-> gherkin mutator
-> runner adapter evaluates mutated IR
-> mutation report
The normal run proves that the project satisfies the feature. The mutation run checks whether the acceptance tests fail when important example values change.
Portable tools in this repository:
gherkin-parser: reads the supported Gherkin subset and writes JSON IR.- JSON IR reader/writer support: loads and stores the canonical feature representation.
gherkin-ir-dry-checker: reads one JSON IR file and reports repeated, near-duplicate, and possible-synonym step text so agents can normalize and prune feature-file Gherkin.gherkin-mutator: builds deterministic example-value mutations, runs them through a persistent runner worker, and reports killed, survived, and error results.
Project-specific components created by agents as needed:
- Acceptance entrypoint generator: creates executable test entry points from JSON IR.
- Acceptance runtime: expands scenario executions and dispatches steps.
- Project step handlers: connect step text to project behavior and assertions.
- Runner adapter: runs generated tests against a supplied JSON IR and reports test success, test failure, or infrastructure error.
- Convenience scripts: provide stable normal acceptance and mutation commands.
Read the specs in this order:
- parser-spec.md: supported Gherkin syntax, parser behavior, and canonical JSON IR.
- ir-dry-checker-spec.md: report-only repeated, near-duplicate, and possible-synonym step analysis used to normalize and prune feature-file Gherkin.
- acceptance-generator.md: entrypoint generator command, generated test requirements, runtime contract, step handler contract, generated metadata, and implementation hash rules.
- mutator-spec.md: mutator command, mutation rules, persistent runner-worker protocol, differential manifests, status reporting, result classification, and report formats.
A conforming setup exposes these command shapes:
gherkin-parser <feature-file> <json-output>
gherkin-ir-dry-checker [--include-exact] <json-ir> <report-output>
acceptance-entrypoint-generator <json-ir> <generated-test-output>
gherkin-mutator [options]
Common generated paths are:
features/
build/acceptance/
build/acceptance-mutation/
acceptance/generated/
The exact project test command, generated test extension, runtime, handlers, and adapter are project-specific.
APS includes gherkin-ir-dry-checker, a report-only tool that analyzes
parser-produced JSON IR for duplicated or similar step text. Its purpose is to
help agents normalize and prune the Gherkin in feature files before generated
tests are created.
Build or install it with the other APS tools, then run it after parsing newly written or changed feature files and before generating acceptance tests:
gherkin-parser features/example.feature build/acceptance/ir/example.json
gherkin-ir-dry-checker build/acceptance/ir/example.json build/acceptance/dry/example.jsonThe checker does not rewrite feature files, IR, generated tests, runtimes, or project implementation files. It produces an advisory JSON report. Use that report to edit feature files when the same idea is expressed unnecessarily in different ways or when repeated steps inside one scenario should be pruned.
Typical workflow:
- Parse each
.featurefile into JSON IR withgherkin-parser. - Run
gherkin-ir-dry-checkeron each IR file. - Review findings such as
duplicate-in-scenario,placeholder-variant,near-duplicate, andpossible-synonym. - Normalize Gherkin wording where the different forms are accidental drift.
- Prune accidental repeated steps inside a background or scenario.
- Parse, check, generate, and run the acceptance tests.
Do not blindly merge steps only because they look similar. Some step texts have the same shape but different setup or assertion semantics.
When installing the pipeline in a project, an agent usually:
- Creates one or more feature files that exercise real project behavior.
- Parses each feature into JSON IR with
gherkin-parser. - Optionally runs
gherkin-ir-dry-checkeron each IR and uses the report to normalize and prune feature-file Gherkin. - Creates project-specific generated entry points from each IR.
- Implements the runtime and step handlers needed by those generated tests.
- Adds a normal acceptance script that parses, generates, and runs the generated tests.
- Adds a runner adapter that can stay hot and accept mutation jobs over stdin/stdout.
- Runs
gherkin-mutatorand improves scenarios or handlers until important mutations are killed. - Adds parser, generator, runtime, handler, adapter, and mutator coverage at the project-appropriate level.
Normal acceptance should be part of regular verification. Acceptance mutation is usually a deliberate quality workflow because it may be slower than normal test runs.