ajhahn.de
← eeco
JSON 59 lines
{
  "name": "memcheck",
  "description": "Audit the AI memory files for stale anchors — paths, flags, and contract values that no longer match the tree — and report them. Reads and reports only — never edits or deletes a memory, never touches a tracked file.",
  "intent": {
    "guarantee": "This skill only reads the memory files and the tree and reports stale anchors — it never edits or deletes a memory",
    "forbidden": [
      "git add",
      "git commit",
      "git push",
      "git tag",
      "edit or delete a memory",
      "touch any tracked file"
    ]
  },
  "capabilities": [
    { "kind": "tool", "name": "Read" },
    { "kind": "tool", "name": "Grep" },
    { "kind": "tool", "name": "Glob" },
    { "kind": "tool", "name": "AskUserQuestion" },
    { "kind": "bash", "verb": "grep", "scope": "*" },
    { "kind": "bash", "verb": "test", "scope": "*" },
    { "kind": "bash", "verb": "find", "scope": "*" }
  ],
  "steps": [
    {
      "index": 0,
      "title": "Locate the memory set",
      "body": "Find the memory files: the MEMORY.md index and each individual memory file it points to. Read the index first, then each referenced file. Do not edit anything."
    },
    {
      "index": 1,
      "title": "Extract the anchors",
      "body": "From each memory, pull the concrete anchors it asserts: file paths, function or symbol names, flag and command names, version or contract values, and links to other memories. These are the claims that can go stale as the code moves underneath them."
    },
    {
      "index": 2,
      "title": "Verify against the tree",
      "body": "Check each anchor against the current tree with the read-only commands below: does the file or path still exist, does the symbol or flag still appear, does the asserted value still hold. A `test -e` / `grep` that fails marks a candidate stale anchor.",
      "runs": [
        "test -e <path>",
        "grep -rn <symbol> .",
        "find . -name <file>"
      ]
    },
    {
      "index": 3,
      "title": "Check the index integrity",
      "body": "Verify MEMORY.md itself: every file it lists exists, and every memory file on disk is listed (no orphan, no dangling pointer). A mismatch between the index and the files on disk is its own kind of drift."
    },
    {
      "index": 4,
      "title": "Report the stale table",
      "body": "Print a table of stale anchors (memory, anchor, why it is stale) and any index mismatches, plus a one-line summary. Recommend the fix in prose but never apply it: do not edit or delete a memory and do not touch any tracked file. The operator reconciles."
    }
  ],
  "output_format": "Print a stale-anchor table (memory, anchor, reason) plus any index mismatches and a one-line summary. State explicitly that no memory was edited or deleted.",
  "maps_to_workflow": "memory-drift"
}