From cdf48456a52bd63b03bfc29c4bf12dd9603ac33c Mon Sep 17 00:00:00 2001 From: mawkone Date: Wed, 3 Jun 2026 10:29:38 -0700 Subject: [PATCH] feat: expose plan and tasks templates inside plan.get API response --- vibn-frontend/app/api/mcp/route.ts | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/vibn-frontend/app/api/mcp/route.ts b/vibn-frontend/app/api/mcp/route.ts index 05f5e82e..b21a24d7 100644 --- a/vibn-frontend/app/api/mcp/route.ts +++ b/vibn-frontend/app/api/mcp/route.ts @@ -5697,6 +5697,56 @@ const SPEC_MAPPING: Record = { checklist: "01-master-prd.md", }; +const PLAN_TEMPLATE = `# Implementation Plan: [FEATURE] + +**Branch**: \`[###-feature-name]\` | **Date**: [DATE] | **Spec**: [link] + +**Input**: Feature specification from \`/specs/[###-feature-name]/spec.md\` + +## 1. Summary +*Briefly describe the primary requirement and technical approach.* + +## 2. Technical Context +- **Language/Version**: [e.g., Node.js v20, Python 3.11] +- **Primary Dependencies**: [e.g., Next.js, Prisma, TailwindCSS] +- **Storage**: [e.g., PostgreSQL, Redis] +- **Testing**: [e.g., Jest, Vitest, Playwright] + +## 3. Project Structure Layout +\`\`\`text +specs/[###-feature]/ +├── plan.md # This file +├── research.md # Phase 0 output +├── data-model.md # Phase 1 output +└── tasks.md # Phase 2 output +\`\`\` + +## 4. Complexity & Constraints +- [e.g. Performance goals, scalability, memory limit] +`; + +const TASKS_TEMPLATE = `# Tasks Backlog: [FEATURE NAME] + +**Prerequisites**: plan.md (required), spec.md (required) + +## 1. Format Guideline: \`[ID] [P?] [Story] Description\` +- **[P]**: Can run in parallel (different files, no dependencies) +- **[Story]**: Which user story this task belongs to (e.g., US1, US2) +- Include exact file paths in task titles + +## 2. Phase 1: Setup & Foundations (Prerequisites) +- [ ] T001 Initialize database schemas and Prisma migrations +- [ ] T002 Setup API routes and express middleware structures + +## 3. Phase 2: User Story 1 - Core Implementation (Priority: P1) +- [ ] T003 [P] [US1] Create [Model] in src/models/[file].ts +- [ ] T004 [US1] Build /api/v1/resource endpoint in src/routes/[file].ts + +## 4. Phase 3: Polish & Verification +- [ ] T005 [P] Run linter and formatting checks +- [ ] T006 Validate end-to-end user journeys +`; + async function readPrdContent( principal: Principal, projectId: string, @@ -5740,6 +5790,10 @@ async function toolPlanGet(principal: Principal, params: Record) { tasks, decisions: [], ideas: [], + templates: { + plan: PLAN_TEMPLATE, + tasks: TASKS_TEMPLATE, + }, }, }); }