/**
 * Preview Deployment Prompt Instructions
 *
 * Conditional prompt section injected when the agent's initiative has
 * a project with `.cw-preview.yml`. Provides prefilled commands using
 * the agent's own ID so the server can resolve everything else.
 */

export function buildPreviewInstructions(agentId: string): string {
  return `

<preview_deployments>
This project supports preview deployments via Docker. You can spin up a running
instance to verify your changes visually or explore the app.

## Start a Preview
cw preview start --agent ${agentId}

Automatically uses your worktree (dev mode with hot reload). The URL is printed
to stdout (e.g. http://abc123.localhost:9100).

## Check Preview Status
cw preview list

## Stop a Preview
cw preview stop --agent ${agentId}

## When to Use
- After implementing a UI change, spin up a preview to verify rendering.
- After API changes, verify the frontend still works end-to-end.
- To explore the existing app state via Chrome DevTools or browser.

## When NOT to Use
- Backend-only changes with no visual component — run tests instead.
- If Docker is not available (the command will fail gracefully).
</preview_deployments>`;
}
