openspec_reply_review
Reply to a review comment on a proposal, design, specification, or task to provide feedback and keep the review process moving.
Instructions
Reply to a review comment
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targetType | Yes | ||
| targetId | Yes | ||
| reviewId | Yes | ||
| body | Yes | ||
| author | No | ai |
Implementation Reference
- src/server/tools/reviews.ts:116-148 (handler)Tool registration and handler for 'openspec_reply_review'. Registers the tool with input schema (targetType, targetId, reviewId, body, author) and implements the handler that calls reviewManager.addReply().
server.registerTool( 'openspec_reply_review', { description: 'Reply to a review comment', inputSchema: { targetType: z.enum(['proposal', 'design', 'spec', 'tasks']), targetId: z.string(), reviewId: z.string(), body: z.string(), author: z.string().default('ai'), }, }, async ({ targetType, targetId, reviewId, body, author }) => { const reply = await reviewManager.addReply( targetType as ReviewTargetType, targetId, reviewId, author, body ); if (!reply) { return { content: [{ type: 'text', text: `❌ Review ${reviewId} not found` }], isError: true, }; } return { content: [{ type: 'text', text: `💭 Reply added to ${reviewId}` }], }; } ); - src/server/tools/reviews.ts:118-127 (schema)Input schema definition for openspec_reply_review: targetType (enum), targetId (string), reviewId (string), body (string), author (string with default 'ai').
{ description: 'Reply to a review comment', inputSchema: { targetType: z.enum(['proposal', 'design', 'spec', 'tasks']), targetId: z.string(), reviewId: z.string(), body: z.string(), author: z.string().default('ai'), }, }, - src/index.ts:65-65 (registration)Registration point where registerReviewTools is called with the server and reviewManager instance.
registerReviewTools(server, reviewManager); - src/core/review-manager.ts:233-258 (helper)The addReply() method in ReviewManager that stores a reply on a review comment. Finds the review by ID, creates a ReviewReply with UUID, pushes it, and saves.
async addReply( targetType: ReviewTargetType, targetId: string, reviewId: string, author: string, body: string ): Promise<ReviewReply | null> { const reviews = await this.loadReviews(targetType, targetId); const review = reviews.find((r) => r.id === reviewId); if (!review) { return null; } const reply: ReviewReply = { id: randomUUID().substring(0, 8), author, body, createdAt: new Date().toISOString(), }; review.replies.push(reply); await this.saveReviews(targetType, targetId, reviews); return reply; } - src/core/review-manager.ts:39-44 (schema)Type definition for ReviewReply interface used by the reply handler.
export interface ReviewReply { id: string; author: string; body: string; createdAt: string; }