用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/claude-world/director-mode-lite --skill evolving-loop命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Direct substantial repository work across Claude Code, Codex CLI, or Grok Build with a concise brief, parallel agents, evidence-based completion, and optional cross-CLI continuation. Use for project onboarding, multi-step implementation, agent coordination, verification planning, low-interruption setup, or deciding how another CLI should take over. Do not use it as a permission gate or mandatory workflow.
Continue a task in Claude Code through a portable Director handoff packet. Use when work started in Codex CLI or Grok Build should move to Claude, or when a fresh Claude session needs the current decisions and verification evidence.
Continue a task in OpenAI Codex CLI through a portable Director handoff packet. Use when the user asks Codex to take over, wants an independent Codex implementation or review, or needs to preserve decisions and verification while changing CLIs.
基于 SOC 职业分类
正在显示 SKILL.md
| name | evolving-loop |
| description | Self-Evolving Development Loop - Dynamic skill generation with learning and evolution |
| user-invocable | true |
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
# 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
┌──────────────────────────────────────────────────────┐
│ 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) │
│ │
└──────────────────────────────────────────────────────┘
When user runs /evolving-loop "$ARGUMENTS":
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
[[ == ** ]];
[ ! -f ] || [ == ];
1
[[ == ** ]];
-rf
# 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)
CRITICAL: Use context isolation - orchestrator runs in fork context.
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]
""")
🚀 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 | Agent | Output File |
|---|---|---|
| ANALYZE | requirement-analyzer | reports/analysis.json |
| GENERATE | skill-synthesizer | generated-skills/*.md |
| EXECUTE | (generated executor) | codebase changes |
| VALIDATE | (generated validator) | reports/validation.json |
| DECIDE | completion-judge | reports/decision.json |
| LEARN | experience-extractor | reports/learning.json |
| EVOLVE | skill-evolver | evolved skills |
.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 after current phase
touch .self-evolving-loop/state/stop
# Resume later
/evolving-loop --resume
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:
# 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.