diff --git a/packages/wbfy/src/generators/agents.ts b/packages/wbfy/src/generators/agents.ts index f427dfc5..4a79e151 100644 --- a/packages/wbfy/src/generators/agents.ts +++ b/packages/wbfy/src/generators/agents.ts @@ -47,6 +47,8 @@ function generateAgentInstruction( extraContent?: string ): string { const packageManager = getPackageManagerCommand(rootConfig); + // Ask agents to isolate temporary files so parallel runs in shared workspaces do not collide. + const temporaryFileInstruction = '- Put temporary files in a unique location within the ".tmp" or "/tmp" directory.'; const baseContent = ` ## Project Information @@ -75,7 +77,7 @@ function generateAgentInstruction( - If not specified, make sure to add a new line at the end of your commit message${rootConfig.isWillBoosterRepo ? ` with: \`Co-authored-by: WillBooster (${toolName}) \`` : ''}. - Always create new commits. Avoid using \`--amend\`. - Always use heredoc syntax when passing multi-line content to any command. -- Put temporary files in the \`.tmp\` or \`/tmp\` directory. +${temporaryFileInstruction} ${hasPlaywrightTestServer(allConfigs) ? `- Use \`${packageManager} wb start --mode test\` to launch a web server for debugging or testing.` : ''} ${generateAgentCodingStyle(allConfigs)}