@adobe-commerce/aio-toolkit 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +250 -0
- package/README.md +450 -1
- package/dist/aio-toolkit-cli-workflow/bin/cli.js +2048 -0
- package/dist/aio-toolkit-cli-workflow/bin/cli.js.map +1 -0
- package/dist/aio-toolkit-cursor-context/bin/cli.js +16 -0
- package/dist/aio-toolkit-cursor-context/bin/cli.js.map +1 -1
- package/dist/index.d.mts +61 -6
- package/dist/index.d.ts +61 -6
- package/dist/index.js +600 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +610 -38
- package/dist/index.mjs.map +1 -1
- package/files/cursor-context/commands/aio-toolkit-analyze-adobe-commerce-module.md +612 -0
- package/files/cursor-context/commands/aio-toolkit-create-amazon-sqs-consumer.md +445 -0
- package/files/cursor-context/commands/aio-toolkit-create-event-consumer-action.md +6 -0
- package/files/cursor-context/commands/aio-toolkit-create-graphql-action.md +21 -7
- package/files/cursor-context/commands/aio-toolkit-create-openwhisk-action.md +326 -0
- package/files/cursor-context/commands/aio-toolkit-create-runtime-action.md +15 -5
- package/files/cursor-context/commands/aio-toolkit-create-shipping-carrier.md +681 -0
- package/files/cursor-context/commands/aio-toolkit-create-webhook-action.md +22 -9
- package/files/cursor-context/rules/aio-toolkit-create-adobe-commerce-client.mdc +252 -116
- package/files/cursor-context/rules/aio-toolkit-oop-best-practices.mdc +10 -4
- package/files/cursor-context/rules/aio-toolkit-setup-new-relic-telemetry.mdc +167 -2
- package/files/cursor-context/rules/aio-toolkit-use-abdb-collection.mdc +610 -0
- package/files/cursor-context/rules/aio-toolkit-use-abdb-repository.mdc +705 -0
- package/files/cursor-context/rules/aio-toolkit-use-adobe-auth.mdc +442 -0
- package/files/cursor-context/rules/aio-toolkit-use-amazon-sqs-publish.mdc +397 -0
- package/files/cursor-context/rules/aio-toolkit-use-file-repository.mdc +502 -0
- package/files/cursor-context/rules/aio-toolkit-use-publish-event.mdc +510 -0
- package/files/cursor-context/rules/aio-toolkit-use-runtime-api-gateway-service.mdc +542 -0
- package/package.json +4 -2
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
# aio-toolkit-analyze-adobe-commerce-module
|
|
2
|
+
|
|
3
|
+
Analyze an Adobe Commerce module and generate a comprehensive requirements document at `requirements/{Vendor_Module}.md` in the project root. Follow the four phases below **in strict order**.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Phase 1 — Prerequisites
|
|
8
|
+
|
|
9
|
+
### 1a. Detect Project Context
|
|
10
|
+
|
|
11
|
+
Check whether the current workspace is an Adobe Commerce project root:
|
|
12
|
+
- Look for an `app/code/` directory
|
|
13
|
+
- Look for `composer.json` containing `magento/framework` in its `require` block
|
|
14
|
+
- Look for `app/etc/` directory
|
|
15
|
+
|
|
16
|
+
**If this IS an Adobe Commerce project root:**
|
|
17
|
+
- Recursively scan `app/code/` for all `{Vendor}/{Module}` two-level directory structures
|
|
18
|
+
- Present a numbered list of all discovered modules
|
|
19
|
+
- Ask: *"Which module would you like to analyze? Enter the Vendor/Module name (e.g. Magento/Catalog)."*
|
|
20
|
+
- Resolve the full module path: `{project_root}/app/code/{Vendor}/{Module}`
|
|
21
|
+
|
|
22
|
+
**If this is NOT an Adobe Commerce project root:**
|
|
23
|
+
- Ask: *"Please provide the full absolute path to the Adobe Commerce module directory."*
|
|
24
|
+
- Accept the path and proceed to 1b
|
|
25
|
+
|
|
26
|
+
### 1b. Validate the Module Path
|
|
27
|
+
|
|
28
|
+
Confirm the provided path is a valid Adobe Commerce module by checking:
|
|
29
|
+
- `registration.php` exists — required Magento registration file
|
|
30
|
+
- `etc/module.xml` exists — required module declaration
|
|
31
|
+
|
|
32
|
+
If either file is missing, stop and report: *"The provided path does not appear to be a valid Adobe Commerce module. Missing: {file}. Please verify the path and try again."*
|
|
33
|
+
|
|
34
|
+
If both files exist:
|
|
35
|
+
- Read `etc/module.xml` → extract the full module name (e.g. `Magento_Catalog`) and schema version
|
|
36
|
+
- Read `registration.php` → confirm namespace registration matches `etc/module.xml`
|
|
37
|
+
- Read `composer.json` (if present) → extract description, version, and PHP constraint
|
|
38
|
+
|
|
39
|
+
### 1c. Additional Prerequisites
|
|
40
|
+
|
|
41
|
+
Run these checks before deep analysis begins:
|
|
42
|
+
|
|
43
|
+
1. **Resolve project root** — walk up from the module path to locate the directory containing `app/code/`. This is the Adobe Commerce project root used for output.
|
|
44
|
+
2. **Read declared dependencies** — parse `<sequence>` entries in `etc/module.xml` to identify internal module dependencies.
|
|
45
|
+
3. **Inventory config files** — check which of the following exist (record presence only, do not read contents yet):
|
|
46
|
+
|
|
47
|
+
| Config File | Drives Section |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `etc/db_schema.xml` | Database Schema |
|
|
50
|
+
| `etc/webapi.xml` | REST API Endpoint |
|
|
51
|
+
| `etc/communication.xml`, `etc/queue_topology.xml`, `etc/queue_publisher.xml`, `etc/queue_consumer.xml` | RabbitMQ |
|
|
52
|
+
| `etc/adminhtml/system.xml`, `etc/config.xml` | Admin Configuration |
|
|
53
|
+
| `etc/crontab.xml` | Cron Jobs |
|
|
54
|
+
| `etc/cache.xml` | Cache System |
|
|
55
|
+
| `etc/import.xml`, `etc/export.xml` | Import / Export |
|
|
56
|
+
| `etc/extension_attributes.xml` | Extension Attributes |
|
|
57
|
+
| `etc/io_events.xml` | Adobe I/O Events |
|
|
58
|
+
| `etc/webapi_async.xml` | Async / Bulk REST API |
|
|
59
|
+
| `etc/schema.graphqls` | GraphQL Schema |
|
|
60
|
+
| `etc/email_templates.xml` | Email Templates |
|
|
61
|
+
| `etc/payment.xml` | Payment Method *(only if new method declared)* |
|
|
62
|
+
| `etc/di.xml`, `etc/adminhtml/di.xml`, `etc/frontend/di.xml`, `etc/graphql/di.xml`, `etc/webapi_rest/di.xml`, `etc/crontab/di.xml` | Dependency Injection |
|
|
63
|
+
| `etc/events.xml`, `etc/adminhtml/events.xml`, `etc/frontend/events.xml`, `etc/graphql/events.xml`, `etc/webapi_rest/events.xml`, `etc/crontab/events.xml` | Events (Observers) |
|
|
64
|
+
|
|
65
|
+
4. **Inventory PHP directories** — check for presence of `Model/`, `Helper/`, `Http/`, `Block/` directories.
|
|
66
|
+
5. **Check for Admin UI** — glob `view/adminhtml/ui_component/` for any `*.xml` files containing a `<listing>` (grid) or `<form>`. Only flag this section if such files exist.
|
|
67
|
+
6. **Check for existing documentation** — note if `README.md`, `REQUIREMENTS.md`, or `docs/` exists (for reference only; do not re-use old content).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## App Builder Reference Mapping
|
|
72
|
+
|
|
73
|
+
Use this mapping throughout analysis and especially when writing the Summary section. For every Commerce module component found, cite the correct App Builder equivalent, the specific class from the custom libraries, and include the documentation link in the generated document.
|
|
74
|
+
|
|
75
|
+
### Architectural Principles (always apply in the Summary)
|
|
76
|
+
|
|
77
|
+
**1. Never expose raw Runtime action URLs externally.**
|
|
78
|
+
- **Commerce → App Builder**: Always use Commerce's Webhook system. Register the webhook in Commerce pointing to a `WebhookAction` handler. Commerce handles auth, retry, and structured payload delivery. Do not have Commerce call a raw `*.adobeioruntime.net` URL directly.
|
|
79
|
+
- **Third-party → App Builder**: Always create a proper API layer in front of the Runtime action — a Commerce REST endpoint (`webapi.xml`), an API Mesh route, or an App Builder web API route. Third parties call the API layer, not the Runtime action URL directly. This provides versioning, access control, and a stable public contract.
|
|
80
|
+
|
|
81
|
+
**2. Always recommend both `AbdbCollection` and `AbdbRepository` together.**
|
|
82
|
+
- `AbdbCollection` defines the typed schema (columns, types, validation rules).
|
|
83
|
+
- `AbdbRepository` wraps the collection and provides the full CRUD interface (`save`, `find`, `findById`, `deleteById`, `insert`, `update`, `delete` with pagination and sorting).
|
|
84
|
+
- Never recommend one without the other. When describing a persistence requirement, always say: "Define the schema with `AbdbCollection`, then use `AbdbRepository` for all read/write operations."
|
|
85
|
+
|
|
86
|
+
### Custom Libraries
|
|
87
|
+
|
|
88
|
+
Two custom libraries are available for App Builder development on this project. When describing implementation targets in the Summary, always reference the specific class or component from these libraries rather than generic Adobe SDK names.
|
|
89
|
+
|
|
90
|
+
**`@adobe-commerce/aio-toolkit`** (backend — TypeScript, Node.js actions)
|
|
91
|
+
NPM: https://www.npmjs.com/package/@adobe-commerce/aio-toolkit
|
|
92
|
+
|
|
93
|
+
| Class / Component | Purpose |
|
|
94
|
+
|---|---|
|
|
95
|
+
| `RuntimeAction` | HTTP-triggered I/O Runtime action — handles inbound REST requests |
|
|
96
|
+
| `EventConsumerAction` | I/O Event-triggered action — processes Adobe I/O Events from Commerce |
|
|
97
|
+
| `WebhookAction` | Commerce Webhook-triggered action — with built-in signature verification |
|
|
98
|
+
| `PublishEvent` | Publishes events to Adobe I/O Event Bus (CloudEvents format) |
|
|
99
|
+
| `GraphQlAction` | Runs a GraphQL server inside an I/O Runtime action |
|
|
100
|
+
| `OpenWhisk` / `OpenWhiskAction` | Invokes other Runtime actions from within an action |
|
|
101
|
+
| `AdobeCommerceClient` | HTTP client for Commerce REST API — supports OAuth 1.0a and IMS auth |
|
|
102
|
+
| `AdobeAuth` | Adobe IMS token generation (OAuth 2.0 service-to-service) |
|
|
103
|
+
| `BearerToken` | Token introspection and validation |
|
|
104
|
+
| `FileRepository` | File-based persistence using Adobe I/O Files |
|
|
105
|
+
| `AbdbCollection` + `AbdbRepository` | Typed schema + CRUD persistence using Adobe App Builder Database (ABDB) |
|
|
106
|
+
| `RuntimeApiGatewayService` | Calls other Runtime actions via the API Gateway |
|
|
107
|
+
| `Telemetry` | OpenTelemetry + New Relic observability, auto-integrated in all action classes |
|
|
108
|
+
|
|
109
|
+
**`@adobe-commerce/aio-experience-kit`** (frontend — React, Admin UI extensions)
|
|
110
|
+
NPM: https://www.npmjs.com/package/@adobe-commerce/aio-experience-kit
|
|
111
|
+
|
|
112
|
+
| Class / Component | Purpose |
|
|
113
|
+
|---|---|
|
|
114
|
+
| `MainContainer` | App layout with navigation, routing, and responsive design |
|
|
115
|
+
| `DataTable` | Admin grid — sortable columns, row/bulk actions, search, virtual scroll |
|
|
116
|
+
| `DataForm` | Dynamic form builder — field types: TEXT, EMAIL, NUMBER, SELECT, MULTISELECT, TOGGLE, LABEL; conditional field visibility via `dependsOn` |
|
|
117
|
+
|
|
118
|
+
### Commerce → App Builder Component Mapping
|
|
119
|
+
|
|
120
|
+
| Commerce Module Component | App Builder Equivalent | Library Class | Documentation |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| Inbound call from Commerce (webhook) | Commerce Webhook → `WebhookAction` (**never** a raw Runtime URL) | `WebhookAction` (signature verification built-in) | https://developer.adobe.com/commerce/extensibility/webhooks/ |
|
|
123
|
+
| Inbound call from third-party system | Web API layer → `RuntimeAction` (**never** expose raw Runtime URL; create Commerce webapi.xml endpoint, API Mesh route, or App Builder web API route as the public contract) | `RuntimeAction` behind API layer | https://developer.adobe.com/runtime/docs/ |
|
|
124
|
+
| Commerce REST API calls from App Builder | Commerce REST client | `AdobeCommerceClient` | https://developer.adobe.com/commerce/webapi/rest/ |
|
|
125
|
+
| GraphQL schema (queries + mutations) | GraphQL Runtime action | `GraphQlAction` | https://developer.adobe.com/graphql-mesh-gateway/ |
|
|
126
|
+
| `etc/io_events.xml` registered events | I/O Event-triggered action | `EventConsumerAction` | https://developer.adobe.com/commerce/extensibility/events/ |
|
|
127
|
+
| RabbitMQ consumer | I/O Event-triggered action | `EventConsumerAction` | https://developer.adobe.com/commerce/extensibility/starter-kit/ |
|
|
128
|
+
| Publishing events to external systems | I/O Events publisher | `PublishEvent` | https://developer.adobe.com/commerce/extensibility/events/ |
|
|
129
|
+
| Admin grids | Admin UI extension grid screen | `DataTable` + `MainContainer` | https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/ |
|
|
130
|
+
| Admin forms | Admin UI extension form screen | `DataForm` + `MainContainer` | https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/ |
|
|
131
|
+
| Admin menu entries | Admin UI extension menu | `MainContainer` (navigation config) | https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/ |
|
|
132
|
+
| Admin configuration (`system.xml`) | App Builder configuration panel | `DataForm` (config screen) | https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/ |
|
|
133
|
+
| Cron jobs | Scheduled Runtime action (alarms) | `RuntimeAction` | https://developer.adobe.com/runtime/docs/guides/using/creating_actions/ |
|
|
134
|
+
| Custom shipping method / carrier | App Builder Shipping Integration | `RuntimeAction` | https://developer.adobe.com/commerce/extensibility/ |
|
|
135
|
+
| Custom payment method | App Builder Payment Integration | `RuntimeAction` | https://developer.adobe.com/commerce/extensibility/ |
|
|
136
|
+
| Email templates | Transactional email Runtime action | `RuntimeAction` + email provider | https://developer.adobe.com/runtime/docs/ |
|
|
137
|
+
| Persistent data storage | App Builder Database — define schema with `AbdbCollection`, perform all CRUD with `AbdbRepository` (always use both together) | `AbdbCollection` + `AbdbRepository` | https://developer.adobe.com/runtime/docs/ |
|
|
138
|
+
| File-based storage | I/O Files storage | `FileRepository` | https://developer.adobe.com/runtime/docs/ |
|
|
139
|
+
| Import / Export (CSV processing) | Scheduled or file-triggered action | `RuntimeAction` + `FileRepository` | https://developer.adobe.com/runtime/docs/ |
|
|
140
|
+
| Outbound HTTP to external APIs | Node.js HTTP calls within action | `RuntimeAction` (node-fetch/axios) | https://developer.adobe.com/runtime/docs/ |
|
|
141
|
+
| Adobe IMS authentication | IMS token generation | `AdobeAuth` | https://developer.adobe.com/developer-console/docs/guides/authentication/ |
|
|
142
|
+
| Action-to-action invocation | OpenWhisk invocation | `OpenWhisk` / `OpenWhiskAction` | https://developer.adobe.com/runtime/docs/ |
|
|
143
|
+
|
|
144
|
+
**Starter Kits** — If the module's business logic matches a common sync pattern (order, shipment, product, customer, inventory), note the Starter Kit:
|
|
145
|
+
- https://developer.adobe.com/commerce/extensibility/starter-kit/
|
|
146
|
+
- https://developer.adobe.com/commerce/extensibility/starter-kit/create-app/
|
|
147
|
+
|
|
148
|
+
**General extensibility overview**: https://developer.adobe.com/commerce/extensibility/
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Phase 2 — Module Analysis
|
|
153
|
+
|
|
154
|
+
Read and analyze each config file flagged as present. **Skip any section whose config files do not exist.** Collect all findings before Phase 3.
|
|
155
|
+
|
|
156
|
+
### Overview
|
|
157
|
+
Synthesize from `etc/module.xml`, `composer.json`, and README if present. Include:
|
|
158
|
+
- Module purpose in plain language
|
|
159
|
+
- Platform and PHP version requirements
|
|
160
|
+
- **Write the key capabilities enumeration last**, after all other sections have been analyzed, so the counts are accurate (e.g. "Provides 2 REST endpoints, 3 cron jobs, 1 RabbitMQ topic, 5 admin config groups"). Do not estimate or guess counts upfront.
|
|
161
|
+
|
|
162
|
+
### Architecture Summary
|
|
163
|
+
Build an ASCII flow diagram covering all entry points and processing paths:
|
|
164
|
+
- Entry points: REST webhooks, CSV import, cron triggers, queue consumers
|
|
165
|
+
- Processing stages: queue publishing, persistence, eligibility evaluation, external API calls
|
|
166
|
+
- Outputs: database writes, external API responses, reporting events
|
|
167
|
+
- Label components by role (e.g. "Webhook Handler", "Eligibility Engine", "Retry Processor") — no PHP class names
|
|
168
|
+
|
|
169
|
+
### External Dependencies
|
|
170
|
+
Scan all PHP files not excluded by the Business Logic rules for outbound HTTP calls, external service clients, and injected dependencies. Also read `etc/module.xml` `<sequence>` for internal module dependencies and `composer.json` `require` block for third-party libraries. Document:
|
|
171
|
+
|
|
172
|
+
**External APIs** — for each outbound HTTP integration found:
|
|
173
|
+
- Service name and plain-English role (e.g. "Recurly — subscription billing platform")
|
|
174
|
+
- Authentication mechanism: describe the token type (OAuth2, API key, Basic Auth, Bearer token) and how it is obtained
|
|
175
|
+
- Request headers required: list the header names and where their values come from (e.g. "Authorization: Bearer token fetched from {Admin config path}", "Content-Type: application/json")
|
|
176
|
+
- Base URL source: Admin config path or hardcoded value
|
|
177
|
+
- Any connection or timeout configuration
|
|
178
|
+
|
|
179
|
+
**Message Queue Infrastructure** — broker type (RabbitMQ / Amazon MQ), how the connection is configured, what topics this module interacts with (cross-reference with the RabbitMQ section)
|
|
180
|
+
|
|
181
|
+
**Internal Platform Modules** — for each `<sequence>` entry and any other `Vendor_Module` dependency found injected in constructors:
|
|
182
|
+
- Module name and what capability it provides to this module (e.g. "Dish_Recurly — provides the Recurly API client and credential management")
|
|
183
|
+
- Only include modules that provide a service or data this module actively uses; skip purely structural dependencies
|
|
184
|
+
|
|
185
|
+
**Third-Party Libraries** — from `composer.json` `require`, excluding `magento/*`, `php`, and `ext-*` entries:
|
|
186
|
+
- Library name (e.g. `guzzlehttp/guzzle`), version constraint, and plain-English purpose
|
|
187
|
+
|
|
188
|
+
### Database Schema (`etc/db_schema.xml`)
|
|
189
|
+
For each table:
|
|
190
|
+
- Table name and plain-English purpose
|
|
191
|
+
- Columns table: `Column | Type | Nullable | Default | Description`
|
|
192
|
+
- Indexes and foreign keys
|
|
193
|
+
|
|
194
|
+
### REST API Endpoint (`etc/webapi.xml`)
|
|
195
|
+
Read `etc/webapi.xml`. For each `<route>`:
|
|
196
|
+
|
|
197
|
+
1. Note the HTTP method, URL path, and authentication type (`token` / `session` / `anonymous`)
|
|
198
|
+
2. Follow the `<service class="..." method="..."/>` reference:
|
|
199
|
+
- Derive the PHP file path from the class name and read the service interface file
|
|
200
|
+
- Read the `@param` annotations on the method:
|
|
201
|
+
- For scalar parameters (`string`, `int`, `bool`, `float`): these map directly to request body fields
|
|
202
|
+
- For Data interface parameters (e.g. `SomeDataInterface`): derive the file path and read it — document each getter method as a request field (strip `get` prefix, convert to snake_case)
|
|
203
|
+
- Read the `@return` annotation:
|
|
204
|
+
- For a scalar or `void` return: document the response as a plain value
|
|
205
|
+
- For a Data interface: derive the file path and read it — document each getter as a response field
|
|
206
|
+
- For arrays of Data interfaces (`SomeDataInterface[]`): document as an array of the above
|
|
207
|
+
|
|
208
|
+
3. For each endpoint document:
|
|
209
|
+
- **Method & URL**: HTTP method and full path
|
|
210
|
+
- **Auth**: authentication type required
|
|
211
|
+
- **Description**: plain-English explanation of what the endpoint does
|
|
212
|
+
- **Request Body** (if applicable): field table `Field | Type | Required | Description` + a JSON sample block with realistic values
|
|
213
|
+
- **Response**: field table `Field | Type | Description` + a JSON sample block with realistic values
|
|
214
|
+
- If the method takes no parameters and returns `mixed` or a raw value, document what the endpoint reads from context (e.g. session, JWT token, request headers) and what it returns
|
|
215
|
+
|
|
216
|
+
- **Source Files:** `etc/webapi.xml`, service interface PHP file, any referenced Data interface PHP files
|
|
217
|
+
|
|
218
|
+
### RabbitMQ Message Queue Architecture
|
|
219
|
+
Read all four queue config files. For each topic:
|
|
220
|
+
|
|
221
|
+
**Published Events:**
|
|
222
|
+
- Event name, trigger description (what causes it to be published)
|
|
223
|
+
- Full JSON payload block with realistic sample values
|
|
224
|
+
- Payload field table: `Field | Type | Description`
|
|
225
|
+
|
|
226
|
+
**Consumed Events:**
|
|
227
|
+
- Event name, consumer description (what processing logic it executes)
|
|
228
|
+
- Full JSON payload block
|
|
229
|
+
- Payload field table: `Field | Type | Description`
|
|
230
|
+
|
|
231
|
+
**Source Files:** `etc/communication.xml`, `etc/queue_topology.xml`, `etc/queue_publisher.xml`, `etc/queue_consumer.xml`
|
|
232
|
+
|
|
233
|
+
### Admin Configuration (`etc/adminhtml/system.xml` + `etc/config.xml`)
|
|
234
|
+
For each Section → Group → Field hierarchy:
|
|
235
|
+
- Section: code and display label
|
|
236
|
+
- Group: code and display label
|
|
237
|
+
- Fields table: `Code | Type | Label | Description | Default`
|
|
238
|
+
- For `select` / `multiselect`: if static, list all option values; if dynamic, describe the data source in plain language
|
|
239
|
+
- For `text` with a backend model: describe what validation/transformation is applied (e.g. "Saved as a cron expression")
|
|
240
|
+
- For dynamic grid fields: document each column (code, label, type, data source)
|
|
241
|
+
- Include a **Default Values** subsection from `etc/config.xml`
|
|
242
|
+
- **Source Files:** `etc/adminhtml/system.xml`, `etc/config.xml`
|
|
243
|
+
|
|
244
|
+
### Cron Jobs (`etc/crontab.xml`)
|
|
245
|
+
For each job:
|
|
246
|
+
- Job name, cron group, schedule expression (and how it is configured — hardcoded or via Admin config path)
|
|
247
|
+
- Plain-English description of what the job does
|
|
248
|
+
- **Source Files:** `etc/crontab.xml`
|
|
249
|
+
|
|
250
|
+
### Cache System (`etc/cache.xml`)
|
|
251
|
+
For each cache type:
|
|
252
|
+
- Cache identifier, label, description
|
|
253
|
+
- What data it stores, what invalidates it, what reads from it
|
|
254
|
+
- **Source Files:** `etc/cache.xml`
|
|
255
|
+
|
|
256
|
+
### Import / Export
|
|
257
|
+
Read all present import/export config files (`etc/import.xml`, `etc/export.xml`). For each entity:
|
|
258
|
+
- Entity type and registered behavior (import / export)
|
|
259
|
+
- CSV column mapping table: `CSV Column | Field | Description`
|
|
260
|
+
- Workflow: pre-processing steps, post-import file handling, error handling
|
|
261
|
+
- **Source Files:** relevant XML files present
|
|
262
|
+
|
|
263
|
+
### Extension Attributes (`etc/extension_attributes.xml`)
|
|
264
|
+
Read `etc/extension_attributes.xml`. For each `<extension_attributes for="...">` block:
|
|
265
|
+
- **Extended Entity**: the core Magento entity being extended (e.g. Customer, Customer Group, Order, Quote, Product) — describe it by its plain name, not its interface class
|
|
266
|
+
- Attributes table: `Attribute Code | Type | Description`
|
|
267
|
+
- Attribute Code: the field name as it appears in REST API responses and requests
|
|
268
|
+
- Type: data type (int, string, text, bool, etc.)
|
|
269
|
+
- Description: plain-English explanation of what this field represents and how it is used by the module
|
|
270
|
+
- Note that these attributes are automatically included in REST API responses for the extended entity — any integration consuming that entity via API will see these fields
|
|
271
|
+
- **Source Files:** `etc/extension_attributes.xml`
|
|
272
|
+
|
|
273
|
+
### Adobe I/O Events (`etc/io_events.xml`)
|
|
274
|
+
Read `etc/io_events.xml`. For each registered `<event>`:
|
|
275
|
+
|
|
276
|
+
- **Event Name**: the unique identifier published to the Adobe I/O Event Bus — this is what App Builder subscribes to
|
|
277
|
+
- **Parent Commerce Event**: the underlying Commerce observer event that triggers this I/O event
|
|
278
|
+
- **Destination**: the I/O event channel/topic the event is routed to
|
|
279
|
+
- **Description**: plain-English explanation of when this event fires and what business action caused it
|
|
280
|
+
|
|
281
|
+
Produce a summary table: `Event Name | Parent Commerce Event | Destination | Description`
|
|
282
|
+
|
|
283
|
+
Then for each event, produce a **JSON sample payload block** using the `<field name="..."/>` entries — construct a realistic JSON object with the exact field names and plausible sample values that an App Builder action handler would receive. Follow with a field table:
|
|
284
|
+
- `Field | Type | Description`
|
|
285
|
+
- Derive the type from the field name and parent event context (e.g. `id` → integer, `sku` → string, `price` → float)
|
|
286
|
+
- Describe what each field represents and how an App Builder action should use it
|
|
287
|
+
|
|
288
|
+
Note: these events are the primary integration points for App Builder — any App Builder action subscribing to Commerce events will use these event names and receive these exact fields in this payload shape.
|
|
289
|
+
|
|
290
|
+
- **Source Files:** `etc/io_events.xml`
|
|
291
|
+
|
|
292
|
+
### Async / Bulk REST API (`etc/webapi_async.xml`)
|
|
293
|
+
Read `etc/webapi_async.xml`. For each registered `<route>`:
|
|
294
|
+
- Table: `Async URL | Method | Maps To (Sync Endpoint) | Description`
|
|
295
|
+
- Async URL: the bulk/async endpoint URL (prefixed with `async/bulk/`)
|
|
296
|
+
- Method: HTTP method (PUT, POST, DELETE)
|
|
297
|
+
- Maps To: the original synchronous REST endpoint this async route wraps
|
|
298
|
+
- Description: plain-English explanation of what the async operation does — it accepts an array of items, queues them for background processing, and returns a request ID for status polling
|
|
299
|
+
- **Source Files:** `etc/webapi_async.xml`
|
|
300
|
+
|
|
301
|
+
### Email Templates (`etc/email_templates.xml`)
|
|
302
|
+
Read `etc/email_templates.xml`. For each registered template:
|
|
303
|
+
- Table: `Template ID | Label | Type | Area | Purpose`
|
|
304
|
+
- Template ID: the unique identifier used to dispatch this email programmatically
|
|
305
|
+
- Label: the human-readable name as it appears in Admin
|
|
306
|
+
- Type: html or text
|
|
307
|
+
- Area: frontend or adminhtml
|
|
308
|
+
- Purpose: read the corresponding template file from `view/{area}/email/{file}` and describe in plain language what the email communicates, when it is sent, and who receives it
|
|
309
|
+
- **Source Files:** `etc/email_templates.xml`, `view/{area}/email/` template files
|
|
310
|
+
|
|
311
|
+
### Payment Method (`etc/payment.xml`)
|
|
312
|
+
Read `etc/payment.xml` only if it exists. First determine whether the module introduces a **new custom payment method**:
|
|
313
|
+
- A new payment method is indicated by a `<method name="...">` entry whose name does not match any standard Magento core payment method (e.g. `free`, `checkmo`, `banktransfer`, `cashondelivery`, `purchaseorder`)
|
|
314
|
+
- If no new payment method is declared (only groups or settings for existing methods), **skip this section entirely**
|
|
315
|
+
|
|
316
|
+
If a new custom payment method is confirmed, document:
|
|
317
|
+
- **Method Code**: the `name` attribute value used to identify the method programmatically
|
|
318
|
+
- **Payment Group**: which `<group>` it belongs to and the group label
|
|
319
|
+
- **Settings**: any flags configured in `<method>` (e.g. `allow_multiple_address`)
|
|
320
|
+
- **Implementation**: locate the payment model by tracing the `di.xml` preference or type configuration for this method code, read the implementation file, and describe in plain language:
|
|
321
|
+
- What payment provider or system it integrates with
|
|
322
|
+
- How authorization and capture work
|
|
323
|
+
- Any refund, void, or order management capabilities
|
|
324
|
+
- What data it sends to or receives from the payment provider
|
|
325
|
+
- **Source Files:** `etc/payment.xml`
|
|
326
|
+
|
|
327
|
+
### GraphQL Schema (`etc/schema.graphqls`)
|
|
328
|
+
Read `etc/schema.graphqls` for the API surface. For each query, mutation, or field that carries a `@resolver(class: "...")` directive, derive the PHP file path from the class name (convert namespace separators to directory separators, append `.php`) and read that file to understand the implementation. Document both together for each operation.
|
|
329
|
+
|
|
330
|
+
**Queries** — for each entry in `type Query { ... }`:
|
|
331
|
+
- Table: `Query Name | Parameters | Return Type | Cached? | Description`
|
|
332
|
+
- Parameters: list each argument name, type, and its `@doc` description
|
|
333
|
+
- Cached?: yes if `@cache` directive is present, no otherwise
|
|
334
|
+
- **Resolver Logic**: plain-English description of what the resolver does — what data sources it reads from, what filters or conditions it applies, what transformations it performs, and what it returns. No class names.
|
|
335
|
+
|
|
336
|
+
**Mutations** — for each entry in `type Mutation { ... }`:
|
|
337
|
+
- Table: `Mutation Name | Input Type | Output Type | Description`
|
|
338
|
+
- **Resolver Logic**: plain-English description of what the mutation does — what it validates, what it writes or updates, what side effects it triggers, and what it returns. No class names.
|
|
339
|
+
|
|
340
|
+
**Input Types** — for each `input SomethingInput { ... }`:
|
|
341
|
+
- Table: `Field | Type | Required | Description`
|
|
342
|
+
|
|
343
|
+
**Output / Response Types** — for each `type SomethingOutput { ... }` or custom response type:
|
|
344
|
+
- Table: `Field | Type | Description`
|
|
345
|
+
|
|
346
|
+
**Type Extensions** — for any `type ExistingCoreType { ... }` that extends a Magento core type (e.g. `Cart`, `Customer`) with new fields:
|
|
347
|
+
- Note which core type is extended, what new fields are added with their descriptions, and for each field that has a `@resolver` directive, read that resolver file and describe what data it provides
|
|
348
|
+
|
|
349
|
+
**Source Files:** `etc/schema.graphqls`, resolver PHP files derived from `@resolver(class: "...")` annotations in the schema
|
|
350
|
+
|
|
351
|
+
### Events / Observers
|
|
352
|
+
Check for and read all area-scoped `events.xml` files that exist:
|
|
353
|
+
- `etc/events.xml` — Global (applies in all areas)
|
|
354
|
+
- `etc/adminhtml/events.xml` — Admin area only
|
|
355
|
+
- `etc/frontend/events.xml` — Frontend area only
|
|
356
|
+
- `etc/graphql/events.xml` — GraphQL area only
|
|
357
|
+
- `etc/webapi_rest/events.xml` — REST API area only
|
|
358
|
+
- `etc/webapi_soap/events.xml` — SOAP API area only
|
|
359
|
+
- `etc/crontab/events.xml` — Cron area only
|
|
360
|
+
|
|
361
|
+
For each file that exists, group findings under its area scope heading. Within each area, produce an events table:
|
|
362
|
+
- `Event Name | Observer Name | Description`
|
|
363
|
+
- Event Name: the Magento/custom event being listened to
|
|
364
|
+
- Observer Name: a short identifier (not a class name) describing the observer's role
|
|
365
|
+
- Description: plain-English explanation of what the observer does when the event fires, what data it reads from the event, and any side effects it produces
|
|
366
|
+
|
|
367
|
+
**Source Files:** all `events.xml` files present across areas
|
|
368
|
+
|
|
369
|
+
### Dependency Injection
|
|
370
|
+
Check for and read all area-scoped `di.xml` files that exist:
|
|
371
|
+
- `etc/di.xml` — Global (applies in all areas)
|
|
372
|
+
- `etc/adminhtml/di.xml` — Admin area only
|
|
373
|
+
- `etc/frontend/di.xml` — Frontend area only
|
|
374
|
+
- `etc/graphql/di.xml` — GraphQL area only
|
|
375
|
+
- `etc/webapi_rest/di.xml` — REST API area only
|
|
376
|
+
- `etc/webapi_soap/di.xml` — SOAP API area only
|
|
377
|
+
- `etc/crontab/di.xml` — Cron area only
|
|
378
|
+
|
|
379
|
+
For each file that exists, group findings under its area scope heading. Within each area document:
|
|
380
|
+
|
|
381
|
+
**Preferences** — only non-data, non-collection interface overrides:
|
|
382
|
+
- Table: `Component Overridden | Custom Behavior` (plain language, no class names)
|
|
383
|
+
- Skip: data model interfaces, collection interfaces
|
|
384
|
+
|
|
385
|
+
**Plugins** — list all defined plugins:
|
|
386
|
+
- Table: `Intercepted Component | Type (before/after/around) | What It Does`
|
|
387
|
+
- Describe behavior in plain language
|
|
388
|
+
|
|
389
|
+
If a preference or plugin is identical across multiple areas, note it once under Global and reference it in the area-specific section rather than duplicating.
|
|
390
|
+
|
|
391
|
+
**Source Files:** all `di.xml` files present across areas
|
|
392
|
+
|
|
393
|
+
### Business Logic
|
|
394
|
+
Scan **all PHP files in the module root** except those in the following excluded directories and matching the following excluded file patterns.
|
|
395
|
+
|
|
396
|
+
**Excluded directories — do not read:**
|
|
397
|
+
- `Setup/` (incl. `Setup/Patch/`, `Setup/Declaration/`, `Setup/Operation/`, `Setup/Converters/`, `Setup/data/`) — one-time database schema and data migration scripts
|
|
398
|
+
- `Test/` and `Tests/` — unit, integration, MFTF, and performance tests
|
|
399
|
+
- `view/` — templates, layouts, UI components, JavaScript, CSS
|
|
400
|
+
- `etc/` — XML configuration (already covered by dedicated sections)
|
|
401
|
+
- `i18n/` — translation CSV files
|
|
402
|
+
- `docs/` — documentation only
|
|
403
|
+
|
|
404
|
+
**Excluded file patterns — skip even if inside an otherwise included directory:**
|
|
405
|
+
- `Model/ResourceModel/**` — low-level database read/write layer
|
|
406
|
+
- `Model/Data/**` — plain data transfer objects with no logic
|
|
407
|
+
- `Api/Data/**` — service interface data objects (contracts only)
|
|
408
|
+
- `**/*Collection.php` — database collection query classes
|
|
409
|
+
- `**/*Repository.php` — CRUD wrappers with no business rules
|
|
410
|
+
- `**/*Interface.php` — interface contracts only, no implementation
|
|
411
|
+
|
|
412
|
+
Everything else is considered business logic — including but not limited to files found in: `Model/`, `Helper/`, `Http/`, `Plugin/`, `Observer/`, `Controller/`, `Console/`, `Service/`, `Cron/`, `Block/`, `Gateway/`, `Resolver/`, `ViewModel/`, `Pricing/`, `Amqp/`, `GraphQl/`, `DataProvider/`, `Ui/DataProvider/`, `Logger/`, `Export/`, `Import/`, `Indexer/`, `Event/`, `Mapper/`, `Queue/`, `Query/`, `Dto/`, and any other custom directory present in the module root.
|
|
413
|
+
|
|
414
|
+
Write everything as **descriptive prose only** — no PHP class names, method signatures, `::`, or `->` references. Organize by logical area (e.g. "Webhook Ingestion", "Eligibility Engine", "Retry Handling", "External API Integration", "Helper Utilities"). For each area describe:
|
|
415
|
+
- What it does and why
|
|
416
|
+
- What inputs it operates on
|
|
417
|
+
- What decisions or transformations it makes
|
|
418
|
+
- What outputs or side effects it produces
|
|
419
|
+
- How it interacts with other components
|
|
420
|
+
|
|
421
|
+
### Additional Configuration
|
|
422
|
+
After completing the standard inventory above, glob `etc/` (including all area sub-directories: `adminhtml/`, `frontend/`, `graphql/`, `webapi_rest/`, `webapi_soap/`, `crontab/`) for any `*.xml` or `*.graphqls` files that were **not already covered** by the sections above.
|
|
423
|
+
|
|
424
|
+
For each uncovered file found:
|
|
425
|
+
- Read the file to understand its purpose
|
|
426
|
+
- Document under a sub-heading using the filename as the title (e.g. `#### etc/firebear_import.xml`)
|
|
427
|
+
- Describe in plain language what the configuration registers or declares
|
|
428
|
+
- Include a summary table of the key entries using whatever structure fits the file (e.g. `Entity | Type | Description`, or `Key | Value | Description`)
|
|
429
|
+
- Note the framework or system that consumes this file (e.g. "Consumed by the Firebear ImportExport module", "Consumed by the Magento_Sales module")
|
|
430
|
+
- **Source Files:** the file path
|
|
431
|
+
|
|
432
|
+
If no uncovered files are found, skip this section entirely.
|
|
433
|
+
|
|
434
|
+
### End-to-End Processing Flow
|
|
435
|
+
After all sections are complete, create ASCII/text flow diagrams for **every distinct processing flow** in the module. For each flow:
|
|
436
|
+
- Name the flow (e.g. "Webhook Ingestion Flow", "CSV Ingestion Flow", "Price Change Processing Flow")
|
|
437
|
+
- Show: trigger → processing steps → decision points → external calls → outputs
|
|
438
|
+
- Label each step by role (e.g. "Webhook Handler", "Queue Publisher", "Eligibility Engine") — no class names
|
|
439
|
+
|
|
440
|
+
### Summary
|
|
441
|
+
Write a final summary structured as an **App Builder Integration Reference**. Use the **App Builder Reference Mapping** table defined above to cite the correct SDK/service name and include the documentation link for every implementation target. Include the following subsections:
|
|
442
|
+
|
|
443
|
+
**Module Purpose** — two to three sentences describing what the module does and why it exists.
|
|
444
|
+
|
|
445
|
+
**App Builder Implementation Targets** — identify every component this module provides that needs to be re-implemented in App Builder. For each target, name the component, describe what needs to be built, state the SDK/service to use (from the mapping table), and include the documentation link:
|
|
446
|
+
|
|
447
|
+
- **Admin UI** *(if the module has `view/adminhtml/ui_component/` grids or forms, or `etc/adminhtml/menu.xml`)*:
|
|
448
|
+
- List each grid: entity name, columns, row actions, bulk actions, search capability
|
|
449
|
+
- List each form: entity name, field groups, field types, conditional visibility rules
|
|
450
|
+
- List each menu entry: label, position, linked route
|
|
451
|
+
- **Library**: `@adobe-commerce/aio-experience-kit` — `DataTable` (grids) + `DataForm` (forms) + `MainContainer` (navigation/routing)
|
|
452
|
+
- **Docs**: https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/ | https://www.npmjs.com/package/@adobe-commerce/aio-experience-kit
|
|
453
|
+
|
|
454
|
+
- **Admin Configuration** *(if the module has `etc/adminhtml/system.xml`)*:
|
|
455
|
+
- List each configuration section and group, all fields with types and defaults (reference Admin Configuration section)
|
|
456
|
+
- **Library**: `@adobe-commerce/aio-experience-kit` — `DataForm` (config screen with `use_env_var` flag for credential fields)
|
|
457
|
+
- Backend storage: `@adobe-commerce/aio-toolkit` — `AbdbRepository` or `FileRepository`
|
|
458
|
+
- **Docs**: https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/ | https://www.npmjs.com/package/@adobe-commerce/aio-experience-kit
|
|
459
|
+
|
|
460
|
+
- **GraphQL Server** *(if the module has `etc/schema.graphqls`)*:
|
|
461
|
+
- List each query and mutation to re-expose, with resolver logic (reference GraphQL Schema section)
|
|
462
|
+
- **Library**: `@adobe-commerce/aio-toolkit` — `GraphQlAction` (define schema string + async resolver functions)
|
|
463
|
+
- **Docs**: https://developer.adobe.com/graphql-mesh-gateway/ | https://www.npmjs.com/package/@adobe-commerce/aio-toolkit
|
|
464
|
+
|
|
465
|
+
- **Custom Shipping Method** *(if the module declares a shipping carrier via `di.xml` or `etc/config.xml` carrier config)*:
|
|
466
|
+
- Carrier name, rate calculation logic, required input data (origin, destination, cart contents)
|
|
467
|
+
- **Library**: `@adobe-commerce/aio-toolkit` — `RuntimeAction` (rate calculator endpoint) + `WebhookAction` (if Commerce calls it via webhook)
|
|
468
|
+
- **Docs**: https://developer.adobe.com/commerce/extensibility/ | https://www.npmjs.com/package/@adobe-commerce/aio-toolkit
|
|
469
|
+
|
|
470
|
+
- **Backend Actions / Event Handlers** — for each App Builder action needed:
|
|
471
|
+
- Action name, trigger type, logic summary, input/output payloads
|
|
472
|
+
- **Commerce Webhook-triggered**: use **`WebhookAction`** (signature verification built-in). Register the webhook in Commerce pointing to this action — do not expose the raw Runtime URL to Commerce directly. — https://developer.adobe.com/commerce/extensibility/webhooks/
|
|
473
|
+
- **I/O Event-triggered** (io_events.xml / RabbitMQ): **`EventConsumerAction`** — https://developer.adobe.com/commerce/extensibility/events/
|
|
474
|
+
- **Third-party inbound call**: create a Commerce REST API endpoint (`webapi.xml`) or API Mesh route as the public contract; the handler behind it is a **`RuntimeAction`** — never give third parties the raw Runtime URL — https://developer.adobe.com/runtime/docs/
|
|
475
|
+
- **Scheduled** (cron replacement): **`RuntimeAction`** with I/O Runtime alarms
|
|
476
|
+
- **Event publishing**: **`PublishEvent`** — https://developer.adobe.com/commerce/extensibility/events/
|
|
477
|
+
- If pattern matches Starter Kit: note — https://developer.adobe.com/commerce/extensibility/starter-kit/
|
|
478
|
+
- **Library**: `@adobe-commerce/aio-toolkit` — https://www.npmjs.com/package/@adobe-commerce/aio-toolkit
|
|
479
|
+
|
|
480
|
+
- **Commerce API Calls** *(for any action that reads or writes Commerce data)*:
|
|
481
|
+
- Endpoints called, auth method (OAuth 1.0a or IMS), data exchanged
|
|
482
|
+
- **Library**: `@adobe-commerce/aio-toolkit` — `AdobeCommerceClient` with `Oauth1aConnection` or `ImsConnection`
|
|
483
|
+
|
|
484
|
+
- **Outbound Service Integrations** *(for each non-Commerce external API)*:
|
|
485
|
+
- Service name, auth mechanism, endpoints called, data exchanged (reference External Dependencies section)
|
|
486
|
+
- **Library**: `@adobe-commerce/aio-toolkit` — `RuntimeAction` with node-fetch/axios; `AdobeAuth` for IMS-authenticated services
|
|
487
|
+
|
|
488
|
+
- **Data Persistence** *(if the module stores state that App Builder must also persist)*:
|
|
489
|
+
- Describe what data must be persisted and its access patterns (CRUD, search, pagination)
|
|
490
|
+
- Structured data: always use **`AbdbCollection`** (schema definition) together with **`AbdbRepository`** (CRUD operations — `save`, `find`, `findById`, `deleteById`, bulk ops, pagination). Never recommend one without the other.
|
|
491
|
+
- File/blob data: **`FileRepository`** (Adobe I/O Files)
|
|
492
|
+
- **Library**: `@adobe-commerce/aio-toolkit` — https://www.npmjs.com/package/@adobe-commerce/aio-toolkit
|
|
493
|
+
|
|
494
|
+
**Key Business Rules** — bullet list of the critical decision points the App Builder implementation must replicate (e.g. eligibility checks, retry limits, state transitions, error handling).
|
|
495
|
+
|
|
496
|
+
**Data Contracts** — list the core data structures the App Builder actions will send or receive (reference the field tables in REST API, RabbitMQ, I/O Events, and Extension Attributes sections).
|
|
497
|
+
|
|
498
|
+
**Recommended Implementation Order** — recommended sequence for building the App Builder components, with dependencies noted (e.g. "Build configuration panel first, as action credentials depend on it").
|
|
499
|
+
|
|
500
|
+
**Known Constraints** — any Commerce-specific behaviors, timing dependencies, or edge cases an App Builder developer must be aware of.
|
|
501
|
+
|
|
502
|
+
**Further Reading** — close the Summary with these always-present links:
|
|
503
|
+
- Adobe Commerce Extensibility Overview: https://developer.adobe.com/commerce/extensibility/
|
|
504
|
+
- App Builder Overview: https://developer.adobe.com/app-builder/docs/overview/
|
|
505
|
+
- Commerce App Builder Starter Kit: https://developer.adobe.com/commerce/extensibility/starter-kit/
|
|
506
|
+
- `@adobe-commerce/aio-toolkit` (backend actions, Commerce client, persistence): https://www.npmjs.com/package/@adobe-commerce/aio-toolkit
|
|
507
|
+
- `@adobe-commerce/aio-experience-kit` (Admin UI grids, forms, navigation): https://www.npmjs.com/package/@adobe-commerce/aio-experience-kit
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Phase 3 — Developer Confirmation
|
|
512
|
+
|
|
513
|
+
Before generating the output file, present a structured key-findings summary and wait for confirmation:
|
|
514
|
+
|
|
515
|
+
```
|
|
516
|
+
## Analysis Complete — Ready to Generate Requirements Document
|
|
517
|
+
|
|
518
|
+
Module: {Vendor_Module}
|
|
519
|
+
Path: {module_path}
|
|
520
|
+
|
|
521
|
+
Discovered Sections:
|
|
522
|
+
[x] Overview
|
|
523
|
+
[x] Architecture Summary
|
|
524
|
+
[x] External Dependencies
|
|
525
|
+
[x/—] Database Schema — {n tables / not present}
|
|
526
|
+
[x/—] REST API Endpoint — {n endpoints / not present}
|
|
527
|
+
[x/—] RabbitMQ — {n topics published, n consumed / not present}
|
|
528
|
+
[x/—] Admin Configuration — {n fields across n groups / not present}
|
|
529
|
+
[x/—] Cron Jobs — {n jobs / not present}
|
|
530
|
+
[x/—] Cache System — {n cache types / not present}
|
|
531
|
+
[x/—] Import / Export — {n entities / not present}
|
|
532
|
+
[x/—] Extension Attributes — {n entities extended, n attributes total / not present}
|
|
533
|
+
[x/—] Adobe I/O Events — {n events registered / not present}
|
|
534
|
+
[x/—] Async REST API — {n async routes / not present}
|
|
535
|
+
[x/—] Email Templates — {n templates / not present}
|
|
536
|
+
[x/—] Payment Method — {method code / not a new payment method / not present}
|
|
537
|
+
[x/—] GraphQL Schema — {n queries, n mutations / not present}
|
|
538
|
+
[x/—] Events / Observers — {n observers across n events / not present}
|
|
539
|
+
[x/—] Dependency Injection — {n preferences, n plugins / not present}
|
|
540
|
+
[x/—] Additional Configuration — {list filenames found / none}
|
|
541
|
+
[x] Business Logic — {n PHP logic classes analyzed}
|
|
542
|
+
[x] End-to-End Processing Flow
|
|
543
|
+
[x] Summary
|
|
544
|
+
|
|
545
|
+
External Dependencies Identified:
|
|
546
|
+
- {list each by name and role}
|
|
547
|
+
|
|
548
|
+
Any sections to add, modify, or skip before I generate the document?
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Wait for developer confirmation or adjustments. Only proceed to Phase 4 after receiving approval.
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
## Phase 4 — Output Generation
|
|
556
|
+
|
|
557
|
+
1. Create `requirements/` directory at the Adobe Commerce project root if it does not exist.
|
|
558
|
+
2. Generate the file: `requirements/{Vendor}_{Module}.md`
|
|
559
|
+
3. Use this exact section order with sequential numbering:
|
|
560
|
+
1. Document header (Module name, Namespace, Version, Platform, PHP version, Authors)
|
|
561
|
+
2. Table of Contents
|
|
562
|
+
3. Overview
|
|
563
|
+
4. Architecture Summary
|
|
564
|
+
5. External Dependencies
|
|
565
|
+
6. Database Schema *(skip if not present)*
|
|
566
|
+
7. REST API Endpoint *(skip if not present)*
|
|
567
|
+
8. RabbitMQ Message Queue Architecture *(skip if not present)*
|
|
568
|
+
9. Admin Configuration *(skip if not present)*
|
|
569
|
+
10. Cron Jobs *(skip if not present)*
|
|
570
|
+
11. Cache System *(skip if not present)*
|
|
571
|
+
12. Import / Export *(skip if not present)*
|
|
572
|
+
13. Extension Attributes *(skip if not present)*
|
|
573
|
+
14. Adobe I/O Events *(skip if not present)*
|
|
574
|
+
15. Async / Bulk REST API *(skip if not present)*
|
|
575
|
+
16. Email Templates *(skip if not present)*
|
|
576
|
+
17. Payment Method *(skip if not present or no new payment method declared)*
|
|
577
|
+
18. GraphQL Schema *(skip if not present)*
|
|
578
|
+
19. Events / Observers *(skip if not present)*
|
|
579
|
+
20. Dependency Injection *(skip if not present)*
|
|
580
|
+
21. Additional Configuration *(skip if no uncovered config files found)*
|
|
581
|
+
22. Business Logic
|
|
582
|
+
23. End-to-End Processing Flow
|
|
583
|
+
24. Summary
|
|
584
|
+
4. Renumber sections in TOC and body to skip any omitted sections.
|
|
585
|
+
|
|
586
|
+
### Writing Style Rules
|
|
587
|
+
- **No PHP class names** in prose — replace with role names (e.g. "Eligibility Engine", "Webhook Handler")
|
|
588
|
+
- **No method signatures** or `::` / `->` references anywhere in prose
|
|
589
|
+
- **No framework-specific model/interface names** as prose subjects
|
|
590
|
+
- All external integrations described by role, not implementation detail
|
|
591
|
+
- RabbitMQ payloads: JSON block followed by field description table
|
|
592
|
+
- Admin config fields: always include Default column sourced from `etc/config.xml`
|
|
593
|
+
- Business Logic: pure prose organized by functional area
|
|
594
|
+
- Diagrams: ASCII/text format only
|
|
595
|
+
|
|
596
|
+
### Self-Review Checklist (complete before saving the file)
|
|
597
|
+
- [ ] Every config file that exists has a corresponding section (standard or Additional Configuration)
|
|
598
|
+
- [ ] REST API endpoints each have a Request Body field table + JSON sample and a Response field table + JSON sample
|
|
599
|
+
- [ ] Adobe I/O Events each have a JSON sample payload block + field table (in addition to the summary table)
|
|
600
|
+
- [ ] External Dependencies documents auth mechanism, required headers, and base URL source for every external API
|
|
601
|
+
- [ ] Events table includes Event Name, Observer Name, and plain-English Description
|
|
602
|
+
- [ ] TOC section numbers match document body numbers
|
|
603
|
+
- [ ] No PHP class names in any prose paragraph
|
|
604
|
+
- [ ] All RabbitMQ payloads have both JSON block and field table
|
|
605
|
+
- [ ] Admin Configuration has Default Values subsection
|
|
606
|
+
- [ ] Business Logic is pure prose, no method names
|
|
607
|
+
- [ ] End-to-End flows cover all processing paths in the module
|
|
608
|
+
- [ ] Summary contains App Builder Implementation Targets covering: Admin UI (grids/forms/menus), Admin Configuration, GraphQL Server, Custom Shipping Method, Backend Actions, and Outbound Integrations — each only if present in the module
|
|
609
|
+
- [ ] Summary includes Key Business Rules, Data Contracts, Recommended Implementation Order, and Known Constraints
|
|
610
|
+
- [ ] Output file is at `requirements/{Vendor}_{Module}.md`
|
|
611
|
+
|
|
612
|
+
After writing the file, confirm to the user: *"Requirements document generated at `requirements/{Vendor_Module}.md`."*
|