Skip to content

CookBot tools: workspace search, pantry, shopping list, catalog (#82, cook-md#293) - #103

Merged
dubadub merged 26 commits into
mainfrom
cookbot-workspace-catalog-tools
Aug 19, 2026
Merged

CookBot tools: workspace search, pantry, shopping list, catalog (#82, cook-md#293)#103
dubadub merged 26 commits into
mainfrom
cookbot-workspace-catalog-tools

Conversation

@dubadub

@dubadub dubadub commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Closes #82 (part 1 — CookCLI operations as tools). Client side of cook-md/cook-md#293 (pairs with cook-md/cook-md#309).

Six deterministic CookBot tools so the assistant stops re-reading files each turn and can reach the curated cook.md catalog.

Spec: docs/superpowers/specs/2026-08-18-cookbot-workspace-and-catalog-tools-design.md · Plan: docs/superpowers/plans/2026-08-18-cookbot-workspace-and-catalog-tools.md

Workspace tools (packages/cooklang, issue #82)

  • searchRecipes — the real cook search (cooklang_find::search) via a new async native export; blank query lists every .cook/.menu; tag filter; workspace-relative paths.
  • getPantry / checkPantryconfig/pantry.conf parsed by the cooklang crate (sections, low stock; case-insensitive in-stock check). Missing file is a valid answer, other read errors are errors.
  • generateShoppingList — headless list from recipes or a .menu (aisle-grouped, pantry-subtracted, sub-recipe refs resolved), or addToList: true to add to the live list and open the view. Validates before mutating; paths bounded to the workspace.
  • Refactor (pure moves): RecipeReferenceResolver extracted from ShoppingListContribution; ShoppingListService.computeResult() extracted from regenerate().
  • Native: searchRecipes / parsePantry / checkPantry exports; cooklang-find → 0.6.1 with default-features = false (avoids duplicate uniffi symbols; cooklang-reports still pulls 0.5.8 — collapses when it bumps).

Catalog tools (packages/cooklang-ai, #293)

  • Proto mirrored from cookbot (SearchRecipeCatalog, GetCatalogRecipe); gRPC client + CookbotServerToolsService plumbing.
  • searchRecipeCatalog — structured criteria (enums match the Rails vocabulary and the cookbot recipe-discovery skill) + keywords; returns Rails JSON verbatim.
  • addCatalogRecipe — fetches the recipe and stages it through the chat changeset exactly like suggestFileContent (default path <Meal>/<Title>.cook); the recipe body never round-trips through the model.

Verification

  • @theia/cooklang 151 + @theia/cooklang-ai 88 specs green; lint clean; cargo test/clippy clean; whole-monorepo npm run compile and app bundle OK.
  • Pending: manual smoke in the running app against local Rails + cookbot (the five prompts in the plan's Task 12).

Release note

The cookbot server PR (cook-md/cook-md#309) ships prompts that name these tools — release this editor build first or together.

dubadub added 26 commits August 18, 2026 21:48
@dubadub
dubadub merged commit adb19ff into main Aug 19, 2026
2 checks passed
@dubadub
dubadub deleted the cookbot-workspace-catalog-tools branch August 19, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose CookCLI operations (pantry, shopping list, recipe search) as CookBot tools

1 participant