AgentSkillsCN

forget

针对特定任务类型,执行硬重置操作。删除操作手册、信心评分记录、评估结果,以及分类器数据。

SKILL.md
--- frontmatter
name: forget
description: Hard reset for a specific task type. Deletes playbook, confidence entry, evaluations, and classifier data.
disable-model-invocation: true
user-invocable: true
argument-hint: "<task-type>"

ALM Forget

Perform a hard reset for a specific task type, removing all learned data for it.

Instructions

Validate Argument

The task type to forget is: $ARGUMENTS

If no argument is provided (empty), do NOT delete anything. Instead:

  1. Read ~/.claude/alm/confidence.json to list known task types
  2. Also check ~/.claude/alm/playbooks/ for any playbook files
  3. Output the list: [ALM] Available task types: code-refactoring, bug-fixing, ...
  4. Ask: Which task type do you want to forget? Run /alm:forget <task-type>
  5. Stop here.

If the argument doesn't match any known task type (not in confidence.json AND no playbook file AND no evaluations), output: [ALM] Unknown task type: "{argument}". Run /alm:forget without arguments to see available types.

Perform Deletion

Once you have a valid task type, delete the following:

  1. Playbook: Delete ~/.claude/alm/playbooks/{task-type}.md if it exists
  2. Confidence entry: Read ~/.claude/alm/confidence.json, remove the key for this task type, write it back
  3. Taxonomy: If ~/.claude/alm/playbooks/_index.md exists, remove the task type entry from it
  4. Evaluations: For each .jsonl file in ~/.claude/alm/evaluations/, filter out lines where taskType matches, rewrite the file. Delete any files that become empty.
  5. Classifier: If ~/.claude/alm/classifier/model.json exists, delete it. Output a note: TF-IDF model deleted. Run /alm:reflect to rebuild it.
  6. Reflect queue: If ~/.claude/alm/reflect-queue.json exists, remove the task type entry from it

Report

Output a summary:

code
[ALM] Forgot task type: {task-type}
  Deleted: playbook, {N} evaluation records, confidence entry
  TF-IDF model deleted — run /alm:reflect to rebuild