Gherkin Public
Role: worker. Standalone Gherkin authoring skill. Reads the component map produced by /cd-test-architecture and writes .feature files at the public boundary of each component — the surface an external caller actually depends on. Internal steps are out of scope here; scenarios describe observable outputs.
You have been invoked with the /gherkin-public command.
Parse Arguments
Arguments: $ARGUMENTS
- Positional:
<repo-path>— the repo under modernization. --repo-slug <slug>— namespace under.claude/memory/<workflow>/. Defaults to the last path segment of<repo-path>.
If <repo-path> is absent, ask the operator.
Steps
1. Load the component map
Read .claude/memory/<workflow>/<slug>/phase-1.md for the components & patterns table. If it's missing, tell the operator Phase 1 has not run and stop.
2. Pick the output directory
- Prefer
features/<workflow>/if<repo>/features/already exists (matches the repo's existing Gherkin layout). - Otherwise write to
<repo>/specs/<workflow>/. - Create the directory if missing.
3. Author scenarios per public surface
For each component in the map, generate one .feature file per public surface using the pattern's template. Every scenario MUST cover at least one success and one failure path. Every scenario MUST be observable at the boundary — no scenario describes an internal call.
Grounding scenarios in real behavior. The component map names each surface but not its actual branches or error-handling depth. Prefer CodeGraph/Repowise over raw Grep to inspect a surface's real failure conditions before writing its failure scenario, rather than inferring one from the surface name alone — see