feat: add getting started prompt
This commit is contained in:
43
packages/llm/src/prompts/getting-started.ts
Normal file
43
packages/llm/src/prompts/getting-started.ts
Normal file
@@ -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.`,
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user