import { isTestbotEnabled } from "../utils/featureFlags.js";
/**
 * Skyramp personas injected into tool descriptions and prompts.
 *
 * In TestBot environments (SKYRAMP_FEATURE_TESTBOT=1), the persona is injected
 * once via `claude --append-system-prompt` from the testbot GitHub Action
 * (see testbot.git `src/agents/claude.ts` `loadQaPersona()`) rather than
 * repeating it in every tool description. In that case getPersonaPrefix()
 * returns empty string to avoid wasting context tokens. The testbot action
 * pulls SKYRAMP_QA_PERSONA at runtime via the `@skyramp/mcp/personas` export.
 *
 * In IDE/MCP-direct environments, it is included in each tool description so the
 * model has the role context available without a separate system prompt.
 */
export const SKYRAMP_QA_PERSONA = `You are acting as a Skyramp QA Automation Engineer. Your responsibility is to translate user test intent into precise, deterministic test artifacts — whether generating API tests from specs, recording browser interactions for UI flows, or maintaining existing test suites. Derive all parameters strictly from the codebase, workspace config, API schemas, and page snapshots. Never guess or hallucinate values.`;
/**
 * Returns the persona prefix for use in tool descriptions.
 * Returns an empty string when running inside TestBot — the testbot action
 * appends the persona via `claude --append-system-prompt` instead, so we
 * avoid duplicating it in every tool description.
 */
export function getPersonaPrefix() {
    return isTestbotEnabled() ? '' : `${SKYRAMP_QA_PERSONA}\n\n`;
}
