Skip to content

feat(odin): fast per-recipe Odin language lookup skill#34

Merged
skapoor8 merged 2 commits into
mainfrom
feature/odin
Jul 19, 2026
Merged

feat(odin): fast per-recipe Odin language lookup skill#34
skapoor8 merged 2 commits into
mainfrom
feature/odin

Conversation

@skapoor8

Copy link
Copy Markdown
Contributor

Intent

Package the recent .codevoyant/explore/odin-guide/ output into an installable odin skill 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 one references/recipes/{slug}.md, which the model reads and prints verbatim. No-query prints a terse topic index; all points 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.
  • Content is the original, official-docs-grounded recipes from the odin-guide exploration (verified against odin-lang.org / pkg.odin-lang.org); honest caveats carried over (core:os Handle↔^File split, no stdlib raw-terminal mode, matrix4_rotate arg order).
  • No VitePress docs entry (explicitly out of scope).

Validation

  • mise run skills:validate (45/0, incl. odin)
  • Spot-check: /odin allocators, /odin matrix math, /odin cli, /odin (index)

Future Work

  • Optional public docs page later; the per-recipe pattern could back a broader lang-recipes family.

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 skapoor8 self-assigned this Jul 19, 2026

@skapoor8 skapoor8 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).
@skapoor8

Copy link
Copy Markdown
Contributor Author

Addressed in the latest commit: router now matches an exact recipe name first, then whole-word keywords (no bare substrings), so /odin defer hits defer.md and os.args/proc group/where to learn route correctly; list no longer collides with the index. Added a deprecation note for strconv atoi/itoa. All recipe APIs verified accurate in review.

@skapoor8
skapoor8 marked this pull request as ready for review July 19, 2026 20:21
@skapoor8
skapoor8 merged commit fb66ee7 into main Jul 19, 2026
2 checks passed
@skapoor8
skapoor8 deleted the feature/odin branch July 19, 2026 20:22
github-actions Bot pushed a commit that referenced this pull request Jul 19, 2026
## [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).
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.67.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant