[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MQVJ0JQW70S76FP30S6ESJ":3,"skill-same:01M6MQVJ0JQW70S76FP30S6ESJ":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M6MQVJ0JQW70S76FP30S6ESJ","kimchi-surface-scan",null,"Use when you need to re-derive, verify or update the Kimchi CLI's server-side HTTP surface — which hosts it talks to, which endpoints, how each target is repointed, and what breaks when one is unreachable. Covers finding every released source tree in the store, identifying it by NAR hash, reading the compiled bun binary when no tree exists, and attributing a path to Kimchi rather than to a vendored SDK. Also regenerates the reference doc's diagrams.","higherorderfunctor\u002Fnix-agentic-tools","higherorderfunctor","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34926636?v=4","01M6MQT3TQS16N1CBRZJYR2EMB","Christopher Aubut","01M6MQT419AF9ERC87M87NRXQV",2,"Unlicense","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fdev\u002Fskills\u002Fkimchi-surface-scan\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"kimchi surface scan","scan","server-side","when","unreachable","source","path","hosts","which","tree","reading","re","you","store","false","cli","endpoints","diagrams","bun","use","how","verify","doc","server","update","http","sdk","2026-11-10 10:12:30",false,"---\nname: kimchi-surface-scan\ndescription: >-\n  Use when you need to re-derive, verify or update the Kimchi CLI's server-side\n  HTTP surface — which hosts it talks to, which endpoints, how each target is\n  repointed, and what breaks when one is unreachable. Covers finding every\n  released source tree in the store, identifying it by NAR hash, reading the\n  compiled bun binary when no tree exists, and attributing a path to Kimchi\n  rather than to a vendored SDK. Also regenerates the reference doc's diagrams.\ndisable-model-invocation: false\n---\n\nRe-run the extraction that produced\n`dev\u002Freferences\u002Fkimchi-surface\u002Fkimchi-server-surface.md`.\n\n## Cost, so you size this correctly\n\nThe original discovery burned 23 agents and roughly 4.4M tokens, and nearly all\nof it went on not knowing the six things below. A rescan that starts from them\nis a single pass over one source tree. Do not fan out. Read source, cite source,\nand use a second agent only to check attribution on the handful of paths that a\nvendored SDK could also own.\n\n## Output\n\nAll three live in `dev\u002Freferences\u002Fkimchi-surface\u002F`.\n\n| Artifact                   | What it is                              |\n| -------------------------- | --------------------------------------- |\n| `kimchi-server-surface.md` | The census. Authoritative; edit this.   |\n| `kimchi-capabilities.svg`  | Rendered from it. Never edited by hand. |\n| `kimchi-endpoints.svg`     | Rendered from it. Never edited by hand. |\n\n## 1. Find every version's source tree, then identify it by hash\n\n`nix build` yields a compiled bun binary, but the package builds it from the\nrelease source pinned as `extraction.kimchiSource`, and the extractor reads the\nsame tree. So every version this clone has built or extracted left its source\ntree in the store. Find those.\n\n```bash\nfor p in \u002Fnix\u002Fstore\u002F*-source; do\n  [ -f \"$p\u002Fpackage.json\" ] && grep -q '@kimchi-dev\u002Fcli' \"$p\u002Fpackage.json\" \\\n    && echo \"$p  $(nix hash path --type sha256 --sri \"$p\")\"\ndone\n```\n\nThat enumerates the trees. To put a VERSION on one, map its NAR hash against the\nsource hash each branch pinned. That pin has lived in two places: a top-level\n`src` key on the older `build\u002Fkimchi-from-source` refs, and\n`extraction.kimchiSource` once the source build and the extractor shared one\npin. Guard the JSON read, because older refs carry neither and some carry no\n`sources.json` at all. Unguarded, the ~180 refs in a working clone bury the\nhandful of real lines under a couple of hundred tracebacks, and `2>\u002Fdev\u002Fnull`\nsilences git but not Python.\n\n```bash\ngit for-each-ref --format='%(refname:short)' refs\u002Fheads refs\u002Fremotes | while read -r br; do\n  git show \"$br:packages\u002Fkimchi\u002Fsources.json\" 2>\u002Fdev\u002Fnull | python3 -c '\nimport json, sys\ntry:\n    d = json.load(sys.stdin)\n    src = d.get(\"src\") or d[\"extraction\"][\"kimchiSource\"]\n    print(d[\"version\"], src[\"hash\"])\nexcept (KeyError, TypeError, ValueError):\n    pass\n'\ndone | sort -u\n```\n\nRun against this clone on 2026-09-22, that is the whole of its output:\n\n```text\n1.1.21 sha256-46UKL5Wxh+aaJFH6\u002FyWacg+FhXBzO27duo\u002F70tfIj08=\n1.1.25 sha256-5dTaqgZbuppRQbd6rpA822mX1hyLatXEwxONM4p8zos=\n1.1.26 sha256-dcq7CE5YpXx7DN\u002FpxfrO0dOzzq7mG3FR4tcWVcY0oJ4=\n1.1.27 sha256-DAzjhZPML0ujQkTommNgvhWOLTQBbOUdAHTvsn1UINc=\n```\n\n**Four versions against nine source trees, so the hash map is not a complete\nmethod.** It resolves only the versions some ref still pins, and on that run\nneither 1.1.29 nor 1.1.30 was among them — which are the two you are most likely\nto care about. The other five trees were identified by content instead. 1.1.30\nwas settled by finding three strings unique to it present in the 1.1.30 binary\n(section 2). Treat the hash map as the cheap first pass and a content probe as\nthe ordinary fallback, not as an exception.\n\n**Never trust a `.drv` label, a directory name, or which branch pinned a tree.**\nTwo misidentifications happened during discovery and both looked authoritative:\none agent read a `.drv` whose commit message named a version and reported that\nversion; the orchestrator inferred a tree's version from the PR branch that\npinned it. Both were wrong. Only `nix hash path` against `sources.json` settled\nit.\n\nAt the time of writing the store held nine trees, covering 1.1.21, 1.1.25,\n1.1.26, 1.1.27, 1.1.29 and 1.1.30, plus 1.1.22 through 1.1.24 for bisecting.\n**That list is a snapshot of what the method returned once, not a lookup table**\n— re-run the loops rather than assuming it.\n\n### When no tree exists for the version you want\n\nA rescan normally starts on a version nobody has built from source, which is\nexactly the case neither loop above can help with. It is also the common case\nafter a garbage collection: on 2026-09-28 the first loop found one tree, the\npinned 1.1.37, where it had found nine a week earlier. Fetch the release tree\ndirectly; nothing needs to build:\n\n```bash\nnix store prefetch-file --json --unpack \\\n  \"https:\u002F\u002Fgithub.com\u002Fgetkimchi\u002Fkimchi\u002Farchive\u002Frefs\u002Ftags\u002Fv\u003Cversion>.tar.gz\"\n```\n\n`storePath` in the output is the unpacked tree, and `hash` is its NAR hash — the\nsame value `extraction.kimchiSource.hash` pins for that release. So the fetch is\nits own identification: the tag is in the URL you supplied, and the hash can be\nchecked against any pin this repository ever recorded with\n`git log --all -p -- packages\u002Fkimchi\u002Fsources.json`. On 2026-09-28 the 1.1.30,\n1.1.31, 1.1.32, 1.1.33 and 1.1.36 fetches matched their recorded pins exactly.\nFetch every release since the last census, not just the newest, so each change\ncan be bisected to the version that landed it.\n\nThis beats the binary route in section 2 for anything more than a couple of call\nsites.\n\n## 2. With no source tree, read the binary\n\nA bun single-file executable embeds its JS bundle as plaintext with identifiers\nintact.\n\n```bash\nstrings -n 6 \u002Fnix\u002Fstore\u002F\u003Chash>-kimchi-\u003Cver>\u002Fbin\u002Fkimchi > bundle.txt\n```\n\nLines are enormous. Re-wrap on `;{}` boundaries at about 600 characters before\ngrepping, or every match returns the same line. Use the bundle only to confirm\nthat something is present or absent in a version with no tree. A source citation\nbeats a bundle offset every time, and the reference marks bundle-only citations\n`B\u003Cversion>:L…` (`B30`, `B36`) for exactly that reason. A vendored library that\nonly the binary contains — mem0, since 1.1.33 — is the other legitimate use.\n\n## 3. Attribution is the job. Finding paths is not\n\nA grep for URL-shaped strings returns roughly the right _count_ and badly the\nwrong _set_. The bundle vendors the OpenAI SDK, the Anthropic SDK, Google auth,\nAWS STS, Cloudflare, xAI, GitHub, and the upstream\n`@earendil-works\u002Fpi-coding-agent` harness (host `pi.dev`).\n\n- `\u002Fv1\u002Fmessages`, `\u002Fv1\u002Fmodels`, `\u002Fv1\u002Ffiles`, `\u002Fv1\u002Fbatches` and\n  `\u002Fv1\u002Forganizations\u002F*` are byte-identical whether a vendored SDK owns them or\n  Kimchi does.\n- Around 150 such literals have zero call sites and are unreachable.\n- But Kimchi **does** rebind both SDK base URLs through pi's provider config, so\n  the two entry points it actually calls — `chat.completions.create` and\n  `beta.messages.create` — really do land on `llm.kimchi.dev`.\n\n**A finding counts only when you show which base URL the path is joined to at\nthe call site.** Trace the variable to its construction and to its default, and\nreport that chain in the cell. A path with no reachable call site belongs in the\n\"never called\" tables, not in the capability matrix.\n\n## 4. Run source first, binary second\n\nDiscovery ran the binary first and the source second, and the source pass\ncorrected the binary pass in several places. Source is cheaper, gives real file\npaths, and its `*.test.ts` fixtures pin wire shapes that the bundle only hints\nat. Confirm against the binary only for a version that has no tree.\n\n## 5. Known base URLs — re-derive, do not assume\n\nThey are recorded so a rescan can see what moved.\n\n```text\nllm.kimchi.dev                 inference gateway + control plane\n                               (models\u002Fmetadata, route through 1.1.36, search, credits, budget)\nllm.kimchi.dev\u002Fopenai\u002Fv1       OpenAI wire; vendored OpenAI SDK rebound here\nllm.kimchi.dev\u002Fanthropic       Anthropic wire; vendored Anthropic SDK rebound here\napp.kimchi.dev\u002Fapi             sandbox control plane AND account identity\n\u003Cworkspace>.remote.kimchi.dev  per-workspace worker; host is server-assigned\napi.cast.ai                    telemetry ingest, \u002Fstats analytics, key validation\nllm.eu.kimchi.dev              EU counterparts of the three region hosts above,\napp.eu.kimchi.dev                selected by KIMCHI_REGION or the config key\napi.eu.cast.ai                   region (1.1.35 on)\n```\n\nFrom 1.1.35 every first-party host but the worker comes from `src\u002Fregions.ts`,\nand each surface layers its own override on top of the region. Read that file\nfirst, then trace which override wins per call site: `llmEndpoint` beats the\nregion for inference but not for web search. The Go ssh helper under `tools\u002F`\nkeeps its own hard-coded base and does not follow the region.\n\n`api.kimchi.dev` does not appear in any tree or in the binary. The documentation\npage that names it is stale.\n\n## 6. What an endpoint diff will not show you\n\nThe endpoint surface was frozen across 1.1.21 to 1.1.30: nothing was added,\nremoved or rehosted. 1.1.31 to 1.1.37 did add, remove and move endpoints, but\nthe changes that mattered most there were still about **when** calls fire —\nmemory calls that only exist once an experimental resource is enabled, and a\nregion that moves hosts without any path changing. A rescan that diffs endpoint\nlists alone sees that both exist, but not when they fire or which host wins.\nCheck at least:\n\n- **`KIMCHI_REMOTE_RUN` polarity.** It inverted from opt-in to opt-out in\n  1.1.22. Read the variable's default, not its name.\n- **Account gates on features.** A capability can become unreachable for an\n  account class without any endpoint changing.\n- **The global `fetch` patch's match rule.** Widening it re-routes calls the\n  endpoint table still lists under their old host.\n- **Default-on telemetry.** Check whether a call fires unasked, not only whether\n  its endpoint exists.\n- **Opt-in resources.** `src\u002Fresources\u002Fdefinitions.ts` lists every extension\n  with its `defaultEnabled`. An extension that is off by default can still carry\n  a whole new endpoint family.\n- **The region registry.** A host that follows the region at one call site and a\n  hard-coded base at another is a split a path diff cannot show.\n\nWrite these into the reference's \"what did change\" table with the version each\nlanded in. That table, not the matrix, is what a reader needs on a bump.\n\n## 7. Regenerate the diagrams\n\n`scripts\u002Fsurface-tables.py` reads the reference's GFM tables, so the SVGs are\nnever edited by hand. It is stdlib-only Python, but run it through the task:\n\n```bash\ndevenv tasks run --mode before generate:references:kimchi-surface\n```\n\n**The render arguments live in `dev\u002Freferences\u002Fkimchi-surface\u002Frenders.nix` and\nnowhere else** — title, subtitle, which columns each sheet projects, and the\nper-column widths. That task and `checks\u002Freferences\u002Fkimchi-surface-diagrams.nix`\nboth read it, so the command that fixes a drift failure cannot disagree with the\ncheck that raised it. Bump the version in `subtitle` THERE; a hand-typed\n`--subtitle` renders an SVG the check then rejects.\n\nThat check re-renders both SVGs from the tracked markdown and fails on any byte\ndifference, so a markdown edit committed without regenerating cannot reach main.\nThe committed pair renders at 1834x3552 and 1849x4972; an unchanged reference\nmust reproduce those exactly.\n\nTo read a projection in a terminal instead, or to check one capability without\nopening the whole sheet:\n\n```bash\npython3 dev\u002Fskills\u002Fkimchi-surface-scan\u002Fscripts\u002Fsurface-tables.py preview \\\n  dev\u002Freferences\u002Fkimchi-surface\u002Fkimchi-server-surface.md \\\n  --width 150 --cols 0,3,4 --filter search\n```\n\nThe renderer keeps the table shape that recurs — the six-column capability\nmatrix — and drops the one-off tables around it. **A new section needs no\nregistration, but its header has to match the matrix word for word.** Reword one\ncell of one header and that section stops being the matrix and leaves the sheet.\n`dominant()` is what makes that loud: it names every table it drops on stderr,\nand hard-fails when a dropped one still carries six columns. The drift check\ncannot see it — re-rendering after a reword produces a committed and a\nre-rendered SVG that agree with each other and both omit the section.\n\n## Local validation\n\n- `treefmt \u003Cfile>` on everything you touch. Markdown is prettier with\n  `proseWrap = \"always\"`.\n- New vocabulary goes in `config\u002Fcspell\u002Fproject-terms.txt`, sorted, and only if\n  it is a real term.\n- `devenv tasks run devenv:git-hooks:run` for the all-files diagnostic.\n\n## If a second CLI ever needs this\n\nThree steps carry over unchanged: hashing store paths to identify a version,\nreading a bun bundle with `strings` when no tree exists, and refusing a finding\nthat cannot name the base URL its path is joined to at the call site. The\nrenderer is already generic — it takes any markdown with a repeated GFM table\nand needs no Kimchi knowledge. What does not carry over is everything in\nsections 5 and 6, which is a census of one product's hosts and one product's\nbehavior changes. One sample is not a pattern, so none of this has been\ngeneralized; extract a shared skill when a second CLI actually needs it, not\nbefore.\n","Re-run the extraction that produced\n`dev\u002Freferences\u002Fkimchi-surface\u002Fkimchi-server-surface.md`.\n\n## Cost, so you size this correctly\n\nThe original discovery burned 23 agents and roughly 4.4M tokens, and nearly all\nof it went on not knowing the six things below. A rescan that starts from them\nis a single pass over one source tree. Do not fan out. Read source, cite source,\nand use a second agent only to check attribution on the handful of paths that a\nvendored SDK could also own.\n\n## Output\n\nAll three live in `dev\u002Freferences\u002Fkimchi-surface\u002F`.\n\n| Artifact                   | What it is                              |\n| -------------------------- | --------------------------------------- |\n| `kimchi-server-surface.md` | The census. Authoritative; edit this.   |\n| `kimchi-capabilities.svg`  | Rendered from it. Never edited by hand. |\n| `kimchi-endpoints.svg`     | Rendered from it. Never edited by hand. |\n\n## 1. Find every version's source tree, then identify it by hash\n\n`nix build` yields a compiled bun binary, but the package builds it from the\nrelease source pinned as `extraction.kimchiSource`, and the extractor reads the\nsame tree. So every version this clone has built or extracted left its source\ntree in the store. Find those.\n\n```bash\nfor p in \u002Fnix\u002Fstore\u002F*-source; do\n  [ -f \"$p\u002Fpackage.json\" ] && grep -q '@kimchi-dev\u002Fcli' \"$p\u002Fpackage.json\" \\\n    && echo \"$p  $(nix hash path --type sha256 --sri \"$p\")\"\ndone\n```\n\nThat enumerates the trees. To put a VERSION on one, map its NAR hash against the\nsource hash each branch pinned. That pin has lived in two places: a top-level\n`src` key on the older `build\u002Fkimchi-from-source` refs, and\n`extraction.kimchiSource` once the source build and the extractor shared one\npin. Guard the JSON read, because older refs carry neither and some carry no\n`sources.json` at all. Unguarded, the ~180 refs in a working clone bury the\nhandful of real lines under a couple of hundred tracebacks, and `2>\u002Fdev\u002Fnull`\nsilences git but not Python.\n\n```bash\ngit for-each-ref --format='%(refname:short)' refs\u002Fheads refs\u002Fremotes | while read -r br; do\n  git show \"$br:packages\u002Fkimchi\u002Fsources.json\" 2>\u002Fdev\u002Fnull | python3 -c '\nimport json, sys\ntry:\n    d = json.load(sys.stdin)\n    src = d.get(\"src\") or d[\"extraction\"][\"kimchiSource\"]\n    print(d[\"version\"], src[\"hash\"])\nexcept (KeyError, TypeError, ValueError):\n    pass\n'\ndone | sort -u\n```\n\nRun against this clone on 2026-09-22, that is the whole of its output:\n\n```text\n1.1.21 sha256-46UKL5Wxh+aaJFH6\u002FyWacg+FhXBzO27duo\u002F70tfIj08=\n1.1.25 sha256-5dTaqgZbuppRQbd6rpA822mX1hyLatXEwxONM4p8zos=\n1.1.26 sha256-dcq7CE5YpXx7DN\u002FpxfrO0dOzzq7mG3FR4tcWVcY0oJ4=\n1.1.27 sha256-DAzjhZPML0ujQkTommNgvhWOLTQBbOUdAHTvsn1UINc=\n```\n\n**Four versions against nine source trees, so the hash map is not a complete\nmethod.** It resolves only the versions some ref still pins, and on that run\nneither 1.1.29 nor 1.1.30 was among them — which are the two you are most likely\nto care about. The other five trees were identified by content instead. 1.1.30\nwas settled by finding three strings unique to it present in the 1.1.30 binary\n(section 2). Treat the hash map as the cheap first pass and a content probe as\nthe ordinary fallback, not as an exception.\n\n**Never trust a `.drv` label, a directory name, or which branch pinned a tree.**\nTwo misidentifications happened during discovery and both looked authoritative:\none agent read a `.drv` whose commit message named a version and reported that\nversion; the orchestrator inferred a tree's version from the PR branch that\npinned it. Both were wrong. Only `nix hash path` against `sources.json` settled\nit.\n\nAt the time of writing the store held nine trees, covering 1.1.21, 1.1.25,\n1.1.26, 1.1.27, 1.1.29 and 1.1.30, plus 1.1.22 through 1.1.24 for bisecting.\n**That list is a snapshot of what the method returned once, not a lookup table**\n— re-run the loops rather than assuming it.\n\n### When no tree exists for the version you want\n\nA rescan normally starts on a version nobody has built from source, which is\nexactly the case neither loop above can help with. It is also the common case\nafter a garbage collection: on 2026-09-28 the first loop found one tree, the\npinned 1.1.37, where it had found nine a week earlier. Fetch the release tree\ndirectly; nothing needs to build:\n\n```bash\nnix store prefetch-file --json --unpack \\\n  \"https:\u002F\u002Fgithub.com\u002Fgetkimchi\u002Fkimchi\u002Farchive\u002Frefs\u002Ftags\u002Fv\u003Cversion>.tar.gz\"\n```\n\n`storePath` in the output is the unpacked tree, and `hash` is its NAR hash — the\nsame value `extraction.kimchiSource.hash` pins for that release. So the fetch is\nits own identification: the tag is in the URL you supplied, and the hash can be\nchecked against any pin this repository ever recorded with\n`git log --all -p -- packages\u002Fkimchi\u002Fsources.json`. On 2026-09-28 the 1.1.30,\n1.1.31, 1.1.32, 1.1.33 and 1.1.36 fetches matched their recorded pins exactly.\nFetch every release since the last census, not just the newest, so each change\ncan be bisected to the version that landed it.\n\nThis beats the binary route in section 2 for anything more than a couple of call\nsites.\n\n## 2. With no source tree, read the binary\n\nA bun single-file executable embeds its JS bundle as plaintext with identifiers\nintact.\n\n```bash\nstrings -n 6 \u002Fnix\u002Fstore\u002F\u003Chash>-kimchi-\u003Cver>\u002Fbin\u002Fkimchi > bundle.txt\n```\n\nLines are enormous. Re-wrap on `;{}` boundaries at about 600 characters before\ngrepping, or every match returns the same line. Use the bundle only to confirm\nthat something is present or absent in a version with no tree. A source citation\nbeats a bundle offset every time, and the reference marks bundle-only citations\n`B\u003Cversion>:L…` (`B30`, `B36`) for exactly that reason. A vendored library that\nonly the binary contains — mem0, since 1.1.33 — is the other legitimate use.\n\n## 3. Attribution is the job. Finding paths is not\n\nA grep for URL-shaped strings returns roughly the right _count_ and badly the\nwrong _set_. The bundle vendors the OpenAI SDK, the Anthropic SDK, Google auth,\nAWS STS, Cloudflare, xAI, GitHub, and the upstream\n`@earendil-works\u002Fpi-coding-agent` harness (host `pi.dev`).\n\n- `\u002Fv1\u002Fmessages`, `\u002Fv1\u002Fmodels`, `\u002Fv1\u002Ffiles`, `\u002Fv1\u002Fbatches` and\n  `\u002Fv1\u002Forganizations\u002F*` are byte-identical whether a vendored SDK owns them or\n  Kimchi does.\n- Around 150 such literals have zero call sites and are unreachable.\n- But Kimchi **does** rebind both SDK base URLs through pi's provider config, so\n  the two entry points it actually calls — `chat.completions.create` and\n  `beta.messages.create` — really do land on `llm.kimchi.dev`.\n\n**A finding counts only when you show which base URL the path is joined to at\nthe call site.** Trace the variable to its construction and to its default, and\nreport that chain in the cell. A path with no reachable call site belongs in the\n\"never called\" tables, not in the capability matrix.\n\n## 4. Run source first, binary second\n\nDiscovery ran the binary first and the source second, and the source pass\ncorrected the binary pass in several places. Source is cheaper, gives real file\npaths, and its `*.test.ts` fixtures pin wire shapes that the bundle only hints\nat. Confirm against the binary only for a version that has no tree.\n\n## 5. Known base URLs — re-derive, do not assume\n\nThey are recorded so a rescan can see what moved.\n\n```text\nllm.kimchi.dev                 inference gateway + control plane\n                               (models\u002Fmetadata, route through 1.1.36, search, credits, budget)\nllm.kimchi.dev\u002Fopenai\u002Fv1       OpenAI wire; vendored OpenAI SDK rebound here\nllm.kimchi.dev\u002Fanthropic       Anthropic wire; vendored Anthropic SDK rebound here\napp.kimchi.dev\u002Fapi             sandbox control plane AND account identity\n\u003Cworkspace>.remote.kimchi.dev  per-workspace worker; host is server-assigned\napi.cast.ai                    telemetry ingest, \u002Fstats analytics, key validation\nllm.eu.kimchi.dev              EU counterparts of the three region hosts above,\napp.eu.kimchi.dev                selected by KIMCHI_REGION or the config key\napi.eu.cast.ai                   region (1.1.35 on)\n```\n\nFrom 1.1.35 every first-party host but the worker comes from `src\u002Fregions.ts`,\nand each surface layers its own override on top of the region. Read that file\nfirst, then trace which override wins per call site: `llmEndpoint` beats the\nregion for inference but not for web search. The Go ssh helper under `tools\u002F`\nkeeps its own hard-coded base and does not follow the region.\n\n`api.kimchi.dev` does not appear in any tree or in the binary. The documentation\npage that names it is stale.\n\n## 6. What an endpoint diff will not show you\n\nThe endpoint surface was frozen across 1.1.21 to 1.1.30: nothing was added,\nremoved or rehosted. 1.1.31 to 1.1.37 did add, remove and move endpoints, but\nthe changes that mattered most there were still about **when** calls fire —\nmemory calls that only exist once an experimental resource is enabled, and a\nregion that moves hosts without any path changing. A rescan that diffs endpoint\nlists alone sees that both exist, but not when they fire or which host wins.\nCheck at least:\n\n- **`KIMCHI_REMOTE_RUN` polarity.** It inverted from opt-in to opt-out in\n  1.1.22. Read the variable's default, not its name.\n- **Account gates on features.** A capability can become unreachable for an\n  account class without any endpoint changing.\n- **The global `fetch` patch's match rule.** Widening it re-routes calls the\n  endpoint table still lists under their old host.\n- **Default-on telemetry.** Check whether a call fires unasked, not only whether\n  its endpoint exists.\n- **Opt-in resources.** `src\u002Fresources\u002Fdefinitions.ts` lists every extension\n  with its `defaultEnabled`. An extension that is off by default can still carry\n  a whole new endpoint family.\n- **The region registry.** A host that follows the region at one call site and a\n  hard-coded base at another is a split a path diff cannot show.\n\nWrite these into the reference's \"what did change\" table with the version each\nlanded in. That table, not the matrix, is what a reader needs on a bump.\n\n## 7. Regenerate the diagrams\n\n`scripts\u002Fsurface-tables.py` reads the reference's GFM tables, so the SVGs are\nnever edited by hand. It is stdlib-only Python, but run it through the task:\n\n```bash\ndevenv tasks run --mode before generate:references:kimchi-surface\n```\n\n**The render arguments live in `dev\u002Freferences\u002Fkimchi-surface\u002Frenders.nix` and\nnowhere else** — title, subtitle, which columns each sheet projects, and the\nper-column widths. That task and `checks\u002Freferences\u002Fkimchi-surface-diagrams.nix`\nboth read it, so the command that fixes a drift failure cannot disagree with the\ncheck that raised it. Bump the version in `subtitle` THERE; a hand-typed\n`--subtitle` renders an SVG the check then rejects.\n\nThat check re-renders both SVGs from the tracked markdown and fails on any byte\ndifference, so a markdown edit committed without regenerating cannot reach main.\nThe committed pair renders at 1834x3552 and 1849x4972; an unchanged reference\nmust reproduce those exactly.\n\nTo read a projection in a terminal instead, or to check one capability without\nopening the whole sheet:\n\n```bash\npython3 dev\u002Fskills\u002Fkimchi-surface-scan\u002Fscripts\u002Fsurface-tables.py preview \\\n  dev\u002Freferences\u002Fkimchi-surface\u002Fkimchi-server-surface.md \\\n  --width 150 --cols 0,3,4 --filter search\n```\n\nThe renderer keeps the table shape that recurs — the six-column capability\nmatrix — and drops the one-off tables around it. **A new section needs no\nregistration, but its header has to match the matrix word for word.** Reword one\ncell of one header and that section stops being the matrix and leaves the sheet.\n`dominant()` is what makes that loud: it names every table it drops on stderr,\nand hard-fails when a dropped one still carries six columns. The drift check\ncannot see it — re-rendering after a reword produces a committed and a\nre-rendered SVG that agree with each other and both omit the section.\n\n## Local validation\n\n- `treefmt \u003Cfile>` on everything you touch. Markdown is prettier with\n  `proseWrap = \"always\"`.\n- New vocabulary goes in `config\u002Fcspell\u002Fproject-terms.txt`, sorted, and only if\n  it is a real term.\n- `devenv tasks run devenv:git-hooks:run` for the all-files diagnostic.\n\n## If a second CLI ever needs this\n\nThree steps carry over unchanged: hashing store paths to identify a version,\nreading a bun bundle with `strings` when no tree exists, and refusing a finding\nthat cannot name the base URL its path is joined to at the call site. The\nrenderer is already generic — it takes any markdown with a repeated GFM table\nand needs no Kimchi knowledge. What does not carry over is everything in\nsections 5 and 6, which is a census of one product's hosts and one product's\nbehavior changes. One sample is not a pattern, so none of this has been\ngeneralized; extract a shared skill when a second CLI actually needs it, not\nbefore.\n",{"name":5,"description":7,"disable-model-invocation":47},"main","a33b4e70efef03fe75378fad9c847b73ea142c46","dev\u002Fskills\u002Fkimchi-surface-scan",0,"https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor","2026-11-15 04:06:13",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add higherorderfunctor\u002Fnix-agentic-tools --skill kimchi-surface-scan",{"tool":64,"command":65},"bunx","bunx skills add higherorderfunctor\u002Fnix-agentic-tools --skill kimchi-surface-scan",{"tool":67,"command":68},"pnpm","pnpm dlx skills add higherorderfunctor\u002Fnix-agentic-tools --skill kimchi-surface-scan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fdev\u002Fskills\u002Fkimchi-surface-scan\u002FSKILL.md",true,[72],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fsurface-tables.py","SCRIPT","脚本",19154,"https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fdev\u002Fskills\u002Fkimchi-surface-scan\u002Fscripts\u002Fsurface-tables.py",[79,103,130,149,168,182],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":46},"01M6MQXHSDNFXSN7TT5FFWPF3X","stack-test","Use when you need to run tests or formatters across commits in a stack. Use INSTEAD of manual git test run or looping git checkout + test. Prevents: testing every commit when only the tip has to pass, unbounded parallel jobs exhausting memory, cache misunderstandings.","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fpackages\u002Fstacked-workflows\u002Fskills\u002Fstack-test\u002FSKILL.md",[],[86,87,88,89,90,91,92,93,94,95,96,97,98,38,33,31,99,100,101,102,22],"test","stack","stack test","parallel","TIP","checkout","commits","memory","manual","testing","fix","tests","only","cache","commit","across","command",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":46},"01M6MQXAXVWG1RY9H2116G4SVX","stack-summary","Use when you need to audit, analyze, or review stack quality before restructuring. Produces a structured summary with per-commit classification, philosophy audit, and violation flags. Output feeds directly into \u002Fstack-plan restructure mode. Use INSTEAD of manual git log inspection.","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fpackages\u002Fstacked-workflows\u002Fskills\u002Fstack-summary\u002FSKILL.md",[],[87,110,111,112,113,114,94,115,116,38,33,31,117,100,118,119,120,121,122,123,124,22,125,126,127,128,129],"stack summary","summary","feeds","review stack","for","mode","classification","git log","log","review","output","analyze","with","philosophy","inspection","plan","worktree","audit","flags","git",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":46},"01M6MQX62HMQR5CSN4FSC95ZJC","stack-submit","Use when you need to push, submit, or create pull requests for a commit stack. Rebases only the current stack onto upstream main, validates, and pushes INSTEAD of manual git sync + git submit + PR\u002FMR creation. Handles branch creation, stacked PR\u002FMR creation with correct base branches.","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fpackages\u002Fstacked-workflows\u002Fskills\u002Fstack-submit\u002FSKILL.md",[],[137,87,138,139,140,141,142,143,114,94,144,145,146,98,51,38,33,147,148,22],"submit","stack submit","pull","branch","push","pr","creation","correct","upstream","branches","git sync","mr",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":46},"01M6MQX2BNQ4MAV9KCV0RZ734G","stack-split","Use when you need to break up, split, or decompose a large commit into smaller atomic commits. Use INSTEAD of manual git rebase -i + edit or git reset HEAD^. Prevents: non-working intermediate commits, wrong split ordering, missed downstream restack.","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fpackages\u002Fstacked-workflows\u002Fskills\u002Fstack-split\u002FSKILL.md",[],[156,87,157,158,92,94,159,38,33,160,31,100,161,162,163,164,165,166,129,167,22],"split","stack split","decompose","up","atomic commits","reset","head","missed","break","atomic","edit","rebase",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":46},"01M6MQWWM5P7FVQSF7EWHJ70C6","stack-plan","Use when you need to plan commits, restructure a stack, or commit uncommitted work as organized atomic commits. Builds a stack from a description, uncommitted work, or existing commits INSTEAD of dumping everything into one monolithic commit with git add -A && git commit, or manual git rebase -i, git reset --soft, or ad-hoc git move sequences. Prevents: wrong commit ordering, forward references, git move -F panics, untested intermediates.","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fpackages\u002Fstacked-workflows\u002Fskills\u002Fstack-plan\u002FSKILL.md",[],[87,125,175,28,176,92,114,177,94,178,38,179,33,160,31,100,180,161,122,181,22],"stack plan","as","move","git commit","Existing","git move","references",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":46},"01M6MQWP7CKTM5NF72MED1H8NS","stack-fix","Use when you need to fix, correct, or update content in an earlier commit — line-level edits, content moves, or structural changes. Absorbs staged changes into correct stack commits INSTEAD of running git absorb or git commit --fixup via Bash, or hand-running git prev + edit + git amend + git restack --merge. Prevents: missed dry-run preview, leftover staged changes going unnoticed, forgetting to restack. Falls back to guided manual amend when absorb cannot route hunks.","https:\u002F\u002Fgithub.com\u002Fhigherorderfunctor\u002Fnix-agentic-tools\u002Fblob\u002Fmain\u002Fpackages\u002Fstacked-workflows\u002Fskills\u002Fstack-fix\u002FSKILL.md",[],[96,87,189,190,92,94,144,191,178,38,33,31,192,193,100,194,195,196,197,22],"stack fix","back","structural","Bash","preview","hand","dry","route","running"]