Skip to content

Commit aa2c7a2

Browse files
authored
Merge pull request #19 from woocommerce/rename/woocommerce-claude
Rename: Hey Woo → WooCommerce for Claude
2 parents ca18653 + f5de70a commit aa2c7a2

105 files changed

Lines changed: 1021 additions & 983 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ assignees: ''
2626

2727
## Environment
2828

29-
- **Hey Woo version:** <!-- e.g. 0.1.0 — see plugin header -->
29+
- **WooCommerce for Claude version:** <!-- e.g. 0.1.0 — see plugin header -->
3030
- **WordPress version:**
3131
- **WooCommerce version:**
3232
- **PHP version:**

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ contact_links:
44
url: https://hackerone.com/automattic
55
about: Please report security issues privately. See SECURITY.md.
66
- name: Question or general help
7-
url: https://github.com/woocommerce/hey-woo/discussions
7+
url: https://github.com/woocommerce/woocommerce-claude/discussions
88
about: For usage questions, please open a discussion rather than an issue.

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Release Plugin
22

3-
# Produce a distributable `hey-woo.zip` and publish it as a GitHub Release.
3+
# Produce a distributable `woocommerce-claude.zip` and publish it as a GitHub Release.
44
#
55
# Trigger: manual workflow_dispatch only — tag pushes do NOT trigger this
66
# workflow; the tag + Release are CREATED by the workflow, not consumed by it.
77
# This makes the release a deliberate UI action that goes through the full
88
# build + validation path.
99
#
1010
# Prerequisites (enforced at runtime, workflow fails fast if not met):
11-
# - The `version` input must match the `Version:` header in hey-woo.php.
11+
# - The `version` input must match the `Version:` header in woocommerce-claude.php.
1212
# Bump the header on a PR and merge it first, then dispatch this workflow
1313
# with the matching version.
1414
# - The tag `v<version>` must not already exist on the remote.
@@ -17,7 +17,7 @@ on:
1717
workflow_dispatch:
1818
inputs:
1919
version:
20-
description: 'Release version, e.g. 0.1.0 (must match the Version header in hey-woo.php)'
20+
description: 'Release version, e.g. 0.1.0 (must match the Version header in woocommerce-claude.php)'
2121
required: true
2222
type: string
2323
draft:
@@ -47,15 +47,15 @@ jobs:
4747
INPUT_VERSION="${{ inputs.version }}"
4848
INPUT_VERSION="${INPUT_VERSION#v}"
4949
50-
HEADER_VERSION="$(awk '/^ \* Version:/ { print $3; exit }' hey-woo.php)"
50+
HEADER_VERSION="$(awk '/^ \* Version:/ { print $3; exit }' woocommerce-claude.php)"
5151
if [[ -z "${HEADER_VERSION}" ]]; then
52-
echo "ERROR: could not read Version header from hey-woo.php" >&2
52+
echo "ERROR: could not read Version header from woocommerce-claude.php" >&2
5353
exit 1
5454
fi
5555
5656
if [[ "${INPUT_VERSION}" != "${HEADER_VERSION}" ]]; then
5757
echo "ERROR: input version '${INPUT_VERSION}' does not match the Version header ('${HEADER_VERSION}')." >&2
58-
echo " Bump hey-woo.php on a PR first, merge it, then re-run this workflow." >&2
58+
echo " Bump woocommerce-claude.php on a PR first, merge it, then re-run this workflow." >&2
5959
exit 1
6060
fi
6161
@@ -88,16 +88,16 @@ jobs:
8888

8989
- name: Verify zip was produced
9090
run: |
91-
if [ ! -f hey-woo.zip ]; then
92-
echo "ERROR: hey-woo.zip not found" >&2
91+
if [ ! -f woocommerce-claude.zip ]; then
92+
echo "ERROR: woocommerce-claude.zip not found" >&2
9393
exit 1
9494
fi
9595
9696
- name: Upload workflow artifact
9797
uses: actions/upload-artifact@v4
9898
with:
99-
name: hey-woo-${{ env.VERSION }}
100-
path: hey-woo.zip
99+
name: woocommerce-claude-${{ env.VERSION }}
100+
path: woocommerce-claude.zip
101101
retention-days: 30
102102

103103
- name: Create GitHub Release
@@ -106,7 +106,7 @@ jobs:
106106
tag_name: ${{ env.TAG_NAME }}
107107
name: ${{ env.TAG_NAME }}
108108
target_commitish: ${{ github.sha }}
109-
files: hey-woo.zip
109+
files: woocommerce-claude.zip
110110
generate_release_notes: true
111111
draft: ${{ inputs.draft }}
112112
prerelease: ${{ inputs.prerelease }}

