Evolving Loop logo

Evolving Loop

Organization
claude-world
evolving-loop

Self-Evolving Development Loop - Dynamic skill generation with learning and evolution

Overview

Publisherclaude-world
Repositorydirector-mode-lite
Skill nameevolving-loop
Stars
80
Forks
10
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by claude-world on GitHub. Read the source before you install it.

Installation

Install the Evolving Loop AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/claude-world/director-mode-lite/tree/main/skills/evolving-loop
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/claude-world/director-mode-lite.git /tmp/director-mode-lite
mkdir -p .claude/skills
cp -r /tmp/director-mode-lite/skills/evolving-loop .claude/skills/evolving-loop
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Evolving Loop in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Evolving Loop on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Evolving Loop is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Self-Evolving Development Loop

Execute an autonomous development cycle that dynamically generates, validates, and evolves its own execution strategy. Integrates with Meta-Engineering memory system for pattern learning and tool evolution.

Architecture Details: See docs/EVOLVING-LOOP-ARCHITECTURE.md


Usage

bash
# Start new task
/evolving-loop "Your task description

Acceptance Criteria:
- [ ] Criterion 1
- [ ] Criterion 2
"

# Flags
/evolving-loop --resume    # Resume interrupted session
/evolving-loop --status    # Check status
/evolving-loop --force     # Clear and restart
/evolving-loop --evolve    # Trigger manual evolution
/evolving-loop --memory    # Show memory system status

How It Works

┌──────────────────────────────────────────────────────┐
│  8-Phase Self-Evolving Loop                          │
├──────────────────────────────────────────────────────┤
│                                                      │
│  Phase -2: CONTEXT_CHECK  → Check token pressure     │
│  Phase -1A: PATTERN_LOOKUP → Match task patterns     │
│                                                      │
│  ┌─────────────── Main Loop ───────────────┐        │
│  │ Phase 1: ANALYZE   → Extract AC         │        │
│  │ Phase 2: GENERATE  → Create skills      │        │
│  │ Phase 3: EXECUTE   → TDD implementation │        │
│  │ Phase 4: VALIDATE  → Score 0-100        │        │
│  │ Phase 5: DECIDE    → SHIP/FIX/EVOLVE    │        │
│  │ Phase 6: LEARN     → Extract patterns   │        │
│  │ Phase 7: EVOLVE    → Improve skills     │        │
│  │ Phase 8: SHIP      → Deliver result     │        │
│  └──────────────────────────────────────────┘        │
│                                                      │
│  Phase -1C: EVOLUTION → Update memory (on SHIP)     │
│                                                      │
└──────────────────────────────────────────────────────┘

Execution

When user runs /evolving-loop "$ARGUMENTS":

1. Handle Flags

bash
STATE_DIR=".self-evolving-loop"
MEMORY_DIR=".claude/memory/meta-engineering"
CHECKPOINT="$STATE_DIR/state/checkpoint.json"

# --status: Show current state
if [[ "$ARGUMENTS" == *"--status"* ]]; then
    /evolving-status
    exit 0
fi

# --memory: Show memory system status
if [[ "$ARGUMENTS" == *"--memory"* ]]; then
    echo "Memory System Status:"
    if [ -d "$MEMORY_DIR" ]; then
        echo "Tool Usage: $(jq '.tools | length' "$MEMORY_DIR/tool-usage.json" 2>/dev/null || echo "0") tools"
        echo "Patterns: $(jq '.task_patterns | keys | length' "$MEMORY_DIR/patterns.json" 2>/dev/null || echo "0") patterns"
        echo "Evolution: v$(jq -r '.version' "$MEMORY_DIR/evolution.json" 2>/dev/null || echo "0")"
    else
        echo "(Not initialized - will create on first run)"
    fi
    exit 0
fi

# --resume: Continue from checkpoint
if [[ "$ARGUMENTS" == *"--resume"* ]]; then
    if [ ! -f "$CHECKPOINT" ] || [ "$(jq -r '.status' "$CHECKPOINT")" == "idle" ]; then
        echo "No active session to resume."
        exit 1
    fi
fi

# --force: Clear old state
if [[ "$ARGUMENTS" == *"--force"* ]]; then
    rm -rf "$STATE_DIR/state/*" "$STATE_DIR/reports/*" "$STATE_DIR/generated-skills/*"
fi

2. Initialize (First-Run Safe)

bash
# Create directories (first-run safe)
mkdir -p "$MEMORY_DIR"
mkdir -p "$STATE_DIR"/{state,reports,generated-skills,history,backups}

# Helper: Read JSON with fallback
read_json_safe() {
    local file="$1"
    local default="$2"
    if [ -f "$file" ]; then
        cat "$file" 2>/dev/null || echo "$default"
    else
        echo "$default"
    fi
}

# Detect first run
IS_FIRST_RUN=false
if [ ! -f "$MEMORY_DIR/patterns.json" ]; then
    IS_FIRST_RUN=true
    echo "📝 First run detected - initializing memory system..."
fi

# Initialize memory files if missing (see docs for full schema)

