feat(odin): fast per-recipe Odin language lookup skill#34
Conversation
A deterministic lookup skill: SKILL.md routes a query to ONE small recipe file and prints it verbatim (read-and-print, no synthesis) — even lighter than the vim/hx pattern since each recipe is its own file. - 15 self-contained recipes (procedures, returns, structs, conversions, defer, allocators, errors, unions, data-structures, math, strings, terminal, polymorphism, cli, resources), grounded in the official Odin docs from the odin-guide exploration. - No-query prints a terse topic index; a keyword table maps queries to files. - No public docs page (out of scope for now).
skapoor8
left a comment
There was a problem hiding this comment.
Review — PR #34: odin recipe lookup skill
Summary
Accurate: every spot-checked Odin API (allocators/arena/tracking, or_return/or_else, unions/Maybe.?, strings allocation ownership, component-wise vs linalg, matrix[R,C]T, ANSI + raw-mode caveat, core:flags) verified correct against odin-lang.org/pkg.odin-lang.org; the Handle↔^File and matrix4_rotate caveats are honest. The read-and-print determinism is enforced.
But the substring first-match router has a broken route and mis-routes — fixing.
Findings
skills/odin/SKILL.md — BLOCKING (fixed)
Substring first-match: /odin defer matches the def keyword in the procedures row (row 1) and never reaches defer.md. A recipe is unreachable by its own name.
skills/odin/SKILL.md — CONSIDER (fixed)
More substring mis-routes: os.args→procedures (args), proc group→procedures (proc), where to learn→polymorphism (where), and list collides with the no-query index trigger.
skills/odin/references/recipes/strings.md — CONSIDER (fixed)
strconv.atoi/itoa are being deprecated; add a one-line pointer to parse_int/append_int.
Fix: match an exact recipe-slug first, then whole-word (not substring) keyword match, and de-collide the ambiguous keywords.
#34 review) - Route an exact recipe name first (so /odin defer -> defer.md), then whole-word keyword match (never a bare substring), fixing /odin defer wrongly hitting 'def' in the procedures row. - Move ambiguous keywords to their right home: 'args'/'os.args' -> cli, 'proc group' phrase -> polymorphism, 'where clause' (not bare 'where'), drop bare 'list' (collided with the index trigger). - strings.md: note atoi/itoa are being deprecated (prefer parse_int/append_int).
|
Addressed in the latest commit: router now matches an exact recipe name first, then whole-word keywords (no bare substrings), so |
## [1.67.0](v1.66.1...v1.67.0) (2026-07-19) ### Features * **odin:** fast per-recipe Odin language lookup skill ([#34](#34)) A deterministic lookup skill packaged from the odin-guide exploration: SKILL.md routes a query to ONE small recipe file (exact-slug-first, then whole-word keyword match) and prints it verbatim — no synthesis, no churn. 15 self-contained recipes (procedures, returns, structs, conversions, defer, allocators, errors, unions, data-structures, math, strings, terminal, polymorphism, cli, resources) grounded in the official Odin docs. No-query prints a terse topic index. No public docs page (out of scope).
|
🎉 This PR is included in version 1.67.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Intent
Package the recent
.codevoyant/explore/odin-guide/output into an installableodinskill for fast, deterministic recipe lookup. Per the request: it should "just get the file and print quick like the hx skill, not get the llm to churn." So each recipe is its own small file — a query resolves to a single small-file read-and-print, no synthesis. No public docs for now.Changes
skills/odin/SKILL.md— a thin router: a keyword→file table maps a query to onereferences/recipes/{slug}.md, which the model reads and prints verbatim. No-query prints a terse topic index;allpoints to the index rather than dumping everything.skills/odin/references/recipes/*.md— 15 self-contained recipes: procedures, returns, structs, conversions, defer, allocators, errors, unions, data-structures, math, strings, terminal (fmt + full-screen ANSI board loop), polymorphism, cli, resources.odin-guideexploration (verified againstodin-lang.org/pkg.odin-lang.org); honest caveats carried over (core:osHandle↔^File split, no stdlib raw-terminal mode,matrix4_rotatearg order).Validation
mise run skills:validate(45/0, incl. odin)/odin allocators,/odin matrix math,/odin cli,/odin(index)Future Work