.wp-env.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"core": "WordPress/WordPress#6.9",
33
"plugins": ["https://downloads.wordpress.org/plugin/woocommerce.zip"],
44
"mappings": {
5-
"wp-content/plugins/hey-woo": ".",
5+
"wp-content/plugins/woocommerce-claude": ".",
66
"wp-content/mu-plugins": "./tools/mu-plugins"
77
},
88
"config": {
@@ -11,12 +11,12 @@
1111
"SCRIPT_DEBUG": true
1212
},
1313
"lifecycleScripts": {
14-
"afterStart": "wp-env run cli -- wp option update woocommerce_feature_mcp_integration_enabled yes && wp-env run cli -- wp plugin activate woocommerce hey-woo && wp-env run cli -- wp wc tool run install_pages --user=admin && wp-env run cli -- wp option update woocommerce_store_address '123 Main Street' && wp-env run cli -- wp option update woocommerce_store_city 'London' && wp-env run cli -- wp option update woocommerce_store_postcode 'EC1A 1BB' && wp-env run cli -- wp option update woocommerce_default_country 'GB' && wp-env run cli -- wp option update woocommerce_currency 'GBP'"
14+
"afterStart": "wp-env run cli -- wp plugin activate woocommerce woocommerce-claude && wp-env run cli -- wp wc tool run install_pages --user=admin && wp-env run cli -- wp option update woocommerce_store_address '123 Main Street' && wp-env run cli -- wp option update woocommerce_store_city 'London' && wp-env run cli -- wp option update woocommerce_store_postcode 'EC1A 1BB' && wp-env run cli -- wp option update woocommerce_default_country 'GB' && wp-env run cli -- wp option update woocommerce_currency 'GBP'"
1515
},
1616
"env": {
1717
"tests": {
1818
"mappings": {
19-
"wp-content/plugins/hey-woo-tests": "."
19+
"wp-content/plugins/woocommerce-claude-tests": "."
2020
}
2121
}
2222
}

AGENTS.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Hey Woo
1+
# WooCommerce for Claude
22

3-
The intelligence layer for an AI-ready WooCommerce store: analytics skills, knowledge resources, prompts, and an AI-readiness scoring engine, registered as WordPress Abilities and exposed through the plugin's own MCP endpoint at `/wp-json/hey-woo/mcp`.
3+
The intelligence layer for an AI-ready WooCommerce store: analytics skills, knowledge resources, prompts, and an AI-readiness scoring engine, registered as WordPress Abilities and exposed through the plugin's own MCP endpoint at `/wp-json/woocommerce-claude/mcp`.
44

55
WordPress plugin, PHP 7.4+, GPL-3.0-or-later. Public repo — never commit secrets, internal-only URLs, or anything not intended for public distribution.
66

@@ -18,25 +18,25 @@ WordPress plugin, PHP 7.4+, GPL-3.0-or-later. Public repo — never commit secre
1818

1919
**Re-stating the two highest-stakes rules** because they're load-bearing for every ability description and a single violation ships to a public release:
2020

21-
- **Privacy.** Analytics responses are aggregated counts/sums/averages only. No customer names, emails, or addresses unless the `hey_woo_allow_customer_pii` option is opt-in **and** the response shape clearly justifies it. Default off.
21+
- **Privacy.** Analytics responses are aggregated counts/sums/averages only. No customer names, emails, or addresses unless the `woocommerce_claude_allow_customer_pii` option is opt-in **and** the response shape clearly justifies it. Default off.
2222
- **Merchant scope.** The AI is talking to a merchant. They can't add a tool, register a REST endpoint, or edit plugin code. Tool descriptions and merchant-facing text MUST NOT suggest "a future X skill would answer this" — substitute with something the merchant can action (a setting, a manual workflow, a connector, or an honest "this isn't something we can answer"). The static guardrail-sweep test (`tests/integration/test-ability-description-guardrails.php`) catches the obvious violations on every `./bin/check`.
2323

2424
## Layout
2525

