// prompts/index.ts — Registers MCP prompts for guided Planu workflows.
// Each prompt returns structured messages that guide the LLM through a workflow.
import { z } from 'zod';
import { t, ti } from '../i18n/index.js';
// ---------------------------------------------------------------------------
// Prompt: create-feature
// ---------------------------------------------------------------------------
function registerCreateFeaturePrompt(server) {
    server.registerPrompt('create-feature', {
        title: 'Create Feature',
        description: t('prompts.createFeature.description'),
        argsSchema: {
            title: z.string().describe('Short title for the feature'),
            description: z.string().describe('Detailed description of what the feature should do'),
            type: z
                .enum(['feature', 'bugfix', 'refactor', 'performance', 'security', 'docs'])
                .describe('Type of work: feature, bugfix, refactor, performance, security, docs')
                .default('feature'),
            scope: z
                .string()
                .describe('Area of the project affected (e.g. "auth", "api", "ui")')
                .optional(),
        },
    }, (args) => ({
        messages: [
            {
                role: 'user',
                content: {
                    type: 'text',
                    text: ti('prompts.createFeature.message', {
                        title: args.title,
                        description: args.description,
                        type: args.type,
                        scope: args.scope ?? 'general',
                    }),
                },
            },
        ],
    }));
}
// ---------------------------------------------------------------------------
// Prompt: review-spec
// ---------------------------------------------------------------------------
function registerReviewSpecPrompt(server) {
    server.registerPrompt('review-spec', {
        title: 'Review Spec',
        description: t('prompts.reviewSpec.description'),
        argsSchema: {
            specId: z.string().describe('The spec ID to review (e.g. "SPEC-001")'),
        },
    }, (args) => ({
        messages: [
            {
                role: 'user',
                content: {
                    type: 'text',
                    text: ti('prompts.reviewSpec.message', { specId: args.specId }),
                },
            },
        ],
    }));
}
// ---------------------------------------------------------------------------
// Prompt: implement-spec
// ---------------------------------------------------------------------------
function registerImplementSpecPrompt(server) {
    server.registerPrompt('implement-spec', {
        title: 'Implement Spec',
        description: t('prompts.implementSpec.description'),
        argsSchema: {
            specId: z.string().describe('The spec ID to implement (e.g. "SPEC-001")'),
        },
    }, (args) => ({
        messages: [
            {
                role: 'user',
                content: {
                    type: 'text',
                    text: ti('prompts.implementSpec.message', { specId: args.specId }),
                },
            },
        ],
    }));
}
// ---------------------------------------------------------------------------
// Prompt: project-status
// ---------------------------------------------------------------------------
function registerProjectStatusPrompt(server) {
    server.registerPrompt('project-status', {
        title: 'Project Status',
        description: t('prompts.projectStatus.description'),
        argsSchema: {
            projectId: z.string().describe('The project ID (hash) to get status for').optional(),
        },
    }, (args) => ({
        messages: [
            {
                role: 'user',
                content: {
                    type: 'text',
                    text: ti('prompts.projectStatus.message', {
                        projectId: args.projectId ?? 'current',
                    }),
                },
            },
        ],
    }));
}
// ---------------------------------------------------------------------------
// Public registry
// ---------------------------------------------------------------------------
/**
 * Registers all MCP prompts on the server.
 */
export function registerPrompts(server) {
    registerCreateFeaturePrompt(server);
    registerReviewSpecPrompt(server);
    registerImplementSpecPrompt(server);
    registerProjectStatusPrompt(server);
}
//# sourceMappingURL=index.js.map