feat(accommodation): surface ratings, facilities and metadata - #8
Merged
Conversation
Refresh the committed OpenAPI snapshot from production, which brings in the new accommodation metadata: `imageUrl`, `description`, `url`, the 15-member `features` enum, `externalRating` (score + scale + count + source), `type` and `roomDetails` on the read path, and `locationiqPlaceId` on option locations. `mna trips show` now prints an accommodation table per variant — cost, guest rating in its source scale (`8.8/10 (92)`, never normalised), type/rooms/size and facilities — so a shortlist is comparable without `--json`. `--all-options` now changes the human output too, not just the JSON. The write path needed no change: `options add|edit --from-json` passes the body through, verified end-to-end against production (all new fields round-trip). Skill updates: record ratings in native units, never overload `name` with data that has its own field, heuristics from a real planning session, and the corrected location write shape — production keeps the flat `address`/`latitude`/`longitude` form and silently drops the nested `formattedAddress`/`coordinates` form the reference previously prescribed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
The skill had hardened one planner's circumstances into rules: złoty amounts, Croatian changeover days, Italian short-stay premiums, Adriatic beaches, a specific family pickup. Useless to anyone planning from Denver. Restructured as a five-phase process mapped to the CLI — elicit (anchors, party, dates, budget + home currency, this-trip preferences, or detect the "just pick one" mode) → research real availability → structure in MNA (a table of which command builds which level) → compare end-to-end totals → decide, select, share. The old "method" and "playbook" sections overlapped heavily and are folded into it. Each regional fact became the category of check behind it: changeover days and minimum stays are "local booking conventions to look up", the Italian premium is "short-stay penalties", vignettes and ferries are "cost of getting there beyond fuel or fare", sand rarity is "what the marketing word means locally". No currency appears anywhere; the process elicits the user's and presents totals in it. Fuel arithmetic now gives both metric and US customary forms. What was genuinely universal is kept: real listings before decisions, whole- trip costing, towns before properties when the destination is open, elicitation over assumption, native-scale ratings, field semantics. Same length as before (171 lines). The extracted regional material is good writing for a planning-experience post, just not for a skill. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
…ersal skill Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
…ns, dates required on variant create) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picks up the accommodation metadata the API now stores and returns, and makes the CLI show it.
What changed
Types —
openapi.jsonsnapshot refreshed from production (additive: 210 insertions, 4 changed descriptions). Brings inimageUrl,description,url, the 15-memberfeaturesenum,externalRating(score+scale+count+source),type/roomDetailson the read path, andlocationiqPlaceIdon option locations.bun run codegenregenerates cleanly; no existing code broke.Read path —
mna trips shownow prints an accommodation table per variant:Ratings stay in the scale their source published them in —
8.8/10and4.4/5are never normalised or compared against each other.--all-optionsnow changes the human output too (previously it only affected--json); without it you get the selected option per destination.Write path — no code change needed.
mna options add|edit --from-jsonpasses the JSON body straight through, so every new field is already settable. Verified end-to-end against production on a throwaway trip (created, written, read back, deleted):externalRating,features,description,url,imageUrl,type,roomDetailsandlocation.locationiqPlaceIdall round-trip.Skill —
skills/mna/SKILL.mdand both references:privateKitchen≠sharedKitchennameis a display name, not a place to stash price, town or working state — commentary belongs innotesFound while verifying
address/latitude/longitudeform is silently dropped and coordinates persist only when nested. Production does the opposite: the flat form persists, the nestedformattedAddress/coordinatesform is dropped and onlynamesurvives. Reproduced on bothoptions addandoptions edit. Corrected inreferences/cli-and-schemas.md, along with the fact thatlocationis replaced wholesale rather than merged.mna variants addis broken against production — the server rejects a body withoutdates(400, no message) even though the spec marks onlynameas required, and the command has no date flags. Reproducible on a fresh trip. Out of scope here, left alone.coordinates.latitude/.longitude, but the current spec'sCreateEventLocationCoordinatesV1Dtorequireslat/lng. Not tested, not changed.Gates
bun run codegen,bun run typecheck,bun run lint,bun test(138 pass, 0 fail — 10 new),bun run build+node dist/mna.js --versionall green.🤖 Generated with Claude Code
https://claude.ai/code/session_01AsdP2hvt4XQhYxkdNREXUq