/**
 * system-prompt.ts — assembles the `olam ask` SDK system prompt.
 *
 * The system prompt is the Claude Code preset `append` text: a behavioural
 * contract ("you are olam's built-in assistant…") followed by the bundled
 * knowledge pack. Keeping assembly pure + exported lets the test assert the
 * pack is actually embedded (Rule 9 — a regression that drops the pack would
 * silently degrade every answer to ungrounded guesses).
 */
/** Instruction preamble — the assistant's role + answer discipline. */
export const ASK_SYSTEM_PREAMBLE = `You are olam's built-in assistant, answering questions about how to use, set up, and operate olam from its command line.

Behaviour:
- Answer olam usage / setup / CLI questions concisely and accurately, grounded in the knowledge pack below and — when available — the local repo files you can read.
- Prefer the exact command, config key, or doc path over prose. Show the command the operator should run.
- If a checkout's local files are available and more current than the pack, trust the files.
- If you are unsure or the answer isn't covered, say so plainly and point to the most relevant doc (under \`docs/\`) or command (\`olam <cmd> --help\`). Do not invent flags, commands, or config keys.
- Keep answers focused. Use short paragraphs or tight bullet lists. No filler.
- You are a read-only assistant: never modify files, run mutating commands, or create worlds. If asked to do something destructive, explain the command instead of performing it.`;
/**
 * Build the full system-prompt `append` text fed to the SDK. Pure + exported
 * so the regression test can assert (a) the preamble is present and (b) the
 * knowledge pack body is embedded verbatim.
 */
export function assembleSystemPrompt(input) {
    const locality = input.insideCheckout
        ? `You are running inside an olam checkout at \`${input.repoRoot ?? process.cwd()}\`. You may read repo files (README, docs/, packages/) to give fresher, more precise answers than the bundled pack alone.`
        : `You are running outside an olam checkout (installed via npx). Answer from the bundled knowledge pack below; there are no local repo files to read.`;
    return [ASK_SYSTEM_PREAMBLE, locality, input.knowledgePack].join('\n\n');
}
//# sourceMappingURL=system-prompt.js.map