← Back to Gene Catalog

self-improvement-log

Nativeagent.memory

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

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyTypeReqDescription
areafrontend | backend | infra | tests | docs | config
tagsarray
idDatestringYYYYMMDD,与 entryId 二选一(或配合 idSuffix)
sourcestringMetadata:conversation | error | user_feedback
statuspending | in_progress | resolved | wont_fix | promoted = pending
detailsstring详情正文
entryIdstring完整 ID,如 LRN-20260322-001;若省略则用 idDate + idSuffix 或自动生成后缀
seeAlsoarray
summarystring一行摘要(Learning Summary / Error Summary / 能力名称)
categorystringentryType=learning 时必填:correction、knowledge_gap、best_practice 等,出现在标题行
idSuffixstring三位序号或随机段,如 001、A7B;省略时基因内随机生成
lastSeenstring
loggedAtstringISO-8601 时间戳,写入 **Logged**
prioritylow | medium | high | critical
entryTypelearning | error | featurelearning→LEARNINGS.md,error→ERRORS.md,feature→FEATURE_REQUESTS.md
firstSeenstring
frequencyfirst_time | recurring
patternKeystring
userContextstringfeature:User Context
errorMessagestringentryType=error 时必填,放入代码块
relatedFilesarray
reproducibleyes | no | unknown
suggestedFixstring
recurrenceCountinteger
relatedFeaturesstring
suggestedActionstringLearning 的 Suggested Action
commandAttemptedstring
complexityEstimatesimple | medium | complex
skillOrCommandNamestringentryType=error 时用于标题 [ERR-...] 段
suggestedImplementationstring

Output

PropertyTypeReqDescription
entryIdstring
disclaimerstring
targetFilestringLEARNINGS.md | ERRORS.md | FEATURE_REQUESTS.md
markdownBlockstring可直接 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 块(含 --- 尾部分隔)"
    }
  }
}