@rembr/vscode
v2.0.0
Published
VS Code RLM integration - Recursive Language Model patterns with GitHub Copilot agents, skills, and semantic memory
Maintainers
Readme
@rembr/vscode
Recursive Language Model (RLM) Integration for VS Code and GitHub Copilot
Complete RLM setup with custom agents, skills, prompts, and semantic memory integration. Choose between basic RLM for fast decomposition or Ralph-RLM for acceptance-driven quality assurance.
Quick Start
npm install -g @rembr/vscode
rembr-vscode-setupWhat happens next?
✅ Custom Agents - @rlm and @ralph-rlm agents for task orchestration
✅ Skill System - RLM orchestration skills teach decomposition patterns
✅ Chat Prompts - /rlm-analyze, /ralph-analyze for quick starts
✅ Memory Integration - Persistent context via rembr MCP
✅ Token Efficiency - 51% reduction for complex tasks
Agent Modes
| Agent | Description | Best For | Exit Condition |
|-------|-------------|----------|----------------|
| @rlm | Basic RLM - fast decomposition | Quick analysis, bug investigation | Task complete |
| @ralph-rlm | Acceptance-driven loops | Security audits, quality-critical | All criteria met |
Basic RLM Flow
User Task → Decompose → Investigate Subtasks → Synthesize Results
↓
Store in Rembr (context, facts, learning)Ralph-RLM Flow
User Task → Define Criteria → LOOP until ALL met:
↓ ├── Load criteria
Store in Rembr ├── Validate findings
(goals category) ├── Update status
├── Check stuck
└── Regenerate if neededUsage Examples
Using Custom Agents
Select the agent from the agent picker in Chat view:
@rlm Analyze the authentication system and identify all password handling@ralph-rlm Audit the API endpoints for OWASP Top 10 vulnerabilitiesUsing Chat Prompts
Type / followed by prompt name:
/rlm-analyze Investigate how user sessions are managed across services/ralph-analyze Perform security audit of payment processing flow/rlm-plan Generate decomposition plan for rate limiting implementationExample Workflows
Quick Codebase Analysis
@rlm Analyze the authentication system and find all places where passwords are validatedOutput:
- L1-Auth: Authentication middleware analysis
- L1-Validation: Password validation logic
- L1-Security: Hash verification patterns
- L1-Session: Session management review
Security Audit with Validation
@ralph-rlm Audit the API endpoints for OWASP Top 10 vulnerabilities
Acceptance Criteria:
✓ Input validation checked
✓ Authentication flaws identified
✓ Sensitive data exposure reviewed
✓ XML/XXE injection tested
✓ Access control verified
✓ Security misconfiguration found
✓ XSS vulnerabilities checked
✓ Deserialization flaws tested
✓ Component vulnerabilities identified
✓ Logging/monitoring gaps foundPlanning Before Execution
/rlm-plan Investigate how rate limiting should be implemented across microservices
Generated Plan:
1. L1-Analysis: Current rate limiting state
2. L1-Architecture: Distributed rate limit design
3. L1-Implementation: Redis-based implementation
4. L1-Monitoring: Metrics and alertingThen execute:
@rlm [paste the generated plan above]Auto-Detection Examples
The system automatically detects when to use RLM patterns:
✅ Complex Tasks (Auto-RLM)
// Multi-component implementations
"Implement OAuth2 with JWT refresh tokens, rate limiting, and admin dashboard"
// Cross-service integrations
"Migrate user service to microservices with message queues and monitoring"
// Security audits
"Audit the authentication system for OWASP Top 10 vulnerabilities"
// Architecture analysis
"Analyze the caching layer and identify performance bottlenecks"🎯 Simple Tasks (Standard)
// Single file changes
"Fix this TypeScript type error"
"Add logging to this function"
"Update README with installation steps"File Structure Installed
your-project/
├── .github/
│ ├── copilot-instructions.md # Repository-wide RLM instructions
│ ├── agents/
│ │ ├── rlm.agent.md # Basic RLM agent
│ │ └── ralph-rlm.agent.md # Acceptance-driven agent
│ ├── skills/
│ │ ├── rlm-orchestration/
│ │ │ └── SKILL.md # RLM skill definition
│ │ └── ralph-rlm-orchestration/
│ │ └── SKILL.md # Ralph-RLM skill definition
│ ├── prompts/
│ │ ├── rlm-analyze.prompt.md # Quick RLM analysis start
│ │ ├── ralph-analyze.prompt.md # Quick Ralph-RLM start
│ │ ├── rlm-plan.prompt.md # Generate plan only
│ │ └── ralph-plan.prompt.md # Define criteria only
│ └── instructions/
│ ├── rembr-integration.instructions.md # Memory patterns
│ └── code-investigation.instructions.md # Code search patterns
└── .vscode/
└── settings.json # MCP configurationMemory Categories
RLM automatically organizes findings in rembr:
| Category | Purpose | Used By |
|----------|---------|---------|
| goals | Acceptance criteria and validation status | Ralph-RLM |
| context | Task state, decomposition progress | Both |
| facts | Validated findings and discoveries | Both |
| learning | Synthesized insights and patterns | Both |
Performance Benefits
| Complexity | Traditional | RLM Tokens | Reduction | Quality | |------------|-------------|------------|-----------|---------| | High | 18,400 | 8,800 | 52% | +2.5 pts | | Medium | 8,200 | 4,900 | 40% | +1.8 pts | | Low | 2,100 | 2,100 | 0% | No change |
Why RLM Works
- Focused Context - Each subagent gets only relevant code/memories
- Iterative Validation - Ralph-RLM ensures quality criteria are met
- Persistent Learning - Solutions stored for future reference
- Stuck Detection - Automatically regenerates plans if blocked
Agent Handoffs
Agents support workflow transitions:
@rlm Can you switch to Ralph-RLM for higher quality validation?
→ Hands off to @ralph-rlm with current context
@ralph-rlm This looks good, switch to basic RLM for faster completion
→ Hands off to @rlm with findings so farConfiguration
1. Set API Key
Configure your rembr API key in VS Code settings:
- Get key: rembr.ai/dashboard/settings
- VS Code:
Cmd+,→ Extensions → MCP →rembr.env.REMBR_API_KEY - Reload:
Cmd+Shift+P→ "Developer: Reload Window"
2. Enable Required Settings
Ensure these VS Code settings are enabled:
{
"github.copilot.chat.codeGeneration.useInstructionFiles": true,
"chat.agent.enabled": true,
"chat.useAgentSkills": true
}3. MCP Server Configuration
The installer adds to .vscode/settings.json:
{
"mcp": {
"mcpServers": {
"rembr": {
"command": "npx",
"args": ["@rembr/mcp-client"],
"env": {
"REMBR_API_KEY": "${REMBR_API_KEY}",
"REMBR_PROJECT_ID": "${REMBR_PROJECT_ID}"
}
}
}
}
}Advanced Usage
Custom Agent Creation
Create domain-specific agents in .github/agents/:
---
name: Security Auditor
description: Specialized in security analysis with OWASP Top 10 focus
instructions: |
Use Ralph-RLM patterns for security audits.
Always define comprehensive acceptance criteria.
Check for: injection, auth, exposure, XXE, access control,
misconfiguration, XSS, deserialization, components, logging.
---Memory Search Patterns
// Find related implementations
search_memory({
query: "rate limiting middleware express redis",
category: "facts",
limit: 5
});
// Get similar solutions
find_similar_memories({
memory_id: "auth-jwt-implementation-abc",
min_similarity: 0.8
});Skill Development
Skills teach agents how to orchestrate tasks:
# RLM Orchestration Skill
## When to use
- Complex tasks requiring decomposition
- Multi-component implementations
- Cross-system analysis
## How to decompose
1. Analyze task complexity
2. Identify major components
3. Create focused subtasks
4. Store context in rembr
5. Synthesize findingsTroubleshooting
Agent not appearing
- Check
.github/agents/*.agent.mdexists - Verify VS Code version ≥1.106
- Run "Chat: Configure Custom Agents" from Command Palette
Skills not loading
- Ensure
chat.useAgentSkillsis enabled - Check
.github/skills/*/SKILL.mdstructure - Skills load automatically based on prompt match
Memory connection issues
- Verify MCP configuration in settings
- Check environment variables
- Test rembr connection:
curl -H "X-API-Key: YOUR_KEY" https://rembr.ai/health
Auto-detection not working
- Ensure
.github/copilot-instructions.mdexists in project root - Restart GitHub Copilot:
Cmd+Shift+P→ "GitHub Copilot: Restart Extension" - Use explicit complexity indicators in requests
Migration from v1.x
If upgrading from v1.x:
- Backup: Save existing
.github/files - Install: Run
rembr-vscode-setupagain - Migrate: Copy custom configurations to new structure
- Test: Try
/rlm-analyzeto verify setup
The new agent-based system replaces the simpler auto-detection patterns.
Getting Support
- Documentation: docs.rembr.ai/rlm-patterns
- Examples: Try
search_memory({query: "implementation example"}) - Community: GitHub Discussions
- Issues: GitHub Issues
License
MIT - see LICENSE for details.
Version: 2.0.0
Agents: Basic RLM (@rlm) and Ralph-RLM (@ralph-rlm)
Skills: RLM orchestration patterns with quality validation
Memory Backend: rembr.ai semantic memory service
Token Efficiency: Up to 52% reduction with quality improvements
