SuperAPI AI Directory

evolve

Agents & models

View repository

Updated 10-16 01:16

About this skill

Self-Evolving Agent v5.5.0

[Version Check] → North Star Anchoring → [Worktree Isolation] → PSB Environment Check → Goal Analysis (In-depth Interview)→ Automatic Domain Identification → Assess Capabilities → Acquire Skills → PDCA Execution (including direction correction) → Diagnosis → Multi-strategy Retry → Repo Memory → Periodic Health Check → [Worktree Complete] → until success

Quick Tour

This skill adoptsAtomic Architecture, splitting knowledge into independent modules:

Module Purpose Path
00-getting-started Getting Started and Environment Setup →
01-core Core Process (PSB + PDCA) →
02-checkpoints Mandatory Checkpoints (Guardrails) →
03-memory Memory System Operations →
04-emergence Emergence Mechanisms →
05-integration External Tool Integration →
06-scaling Large-scale Project Optimization →
99-evolution Self-evolution Mechanisms →

Usage

/evolve [目標描述]

# 範例
/evolve 建立一個能自動生成遊戲道具圖片的 ComfyUI 工作流程
/evolve 優化這段程式碼的效能,目標是降低 50% 執行時間
/evolve 為這個專案建立完整的測試覆蓋率達到 80%

Flags

--explore          # 探索模式 - 允許自主選擇方向
--emergence        # 涌現模式 - 啟用跨領域連結探索
--autonomous       # 自主模式 - 完全自主,追求系統性創新
--max-iterations N # 最大迭代次數(預設 10)
--from-spec NAME   # 從 spec-workflow 的 tasks.md 執行

Core Philosophy

The essence of human-AI collaboration: communicating through abstracted interfaces

Traditional Software AI Collaboration Role
API MCP Capability Boundaries (what can be done)
SDK/Library Tools Concrete Implementation (how to do it)
Documentation + Practice Skill Domain Knowledge (when to use what)
Config CLAUDE.md Context Constraints (project specifications)

Deep Insight:

  • A Skill is not just knowledge; it is "packaged judgment"
  • Tell the AI under what circumstances, in what way, to achieve what goal
  • Reduce decision points > Let the AI choose on its own

Design Principles

Principle Description
Opinionated Design Reasonable defaults > Let the AI choose; required parameters ≤ 2
Deep and Narrow Focus on the 10% high-value tasks; do not pursue breadth of features
Expect Failure It is normal for 95% of Agents to fail in production environments; design for graceful degradation
Enhanced Feedback Remind of goals and progress during execution; explain the scope of impact upon failure

Execution Process Overview

Self-Evolving Loop v5.2

  1. 🔄 Version Check(automatic) — check for updates, ask the user, auto-update
  2. 🌟 CP0: North Star Anchoring — vision, completion criteria, do-not-do list, motivation
  3. 🔒 CP0.5: Worktree Isolation(conditionally triggered) — Level 2 / autonomous / parallel tasks
  4. PSB System — Plan → Setup → Build (environment preparation)
  5. Goal Analysis — in-depth interview + architecture level determination (mandatory for Level 2)
  6. Capability Assessment → Skill Acquisition
  7. PDCA Cycle — Plan → Do → Check → Act (including multi-strategy selection)
    • CP3: Direction Correction (against the North Star)
  8. Git-based Memory — record learning experiences
  9. 🏥 CP6: Project Health Check(every 5 iterations) — Scope, direction, termination check
  10. 🏁 CP6.5: Worktree Complete(conditionally triggered) — merge/cleanup

↻ Repeat until: goal achieved or maximum iterations reached

💡 New in v5.2: Version check and auto-update — check for a new version on every startup

💡 New in v5.1: Worktree isolated environment — a safety boundary for high-risk tasks

💡 New in v4.4: North Star system — solves the problem of "losing direction later on"

💡 New in v4.3: Deep interview mode — "the biggest problem when writing a spec is that you don't know what you missed" See 01-core/_base/goal-analysis.md

Three-layer design of architectural considerations

Layer Stage Action
1 Goal Analysis Determine architecture level (0/1/2)
2 PDCA Plan Do architecture design according to level
3 CP1.5 Phase 2 Verify implementation matches design

→ Design → Implement → Verify closed loop

Mandatory checkpoints (guardrails)

These checkpoints cannot be skipped, see 02-checkpoints

Checkpoint Timing Action
CP0 🌟 Before project/task starts North Star anchoring (create or read)
CP0.5 🔒 After CP0 (conditionally triggered) Worktree isolated environment preparation
CP1 Before task starts Search .claude/memory/ for relevant experience
CP1.5 Before writing code Consistency check (two-phase)
CP2 After code changes Compile + test verification
CP3 After Milestone completion Confirm goal,direction correction, next step
CP3.5 After Memory document creation Immediately sync index.md
CP4 After iteration completion Emergent opportunity check (optional)
CP5 When PDCA Check fails Post-failure postmortem, generate structured Lesson
CP6 🏥 After every 5 iterations Project health check (Scope, direction, termination check)
CP6.5 🏁 When task completes (conditionally triggered) Worktree merge/cleanup

CP1.5 two-phase design

Phase 1: Basic checks (must be executed)

  • Search existing implementations to avoid reinventing the wheel
  • Check project conventions (naming, style)
  • Check Schema/API consistency

Phase 2: Architecture check (auto-detection triggered)

  • Dependency direction, error handling consistency, cross-cutting concerns, design pattern consistency

Trigger conditions: new directory/module, changes involving 3+ directories, new external dependency, touching core/infra/domain/shared/, new public API

Stop conditions

Status Condition
✅ Success All sub-goals completed + acceptance criteria passed
❌ Failure Maximum iterations reached or 3 consecutive identical errors
⏸️ Paused User decision required or risky operation requires confirmation

Completion signal

  • ✅ GOAL ACHIEVED: [目標描述]
  • ⏸️ NEED HUMAN: [原因]
  • ❌ CANNOT COMPLETE: [原因]

Related resources