← Back to Gene Catalog

self-improvement-log

Native agent.memory

将 self-improving-agent / 自改进工作流中的单条记录格式化为可追加的 Markdown(LEARNINGS / ERRORS / FEATURE_REQUESTS)。无文件系统:宿主负责写入 .learnings/。

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyType Req Description
area frontend | backend | infra | tests | docs | config
tags array
idDate string YYYYMMDD,与 entryId 二选一(或配合 idSuffix)
source string Metadata:conversation | error | user_feedback
status pending | in_progress | resolved | wont_fix | promoted = pending
details string 详情正文
entryId string 完整 ID,如 LRN-20260322-001;若省略则用 idDate + idSuffix 或自动生成后缀
seeAlso array
summary string 一行摘要(Learning Summary / Error Summary / 能力名称)
category string entryType=learning 时必填:correction、knowledge_gap、best_practice 等,出现在标题行
idSuffix string 三位序号或随机段,如 001、A7B;省略时基因内随机生成
lastSeen string
loggedAt string ISO-8601 时间戳,写入 **Logged**
priority low | medium | high | critical
entryType learning | error | feature learning→LEARNINGS.md,error→ERRORS.md,feature→FEATURE_REQUESTS.md
firstSeen string
frequency first_time | recurring
patternKey string
userContext string feature:User Context
errorMessage string entryType=error 时必填,放入代码块
relatedFiles array
reproducible yes | no | unknown
suggestedFix string
recurrenceCount integer
relatedFeatures string
suggestedAction string Learning 的 Suggested Action
commandAttempted string
complexityEstimate simple | medium | complex
skillOrCommandName string entryType=error 时用于标题 [ERR-...] 段
suggestedImplementation string

Output

PropertyType Req Description
entryId string
disclaimer string
targetFile string LEARNINGS.md | ERRORS.md | FEATURE_REQUESTS.md
markdownBlock string 可直接 append 到对应文件的完整 Markdown 块(含 --- 尾部分隔)
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "entryType",
    "summary",
    "details",
    "priority",
    "area",
    "loggedAt"
  ],
  "properties": {
    "area": {
      "enum": [
        "frontend",
        "backend",
        "infra",
        "tests",
        "docs",
        "config"
      ],
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "idDate": {
      "type": "string",
      "description": "YYYYMMDD,与 entryId 二选一(或配合 idSuffix)"
    },
    "source": {
      "type": "string",
      "description": "Metadata:conversation | error | user_feedback"
    },
    "status": {
      "enum": [
        "pending",
        "in_progress",
        "resolved",
        "wont_fix",
        "promoted"
      ],
      "type": "string",
      "default": "pending"
    },
    "details": {
      "type": "string",
      "description": "详情正文"
    },
    "entryId": {
      "type": "string",
      "description": "完整 ID,如 LRN-20260322-001;若省略则用 idDate + idSuffix 或自动生成后缀"
    },
    "seeAlso": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "summary": {
      "type": "string",
      "description": "一行摘要(Learning Summary / Error Summary / 能力名称)"
    },
    "category": {
      "type": "string",
      "description": "entryType=learning 时必填:correction、knowledge_gap、best_practice 等,出现在标题行"
    },
    "idSuffix": {
      "type": "string",
      "description": "三位序号或随机段,如 001、A7B;省略时基因内随机生成"
    },
    "lastSeen": {
      "type": "string"
    },
    "loggedAt": {
      "type": "string",
      "description": "ISO-8601 时间戳,写入 **Logged**"
    },
    "priority": {
      "enum": [
        "low",
        "medium",
        "high",
        "critical"
      ],
      "type": "string"
    },
    "entryType": {
      "enum": [
        "learning",
        "error",
        "feature"
      ],
      "type": "string",
      "description": "learning→LEARNINGS.md,error→ERRORS.md,feature→FEATURE_REQUESTS.md"
    },
    "firstSeen": {
      "type": "string"
    },
    "frequency": {
      "enum": [
        "first_time",
        "recurring"
      ],
      "type": "string"
    },
    "patternKey": {
      "type": "string"
    },
    "userContext": {
      "type": "string",
      "description": "feature:User Context"
    },
    "errorMessage": {
      "type": "string",
      "description": "entryType=error 时必填,放入代码块"
    },
    "relatedFiles": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "reproducible": {
      "enum": [
        "yes",
        "no",
        "unknown"
      ],
      "type": "string"
    },
    "suggestedFix": {
      "type": "string"
    },
    "recurrenceCount": {
      "type": "integer"
    },
    "relatedFeatures": {
      "type": "string"
    },
    "suggestedAction": {
      "type": "string",
      "description": "Learning 的 Suggested Action"
    },
    "commandAttempted": {
      "type": "string"
    },
    "complexityEstimate": {
      "enum": [
        "simple",
        "medium",
        "complex"
      ],
      "type": "string"
    },
    "skillOrCommandName": {
      "type": "string",
      "description": "entryType=error 时用于标题 [ERR-...] 段"
    },
    "suggestedImplementation": {
      "type": "string"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "entryId",
    "targetFile",
    "markdownBlock",
    "disclaimer"
  ],
  "properties": {
    "entryId": {
      "type": "string"
    },
    "disclaimer": {
      "type": "string"
    },
    "targetFile": {
      "type": "string",
      "description": "LEARNINGS.md | ERRORS.md | FEATURE_REQUESTS.md"
    },
    "markdownBlock": {
      "type": "string",
      "description": "可直接 append 到对应文件的完整 Markdown 块(含 --- 尾部分隔)"
    }
  }
}