AgentSkillsCN

self-reflect

自学习系统——能够即时检测并自动写入目标文件,无需排队等待。

SKILL.md
--- frontmatter
name: self-reflect
description: "Self-learning system — detects corrections and writes to target files immediately. No queue delay."

Self-Reflect — Agent Self-Learning System

Core Principle

Correction detected → Write to target file immediately → No queue

Sync Targets (3-Layer Architecture)

Rule TypeTarget File
Code-enforceable.kiro/rules/enforcement.md
High-frequencyCLAUDE.md / AGENTS.md
Low-frequency.kiro/rules/reference.md or knowledge/
Mistakesknowledge/lessons-learned.md

Trigger Patterns

High confidence (90%):

  • remember: / always:
  • don't ... unless
  • I told you

Medium confidence (80%):

  • no, use X / not X, use Y
  • you missed / why didn't you
  • research first / verify first

Implicit negation (75%):

  • not good enough
  • you forgot
  • you failed to

Positive feedback (70%, also captured):

  • perfect! / exactly right
  • great approach / that's what I wanted
  • keep doing this

Exclusion Patterns (Don't capture)

  • Questions ending with ?
  • Requests starting with please / help me
  • Error reports (error, failed)
  • Messages over 300 characters (likely context, not correction)

On Detection

  1. Confirm: 📝 Learning captured: '[preview]'
  2. Write to target file immediately (no queue)
  3. Continue answering the user's question

Target Selection Logic

IndicatorTarget
Model names (gpt-, claude-, gemini-)Global (~/.kiro/AGENTS.md)
Format/naming/style rulesenforcement.md
Templates, SOPs, workflowsreference.md
Everything elseCLAUDE.md / AGENTS.md

Commands

CommandPurpose
/reflectReview queue, sync to 3-layer architecture
/reflect-skillsDiscover repeated patterns, generate skills
/view-queueView pending learnings
/skip-reflectClear queue

Examples

Correction → Immediate Learning

code
User: no, use gpt-5.1 not gpt-5
Agent: 📝 Learning captured: 'use gpt-5.1 not gpt-5'
       OK, switching to gpt-5.1.

Constraint Rule

code
User: don't add comments unless I ask
Agent: 📝 Learning captured: 'don't add comments unless I ask'
       Got it, no comments unless requested.

Review & Sync

code
User: /reflect
Agent:
═══════════════════════════════════════
LEARNINGS QUEUE (3 items)
═══════════════════════════════════════

1. [90%] "use gpt-5.1 not gpt-5"
   → Suggested: ~/.kiro/AGENTS.md (global)

2. [85%] "don't add comments unless I ask"
   → Suggested: AGENTS.md (project)

3. [80%] "filenames must use kebab-case"
   → Suggested: .kiro/rules/enforcement.md (codifiable)

Action: [A]pply all / [R]eview each / [S]kip