Redline is a VS Code extension designed to bridge the gap between human intent and AI Agent execution. It allows developers to mark specific lines of code with detailed instructions, creating a persistent "meta-layer" of context that travels with your codebase without cluttering the source files with comments.
🚀 Key Features
Non-Destructive Annotation: Instructions are stored in a parallel .redline directory (.json sidecars), keeping your source code clean.
Visual Decorations: Annotated lines are highlighted directly in the editor with a distinct style, so you never lose track of pending tasks.
Traceability: Automatically captures the Git identity of the creator (user.name), timestamp, and resolution status.
Management Sidebar: A dedicated "Redline" view in the Activity Bar lists all active instructions, allowing for quick navigation and one-click resolution.
Context Export: Generate structured Markdown briefings optimized for AI Agents (e.g., Gemini, ChatGPT, Claude). Includes:
Focus Masking: Automatically highlights exact character ranges (e.g., ^^^^) to direct AI attention.
Prompt Profiles: built-in templates for "Strict Refactoring", "Documentation", or "General Assistance".
📦 Installation
Clone the repository:
git clone https://github.com/g3nx89/redline.git
Open in VS Code:
code redline
Install dependencies:
npm install
Run the extension (F5 or "Run Extension" launch config).
🛠️ Usage
Adding an Instruction
Select the code you want to annotate.
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
Run Redline: Add Instruction.
Type your instruction (e.g., "Refactor this function to be async").
Managing Instructions
Open the Sidebar: Click the Redline icon in the activity bar.
Jump to Code: Click any item to open the file and scroll to the location.
Resolve: Click the checkmark icon to mark an instruction as resolved. It will disappear from the default view (but remains in history).