3. Delegate to Orchestrator

CRITICAL: Use context isolation - orchestrator runs in fork context.

Before dispatch, preserve the request and checkpoint preimage. If Claude's Agent tool is unavailable or withheld, or Codex's spawn_agent interface is unavailable or withheld, the maximum depth is reached, or a concurrency limit rejects the call, do not retry or execute the loop inline. Return an incomplete dispatch_request and do not advance or mutate loop state.

Choose exactly one provider-native form:

  • Claude Code: Agent(subagent_type="evolving-orchestrator", prompt="<bounded prompt>")
  • Codex CLI: spawn_agent(agent_type="evolving-orchestrator", task_name="evolving_loop", message="<bounded prompt>")
markdown
Agent(subagent_type="evolving-orchestrator", prompt="""
Request: $ARGUMENTS
Task Type: $TASK_TYPE (from pattern matching)

Execute phases in sequence, each in fork context.
Return only brief status updates (1 line per phase).
Store ALL detailed output in files.

Return format:
📊 CONTEXT: [OK/Warning] - [N]% usage
🔍 PATTERNS: Matched [type], [N] recommendations
✅ ANALYZE: [N] AC identified
✅ GENERATE: Created v[N] skills
🔄 EXECUTE: Iter [N] - [status]
✅ VALIDATE: Score [N]/100
➡️ DECIDE: [SHIP/FIX/EVOLVE]
""")

In Codex, pass the same bounded request and return contract through spawn_agent(...); do not invoke the Claude example as a second dispatch.


Output Example

🚀 Starting Self-Evolving Loop (Meta-Engineering v2.0)...

📊 CONTEXT: OK - 15% usage
🔍 PATTERNS: Matched 'auth', 3 recommendations
✅ ANALYZE: 5 acceptance criteria identified
✅ GENERATE: Created executor-v1, validator-v1, fixer-v1
🔄 EXECUTE: Iteration 1 - 4 files modified, 3/5 tests passing
✅ VALIDATE: Score 72/100
➡️ DECIDE: FIX (minor test failures)
🔄 EXECUTE: Iteration 2 - 2 files modified, 5/5 tests passing
✅ VALIDATE: Score 94/100
➡️ DECIDE: SHIP
📚 LEARN: 2 patterns identified
🧬 EVOLUTION: Updated memory
✅ SHIP: All criteria met!

📊 Summary: 2 iterations, 6 files changed, 5/5 AC complete

Phase Agents

PhaseAgentOutput File
ANALYZErequirement-analyzerreports/analysis.json
GENERATEskill-synthesizergenerated-skills/*.md
EXECUTE(generated executor)codebase changes
VALIDATE(generated validator)reports/validation.json
DECIDEcompletion-judgereports/decision.json
LEARNexperience-extractorreports/learning.json
EVOLVEskill-evolverevolved skills

State Files

.self-evolving-loop/          ← Session state (temporary)
├── state/checkpoint.json     ← Current state
├── reports/*.json            ← Phase outputs
├── generated-skills/*.md     ← Dynamic skills
└── history/*.jsonl           ← Event logs

.claude/memory/meta-engineering/  ← Persistent memory
├── tool-usage.json           ← Usage statistics
├── patterns.json             ← Learned patterns
└── evolution.json            ← Evolution history

Stop / Resume

bash
# Stop after current phase
touch .self-evolving-loop/state/stop

# Resume later
/evolving-loop --resume

Hook-Driven Continuation (optional)

By default the loop runs through the evolving-orchestrator agent in fork context (see Delegate to Orchestrator above) — each phase stays in an isolated context.

If you instead want the loop driven by a Stop hook — so it resumes phase-by-phase in your main context and survives context exhaustion — merge the shipped hook config into .claude/settings.local.json:

bash
# Activate: append the loop's Stop + PostToolUse hooks
python3 - <<'PY'
import json
s   = json.load(open('.claude/settings.local.json'))
add = json.load(open('.self-evolving-loop/hooks/settings-hooks.json'))
h   = s.setdefault('hooks', {})
for event, entries in add['hooks'].items():
    h.setdefault(event, []).extend(entries)
json.dump(s, open('.claude/settings.local.json', 'w'), indent=2)
PY

To deactivate, remove those Stop/PostToolUse entries from .claude/settings.local.json again (or restore a pre-merge backup).

Tradeoff: hook mode runs each phase in your main context (visible, but consumes context as the task grows); agent mode (default) keeps each phase in an isolated fork context.


Related

Frequently asked questions

What does the Evolving Loop AI skill do?

Self-Evolving Development Loop - Dynamic skill generation with learning and evolution

Why use Evolving Loop on TypingMind?

Because you install it once and use it with any model. Evolving Loop is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Evolving Loop in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/claude-world/director-mode-lite/tree/main/skills/evolving-loop. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Evolving Loop?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Evolving Loop?

As many as you like. As long as a model supports skills, you can use Evolving Loop with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Evolving Loop AI skill free?

Yes. It is published on GitHub by claude-world under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