<?php

namespace App\Core\Ai\Services;

class PromptBuilder
{
    public function build(string $task, array $context = []): string
    {
        $payload = [
            'task' => $task,
            'context' => $context,
            'rules' => [
                'Return structured, concise and implementation-ready output.',
                'Do not generate executable PHP unless explicitly requested by a trusted admin.',
                'Keep the answer generic enough to be reused by modules.',
            ],
        ];

        return json_encode($payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
    }
}
