Skip to content

mutate: dedicated template operators for semantic_rephrase and indirect_request #24

Open

Description

@CodewithJha

Problem

MutationEngine advertises six operators (ALL_OPERATORS in packages/mutiny_core/src/mutiny_core/mutate/engine.py). Without an LLM, template fallback aliases:

Logical operator Template mapped to
semantic_rephrase authority_escalation
indirect_request confirmation_bypass
argument_nudging argument_nudge_template (real)

So offline/template campaigns never exercise distinct rephrase or indirect-request strategies — lineage claims mutate:semantic_rephrase while template_operator is authority framing.

Repository evidence

  • MutationEngine._template_child mapping (~lines 145–153)
  • TemplateMutator / TEMPLATE_OPERATORS in templates.py — no semantic_rephrase / indirect_request implementations
  • tests/unit/test_mutate.py covers multi_turn / generic mutate, not these aliases

Why it matters

Most CI and sample runs are template-mode (MUTINY_SAMPLE_OFFLINE). Distinct operators improve search diversity without requiring Featherless.

Proposed direction

Implement deterministic template transforms:

  1. semantic_rephrase — paraphrase last user turn via synonym/template bank; preserve tool/ask intent from AttackFocus.
  2. indirect_request — wrap the ask as “draft/prepare a call to {tool} …” without APR/manager prefixes (those stay on confirmation_bypass / authority).

Keep LLM prompts as-is; only fix the no-LLM path. Add unit tests asserting metadata.template_operator matches the logical name (or equals a dedicated template id).

Acceptance criteria

  • Template path for semantic_rephrase and indirect_request no longer silently uses authority/confirmation templates
  • Seedable / deterministic with rng_seed
  • Unit tests for both operators + lineage fields
  • No Hosted or policy evaluator changes

Testing expectations

uv run pytest tests/unit/test_mutate.py -q

Scope / NOT included

  • New LLM providers; changing fitness; jailbreak corpora

Difficulty

M · core / mutation

Activity

  1. added
    enhancementNew feature or request
    help wantedExtra attention is needed
    priority:P2Meaningful independent improvement
    coremutiny_core engine
    on Sep 9, 2026
  2. self-assigned this
    on Sep 9, 2026
  3. BasilZafar11 commented on Nov 9, 2026

    @BasilZafar11
    Contributor

    Opened PR #144 with dedicated, deterministic templates for semantic_rephrase and indirect_request, plus lineage and fallback tests. All 780 tests and seven CI checks pass.

    #144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coremutiny_core engineenhancementNew feature or requesthelp wantedExtra attention is neededpriority:P2Meaningful independent improvement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions