commerce-app-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSelf-review an App Builder app
App Builder应用自审查
Reviews a local app directory against Adobe's Commerce submission guidelines and walks through each finding interactively — MUST-have blockers first, then NICE-to-have recommendations.
针对Adobe Commerce提交指南审查本地应用目录,并交互式地引导用户排查每个问题——优先处理必须解决的阻塞问题,再给出建议优化项。
Inputs
输入参数
- (optional) — path to the app root. Defaults to the current working directory.
APP_PATH - (required) —
APP_TYPEordownloadable. A downloadable app allows merchants to download the source package; a non-downloadable app is installed directly from Adobe Exchange with one click.non-downloadable
- (可选)——应用根目录路径,默认值为当前工作目录。
APP_PATH - (必填)——
APP_TYPE或downloadable。可下载应用允许商家下载源码包;不可下载应用可直接从Adobe Exchange一键安装。non-downloadable
Procedure
流程步骤
1. Validate the path and app type
1. 验证路径与应用类型
If is not provided, use the current working directory. Confirm it exists and is a directory. If not, stop and report:
APP_PATHPath not found. Please provide the path to the root of your app codebase.
If is not provided, ask:
APP_TYPEIs this app downloadable or non-downloadable?
- Downloadable — merchants download the source package and deploy it themselves
- Non-downloadable — merchants install directly from Adobe Exchange with one click
Do not proceed until both are confirmed.
Check whether is installed (e.g. ). This is a presence check only — do not attempt to authenticate at this stage. If is not found, note it once:
aiocommand -v aioaioNote:isn't installed. Walkthrough enrichment (Step 8) will use fallback knowledge unlessaiois installed and authenticated before then.aio
Continue either way.
若未提供,则使用当前工作目录。确认该路径存在且为目录,若不存在则停止并报告:
APP_PATH路径未找到。请提供应用代码库的根目录路径。
若未提供,则询问:
APP_TYPE此应用是可下载还是不可下载类型?
- 可下载——商家下载源码包并自行部署
- 不可下载——商家直接从Adobe Exchange一键安装
需在确认两个参数后再继续。
检查是否已安装(例如执行)。仅检查是否存在,此阶段不尝试认证。若未找到,则仅提示一次:
aiocommand -v aioaio注意:未安装。除非在步骤8前安装并认证aio,否则排查增强环节(步骤8)将使用备用知识库。aio
无论是否安装,均继续后续流程。
aio2. Load local references
2. 加载本地参考文件
Read and all files under (paths relative to this skill file).
references/finding.mdreferences/exceptions/Load pattern files conditionally:
- references/patterns/cors-storefront-actions.md — always
- references/patterns/accs-rest-api-dependency.md — always
- references/patterns/aio-commerce-sdk.md — always
- references/patterns/admin-ui-sdk.md — only if commerce/backend-ui/1 is in app.config.yaml or ext.config.yaml, or @adobe/uix-guest/@adobe/uix-core in package.json
Pattern files take precedence over fetched guidelines. Exception files suppress findings from both.
If any file is not found, skip and continue.
读取以及下的所有文件(路径相对于本技能文件)。
references/finding.mdreferences/exceptions/有条件地加载模式文件:
- references/patterns/cors-storefront-actions.md ——始终加载
- references/patterns/accs-rest-api-dependency.md ——始终加载
- references/patterns/aio-commerce-sdk.md ——始终加载
- references/patterns/admin-ui-sdk.md ——仅当app.config.yaml或ext.config.yaml中包含commerce/backend-ui/1,或package.json中包含@adobe/uix-guest/@adobe/uix-core时加载
模式文件优先级高于获取的指南文件,例外文件可屏蔽来自两者的问题提示。
若任何文件未找到,则跳过并继续。
3. Fetch the guidelines
3. 获取官方指南
Fetch both pages using . Use raw GitHub URLs — the rendered developer.adobe.com pages are not reliably accessible:
curl- Submission guidelines:
https://raw.githubusercontent.com/AdobeDocs/commerce-extensibility/refs/heads/main/src/pages/app-development/app-submission-guidelines.md - Admin UI SDK checklist: — only if
https://raw.githubusercontent.com/AdobeDocs/commerce-extensibility/refs/heads/main/src/pages/admin-ui-sdk/app-review-checklist.mdis incommerce/backend-ui/1orapp.config.yaml, orext.config.yaml/@adobe/uix-guestin@adobe/uix-corepackage.json
If a page is unreachable, note which one failed, proceed with the other, and warn the user that coverage is partial.
使用获取以下两个页面,需使用GitHub原始URL——渲染后的developer.adobe.com页面无法保证稳定访问:
curl- 提交指南:
https://raw.githubusercontent.com/AdobeDocs/commerce-extensibility/refs/heads/main/src/pages/app-development/app-submission-guidelines.md - Admin UI SDK检查清单:——仅当app.config.yaml或ext.config.yaml中包含commerce/backend-ui/1,或package.json中包含@adobe/uix-guest/@adobe/uix-core时获取
https://raw.githubusercontent.com/AdobeDocs/commerce-extensibility/refs/heads/main/src/pages/admin-ui-sdk/app-review-checklist.md
若某页面无法访问,需记录哪个页面获取失败,使用另一个页面继续,并警告用户检查覆盖范围不完整。
4. Read the app
4. 读取应用文件
Read these files in order:
- — extension points, actions, inputs, annotations, productDependencies
app.config.yaml - — name, description, author, version, dependencies, scripts
package.json - /
env.dist/ anyenv.exampleat the root — documented env varsenv.* - — installation instructions, events, API requirements
README.md - — app ID, APIs, workspaces
deploy.yaml - — extension points (if Admin UI SDK detected)
install.yaml - Every and
*.config.yamlunderext.config.yamlandsrc/actions/ - Every under
index.jsactions/ - — UI code, innerHTML, routing
web-src/src/ - — if Admin UI SDK detected
extension-manifest.json
If a file does not exist, note it and continue.
按以下顺序读取文件:
- ——扩展点、操作、输入、注解、产品依赖
app.config.yaml - ——名称、描述、作者、版本、依赖、脚本
package.json - /
env.dist/根目录下所有env.example文件——已文档化的环境变量env.* - ——安装说明、事件、API要求
README.md - ——应用ID、API、工作区
deploy.yaml - ——扩展点(若检测到Admin UI SDK)
install.yaml - 和
src/下的所有actions/和*.config.yamlext.config.yaml - 下的所有
actions/index.js - ——UI代码、innerHTML、路由
web-src/src/ - ——若检测到Admin UI SDK
extension-manifest.json
若某文件不存在,需记录并继续。
5. Review
5. 执行审查
Build a complete list of checks from the pattern files and fetched guidelines. Then work through every item silently, one by one. Do not skip any item.
Exclude the following entirely — do not check:
- ,
npm audit, or any check requiring running npmnpx npm-check - Exchange listing URL, repository visibility, screenshots in Exchange listing
- Any check requiring a live Exchange listing, deployed environment, or external URL
For each item:
- Check it against the files read in Step 4
- If confirmed → record as FINDING with severity, file, and line number
- If an exception in applies → suppress it
references/exceptions/ - If not applicable to → skip it
APP_TYPE
Before recording any FINDING, verify it in the actual files. If you cannot point to a specific file and line number, do not flag it.
Before flagging a missing package — verify it is directly imported in source files, not just a transitive dependency.
After working through all items, collect all FINDINGs and assign codes: and . Merge closely related findings before assigning codes.
MUST-<n>NICE-<n>For each finding track:
- —
SEVERITYorMUSTNICE - — one sentence, specific and actionable
DESCRIPTION - — absolute path to the relevant file; empty for general issues. Render as a markdown link:
FILE_PATH[relative/path](file:///absolute/path) - — specific line; 0 for general issues
LINE_NUMBER - — one or more of:
CATEGORY·security·documentation·code·dependenciesother
根据模式文件和获取的指南构建完整的检查项列表,然后逐一静默检查所有项,不得跳过任何项。
完全排除以下检查项——不进行检查:
- 、
npm audit或任何需要运行npm的检查npx npm-check - Exchange上架URL、仓库可见性、Exchange上架截图
- 任何需要已上架Exchange应用、已部署环境或外部URL的检查
针对每个检查项:
- 对照步骤4中读取的文件进行检查
- 若确认存在问题→记录为FINDING,包含严重级别、文件和行号
- 若中的例外规则适用→屏蔽该问题
references/exceptions/ - 若不适用于当前→跳过
APP_TYPE
记录任何FINDING前,需在实际文件中验证。若无法指向具体文件和行号,则不得标记该问题。
标记缺失的包前,需验证它是直接导入到源码文件中,而非仅为传递依赖。
完成所有项检查后,收集所有FINDING并分配代码:和。在分配代码前,合并密切相关的问题。
MUST-<n>NICE-<n>针对每个问题记录:
- ——
SEVERITY(必须解决)或MUST(建议优化)NICE - ——一句话描述,具体且可执行
DESCRIPTION - ——相关文件的绝对路径;通用问题留空。以Markdown链接形式呈现:
FILE_PATH[relative/path](file:///absolute/path) - ——具体行号;通用问题填0
LINE_NUMBER - ——以下一个或多个类别:
CATEGORY(安全)·security(文档)·documentation(代码)·code(依赖)·dependencies(其他)other
6. Present the raw findings list
6. 展示原始问题列表
Print a concise findings list — no enrichment yet. Format:
Found N MUST-have issue(s) and M NICE-to-have recommendation(s).
**MUST — blockers**
- MUST-1: <one-line description> (`<FILE_PATH>`, line <LINE_NUMBER>)
- MUST-2: …
**NICE — recommendations**
- NICE-1: <one-line description> (`<FILE_PATH>`, line <LINE_NUMBER>)
- NICE-2: …Omit a group heading if it is empty. Omit the file reference when is empty.
FILE_PATHAfter the list, show:
Type walkthrough to go through each finding · MUST-n or NICE-n to dig into a specific one · or ask anything.
Then wait for the user's response.
打印简洁的问题列表——暂不添加增强信息。格式如下:
发现N个必须解决的问题和M个建议优化项。
**MUST — 阻塞问题**
- MUST-1: <一行描述> (`<FILE_PATH>`, 第<LINE_NUMBER>行)
- MUST-2: …
**NICE — 建议优化**
- NICE-1: <一行描述> (`<FILE_PATH>`, 第<LINE_NUMBER>行)
- NICE-2: …若某组无内容,则省略该组标题。若为空,则省略文件引用。
FILE_PATH列表展示后,显示:
输入walkthrough逐一排查每个问题 · 输入MUST-n或NICE-n深入查看特定问题 · 或提出其他问题。
然后等待用户响应。
7. Respond to the user
7. 响应用户操作
- "walkthrough" (or equivalent intent) → go to Step 8
- A finding code (e.g. "MUST-2", "NICE-1") → enrich that finding and present it; show the actions line again and wait
- Anything else → answer it; show the actions line again and wait
Repeat until the user ends the session or all findings have been walked through.
- 输入"walkthrough"(或等效意图)→进入步骤8
- 输入问题代码(例如"MUST-2"、"NICE-1")→增强该问题信息并展示,再次显示操作提示行并等待
- 其他输入→回答用户问题,再次显示操作提示行并等待
重复上述流程,直到用户结束会话或所有问题均已排查完毕。
8. Walkthrough mode
8. 交互式排查模式
Work through all findings sequentially — MUST first, then NICE. Before starting, obtain the IMS token (see below).
- If the group is empty, say so and move on.
- For each finding in code order:
- Show a numbered header (e.g. )
--- MUST issue [n/N] --- - Enrich the finding and print it
- Show: to work on this finding together ·
**"resolve it"**to move on · or ask anything**"next"** - Wait for the user's reply
- Show a numbered header (e.g.
After the last finding, close with a short encouraging message including how many findings were resolved (e.g. "X of N+M findings resolved") and wish the developer good luck.
按顺序排查所有问题——先处理MUST类,再处理NICE类。开始前,获取IMS令牌(见下文)。
- 若某组无问题,则告知用户并继续下一组。
- 针对每个按代码排序的问题:
- 显示编号标题(例如)
--- MUST问题 [n/N] --- - 增强问题信息并打印
- 显示:共同解决此问题 ·
**"resolve it"**跳过此问题 · 或提出其他问题**"next"** - 等待用户回复
- 显示编号标题(例如
所有问题排查完毕后,发送简短鼓励信息,说明已解决的问题数量(例如"已解决N+M个问题中的X个"),并祝开发者顺利。
Obtain IMS token
获取IMS令牌
Run once per session, the first time enrichment is needed:
bash
IMS_TOKEN=$(aio auth login --bare 2>/dev/null)- If is non-empty → use the documentation agent for enrichment.
$IMS_TOKEN - If empty → warn the user; instruct them to run and restart for the best experience; ask whether to continue without enrichment or stop.
aio login
首次需要增强信息时,在会话中执行一次:
bash
IMS_TOKEN=$(aio auth login --bare 2>/dev/null)- 若非空→使用文档代理增强信息。
$IMS_TOKEN - 若为空→警告用户;指导用户运行并重启以获得最佳体验;询问用户是否继续无增强信息的排查或停止。
aio login
Enrich a finding
增强问题信息
- If IMS token is available, query the documentation agent:
bash
curl -s -X POST https://commerce-docs-prod-endpoint-d0ctgyebe7bec8e6.a02.azurefd.net/api/query \
-H "Authorization: Bearer $IMS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "<topic derived from the finding>", "count": 5}'Pick the based on category:
index- ,
security,deployment→codeapp-builder-docs - ,
documentation→dependenciescommerce-extensibility-docs - default → omit
index
-
Read the actual file atand
FILE_PATH. Generate a concrete before/after fix specific to the developer's code — not a generic example.LINE_NUMBER -
Compose the enriched finding using the format in.
references/finding.md
If the agent returns no results, fall back to App Builder / Commerce knowledge and continue.
- 若IMS令牌可用,查询文档代理:
bash
curl -s -X POST https://commerce-docs-prod-endpoint-d0ctgyebe7bec8e6.a02.azurefd.net/api/query \
-H "Authorization: Bearer $IMS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query": "<从问题衍生的主题>", "count": 5}'根据类别选择:
index- 、
security、deployment→codeapp-builder-docs - 、
documentation→dependenciescommerce-extensibility-docs - 默认情况→省略
index
-
读取和
FILE_PATH对应的实际文件。生成针对开发者代码的具体修复前后示例——而非通用示例。LINE_NUMBER -
使用中的格式编写增强后的问题信息。
references/finding.md
若代理未返回结果,则 fallback 到App Builder/Commerce知识库继续。
Failure modes
故障模式
- Path not found → stop and report; do not proceed
- Guidelines page unreachable → note which failed; proceed with the other; warn coverage is partial
- not installed or not authenticated → warn the user, instruct them to run
aio, and ask whether to continue without enrichment or stopaio login - Documentation agent returns no results → fall back to App Builder / Commerce knowledge; do not stop
- 路径未找到→停止并报告;不继续后续流程
- 指南页面无法访问→记录哪个页面失败;使用另一个页面继续;警告用户检查覆盖范围不完整
- 未安装或未认证→警告用户,指导用户运行
aio,并询问用户是否继续无增强信息的排查或停止aio login - 文档代理未返回结果→fallback 到App Builder/Commerce知识库;不停止流程