Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/wbfy/src/generators/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Markdown, it is standard to use backticks for file paths and directory names. The previous version used backticks, and switching to double quotes is a regression in formatting consistency. Also, please consider inlining this string directly into the baseContent template literal to follow the preference for a single template literal for prompts (Rule 17) and to simplify the code (Rule 6). Lastly, the generated files like AGENTS.md seem to be missing these updates; please ensure they are regenerated and included in the PR.

Suggested change
const temporaryFileInstruction = '- Put temporary files in a unique location within the ".tmp" or "/tmp" directory.';
const temporaryFileInstruction = '- Put temporary files in a unique location within the `.tmp` or `/tmp` directory.';
References
  1. Simplify code as much as possible to eliminate redundancy. (link)
  2. Prefer using a single template literal for prompts instead of join() with a pre-computable array literal of strings. (link)

const baseContent = `
## Project Information

Expand Down Expand Up @@ -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}) <agent@willbooster.com>\`` : ''}.
- 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)}
Expand Down
Loading