docs: sync AGENTS.md service/ layout with resolve-core.js + resolver.test.js (closes task/agents-md-resolve-core-layout)

Source: task/agents-md-resolve-core-layout (plan/steward-linker-quality) — layout inventory omitted resolve-core.js / resolver.test.js after the orchestration was extracted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
paul
2026-06-23 08:27:02 +00:00
co-authored by Claude Opus 4.8
parent 16d8f74997
commit 1fdc6a9168
+6 -3
View File
@@ -7,11 +7,14 @@ is tracked in the **towl** work-item store under project **`reddit-spotify-linke
## Stack & layout ## Stack & layout
- `service/` — zero-dependency Node resolver (Node 18+, built-in `fetch`/`http`). - `service/` — zero-dependency Node resolver (Node 18+, built-in `fetch`/`http`).
`resolver.js` = the HTTP server; `lib.js` = pure, side-effect-free logic (the `resolver.js` = the thin HTTP server that wires the real Spotify search + ollama
classify into resolve-core; `resolve-core.js` = the pure resolve orchestration
(`resolveAll`/`resolveOne`/`pickDirect`/`cacheKey`, taking injected search/classify
fns — unit-testable without network); `lib.js` = pure, side-effect-free logic (the
exact-name match precision lever + link shaping) so it's unit-testable; `llm.js` = exact-name match precision lever + link shaping) so it's unit-testable; `llm.js` =
pure ollama prompt/parse helpers (the optional local-LLM gate, HTTP-only — no pure ollama prompt/parse helpers (the optional local-LLM gate, HTTP-only — no
in-process model runtime); `lib.test.js` + `llm.test.js` = `node:test`. The only in-process model runtime); `lib.test.js` + `llm.test.js` + `resolver.test.js` =
music API is Spotify (MusicBrainz removed). The resolver confirms **both artists `node:test`. The only music API is Spotify (MusicBrainz removed). The resolver confirms **both artists
and albums**: one `type=artist,album` Spotify search per candidate, exact and albums**: one `type=artist,album` Spotify search per candidate, exact
case-insensitive name match against either; each result carries case-insensitive name match against either; each result carries
`kind: "artist" | "album"`. `kind: "artist" | "album"`.