

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# AGENTS.md — Terminal Daemon23## Endpoint Ownership: Who May Touch the Socket Path45Two invariants govern the daemon's canonical socket path. Read this before changing anything that6links, renames, unlinks or stats it — or that treats its existence as evidence a daemon is running.78> **Only a daemon publishing itself onto the canonical endpoint may mutate that directory entry,9> and only by replacing an entry it has itself just proven dead.**10>11> **No actor removes a name it did not create.**1213**Why it exists.** `net.Server.close()` unlinks the pathname it bound with no ownership check, so a14departing daemon deleted whichever socket then sat at the canonical path — including a live15replacement's. The replacement stayed alive hosting PTYs no client could reach, which reads to the16user as terminals that accept keystrokes and never run them. Seven review rounds against the older17"launcher reclaims a dead process's name" shape produced twenty-three defects, all the same18interleaving: a third party observing liveness at T and acting on the directory entry at T+1.1920**The protocol** (`daemon-endpoint-ownership.ts`): bind a private `.p<hex>` name → try an exclusive21`link` → on `EEXIST` prove the incumbent dead by connecting → re-check the entry hasn't changed22hands → probe once more → `rename` in one syscall → verify we kept it.2324## Traps That Already Cost Us2526- **Never collapse "can't tell" into "dead."** Only `connected` means occupied; only27 `refused`/`missing` prove death. A timeout or `EPERM` proves nothing and must decline — treating28 it as death deletes an endpoint still serving every terminal on the host.29- **`link` first, never an unconditional `rename`.** `rename` replaces whatever it finds, so it30 would let a starting daemon destroy a healthy one. `link` fails loudly and forces the liveness31 question.32- **`rename`, never `unlink`-then-`link`.** The latter leaves the name absent between two calls;33 measured across a live handover it gapped on essentially every observation, where `rename` gapped34 on none in ~14,500 probes.35- **Do not identify an entry by `birthtimeMs`.** Node documents it as sometimes holding the ctime,36 filesystems without a birth time report the epoch, and its granularity is often coarser than the37 events it must separate. Three attempts to patch around this produced three more defects; inode38 recycling is now settled by asking whether anything is _serving_.39- **Do not add a sweeper.** Deciding whether someone else's leftover is safe to delete is the40 question this design retired; the last one produced five defects, including deleting a live41 listener's only pathname. Every actor removes its own scratch name on each non-crash path.42- **Scratch namespaces must stay out of released builds' patterns.** Shipped versions sweep43 `^\.b[0-9a-f]{10}$` on age alone with no liveness check, which is why the bind name is `.p`.44 Deleting our sweeper does not un-ship theirs.45- **Never remove the endpoint on shutdown.** A departing daemon leaves a dead entry; the next46 publisher replaces it in one rename.4748**Residual risk.** The final probe and the `rename` are two syscalls, and POSIX has no49rename-if-target-is-inode-X. The harm is separately unreachable: a daemon never creates a session50on an endpoint it no longer holds (`daemon-server.ts`), and it drains rather than serving on.51
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| stablyai/orcaAGENTS.md · 46k | AGENTS.md | lint-formatstyletypesgit+4 | 71/100 | today | |
| stablyai/orcatests/e2e/AGENTS.md · 46k | AGENTS.md | buildteststyletesting-strategy | 70/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 68k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 13 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 14 days ago | |
| aaif-goose/gooseAGENTS.md · 53k | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 8 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| deepseek-ai/deepseek-harnessnative/landlock-run/AGENTS.md · 104k | AGENTS.md | setupteststylearch+3 | 100/100 | today | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | today | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 201k | AGENTS.md | buildteststylearch+3 | 100/100 | 14 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/stablyai-orca-src-main-daemon-agents)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.