appbuilder-ui-scaffolder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApp Builder UI Scaffolder
App Builder UI 脚手架生成工具
Generate React Spectrum UI for Adobe Experience Cloud Shell SPAs. This is a reference-based skill — the agent reads patterns and generates context-appropriate code rather than copying static templates.
为Adobe Experience Cloud Shell单页应用(SPAs)生成React Spectrum UI。这是一项基于参考的技能——智能体读取模式并生成符合上下文的代码,而非复制静态模板。
Pattern Quick-Reference
模式速查
Identify the user's intent, then read the referenced sections to generate tailored code.
| User wants | Reference | Key components |
|---|---|---|
| New page with shell context | | |
| Form with validation | | |
| Data table (sortable, paginated) | | |
| Confirmation dialog / modal | | |
| Navigation layout | | |
| ExC Shell setup | | |
| Connect UI to backend actions | | |
| AEM UI Extension (CF Console, CF Editor, Universal Editor) | | |
| Debug UI issues | | Shell spinner, CORS, blank screen, auth |
识别用户意图,然后阅读参考章节生成定制化代码。
| 用户需求 | 参考文档 | 核心组件 |
|---|---|---|
| 带Shell上下文的新页面 | | |
| 带验证的表单 | | |
| 可排序、分页的数据表格 | | |
| 确认对话框/模态框 | | |
| 导航布局 | | |
| ExC Shell设置 | | |
| 将UI连接到后端动作 | | 携带IMS令牌的 |
| AEM UI扩展(CF Console、CF Editor、Universal Editor) | | |
| 调试UI问题 | | Shell加载 spinner、CORS、空白页面、权限验证 |
Fast Path (for clear requests)
快速路径(适用于明确请求)
When the user's request maps unambiguously to a single pattern above — they name a specific component type, reference a UI pattern, or describe a use case that clearly matches one entry — proceed directly:
- Read the user's existing project structure () for conventions (file naming, import style, existing components)
web-src/src/ - Read the matched file for component guidance and annotated examples
references/ - Generate code that fits the user's existing conventions
- Wire into existing routing if React Router is present
- Validate against
references/checklist.md
Examples of fast-path triggers:
-
"Add a data table page" → Read§ Table, generate directly
references/ui-patterns.md -
"Create a form for submitting data" → Read§ Form, generate directly
references/ui-patterns.md -
"Add a confirmation dialog" → Read§ Dialog, generate directly
references/ui-patterns.md -
"Set up the shell integration" → Read, generate directly
references/shell-integration.md -
"Build a Content Fragment Console extension" → Read§ CF Console, generate directly
references/aem-extensions.md -
"Add a header menu button to the Universal Editor" → Read§ Universal Editor, generate directly
references/aem-extensions.md -
"Create an AEM extension with uix-guest" → Read§ Core Registration, generate directly
references/aem-extensions.md
If there is any ambiguity — multiple patterns could fit, constraints are unclear, or the user hasn't specified enough — fall through to the full workflow below.
当用户请求明确匹配上述单一模式时——他们指定了特定组件类型、参考了UI模式,或描述的用例清晰匹配某一项——直接按以下步骤操作:
- 读取用户现有项目结构()以遵循约定(文件命名、导入风格、现有组件)
web-src/src/ - 读取匹配的文件获取组件指南和带注释的示例
references/ - 生成符合用户现有约定的代码
- 如果项目使用React Router,将代码接入现有路由
- 根据进行验证
references/checklist.md
快速路径触发示例:
-
"为我的App Builder SPA添加一个显示数据表格的页面。" → 读取§ 表格,直接生成代码
references/ui-patterns.md -
"创建一个用于提交客户数据的表单。" → 读取§ 表单,直接生成代码
references/ui-patterns.md -
"添加一个确认对话框。" → 读取§ 对话框,直接生成代码
references/ui-patterns.md -
"设置Shell集成。" → 读取,直接生成代码
references/shell-integration.md -
"构建Content Fragment Console扩展。" → 读取§ CF Console,直接生成代码
references/aem-extensions.md -
"为Universal Editor添加一个头部菜单按钮。" → 读取§ Universal Editor,直接生成代码
references/aem-extensions.md -
"使用uix-guest创建AEM扩展。" → 读取§ 核心注册,直接生成代码
references/aem-extensions.md
如果存在任何歧义——多个模式可能适用、约束条件不明确,或用户未提供足够信息——则使用下方完整工作流程。
Quick Reference
速查要点
- UI entry point: Place components in . This is the standard App Builder SPA layout.
web-src/src/components/ - Shell integration: Always initialize with and call
@adobe/exc-appto dismiss the loading spinner. Seeruntime.done().references/shell-integration.md - Spectrum imports: All components from . See
@adobe/react-spectrumfor the full catalog.references/spectrum-components.md - Routing: Use for SPA navigation within the shell. See
react-router-dom.references/routing-patterns.md - Backend calls: Pass the shell's IMS token when calling App Builder actions. See .
references/action-integration.md - Theming: Wrap the app in for Spectrum styling.
<Provider theme={defaultTheme}> - Accessibility: All Spectrum components have built-in ARIA support. Add labels to interactive elements. See .
references/checklist.md - Debugging: For common issues (blank screen, CORS errors, auth failures, slow loads), see .
references/debugging.md
- UI入口点: 将组件放置在中。这是App Builder SPA的标准布局。
web-src/src/components/ - Shell集成: 始终使用初始化,并调用
@adobe/exc-app以关闭加载spinner。详见runtime.done()。references/shell-integration.md - Spectrum导入: 所有组件均来自。完整组件目录请查看
@adobe/react-spectrum。references/spectrum-components.md - 路由: 使用在Shell内实现SPA导航。详见
react-router-dom。references/routing-patterns.md - 后端调用: 调用App Builder动作时传递Shell的IMS令牌。详见。
references/action-integration.md - 主题设置: 将应用包裹在中以应用Spectrum样式。
<Provider theme={defaultTheme}> - 无障碍支持: 所有Spectrum组件均内置ARIA支持。为交互元素添加标签。详见。
references/checklist.md - 调试: 常见问题(空白页面、CORS错误、权限验证失败、加载缓慢)请查看。
references/debugging.md
Full Workflow (for ambiguous or complex requests)
完整工作流程(适用于模糊或复杂请求)
- Read the user's project — check structure, React version, existing imports, routing setup,
web-src/for extension typeapp.config.yaml - Confirm target outcome, constraints, and acceptance criteria with the user
- Identify the UI pattern(s) needed from the quick-reference table above
- Read the corresponding files for component guidance and annotated examples
references/ - Generate code that fits the user's existing conventions (not a generic template)
- Wire into existing routing if React Router is present ()
references/routing-patterns.md - Connect to backend actions if data fetching is needed ()
references/action-integration.md - Validate against before marking done
references/checklist.md - If the user reports issues, consult for common SPA debugging scenarios
references/debugging.md - Summarize decisions, component choices, and any follow-up actions
- 读取用户项目——检查结构、React版本、现有导入、路由设置、
web-src/中的扩展类型app.config.yaml - 与用户确认目标结果、约束条件和验收标准
- 从上方速查表中确定所需的UI模式
- 读取对应的文件获取组件指南和带注释的示例
references/ - 生成符合用户现有约定的代码(而非通用模板)
- 如果项目使用React Router,将代码接入现有路由()
references/routing-patterns.md - 如果需要数据获取,连接到后端动作()
references/action-integration.md - 完成前根据进行验证
references/checklist.md - 如果用户反馈问题,参考处理常见SPA调试场景
references/debugging.md - 总结决策、组件选择及后续操作
Example User Prompts
用户请求示例
- "Add a page to my App Builder SPA that shows a data table."
- "Create a form for submitting customer data in my App Builder app."
- "Set up the Experience Cloud Shell integration for my App Builder app."
- "Add a confirmation dialog before deleting a record."
- "Build a navigation sidebar for my App Builder SPA."
- "My App Builder app needs a settings page with form fields."
- "Build a Content Fragment Console extension with an action bar button."
- "Add a custom RTE toolbar button in the Content Fragment Editor."
- "Create a Universal Editor extension with a header menu button."
- "为我的App Builder SPA添加一个显示数据表格的页面。"
- "为我的App Builder应用创建一个提交客户数据的表单。"
- "为我的App Builder应用设置Experience Cloud Shell集成。"
- "删除记录前添加确认对话框。"
- "为我的App Builder SPA构建导航侧边栏。"
- "我的App Builder应用需要一个带表单字段的设置页面。"
- "构建一个带操作栏按钮的Content Fragment Console扩展。"
- "在Content Fragment Editor中添加自定义RTE工具栏按钮。"
- "创建一个带头部菜单按钮的Universal Editor扩展。"
Inputs To Request
需要请求的输入信息
- Current repository path and structure
web-src/ - Target UI pattern and specific data requirements
- Existing routing setup (if any)
- Backend action URLs for data fetching (if applicable)
- Non-functional constraints: accessibility requirements, responsive breakpoints
- 当前仓库路径和结构
web-src/ - 目标UI模式和具体数据需求
- 现有路由设置(如有)
- 用于数据获取的后端动作URL(如适用)
- 非功能性约束:无障碍要求、响应式断点
Deliverables
交付成果
- React Spectrum component files matching the user's project conventions
- Updated routing configuration (if applicable)
- Integration with backend actions (if applicable)
- Validation against quality checklist
- 符合用户项目约定的React Spectrum组件文件
- 更新后的路由配置(如适用)
- 与后端动作的集成(如适用)
- 基于质量检查表的验证结果
Quality Bar
质量标准
- All generated components use React Spectrum — no custom CSS for standard patterns
- Shell integration includes call
runtime.done() - Interactive elements have accessible labels
- Loading and error states are handled
- IMS token passed correctly to backend action calls
- 所有生成的组件均使用React Spectrum——标准模式不使用自定义CSS
- Shell集成包含调用
runtime.done() - 交互元素带有无障碍标签
- 处理加载和错误状态
- IMS令牌正确传递给后端动作调用
References
参考文档
- Use for annotated UI pattern examples (page, form, table, dialog, navigation).
references/ui-patterns.md - Use for React Spectrum v3 component catalog with imports, props, and accessibility.
references/spectrum-components.md - Use for ExC Shell integration (
references/shell-integration.md,@adobe/exc-app, IMS tokens).runtime.done() - Use for SPA routing with React Router in ExC Shell.
references/routing-patterns.md - Use for calling backend actions from the SPA.
references/action-integration.md - Use for pre-handoff UI quality validation.
references/checklist.md - Use for AEM UI Extension patterns (
references/aem-extensions.md, Content Fragment Console/Editor, Universal Editor, Assets View).@adobe/uix-guest - Use for common SPA debugging scenarios (shell spinner, CORS, auth, blank screen, performance).
references/debugging.md
- 使用获取带注释的UI模式示例(页面、表单、表格、对话框、导航)。
references/ui-patterns.md - 使用获取React Spectrum v3组件目录,包含导入方式、属性和无障碍信息。
references/spectrum-components.md - 使用获取ExC Shell集成指南(
references/shell-integration.md、@adobe/exc-app、IMS令牌)。runtime.done() - 使用获取ExC Shell中使用React Router的SPA路由指南。
references/routing-patterns.md - 使用获取从SPA调用后端动作的指南。
references/action-integration.md - 使用进行交付前UI质量验证。
references/checklist.md - 使用获取AEM UI扩展模式(
references/aem-extensions.md、Content Fragment Console/Editor、Universal Editor、Assets View)。@adobe/uix-guest - 使用获取常见SPA调试场景(Shell加载spinner、CORS、权限验证、空白页面、性能)。
references/debugging.md
Chaining
链式关联
- Chains FROM (after SPA project is scaffolded with
appbuilder-project-initextension)dx/excshell/1 - Works alongside for full-stack features (UI calls backend actions)
appbuilder-action-scaffolder - Chains TO (test generated UI components)
appbuilder-testing - Chains TO (deploy frontend changes)
appbuilder-cicd-pipeline
- 承接自(使用
appbuilder-project-init扩展搭建SPA项目后)dx/excshell/1 - 可与配合实现全栈功能(UI调用后端动作)
appbuilder-action-scaffolder - 衔接至(测试生成的UI组件)
appbuilder-testing - 衔接至(部署前端变更)
appbuilder-cicd-pipeline