Rp Source Wordpress
WixOfficialPublished by Wix
- Skill
- Tool integration
- Automation and integrations
- MIT
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides the necessary logic to interface with WordPress and WooCommerce REST APIs. It handles authentication, pagination, and schema discovery, ensuring that platform-specific quirks are managed consistently. It acts as a reference for discovery and code generation stages, allowing the broader migration workflow to remain platform-agnostic. The skill includes mechanisms for plugin detection, handling non-standard response envelopes, and managing authenticated versus public data access.
What it does
- Samples WordPress and WooCommerce REST APIs to discover site structure and data schemas.
- Manages authentication using WordPress Application Passwords and WooCommerce consumer keys.
- Detects and profiles installed plugins to determine migration feasibility.
- Provides a standardized transport layer for generated readers to extract data reliably.
- Handles complex data scenarios like parent-child resource relationships and non-standard API response envelopes.
- Identifies and flags data that requires manual user intervention, such as plugin-specific database tables.
When to use it
- When the source platform for a migration is identified as WordPress or WooCommerce.
- During the discovery phase to sample source data and generate a source profile.
- During the code generation phase to create reliable data extractors.
- When needing to determine if installed plugins can be migrated natively or require custom development.
Advantages
- Centralizes platform-specific logic, preventing hardcoded dependencies in the main migration workflow.
- Ensures consistent handling of authentication and rate-limiting across different migration projects.
- Provides a deterministic approach to plugin coverage, reducing guesswork.
- Supports robust data extraction by reusing a shared, tested transport module.
Usage examples
- “Run the discovery process for a WordPress site.”
- The agent executes the discovery script, samples the REST index, and generates a source profile including entity schemas and plugin inventory.
- “How do I handle WooCommerce plugins that do not have a REST API?”
- The agent identifies the plugin, flags it as requiring manual intervention or a database export, and records the status in the plugin inventory.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/wix/rp-source-wordpress-c7wf/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip rp-source-wordpress.zip -d .agents/skills
Documentation by Wix
rp-source-wordpress
WordPress / WooCommerce source adapter. Owns every WordPress-specific detail the platform-agnostic skills must not hardcode: how to capture the schema, how to read the data, auth models, pagination, and REST quirks.
When this skill is used
This is not a stage in the migration flow — it is a reference consulted by two stages:
rp-discoveryconsults the Capture section to sample the source and produce the canonicalsource-profile.md+source-schema.json.rp-import-codegenconsults the Read contract section to generate a reader that bulk-extracts WordPress data correctly (auth, pagination,wc/v3vswp/v2) into durable project-local files for the later import step.
rp-execute-import never consults this skill — by the time execution runs, the
WordPress-specific knowledge is already baked into the generated reader code. Keeping the
WordPress knowledge here is what lets the rest of the workflow stay platform-agnostic.
Platform identity
Source platform: WordPress (core REST
wp/v2), optionally WooCommerce (wc/v3).Detect by hitting
<base-url>/wp-json/— the REST index lists advertised namespaces.Set
"platform": "wordpress"(and note WooCommerce presence insourceMeta) in the emittedsource-schema.json.
Capture (discovery-time)
Sampling the source to learn its shape — not a bulk export.
The Wix domain knowledge base may be used as a classifier supplement during synthesis,
but not as a sampling mandate. When a discovered WordPress/WooCommerce route matches a
known alias, annotate the emitted entity with sourceMeta.candidateTargetRefs[]; do not
turn that hint into a target decision here. Keep frontend, theme, runtime, admin, and
transient routes skipped by default even if a knowledge entry exists for a related
setup/config target.
Before capture, verify migrations/<project>/config/source.wordpress.env. Create it if
missing with empty values:
WP_BASE_URL=
WP_USERNAME=
WP_APPLICATION_PASSWORD=
WP_MEDIA_URL_REWRITE_FROM=
WP_MEDIA_URL_REWRITE_TO=
WC_CONSUMER_KEY=
WC_CONSUMER_SECRET=Before requesting any WordPress / WooCommerce credentials for a URL-based migration, ask the user which data scope they want:
public content onlyalso include private/authenticated data
This choice is mandatory and must be explicit. Do not ask for WP_USERNAME,
WP_APPLICATION_PASSWORD, or WooCommerce keys until the user chooses also include private/authenticated data. After that choice, collect sensitive values through
the secure Secrets Manager flow; do not ask the user to paste them into chat.
Key sensitivity is predefined and does not change at runtime. Requiredness is separate and may depend on the selected acquisition mode or source behavior.
| Key | Sensitivity | Requiredness |
|---|---|---|
WP_BASE_URL | non-sensitive | Required for URL-based capture |
WP_USERNAME | sensitive | Required for private/authenticated WordPress capture |
WP_APPLICATION_PASSWORD | sensitive | Required for private/authenticated WordPress capture |
WP_MEDIA_URL_REWRITE_FROM | non-sensitive | Optional |
WP_MEDIA_URL_REWRITE_TO | non-sensitive | Optional |
WC_CONSUMER_KEY | sensitive | Optional unless WooCommerce rejects the WordPress Application Password for wc/v3 reads |
WC_CONSUMER_SECRET | sensitive | Optional unless WooCommerce rejects the WordPress Application Password for wc/v3 reads |
Required for a complete WordPress/WooCommerce capture:
WP_BASE_URLWP_USERNAMEWP_APPLICATION_PASSWORD
WC_CONSUMER_KEY and WC_CONSUMER_SECRET are optional when WooCommerce accepts the
WordPress Application Password for wc/v3 reads; ask for them only if WooCommerce routes
return 401/403 with the WordPress Application Password.
WP_MEDIA_URL_REWRITE_FROM and WP_MEDIA_URL_REWRITE_TO are optional. Use them when the
WordPress API is reached through a public tunnel but media/file URLs inside records still
point at localhost or another private origin. If they are blank, generated readers may
rewrite localhost/private origins to WP_BASE_URL when WP_BASE_URL is public.
config/source.wordpress.env is a secret-bearing file once it may contain real values.
Do not read it with whole-file commands that print its contents into tool output. Check
only whether the file exists and whether each required key is present/blank/missing; when
describing status, name keys only and never echo values.
Run the deterministic capture script from this skill's directory (the folder containing this
SKILL.md; seeCONVENTIONS.md):node scripts/wp-discovery.js --env-file <migrations-root>/<project>/config/source.wordpress.env --out-dir <migrations-root>/<project>/data/wp-discoveryIt walks the REST index, runs one
OPTIONS+ a smallGETsample per entity, and writes per-entity markdown (routes, schemas, sample records, record counts, relationships).--env-fileis the preferred launch path for project-local credential-bearing config because it avoids shell sourcing of secret-bearing files. Pass direct auth options only when there is no project-local config yet. For long runs, pass--progress-log <path>and poll it perCONVENTIONS.md#progress-log-polling.If the user chose
public content only, run unauthenticated and keep the scope framed as public-only. Do not pivot into asking for credentials unless the user changes scope.Credentials are required for a complete capture. Without auth, only published public content is reachable; drafts, WooCommerce (
wc/v3), user PII, and private fields return 401/403, making theirrecordCount/inUseunreliable. The script flags this in its README under "Incomplete Capture (Authentication)" — do not treat an unauthenticated run as authoritative.Author identity is a specific casualty of public-only capture. Public
/wp/v2/userslists only users who authored public posts and exposes norolesand no emails — admin vs editor vs contributor vs subscriber is indistinguishable. Roles/capabilities requirecontext=edit(App Password withlist_users) or a DB dump (wp_usermeta→wp_capabilities); WXR exports carry author login/email/display name but no roles either. Vanilla WP has no guest-byline concept (every byline is a user); plugin guest authors (Co-Authors Plusguest-authorentities) are separate non-user records. Record author capture mode in the source profile — it determines the blogauthorAttributionModedownstream (public-only → fallback/owner attribution; authenticated → per-author mapping: administrators → owner user-member, content roles → per-author members; subscribers/customers → Wix contacts by default — a contact is the no-login CRM person entity and Contacts V5 upserts in bulk — promote to full site members (MEM-01: 1/sec serial, re-registration) only when member-gated features are in scope. Every Wix member auto-creates its contact, so member-first ordering: never pre-create a contact for someone who will become a member. Note contacts cannot author blog posts or comments — bylines need members).Distinguish supported entities (advertised by the REST index) from used entities (those with
recordCount > 0). Entities advertised but empty should be flagged, not mapped as if they hold data.Backend data scope. The capture script classifies REST routes before per-route
OPTIONSor sampleGETrequests. By default it samples backend data routes and skips frontend, theme/editor, runtime session, admin dashboard, diagnostics, marketplace setup, and integration/helper APIs. It writes the skipped-route audit trail toskipped-routes.json.For WooCommerce, prefer canonical durable data APIs such as
wc/v3over duplicatedwc/v2/wc/v1routes for authenticated/private commerce reads. Forpublic content onlydiscovery, probe public Store API catalog routes before declaring commerce deferred:wc/store/v1/productsandwc/store/v1/products/categoriesare in-scope public commerce data when present. Cart and checkout Store API routes remain out of scope as runtime session state.Plugin coverage runs automatically. Plugin handling is a deterministic pre-pass plus declarative profiles, not prose guesswork — see "Plugin coverage" below. The capture script writes
plugin-inventory.jsonandplugin-coverage.jsonalongside the per-entity files. Never hand-map a plugin from memory; consult the profiles throughscripts/plugin-knowledge.js.Localhost sources and media URLs. A source at
localhost,127.0.0.1, or another private-only host is valid for discovery and source reads from the user's machine. However, Wix Media import fetches files from the URL using Wix servers, so media URLs likehttp://localhost:8090/wp-content/uploads/...are not reachable by Wix during a live import. This is optional setup and, as far as we know today, only affects media import:Prefer exposing the local source through a temporary public HTTPS tunnel such as ngrok before live media import.
Or explicitly skip/defer media import and continue with non-media entities.
If using ngrok on macOS:
Install:
brew install ngrokAdd an authtoken from the ngrok dashboard:
ngrok config add-authtoken "<YOUR_AUTHTOKEN>"Expose the local source port, for example:
ngrok http 8090Set the source base URL to the HTTPS forwarding URL:
export WP_BASE_URL=https://<id>.ngrok-free.appRecord this insource-profile.mdwhen the captured source URL is localhost, and note whether media will use the tunnel or be skipped/deferred.
The raw capture is evidence, not a hand-off artifact. rp-discovery synthesizes it into
the canonical artifacts and records traceability pointers (rawDiscovery, per-entity
rawFile).
Plugin coverage
A real WooCommerce site is mostly plugins. Handling them is deterministic and has its own
knowledge base: plugins/ (profiles + no-migration-needed.json + README.md), read through
scripts/plugin-knowledge.js, detected by scripts/wp-plugin-inventory.js.
Every installed plugin lands in exactly one of the four statuses, and every status produces a row the user sees. Nothing is silently ignored.
| Population | Evidence | Result |
|---|---|---|
| recognized | a profile matched | named entities, declared read channels, Wix target refs; mapping confirmed |
| derived | no profile, data is REST-visible | derived from wp/v2/types + wp/v2/taxonomies, mapping proposed (CMS, or native on a domain-KB match) |
| named only | detected, no read channel | Pending with its reason, resolved by the no-migration-needed list or at the review gate |
A plugin therefore does not need a profile to migrate — it needs one to migrate natively.
Detection
Runs before route classification so profile-declared routes are already in scope. Signals, strongest first:
GET /wp/v2/plugins— the authoritative installed list (plugin,status,name,version). Administrator credential required. On 401/403 the run continues and recordspluginListAvailable: false; say so plainly rather than implying full coverage. Without it, installed-but-unprofiled plugins cannot be enumerated at all — this is the concrete argument for the authenticated acquisition mode.Declared routes present in the REST index.
GET /wp/v2/types/GET /wp/v2/taxonomiesentries matching a profile'srestBases.Record payload keys from the samples — a second pass after sampling. This is not optional polish: several major WooCommerce extensions (Product Bundles, Composite Products, Product Add-Ons, ACF, Yoast) add no REST route at all and only widen
wc/v3/products/wc/v3/orderspayloads. Route-based discovery cannot see them.REST namespaces and public
/wp-content/plugins/<slug>/asset paths (low confidence, but they work with no credentials).
A plugin version below a profile's detect.minVersion is reported as
api-below-min-version, not read as if the documented API were present.
Read channels
plugin-rest, core-cpt, core-embedded, core-meta, plugin-rest-child, export-file,
db-only — see plugins/README.md. Two consequences worth stating to the user:
Unregistered post meta is invisible. WordPress exposes meta only when the plugin registered it with
show_in_rest(and, for a CPT, declaredcustom-fieldssupport). A plugin can keep its entire per-record state inpostmetaand expose none of it. That data is reachable only from a WXR export or the database.WXR cannot be fetched. Application Passwords authenticate the REST API and XML-RPC only, never
wp-admin, so an export file is something the user produces and supplies. Treatexport-fileas a request to the user, never as a download.Parent-scoped sub-resources (
plugin-rest-child, fixed 2026-08-11). WooCommerce order notes (/wc/v3/orders/{id}/notes) and similar per-parent sub-collections cannot be listed on their own — the base classifier only samples flat collection routes (page/per_pageshape). This is why a plugin that writes real data via$order->add_order_note(...)(e.g. Custom Payment Gateway for WooCommerce's payment-note field) used to report aspending · cannot-telleven though the data is real and REST-reachable in principle.plugin-rest-childfixes this: an entity declaresrouteas a{parentId}-templated path (/wc/v3/orders/{parentId}/notes) plusparentRoute(the already-sampled collection that supplies real parent ids, e.g./wc/v3/orders). Availability is a two-part presence check against the site's REST index —parentRouteis in scope, and the index advertises a route shaped like the template (WordPress's(?P<id>[\d]+)-style regex segments are normalized to{parentId}for the comparison, so the parameter's name never has to match). Presence alone does not confirm real data exists there:wp-discovery.js'ssampleChildEntitiesruns a live, representative check afterward — it substitutes up to 3 already-sampled parent ids into the template and fetches each, purely to say "N of 3 sampled parents actually returned something," not to claim a full count. That result surfaces as a plain-language run note, never as a channel-status change: a small sample coming back empty does not mean the capability is absent, only that this sample did not confirm it. The infrastructure is built and tested (plugin-knowledge.js,wp-route-classifier.js'schildRouteAdvertised,wp-plugin-detect.js'sdescribeProfiledEntity,wp-discovery.js'ssampleChildEntities), andplugins/woocommerce-other-payment-gateway.jsonis authored and live-verified against the reference store (a real order id substituted into the template found 2 of 3 sampled orders had matching notes) — do not guess a plugin's installed-directory id when authoring a similar profile; confirmdetect.pluginFileIdsagainst a liveGET /wp/v2/pluginsresponse first, it is exactly the kind of fact a stale or invented guess silently gets wrong.Non-standard response envelope (
responseEnvelope, fixed 2026-08-11). Sampling and counting assume a flat array (X-WP-Total/X-WP-TotalPagesheaders, or the array's own length) or a single object. MailPoet's REST API (/mailpoet/v1/subscribers,/segments,/newsletters, ...) broke that assumption: it is a real, paginated, GET-only REST route (VERIFIED LIVE 2026-08-11: 306 real subscribers on the reference store, readable with the standard Application Password), but the payload is wrapped as{ data: { items: [...], meta: { count, pages } } }with noX-WP-Totalheader — the count lives inside the body instead. Before this fix the whole envelope would have sampled as one opaque record. A profile entity (route-bearing channels only) now declaresresponseEnvelope: { itemsPath, countPath }— a dot-path to the array of records, and an optional dot-path to the true total when there's no header.wp-discovery.js'sinspectEntityunwraps to that path and otherwise treats it exactly like a flat array; a path that stops resolving (stale profile, plugin version drift) falls back to the raw payload shape and records a discovery note rather than failing the run.plugins/mailpoet.jsonis authored and live-verified against the reference store:crm.email-subscriptionnow resolves to migration-planned via the existingcrm/email-subscriptiontarget, withrecordCount: 306read via the declaredcountPath. A namespace-wideunprofiledRoutesentry is still a sign a route this shape (or any other) has never been profiled — check there before concluding a plugin has "no REST surface."Route default query (
ROUTE_DEFAULT_QUERY_RULES, fixed 2026-08-16). Sampling sendsper_pageand nothing else, so any collection route that applies a default filter to an unparameterized request is read as its filtered subset and the plan under-counts — the hidden records are invisible to the mapper, not merely misreported. Observed on/wc/v3/products/reviews, which defaults tostatus=approved: the reference store has 120 reviews (114 approved + 6 on hold) and discovery counted 114. This is a class of bug, so the fix is a table rather than a special case:wp-route-classifier.jscarriesROUTE_DEFAULT_QUERY_RULES—[pattern, params, reason],*-suffix matching, longest pattern wins — anddefaultQueryFor(routePath)/defaultQueryReasonFor(routePath)resolve it.wp-discovery.jsmerges the result under its paging parameters and records a discovery note naming the parameters and the reason, so generated readers know to send them too. Adding a route is one row in the table plus a fixture; a route with no row is unchanged.
Coverage statuses
The four statuses, and only the four: migration-planned (via api or cms,
confidence confirmed or proposed), no-need-to-migrate, pending,
requires-development. A failed or unavailable read is never a status — it attaches to the
row as blocked[] (user-file / surface-changed, with a declined flag).
The split is deliberate: pending (we do not know how to migrate this yet — our open item)
and requires-development (a human established Wix has no surface) call for different
conversations. Only the second is a closed door, and only a human may open it — the
human-signed register plugins/requires-development.json is its single source.
Interaction rules
The admin Application Password is the only source credential. A plugin REST namespace that honours WordPress authentication works with it, and that is the normal case — plugins with their own key systems offer them as an alternative for external callers, not a requirement (verified for Gravity Forms, which accepts Application Passwords and runs requests under the caller's plugin capabilities). Do not treat "this plugin has API keys" as "we need another credential"; that reasoning has been wrong every time it was applied. If a plugin genuinely rejects the platform credential, that is a config-gate requirement like the WooCommerce consumer keys — not a per-capability runtime state.
blocked[]entries are collected and asked once, batched, each individually skippable. Auser-fileblocker is the one state no credential can fix: unregistered post meta and plugin tables are unreachable by any WordPress API, and Application Passwords cannot reachwp-admin, so a WXR or CSV export must be produced by the user. Record each answer inorchestration/decisions.jsonunderpluginBlocker:<capability>:<kind>(provided/declined);wp-discovery.jsreads it back (--decisions, defaulting to<out-dir>/../../orchestration/decisions.json) so a declined ask renders as declined.migration-planned · proposedrows never block; the proposed capability and target are reviewed at the normal mapping-review checkpoint.requires-developmentandpendingrows must reach the user. A detected but undeliverable capability the user was never told about is the failure this machinery exists to prevent. Everypendingrow is decided at the mapping review — the only exit.
A recognized plugin always ends in Migration planned (J2 property 1). If a profile matched we know what the plugin holds, so:
no readable channel (plugin tables only) → still classified by its target, with a
user-fileblocker on the row — not pending, and never a "cannot" verdict. A database export or a source-side bridge would reach it, and automation may not foreclose that any more than it may declare Wix incapable.pending · cannot-tellis reserved for an unrecognized plugin where we genuinely found nothing; the no-migration-needed list or the agent's own reading can still resolve it to No need to migrate with a recorded rationale.
A CMS destination is not turnkey. "Kept as data" means the records land in a Wix CMS
collection with their original IDs — genuinely migrated, not documented. But Wix Data must be
installed first (item writes fail with WDE0110 otherwise) and collection creation has no
verified writer yet, so it is a setup step. Say both on the row; a customer reading "Kept as
data" should not discover the setup work later.
Guardrails
Never a silent native mapping. A derived entity may target a native Wix entity only when the Wix domain knowledge confirms its proposed capability; otherwise it goes to CMS. Either way the row is
confidence: proposedand is confirmed at the mapping review.Never a scope reopening. The generic path operates only on routes the route classifier already accepted. It does not resurrect frontend, editor, admin, runtime, or integration families because a plugin registered them.
Profile data routes outrank exclusion families (that is the per-capability opt-in), but a wildcard pattern must keep two concrete leading segments, so
/yoast/*can never be opted in wholesale.
Commands
node scripts/plugin-knowledge.js list-plugins
node scripts/plugin-knowledge.js read-plugin --slug the-events-calendar
node scripts/plugin-knowledge.js resolve-route --route /tribe/events/v1/events
node scripts/plugin-knowledge.js resolve-property --property bundled_items
node scripts/plugin-knowledge.js list-capabilities
node scripts/wp-plugin-inventory.js --base-url <url> --out-dir <dir> [auth options]
node scripts/plugin-knowledge-validate.js --write-indexTo add or correct a plugin, edit plugins/<slug>.json and add a fixture — no skill logic
changes. See plugins/README.md.
Read contract (codegen-time)
What a generated WordPress reader must get right. Capture the operational facts below into
source-profile.md during discovery so codegen has them without re-deriving.
The generated reader is an extractor, not an in-memory bulk loader. It should fetch WordPress/WooCommerce records page by page and write them to project-local files (for example per-entity paged JSON files plus a manifest) so the import step can read from disk later without re-fetching the source.
Reuse the shared transport — do not regenerate it. The auth, URL building, rate-limit
throttling, and Retry-After-aware 429/503 backoff a reader needs already exist as a
dependency-free module at lib/wp-http.js in this skill directory (the same module
the capture script imports). It
exports fetchJson, buildHeaders, configureRateLimit, and parseTotalHeader. Any
generated WordPress reader must reuse this module rather than reimplementing transport,
so the reader contains only per-project orchestration: which entities to pull, the
pagination loop, _embed/_links resolution, and transform glue. One tested transport
core is what makes the sampler and the reader behave identically. How the module is
carried into a runnable migration project is rp-import-codegen's concern (its File
targets), not this adapter's. The notes below describe what the reader does on top of
that shared core:
Namespaces & auth differ per namespace:
wp/v2(core): HTTP Basic auth with a WordPress Application Password (--username+--application-password).wc/v3(WooCommerce): consumer key / secret, sent as Basic auth over HTTPS (or as query params on some hosts). This is a different credential from the Application Password — both may be needed for a full migration.
Pagination:
?page=N&per_page=M(maxper_pageis typically 100). Total pages are in theX-WP-TotalPagesresponse header and total records inX-WP-Total— read those rather than guessing when to stop. Some public WooCommerce Store API collection routes paginate withoutX-WP-TotalPages; when that header is absent, generated readers must stop on the first page whose item count is smaller thanper_page.Embedded relations: request
?_embedto inline related resources, or follow the_linksblock (author,wp:featuredmedia,wp:term) to resolve relations. Theevidencepointers insource-schema.jsonrelations come from this_linksblock.Hierarchical taxonomies: WordPress categories (and custom hierarchical taxonomies) carry a
parentfield on each term (0= top-level). When any term has a non-zeroparent, the source taxonomy is nested. Discovery must elevate this into structured schema — set"hierarchical": trueon that entity insource-schema.json(seesource-schema.example.json→category) rather than leavingparentburied in the raw dump. The Wix Blog category target is flat (no parent/child), so this flag is what triggers the mapper's mandatory lossiness entry; without it, the flatten happens silently.Rate limits / retries: not advertised; the capture script throttles (
--rate-limit-rpm, default 120) and backs off on 429/503 honoringRetry-After. Generated readers should inherit the same discipline.Rich content:
content.rendered/title.renderedare HTML;*.rawrequirescontext=edit(authenticated). Note which the reader should pull.HTML entities in "plain text" fields (trap, hit live 2026-07-19): WordPress returns HTML-encoded entities (
–,&,’, …) not only in rendered HTML but also in fields consumed as plain text — product/category/tagname,title.renderedafter tag-stripping, excerpts, even SKUs. Values sent to plain-text Wix fields (product name, blog title, tag label, CMS text columns) must be entity-decoded by the generated transforms or the encoded form appears verbatim in the Wix dashboard. HTML passed to rich-content conversion does NOT need pre-decoding — the converter handles entities.Custom fields: ACF / meta often appear in sample records but are absent from the
OPTIONSschema — surface them asunknownsin discovery so the mapper can decide.WooCommerce variation attribute values are URL-encoded slugs, not display names (trap, hit live 2026-07-21):
variations[].attributes[].valuefromwc/v3/products/{id}/variationsis a URL-encoded taxonomy-term slug (e.g.1-%d7%a7%d7%92for1 ק"ג), not the human-readable display name that the product'sattributes[].options[]array contains. Generated readers must build a per-option slug→displayName map from the parent product'sattributes[].options[](which does carry display names) and resolve slug values to display names before writing to Wix. Passing slugs directly causesMISSING_VARIANT_OPTION_CHOICEbecause Wix compares variant choice names against option choice names and finds no match.WooCommerce "Any"-style variations have null attribute values (trap, hit live 2026-07-21): When a WooCommerce variation is set to "Any" for an option (the variation applies to any value of that option),
variations[].attributes[].valueis an empty string or null, not a specific term. Generated transforms that filter variants by attribute value will silently drop "Any" variants, leaving options with no variants — Wix then auto-generates priceless placeholder variants, causing price-empty errors. Fix: when ALL attributes for a variation are null/"Any", treat the variation as a single cartesian entry covering all option choices at the variation's price, rather than filtering it out.Route paths passed to
fetchJson/buildApiUrlmust NOT include/wp-json(trap, hit live 2026-07-21):buildApiUrlinlib/wp-http.jsalready prepends/wp-jsonto theroutePathargument. Generated route paths must start with the namespace directly (e.g./wc/store/v1/products,/wp/v2/posts) — never with/wp-json/.... Prefixing with/wp-jsondoubles the prefix and produces 404s.WooCommerce consumer key/secret can 401 on some
wc/v3routes even when it reads others fine (trap, hit live 2026-08-12):WC_CONSUMER_KEY/WC_CONSUMER_SECRETare scoped at key-creation time (Read / Write / Read-Write) and can be narrower than the WordPress Application Password's access. On the reference store, the consumer key/secret 401'dwoocommerce_rest_cannot_viewonwc/v3/taxes,wc/v3/taxes/classes, andwc/v3/settings/taxwhile the very same reads succeeded immediately with theWP_USERNAME/WP_APPLICATION_PASSWORDBasic auth pair. Generated readers must not treat a 401/403 on onewc/v3route as proof the whole consumer key is broken (which would wrongly block products/orders/coupons too) — retry that specific route with the Application Password credential before failing, and prefer the Application Password outright for admin-ishwc/v3routes (taxes, settings) that a narrowly-scoped key is more likely to be denied on.Core WooCommerce settings/tax routes are core, not plugin data:
wc/v3/taxes,wc/v3/taxes/classes, andwc/v3/settings/taxare ordinary WooCommerce core collections (same auth/pagination rules aswc/v3/productsetc.) — they are not profiled as a "plugin" because tax is core WooCommerce, not an extension. Per-producttax_status/tax_classfields ride along on the ordinarywc/v3/productsread; no separate per-product route is needed to get them. Seerp-target-wixdomains/tax/ for the corresponding Wix target entities (Tax Group / Tax Region / Manual Tax Mapping / Tax Settings) and mapping-plan.json'sproductandtax-classentities for a live worked example (migrations/reference-run, 2026-08-12).
Schema shape
source-schema.example.json (in this skill folder) is the template rp-discovery follows
when emitting migrations/<project>/source-schema.json. It is a shape to follow, not a
strict schema to validate against. Keep the platform-agnostic core stable; push WordPress
quirks (restNamespace, statuses, etc.) into each entity's open sourceMeta blob.
For a profiled plugin entity, sourceMeta MUST also carry requestMethod, requestBody,
and responseFragmentGroupSize verbatim whenever the plugin profile declares them (spec
0044/0045) — copy them from the profile entity (surfaced structurally in plugin detection's
per-entity output, wp-plugin-detect.js's describeProfiledEntity) rather than re-deriving
them from discovery's prose notes. rp-import-codegen's read contract depends on finding
these under exactly those sourceMeta keys; omitting them silently degrades a declared
non-GET/fragmented read into an unreadable one downstream.
Files
- ATTRIBUTION.mdAdded by AutoGineer843 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md31.5 KiB
- lib/blocked-data-handlers.jsScript2.7 KiB
- lib/checkout-field-csv-parser.jsScript4.9 KiB
- lib/checkout-field-csv-parser.test-fixture.jsScript5.0 KiB
- lib/plugin-disposition.jsScript17.6 KiB
- lib/plugin-knowledge.jsScript45.1 KiB
- lib/pw-gift-cards-client.jsScript3.1 KiB
- lib/pw-gift-cards-client.test-fixture.jsScript1.1 KiB
- lib/sampled-ids-batch.jsScript6.7 KiB
- lib/wp-http.jsScript8.2 KiB
- lib/wp-plugin-detect.jsScript58.3 KiB
- lib/wp-route-classifier.jsScript26.5 KiB
- plugins/README.md15.7 KiB
- plugins/advanced-custom-fields.json9.8 KiB
- plugins/back-in-stock-notifier-for-woocommerce.json6.1 KiB
- plugins/capabilities-pending-decision.json26.8 KiB
- plugins/contact-form-7.json9.2 KiB
- plugins/facebook-for-woocommerce.json2.1 KiB
- plugins/fingerprint-aliases.json4.3 KiB
- plugins/free-gifts-for-woocommerce.json6.7 KiB
- plugins/index.json19.0 KiB
- plugins/mailpoet.json2.5 KiB
- plugins/membership-for-woocommerce.json21.0 KiB
- plugins/mwb-bookings-for-woocommerce.json20.7 KiB
- plugins/no-migration-needed.json11.7 KiB
- plugins/pricing-deals-for-woocommerce.json7.0 KiB
- plugins/pw-woocommerce-gift-cards.json11.1 KiB
- plugins/requires-development.json9.8 KiB
- plugins/seo-by-rank-math.json7.3 KiB
- plugins/seriously-simple-podcasting.json2.1 KiB
- plugins/subscriptions-for-woocommerce.json8.6 KiB
- plugins/the-events-calendar.json6.8 KiB
- plugins/woo-checkout-field-editor-pro.json4.6 KiB
- plugins/woo-discount-rules.json4.2 KiB
- plugins/woo-product-bundle.json6.9 KiB
- plugins/woocommerce-gift-cards.json2.1 KiB
- plugins/woocommerce-other-payment-gateway.json2.7 KiB
- plugins/woocommerce-product-addon.json10.4 KiB
- plugins/woocommerce-progressive-discounts.json4.8 KiB
- plugins/wordpress-seo.json14.3 KiB
- plugins/wpc-composite-products.json13.4 KiB
- plugins/wpforms-lite.json7.1 KiB
- scripts/plugin-knowledge-validate.jsScript1.7 KiB
- scripts/plugin-knowledge.jsScript3.8 KiB
- scripts/wp-discovery.jsScript66.3 KiB
- scripts/wp-plugin-inventory.jsScript10.7 KiB
- source-schema.example.json3.2 KiB
lib/plugin-knowledge.js
'use strict';
// Plugin profile knowledge base: load, validate, index, and resolve WordPress plugin profiles.
//
// THIS FILE IS THE AUTHORITY on a profile's shape. There is deliberately no schema.json: a
// second, non-enforcing definition of the same contract only drifts out of sync. The human
// field reference lives in plugins/README.md and cites this validator. Mirrors rp-target-wix/lib/domain-knowledge.js so both knowledge bases have the
// same shape, the same generated+checked-in index, and the same validate/read split.
//
// Profiles are ADVISORY. They identify a plugin and declare where its data lives; the live
// OPTIONS/GET probe in wp-discovery.js remains authoritative for what a route actually
// returns. A stale profile can therefore only reduce detection completeness.
const fs = require('node:fs');
const path = require('node:path');
const CHANNELS = new Set([
'plugin-rest',
'core-cpt',
'core-embedded',
'core-meta',
'plugin-rest-child',
'export-file',
'db-only',
'admin-page-only',
]);
const ROUTE_CHANNELS = new Set(['plugin-rest', 'core-cpt']);
// A {parentId} placeholder in `route` — never a literal REST index route, so
// plugin-rest-child stays out of ROUTE_CHANNELS (which feeds classifier data rules matched
// against literal candidate routes; a templated route never appears as one).
const CHILD_ROUTE_PLACEHOLDER = '{parentId}';
const DISTRIBUTIONS = new Set(['wordpress-org', 'premium-or-unlisted', 'unknown']);
const SEVERITIES = new Set(['blocker', 'warning', 'info']);
const CONTEXTS = new Set(['view', 'edit', 'both']);
const REQUEST_METHODS = new Set(['GET', 'POST']);
const BLOCKED_KINDS = new Set(['user-file', 'bridge-plugin']);
const FULFILLMENT_KINDS = new Set(['csv-upload', 'bridge-plugin']);
const RESERVED_FILES = new Set([
'schema.json',
'index.json',
'requires-development.json',
'capabilities-pending-decision.json',
'no-migration-needed.json',
'fingerprint-aliases.json',
]);
const NO_MIGRATION_REASONS = new Set(['platform-does-it', 'not-needed', 'reconfigure-in-wix']);
// Namespaces every WordPress or WooCommerce site advertises. Using one as a detection
// signal makes a profile match every such site, which is a false positive, not a detection.
const SHARED_NAMESPACES = new Set(['wp/v2', 'wc/v3', 'wc/v2', 'wc/v1', 'wc/store', 'wc/store/v1', 'oembed/1.0']);
function pluginsRoot(rootDir = path.resolve(__dirname, '..')) {
return path.join(rootDir, 'plugins');
}
function readJson(filePath) {
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
}
function writeJson(filePath, value) {
fs.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`);
}
function listProfileFiles(pluginsDir) {
if (!fs.existsSync(pluginsDir)) return [];
return fs
.readdirSync(pluginsDir, { withFileTypes: true })
.filter((entry) => entry.isFile() && entry.name.endsWith('.json') && !RESERVED_FILES.has(entry.name))
.map((entry) => entry.name)
.sort();
}
function loadProfiles(pluginsDir) {
return listProfileFiles(pluginsDir).map((fileName) => readJson(path.join(pluginsDir, fileName)));
}
// The no-migration-needed file: plugins with nothing to move. Two
// tiers live here — `hints[]`, the cheap slug lookup for plugins that never get a profile,
// and `capabilities[]`, the human-signed per-capability register below.
function loadNoMigrationNeeded(pluginsDir) {
const filePath = path.join(pluginsDir, 'no-migration-needed.json');
if (!fs.existsSync(filePath)) return { hints: [], capabilities: [] };
const file = readJson(filePath);
return { hints: [], capabilities: [], ...file };
}
// The signed no-need-to-migrate register: per-CAPABILITY verdicts on PROFILED plugins, where
// the slug list cannot reach (a slug with a profile is rejected there, and rightly — the two
// would disagree). "Nothing to move" is not impossibility, but it is still a verdict about
// what the customer loses, so it is human-signed exactly like requires-development: without
// it, a decided capability re-lands as pending on every run and the decision has no home.
function loadNoMigrationCapabilities(pluginsDir) {
return loadNoMigrationNeeded(pluginsDir).capabilities || [];
}
function loadPendingDecisions(pluginsDir) {
const filePath = path.join(pluginsDir, 'capabilities-pending-decision.json');
if (!fs.existsSync(filePath)) return { capabilities: [] };
return readJson(filePath);
}
// The Requires development register: human-signed verdicts only.
function loadRequiresDevelopment(pluginsDir) {
const filePath = path.join(pluginsDir, 'requires-development.json');
if (!fs.existsSync(filePath)) return { capabilities: [] };
return readJson(filePath);
}
// The fingerprint alias map: public evidence token -> plugin name. Names only —
// no entities, no channels, no target refs.
function loadFingerprintAliases(pluginsDir) {
const filePath = path.join(pluginsDir, 'fingerprint-aliases.json');
if (!fs.existsSync(filePath)) return { aliases: {} };
return readJson(filePath);
}
// A wildcard route pattern must keep at least two concrete leading segments. This is what
// stops a profile from writing "/yoast/*" and silently reopening a whole excluded route
// family, while still allowing the legitimate "/ssp/v1/*" namespace-wide data case.
function wildcardKeepsScope(pattern) {
if (!pattern.includes('*')) return true;
const concrete = pattern.slice(0, pattern.indexOf('*')).split('/').filter(Boolean);
return concrete.length >= 2;
}
function entityRouteOf(entity) {
return ROUTE_CHANNELS.has(entity.channel) ? entity.route : null;
}
function generateIndex(pluginsDir) {
const index = {
schemaVersion: 1,
plugins: {},
routeIndex: {},
namespaceIndex: {},
restBaseIndex: {},
recordPropertyIndex: {},
capabilityIndex: {},
channels: {},
};
for (const fileName of listProfileFiles(pluginsDir)) {
const profile = readJson(path.join(pluginsDir, fileName));
const slug = fileName.replace(/\.json$/, '');
index.plugins[slug] = {
path: `plugins/${fileName}`,
displayName: profile.displayName,
profileVersion: profile.profileVersion,
distribution: profile.distribution || 'unknown',
capabilities: [...(profile.capabilities || [])].sort(),
entityCount: (profile.entities || []).length,
channels: Array.from(new Set((profile.entities || []).map((entity) => entity.channel))).sort(),
requiresCredentials: (profile.credentials || []).length > 0,
};
const push = (collection, key, value) => {
if (!key) return;
if (!collection[key]) collection[key] = [];
collection[key].push(value);
};
for (const route of profile.detect?.routes || []) push(index.routeIndex, route, slug);
for (const entity of profile.entities || []) {
push(index.routeIndex, entityRouteOf(entity), slug);
push(index.channels, entity.channel, slug);
for (const property of entity.channel === 'core-embedded' && entity.propertyPath ? [entity.propertyPath] : []) {
push(index.recordPropertyIndex, property, slug);
}
}
for (const pattern of (profile.dataRoutePatterns || []).map((rule) => rule.pattern)) {
push(index.routeIndex, pattern, slug);
}
for (const namespace of profile.detect?.restNamespaces || []) push(index.namespaceIndex, namespace, slug);
for (const restBase of profile.detect?.restBases || []) push(index.restBaseIndex, restBase, slug);
for (const property of profile.detect?.recordProperties || []) push(index.recordPropertyIndex, property, slug);
for (const capability of profile.capabilities || []) push(index.capabilityIndex, capability, slug);
}
for (const collection of [
index.routeIndex,
index.namespaceIndex,
index.restBaseIndex,
index.recordPropertyIndex,
index.capabilityIndex,
index.channels,
]) {
for (const key of Object.keys(collection)) {
collection[key] = Array.from(new Set(collection[key])).sort();
}
}
return index;
}
function requireFields(value, fields, label, errors) {
for (const field of fields) {
if (value[field] === undefined) errors.push(`${label}: missing required field ${field}`);
}
}
function validateEntity(entity, label, errors, seenEntities) {
requireFields(entity, ['entity', 'channel', 'candidateTargetRefs'], label, errors);
if (!CHANNELS.has(entity.channel)) {
errors.push(`${label}: invalid channel ${entity.channel}`);
}
if (entity.entity) {
if (seenEntities.has(entity.entity)) errors.push(`${label}: duplicate entity id ${entity.entity}`);
seenEntities.add(entity.entity);
}
if (ROUTE_CHANNELS.has(entity.channel)) {
if (!entity.route) {
errors.push(`${label}: channel ${entity.channel} requires route`);
} else if (!entity.route.startsWith('/')) {
errors.push(`${label}: route must start with /`);
} else if (!wildcardKeepsScope(entity.route)) {
errors.push(`${label}: route pattern ${entity.route} is too broad; keep at least two concrete leading segments before a wildcard`);
}
}
if (entity.channel === 'core-embedded') {
if (!Array.isArray(entity.embeddedIn) || entity.embeddedIn.length === 0) {
errors.push(`${label}: core-embedded requires a non-empty embeddedIn`);
}
if (!entity.propertyPath) errors.push(`${label}: core-embedded requires propertyPath`);
}
if (entity.channel === 'core-meta' && !entity.propertyPath) {
errors.push(`${label}: core-meta requires propertyPath`);
}
if (entity.channel === 'plugin-rest-child') {
if (!entity.route || !entity.route.startsWith('/')) {
errors.push(`${label}: plugin-rest-child requires route`);
} else if (!entity.route.includes(CHILD_ROUTE_PLACEHOLDER)) {
errors.push(`${label}: plugin-rest-child route must contain a ${CHILD_ROUTE_PLACEHOLDER} placeholder, e.g. /wc/v3/orders/${CHILD_ROUTE_PLACEHOLDER}/notes`);
}
if (!entity.parentRoute) {
errors.push(`${label}: plugin-rest-child requires parentRoute — the already-sampled collection route that supplies parent ids (e.g. /wc/v3/orders)`);
} else if (!entity.parentRoute.startsWith('/') || entity.parentRoute.includes(CHILD_ROUTE_PLACEHOLDER)) {
errors.push(`${label}: parentRoute must be a literal collection route, not a template`);
}
}
if (entity.responseEnvelope !== undefined) {
if (!ROUTE_CHANNELS.has(entity.channel)) {
errors.push(`${label}: responseEnvelope only applies to route-bearing channels (${[...ROUTE_CHANNELS].join(', ')})`);
}
const itemsPath = entity.responseEnvelope && entity.responseEnvelope.itemsPath;
if (typeof itemsPath !== 'string' || itemsPath.length === 0) {
errors.push(`${label}: responseEnvelope requires itemsPath — the dot-path to the array of records within the response body, e.g. "data.items"`);
}
const countPath = entity.responseEnvelope && entity.responseEnvelope.countPath;
if (countPath !== undefined && (typeof countPath !== 'string' || countPath.length === 0)) {
errors.push(`${label}: responseEnvelope.countPath must be a non-empty string dot-path when present`);
}
}
if (entity.responseFragmentGroupSize !== undefined) {
if (!ROUTE_CHANNELS.has(entity.channel)) {
errors.push(`${label}: responseFragmentGroupSize only applies to route-bearing channels (${[...ROUTE_CHANNELS].join(', ')})`);
}
if (!Number.isInteger(entity.responseFragmentGroupSize) || entity.responseFragmentGroupSize < 2) {
errors.push(`${label}: responseFragmentGroupSize must be an integer >= 2 — the number of flat array entries that reassemble into one record`);
}
}
if (entity.requestMethod !== undefined || entity.requestBody !== undefined) {
if (!ROUTE_CHANNELS.has(entity.channel)) {
errors.push(`${label}: requestMethod/requestBody only apply to route-bearing channels (${[...ROUTE_CHANNELS].join(', ')})`);
}
if (entity.requestMethod !== undefined && !REQUEST_METHODS.has(entity.requestMethod)) {
errors.push(`${label}: invalid requestMethod ${entity.requestMethod} (expected one of ${[...REQUEST_METHODS].join(', ')})`);
}
if (entity.requestMethod === 'GET' && entity.requestBody !== undefined) {
errors.push(`${label}: requestBody is not meaningful with requestMethod GET`);
}
if (entity.requestMethod && entity.requestMethod !== 'GET' && entity.requestBody === undefined) {
errors.push(`${label}: requestMethod ${entity.requestMethod} requires requestBody`);
}
if (entity.requestBody !== undefined && entity.requestMethod === undefined) {
errors.push(`${label}: requestBody requires an explicit non-GET requestMethod — a body with no declared method is not a real request override`);
}
if (entity.requestBody !== undefined && (typeof entity.requestBody !== 'object' || entity.requestBody === null || Array.isArray(entity.requestBody))) {
errors.push(`${label}: requestBody must be a plain JSON object`);
}
}
if (entity.context !== undefined && !CONTEXTS.has(entity.context)) {
errors.push(`${label}: invalid context ${entity.context}`);
}
if (!Array.isArray(entity.candidateTargetRefs)) {
errors.push(`${label}: candidateTargetRefs must be an array`);
} else if (entity.candidateTargetRefs.length === 0 && (entity.pitfalls || []).length === 0) {
errors.push(`${label}: an entity with no candidateTargetRefs must record a pitfall explaining the gap`);
}
for (const pitfall of entity.pitfalls || []) {
if (!SEVERITIES.has(pitfall.severity)) errors.push(`${label}: invalid pitfall severity ${pitfall.severity}`);
if (!pitfall.code || !pitfall.summary) errors.push(`${label}: pitfalls need code and summary`);
}
validateBlockedEntries(entity.blocked, label, errors);
for (const [index, pitfall] of (entity.pitfalls || []).entries()) {
validateBlockedEntries(pitfall.blocked, `${label} pitfalls[${index}]`, errors);
}
}
function validateBlockedEntries(blocked, label, errors) {
if (blocked === undefined) return;
if (!Array.isArray(blocked) || blocked.length === 0) {
errors.push(`${label}: blocked must be a non-empty array when present`);
return;
}
blocked.forEach((entry, index) => {
const entryLabel = `${label} blocked[${index}]`;
if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
errors.push(`${entryLabel} must be an object`);
return;
}
if (!BLOCKED_KINDS.has(entry.kind)) errors.push(`${entryLabel}.kind must be one of ${[...BLOCKED_KINDS].join(', ')}`);
if (!entry.resolution || typeof entry.resolution !== 'string') errors.push(`${entryLabel}.resolution must be a non-empty string`);
if (typeof entry.declined !== 'boolean') errors.push(`${entryLabel}.declined must be boolean`);
if (entry.fulfillment === undefined) return;
const fulfillment = entry.fulfillment;
if (!fulfillment || typeof fulfillment !== 'object' || Array.isArray(fulfillment)) {
errors.push(`${entryLabel}.fulfillment must be an object`);
return;
}
if (!FULFILLMENT_KINDS.has(fulfillment.kind)) errors.push(`${entryLabel}.fulfillment.kind must be csv-upload or bridge-plugin`);
if (!fulfillment.handlerId || typeof fulfillment.handlerId !== 'string') errors.push(`${entryLabel}.fulfillment.handlerId must be a non-empty string`);
if (fulfillment.freshnessWindowHours !== undefined && (!Number.isFinite(fulfillment.freshnessWindowHours) || fulfillment.freshnessWindowHours < 0)) {
errors.push(`${entryLabel}.fulfillment.freshnessWindowHours must be a non-negative number`);
}
if (fulfillment.kind === 'csv-upload' && (!fulfillment.expectedInputPath || typeof fulfillment.expectedInputPath !== 'string')) {
errors.push(`${entryLabel}.fulfillment.expectedInputPath is required for csv-upload`);
}
if (fulfillment.kind === 'bridge-plugin') {
for (const field of ['manifestCaseId', 'expectedNamespace', 'extractionRoute']) {
if (!fulfillment[field] || typeof fulfillment[field] !== 'string') errors.push(`${entryLabel}.fulfillment.${field} is required for bridge-plugin`);
}
if (fulfillment.extractionRoute && !fulfillment.extractionRoute.startsWith('/')) errors.push(`${entryLabel}.fulfillment.extractionRoute must start with /`);
}
});
}
function blockedEntriesOf(entity) {
return [
...(entity.blocked || []),
...(entity.pitfalls || []).flatMap((pitfall) => pitfall.blocked || []),
];
}
function validateProfile(profile, slug, label, errors) {
requireFields(
profile,
['schemaVersion', 'plugin', 'displayName', 'profileVersion', 'sourceOfTruth', 'capabilities', 'detect', 'entities'],
label,
errors,
);
if (profile.schemaVersion !== 1) errors.push(`${label}: schemaVersion must be 1`);
if (profile.plugin !== slug) errors.push(`${label}: plugin must match the filename slug (${slug})`);
if (profile.distribution !== undefined && !DISTRIBUTIONS.has(profile.distribution)) {
errors.push(`${label}: invalid distribution ${profile.distribution}`);
}
if (!Array.isArray(profile.capabilities) || profile.capabilities.length === 0) {
errors.push(`${label}: capabilities must be a non-empty array`);
}
if (profile.dispositionHint !== undefined) {
errors.push(`${label}: dispositionHint is retired — a plugin either has a profile (data to read) or an entry on the no-migration-needed list, never a hint on the profile`);
}
const detect = profile.detect || {};
for (const namespace of detect.restNamespaces || []) {
if (SHARED_NAMESPACES.has(namespace)) {
errors.push(`${label}: detect.restNamespaces must not contain the shared namespace ${namespace} — it identifies WordPress/WooCommerce, not this plugin. Use a specific route instead.`);
}
}
const signalCount = ['pluginFileIds', 'routes', 'restNamespaces', 'restBases', 'recordProperties', 'assetPathSlugs']
.reduce((total, key) => total + (Array.isArray(detect[key]) ? detect[key].length : 0), 0);
if (signalCount === 0) errors.push(`${label}: detect must declare at least one signal`);
if (!Array.isArray(profile.entities) || profile.entities.length === 0) {
errors.push(`${label}: entities must be a non-empty array`);
} else {
const seenEntities = new Set();
profile.entities.forEach((entity, i) => {
validateEntity(entity, `${label} entities[${i}]`, errors, seenEntities);
});
for (const entity of profile.entities) {
if (entity.requiresParent && !seenEntities.has(entity.requiresParent)) {
errors.push(`${label}: entity ${entity.entity} requiresParent ${entity.requiresParent} which is not declared in this profile`);
}
}
const declaredCapabilities = Array.isArray(profile.capabilities) ? profile.capabilities : [];
const attributedEntities = profile.entities.filter((entity) => entity.capability !== undefined);
if (attributedEntities.length > 0 && attributedEntities.length !== profile.entities.length) {
errors.push(`${label}: when one entity declares capability, every entity must declare capability so coverage cannot leak targets across rows`);
}
for (const entity of attributedEntities) {
if (!declaredCapabilities.includes(entity.capability)) {
errors.push(`${label}: entity ${entity.entity} capability ${entity.capability} is not declared in profile.capabilities`);
}
}
if (attributedEntities.length > 0) {
for (const capability of declaredCapabilities) {
if (!attributedEntities.some((entity) => entity.capability === capability)) {
errors.push(`${label}: capability ${capability} has no attributed entity`);
}
}
}
}
for (const rule of profile.dataRoutePatterns || []) {
if (!rule.pattern || !rule.reason) errors.push(`${label}: dataRoutePatterns entries need pattern and reason`);
if (rule.pattern && !wildcardKeepsScope(rule.pattern)) {
errors.push(`${label}: dataRoutePatterns pattern ${rule.pattern} is too broad; keep at least two concrete leading segments before a wildcard`);
}
}
for (const rule of profile.excludeRoutes || []) {
if (!rule.route || !rule.reason) errors.push(`${label}: excludeRoutes entries need route and reason`);
}
for (const credential of profile.credentials || []) {
if (!credential.key || !credential.description) {
errors.push(`${label}: credentials entries need key and description`);
}
}
}
// Cross-adapter integrity: candidateTargetRefs must resolve in the Wix target knowledge
// base, and every capability must either be claimed by a target entity or be explicitly
// allowlisted. This is the check that keeps the two knowledge homes from drifting apart.
//
// $bridgeManifest is caller-supplied (already-parsed JSON), never resolved from a path by this
// function itself: the wix-migration-helper plugin lives at repo-root plugins/, outside this
// skill's own published bundle (skills/wix-replatform/), and a skill lib must never hardcode a
// path reaching outside its own folder -- see tests/lib/paths.js's documented rule. Passing
// `null`/omitting it simply skips the bridge-manifest-specific checks below; the two-of-three
// tests that need them (tests/source-wordpress/blocked-data-validation-test.js) load and pass
// the real manifest themselves.
function validateAgainstTargets(profiles, pluginsDir, targetKnowledge, errors, bridgeManifest = null, bridgeManifestRoot = null) {
if (!targetKnowledge) return;
const { knownRefs, capabilityRefs } = targetKnowledge;
const allowlist = new Set(
(loadRequiresDevelopment(pluginsDir).capabilities || []).map((entry) => entry.capability),
);
const pendingFile = loadPendingDecisions(pluginsDir);
const pending = new Set((pendingFile.capabilities || []).map((entry) => entry.capability));
const profileEntityByRef = new Map();
for (const profile of profiles) {
for (const entity of profile.entities || []) profileEntityByRef.set(`plugin.${profile.plugin}.${entity.entity}`, entity);
}
let handlerRegistry = {};
try { handlerRegistry = require('./blocked-data-handlers.js').handlers; }
catch (error) { errors.push(`blocked data handler registry could not be loaded: ${error.message}`); }
// schemaVersion 2 added `area`-keyed cases alongside the original bridge-plugin shape: they
// are not (yet) cross-referenced against a plugin profile's blocked[].fulfillment (that wiring
// is deliberately deferred to whoever builds the Wix-side signing service), so they carry no
// sourceEntityRef; an area with no shipped adapter yet also carries no handlerId/module.
if (bridgeManifest) {
if (![1, 2].includes(bridgeManifest.schemaVersion)) errors.push('bridge manifest: schemaVersion must be 1 or 2');
if (!Array.isArray(bridgeManifest.cases)) errors.push('bridge manifest: cases must be an array');
const seenManifestCases = new Set();
for (const [index, manifestCase] of (bridgeManifest.cases || []).entries()) {
const label = `bridge manifest cases[${index}]`;
const isAreaCase = typeof manifestCase.area === 'string' && manifestCase.area !== '';
const requiredFields = isAreaCase ? ['caseId'] : ['caseId', 'sourceEntityRef', 'handlerId', 'module'];
for (const field of requiredFields) {
if (!manifestCase[field] || typeof manifestCase[field] !== 'string') errors.push(`${label}.${field} must be a non-empty string`);
}
if (isAreaCase) {
// An unshipped area (e.g. blocked on an open issue) has no adapter yet: both fields are
// null together, never just one — a handlerId with no module (or vice versa) is a real
// inconsistency, not a legitimate "not built yet" state.
const handlerIdPresent = manifestCase.handlerId !== null && manifestCase.handlerId !== undefined;
const modulePresent = manifestCase.module !== null && manifestCase.module !== undefined;
if (handlerIdPresent !== modulePresent) errors.push(`${label}: handlerId and module must both be set, or both be null`);
if (handlerIdPresent && typeof manifestCase.handlerId !== 'string') errors.push(`${label}.handlerId must be a non-empty string or null`);
if (modulePresent && typeof manifestCase.module !== 'string') errors.push(`${label}.module must be a non-empty string or null`);
}
if (seenManifestCases.has(manifestCase.caseId)) errors.push(`${label}.caseId ${manifestCase.caseId} is duplicated`);
seenManifestCases.add(manifestCase.caseId);
if (typeof manifestCase.productionReady !== 'boolean') errors.push(`${label}.productionReady must be boolean`);
if (manifestCase.module && bridgeManifestRoot && !fs.existsSync(path.resolve(bridgeManifestRoot, manifestCase.module))) {
errors.push(`${label}.module ${manifestCase.module} does not exist`);
}
}
}
const manifestCases = new Map(((bridgeManifest && bridgeManifest.cases) || []).map((entry) => [entry.caseId, entry]));
const referencedSourceRefs = new Set();
for (const [targetRef, dependencies] of targetKnowledge.blockedSourceDependenciesByRef || []) {
for (const dependency of dependencies) {
referencedSourceRefs.add(dependency.sourceEntityRef);
const sourceEntity = profileEntityByRef.get(dependency.sourceEntityRef);
if (!sourceEntity) {
errors.push(`${targetRef}: blockedSourceDependencies sourceEntityRef ${dependency.sourceEntityRef} does not resolve to a plugin profile entity`);
continue;
}
const fulfillments = blockedEntriesOf(sourceEntity).map((entry) => entry.fulfillment).filter(Boolean);
if (fulfillments.length === 0) {
errors.push(`${targetRef}: ${dependency.sourceEntityRef} has no matching blocked[].fulfillment`);
}
}
}
for (const [sourceEntityRef, sourceEntity] of profileEntityByRef) {
const fulfillments = blockedEntriesOf(sourceEntity).map((entry) => entry.fulfillment).filter(Boolean);
if (fulfillments.length > 0 && !referencedSourceRefs.has(sourceEntityRef)) {
errors.push(`${sourceEntityRef}: blocked[].fulfillment is not referenced by any target blockedSourceDependencies entry`);
}
for (const fulfillment of fulfillments) {
const handler = handlerRegistry[fulfillment.handlerId];
if (!handler) errors.push(`${sourceEntityRef}: fulfillment handlerId ${fulfillment.handlerId} is not registered`);
else if (handler.kind !== fulfillment.kind) errors.push(`${sourceEntityRef}: handler ${fulfillment.handlerId} kind ${handler.kind} does not match ${fulfillment.kind}`);
// Only checked when the caller actually supplied a bridge manifest -- without one, this
// plugin-knowledge validation still checks handler registration above, just not the
// manifest-specific fields (see this function's own doc comment on `bridgeManifest`).
if (fulfillment.kind === 'bridge-plugin' && bridgeManifest) {
const manifestCase = manifestCases.get(fulfillment.manifestCaseId);
if (!manifestCase) errors.push(`${sourceEntityRef}: manifestCaseId ${fulfillment.manifestCaseId} is missing from the bridge manifest`);
else {
if (manifestCase.sourceEntityRef !== sourceEntityRef) errors.push(`${sourceEntityRef}: manifest case sourceEntityRef does not match`);
if (manifestCase.handlerId !== fulfillment.handlerId) errors.push(`${sourceEntityRef}: manifest case handlerId does not match fulfillment`);
}
}
}
}
// "Wix cannot do this" is a human-only verdict. Automation may say profiled or pending and
// nothing else, because a wrong impossibility tells a customer to abandon migratable data.
for (const entry of loadRequiresDevelopment(pluginsDir).capabilities || []) {
const label = `requires-development.json[${entry.capability}]`;
if (!entry.reason) errors.push(`${label}: needs a reason`);
if (!entry.searched) errors.push(`${label}: needs the recorded search`);
if (!entry.decidedBy) {
errors.push(`${label}: needs decidedBy — a named human. An agent may not conclude that Wix cannot do something; record it in capabilities-pending-decision.json instead.`);
}
if (!entry.decidedOn) errors.push(`${label}: needs decidedOn`);
if (capabilityRefs.has(entry.capability)) {
errors.push(`${label}: a Wix target entity now claims this capability; remove this entry`);
}
if (pending.has(entry.capability)) {
errors.push(`${label}: also listed as pending — a capability is either human-decided or pending, never both`);
}
}
for (const entry of pendingFile.capabilities || []) {
const label = `capabilities-pending-decision.json[${entry.capability}]`;
if (!entry.capability) errors.push('capabilities-pending-decision.json: every entry needs a capability');
if (!entry.reason) errors.push(`${label}: needs a reason`);
if (!entry.searched) errors.push(`${label}: needs the recorded search`);
if (!['target-exists', 'no-target'].includes(entry.suspected)) {
errors.push(`${label}: suspected must be target-exists or no-target`);
}
if (entry.suspected === 'target-exists' && !entry.plannedTarget) {
errors.push(`${label}: suspected target-exists requires plannedTarget — the ref a human should author`);
}
if (capabilityRefs.has(entry.capability)) {
errors.push(`${label}: a Wix target entity now claims this capability; remove the pending entry and let it resolve`);
}
}
for (const profile of profiles) {
const label = `plugins/${profile.plugin}.json`;
for (const entity of profile.entities || []) {
for (const ref of entity.candidateTargetRefs || []) {
if (!knownRefs.has(ref)) {
errors.push(`${label}: candidateTargetRefs ${ref} does not resolve in rp-target-wix/domains/index.json`);
}
}
}
for (const capability of profile.capabilities || []) {
// Deliberately NOT an error: a capability with no target is PENDING, which is a valid
// default state. Coverage reports it and a human decides; blocking here would push
// authors toward inventing a verdict just to make validation pass.
void capability;
}
}
for (const entry of loadRequiresDevelopment(pluginsDir).capabilities || []) {
if (!entry.reason) {
errors.push(`requires-development.json: ${entry.capability} needs a reason`);
}
if (capabilityRefs.has(entry.capability)) {
errors.push(`requires-development.json: ${entry.capability} is allowlisted but a Wix target entity now claims it; remove the allowlist entry`);
}
}
}
// The signed per-capability tier of no-migration-needed.json. Pure over its inputs, like
// validateEntity, so every rule is directly testable without staging a whole KB on disk.
function validateNoMigrationCapabilities({
entries = [],
requiresDevelopmentCapabilities = new Set(),
pendingCapabilities = new Set(),
// The Wix target KB's capability -> refs map, or null when it could not be loaded.
capabilityRefs = null,
} = {}, errors) {
const seen = new Set();
for (const entry of entries) {
const label = `no-migration-needed.json capabilities[${entry && entry.capability}]`;
if (!entry || !entry.capability) {
errors.push('no-migration-needed.json: every capabilities[] entry needs a capability');
continue;
}
if (seen.has(entry.capability)) errors.push(`${label}: duplicate capability`);
seen.add(entry.capability);
if (!NO_MIGRATION_REASONS.has(entry.reason)) {
errors.push(`${label}: invalid reason ${entry.reason} — one of ${[...NO_MIGRATION_REASONS].join(', ')}`);
}
if (!entry.replacedBy) errors.push(`${label}: needs replacedBy so the customer is told what covers it`);
if (!entry.rationale) errors.push(`${label}: needs a rationale — every no-need-to-migrate row requires one`);
// The signature is the whole point of this register. Unsigned, it would let automation
// decide there is nothing to move, which is a decision about what the customer loses.
if (!entry.decidedBy) {
errors.push(`${label}: needs decidedBy — a named human. Automation may not decide a profiled capability has nothing to move; record it in capabilities-pending-decision.json instead.`);
}
if (!entry.decidedOn) errors.push(`${label}: needs decidedOn`);
// Three capability registers, mutually exclusive: a capability is decided
// no-need, decided requires-development, or pending — never two of the three.
if (requiresDevelopmentCapabilities.has(entry.capability)) {
errors.push(`${label}: also listed in requires-development.json — "nothing to move" and "Wix has no surface" are contradictory verdicts; keep one`);
}
if (pendingCapabilities.has(entry.capability)) {
errors.push(`${label}: also listed as pending — a capability is either human-decided or pending, never both`);
}
// A signed "nothing to move" verdict and a Wix target entity claiming the same capability
// are a direct contradiction: the target says the data has somewhere to go. The register
// entry is the one that loses — the KB grew, so the verdict is stale and must be re-taken.
if (capabilityRefs && capabilityRefs.has(entry.capability)) {
errors.push(`${label}: a Wix target entity now claims this capability; the signed no-need verdict contradicts it and must be re-decided`);
}
}
}
// The no-migration-needed list is the cheap tier: nothing-to-move plugins that do not warrant
// a full profile. A slug must not appear in both tiers, or the two could disagree.
function validateNoMigrationNeeded(pluginsDir, profiles, errors) {
const file = loadNoMigrationNeeded(pluginsDir);
const seen = new Set();
const profileSlugs = new Set(profiles.map((profile) => profile.plugin));
for (const hint of file.hints || []) {
const label = `no-migration-needed.json[${hint && hint.slug}]`;
if (!hint || !hint.slug) {
errors.push('no-migration-needed.json: every entry needs a slug');
continue;
}
if (seen.has(hint.slug)) errors.push(`${label}: duplicate slug`);
seen.add(hint.slug);
if (!NO_MIGRATION_REASONS.has(hint.reason)) {
errors.push(`${label}: invalid reason ${hint.reason} — one of ${[...NO_MIGRATION_REASONS].join(', ')}`);
}
if (!hint.does) errors.push(`${label}: needs a plain-language "does"`);
if (!hint.replacedBy) errors.push(`${label}: needs replacedBy so the customer is told what covers it`);
if (!hint.provenance) errors.push(`${label}: needs provenance (observed:<host>-<date> or expected:not-yet-observed)`);
if (profileSlugs.has(hint.slug)) {
errors.push(`${label}: this slug also has a full profile; keep the verdict in one place`);
}
}
}
// The alias map carries names only: a token maps to a displayName + wordpress.org
// slug, nothing more — an alias must never smuggle in detection or mapping behavior.
function validateFingerprintAliases(pluginsDir, errors) {
const file = loadFingerprintAliases(pluginsDir);
for (const [token, alias] of Object.entries(file.aliases || {})) {
const label = `fingerprint-aliases.json[${token}]`;
if (!alias || typeof alias.displayName !== 'string' || alias.displayName.length === 0) {
errors.push(`${label}: needs a displayName`);
continue;
}
if (!alias.slug) errors.push(`${label}: needs the plugin directory slug`);
const extra = Object.keys(alias).filter((key) => !['displayName', 'slug'].includes(key));
if (extra.length > 0) {
errors.push(`${label}: carries ${extra.join(', ')} — the alias map is names only; entities, channels, and target refs belong in a profile`);
}
}
}
function validateKnowledge(pluginsDir, { targetKnowledge = null, bridgeManifest = null, bridgeManifestRoot = null } = {}) {
const errors = [];
const profiles = [];
let corePatterns = new Set();
try {
corePatterns = require('./wp-route-classifier.js').coreRulePatterns();
} catch (error) {
errors.push(`could not load classifier core rule patterns for collision checks: ${error.message}`);
}
const routeOwners = new Map();
for (const fileName of listProfileFiles(pluginsDir)) {
const slug = fileName.replace(/\.json$/, '');
const label = `plugins/${fileName}`;
let profile;
try {
profile = readJson(path.join(pluginsDir, fileName));
} catch (error) {
errors.push(`${label}: not valid JSON (${error.message})`);
continue;
}
profiles.push(profile);
validateProfile(profile, slug, label, errors);
const routes = [
...(profile.entities || []).map(entityRouteOf).filter(Boolean),
...(profile.dataRoutePatterns || []).map((rule) => rule.pattern),
];
const overridingEntities = new Set(
(profile.entities || []).filter((entity) => entity.overridesCoreRule === true).map(entityRouteOf),
);
for (const route of routes) {
if (routeOwners.has(route) && routeOwners.get(route) !== slug) {
errors.push(`${label}: route ${route} is already claimed by plugin ${routeOwners.get(route)}`);
}
routeOwners.set(route, slug);
// A profile route that shadows a classifier-owned pattern must say so explicitly,
// so an accidental shadow cannot silently change core scope.
if (corePatterns.has(route) && !overridingEntities.has(route)) {
errors.push(`${label}: route ${route} shadows a classifier core rule; set "overridesCoreRule": true on that entity if this is intended`);
}
}
}
validateNoMigrationNeeded(pluginsDir, profiles, errors);
validateNoMigrationCapabilities({
entries: loadNoMigrationCapabilities(pluginsDir),
requiresDevelopmentCapabilities: new Set(
(loadRequiresDevelopment(pluginsDir).capabilities || []).map((entry) => entry.capability),
),
pendingCapabilities: new Set(
(loadPendingDecisions(pluginsDir).capabilities || []).map((entry) => entry.capability),
),
capabilityRefs: targetKnowledge?.capabilityRefs || null,
}, errors);
validateFingerprintAliases(pluginsDir, errors);
validateAgainstTargets(profiles, pluginsDir, targetKnowledge, errors, bridgeManifest, bridgeManifestRoot);
const generated = generateIndex(pluginsDir);
const indexPath = path.join(pluginsDir, 'index.json');
if (!fs.existsSync(indexPath)) {
errors.push('plugins/index.json is missing; run plugin-knowledge-validate.js --write-index');
} else if (JSON.stringify(readJson(indexPath)) !== JSON.stringify(generated)) {
errors.push('plugins/index.json is stale; run plugin-knowledge-validate.js --write-index');
}
return { ok: errors.length === 0, errors, generatedIndex: generated, profileCount: profiles.length };
}
function loadIndex(pluginsDir) {
return readJson(path.join(pluginsDir, 'index.json'));
}
function listPlugins(pluginsDir) {
const index = loadIndex(pluginsDir);
return Object.entries(index.plugins || {}).map(([plugin, info]) => ({ plugin, ...info }));
}
function readProfile(pluginsDir, slug) {
const filePath = path.join(pluginsDir, `${slug}.json`);
if (!fs.existsSync(filePath)) throw new Error(`Unknown plugin profile: ${slug}`);
return readJson(filePath);
}
function patternMatchesRoute(pattern, routePath) {
if (pattern.endsWith('/*')) return routePath.startsWith(pattern.slice(0, -1));
if (pattern.endsWith('*')) return routePath.startsWith(pattern.slice(0, -1));
return pattern === routePath;
}
function resolveRoute(pluginsDir, routePath) {
const index = loadIndex(pluginsDir);
const matches = [];
for (const [pattern, slugs] of Object.entries(index.routeIndex || {})) {
if (patternMatchesRoute(pattern, routePath)) {
for (const slug of slugs) matches.push({ plugin: slug, pattern });
}
}
return matches.sort((a, b) => a.plugin.localeCompare(b.plugin) || a.pattern.localeCompare(b.pattern));
}
function resolveFromIndexKey(pluginsDir, collectionName, key) {
const index = loadIndex(pluginsDir);
return [...((index[collectionName] || {})[key] || [])];
}
function listCapabilities(pluginsDir) {
const index = loadIndex(pluginsDir);
const allowlist = new Set(
(loadRequiresDevelopment(pluginsDir).capabilities || []).map((entry) => entry.capability),
);
return Object.entries(index.capabilityIndex || {}).map(([capability, plugins]) => ({
capability,
plugins,
hasNativeTarget: !allowlist.has(capability),
}));
}
// Route rules consumed by wp-route-classifier.js. Built from profiles so adding a plugin
// never means editing classifier code.
function buildRouteRules(pluginsDir) {
const dataRules = [];
const excludeRules = [];
for (const fileName of listProfileFiles(pluginsDir)) {
const profile = readJson(path.join(pluginsDir, fileName));
const slug = profile.plugin;
for (const rule of profile.excludeRoutes || []) {
excludeRules.push([rule.route, `plugin.${slug}.exclude`, rule.reason]);
}
for (const entity of profile.entities || []) {
const route = entityRouteOf(entity);
if (route) {
dataRules.push([
route,
`plugin.${slug}.${entity.entity}`,
`${profile.displayName} ${entity.entity} records are durable plugin data`,
]);
}
}
for (const rule of profile.dataRoutePatterns || []) {
dataRules.push([rule.pattern, `plugin.${slug}.namespace`, rule.reason]);
}
}
// Longest pattern first so a specific route beats a namespace-wide pattern from the same
// or another profile.
dataRules.sort((a, b) => b[0].length - a[0].length || a[0].localeCompare(b[0]));
excludeRules.sort((a, b) => b[0].length - a[0].length || a[0].localeCompare(b[0]));
return { dataRules, excludeRules };
}
// Route -> { itemsPath, countPath } for entities whose profile declares a non-standard
// response envelope (e.g. MailPoet's `{ data: { items: [...], meta: { count } } }` instead of
// a flat array + X-WP-Total header). Built from profiles, like buildRouteRules, so adding a
// plugin with a wrapped response never means editing the sampler.
function buildResponseEnvelopes(pluginsDir) {
const envelopes = new Map();
for (const fileName of listProfileFiles(pluginsDir)) {
const profile = readJson(path.join(pluginsDir, fileName));
for (const entity of profile.entities || []) {
const route = entityRouteOf(entity);
if (route && entity.responseEnvelope) {
envelopes.set(route, entity.responseEnvelope);
}
}
}
return envelopes;
}
// Route -> { method, body } for entities whose only read path is not a plain GET
// collection (e.g. a plugin that implements "list" as a POST with a JSON body instead of
// query params — spec 0044). Built from profiles, like buildResponseEnvelopes, so any
// future waitlist-shaped plugin needs only a profile entry, never a sampler change.
// `body` may contain the placeholder string "$SAMPLED_IDS:<route>" on any leaf value,
// resolved at sample time (wp-discovery.js resolveRequestBody) to the ids already
// collected for that route earlier in the same discovery run — generic across any
// entity/route pair, not hardcoded to one plugin's id field.
function buildRequestOverrides(pluginsDir) {
const overrides = new Map();
for (const fileName of listProfileFiles(pluginsDir)) {
const profile = readJson(path.join(pluginsDir, fileName));
for (const entity of profile.entities || []) {
const route = entityRouteOf(entity);
if (route && entity.requestMethod && entity.requestMethod !== 'GET') {
overrides.set(route, { method: entity.requestMethod, body: entity.requestBody || {} });
}
}
}
return overrides;
}
// Route -> N for entities whose profile declares that each logical record arrives as N
// separate flat array entries instead of one object (e.g. Back In Stock Notifier's
// list_subscriber, verified live 2026-08-19: 4 single-key entries per subscriber). Built
// from profiles, like buildResponseEnvelopes/buildRequestOverrides, so any future
// fragmented-response plugin needs only a profile entry, never a sampler change.
// Route -> recordKeyField for entities that declare one. Used to dedupe merged batch results
// in the $SAMPLED_IDS pagination/batching mechanism (spec 0044) — a profile whose records key
// on something other than `id` (e.g. subscriptions-for-woocommerce's `subscription_id`) would
// otherwise silently dedupe on the wrong field, or not at all. Built from profiles, like the
// other route-level lookups in this file.
function buildRecordKeyFields(pluginsDir) {
const keyFields = new Map();
for (const fileName of listProfileFiles(pluginsDir)) {
const profile = readJson(path.join(pluginsDir, fileName));
for (const entity of profile.entities || []) {
const route = entityRouteOf(entity);
if (route && entity.recordKeyField) {
keyFields.set(route, entity.recordKeyField);
}
}
}
return keyFields;
}
function buildResponseFragmentGroups(pluginsDir) {
const groups = new Map();
for (const fileName of listProfileFiles(pluginsDir)) {
const profile = readJson(path.join(pluginsDir, fileName));
for (const entity of profile.entities || []) {
const route = entityRouteOf(entity);
if (route && entity.responseFragmentGroupSize) {
groups.set(route, entity.responseFragmentGroupSize);
}
}
}
return groups;
}
module.exports = {
CHANNELS,
ROUTE_CHANNELS,
CHILD_ROUTE_PLACEHOLDER,
validateEntity,
validateProfile,
validateBlockedEntries,
blockedEntriesOf,
validateNoMigrationCapabilities,
pluginsRoot,
listProfileFiles,
loadProfiles,
loadRequiresDevelopment,
loadFingerprintAliases,
loadPendingDecisions,
loadNoMigrationNeeded,
loadNoMigrationCapabilities,
generateIndex,
validateKnowledge,
writeJson,
loadIndex,
listPlugins,
readProfile,
resolveRoute,
resolveFromIndexKey,
listCapabilities,
buildRouteRules,
buildResponseEnvelopes,
buildResponseFragmentGroups,
buildRecordKeyFields,
buildRequestOverrides,
patternMatchesRoute,
wildcardKeepsScope,
entityRouteOf,
};
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Medium risk
- Possible data-exfiltration endpoints
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Wix
- Publisher
- Wix (Official)
- Source
- wix/skills · wix-replatform/resources/rp-source-wordpress · commit d168bc2
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Wix.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download rp-source-wordpress.zip