feat: add recipes list/show command group (CU-868k0t6gb) - #9
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
A4 — Recipes command group
Adds
recipes listandrecipes show <id>, the read-side CLI for A4/Recipes (backendCU-868k0t6g6) under the A7 CLI umbrella (CU-868k0t6gb).A recipe is the bill of materials (formulation) for a product or variation — the materials and quantities consumed per batch, with cost/COGS rollups.
What's here
recipes list— paginated table:ID, PRODUCT, NAME, VARIATION, BATCH, INGR, UNIT COST, UNIT COGS. Filters:--product-id,--variation-id,--updated-since(incremental sync), plus the universal--all/--page/--per-page/--json/--ndjson.recipes show <id>— vertical key-value detail (incl. all six cost / labour / COGS rollups) followed by anINGREDIENTSsub-table (material / qty / unit).Design decisions
unit_cost+unit_cogs) — the per-unit COGS is the number makers price against.product_name/variation_name/material_name, falling back to the id when null (recipes expose names that manufactures did not).Architecture
Zero shared-core changes. Consumes the existing
resourceConfig+ pluggablelistFiltersseam built in A5 — this PR is one newcommands/recipes.gomirroringcommands/manufactures.go, plus the root-help row, the regenerated help golden, and the regenerated command-reference docs.Constraints upheld
{amount, currency_code}string pair (*output.Money); gated/null renders—, never a float.product_id/material_idsurface (the contract test assertsproject_id/item_idare absent).go test ./... -race,go vet ./...,gofmtclean.Testing
nameOrID/variationRefhelpers.recipesfixture contract check (envelope key, money shape, no internal-name leak).🤖 Generated with Claude Code