round_1_context
Retrieve the initial prompt for a structured planning session. Provide a problem description, then generate your plan, and finally save the result.
Instructions
Get the Round 1 prompt — call this first, then generate your plan, then call round_1 to save
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| problemDescription | Yes | The problem or requirement to plan for |
Implementation Reference
- src/server.ts:82-93 (registration)Registration of the 'round_1_context' tool on the MCP server, with schema (problemDescription) and handler callback that calls getRound1Context.
// ─── round_1_context ────────────────────────────────────────────── server.tool( "round_1_context", "Get the Round 1 prompt — call this first, then generate your plan, then call round_1 to save", { problemDescription: z.string().describe("The problem or requirement to plan for"), }, async (params) => { const prompt = await getRound1Context(projectRoot, params.problemDescription); return { content: [{ type: "text", text: prompt }] }; } ); - src/tools/round1.ts:149-160 (handler)The getRound1Context function: reads config for the project name, then delegates to generateRound1Prompt.
/** * Get the Round 1 prompt for a given project and problem. * This is called to provide context to the model before it generates its plan. */ export async function getRound1Context( projectRoot: string, problemDescription: string ): Promise<string> { const config = await readConfig(projectRoot); const projectName = config?.projectName ?? "Unknown Project"; return generateRound1Prompt(projectName, problemDescription); } - src/tools/round1.ts:22-40 (helper)generateRound1Prompt: builds the prompt string injected into the model with project name and problem description.
export function generateRound1Prompt( projectName: string, problemDescription: string ): string { return `You are participating in a multi-model planning session using PolyPlan. PROJECT: ${projectName} ROUND: 1 of 3 — Individual Plan PROBLEM/REQUIREMENT: ${problemDescription} Your task: Create a detailed implementation plan for this problem. Be thorough. Cover architecture, file structure, edge cases, dependencies, open questions you have, and any risks you foresee. This plan will be reviewed by other AI models in the next round. Save your plan with clear section headers.`; } - src/server.ts:86-88 (schema)The input schema for round_1_context: requires a single 'problemDescription' string.
{ problemDescription: z.string().describe("The problem or requirement to plan for"), }, - src/core/session.ts:25-34 (helper)readConfig: reads .polyplan/config.json to get the projectName used in the prompt.
export async function readConfig(projectRoot: string): Promise<PolyPlanConfig | null> { const configPath = path.join(projectRoot, CONFIG_FILE); try { const raw = await fs.readFile(configPath, "utf-8"); return JSON.parse(raw) as PolyPlanConfig; } catch { return null; } }