Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.

docs: expand Gherkin coverage from README; slim README to pointer#4

Merged
GusCayresMindsight merged 3 commits into
masterfrom
feat/readme-to-feature-files
May 15, 2026
Merged

docs: expand Gherkin coverage from README; slim README to pointer#4
GusCayresMindsight merged 3 commits into
masterfrom
feat/readme-to-feature-files

Conversation

@GusCayresMindsight

Copy link
Copy Markdown
Owner

Summary

  • Every section of the old README that had no Gherkin spec now has one: installation, mcp-env, tui-commands, mcp-servers, smoke-test, prerequisites
  • Scenarios requiring live systems (tmux, real binary installs, network) are tagged @wip; cucumber.js skips them by default via tags: 'not @wip'
  • Step definitions implemented for the three fully unit-testable feature files — 16 new passing scenarios added
  • README rewritten as a ~35-line thin pointer: tagline, quick-start, and a table of links to every docs/*.feature file

New files

File Scenarios @wip Unit-tested
docs/installation.feature 8 8 0 — real binary installs
docs/mcp-env.feature 6 2 4 — file format, merge, update, dir creation
docs/tui-commands.feature 7 7 0 — requires tmux
docs/mcp-servers.feature 10 0 10 — validates lib/opencode.json.template
docs/smoke-test.feature 4 4 0 — end-to-end
docs/prerequisites.feature 6 4 2 — Node version + engines.node field

Test result

69 scenarios (69 passed)
293 steps (293 passed)

All previously passing scenarios still pass; 16 new unit-testable scenarios added.

… schema

setRequestHandler() in @modelcontextprotocol/sdk requires a Zod schema as
its first argument (ListToolsRequestSchema / CallToolRequestSchema), not a
plain object like { method: 'tools/list' }.  Passing a plain object caused
the SDK to throw 'Schema is missing a method literal' synchronously during
server construction, so the process exited immediately on every mcp-serve
invocation.

Fixes:
- Use ListToolsRequestSchema and CallToolRequestSchema from the SDK's
  types module in both setRequestHandler calls.
- Extract server setup into createMcpServer({ Server, ListToolsRequestSchema,
  CallToolRequestSchema }) so it can be unit-tested without a real stdio
  transport.
- Remove the module-level startServer() auto-call; export startServer()
  explicitly and call it from bin/cli.js so requiring the module in tests
  is safe.

Tests added (docs/tool-retrieval-mcp.feature + step-definitions):
- Zod schema validation: asserts setRequestHandler is called with proper
  Zod schemas (not plain objects) using a mock Server + safeParse checks.
- list-tools wire protocol: full Client<->Server round-trip via
  InMemoryTransport; asserts search_tools appears in the manifest.
- call-tool wire protocol: same in-process transport; asserts a valid
  CallToolResult envelope is returned (empty corpus path, no embedder needed).

All 53 scenarios pass (234 steps).
- Add 6 new docs/*.feature files covering every section of the old README
  that had no Gherkin spec: installation, mcp-env, tui-commands,
  mcp-servers, smoke-test, prerequisites
- Scenarios that require live systems (tmux, real binary installs,
  network) are tagged @wip; cucumber.js now sets tags:'not @wip' so
  they are skipped by default in npm test
- Add step definitions for the three unit-testable feature files:
  mcp-env.steps.js (file format, merge, update, dir creation),
  mcp-servers.steps.js (validates lib/opencode.json.template directly),
  prerequisites.steps.js (Node version + engines field check)
- All 69 scenarios / 293 steps pass (16 new unit-testable scenarios added)
- Rewrite README.md as a thin pointer: tagline, quick-start, table of
  links to every docs/*.feature file, and a one-liner on @wip semantics
@GusCayresMindsight GusCayresMindsight enabled auto-merge (squash) May 15, 2026 20:24
@GusCayresMindsight GusCayresMindsight merged commit cb91a84 into master May 15, 2026
4 checks passed
@GusCayresMindsight GusCayresMindsight deleted the feat/readme-to-feature-files branch May 15, 2026 20:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant