OverviewFilesCommitsIssuesDocsReleasesPeers

knowledge-ratchet / data / tuned-patterns.json

255 lines · json ref:
{
  "generated": "2026-04-07T16:00:00.000Z",
  "correction": {
    "high": [
      {
        "id": "explicit-no",
        "pattern": "\\b(wrong|not that|that's not|that is not|incorrect|stop doing)\\b",
        "flags": "i",
        "precision": 1,
        "fires": 8,
        "note": "Removed bare 'no' — too many false positives ('no rush', 'no problem'). Kept 'wrong', 'not that'."
      },
      {
        "id": "no-as-rejection",
        "pattern": "^\\s*no[,.]?\\s*$|\\bno[,.]\\s+(that|this|it|you|we|i)",
        "flags": "i",
        "precision": 0.95,
        "note": "Bare 'no' only at start of line or followed by subject. Avoids 'no problem', 'no rush'."
      },
      {
        "id": "repeating-self",
        "pattern": "\\b(i said|i meant|i asked for|that's wrong|that is wrong)\\b",
        "flags": "i",
        "precision": 1,
        "fires": 1
      },
      {
        "id": "frustration-repeat",
        "pattern": "\\b(again|already told you|how many times|we discussed this)\\b",
        "flags": "i",
        "precision": 1,
        "fires": 3
      },
      {
        "id": "stop-with-negative",
        "pattern": "\\bstop\\b.{0,30}\\b(wrong|broke|fucking|what|no|don't|not|this is|you)\\b",
        "flags": "i",
        "precision": 0.95,
        "note": "Stop + negative context = correction. Bare 'stop' without negative moved to medium."
      },
      {
        "id": "prohibition",
        "pattern": "\\b(don't ever|never do that|please don't|do not do)\\b",
        "flags": "i",
        "precision": 1,
        "fires": 16,
        "note": "Removed bare 'stop' and bare 'do not' — too many instruction false positives."
      },
      {
        "id": "blame-question",
        "pattern": "\\b(why did you|why are you|that broke|you broke|you just)\\b",
        "flags": "i",
        "precision": 1,
        "fires": 3
      },
      {
        "id": "revert-request",
        "pattern": "\\b(revert|undo|put it back|roll back)\\b",
        "flags": "i",
        "precision": 0.5,
        "fires": 2
      },
      {
        "id": "giving-up",
        "pattern": "\\b(let me (just )?do it|i'll (just )?do it|forget it|never\\s*mind)\\b",
        "flags": "i",
        "precision": 1
      },
      {
        "id": "not-visible",
        "pattern": "\\b(don't see|can't see|cannot see|not visible|invisible|not showing|not rendering)\\b",
        "flags": "i",
        "precision": 1,
        "hits": 8
      },
      {
        "id": "questioning-why",
        "pattern": "\\b(why (is|are|does|did) (it|the|this))\\b",
        "flags": "i",
        "precision": 1,
        "hits": 6
      },
      {
        "id": "hesitation",
        "pattern": "\\b(hmm+)\\b",
        "flags": "i",
        "precision": 1,
        "hits": 6
      },
      {
        "id": "same-result",
        "pattern": "\\b(it is the same|it's the same|still the same|same (problem|issue|bug|error|result))\\b",
        "flags": "i",
        "precision": 1,
        "hits": 5
      },
      {
        "id": "still-broken",
        "pattern": "\\b(still (flat|broken|wrong|missing|empty|invisible|not))\\b",
        "flags": "i",
        "precision": 1,
        "hits": 3
      },
      {
        "id": "runtime-issue",
        "pattern": "\\b(crash|crashes|crashing|crashed)\\b",
        "flags": "i",
        "precision": 1,
        "hits": 3
      },
      {
        "id": "not-working",
        "pattern": "\\b(not (working|rendering|updating|showing|displaying))\\b",
        "flags": "i",
        "precision": 1,
        "hits": 3
      },
      {
        "id": "wrong-action",
        "pattern": "\\b(you flipped|you swapped|you mixed up|you confused)\\b",
        "flags": "i",
        "precision": 1,
        "hits": 2
      },
      {
        "id": "just-empty",
        "pattern": "\\b(just (flat|empty|blank|black|white|nothing))\\b",
        "flags": "i",
        "precision": 1,
        "hits": 2
      },
      {
        "id": "completely-wrong",
        "pattern": "\\b(completely wrong|totally wrong|absolutely wrong|so wrong|fucking wrong)\\b",
        "flags": "i",
        "precision": 1,
        "note": "Strong negative — always a correction"
      }
    ],
    "medium": [
      {
        "id": "bare-stop-redirect",
        "pattern": "^\\s*stop\\b",
        "flags": "i",
        "precision": 0.5,
        "note": "Bare 'stop' at start — could be correction or instruction. Medium confidence."
      },
      {
        "id": "quality-pushback",
        "pattern": "\\b(audit|think deeper|planning mode)\\b",
        "flags": "i",
        "precision": 0.78,
        "hits": 25
      },
      {
        "id": "visual-artifact",
        "pattern": "\\b(artifact|artifacts|glitch|glitches)\\b",
        "flags": "i",
        "precision": 0.5,
        "hits": 3
      }
    ],
    "low": []
  },
  "approval": {
    "high": [
      {
        "id": "strong-approval",
        "pattern": "\\b(perfect|exactly|great|lgtm|looks good|nice work|nailed it)\\b",
        "flags": "i"
      },
      {
        "id": "confirmation",
        "pattern": "\\b(that works|that's right|correct|good job|well done)\\b",
        "flags": "i"
      },
      {
        "id": "action-approval",
        "pattern": "\\b(ship it|merge it|push it|deploy it|commit it)\\b",
        "flags": "i"
      },
      {
        "id": "thanks",
        "pattern": "\\b(thanks|thank you)\\b",
        "flags": "i"
      },
      {
        "id": "implicit-yes",
        "pattern": "^\\s*(yes|yep|yeah|yup|ok|okay)\\s*[,.]?\\s*$",
        "flags": "i",
        "note": "Bare affirmative at start of line — implicit approval"
      },
      {
        "id": "yes-directive",
        "pattern": "^\\s*(yes|ok|okay)\\b.{0,20}\\b(do it|go ahead|proceed|continue|please|commit|push)\\b",
        "flags": "i",
        "note": "Affirmative + action word = approval"
      },
      {
        "id": "continue-approval",
        "pattern": "^\\s*continue\\s*$",
        "flags": "i",
        "note": "Bare 'continue' = implicit approval of current direction"
      },
      {
        "id": "try-it",
        "pattern": "\\b(try (it|that|this)|let's try|go for it|let's do it|let's go)\\b",
        "flags": "i",
        "note": "Directing to try = approving the approach"
      }
    ]
  },
  "skip": [
    "^!",
    "^<command-name>",
    "^<system-reminder>",
    "^<task-notification>",
    "^<local-command",
    "^Base directory for this skill",
    "^Implement the following plan",
    "^This session is being continued",
    "^Service Unavailable",
    "^fleeky@\\w+",
    "tool_use_id",
    "tool_result",
    "^Godot Engine v",
    "^Vulkan \\d",
    "^\\[Request interrupted",
    "^\\[P2P\\]",
    "^\\[GitSync\\]",
    "^\\[Mirror\\]",
    "^\\[OTA\\]",
    "^\\[ANProto\\]",
    "^\\[Deploy\\]",
    "^\\[tid:",
    "^remote:",
    "^To /home/",
    "^● User approved",
    "^● UserPromptSubmit",
    "^error: cannot lock ref",
    "^\\s*\\{\\s*$",
    "^\\s*\\}\\s*$",
    "^\\s*\\[\\s*$",
    "^\\$\\s",
    "^\\d+\\.\\d+\\.\\d+",
    "^node:",
    "^Error:",
    "^\\s*at\\s",
    "^fatal:",
    "^warning:",
    "^hint:",
    "RangeError|TypeError|SyntaxError|ReferenceError"
  ]
}