{
  "schema": "apex-capability-evidence/1",
  "subject": "yeongsu-dev-agency",
  "title": "Yeongsu (영수) — builds it, and proves it with receipts",
  "maker": "영수 (Yeongsu)",
  "evidence_source": "KFagi build commit bd9ff1a (private repo). The receipts and code bytes below are the published, recomputable subset.",
  "process": "commission form -> quote (= enforced execution budget) -> build -> delivery; every delivery ships a recomputable sha-pinned receipt plus an honest checked / not_checked list",
  "receipts": [
    {
      "tool": "version sort",
      "module": "versions",
      "function": "sort_versions",
      "bytes": 159,
      "sha256": "82da4e08f30d978951d2e7dd3a3929b8d780780d08510489649f9b14fc787f1b",
      "code": "def sort_versions(tags):\n    def parse(tag):\n        parts = tag[1:].split('.')\n        return tuple(int(p) for p in parts)\n    return sorted(tags, key=parse)\n"
    },
    {
      "tool": "human byte sizes",
      "module": "bytesize",
      "function": "format_bytes",
      "bytes": 234,
      "sha256": "8c58cc66f4e418cb7a9cc9fc95c17cc833f0945e2f66cc5c575c1eb274a22d9e",
      "code": "def format_bytes(n):\n    if n < 1024:\n        return f\"{n} B\"\n    elif n < 1024 ** 2:\n        return f\"{n / 1024:.1f} KB\"\n    elif n < 1024 ** 3:\n        return f\"{n / 1024**2:.1f} MB\"\n    else:\n        return f\"{n / 1024**3:.1f} GB\"\n"
    },
    {
      "tool": "compact duration parse",
      "module": "duration",
      "function": "parse_duration",
      "bytes": 450,
      "sha256": "c82906eec2d532f44841741728c5f93a5d34f35c877d880bb4cd404460b1e72c",
      "code": "def parse_duration(text):\n    total = 0\n    current_num = ''\n    for char in text:\n        if char.isdigit():\n            current_num += char\n        elif char == 'h':\n            total += int(current_num) * 3600\n            current_num = ''\n        elif char == 'm':\n            total += int(current_num) * 60\n            current_num = ''\n        elif char == 's':\n            total += int(current_num)\n            current_num = ''\n    return total\n"
    },
    {
      "tool": "middle truncate",
      "module": "shorten",
      "function": "truncate_middle",
      "bytes": 267,
      "sha256": "866ed3096d346fcc4c2b7a4be3c1194feaedba74a5734840c9a09091a2366821",
      "code": "def truncate_middle(s, n):\n    if len(s) <= n:\n        return s\n    head_len = (n - 1 + 1) // 2  # ceil((n-1)/2)\n    tail_len = (n - 1) // 2      # floor((n-1)/2)\n    head = s[:head_len]\n    tail = s[-tail_len:] if tail_len > 0 else ''\n    return head + '…' + tail\n"
    }
  ],
  "checked": [
    "each delivered module passed FORGERY-RESISTANT black-box acceptance in an isolated container against its promoted reference (random + shown inputs)",
    "each delivered module passed the client's HELD-OUT examples (never shown to the builder)",
    "each promoted reference passed the static risk screen and an operator promotion fork (recorded by sha256)",
    "every delivered file is hash-pinned in RECEIPT.json (verify_delivery re-checks byte-for-byte)"
  ],
  "not_checked": [
    "correctness beyond the promoted reference and the client's examples (acceptance = consistency with those anchors, not a general proof)",
    "runtime performance / complexity",
    "code style / lint conventions",
    "behavior outside the request's stated input domain"
  ],
  "honesty": {
    "reliability": "Three of the four commissions shipped on the first delivery attempt. parse_duration sat at the local model's reliability boundary: the held-out gate rejected two bad drafts before the completed attempt shipped. The held-out door rejected exactly the bad drafts — a wrong tool never went out. Grading runs in a forgery-resistant container.",
    "scale": "These are small utilities. The point is not the novelty of the tools — it is the verifiable process: anchored acceptance, held-out exams the builder never sees, and byte-pinned receipts."
  },
  "what_the_receipt_proves": "Integrity, not general correctness: the sha256 pins the exact delivered bytes, so anyone can re-hash the code below and compare. Correctness claims stay bounded by checked / not_checked above.",
  "verify": "sha256 over the exact code string bytes (each file ends with a trailing newline). Example: curl -s https://smartapex.uk/yeongsu.json | jq -j '.receipts[]|select(.function==\"sort_versions\").code' | sha256sum",
  "hardening": {
    "module": "versions",
    "function": "sort_versions",
    "original_sha256": "82da4e08f30d978951d2e7dd3a3929b8d780780d08510489649f9b14fc787f1b",
    "hardened_sha256": "6b93a7fd71f1ded52cbe4f1c019a86e592677c437e41f65ee2c65ed34921d4b4",
    "what_changed": "tolerates an optional leading lowercase v and a variable number of integer parts (the original mis-ordered no-v tags and crashed on pre-release tags)",
    "authored_with": "Kimi (frontier brain) inside Yeongsu's revision loop; succession receipt recorded, held-out gate re-passed",
    "now_live_as": {
      "card": "https://smartapex.uk/cards/card_semver_sort_v0_1_0",
      "run": "POST https://api.smartapex.uk/v1/tools/semver-sort/run"
    }
  }
}
