Skip to content

jaytoone/rlm-core-instructions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RLM Core Instructions v4

Recursive Learning Model (RLM) + claude-flow integration for Claude Code

A structured workflow system that enforces complexity-based task decomposition, quality gates, and learning patterns for Claude Code sessions.

Features

  • Complexity-based routing: LOW/MEDIUM/HIGH task classification
  • Phase pipeline: Structured execution (Phase 0-4)
  • Quality Gates: Automated verification checkpoints
  • claude-flow MCP integration: Memory, trajectory tracking, pattern learning
  • Metacognition: Self-reflection and adaptive learning
  • Stuck recovery: Automatic detection and escalation

Quick Start

Option 1: CLAUDE.md (Recommended)

Copy CLAUDE.md to your home directory:

# Global (all projects)
cp CLAUDE.md ~/.claude/CLAUDE.md

# Or project-specific
cp CLAUDE.md ./CLAUDE.md

Option 2: UserPromptSubmit Hook (Auto-inject every prompt)

Windows:

.\install.ps1

Linux/Mac:

chmod +x install.sh && ./install.sh

What It Does

Complexity Classification

Level Criteria Required Phases
LOW Info lookup, 1-2 line changes None (direct execution)
MEDIUM 1-3 files, bug fixes Phase 1, 2, 3, 4
HIGH 5+ files, new features Phase 0, 1, 2, 3, 4 + Plan Mode

Phase Pipeline

Phase 0: Initialize (HIGH only)
    └── Agent routing, trajectory start

Phase 1: PDE Q&A
    └── Expert consultation, requirement gathering

Phase 2: Block Decomposition
    └── 5-10 blocks, max 30min each, workflow_create

Phase 3: Recursive Execution
    └── Per-block implementation + reflection (max depth: 3)

Phase 4: Verification
    └── Quality Gates, Playwright E2E, pattern storage

Quality Gates

Gate Threshold
Test Coverage >= 80%
TypeScript Errors 0
Lint Errors 0
Build Pass
Playwright E2E Pass
Console Errors 0

File Structure

~/.claude/
├── CLAUDE.md                    # Core Instructions (auto-loaded)
└── hooks/
    ├── inject-system-prompt.ps1 # Windows hook
    ├── inject-system-prompt.sh  # Linux/Mac hook
    └── system-prompt.md         # Instructions content

Requirements

  • Claude Code 2.0+
  • (Optional) claude-flow MCP for advanced features

Configuration

Add to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "powershell -NoProfile -ExecutionPolicy Bypass -File ~/.claude/hooks/inject-system-prompt.ps1"
          }
        ]
      }
    ]
  }
}

License

MIT

Contributing

PRs welcome! Please test your changes before submitting.

Credits

Inspired by the Claude Code community and Anthropic's best practices.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors