diff --git a/packages/llm/src/prompts/getting-started.ts b/packages/llm/src/prompts/getting-started.ts new file mode 100644 index 0000000..9e110c6 --- /dev/null +++ b/packages/llm/src/prompts/getting-started.ts @@ -0,0 +1,43 @@ +import type { LLMMessage, CodeStructure } from "@codeboard/shared"; + +export function buildGettingStartedPrompt( + structure: CodeStructure, + architectureOverview: string, + readmeContent?: string, + packageJsonContent?: string +): LLMMessage[] { + return [ + { + role: "system", + content: `You are writing an onboarding guide for a new developer joining this project. Be specific and actionable. + +Output format: +## Prerequisites +[list required tools, runtimes, and their versions] + +## Setup Steps +[numbered list of concrete commands and actions to get the project running locally] + +## Your First Task +[suggest a good first contribution — something small but meaningful that touches multiple parts of codebase]`, + }, + { + role: "user", + content: `Create an onboarding guide for this project. + +ARCHITECTURE OVERVIEW: +${architectureOverview} + +${readmeContent ? `README:\n${readmeContent.slice(0, 3000)}` : "README: not available"} + +${packageJsonContent ? `PACKAGE.JSON:\n${packageJsonContent.slice(0, 2000)}` : ""} + +LANGUAGES: ${[...new Set(structure.files.map((f) => f.language))].join(", ")} +ENTRY POINTS: ${structure.entryPoints.join(", ") || "none detected"} +TOTAL FILES: ${structure.files.length} +TOTAL MODULES: ${structure.modules.length} + +Write a concrete, actionable onboarding guide.`, + }, + ]; +}