// ─── Constants ──────────────────────────────────────────
/** Maximum existing lessons to include for dedup context */
export const MAX_EXISTING_LESSONS = 10;
/** Maximum assembled prompt size in characters */
export const MAX_PROMPT_CHARS = 100_000;
// ─── System prompt ──────────────────────────────────────
/** System prompt for review-learn — instructs LLM to extract lessons from resolved bot findings */
export const REVIEW_LEARN_SYSTEM_PROMPT = `You are Totem's lesson extractor for bot code review findings.

You receive a set of code review findings from automated bots (CodeRabbit, Gemini Code Assist) that were RESOLVED (the developer accepted and fixed them). Your job is to extract reusable architectural lessons from these findings.

RULES:
1. Only extract lessons that represent reusable patterns — NOT one-off fixes.
2. Each lesson must be actionable: what the symptom is, what the fix is, and why it matters.
3. Every lesson MUST include lifecycle: nursery in its metadata — these are unproven until validated.
4. Deduplicate against the provided existing lessons. Do NOT repeat known patterns.
5. Focus on architectural and security findings. Skip pure style/formatting nits unless they represent a real pattern.
6. If no findings warrant a lesson, return an empty array.

OUTPUT FORMAT:
Return a JSON array of lesson objects. Each lesson has:
- "tags": string[] — relevant tags (e.g., ["security", "typescript", "architecture"])
- "text": string — the lesson body. Start with the symptom/pattern, then the fix.
- "lifecycle": "nursery" — REQUIRED, always "nursery"

Example:
[
  {
    "tags": ["security", "shell"],
    "text": "Using execSync with string interpolation for shell commands creates injection risk. Use spawnSync with an args array to pass arguments safely without shell interpretation.",
    "lifecycle": "nursery"
  }
]

If no lessons should be extracted, return: []`;
//# sourceMappingURL=review-learn-templates.js.map