← BACK

Grand-Line-Editor

JavaScript ⭐ 0

🏴‍☠️ Grand Line Editor

A Raw XML Conversation Editor for AI Red Teaming & Stress Testing.

Grand Line Editor is a specialized, local-first web tool designed for AI researchers, red teamers, and prompt engineers. Wrapped in a beautiful, dynamic "Pirate Scroll" aesthetic, this tool gives you absolute, raw control over the multi-turn context window of LLMs.

By exposing the raw XML structure (<user>, <thinking>, <assistant>), you can manually forge conversation histories, inject artificial chains of thought, and manipulate the model's perceived persona to test guardrails, RLHF alignment, and safety boundaries.


🎯 Why Use This for Red Teaming?

Standard chat interfaces sanitize your inputs and enforce strict turn-taking rules. Grand Line Editor removes all guardrails, allowing you to:

  1. Context Hijacking (Persona Forging): Manually write fake previous turns from the <assistant>. By forging a history where the AI has already agreed to break rules or adopt a malicious persona, you can bypass standard RLHF refusals.
  2. Chain of Thought (CoT) Manipulation: Inject custom <thinking> blocks right before the model generates its response. You can force the model down a specific logical path or premise, heavily skewing its final output.
  3. Targeted Tag Generation: Use the "Ask AI" modal to force the model to generate only a specific tag. For example, force the model to generate only its inner <thinking> process without providing an external answer, allowing you to peek into its safety evaluation logic.
  4. Custom Turn Instructions: Inject hidden meta-instructions into the prompt just for a single turn, without polluting the visible conversation history.

✨ Features

  • Raw XML Editor: No chat bubbles. You edit the entire conversation as a single, raw text document.
  • Sail Mode: Automatically formats AI-generated XML into clean, newline-delimited tags.
  • Jump-Out Shortcuts: Press Enter right before a closing tag (like </user>) to instantly jump past it to a new line, keeping your flow uninterrupted.
  • Instant Generation: Press Ctrl + Enter anywhere to instantly trigger the AI using your last saved instruction and target tag.
  • Custom Tags: Add your own XML tags (e.g., <system_override>, <evaluator>) via the UI to test custom model architectures.
  • Dynamic Aesthetic: A stunning, animated parchment scroll UI that physically unfurls when you load the page.

🚀 Setup & Usage

Since this is a client-side only tool, there is no build step required.

  1. Clone or download this repository.
  2. Open index.html directly in any modern web browser.
  3. Click the Bounty/Settings icon in the top right.
  4. Enter your API Key for either Groq or OpenRouter.
  5. Select your target model.
  6. Start red teaming!

⌨️ Keyboard Shortcuts

Shortcut Action
Alt + U Insert <user> tag
Alt + T Insert <thinking> tag
Alt + A Insert <assistant> tag
Ctrl + Shift + S Open the "Ask AI" modal (Custom instructions & Target Tag selection)
Ctrl + Enter Instantly trigger AI generation (Uses last saved modal settings)
Enter (before closing tag) Jump out of the current tag to a new line

⚠️ Disclaimer

This tool is intended for authorized red teaming, security research, and model alignment testing. Ensure you comply with the Terms of Service of your chosen API provider (Groq/OpenRouter) when conducting stress tests.