Skip to content

fix(skills): review every skill against the code - #32

Merged
Plopix merged 29 commits into
mainfrom
fix/skills-review-against-code
Nov 2, 2026
Merged

Plopix merged 29 commits into
mainfrom
fix/skills-review-against-code

Conversation

@Plopix

@Plopix Plopix commented Oct 30, 2026

Copy link
Copy Markdown
Member

Every skill was checked against the Crystallize source, and what was wrong is fixed. One commit per skill, plus a few follow-ups where one skill's fix changed what another should say, so it reads best commit by commit.

Why

The skills ship to everyone who installs the plugin, and agents act on them without checking. They had drifted: many examples could not run at all, and some behaviour was described backwards.

What changed

Skill Main corrections
agent-tenants Provisioning has its own rate limit and can answer 503. Invites work once. Promoting a human claims the tenant
bookable-resources A lost booking race is refused, not silently orphaned. Availability and hydrate pairing. New /booking/admin reference
content-json Text is valid on formatting and block nodes. Image src in metadata renders nowhere
content-model SKILL.md from 1,046 to under 500 lines. Component defaults, limits and choice config. Upsert replaces whole definitions
data-creation No longer claims bulk import. Maps its payload onto the API input
information-architecture The folder example could not run. How paths, shortcuts, ordering and redirects behave
js-api-client Bearer tokens work on Core and PIM only. Pipelines take ids. shopBookingApi cannot reach the booking admin API
mass-operations Runs act as the task creator, not as tenant admin. Examples could not run. Fields the runner silently drops
mutation Removed cart mutations that do not exist. What deleting, unpublishing and publishing do
payments SKILL.md from 641 to under 500 lines. Helpers built invalid mutations. Crystallize does not retry webhooks. Shop writes can undo stage moves
permissions Replaced invented role GraphQL with the real API. Tokens belong to users
plugins Placements that never rendered, install flags, payload claims, where the Backend Token works
pricing The lowest price wins, not the most specific list. Cart, Discovery and mass operation examples
query Most Core examples failed validation. Discovery auth and paging, Shop order paging
responsive-images Variant formats depend on the source. Discovery's focalPoint. The Image component's real behaviour
subscriptions Crystallize renews contracts on schedule and never bills, the reverse of the old guidance. Shop and Core sync
taxonomy Removed a component and a filter that do not exist. How to ship a topic tree
vector-ranking The rerank window is the first N by sorting, not the top matches. Taste changes need a publish, not an ignition

Also adds five new references (crystallize-payments-lib, booking-admin, shape-consolidation, mass-operation-example, role-api) with eval cases for them. No version bump: releases are a separate workflow.

Review these first

These reverse what the skills used to say, so they matter most if they are wrong:

  1. subscriptions: a contract renews by itself near renewAt, and calling renewSubscriptionContract on top moves it a second period. The old text told integrators to renew it themselves. It was verified live, but a scheduled renewal would not show up in a short test.
  2. pricing: the lowest price wins across price lists.
  3. mutation and payments: a stage moved in Core or the App does not reach the Shop order, and the next Shop write puts it back.
  4. mass-operations: the runner acts as the user who created the task.
  5. vector-ranking: how the rerank window is chosen.

How it was checked

  • Each claim was checked by reading the code, not by running it. Nothing ran against a live tenant. Where a skill's own live measurements could not be settled from the code, they stay as written.
  • crystallize-payments-lib.md type-checks against @crystallize/js-api-client 7.6.0.
  • The mass-operation validator confirmed that it refuses price tiers and bare variant price and stock.
  • All 300 internal links resolve, every SKILL.md is under 500 lines, and every description is within 1,024 characters.
  • tsc, oxlint and the 211 tests pass. A /code-review pass found ten issues, all resolved in the last three commits; the one that cannot be fixed in code (syncStages writes pipelines one at a time) is documented.

Not settled

  • The new eval cases have not been scored: the live eval needs AI Gateway access. All expected references resolve.
  • data-creation: the json:itemData grid format itself could not be checked, so those claims stand as written.
  • pricing: "customer groups are a dead end" stays as written. The code shows no cause, so it needs a live test.
  • Provider references in payments: the Crystallize side was checked, the providers' own APIs were not.

The rest of the unsettled claims were reported in the internal review notes.

Plopix added 29 commits October 30, 2026 15:41
…otion mechanisms

