{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/turn-stable-repeated-tool-sequences-into-scripts",
  "id": "MHC-D-RESEARCH-0724",
  "version": "0.1.0",
  "title": "Turn stable repeated tool sequences into scripts",
  "summary": "Do not pay a language model to rediscover a deterministic macro on every run.",
  "kind": "heuristic",
  "body": "Once a repeated sequence is understood and the inputs and failures are known, encode the deterministic portion as a script or task-shaped tool. Let the model decide when to use it and interpret exceptions, while the script handles the repeatable mechanics. Add logging and idempotence or dry-run behavior when repeated execution could create side effects.",
  "limits": [
    "Do not automate an unstable process merely because it is repetitive; first understand authority, error handling and rollback."
  ],
  "topics": [
    "union-ai-eval-learning-workflow"
  ],
  "intents": [],
  "source_ids": [
    "RS-0B5DE7867BDB8E97"
  ],
  "evidence": [
    {
      "claim": "Current agent-engineering practice recommends moving repeatable deterministic operations into scripts or tools while reserving model judgment for ambiguous decisions.",
      "source_id": "RS-0B5DE7867BDB8E97",
      "role": "supports",
      "note": "Do not automate a process before its inputs, errors and authority boundaries are understood.",
      "locator": "Assign determinism, judgment and authority; reusable scripts"
    }
  ],
  "use_when": [
    "An AI agent repeatedly performs the same browser, CLI or data-manipulation sequence with little judgment."
  ],
  "avoid_when": [
    "Do not automate an unstable process merely because it is repetitive; first understand authority, error handling and rollback."
  ],
  "example": "Instead of having an agent manually transform the same export columns every week, generate a tested transformation script and let the agent handle only exceptions and interpretation.",
  "check": "The repeated sequence becomes faster, cheaper and more reproducible without hiding important decisions.",
  "sources": [
    {
      "id": "RS-0B5DE7867BDB8E97",
      "title": "Build Systems, Not Code",
      "url": "https://ai.engineer/talks/ZD9-4fW2HhM-build-systems-not-code"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0724",
      "to": "MHC-D-RESEARCH-0310",
      "type": "useful_with",
      "url": "/knowledge/prefer-a-task-shaped-tool-to-an-open-ended-one"
    }
  ],
  "collections": [
    {
      "id": "RC-ABC17A288CB87C85",
      "title": "Make AI work improve from failures instead of accumulating rituals",
      "url": "/collections/make-ai-work-improve-from-failures-instead-of-accumulating-rituals"
    }
  ]
}
