> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ko/llms.txt # 빌드베이스Prompt() `buildBasePrompt()`코딩 Agent에 대한 공유 기반 시스템 Prompt, 즉 Agent를 좋은 코딩 보조자로 만드는 행동 지침을 구축합니다. 소요되는 시간`PromptContext`현재 환경(프로젝트, 플랫폼, Git 브랜치, 모드, Model)을 설명하고 Prompt를 문자열로 반환합니다. 제품별 문자열은 `productName`, `coAuthorName`, `coAuthorEmail`을 통해 매개변수화되므로, 포크하지 않고도 Prompt와 커밋 트레일러의 브랜드를 변경할 수 있습니다. 기본값은 `"Mastra Code"` / `"noreply@mastra.ai"`이므로 기존 호출자는 동일한 출력을 유지합니다. Agent에 런타임 정의 지침을 빌드할 때 [`createCodingAgent()`](https://mastra.zisheng.pro/ko/reference/coding-agent/create-coding-agent)와 함께 사용하세요. ## 사용예 다음에서 기본 Prompt를 구축합니다.`PromptContext`: ```typescript import { buildBasePrompt } from '@mastra/core/coding-agent' const prompt = buildBasePrompt({ projectPath: process.cwd(), projectName: 'my-app', gitBranch: 'main', platform: process.platform, date: new Date().toDateString(), mode: 'build', modelId: 'openai/gpt-5', toolGuidance: '', }) ``` Prompt의 브랜드를 변경하려면 제품 및 공동 작성자 필드를 전달하세요. ```typescript const prompt = buildBasePrompt({ // ...environment fields productName: 'Acme Coder', coAuthorName: 'Acme Bot', coAuthorEmail: 'bot@acme.dev', }) ``` ## 매개변수 `buildBasePrompt()`한 개를 가져간다`PromptContext` object. **projectPath** (`string`): 프로젝트 루트의 절대 경로입니다. **projectName** (`string`): 프로젝트의 표시 이름입니다. **gitBranch** (`string`): 프로젝트가 git 저장소인 경우 현재 git 브랜치입니다. **platform** (`string`): 운영 체제 플랫폼입니다(예: process.platform의 값). **commonBinaries** (`{ name: string; path: string | null }[]`): 시스템에서 감지된 일반 바이너리입니다. 각각 이름과 확인된 경로를 포함하며, 찾지 못한 경우 경로는 null입니다. **date** (`string`): Prompt에 삽입되는 현재 날짜 문자열입니다. **mode** (`string`): 활성 Agent 모드입니다(예: "build" 또는 "plan"). **modelId** (`string`): 활성 Model의 식별자이며, 제공된 경우 커밋의 Co-Authored-By 줄에 포함됩니다. **activePlan** (`{ title: string; plan: string; approvedAt: string } | null`): 현재 승인된 계획이 있는 경우 해당 계획입니다. **toolGuidance** (`string`): Prompt에 추가되는 Tool 사용 지침 섹션입니다. **productName** (`string`): Prompt 헤더에 사용되는 표시 이름입니다. (Default: `Mastra Code`) **coAuthorName** (`string`): 커밋의 Co-Authored-By 줄에 사용되는 이름입니다. (Default: `Mastra Code`) **coAuthorEmail** (`string`): 커밋의 Co-Authored-By 줄에 사용되는 이메일입니다. (Default: `noreply@mastra.ai`) ## 보고 **prompt** (`string`): 코딩 Agent의 기본 시스템 Prompt입니다. ## 관련된 - [`createCodingAgent()`](https://mastra.zisheng.pro/ko/reference/coding-agent/create-coding-agent)