Cart, Discovery and mass operation examples used fields that do not exist, and the docs said the most specific price list wins when the lowest price does. Adds the cart price context, volume tiers and the promotion admin API.
Most Core examples and several Shop and Discovery ones used fields, arguments and types that do not exist, so they failed validation. Also corrects Discovery auth, path wildcards, Shop order paging and the order sync.
…ndoing stage moves

The helpers built invalid mutations and could not rewrite payments. Pipelines take ids, Crystallize does not retry webhooks, and Shop writes reset stages moved in the App.
…iour

Replace cart mutations that do not exist, fix arguments and defaults, and correct what deleting, unpublishing, publishing and Core order edits do. Add the Shop API token flow and the /customer endpoint.
Component defaults, Item Relation and validation limits, choice config and localization behaviour now match the API. SKILL.md is split into references.
…data loss

The API examples could not run, the runner's identity and required fields were wrong, and templating failures were misdescribed. Documents two new price list intents, volume tiers, and fields the runner silently drops.
A price variant with tierType or tiers fails their validation, so those files need the CLI or the raw API.
…ples

The rerank window is the first N by sorting, not the top matches, and taste-only queries rank the whole result set. Also fixes field names, the item taste query, and publish and ignition behaviour.
…axonomy

Topics are a built-in field and Discovery filters them with filters: { topics: ... }. The skill now says what createTopic and topic/create accept, and that Discovery returns one topics facet across all maps.
…ing and topics

Discovery orders by itemId unless sorting says otherwise, taste changes need a publish rather than an ignition, an omitted stacks argument errors on a tenant already served for ranking, and shapes do not reference topics.
Bearer tokens only work on Core APIs and cannot fetch Shop API tokens, and tenant-scoped tokens are refused on /@me. Shop pipelines take ids, and examples no longer chain writes that race.
…aims

Two bookings racing on one cart now refuse the loser instead of losing it silently, and availability, hydrate pairing and refusal names follow the current API. Adds the /booking/admin reference and the gotchas around plain lines, capacity counting and unit renames.
The client calls /booking, which has no GraphQL endpoint. The admin API is at /booking/admin.
…points

Crystallize renews and activates contracts on schedule and fires due webhooks, while billing stays with the merchant, and Shop and Core contracts stay in sync. Corrects the lifecycle, webhook, plan and pricing claims.
…e and deleted-tenant behaviour

Provisioning has its own rate limit and can answer 503 at capacity. Invites work once, a past expiresAt gives a dead link, promoting a human claims the tenant, and calls after deletion answer 403.
…and token reach

Documented placements never rendered in the App, installs omitted required terms flags, and examples trusted unverified payloads. Adds private installs, reinstall, the real payload claims, where the Backend Token works, and the plugin-signal channel.
Both APIs accept a plugin Backend Token.
…level claims

Replaces invented role GraphQL with the real Core API calls and corrects the token model: tokens belong to users. Documents conditions, allow-list UI preferences and full-replace updates.
The skill rejected text on formatting and block nodes, which is what the App and html input write, and put src in image metadata, which nothing renders. It now lists what the App editor keeps, what html input loses, and how json reads back.
…load to the API

json:itemData is not an API payload, so the skill now routes writes to mass-operations or mutation and maps each field to the API input. SKU rules and enforced shape constraints are corrected.
Neither is part of the mass operation schema: prices and stock go in priceVariants and stockLocations.
…component behaviour

Variant formats depend on the source format, Discovery's focalPoint is a scalar that returns {}, and variants can be null. The docs now cover the Image component's real width, height, className and fetchPriority behaviour.
…ion-architecture

The folder example used a field that does not exist and could not run. Rewrites it, and documents how paths, shortcuts, ordering, publishing and redirects behave.
A later Shop write to the order puts the stage back, so the warning belongs next to the order mutations as well as in the payments skill.
…f silently

A refused Core read looked like an order in no pipeline, a stale Shop pipeline survived the sync, and a timeout looked like a missing customer, which then replaced a known customer. The stage webhook now surfaces a failed read as well.
… exists

Container upserts replace the whole definition, so consolidation on a live tenant skips phases 1 and 2. The worked example also needs its seo piece.
…ription billing

updateSubscriptionContract replaces meta, and renew fires for a called renewal too, so day-ahead billing has to come off that webhook.
@Plopix
Plopix marked this pull request as ready for review November 2, 2026 18:16
@Plopix
Plopix merged commit 669e85b into main Nov 2, 2026
1 check passed
@Plopix
Plopix deleted the fix/skills-review-against-code branch November 2, 2026 18:16
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.

1 participant