Skip to content

M27.2: Prompt templates module with persona/philosophy/guardrails blocks #592

@bug-ops

Description

@bug-ops

Parent: #590
Blocked by: M27.1

Scope

Create zeph-core/src/prompt_templates.rs with modular prompt text blocks:

  1. Persona blocks (3 variants, one per InteractionMode):

    • PERSONA_ASSISTANT, PERSONA_CODING, PERSONA_AUTOMATION
  2. Philosophy blocks (3 variants, one per ExpertiseLevel):

    • PHILOSOPHY_BEGINNER, PHILOSOPHY_INTERMEDIATE, PHILOSOPHY_EXPERT
  3. Guardrails blocks (up to 9 combinations, grouped by dominant factor):

    • Common security guardrails (always present)
    • Level-specific guardrails (beginner gets confirmation requirements, expert gets minimal)
    • Mode-specific guardrails (coding gets test-before-commit, automation gets error-only reporting)
  4. Selector functions:

    • fn persona(mode: InteractionMode) -> &'static str
    • fn philosophy(level: ExpertiseLevel) -> &'static str
    • fn guardrails(level: ExpertiseLevel, mode: InteractionMode) -> String

Acceptance Criteria

  • All text blocks as const &str (no external files)
  • Prompt text in English per project conventions
  • Selector functions are #[must_use]
  • Unit tests verifying each combination produces non-empty, distinct output
  • No duplicate content between blocks (DRY)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions