Skip to content

feat(reqstool-openspec): implement openspecui hook for enrich_document MCP tool#25

Merged
jimisola merged 3 commits into
mainfrom
feat/openspecui-hook-enrich-document
May 16, 2026
Merged

feat(reqstool-openspec): implement openspecui hook for enrich_document MCP tool#25
jimisola merged 3 commits into
mainfrom
feat/openspecui-hook-enrich-document

Conversation

@jimisola

@jimisola jimisola commented May 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds reqstool-openspec:init skill that writes openspec/openspecui.hooks.ts into the consuming project
  • The hook spawns reqstool mcp as a subprocess using Node.js child_process only (no npm deps), caches the MCP client as a module singleton, and calls enrich_document to inline requirement/SVC/MVR titles and descriptions into all OpenSpec documents (spec, changes, archived) at read time
  • Bumps reqstool-openspec plugin to 0.2.0 and marketplace to 0.4.0

Test plan

  • Run /reqstool-openspec:init in a project — confirms openspec/openspecui.hooks.ts is created
  • Re-running with an existing file asks the user before overwriting
  • With reqstool on PATH and openspecui configured, opening a spec document shows enriched requirement/SVC IDs inline
  • Closing the session kills the reqstool mcp subprocess
  • With reqstool not on PATH, a warning diagnostic appears instead of a hard error

Closes #24

jimisola added 3 commits May 16, 2026 16:44
…t MCP tool

Add reqstool-openspec:init skill that writes openspec/openspecui.hooks.ts
into the consuming project. The hook spawns reqstool mcp as a subprocess
(Node.js built-ins only, no npm deps), caches the MCP client as a module
singleton, and calls enrich_document to inline requirement/SVC/MVR titles
and descriptions into all OpenSpec documents at read time.

Closes #24

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
…ect plugin discovery

The plugin loader does not traverse into subdirectories of a skill that
already has a SKILL.md. Moving reqstool-openspec-init to its own top-level
skills directory mirrors the pattern used by the reqstool plugin.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
- Add // @reqstool-openspec-hooks: 0.1.0 to the hooks template so the
  init skill can detect whether an installed copy is current or stale
- Update reqstool-openspec:init to compare versions and offer an upgrade
  instead of a blind overwrite prompt
- Update reqstool-openspec convention skill to suggest running the init
  skill when openspec/openspecui.hooks.ts is missing from the project

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola self-assigned this May 16, 2026
@jimisola jimisola merged commit ad9b6f6 into main May 16, 2026
3 checks passed
@jimisola jimisola deleted the feat/openspecui-hook-enrich-document branch May 16, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement openspecui hook for enrich_document MCP tool

1 participant