2626
```
27-
hey-woo/
28-
├── hey-woo.php # Plugin bootstrap (HPOS declaration, requirements, options migration)
27+
woocommerce-claude/
28+
├── woocommerce-claude.php # Plugin bootstrap (HPOS declaration, requirements, options migration)
2929
├── includes/
3030
│ ├── class-plugin.php # Singleton — wires hooks, boots WP MCP adapter, registers own MCP server
3131
│ ├── abilities/ # One file per skill. wc-analytics/* (analytics tools),
32-
│ │ # hey-woo/* (store/readiness/search tools), wc-knowledge/*
33-
│ │ # (resources), wc-prompts/* (prompts), hey-woo-integrations/*
32+
│ │ # woocommerce-claude/* (store/readiness/search tools), wc-knowledge/*
33+
│ │ # (resources), wc-prompts/* (prompts), woocommerce-claude-integrations/*
3434
│ │ # (dev-only prototype scaffolds — gated by wp_get_environment_type)
3535
│ ├── api/ # REST controllers + AnalyticsController (shared SQL helper —
3636
│ │ # no REST routes; abilities call into it)
3737
│ ├── knowledge/ # Provider pattern (store profile / catalog / product / policy)
3838
│ ├── scoring/ # Engine + 4 factors (product, schema, content, policy)
39-
│ ├── settings/ # WC > Settings > Hey Woo tab
39+
│ ├── settings/ # WC > Settings > WooCommerce for Claude tab
4040
│ └── telemetry/ # SkillTelemetry + handlers (log, Tracks-gated by opt-in toggle)
4141
├── tests/integration/ # PHPUnit; runs inside wp-env tests-cli container
4242
├── tools/
@@ -56,7 +56,7 @@ hey-woo/
5656

5757
```bash
5858
npx @wordpress/env start # boots WP 6.9 + WC + this plugin on http://localhost:8888
59-
# afterStart activates WC + Hey Woo, installs WC pages,
59+
# afterStart activates WC + WooCommerce for Claude, installs WC pages,
6060
# sets a UK store address (London / GBP)
6161
./bin/check # full pre-push gate (PHPCS, composer audit, PHPUnit, DCC)
6262
```
@@ -72,10 +72,10 @@ npx @wordpress/env run cli -- wp eval-file /tmp/seed.php
7272

7373
These are validated decisions. **MUST NOT** relitigate without strong new signal.
7474

75-
- **Plugin-owned MCP server.** Hey Woo registers its own MCP server at `/wp-json/hey-woo/mcp` via the WordPress MCP adapter (vendored inside WooCommerce as `vendor/wordpress/mcp-adapter`). The plugin boots the adapter on `plugins_loaded` so the endpoint works regardless of WC's `mcp_integration` feature flag, then calls `$adapter->create_server('hey-woo', 'hey-woo', 'mcp', ...)` on `mcp_adapter_init` with a curated list of tools, resources, and prompts. Auth uses an `X-MCP-API-Key: ck:cs` header backed by a standard WC REST API key. The earlier "ride on WC's `woocommerce-mcp` server via `woocommerce_mcp_include_ability`" approach is gone — that endpoint is being deprecated upstream.
76-
- **Single Abilities API namespace.** Every analytics skill is at `wp-abilities/v1/abilities/wc-analytics/{skill}/run`. Earlier custom `hey-woo/v1/analytics/*` REST routes were folded into Abilities so MCP and direct callers hit one surface.
77-
- **Three plugin-owned ability prefixes**, declared in `Plugin::OWNED_ABILITY_NAMESPACES`: `wc-analytics/`, `hey-woo/`, `hey-woo-integrations/`. The WC auth scope filter trusts only routes under these prefixes — a Hey Woo consumer key cannot be replayed against abilities registered by other plugins. Adding a fourth prefix is a single-edit operation; the `Plugin::mcp_tool_ability_ids()` curated list must be updated in lockstep.
78-
- **Aggregated-only privacy by default.** PII gate (`hey_woo_allow_customer_pii`) is off; merchants opt in only when chaining with email/CRM MCPs that need real addresses. `wc_string_to_bool` reads the option (not `(bool)``'no'` would otherwise be truthy).
75+
- **Plugin-owned MCP server.** WooCommerce for Claude registers its own MCP server at `/wp-json/woocommerce-claude/mcp` via the WordPress MCP adapter (vendored inside WooCommerce as `vendor/wordpress/mcp-adapter`). The plugin boots the adapter on `plugins_loaded` so the endpoint works regardless of WC's `mcp_integration` feature flag, then calls `$adapter->create_server('woocommerce-claude', 'woocommerce-claude', 'mcp', ...)` on `mcp_adapter_init` with a curated list of tools, resources, and prompts. Auth uses an `X-MCP-API-Key: ck:cs` header backed by a standard WC REST API key. The earlier "ride on WC's `woocommerce-mcp` server via `woocommerce_mcp_include_ability`" approach is gone — that endpoint is being deprecated upstream.
76+
- **Single Abilities API namespace.** Every analytics skill is at `wp-abilities/v1/abilities/wc-analytics/{skill}/run`. Earlier custom `woocommerce-claude/v1/analytics/*` REST routes were folded into Abilities so MCP and direct callers hit one surface.
77+
- **Three plugin-owned ability prefixes**, declared in `Plugin::OWNED_ABILITY_NAMESPACES`: `wc-analytics/`, `woocommerce-claude/`, `woocommerce-claude-integrations/`. The WC auth scope filter trusts only routes under these prefixes — a WooCommerce for Claude consumer key cannot be replayed against abilities registered by other plugins. Adding a fourth prefix is a single-edit operation; the `Plugin::mcp_tool_ability_ids()` curated list must be updated in lockstep.
78+
- **Aggregated-only privacy by default.** PII gate (`woocommerce_claude_allow_customer_pii`) is off; merchants opt in only when chaining with email/CRM MCPs that need real addresses. `wc_string_to_bool` reads the option (not `(bool)``'no'` would otherwise be truthy).
7979
- **HPOS-compatible.** Declared via `FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true)`. SQL must read from HPOS tables (`wp_wc_orders_meta` for attribution) when available, falling back to `wp_postmeta` only when HPOS isn't enabled. The runtime branch lives in `AnalyticsController::get_order_meta_source()`.
8080
- **No background work.** No cron, no polling, no sync jobs. The plugin runs only when an MCP/REST request arrives. This is the contract that lets the perf doc say "lighter than loading WC Analytics a few times an hour."
8181
- **Transient cache with stable keys.** Never pass live `DateTime` objects into cache-key generation; normalise to `Y-m-d H:i:s` strings before hashing. WC core's DataStore cache has a known microseconds-in-key bug — don't reach for it.
@@ -103,7 +103,7 @@ The DCC step (`bin/check-dcc`) is gated — it auto-skips when `vendor-plugins/w
103103

104104
### MCP requires HTTPS by default
105105

106-
Local wp-env runs on plain HTTP. The Hey Woo MCP transport (`WP\MCP\Transport\HttpTransport`) does not enforce HTTPS, so curl-style local testing against `/wp-json/hey-woo/mcp` works without a TLS cert. Production stores should still front the endpoint with HTTPS.
106+
Local wp-env runs on plain HTTP. The WooCommerce for Claude MCP transport (`WP\MCP\Transport\HttpTransport`) does not enforce HTTPS, so curl-style local testing against `/wp-json/woocommerce-claude/mcp` works without a TLS cert. Production stores should still front the endpoint with HTTPS.
107107

108108
### Two-step skill addition
109109

@@ -114,9 +114,9 @@ A new analytics skill needs **code + PHPUnit test + two static-sweep constants**
114114

115115
The full how-to is in CONTRIBUTING.md (`Adding a new analytics Skill`). Don't shortcut the test — the coverage guard is the substitute for "did anyone actually verify this against real data?"
116116

117-
### The `hey-woo-tests` mapping is the integration-tests mount
117+
### The `woocommerce-claude-tests` mapping is the integration-tests mount
118118

119-
`.wp-env.json` mounts the repo into the dev environment as `hey-woo` and into the **tests** environment as `hey-woo-tests`. The PHPUnit container's working dir is `wp-content/plugins/hey-woo-tests` — that's why `bootstrap.php` does `glob($plugin_dir . '/hey-woo/...')` to find the production-side mount when loading WC. Don't rename either mount; the bootstrap and the CI workflow both rely on the slug.
119+
`.wp-env.json` mounts the repo into the dev environment as `woocommerce-claude` and into the **tests** environment as `woocommerce-claude-tests`. The PHPUnit container's working dir is `wp-content/plugins/woocommerce-claude-tests` — that's why `bootstrap.php` does `glob($plugin_dir . '/woocommerce-claude/...')` to find the production-side mount when loading WC. Don't rename either mount; the bootstrap and the CI workflow both rely on the slug.
120120

121121
### British English
122122

@@ -132,4 +132,4 @@ The plugin is published as a UK-Automattic-shaped product (default seed store is
132132
3. Tool/ability descriptions don't violate the merchant-scope rule (the description-guardrail sweep enforces the obvious cases; review catches the rest).
133133
4. CONTRIBUTING.md "Design patterns worth knowing" section updated when a new reusable pattern is established.
134134
5. AGENTS.md (this file) updated when a new gotcha, command, or convention is introduced.
135-
- **Don't commit `hey-woo.zip`.** It's checked into the repo as a one-off artefact, but `*.zip` is in `.gitignore` and the release workflow rebuilds it from the tag. Don't update it in regular commits.
135+
- **Don't commit `woocommerce-claude.zip`.** It's checked into the repo as a one-off artefact, but `*.zip` is in `.gitignore` and the release workflow rebuilds it from the tag. Don't update it in regular commits.

0 commit comments

Comments
 (0)