npm install
npm run watch # esbuild + tsc in parallel
npm test # vitest (unit tests)
npm run test:coverage # unit tests plus enforced coverage floors
npm run test:contracts # release artifact contract tests
npm run test:integration # @vscode/test-electron (extension host)
npm run lint
npm run build # clean + compile + bundleThe tsc commands use the native TypeScript 7 compiler through the @typescript/native npm alias. ESLint still imports the TypeScript 6 compiler API through the typescript alias for @typescript/typescript6; its separate CLI is tsc6. Keep both aliases until API-dependent tools support the native compiler. This follows Microsoft's side-by-side migration guidance.
When changing the compiler, check all four TypeScript projects and compile the integration runner before native tests. Exercise both watch:tsc and watch:webview: observe a clean compilation, introduce a deliberate type error, and observe recovery after correcting it. Use compiler output to detect completion. Verify the emitted integration tests on both pinned VS Code hosts, along with lint, coverage, production bundling, and installed VSIX behavior.
Unit tests use Vitest 5 with the matching V8 coverage provider and the ESM configuration vitest.config.mts. A minimal stub of the vscode module lives under src/test/mocks/vscode.ts. Tests that need real VS Code APIs (TestController, TestItem trees, run-profile registration) run via npm run test:integration, which launches a real VS Code instance against a fixture workspace under src/test/integration/fixtures/workspace/. See CONTRIBUTING.md for details.
When changing the unit-test runner, first run the installed BDD outline targeting and retry/Debug cases in test-provider-outline-targeting.test.ts. In watch mode, observe a passing test, a deliberate failure, and recovery after correcting it. Compare the reported coverage file inventory, including unexecuted runtime files, and prove that a run below the configured floors exits with failure. Coverage policy changes require an explicit compatibility decision.
Coverage enforces 95% floors for statements, branches, functions, and lines across the existing source scope, including unexecuted files. Browser client tests use source maps from the same Vite-transformed modules as the coverage provider so bundled execution counts against the original TypeScript. Keep source-level coverage tests distinct from production-bundle producer-to-consumer acceptance tests.
Browser-client tests use jsdom 30 on the pinned development Node runtime. When updating it, first run webview-client.test.ts, traceability-view-client.test.ts, and xray-setup-client.test.ts with their populated bundled rendering and keyboard/focus checks. Then run the consumers of helpers/board-panel-driver.ts to cover real host-to-client actions. Keep the existing assertions and accessibility checks intact; follow with the complete gate and production bundle comparison.
Before implementing story navigation, establish whether the destination is a local feature scenario or a tracker requirement. Verify a named destination through actual source data, bundled rendering, and the host action. For a remote story, begin with the remote response and sync it through the real source client and adapter. An installed package or version alone does not prove behavior in the user's active window; keep the reported case open until that behavior is observed.
For Publish visibility changes, select the Coverage Board's Publish tab with no publishable runs and assert that the complete form is visible with an empty run list and disabled Publish action. Seal a real mapped run and assert its dated run label and enabled Publish action in the bundled client without refresh or navigation. Hold attachment preparation at a controlled promise, seal another run, then release preparation and assert that the first rendered dropdown includes and selects the new run. Keep the form visible during preparation, publishing, cancellation, and settlement; disable Publish until the host acknowledges a live run selection. Hold the board rebuild after settlement and exercise each new-form trigger: completing another run, choosing an offered run, and reactivating Publish. Each must prepare the form after the previous command retires, provided Publish is still active and idle. Completing a run with another board tab or editor active must preserve that focus; returning to a retained Publish tab must show the run without another tab click. Confirm no import occurs before the user confirms, and preserve an active import's busy state and retry selection. Captured host messages alone do not prove these outcomes. The board toolbar presents Select projects before Sync so project selection precedes fetching results.
For sync-selection changes, accept project checkboxes through the picker, persist and reload the setting, and run ordinary Sync through the real adapter and bundled board client. Assert the checked project's named result and outgoing requests. Include unchecked projects in the board view, local tags, prior catalogue, and directory; none may be fetched by ordinary Sync. Also prove that accepting unchanged checkmarks saves the selection, and clearing all boxes makes no remote reads or misleading success report based on cached tests. A resolver-only assertion or captured settings write is supporting evidence, not acceptance.
The native test harness uses test-electron 3 on the pinned development Node runtime. For runner upgrades, exercise a fresh download through downloadAndUnzipVSCode with an empty external cachePath, then reuse that cache. Run both pinned VS Code hosts with SPECWRIGHT_PROGRESS_UI=1 and install the produced VSIX into clean profiles on both hosts. Keep the named result, rendered progress, actual Debug, and fixture-discovery assertions intact.
VS Code declarations may resolve above the declared ^1.99.0 floor. VSCE validates the declared range against engines.vscode; it does not limit the APIs exposed by installed typings. When refreshing those declarations, type-check all four projects and exercise actual API behavior on both pinned hosts. New API calls must remain compatible with the minimum host.
Changes to executable resolution need a real Extension Host test on Windows, macOS, and Linux. Put a temporary fixture beneath the checkout when it needs the checkout's installed dependency, so normal package resolution can find the parent node_modules without a temp-to-checkout junction. Run the configured command through the production command runner and assert its generated output.
For Xray snapshot boundary changes, run the populated catalogue case in traceability-view-client.test.ts. Its GraphQL pages contain 3,000 rich tests, cross the validated adapter and cached organization, and must render the named SHOP-301 set and Smoke repository folder in the bundled client. The same case then syncs two retained Test Sets with 9,998 cached members each and a new set, validates that live and persisted organization snapshots share the 20,000-item bound, and shows SHOP-302 with incomplete cached membership and a truncated project in the bundled tree. Run the webview-client.test.ts All Projects case too: it syncs 30,000 rich tests and more than 20,000 explicit keys across three projects, crosses the validated boundary, and must render the named SHOP-10000 test when the board filters the full catalogue. Its Matrix page controls must reach later rows. The Xray adapter contract test checks explicit key scopes and verified absences beyond 20,000, including an empty test map. A count of passing contract tests alone does not prove the rendered path.
A change to Windows cancellation is accepted only after the native integration tests cooperatively cancels the populated Playwright fixture and admits the next named run and cancels an owned tree through the gateway and admits the next named command pass on Windows with the built-in Windows PowerShell 5.1. The Playwright test starts the installed CLI with a populated resource fixture, cancels through the execution gateway, observes fixture teardown and worker exit, then passes a second named test through the same gateway and admission owner. The generic command test confirms parent and child identities are gone before the next command prints fresh execution completed. A process-table probe or a separate manual taskkill does not count. If these tests cannot run on your host, Windows acceptance stays open. Also repeat Stop followed by Run in an affected workspace and confirm the selected test runs without an admission-blocked message.
The required Playwright fixture test needs no downloaded browser. To also prove browser cleanup, install the project's Playwright Chromium browser, set SPECWRIGHT_BROWSER_CANCELLATION_ACCEPTANCE=1, and run npx vitest run src/test/unit/playwright-cli-cancellation.test.ts. This opt-in test populates a real page, observes fixture teardown and worker exit after Stop, then passes a second named browser test through the same gateway. Browser acceptance requires this test to run on the affected platform; a skipped opt-in test is not evidence of browser cleanup.
The native Windows Extension Host run must also preserve the installed bddgen shim, target, and package manifest through cancellation, then generate the named Installed binary scenario in the later bounded-command-runner test. The cancellation fixture uses a checkout-local directory so it resolves ancestor dependencies without a disposable junction to node_modules. A passing cancellation test alone does not prove that later tests can still use the installation.
For an outline completion report, run a populated outline through installed bddgen, Playwright, the gateway, and a Testing run with a configured retry held at a controlled gate. The live count may reach its total while the retry is pending; the Testing run and execution slot must remain open until Playwright closes. After release, assert the named final example statuses, TestRun.end(), and a second named run through the same gateway. Repeat on the affected native platform before closing a platform-specific report.
For retry status projection, run retry-outline-state.test.ts in the native Extension Host with installed bddgen and Playwright. Its three populated rows include two timed-out first attempts that pass on retry. Read VS Code's completed, current-run Test Results record and assert that all three row states and the outline state are passed. A provider status cache or a mock TestRun.passed call does not prove the visible icons changed; VS Code rejects a failed-to-passed terminal update within one run. Keep true final failures and cancellation visible as failures.
For run progress and retry presentation, also run progress-stages.test.ts with SPECWRIGHT_PROGRESS_UI=1. The integration runner opens a loopback workbench inspection port, and the test reads the rendered status bar and notification through Playwright. Hold preparation, generation, retry execution, teardown, and process completion after the final reporter end at controlled fixture gates; assert the observed stage before releasing each gate. The final gate must render Finishing run in both the status bar and editor notification while the run remains active. A finishing line in saved output alone does not prove that the stage was visible. Reaching the logical total during a held retry or teardown must leave the run active. Exercise Testing and editor entry points, read the built-in Test Results output document for the named stage and retry messages, and verify a subsequent run. Include two outlines without placeholders in their titles so both produce Example #1; assert that each retry message names its enclosing outline. Distinct substituted row titles alone do not prove outline identity. Extend retry-outline-state.test.ts to assert the actual named result summaries: only rows that needed a retry say Passed on attempt 2. Without the UI inspection flag, native output/state assertions are supporting evidence only for the rendered progress surfaces. An unobserved surface remains an open acceptance check.
For a natural-completion timeout with a whole outline, set SPECWRIGHT_BROWSER_OUTLINE_ACCEPTANCE=1 and run the named browser-video test in test-provider-outline-targeting.test.ts (set SPECWRIGHT_CHANNEL=chrome for Chrome). That supporting fixture runs two populated rows through the provider, gateway, executor, live reporter, and final JSON report, then starts a second full Run immediately, before its direct CLI comparison. The reported Windows discrepancy is that Specwright's text output appears to show passing rows while the Test Run icons show timeouts and the run stays active. Confirm that the text belongs to the current Run, then distinguish live row output from the final Playwright summary, current-run JSON statuses, CLI exit, TestRun.end(), and gateway release. Compare one worker with the same multiple-worker count and video setting used in the affected Run, and compare the exact selected tests and command in a terminal. On the same current build, compare the package-runner command with an explicit node command for the same installed Playwright CLI, keeping the selected generated lines, reporter configuration, AbortSignal, and Windows process-identity probe unchanged. Historical runner comparisons and macOS passes support diagnosis but do not close the affected-Windows path.
For Debug retry policy, pass the executor's structured startDebugging arguments to installed Playwright against a named failing-then-passing outline with project retries enabled. Debug must execute one failed attempt; ordinary Run must retry and pass. Confirm breakpoint behavior in a native Extension Host separately, since a captured launch does not exercise VS Code's JavaScript debugger.
Release only from protected main and protect tags matching v* in the repository settings. The workflow cannot administer or prove those rules with its token, so verify both rules before the first release and after repository-policy changes. The workflow uses read-only repository permissions; only the tag-only promotion job receives actions: read, id-token: write, and attestations: write.
CI and the devcontainer use the exact Node toolchain in .node-version: Node 24.21.0. Dependabot checks npm and GitHub Actions dependencies weekly. Repository maintainers own dependency alerts, Dependabot update pull requests, and quarterly review of the Node pin. GitHub's Security and Dependabot surfaces are the routing points for those alerts and updates; Dependabot does not update .node-version, and this repository does not name an individual or team owner in source control.
Release preparation is supported on macOS and Linux hosts with a POSIX-compatible shell. release.mjs invokes /bin/bash and shell command strings, so it is not a supported Windows release host. Windows and macOS remain native CI quality lanes; containers do not replace native test coverage or any native signing verification.
Fixtures that exercise inherited output pipes must prove readiness through observed bytes before the parent exits, rather than platform-specific file-mode predicates. Record the late-write phase before dispatch and its actual completion or error afterward. Use asynchronous descriptor writes so a blocking stdout adapter cannot stall the fixture watchdog, and bound lifetime and cleanup with phase and error diagnostics. Verify lifecycle corrections on the affected native platform with the pinned Node version; passing on macOS or in a container does not close a Windows failure.
The release script bumps package.json and package-lock.json together, updates CHANGELOG.md, and runs the source gates. It then creates the release commit before building so the artifact manifest can name the exact commit. After that it builds production once, validates the package inventory, packages one VSIX, runs integration tests against that bundle, installs the VSIX into a clean extension profile, discovers a fixture scenario, and verifies that the VSIX SHA-256 did not change. The tag is created only after every gate passes.
The release artifact set contains the VSIX, its checksum, a CycloneDX SBOM, and a manifest with a components array. The manifest binds the source commit, component version, VSIX digest, and SBOM digest. The current component is the VS Code extension; future Core Service and execution-provider packages can add components without changing the manifest shape. Candidate and promoted artifact sets are retained for 90 days. Production source maps are excluded from the VSIX and retained as a separate CI artifact for 30 days. Restrict workflow-artifact access as part of the repository's release permissions.
Packaging uses VSCE 4 on the pinned Node runtime. When updating VSCE, run the release contracts, then the existing release-artifact producer and verifier from a clean source commit. Confirm the exact package inventory, SBOM and manifest bindings, and installed behavior on both pinned VS Code hosts. VSCE 4 can prompt to migrate legacy PAT credentials during authentication; check that separately before authorized Marketplace publication.
Release contracts parse workflow and Dependabot YAML with the exact js-yaml pin. When updating the parser, validate the actual files first, then preserve the negative checks for permissions, immutable actions, dependency-update limits, and promotion without rebuilding. Check merged values and duplicate keys so a schema change cannot silently bypass those guards.
legacy-direct remains the execution default. An Extension Development Host may set SPECWRIGHT_EXECUTION_ENGINE=core-client to exercise the fail-closed preview selection. Workspace settings and workspace launch files cannot select an engine or replace its executable.
The repository does not contain a Core Service executable or Client Protocol schema. Enabling a real Core client requires Polywright to supply all of the following as one versioned release contract:
- a self-contained executable for each supported runtime identifier;
- a signed manifest binding runtime identifier, executable SHA-256, Core version, Client Protocol version, and schema profile;
- the canonical framing specification and generated TypeScript request, response, event, diagnostic, and error DTOs for that profile;
- protocol lifecycle rules for negotiation, session identity, ordering, size limits, cancellation, shutdown, and outcome-unknown starts.
Until those artifacts verify as one set, Core discovery, preparation, run, and debug fail with execution.core-client.unavailable. The extension does not fall back to legacy-direct. A TypeScript fake can later test client error containment against the supplied framing contract, but cannot satisfy Core lifecycle, provider supervision, or parity acceptance.
Do not add placeholder Core, Python, JVM, .NET, or mixed-runtime containers. The repository lacks the schemas and binaries that would make those images a valid test or release contract.
npm run release # default: patch bump
npm run release:patch
npm run release:minor # 0.1.0 → 0.2.0
npm run release:major # 0.1.0 → 1.0.0
npm run release:dry-run # preview without changing anythingOr with explicit version:
node scripts/release.mjs --version 0.5.0
node scripts/release.mjs --type patch --date 2026-10-11--date sets the changelog date when the release calendar date differs from UTC. Omit it to use the current UTC date.
After the script completes:
git show v0.1.1 # review the release commit
cat dist/specwright-0.1.1.vsix.sha256 # digest of the local build only
git push origin main
# Wait for the successful main CI artifact named specwright-<release-commit>.
git push origin v0.1.1The main workflow creates specwright-<commit> only after the quality, exact-version integration, package-content, installed-VSIX smoke, and digest gates pass. Push the release tag only after that hosted candidate exists. The tag workflow fails closed unless the tag matches the package version, its commit is on main, and a successful main CI run retained the matching candidate. It downloads that candidate without rebuilding, verifies the manifest commit and version plus the VSIX and SBOM digests, attests the same VSIX, and retains the unchanged set as specwright-<tag>.
Download specwright-<tag> and verify the VSIX against the checksum, SBOM, and manifest in that same download, then publish that VSIX. The local digest printed above identifies the local build and will not match the hosted build: vsce embeds timestamps, so each package run produces a distinct digest. Do not rebuild between hosted testing, tag promotion, download, and publication.
node scripts/release-artifact.mjs --verify \
--out specwright-0.1.1.vsix \
--commit "$(git rev-parse v0.1.1^{})" \
--version 0.1.1
npx vsce publish --packagePath specwright-0.1.1.vsixThe verification command checks the checksum filename and digest, manifest schema, source commit, component version and digest, and SBOM filename and digest before publication.
The script refuses a dirty tree, missing commit, or existing tag. If an artifact gate fails after the release commit, no tag is created and the script removes the release commit again, so a rerun starts from the same version. Before push, delete an unwanted tag with git tag -d v0.1.1 and remove its commit with git reset --hard HEAD~1. After publication, keep the previous promoted artifact set, revert the faulty change, cut a new patch, and provide the previous VSIX and checksum for explicit downgrade while the correction is validated. npm run release:dry-run exercises the release and rollback command plan without changing Git or package files. A real promotion, Marketplace rollback, artifact download, and protected-ref audit require authenticated repository administration and remain manual acceptance steps.
Protected references, GitHub alert routing, workflow-artifact access, real promotion, publication, rollback, native signing, and the Core/runtime matrix remain external release gates. Record evidence for each in the release change before publishing.
The package inventory lives in scripts/package-contents.json. It currently lists 31 files. Update it deliberately when shipping a new packaged file; the package-content gate checks the inventory rather than relying on a fixed historical count. Source: scripts/release.mjs and scripts/release-artifact.mjs.
The following assets require an external capture before they can be added to documentation. They are not present in the repository and must not be referenced until the capture is accepted.
| Intended asset and guide | Status | Required evidence |
|---|---|---|
authoring-to-execution.gif in README.md |
External capture required | Resolve or generate a missing step, then run the scenario. |
missing-step-quick-fix.png in docs/features.md |
External capture required | Show an unmatched-step diagnostic and Create Step Definition. |
specwright-settings.png in docs/settings.md |
External capture required | Show Settings filtered to Specwright, without configuration values that identify a workspace. |
test-results.png in docs/runs.md |
External capture required | Show one failed scenario with a Gherkin step and clickable stack trace. |
Use a disposable workspace. Captures must contain no personal paths, accounts, credentials, bearer tokens, cookies, customer data, remote URLs, or issue keys. Review final pixels and file metadata before adding an asset, then add its Markdown reference in the same change.
The DevContainer gives you a consistent Node 24.21.0 environment. To use it: install VS Code's "Dev Containers" extension, then run Dev Containers: Reopen in Container from the command palette. The container runs npm ci automatically on first start.
The base image is pinned as node:24.21.0-bookworm-slim@sha256:d6aa754f16b3197301076f047b5def2f02ea1dbbc2ca920407d46d7ec7f87b20, the verified multi-architecture OCI index for that tag. Re-verify the tag and index digest with the official Node image registry before updating either value, then update the Dockerfile and release contract test together.
Useful when:
- Your host node version diverges from the project's target.
- You want CI-like isolation while iterating.
- You're triaging a "works on my machine" report.
The DevContainer is intentionally tool-agnostic: it ships only what the project needs (Node + git + ESLint extension). Bring your own AI assistant, debugger, or other tooling.
src/
extension.ts # activation, wiring
commands/
command-manager.ts # registers all playwrightBddRunner.* commands; run/debug handlers
traceability-commands.ts # traceability hub: board, sync, project scope; owns the two below
traceability-link-commands.ts # link/unlink/create-from-scenario, tag writes, board mutations
traceability-publish-commands.ts # run+publish, publish last run, attachments, run history
traceability-authoring-commands.ts # bulk create, container create, push flows
captured-run-progress.ts # cancellable editor-run notification + live counts
generate-steps.ts # orchestrates "Generate Missing Step Definitions"
insert-step.ts # "Insert Step…" snippet builder + QuickPick
export-catalogs.ts # orchestrates Export Steps / Export All Scenarios
prompt-worker-count.ts # QuickPick + persistence for parallel-profile workers
core/
extension-config.ts # reads playwrightBddRunner.* settings
command-builder.ts # composes `bddgen && playwright test …`
test-executor.ts # runs in terminal + spawns for JSON parsing
live-run-session.ts # owns one reporter side-channel lifecycle
live-run-stream.ts # tails reporter JSONL and maps generated source lines
run-progress.ts # scoped live-result observer contract
breakpoint-mirror.ts # mirrors .feature breakpoints onto generated specs for debug
test-discovery-manager.ts # globs + caches .feature files
test-organization.ts # 5 tree-grouping strategies
provider-registry.ts # owns lifecycle of reactive providers
generators/step-stub-generator.ts # pure: parameter inference, keyword normalization, stub formatting
exporters/
steps-markdown.ts # pure: renders the Export Steps catalog
scenarios-markdown.ts # pure: renders the Export All Scenarios catalog
markdown-slugger.ts # pure: GitHub-style anchor slugs for the exports' TOC
parsers/
feature-parser.ts # Gherkin parser
bdd-file-data-parser.ts # extracts the bddFileData block from generated specs
tag-regex.ts # shared @tag pattern source
providers/
scenario-boundary.ts # shared SCENARIO_BOUNDARY_RE constant
step-keywords.ts # single source of truth for Gherkin step-keyword alternation
step-definition-provider.ts # .feature step → .ts definition (Go to Definition)
step-resolver.ts # file-walking + matching with mtime cache + file-list watcher
step-completion-provider.ts # snippet completions on step lines
pattern-humanizer.ts # regex → {int}/{string} normalization for completions
tag-completion-provider.ts # @-prefix completions sourced from tag-index
tag-line-detector.ts # pure tag-line context detection
tag-index.ts # workspace-wide tag pool + file watcher
step-hover-provider.ts # hover tooltip with matching def pattern + source link
step-reference-provider.ts # Find All References from a step def into .feature files
step-usage-codelens-provider.ts # "Used N times" CodeLens above each Given/When/Then
step-usage-index.ts # shared usage index used by references / CodeLens / unused diagnostic / Steps panel
steps-tree-data-provider.ts # the Activity Bar "Steps" tree view (definitions + unmatched steps)
unused-step-diagnostics-provider.ts # Information diagnostic on never-matched step defs
step-diagnostics-provider.ts # unmatched / ambiguous / outline diagnostics in .feature files
step-code-action-provider.ts # quick-fixes for unmatched and ambiguous steps
step-literal-promotion-provider.ts # refactor: literal → {string}/{int}/{float}
step-literal-promotion-helpers.ts # pure helpers for the literal-promotion refactor
feature-document-symbol-provider.ts # outline / breadcrumb support
feature-table-formatter.ts # Format Document aligner for Gherkin data tables
feature-table-formatter-helpers.ts # pure helpers for the table formatter
feature-skip-ranges.ts # doc-string / table / examples skip-range computation
bddgen-diagnostics-provider.ts # republishes bddgen errors as .feature diagnostics
bddgen-error-parser.ts # pure bddgen-output → diagnostic-location parser
ui/
status-bar.ts # left-side status item: idle / running / last result
test-providers/
playwright-bdd-test-provider.ts # bridges Test Explorer to playwright-bdd
live-test-run-progress.ts # applies terminal results to an open TestRun
specwright-live-reporter.ts # bundled Playwright reporter for live result events
group-scenarios.ts # pure scenario-grouping function (vitest-covered)
constants.ts # shared OUTLINE_ID_SEPARATOR constant
utils/
playwright-json-parser.ts # parses Playwright JSON reporter
logger.ts
shell.ts # shell-safe quoting
workspace-path.ts # shared toWorkspaceRelative helper
working-dir.ts # per-run cwd inference + drive-letter canonicalization
discovery-excludes.ts # shared built-in discovery excludes
cucumber-autocomplete-detector.ts # checks for alexkrechik.cucumberautocomplete
test/
__mocks__/vscode.ts # vitest mock of `vscode`
unit/*.test.ts # vitest unit tests
unit/fixtures/ # .feature.txt snapshots for parser tests, off the discovery glob
integration/ # @vscode/test-electron suites
features/ # sample Gherkin + TS steps
playwright.config.ts # sample playwright-bdd config
snippets/gherkin.code-snippets # contributed Gherkin snippets
scripts/
build/esbuild.cjs # bundler config
release.mjs # release / version-bump script
.devcontainer/ # consistent Node 24.21.0 container
- Providers register through
ProviderRegistry(src/core/provider-registry.ts), which is the single owner of provider lifecycle. It reconciles "current state → desired state" on config change and on extension change, so toggling any setting attaches/detaches the right providers without a window reload. - Shared
StepResolverandStepUsageIndexare reference-counted across consumers (Find References + Usage CodeLens + Unused diagnostic share one index). Indexes dispose only when the last consumer's setting flips off, preventing watcher leaks. - Pure helpers live in their own modules (
pattern-humanizer.ts,tag-line-detector.ts,feature-table-formatter-helpers.ts,bddgen-error-parser.ts,step-literal-promotion-helpers.ts) so vitest can exercise the logic without thevscodestub. parseFeatureStepsin step-resolver.ts is the canonical Gherkin step walker, boundary-aware (Scenario:/Background:/Rule:/Feature:/Example:/Scenario Template:), used by every provider that needs effective-keyword resolution.shouldRegisterCompletion(mode, isCucumberAutocompletePresent())is the single pure helper that gates everyauto/on/offprovider. New providers with the same coexistence pattern should reuse it.
The repo has a convention for both (see the relevant .claude/skills/* markdown files locally if you use Claude Code; the procedure works without any tooling):
Adding a setting:
- Declare it under
contributes.configuration.propertiesin package.json. - Add a typed getter on ExtensionConfig.
- Thread it to the consumer (CommandBuilder, a provider's
reconcile*method, etc.). - Update docs/settings.md.
Adding a command:
- Declare it under
contributes.commandsin package.json (withcategory: "Specwright"so it groups properly in the command palette). - Register it in CommandManager: every command id stays in its registration table. Run/debug handler bodies live there too; traceability handler bodies belong in the module that owns the flow (traceability-commands.ts for board/sync, its link module for tag and link flows, its publish module for run+publish), with CommandManager delegating.
- If it's discoverable from a context menu, add it to the relevant
contributes.menusblock. - Update docs/runs.md.