Hive Hive
Sign in

feat(specs): manage spec comments via protocol server

GitHub issue · Closed

Metadata
Source
tuist/hive #63
Updated
Jun 24, 2026
Domains
Hive
Details

What changed

This adds dedicated spec comment support to Hive’s Model Context Protocol server.

The change introduces list_spec_comments for reading the discussion thread of a visible spec and delete_spec_comment for removing a comment authored by the caller. Both tools are registered with the server, and the delete tool is marked as destructive in its annotations. The specs context now exposes an author-only delete function that uses the same ownership rule as comment editing. The public documentation now describes the protocol server’s spec comment capabilities.

Why

Protocol clients could already add and update authored spec comments, and get_spec included comments as part of the full spec payload. They still lacked a focused way to fetch only a spec’s comments, and they could not remove comments they authored. That left protocol clients behind the dashboard-backed comment workflow and forced users to switch surfaces for common discussion cleanup.

Approach

list_spec_comments accepts the same spec references as the existing spec tools, verifies that the caller can view the parent spec, and returns a compact spec header plus the shared comment JSON shape. delete_spec_comment accepts a comment identifier returned by the existing spec tools, verifies that the caller can view the parent spec, then delegates the delete to the specs context.

Non-authors receive the same unauthorized response used by comment updates, and hidden specs continue to return not found.

Impact

Authenticated protocol clients can now list comments for visible specs and remove their own spec comments. There are no database migrations or operator steps.

Validation

  • mix test test/hive/mcp/server_test.exs test/hive/mcp/components/tools/list_spec_comments_test.exs test/hive/mcp/components/tools/get_spec_test.exs test/hive/mcp/components/tools/add_spec_comment_test.exs test/hive/mcp/components/tools/update_spec_comment_test.exs test/hive/mcp/components/tools/delete_spec_comment_test.exs
  • mix test test/hive/specs_test.exs test/hive/mcp/server_test.exs test/hive/mcp/components/tools/delete_spec_comment_test.exs test/hive/mcp/components/tools/update_spec_comment_test.exs test/hive/mcp/components/tools/add_spec_comment_test.exs
  • mix compile --warnings-as-errors
  • git diff --check
Comments

No GitHub comments yet.