experience-cms-content-type-generate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseexperience-cms-content-type-generate
experience-cms-content-type-generate
What This Skill Does
本技能功能
- DISCOVER — checks local and queries
<sfdx-source>/contentTypes/for existing OOTB/custom ContentTypeBundles.metadata-grounding - RECONCILE — on existing pick/provided FQN, retrieves from org (custom only) and reconciles against local. Returns matching the org.
{fqn, schema} - CREATE — generates a validator-correct ContentTypeBundle (,
schema.json)..contentTypeBundle-meta.xml - VALIDATE — against the CLI default (or picked) org.
sf project deploy start --dry-run - AUTO-FIX — fixes schema issues, re-validates (max 3 attempts).
- DEPLOY — asks yes/no, deploys on yes.
Create-only for new types, reconcile-only for existing. Does not modify, rename, or delete existing bundles beyond replacing a local copy with the org copy on user consent; does not author content records. If the message asks to add/rename/remove a field on an existing type (verbs /////// targeting an FQN or named type), print ONE line before 1a: — then continue discovery so the user lands on the type's summary (7.5). Do NOT silently proceed as if the modification happened.
addappendremovedroprenamechangemodifyupdateThis skill is create-only for new types and reconcile-only for existing. To modify "<fqn|name>", edit its schema.json and redeploy, or use the CMS UI.- DISCOVER — 检查本地目录,并通过
<sfdx-source>/contentTypes/查询现有OOTB(开箱即用)/自定义ContentTypeBundle。metadata-grounding - RECONCILE — 针对已选择/提供的FQN(完全限定名称),从组织中检索(仅自定义类型)并与本地版本协调,返回与组织匹配的。
{fqn, schema} - CREATE — 生成符合验证器要求的ContentTypeBundle(包含和
schema.json文件)。.contentTypeBundle-meta.xml - VALIDATE — 通过CLI默认(或指定)组织执行预部署验证。
sf project deploy start --dry-run - AUTO-FIX — 修复架构问题,重新验证(最多3次尝试)。
- DEPLOY — 询问用户是否部署,确认后执行部署。
仅针对新类型执行创建操作,针对现有类型仅执行协调操作。除了在用户同意的情况下用组织版本替换本地副本外,不修改、重命名或删除现有包;不创作内容记录。如果用户请求是对现有类型添加/重命名/删除字段(使用///////等动词,目标为FQN或命名类型),在步骤1a前打印一行提示: — 之后继续执行发现流程,以便用户查看该类型的摘要(步骤7.5)。请勿静默执行修改操作。
addappendremovedroprenamechangemodifyupdate本技能仅用于创建新类型和协调现有类型。若要修改“<fqn|name>”,请编辑其schema.json并重新部署,或使用CMS UI。Invocation contract
调用约定
Invoked directly by the user or delegated to by another skill (e.g. ). Two halves: input params the caller supplies, and a return outcome emitted at every terminal state.
experience-cms-content-generate由用户直接调用,或由其他技能(如)委托调用。包含两部分:调用方提供的输入参数,以及每个终端状态输出的返回结果。
experience-cms-content-generateInput params (all optional)
输入参数(均为可选)
| Param | Type | Effect |
|---|---|---|
| string ( | Skip discovery entirely. Jump straight to step 1e (retrieve-and-reconcile) using this FQN. |
| string | The user's original message. Drives discovery keywords in step 1c and the "matching …" wording in 1d. Default when the skill is triggered by a natural-language user prompt. |
| boolean, default | Suppresses the trailing "Would you like to create content using this type now?" question at step 8. Callers that already drive their own content-creation flow MUST pass |
| string | Workspace scope for the step 1c workspace-content-types check ( |
| string | Folder scope for the same check, as an alternative to |
| string, default | |
Workspace scope resolution — mutual exclusivity contract. / / narrow step 1c's workspace-content-types check only, not the discovery path taken. A caller that passes or MUST NOT also pass — the scope alone already determines the eligible types; this skill does not accept both in the same call. Exactly one of four combinations applies each run — call shapes and rationale → :
spaceIdfolderIdbaseTypespaceIdfolderIdbaseTypereferences/discovery-details.md#1c continued- only →
spaceId.get_content_types_for_workspace({ spaceId }) - only →
folderId.get_content_types_for_workspace({ folderId }) - only →
baseType.get_content_types_for_workspace({ baseType }) - None of the three → (default).
get_content_types_for_workspace({ baseType: "CONTENT" })
Common invocation shapes:
- Direct user → ,
intentsuppressCreateContentPrompt. Full discovery + retrieve-and-reconcile + trailing prompt. Nofalse/spaceId/folderId— falls to combination 4 above.baseType - Delegated → . Full discovery + retrieve-and-reconcile; returns
{ intent | fqn, suppressCreateContentPrompt: true }(the retrieve is what confirms the type is deployed in the org — a local-only type resolves to{success, fqn, schema}, never a bare success). Trailing prompt suppressed.not_deployed - Delegated with a known workspace → — combination 1. Pass this once the caller has already resolved a workspace (e.g.
{ intent, suppressCreateContentPrompt: true, spaceId: "<contentSpaceOrFolderId>" }fromcontentSpaceOrFolderId) and wants step 1c's check scoped to it. Do NOT also passget_or_create_cms_workspace_and_web_app_channelon this call. If the caller resolves its workspace AFTER content-type discovery (asbaseTypecurrently does), it has noexperience-cms-content-generateto pass at delegation time — that's combination 4, a valid, expected call shape.spaceId
| 参数 | 类型 | 作用 |
|---|---|---|
| 字符串(格式为 | 跳过发现流程,直接使用该FQN进入步骤1e(检索并协调)。绕过 |
| 字符串 | 用户的原始请求消息。驱动步骤1c中的发现关键词,以及步骤1d中的“匹配……”表述。当技能由自然语言用户提示触发时使用默认值。 |
| 布尔值,默认 | 抑制步骤8末尾的“是否要立即使用此类型创建内容?”提示。已自行驱动内容创建流程的调用方必须传入 |
| 字符串 | 步骤1c中工作区内容类型检查( |
| 字符串 | 作为 |
| 字符串,默认 | |
工作区范围解析 — 互斥约定。//仅缩小步骤1c中工作区内容类型检查的范围,不影响发现路径。传入或的调用方不得同时传入 — 仅范围本身即可确定符合条件的类型;本技能不接受同一调用中同时传入两者。每次运行仅适用以下四种组合之一,调用形式及原理详见:
spaceIdfolderIdbaseTypespaceIdfolderIdbaseTypereferences/discovery-details.md#1c continued- 仅传入→ 执行
spaceId。get_content_types_for_workspace({ spaceId }) - 仅传入→ 执行
folderId。get_content_types_for_workspace({ folderId }) - 仅传入→ 执行
baseType。get_content_types_for_workspace({ baseType }) - 未传入三者中的任何一个 → 执行(默认行为)。
get_content_types_for_workspace({ baseType: "CONTENT" })
常见调用形式:
- 用户直接调用 → 传入,
intent设为suppressCreateContentPrompt。执行完整发现流程+检索协调+末尾提示。不传入false/spaceId/folderId→ 适用上述组合4。baseType - 委托调用 → 传入。执行完整发现流程+检索协调;返回
{ intent | fqn, suppressCreateContentPrompt: true }(检索操作用于确认类型已部署到组织中 — 仅本地存在的类型会解析为{success, fqn, schema},不会直接返回成功)。抑制末尾提示。not_deployed - 已知工作区的委托调用 → 传入— 适用组合1。当调用方已解析工作区(如从
{ intent, suppressCreateContentPrompt: true, spaceId: "<contentSpaceOrFolderId>" }获取get_or_create_cms_workspace_and_web_app_channel),且希望步骤1c的检查限定在该工作区时使用此调用。请勿同时传入contentSpaceOrFolderId。如果调用方在内容类型发现后才解析工作区(如当前baseType的逻辑),则委托时无法传入experience-cms-content-generate— 适用组合4,这是合法且预期的调用形式。spaceId
Return outcome
返回结果
Every terminal state emits a structured outcome. The field is printed to chat as the final one-line summary AND is what the caller reads to route on the result.
message | | | Meaning | Caller action |
|---|---|---|---|---|
| present | present | Type is confirmed in the org (via 1e's retrieve on an existing type, or via deploy on the "Create new" path), ready to use for downstream work. | Proceed (e.g. author content records). |
| present | | Bundle exists locally (or is validated) but is NOT in the org — user declined to deploy, or picked "deploy later". | Do NOT proceed with content creation. Surface the message: "Content type |
| | | User cancelled at a decision point (discovery pick, field approval, drift prompt, deploy ask, final prompt). | Exit silently. Do not loop back into this skill. |
| | | Unrecoverable failure — missing | Surface the |
Terminal chat-line templates — one per status, printed final and mirrored into the outcome:
- →
success(post-deploy:Content type "<fqn>" is ready in <org>.)Deployed "<fqn>" to <org>. Component IDs: <ids>. - →
not_deployed(or 7b's "deploy later" one-liner)Content type "<fqn>" exists locally but is not deployed to <org>. Deploy it before creating content. - →
cancelledCancelled. No files written. - →
error(e.g.<specific reason>. <recovery hint>.)No authenticated Salesforce org. Run sf org login web and re-run.
Contract rules:
- is the ONLY status that unlocks downstream work. Callers MUST NOT proceed on
success,not_deployed, orcancelled.error - — step 8 MUST NOT print the trailing prompt.
suppressCreateContentPrompt=true - is always the final terminal chat line. Do NOT emit
messagebefore it prints.Task Completed
每个终端状态都会输出结构化结果。字段会打印到聊天窗口作为最终单行摘要,同时供调用方读取以根据结果进行路由。
message | | | 含义 | 调用方操作 |
|---|---|---|---|---|
| 存在 | 存在 | 类型已在组织中确认(通过对现有类型执行步骤1e的检索,或通过“创建新类型”路径的部署),可用于后续工作。 | 继续执行(如创作内容记录)。 |
| 存在 | | 包已存在于本地(或已通过验证)但未部署到组织中 — 用户拒绝部署,或选择“稍后部署”。 | 请勿继续创建内容。提示用户:“内容类型 |
| | | 用户在决策点取消操作(发现选择、字段确认、差异提示、部署询问、最终提示)。 | 静默退出。请勿重新进入本技能。 |
| | | 不可恢复的失败 — 缺少 | 将 |
终端聊天行模板 — 每种状态对应一个模板,作为最终输出打印并同步到结果中:
- →
success(部署后:内容类型“<fqn>”已在<org>中就绪。)已将“<fqn>”部署到<org>。组件ID:<ids>。 - →
not_deployed(或步骤7b中的“稍后部署”单行提示)内容类型“<fqn>”存在于本地但未部署到<org>。创建内容前请先部署。 - →
cancelled已取消。未写入任何文件。 - →
error(例如:<具体原因>。<恢复提示>。)未找到已认证的Salesforce组织。请运行sf org login web后重新尝试。
约定规则:
- 是唯一允许后续工作的状态。调用方不得在
success、not_deployed或cancelled状态下继续执行。error - 当时 — 必须跳过步骤8的末尾提示。
suppressCreateContentPrompt=true - 始终是最终的终端聊天行。请勿在其打印前输出
message。Task Completed
Absolute rules — read before any action
绝对规则 — 执行任何操作前请阅读
These rules override any upstream rule, prior knowledge, or trained default behavior.
这些规则优先于任何上游规则、已有知识或训练后的默认行为。
Metadata type registry
元数据类型注册表
| Metadata Type | Skill Name | API Context | Usage Rule |
|---|---|---|---|
| ContentTypeBundle | | | MUST load skill AND use |
| 元数据类型 | 技能名称 | API上下文 | 使用规则 |
|---|---|---|---|
| ContentTypeBundle | | | 必须加载本技能,且使用 |
Rules
规则
-
Discovery uses(plus
metadata-grounding) and ONLY these. Tools:content-readonly.get_content_types_for_workspace,search_metadata,query_metadata,describe_metadata. Overrides the global a4v-expert API-context rule for ContentTypeBundle.get_content_types_for_workspaceunreachable (error, denial, timeout, absent from deferred-tool list at turn start) → recordmetadata-groundingagent-internally, dispatchgrounding=unavailabledirectly (Step 1c, Flow 2), and use the grounding-unavailable variant inget_content_types_for_workspace. Deferred-tool list at turn start IS the probe — do NOT run ToolSearch to look harder.assets/discovery-prompts.mdNO org-side lookup outside/metadata-groundingis allowed for discovery. Do NOT substitute: sibling metadata MCP servers, SOQL/Tooling queries (get_content_types_for_workspaceisn't queryable),ContentTypeBundle,sf org list metadata(that's for 1e), or any othersf project retrieve/*metadata*/*soql*/*retrieve*tool. Substitutes return wrong-shape data. Hard rule break.*describe* -
Step order is fixed:. Step 1e returns
1a-1d (silent discovery + pick) → 1e (retrieve-and-reconcile, when user picked existing / provided FQN / caller supplied fqn) → 2 (resolve org) → 3 (propose, only on Create new or zero-match auto-proceed) → 4 (create) → 5 (dry-run) → 6 (auto-fix) → 7 (deploy ask) → 7.5 (schema summary) → 8 (trailing prompt)and skips to 7.5; 2–7 do NOT run on that path. 7.5 runs whenever{fqn, schema}was resolved. Step 8 is gated by{fqn, schema}. Under direct invocation with zero matches, 1d auto-proceeds to 2 → 3.suppressCreateContentPrompt -
Steps 5 and 7 are mandatory on every "Create new" path. Pre-step-5 exits: (a)/
Use existing/ caller-suppliedProvide an FQN→ route through 1e which returnsfqnwith no files written; (b){fqn, schema}at any pick. Do NOT emitCancelbetween steps 4 and 7's resolution. 1e's drift "Deploy local to org" branch also routes through 5 and 7.Task Completed -
is the LAST action — skill is over once emitted. Deploy JSON's
Task Completedis for reference, not an action prompt. Forbidden after:deployUrl,open <deployUrl>,xdg-open,sf org open, browser tabs, URL echo, "next step" prose.sf project deploy report -
Step 1e retrieve is destructive for; drift MUST prompt the user.
schema.jsonoverwrites localsf project retrieve start --metadata ContentTypeBundle:<Name>. Snapshot it intoschema.jsonBEFORE every 1e retrieve (never meta.xml). Drift = parsed-JSON compare oflocalSchemaBeforevs. post-retrievelocalSchemaBefore, left side ALWAYSschema.json— never diff the post-retrieve file against itself. On drift, the drift prompt is MANDATORY (chat diff, thenlocalSchemaBefore:ask_user_tool/Deploy local to org/Overwrite local with org) — never reconcile silently.CancelandCancelMUST restoreDeploy local to orgfromschema.jsonbefore emitting the outcome. Full snapshot/restore procedure + drift prompt template →localSchemaBefore.references/retrieve-and-reconcile.md -
Step 1d — show top 5 in a table, then ask. Row count =, always — combined is local matches + every grounding row, deduped (Location
min(combined.length, 5)), never dropped as "irrelevant." Row-1 sort: OOTB first (local, orgor groundingsfdc_cms__*), custom (isOOTB) follows in grounding rank. Row 1's FQN names thec__*option. 1+ rows → table (Use existing:) thenFQN | Description | Location:ask_user_tool/Use existing: <row-1 FQN>/Provide an FQN/Create new: <newName>(Cancelavoids colliding with any FQN in<newName>). Empty combined → NO TABLE, justcombined:ask_user_tool/Create new: <contentTypeName>(+Cancelwhen delegated/Provide an FQN-supplied). Never mix "no matches" wording with a table; no preamble; nofqn/#/Namecolumns; never claim a type is "not in the org" — only 1e's retrieve is authoritative. Full prompt templates →Label.assets/discovery-prompts.md
Full agent checklist and tripwire list → .
references/agent-checklist.md-
发现流程仅使用(结合
metadata-grounding)。工具包括:content-readonly.get_content_types_for_workspace、search_metadata、query_metadata、describe_metadata。覆盖ContentTypeBundle的全局a4v-expert API上下文规则。若get_content_types_for_workspace不可用(错误、拒绝、超时、回合开始时不在延迟工具列表中)→ 在代理内部记录metadata-grounding,直接调度grounding=unavailable(步骤1c,流程2),并使用get_content_types_for_workspace中的grounding不可用变体提示。回合开始时的延迟工具列表即为探测依据 — 请勿运行ToolSearch进一步查找。assets/discovery-prompts.md发现流程中禁止使用/metadata-grounding以外的组织端查找方式。请勿替代为:同级元数据MCP服务器、SOQL/Tooling查询(get_content_types_for_workspace不可查询)、ContentTypeBundle、sf org list metadata(这用于步骤1e)或任何其他sf project retrieve/*metadata*/*soql*/*retrieve*工具。替代工具会返回格式错误的数据,属于严重违规。*describe* -
步骤顺序固定:。步骤1e返回
1a-1d(静默发现+选择)→ 1e(检索并协调,当用户选择现有类型/提供FQN/调用方传入fqn时)→ 2(解析组织)→ 3(提议,仅在创建新类型或无匹配自动继续时执行)→ 4(创建文件)→ 5(预部署验证)→ 6(自动修复)→ 7(部署询问)→ 7.5(架构摘要)→ 8(末尾提示)并跳转到7.5;该路径下不执行步骤2–7。只要{fqn, schema}已解析,就会执行步骤7.5。步骤8受{fqn, schema}控制。用户直接调用且无匹配结果时,步骤1d会自动进入步骤2→3。suppressCreateContentPrompt -
步骤5和7在所有“创建新类型”路径中为必填项。步骤5前退出的情况:(a)/
使用现有类型/调用方传入提供FQN→ 路由到步骤1e,返回fqn且不写入任何文件;(b) 在任何选择环节{fqn, schema}。请勿在步骤4和步骤7的决议之间输出取消。步骤1e的差异提示“将本地版本部署到组织”分支也会路由到步骤5和7。Task Completed -
是最后一个操作 — 输出后技能执行完毕。部署JSON中的
Task Completed仅作参考,不是操作提示。禁止在以下操作后输出:deployUrl、open <deployUrl>、xdg-open、sf org open、打开浏览器标签页、输出URL、“下一步”说明文字。sf project deploy report -
步骤1e的检索操作会覆盖;存在差异时必须提示用户。
schema.json会覆盖本地sf project retrieve start --metadata ContentTypeBundle:<Name>。每次执行步骤1e检索前,必须将本地版本快照到schema.json(仅快照schema.json,不包括meta.xml)。差异 = 将localSchemaBefore与检索后的localSchemaBefore进行JSON解析后比较,始终以schema.json为左侧基准 — 请勿将检索后的文件与自身进行比较。存在差异时,必须显示差异提示(聊天窗口展示差异,然后通过localSchemaBefore提供选项:ask_user_tool/将本地版本部署到组织/用组织版本覆盖本地)— 请勿静默协调。取消和取消选项必须在输出结果前从将本地版本部署到组织恢复localSchemaBefore。完整的快照/恢复流程及差异提示模板详见schema.json。references/retrieve-and-reconcile.md -
步骤1d — 展示前5个匹配结果的表格,然后询问用户。行数 =,始终如此 — combined是本地匹配结果+所有grounding结果,去重后(位置标注
min(combined.length, 5)),绝不丢弃“不相关”结果。排序规则:首先是OOTB类型(local, org或grounding中的sfdc_cms__*为true),然后是自定义类型(isOOTB)按grounding排名排序。第一行的FQN对应c__*选项。若有1个及以上结果 → 展示表格(使用现有类型:),然后通过FQN | 描述 | 位置提供选项:ask_user_tool/使用现有类型: <第一行FQN>/提供FQN/创建新类型: <newName>(取消避免与<newName>中的任何FQN冲突)。若combined为空 → 不展示表格,仅通过combined提供选项:ask_user_tool/创建新类型: <contentTypeName>(当委托调用/传入取消时,额外添加fqn选项)。请勿将“无匹配”表述与表格混合;无需前置说明;不要添加提供FQN/#/名称列;绝不声称某个类型“不在组织中” — 只有步骤1e的检索结果才是权威的。完整提示模板详见标签。assets/discovery-prompts.md
完整代理检查清单和触发条件列表详见。
references/agent-checklist.mdFile paths (strict)
文件路径(严格要求)
- Bundle directory: — NOT
<sfdx-source>/contentTypes/<ContentTypeName>/.contentTypeBundles/<ContentTypeName>/ - Two files only: and
schema.json.<ContentTypeName>.contentTypeBundle-meta.xml
- 包目录:— 禁止使用
<sfdx-source>/contentTypes/<ContentTypeName>/。contentTypeBundles/<ContentTypeName>/ - 仅包含两个文件:和
schema.json。<ContentTypeName>.contentTypeBundle-meta.xml
Output discipline
输出规范
The user reads the chat. Most of this skill's machinery is for you, not them.
Do not print: status lines, task-progress checklists, planning prose (, ), anti-pattern reasoning, exemption explanations, "operation was denied; proceeded using…" notes, or suggestions that the user run validation/deploy themselves.
I will now…Per the skill's…Do print, and only these: the 1d discovery summary, 1e drift prompt, 3b proposed-fields table + , 2-line "files created" confirmation in step 4, 1-line validation result in step 5, 7a deploy ask, 7b/7e 1-line summary, 7.5 schema summary table (whenever resolved), and step 8 prompt (when is /unset).
ask_user_tool{fqn, schema}suppressCreateContentPromptfalseDo NOT emit , "Done", "All set" until step 7 has resolved, 7.5's summary has printed, and step 8's gate has been evaluated. Premature completion silently kills the summary + deploy ask.
Task Completed用户会阅读聊天窗口内容。本技能的大部分内部逻辑仅用于代理自身,无需展示给用户。
禁止打印:状态行、任务进度清单、规划性文字(、)、反模式推理、豁免说明、“操作被拒绝;已使用……继续”注释,或建议用户自行运行验证/部署命令的内容。
我现在将……根据技能的……允许打印,且仅打印以下内容:步骤1d的发现摘要、步骤1e的差异提示、步骤3b的提议字段表格+、步骤4中两行的“文件已创建”确认、步骤5中一行的验证结果、步骤7a的部署询问、步骤7b/7e的单行摘要、步骤7.5的架构摘要表格(只要已解析),以及步骤8的提示(当为/未设置时)。
ask_user_tool{fqn, schema}suppressCreateContentPromptfalse请勿提前输出、“完成”、“全部就绪” — 必须在步骤7决议完成、步骤7.5的摘要打印完毕、步骤8的控制逻辑评估完成后才能输出。提前输出会导致摘要和部署询问被静默终止。
Task CompletedAgent checklist and tripwires
代理检查清单和触发条件
The full mandatory progress checklist and the tripwire list are in . Copy the checklist agent-internally and tick each box only after the action is genuinely done. Do not print it to chat.
references/agent-checklist.md完整的必填进度检查清单和触发条件列表位于。代理内部复制该清单,仅在操作真实完成后勾选对应项。请勿打印到聊天窗口。
references/agent-checklist.mdWorkflow (CREATE)
工作流(创建流程)
1. Discover existing types (silent — no user prompts in this step)
1. 发现现有类型(静默 — 本步骤无用户提示)
1a. Resolve project context (agent-internal)
Read . Take and append → . Bundles live at . If is missing, emit outcome per § Invocation contract with message , print the message, and stop.
sfdx-project.jsonpackageDirectories[0].path/main/default<sfdx-source><sfdx-source>/contentTypes/sfdx-project.jsonerrorThis is not an SFDX project — open the project root and re-run.Explicit-FQN fast-path (direct user). Caller did NOT supply but the message literally contains a token (e.g. , ) → capture it as and route directly to step 1e, skipping 1b/1c/1d. Mirror of the delegated shape.
fqnnamespace__DeveloperNamesfdc_cms__newsc__PressReleasefqn{fqn}Residual-intent capture (agent-internal). Scan the message for a second clause joined by //, or a second imperative verb targeting a content record (e.g. ). If present, stash as — step 8's Yes branch forwards it as . Do NOT print or act on it before step 8.
and alsoand thenthencreate <type> and also create a <thing> about XresidualIntentintent1b. Local discovery (silent)
Use a directory-listing capability ( / on / IDE ), NOT a content-search/grep tool — content-search misses folder-name-only matches. For each subfolder, read ( + ). Match by intent semantically: reason about content domains, not literal strings — a folder named IS a match for a marketplace request even with no literal property match. Return every semantically-matching local bundle into (step 1d's sort + 5-row cap handle the rest). Zero matches → return zero (auto-proceed on direct invocation).
list_filesGlob<sfdx-source>/contentTypes/*/schema.jsonlist_directoryschema.jsontitledescriptionMarketPlacecombinedRationale, anti-patterns, tool-selection details → .
references/discovery-details.md#1b1c. Org discovery (silent — dispatch , backed by )
metadata-grounding.search_metadatacontent-readonly.get_content_types_for_workspaceDispatch gate: 1c is a tool call, not a thought. Do NOT skip because 1b found a local match — the org may still have a same-named bundle ("Name already exists" originates here). Unconditional; only real outage exempts a given tool. Never ask "should I search?".
The parameter carries content-domain nouns only — 3-5 English words describing what the content is ABOUT (news, article, product, press release). NOT an FQN, namespace hint, or copy of the message. already signals the kind. Never dispatch a query containing , , , , , , or — rebuild if it does. Full ruleset + concrete call-shape table (also referenced from as drift safety-net) → .
search_metadataquerymetadataType: "ContentTypeBundle"sfdc_cmsc____content typebundlemetadatacmsexperience-cms-content-generatereferences/discovery-query-rules.mdServer target: (RULE 1). , sorted OOTB-first.
metadata-groundinglimit=5Do NOT dispatch in 1c. returns everything 1d's table needs (FQN, description, OOTB flag). is load-bearing only for the OOTB-schema fetch in 1e — dispatch on-demand, for the ONE picked FQN. Per-row fan-out is N wasted round-trips.
query_metadatasearch_metadataquery_metadataWorkspace content-types check — dispatched every run, alongside or instead of grounding. Call params per the mutual-exclusivity contract (§ Invocation contract), never alongside /. Flow 1 (grounding available) — also dispatch ; org candidate set = intersection of both FQN sets (empty is valid, do not widen/retry). Flow 2 (grounding unavailable) — dispatch it directly as the sole org signal, apply step 1b's semantic matching to its rows, record for 1d's TRUTH GATE. Neither tool substitutes for 1e's retrieve. Call shapes, unavailability handling, rationale → .
baseTypespaceIdfolderIdget_content_types_for_workspacegroundingFallback=workspaceTypesreferences/discovery-details.md#1c continued1d. Always present discovery findings — including "no matches"
Discovery is the first chat-visible signal. Always tell the user what was checked and found. Every case (A/B/C) surfaces a pick list via and WAITS for the user's reply next turn.
ask_user_toolTRUTH GATE — 1d wording must match what actually happened in 1c. Never claim a check that didn't run this turn; never disclose a skip that didn't happen either. Three cases:
- dispatched (Flow 1, regardless of
search_metadataoutcome) → org was checked via grounding. No disclosure needed.get_content_types_for_workspace - unavailable but
search_metadatadispatched (Flow 2 /get_content_types_for_workspace) → org WAS checked, just not via grounding. AppendgroundingFallback=workspaceTypesper(checked supported content types for this workspace — metadata-grounding unavailable).assets/discovery-prompts.md - Both unavailable → org genuinely not checked. Append per
(org check skipped — grounding unavailable).assets/discovery-prompts.md
See .
references/discovery-details.md#1dProvide an FQNshowFqnOptionsuppressCreateContentPrompt === truefqnOtherwise (direct invocation AND zero matches) → ; skip the pick prompt, print an info line, auto-proceed to step 2. Offering FQN input when the direct user asked to create fresh and nothing matched switches their goal.
showFqnOption = falseIntent-sanity gate on direct-invocation zero-matches. Before auto-proceeding, extract at least one recognizable content-domain noun from the message (real word, named entity, or compound domain vocabulary — not gibberish, not filler-only after stripping mechanic nouns like ////). ≥1 recognizable noun → proceed to step 2 → 3, with the step 3 proposed name built ONLY from those tokens. Gibberish/filler-only → do NOT auto-proceed; ask with + free-text; free-text restarts 1b, → . Same gate applies when 1c's rebuilt query would be empty — do NOT dispatch a blank . STRICTLY DO NOT fabricate a name from tokens absent from the message. Full rule + examples → .
content typebundleCMSschemametadataYour request "<original message>" doesn't name a content domain. What kind of content type would you like to create (e.g. news, blog, press release, product)?CancelCancelcancelledsearch_metadatareferences/discovery-details.md#1dPrompt templates (has-matches, zero-matches direct auto-proceed, zero-matches delegated, "Provide an FQN" follow-up) → . Copy verbatim.
assets/discovery-prompts.md1d output shape — TWO separate outputs, never merged (the #1 reported UX defect):
- Chat markdown FIRST — the header + the
Top <N> matching content types:table (Output 1 inFQN | Description | Location). Plain chat text, NOT the tool.assets/discovery-prompts.md - THEN whose
ask_user_toolis EXACTLYquestion(verbatim, one short sentence) with the 4 FIXED options:Found matches. Pick one:/Use existing: <row-1 FQN>/Provide an FQN/Create new: <newName>.Cancel
STRICTLY DO NOT: write any preamble/prose sentence before or instead of the table; put the table, its columns, or the suffix INSIDE the field (it renders as one flat line with no markdown — the reported broken wall of text); paraphrase or "make more helpful" the (it is verbatim ); add a option per row (options are FIXED at 4 — extra rows are reached via ). Everything structured goes in the chat markdown of Output 1; the field stays a single plain sentence. → , copy verbatim.
(checked supported… / org check skipped…)questionquestionFound matches. Pick one:Use existing:Provide an FQNquestionassets/discovery-prompts.mdRouting after the user replies:
| User pick | Next action |
|---|---|
| Go to step 1e with |
| Ask the follow-up in |
| Continue to step 2 → step 3. |
| Emit |
STRICTLY DO NOT print the pick list and announce "proceeding to create a new one" in the same message. The user picks, not you.
1a. 解析项目上下文(代理内部操作)
读取。取并追加 → 。包存储在目录下。若缺失,根据§调用约定输出结果,提示信息为,打印该提示并终止。
sfdx-project.jsonpackageDirectories[0].path/main/default<sfdx-source><sfdx-source>/contentTypes/sfdx-project.jsonerror这不是一个SFDX项目 — 请打开项目根目录后重新运行。显式FQN快速路径(用户直接调用)。调用方未传入但消息中明确包含格式的令牌(如、)→ 将其捕获为并直接路由到步骤1e,跳过步骤1b/1c/1d。与委托调用的形式一致。
fqnnamespace__DeveloperNamesfdc_cms__newsc__PressReleasefqn{fqn}残留意图捕获(代理内部操作)。扫描消息中由//连接的第二个分句,或针对内容记录的第二个祈使动词(如)。若存在,将其存储为 — 步骤8的“是”分支会将其作为转发。请勿在步骤8前打印或执行该意图。
and alsoand thenthen创建<类型>并同时创建关于X的<内容>residualIntentintent1b. 本地发现(静默)
使用目录列表功能( / 对执行 / IDE的),而非内容搜索/grep工具 — 内容搜索会遗漏仅文件夹名称匹配的结果。对于每个子文件夹,读取(获取 + )。按意图语义匹配:根据内容领域进行推理,而非字面字符串 — 名为的文件夹即使没有字面属性匹配,也属于市场相关请求的匹配结果。将所有语义匹配的本地包返回至(步骤1d的排序和5行限制会处理其余结果)。无匹配结果 → 返回空列表(用户直接调用时自动继续)。
list_files<sfdx-source>/contentTypes/*/schema.jsonGloblist_directoryschema.jsontitledescriptionMarketPlacecombined原理、反模式、工具选择细节详见。
references/discovery-details.md#1b1c. 组织端发现(静默 — 调度,结合)
metadata-grounding.search_metadatacontent-readonly.get_content_types_for_workspace调度规则:1c是工具调用,不是思考过程。请勿因步骤1b找到本地匹配结果而跳过本步骤 — 组织中可能存在同名包(“名称已存在”错误源于此)。必须无条件执行;仅当工具真正中断时才可豁免。绝不询问“是否要搜索?”。
search_metadataquerymetadataType: "ContentTypeBundle"sfdc_cmsc____content typebundlemetadatacmsexperience-cms-content-generatereferences/discovery-query-rules.md服务器目标:(规则1)。,按OOTB优先排序。
metadata-groundinglimit=5步骤1c中禁止调度。返回步骤1d表格所需的全部信息(FQN、描述、OOTB标记)。仅在步骤1e中获取OOTB架构时才是必要的 — 按需调度,仅针对选中的FQN。逐行调度会造成N次不必要的往返请求。
query_metadatasearch_metadataquery_metadata工作区内容类型检查 — 每次运行都调度,作为grounding的补充或替代。调用参数遵循互斥约定(§调用约定),绝不将与/同时传入。流程1(grounding可用) — 同时调度;组织候选集 = 两个FQN集合的交集(空集合法,无需扩大范围/重试)。流程2(grounding不可用) — 直接调度该工具作为唯一的组织端信号,对其结果应用步骤1b的语义匹配规则,在代理内部记录用于步骤1d的真实性校验。这两个工具都无法替代步骤1e的检索操作。调用形式、不可用处理、原理详见。
baseTypespaceIdfolderIdget_content_types_for_workspacegroundingFallback=workspaceTypesreferences/discovery-details.md#1c continued1d. 始终展示发现结果 — 包括“无匹配”情况
发现流程是第一个对用户可见的信号。必须始终告知用户检查了哪些内容以及发现了什么。所有情况(A/B/C)都通过展示选择列表,并等待用户在下一回合回复。
ask_user_tool真实性校验 — 步骤1d的表述必须与步骤1c的实际操作一致。绝不声称本回合未执行的检查;也绝不披露未发生的跳过操作。分为三种情况:
- 已调度(流程1,无论
search_metadata结果如何)→ 通过grounding检查了组织端。无需额外说明。get_content_types_for_workspace - 不可用但已调度
search_metadata(流程2 /get_content_types_for_workspace)→ 已检查组织端,只是未通过grounding。根据groundingFallback=workspaceTypes追加assets/discovery-prompts.md。(已检查此工作区支持的内容类型 — metadata-grounding不可用) - 两者均不可用 → 未检查组织端。根据追加
assets/discovery-prompts.md。(已跳过组织端检查 — grounding不可用)
详见。
references/discovery-details.md#1d提供FQNshowFqnOption提供FQNsuppressCreateContentPrompt === truefqn否则(用户直接调用且无匹配结果)→ ;跳过选择提示,打印一行信息,自动进入步骤2。当用户直接请求创建全新类型且无匹配结果时,提供FQN输入选项会偏离用户目标。
showFqnOption = false用户直接调用无匹配结果时的意图合理性校验。自动继续前,从消息中提取至少一个可识别的内容领域名词(真实单词、命名实体或复合领域词汇 — 不是无意义字符,也不是去除////等机械名词后的纯填充词)。若提取到≥1个可识别名词 → 进入步骤2→3,步骤3的提议名称仅由这些令牌构建。若为无意义字符/纯填充词 → 请勿自动继续;询问用户,提供+自由文本输入选项;自由文本输入会重新启动步骤1b,→ 输出结果。当步骤1c的重构查询为空时,同样适用该校验规则 — 绝不调度空白的。严格禁止从消息中不存在的令牌生成名称。完整规则+示例详见。
content typebundleCMSschemametadata你的请求“<原始消息>”未指定内容领域。你想要创建哪种内容类型(例如:新闻、博客、新闻稿、产品)?取消取消cancelledsearch_metadatareferences/discovery-details.md#1d提示模板(有匹配结果、无匹配结果用户直接调用自动继续、无匹配结果委托调用、“提供FQN”后续提示)详见。请严格复制原文。
assets/discovery-prompts.md步骤1d输出格式 — 两个独立输出,绝不合并(这是排名第一的UX缺陷):
- 首先输出聊天markdown — 标题 +
Top <N> matching content types:表格(FQN | 描述 | 位置中的Output 1)。为纯聊天文本,不是工具输出。assets/discovery-prompts.md - 然后输出,其
ask_user_tool字段必须严格为question(逐字复制,简短句子),包含4个固定选项:Found matches. Pick one:/Use existing: <row-1 FQN>/Provide an FQN/Create new: <newName>。Cancel
严格禁止:在表格之前或替代表格写入任何前置说明/描述性句子;将表格、列或后缀放入字段(会渲染为无格式的单行文本 — 这是已报告的格式混乱问题);改写或“优化”字段(必须严格为);为每行添加一个选项(选项固定为4个 — 额外行通过选项访问)。所有结构化内容放入Output 1的聊天markdown中;字段保持为单个纯文本句子。详见,请严格复制原文。
(已检查支持的… / 已跳过组织端检查…)questionquestionFound matches. Pick one:Use existing:Provide an FQNquestionassets/discovery-prompts.md用户回复后的路由:
| 用户选择 | 后续操作 |
|---|---|
| 进入步骤1e, |
| 根据 |
| 继续进入步骤2 → 步骤3。 |
| 根据§调用约定输出 |
严格禁止在同一消息中打印选择列表并宣布“将继续创建新类型”。由用户选择,而非代理自行决定。
1e. Retrieve and reconcile
1e. 检索并协调
Reached when 1d resolves to a match / provided FQN, OR when the caller invoked with . Goal: return matching the org.
{fqn}{fqn, schema}Namespace gate:
- Custom FQN (, non-platform namespace) → run
c__*. Always retrieve for custom.sf project retrieve start --metadata ContentTypeBundle:<DeveloperName> --target-org <alias> --json - OOTB FQN () → skip
sfdc_cms__*(returns nothing usable). This branch needs a livesf project retrieve startschema, regardless of which flow surfaced the FQN —metadata-grounding(Flow 2) never returns a schema, onlyget_content_types_for_workspace. If 1c already recorded{fqn, name, description}, do NOT attemptgrounding=unavailable— go straight to the error below. Otherwise dispatchquery_metadataNOW for the picked FQN only, and resolve the schema from its response (fall back toquery_metadata({ metadataType: "ContentTypeBundle", id: "<grounding row id from 1c>" })if it returns no schema payload). If that response is error/empty/non-schema, surfacedescribe_metadataand exit withCan't resolve OOTB FQN "<fqn>" without a real schema from metadata-grounding. Retry when grounding is back, or provide a custom FQN.. Never fabricate OOTB schemas from training data — "sfdc_cms__news typically has title/body/summary…" IS the bug thought that poisons 3–7. Fail closed. Full rule →error§ Namespace gate.references/retrieve-and-reconcile.md
Reconciliation — compare retrieved schema against . Full matrix + drift template + routing → .
<sfdx-source>/contentTypes/<DeveloperName>/schema.jsonreferences/retrieve-and-reconcile.mdRouting outcomes:
- Not in local, retrieved → write local, return .
{fqn, schema=retrieved} - In both, match → return .
{fqn, schema=local} - In both, differ → drift prompt (→ step 5/7;
Deploy local to org→ replace files, return;Overwrite local with org→ exit).Cancel - In local only → print step 7.5 summary first (user sees what they'd deploy), then offer deploy (5/7) or cancel.
- In neither → re-dispatch 1d pick with option.
Try a different FQN
On success, return and continue to 7.5 → 8. No proposal-of-fields, no re-validation — reconciled schema is source of truth. Create-only for new; reconcile-only for existing.
{fqn, schema}"Create new" in 1d is the ONLY path that proceeds to step 2.
当步骤1d解析为匹配结果/用户提供的FQN,或调用方以形式调用时进入本步骤。目标:返回与组织端匹配的。
{fqn}{fqn, schema}命名空间校验:
- 自定义FQN(,非平台命名空间)→ 执行
c__*。自定义类型必须始终执行检索。sf project retrieve start --metadata ContentTypeBundle:<DeveloperName> --target-org <alias> --json - OOTB FQN()→ 跳过
sfdc_cms__*(返回的内容无法使用)。无论通过哪种流程得到该FQN,此分支都需要实时的sf project retrieve start架构 —metadata-grounding(流程2)从不返回架构,仅返回get_content_types_for_workspace。若步骤1c已记录{fqn, name, description},请勿尝试grounding=unavailable— 直接进入下方错误流程。否则,立即为选中的FQN调度query_metadata,并从响应中解析架构(若未返回架构负载,回退到query_metadata({ metadataType: "ContentTypeBundle", id: "<步骤1c中grounding行的id>" }))。若响应为错误/空/非架构内容,提示用户describe_metadata并以无法从metadata-grounding获取真实架构,无法解析OOTB FQN "<fqn>"。请在grounding恢复后重试,或提供自定义FQN。结果终止。绝不从训练数据生成OOTB架构 — “sfdc_cms__news通常包含title/body/summary……”是导致步骤3–7出错的错误思路。失败时直接终止。完整规则详见error§命名空间校验。references/retrieve-and-reconcile.md
协调操作 — 将检索到的架构与进行比较。完整矩阵+差异模板+路由规则详见。
<sfdx-source>/contentTypes/<DeveloperName>/schema.jsonreferences/retrieve-and-reconcile.md路由结果:
- 本地不存在,已检索到 → 写入本地,返回。
{fqn, schema=retrieved} - 本地和组织端均存在,且匹配 → 返回。
{fqn, schema=local} - 本地和组织端均存在,但不匹配 → 显示差异提示(→步骤5/7;
将本地版本部署到组织→替换文件并返回;用组织版本覆盖本地→终止)。取消 - 仅本地存在 → 先打印步骤7.5的摘要(让用户了解将要部署的内容),然后提供部署(步骤5/7)或取消选项。
- 两者均不存在 → 重新调度步骤1d的选择列表,添加选项。
尝试其他FQN
成功后,返回并继续进入步骤7.5 → 8。无需提议字段,无需重新验证 — 协调后的架构为可信源。仅为新类型执行创建操作;仅为现有类型执行协调操作。
{fqn, schema}步骤1d中的“创建新类型”是唯一进入步骤2的路径。
2. Resolve target org
2. 解析目标组织
Prefer the SF CLI default (alias from or in ). Resolve to and pass as on every call. When a default is set, this step is silent.
sf config set target-org=<alias>defaultUsernamesfdx-project.json<orgAlias>--target-org <orgAlias>sfNo default — fallback: run (silent):
sf org list --json- Zero authenticated orgs → emit with message
error, print, stop.No authenticated Salesforce org found. Run sf org login web and re-run. - Exactly one → use silently as . Do not modify
<orgAlias>.sf config - Two or more → dispatch with question
ask_user_tooland one option per org labelledNo default Salesforce org is set. Pick the org to use for this run:, plus<alias> (<username>) [<devhub|sandbox|scratch|prod>]. On pick, use asCancelfor this run only (do NOT run<orgAlias>).sf config set target-org=…→ emitCancelcancelled,Cancelled. No files written..Task Completed
The picked alias applies to every subsequent call this run (1e retrieve, 5 dry-run, 7 deploy).
sf优先使用SF CLI默认组织(来自或中的)。解析为,并在每次调用中作为传入。当已设置默认组织时,本步骤静默执行。
sf config set target-org=<alias>sfdx-project.jsondefaultUsername<orgAlias>sf--target-org <orgAlias>无默认组织 — 回退方案: 执行(静默):
sf org list --json- 无已认证组织 → 输出结果,提示信息为
error,打印该提示并终止。未找到已认证的Salesforce组织。请运行sf org login web后重新尝试。 - 仅一个已认证组织 → 静默使用该组织作为。请勿修改
<orgAlias>。sf config - 两个及以上已认证组织 → 调度,问题为
ask_user_tool,每个组织对应一个选项,格式为未设置默认Salesforce组织。请选择本次运行使用的组织:,同时提供<alias> (<username>) [<devhub|sandbox|scratch|prod>]选项。用户选择后,仅在本次运行中使用该取消(请勿执行<orgAlias>)。sf config set target-org=…→ 输出取消结果,打印cancelled,然后输出已取消。未写入任何文件。。Task Completed
选中的别名适用于本次运行中所有后续调用(步骤1e的检索、步骤5的预部署验证、步骤7的部署)。
sf3. Propose fields and get user approval
3. 提议字段并获取用户确认
Preconditions: 1c dispatched (or recorded ), and 1d resolved to in the previous turn. Other 1d picks route elsewhere: / → 1e; → emit .
search_metadatagrounding=unavailableCreate new: <contentTypeName>Use existingProvide an FQNCancelcancelledIf you just printed a pick list via and the user hasn't replied, stop — your turn is over.
ask_user_tool3a. Determine field properties (agent-internal). Set (camelCase), (human-readable), , . Default-minimal: no , , length/range bounds, , , unless the user asked.
apiNametitlelightning:typerequiredlightning:textIndexedlightning:localizableenumconstplaceholderTextContent-type name must be derivable from the user's message. and its must be built from tokens actually present (PascalCase/word-order shaping OK — → ). STRICTLY DO NOT invent from thin air, from an unrelated open tab, or from prior-session context. If 1d's sanity gate passed but the noun set is thin (one word), use that word — do not embellish. Proposing a name with tokens absent from the message IS the hallucination anti-pattern; stop and restart 1d's gate.
<contentTypeName>titlelaptop reviewLaptopReviewInitialize agent-internally. Governs step 6's branching. Flipped to only when the user types free-text edits in the 3b loop (see ). → without typing any edit leaves it — proposal accepted unchanged.
userEditedFields = falsetruereferences/edit-fields-loop.mdEdit fieldsApprove as shownfalse3b. Present proposed fields — markdown table FIRST as chat-visible text, THEN in the same turn. Do NOT collapse the table into the tool prompt — the UI strips formatting and the user cannot approve informed.
ask_user_toolMessage 1 (chat-visible plain text):
text
Proposed fields for `<contentTypeName>` at `<sfdx-source>/contentTypes/<contentTypeName>/`:
| # | API name | Type | Required | Constraints | Title |
|---|---|---|---|---|---|
| 1 | `title` | `lightning__textType` | yes | maxLength: 200 | Title |
| 2 | `body` | `lightning__richTextType` | yes | — | Body |Constraints format follows 7.5 (see ): comma-separated pairs for any per-field constraint asked or proposed — , , , , , , , , etc. Use when a field has no constraints beyond .
references/schema-summary-format.mdkey: valuemaxLengthminLengthminimummaximumenumconstlightning:localizablelightning:allowedUrlSchemes—requiredMessage 2 (same turn): dispatch with question and options , , .
ask_user_toolApprove these fields, edit them, or cancel?ApproveEdit fieldsCancel- → step 4.
Approve - → follow the loop below. Loop until approved.
Edit fields - → emit
Cancelcancelled,Cancelled. No files written..Task Completed
Edit-fields loop — each round reprints the current table (chat-visible), then dispatches with / options and accepts free-text edit instructions. Free-text tool result IS the edit instructions — parse and apply, then loop; do NOT stop. Full template + anti-stop guidance → .
ask_user_toolApprove as shownCancelreferences/edit-fields-loop.md前置条件:步骤1c已调度(或已记录),且步骤1d在上一回合解析为。步骤1d的其他选择会路由到其他路径:/→步骤1e;→输出结果。
search_metadatagrounding=unavailableCreate new: <contentTypeName>使用现有类型提供FQN取消cancelled若你刚通过打印了选择列表但用户尚未回复,请停止操作 — 你的回合已结束。
ask_user_tool3a. 确定字段属性(代理内部操作)。设置(驼峰式)、(人类可读)、、。默认最小配置:除非用户要求,否则不设置、、长度/范围限制、、、。
apiNametitlelightning:typerequiredlightning:textIndexedlightning:localizableenumconstplaceholderText内容类型名称必须可从用户消息推导。及其必须由消息中实际存在的令牌构建(允许使用大驼峰式/调整词序 — 如→)。严格禁止凭空生成,或从无关的打开标签页、会话上下文生成。若步骤1d的合理性校验通过但名词集合较少(仅一个单词),则使用该单词 — 请勿添加额外内容。提议包含消息中不存在的令牌的名称属于幻觉反模式;请停止操作并重新执行步骤1d的校验。
<contentTypeName>titlelaptop reviewLaptopReview在代理内部初始化。该变量控制步骤6的分支逻辑。仅当用户在步骤3b的循环中输入自由文本编辑内容时,才将其设为(详见)。选择→但未输入任何编辑内容时,保持 — 表示接受提议的原始内容。
userEditedFields = falsetruereferences/edit-fields-loop.md编辑字段按当前展示确认false3b. 展示提议字段 — 先输出markdown表格作为可见聊天文本,再在同一回合输出。请勿将表格合并到工具提示中 — UI会去除格式,导致用户无法做出知情确认。
ask_user_tool消息1(可见聊天文本):
text
为`<contentTypeName>`提议的字段,存储路径为`<sfdx-source>/contentTypes/<contentTypeName>/`:
| # | API名称 | 类型 | 必填 | 约束 | 标题 |
|---|---|---|---|---|---|
| 1 | `title` | `lightning__textType` | 是 | maxLength: 200 | 标题 |
| 2 | `body` | `lightning__richTextType` | 是 | — | 正文 |约束格式遵循步骤7.5的规则(详见):以逗号分隔的对,表示用户要求或提议的每个字段约束 — 如、、、、、、、等。当字段除外无其他约束时,使用表示。
references/schema-summary-format.mdkey: valuemaxLengthminLengthminimummaximumenumconstlightning:localizablelightning:allowedUrlSchemesrequired—消息2(同一回合):调度,问题为,选项为、、。
ask_user_tool是否确认这些字段,编辑它们,或取消?确认编辑字段取消- → 进入步骤4。
确认 - → 遵循下方循环逻辑。循环直到用户确认。
编辑字段 - → 输出
取消结果,打印cancelled,然后输出已取消。未写入任何文件。。Task Completed
字段编辑循环 — 每一轮都重新打印当前表格(可见聊天文本),然后调度提供/选项,并接受自由文本编辑指令。自由文本工具结果即为编辑指令 — 解析并应用后继续循环;请勿停止。完整模板+禁止停止的指导说明详见。
ask_user_tool按当前展示确认取消references/edit-fields-loop.md4. Create files (silent — confirm in two lines max)
4. 创建文件(静默 — 最多用两行确认)
Precondition: step 3b returned the user's in the immediately preceding turn. No file write before approval.
ApproveCreate . Use the already-loaded (per § Schema rules — do NOT re-fetch a sibling ). Generate for the approved fields and with exactly these four lines, swapping only :
<sfdx-source>/contentTypes/<contentTypeName>/assets/schema-example.jsonschema.jsonschema.json<contentTypeName>.contentTypeBundle-meta.xml<masterLabel>xml
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel><contentTypeName></masterLabel>
</ContentTypeBundle>Do NOT add , , , , or any legacy SOAP element — those fail the validator. Per-field forbidden keys (, , , empty ) → .
<displayName><description><contentTypeFields><fieldType>typeformatdefaultlightning:uiOptionsreferences/schema-rules.mdAfter writing, print exactly two lines:
text
Created <sfdx-source>/contentTypes/<contentTypeName>/schema.json
Created <sfdx-source>/contentTypes/<contentTypeName>/<contentTypeName>.contentTypeBundle-meta.xmlThen proceed to step 5. Before dispatching 5a, run the pre-deploy schema checklist in (agent-internal, do not print). Fix in place and re-check.
references/pre-deploy-checklist.md前置条件:步骤3b在上一回合返回用户的操作。确认前请勿写入任何文件。
确认创建目录。使用已加载的(根据§架构规则 — 请勿重新获取同级的)。为确认的字段生成,并生成,该文件仅包含以下四行,仅替换:
<sfdx-source>/contentTypes/<contentTypeName>/assets/schema-example.jsonschema.jsonschema.json<contentTypeName>.contentTypeBundle-meta.xml<masterLabel>xml
<?xml version="1.0" encoding="UTF-8"?>
<ContentTypeBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<masterLabel><contentTypeName></masterLabel>
</ContentTypeBundle>请勿添加、、、或任何遗留SOAP元素 — 这些会导致验证失败。每个字段禁止使用的键(如、、、空)详见。
<displayName><description><contentTypeFields><fieldType>typeformatdefaultlightning:uiOptionsreferences/schema-rules.md写入文件后,打印以下两行:
text
已创建 <sfdx-source>/contentTypes/<contentTypeName>/schema.json
已创建 <sfdx-source>/contentTypes/<contentTypeName>/<contentTypeName>.contentTypeBundle-meta.xml然后进入步骤5。调度步骤5a前,执行中的预部署架构检查清单(代理内部操作,请勿打印)。就地修复问题并重新检查。
references/pre-deploy-checklist.md5. Validate (mandatory)
5. 验证(必填)
Step 5 is unconditional. Skip only if step 1d ended with . does not skip step 5 (different auth path). Do not suggest the dry-run as a command for the user to run — you run it.
Use existinggrounding=unavailable5a. Run (no preamble in chat):
bash
sf project deploy start --source-dir <sfdx-source>/contentTypes/<contentTypeName> --target-org <orgAlias> --dry-run --json5b. Result handling:
- → print one line:
result.status === "Succeeded"This is NOT a terminal state — your next action is step 7a'sValidated against <org>: Succeeded (dry-run — nothing deployed yet)..ask_user_tool - with
result.status === "Failed"→ step 6 (auto-fix).componentFailures - with zero
result.status === "Failed"→ CLI/auth issue. Show the raw response, ask the user to verifycomponentFailures, source path, andsf org list. Do not count as one of the 3 attempts.sfdx-project.json
步骤5为无条件执行。仅当步骤1d以结束时才可跳过。不跳过步骤5(认证路径不同)。请勿建议用户自行运行预部署命令 — 由代理执行。
使用现有类型grounding=unavailable5a. 执行命令(聊天窗口无前置说明):
bash
sf project deploy start --source-dir <sfdx-source>/contentTypes/<contentTypeName> --target-org <orgAlias> --dry-run --json5b. 结果处理:
- → 打印一行:
result.status === "Succeeded"这不是终端状态 — 下一步操作是步骤7a的已针对<org>验证:成功(预部署 — 尚未部署任何内容)。。ask_user_tool - 且包含
result.status === "Failed"→ 进入步骤6(自动修复)。componentFailures - 且无
result.status === "Failed"→ CLI/认证问题。展示原始响应,询问用户确认componentFailures、源路径和sf org list。不计入3次尝试次数。sfdx-project.json
6. Fix validator failures — silent auto-fix or ask-first, based on userEditedFields
userEditedFields6. 修复验证失败 — 根据userEditedFields
执行静默自动修复或先询问用户
userEditedFieldsBranches on (set in 3a). The split reflects who authored the broken schema:
userEditedFields- → user accepted the agent's proposal unchanged. Validator failure is the agent's mistake. Silent auto-fix.
false - → user typed edits in 3b. Failure may reflect intent (e.g.
trueon integer,enumon text) only the user can resolve. Show planned fixes, ask first.default
Both branches share the sweep-the-whole-schema principle and the 3-attempt cap on agent-driven fixes. Each attempt fixes every problem the validator could possibly flag across the whole schema, not one field at a time — validators only report 1–2 errors per pass; don't fall into one-field-per-attempt. Error-to-fix mapping (incl. safe vs. intent-changing ) → .
Kindreferences/deployment-errors.md6a. Silent auto-fix ()
userEditedFields === false- Read every .
componentFailures[].problem - Sweep for the same class of issue. E.g. one
properties→ audit allplaceholderText missing; onelightning:uiOptionsrejected → stripformat/type/formatfrom every field; one disallowed type-specific key → audit every field of thatdefault.lightning:type - Re-write once, re-run step 5 once. Counts as one of 3 attempts.
If still failing after 3 attempts: surface the last error and route to 6b's follow-up. On abandon / exit without successful validation, emit with the last validator error as , stop.
Let me editerrormessage6b. Ask-before-fix () — show planned fixes
userEditedFields === trueThe user authored something the validator rejected. Do NOT silently rewrite their intent.
Message 1 (chat-visible plain text, NOT in ) — enumerate every , look up fixes in :
ask_user_toolcomponentFailures[].problemreferences/deployment-errors.mdtext
Validation failed on your edited schema. Planned fixes:
✗ <field>: <one-line error description>
Planned: <fix> (<impact>)
✗ <field2>: …
Planned: …Include EVERY error this pass, grouped by field. When a fix drops/changes a user-authored constraint (, , , numeric bound, type swap), the parenthetical MUST state the concrete consequence — "loses numeric ordering", "no longer restricted to enum values", "text won't localize" — not "changes the type." Kind=safe fixes ( strip, / strip, ) get the literal .
enumconstlightning:localizabledefaulttypeformatallowedUrlSchemes: ["https"]safe: validator hygiene, no intent changeMessage 2 (same turn) — dispatch with question and options / / .
ask_user_toolHow would you like to proceed?Apply these fixes and continueLet me edit — I'll fix it, then re-validateCancelRoute:
- → apply exactly the fixes shown, re-write once, re-run 5 once. Counts as one of 3 attempts. Success → 7a. Fail → loop back to top of 6b with the new errors (
Apply these fixes and continuestaysuserEditedFields).true - → print file paths from step 4's two-line confirmation and validator errors verbatim, dispatch
Let me editwith questionask_user_tooland optionsReply when you're done editing./Re-validate.Cancel→ re-run step 5 (user-driven cycles do NOT count against 3 attempts).Re-validate→ emitCancelcancelled,Cancelled. Your edits remain at <sfdx-source>/contentTypes/<contentTypeName>/. Do NOT delete the files.Task Completed - → emit
Cancelcancelled,Cancelled. No files written..Task Completed
If the 3-attempt cap on is exhausted: surface the last error and route to the follow-up (do NOT re-offer ). On subsequent , emit with the last validator error as , stop.
Apply these fixesLet me editApply these fixesCancelerrormessage根据(步骤3a中设置)进行分支。该区分反映了谁创建了有问题的架构:
userEditedFields- → 用户未修改代理的提议内容。验证失败是代理的错误。执行静默自动修复。
false - → 用户在步骤3b中输入了编辑内容。失败可能反映了用户的意图(如对整数字段设置
true、对文本字段设置enum),只有用户才能解决。展示计划修复内容,先询问用户。default
两个分支都遵循全架构扫描原则,且代理驱动的修复最多尝试3次。每次尝试修复验证器可能标记的所有问题,而非逐个字段修复 — 验证器每次仅报告1–2个错误;请勿陷入逐个字段尝试的误区。错误到修复的映射(包括安全修复与改变意图的修复类型)详见。
references/deployment-errors.md6a. 静默自动修复()
userEditedFields === false- 读取每个。
componentFailures[].problem - 扫描查找同类问题。例如:一个
properties错误 → 检查所有placeholderText missing;一个lightning:uiOptions被拒绝 → 从所有字段中移除format/type/format;一个不允许的类型特定键 → 检查所有该default的字段。lightning:type - 一次性重写文件,重新执行步骤5一次。计入3次尝试次数。
若3次尝试后仍失败:展示最后一次错误并路由到步骤6b的后续流程。若放弃/未成功验证就退出,输出结果,为最后一次验证错误,然后终止。
让我编辑errormessage6b. 先询问再修复()— 展示计划修复内容
userEditedFields === true用户创建的内容被验证器拒绝。请勿静默改写用户的意图。
消息1(可见聊天文本,请勿放入) — 列出每个,在中查找修复方案:
ask_user_toolcomponentFailures[].problemreferences/deployment-errors.mdtext
你的编辑后的架构验证失败。计划修复内容:
✗ <字段>: <单行错误描述>
计划修复:<修复内容>(<影响>)
✗ <字段2>: …
计划修复:…列出本次验证的所有错误,按字段分组。当修复会删除/修改用户创建的约束(如、、、数值限制、类型转换)时,括号中必须明确说明具体后果 — 如“失去数值排序功能”、“不再限制为枚举值”、“文本无法本地化”,而非“修改类型”。安全类型的修复(如移除、移除/、设置)标注为。
enumconstlightning:localizabledefaulttypeformatallowedUrlSchemes: ["https"]安全:验证器合规处理,不改变意图消息2(同一回合) — 调度,问题为,选项为 / / 。
ask_user_tool你希望如何继续?应用这些修复并继续让我编辑 — 我会修复,然后重新验证取消路由:
- → 严格应用展示的修复内容,一次性重写文件,重新执行步骤5一次。计入3次尝试次数。成功 → 进入步骤7a。失败 → 回到步骤6b顶部,展示新错误(
应用这些修复并继续保持userEditedFields)。true - → 打印步骤4中两行确认的文件路径和验证错误原文,调度
让我编辑,问题为ask_user_tool,选项为编辑完成后回复。/重新验证。取消→ 重新执行步骤5(用户驱动的循环不计入3次尝试次数)。重新验证→ 输出取消结果,打印cancelled,然后输出已取消。你的编辑内容保留在<sfdx-source>/contentTypes/<contentTypeName>/。请勿删除文件。Task Completed - → 输出
取消结果,打印cancelled,然后输出已取消。未写入任何文件。。Task Completed
若的3次尝试次数耗尽:展示最后一次错误并路由到后续流程(请勿再次提供选项)。若用户后续选择,输出结果,为最后一次验证错误,然后终止。
应用这些修复让我编辑应用这些修复取消errormessage7. Deploy (yes/no — wait for the next user turn)
7. 部署(是/否 — 等待用户下一回合回复)
Step 5's success unlocks step 7; it does not replace it. Ask the user via before any deploy or terminal marker.
ask_user_tool7a. Dispatch :
ask_user_tool- Question:
Validation succeeded. Deploy "<contentTypeName>" to <org> now? - Options: /
Yes - deploy nowNo - I'll deploy later
7b. User says no: emit outcome and stop. Print one line —
not_deployedtext
Validated. Nothing deployed. To deploy later: sf project deploy start --source-dir <sfdx-source>/contentTypes/<contentTypeName> --target-org <orgAlias>Return outcome: . Do NOT run step 7.5 or step 8 — the type isn't in the org.
{ status: "not_deployed", fqn: "<namespace>__<contentTypeName>", schema: null, message: "<the line above>" }7c. User says yes: run
bash
sf project deploy start --source-dir <sfdx-source>/contentTypes/<contentTypeName> --target-org <orgAlias> --json7d. Deploy errors:
- With (rare — occurs after manual edits between validate and deploy, or transient org-side state change): route to step 6's branch matching the current
componentFailuresflag. Because reaching 7d always follows at least one user-visible turn (step 7a'suserEditedFields), the flag is authoritative for who last authored the file. On successful re-validation, re-ask step 7a's deploy prompt. On unrecoverable failure (auto-fix exhausted then cancelled, or user cancelled in 6b), emitYes - deploy nowoutcome per § Invocation contract with the last validator error as theerror, then stop.message - With zero (auth/network): emit
componentFailuresoutcome per § Invocation contract with the raw response summary as theerror, then stop.message
7e. Success: print one line — This is a terminal state — the outcome to emit at task end is . Continue to step 7.5. Do not run any other command between here and step 7.5 (see Rule 4).
Deployed <contentTypeName> to <org>. Component IDs: <ids>.success{ status: "success", fqn: "<namespace>__<contentTypeName>", schema: <the just-deployed schema>, message: "<the line above>" }步骤5成功后解锁步骤7;步骤5无法替代步骤7。执行任何部署或终端标记前,通过询问用户。
ask_user_tool7a. 调度:
ask_user_tool- 问题:
验证成功。是否立即将“<contentTypeName>”部署到<org>? - 选项:/
是 — 立即部署否 — 稍后部署
7b. 用户选择否:输出结果并终止。打印一行 —
not_deployedtext
已验证。未部署任何内容。稍后部署请执行:sf project deploy start --source-dir <sfdx-source>/contentTypes/<contentTypeName> --target-org <orgAlias>返回结果:。请勿执行步骤7.5或步骤8 — 该类型尚未部署到组织中。
{ status: "not_deployed", fqn: "<namespace>__<contentTypeName>", schema: null, message: "<上述行内容>" }7c. 用户选择是:执行命令
bash
sf project deploy start --source-dir <sfdx-source>/contentTypes/<contentTypeName> --target-org <orgAlias> --json7d. 部署错误:
- 包含(罕见 — 发生在验证和部署之间用户手动编辑内容,或组织端状态临时变化):根据当前
componentFailures标记路由到步骤6的对应分支。因为进入步骤7d前必然经过至少一次用户可见的回合(步骤7a的userEditedFields),该标记可权威说明谁最后编辑了文件。重新验证成功后,重新询问步骤7a的部署提示。若无法恢复(自动修复次数耗尽后取消,或用户在步骤6b中取消),根据§调用约定输出是 — 立即部署结果,error为最后一次验证错误,然后终止。message - 无(认证/网络问题):根据§调用约定输出
componentFailures结果,error为原始响应摘要,然后终止。message
7e. 部署成功:打印一行 — 这是终端状态 — 任务结束时输出的结果为。继续进入步骤7.5。请勿在此时到步骤7.5之间执行任何其他命令(见规则4)。
已将<contentTypeName>部署到<org>。组件ID:<ids>。success{ status: "success", fqn: "<namespace>__<contentTypeName>", schema: <刚部署的架构>, message: "<上述行内容>" }7.5. Schema summary (on every resolved-schema path)
7.5. 架构摘要(所有已解析架构的路径均执行)
Runs whenever has resolved, regardless of source or of — informational, not a turn. Run ONCE per run — track agent-internally; 1e's "local only" branch prints it before deploy-or-cancel, so a subsequent 7e must not re-trigger it.
{fqn, schema}suppressCreateContentPromptsummaryPrintedRun when: 1e returned with non-null schema; 7e succeeded; 1e's drift-prompt "Deploy local to org" reached 7e; or 1e's "local only" branch before deploy-or-cancel. Apply the gate.
{fqn, schema}summaryPrintedDo NOT run when: user picked , 7b (deploy-later), any error path with no resolved schema, or .
CancelsummaryPrinted === truePrint as chat text (NOT in ):
ask_user_tooltext
Content type "<fqn>" is ready. Schema:
| # | API name | Type | Required | Constraints | Title |
|---|---|---|---|---|---|
| 1 | `title` | `lightning__textType` | yes | maxLength: 200 | Title |
| 2 | `body` | `lightning__richTextType` | yes | — | Body |Column definitions, constraint rules, sort/truncation (20-property cap), do-not-print list → .
references/schema-summary-format.mdContinue immediately to step 8 (no separate turn, no intermediate prompt).
只要已解析,无论来源如何或设置如何,都会执行本步骤 — 仅作信息展示,不占用回合。每次运行仅执行一次 — 在代理内部跟踪;步骤1e的“仅本地存在”分支会在部署或取消前打印摘要,因此后续步骤7e不得重新触发。
{fqn, schema}suppressCreateContentPromptsummaryPrinted在以下情况执行:步骤1e返回且schema非空;步骤7e部署成功;步骤1e的差异提示“将本地版本部署到组织”进入步骤7e;或步骤1e的“仅本地存在”分支在部署或取消前。受控制。
{fqn, schema}summaryPrinted在以下情况不执行:用户选择、步骤7b(稍后部署)、任何无已解析架构的错误路径,或。
取消summaryPrinted === true打印为聊天文本(请勿放入):
ask_user_tooltext
内容类型“<fqn>”已就绪。架构如下:
| # | API名称 | 类型 | 必填 | 约束 | 标题 |
|---|---|---|---|---|---|
| 1 | `title` | `lightning__textType` | 是 | maxLength: 200 | 标题 |
| 2 | `body` | `lightning__richTextType` | 是 | — | 正文 |列定义、约束规则、排序/截断规则(最多20个属性)、禁止打印列表详见。
references/schema-summary-format.md立即继续进入步骤8(无需单独回合,无需中间提示)。
8. Trailing "create content?" prompt (gated by suppressCreateContentPrompt
)
suppressCreateContentPrompt8. 末尾“创建内容?”提示(受suppressCreateContentPrompt
控制)
suppressCreateContentPromptReached only from — step 8 controls only whether an extra prompt is shown after it. Gate: → skip entirely, emit + (the prompt would duplicate a turn the caller already drives). Otherwise run when success came via: 1e returned , 7e succeeded, or 1e drift-prompt "Deploy local to org" reached 7e. Do NOT run on (), 7b (), or any error path ().
successsuppressCreateContentPrompt === truesuccessTask Completed{fqn, schema}Cancelcancellednot_deployederrorDispatch with question and options / .
ask_user_toolWould you like to create content using "<fqn>" now?Yes — create content nowNo — I'm done- → hand off to
Yeswithexperience-cms-content-generate; also pass{ fqn, schema, suppressCreateContentPrompt: true }when 1a captured one (e.g.intent: <residualIntent>→ forwardcreate a news type and also create an article about our Q4 launch). Omitcreate an article about our Q4 launchwhen no residual. Don't loop back. Emitintent+success.Task Completed No, emitDone. FQN: <fqn>.,success.Task Completed
Do not run any command after step 8 resolves (Rule 4).
仅从状态进入本步骤 — 步骤8仅控制是否在成功后展示额外提示。控制规则: → 完全跳过,输出 + (该提示会与调用方已驱动的回合重复)。否则,在以下成功场景执行:步骤1e返回、步骤7e部署成功、或步骤1e的差异提示“将本地版本部署到组织”进入步骤7e。请勿在()、步骤7b()或任何错误路径()执行。
successsuppressCreateContentPrompt === truesuccessTask Completed{fqn, schema}取消cancellednot_deployederror调度,问题为,选项为 / 。
ask_user_tool是否要立即使用“<fqn>”创建内容?是 — 立即创建内容否 — 已完成- → 将控制权移交
是,传入experience-cms-content-generate;若步骤1a捕获到{ fqn, schema, suppressCreateContentPrompt: true },同时传入residualIntent(如intent: <residualIntent>→ 转发创建新闻类型并同时创建关于Q4发布的文章)。无残留意图时省略创建关于Q4发布的文章。请勿返回本技能。输出intent+success。Task Completed - → 打印
否,输出已完成。FQN:<fqn>。,然后输出success。Task Completed
步骤8决议后请勿执行任何命令(规则4)。
Schema rules (validator truth)
架构规则(验证器标准)
CMS deploy validator is source of truth. Full ruleset → (root, per-field keys, sharp edge, per-type accepted keys, quirks). Load before step 4 and step 6.
references/schema-rules.mdlightning:uiOptionsAlso load before step 4 — canonical shape reference, every supported in default-minimal form. Do NOT use a sibling as reference just because step 1b/1e primed it in context — siblings carry user-specific constraints (, , indexing) that would leak in without justification.
assets/schema-example.jsonlightning:typeschema.jsonmaxLengthlightning:localizableNon-negotiables: root has (root only), no ; per-field only / / / + the type's accepted keys; never / / / empty ; only mixin.
unevaluatedProperties: false$schematitledescriptionlightning:typelightning:uiOptionstypeformatdefaultlightning:uiOptionssfdc_cms:metadataContentCMS部署验证器为权威标准。完整规则集详见****(根节点、每个字段的键、注意事项、每种类型允许的键、特殊情况)。执行步骤4和步骤6前加载该文件。
references/schema-rules.mdlightning:uiOptions执行步骤4前还需加载 — 这是规范格式参考,包含所有支持的的默认最小配置。请勿使用步骤1b/1e中加载的同级作为参考 — 同级文件包含用户特定的约束(如、、索引设置),会无理由地引入到新架构中。
assets/schema-example.jsonlightning:typeschema.jsonmaxLengthlightning:localizable不可协商的规则:根节点包含(仅根节点),无;每个字段仅包含/// + 该类型允许的键;绝不使用///空;仅使用混合类型。
unevaluatedProperties: false$schematitledescriptionlightning:typelightning:uiOptionstypeformatdefaultlightning:uiOptionssfdc_cms:metadataContentAnti-patterns
反模式
Full anti-pattern table (violation / rationalization / correct action) → . If you catch yourself thinking one of the "bug thoughts" listed there, STOP — that thought is the bug.
references/anti-patterns.md完整反模式表(违规行为/合理化解释/正确操作)详见。若你发现自己产生表中列出的“错误思路”,请立即停止 — 该思路本身就是问题。
references/anti-patterns.mdNotes
注意事项
- Folder name, , and the bundle's
<masterLabel>should be consistent (PascalCase folder, human-readable label and title).title - Avoid and
lightning__fileType— currently unsupported.lightning__contentReferenceType - Eval datasets live in , not in
packages/adk-eval/eval/domains/experience-cms-content-type-generate/.tests/evals/
- 文件夹名称、和包的
<masterLabel>应保持一致(文件夹使用大驼峰式,标签和标题为人类可读格式)。title - 避免使用和
lightning__fileType— 目前不支持。lightning__contentReferenceType - 评估数据集位于,而非
packages/adk-eval/eval/domains/experience-cms-content-type-generate/。tests/evals/
Reference file index
参考文件索引
- — mandatory progress checklist and tripwires.
references/agent-checklist.md - — validator ruleset (bundle root + per-field +
references/schema-rules.md+ per-type accepted keys + validator quirks).lightning:uiOptions - — agent-internal schema sanity check before step 5.
references/pre-deploy-checklist.md - — validator error → fix mapping (step 6).
references/deployment-errors.md - — bug-thought catalogue.
references/anti-patterns.md - — rationale for 1b/1c/1d rules.
references/discovery-details.md - — single source of truth for how the
references/discovery-query-rules.mdquery is constructed. Referenced from step 1c here AND from the parent skillsearch_metadata(as a drift-safety net).experience-cms-content-generate - — step 1e reconciliation table and drift routing.
references/retrieve-and-reconcile.md - — step 3b edit-loop template and routing table.
references/edit-fields-loop.md - — step 7.5 column/sort/truncation rules.
references/schema-summary-format.md - — step 1d pick-list template + zero-matches variants.
assets/discovery-prompts.md - — reference schema covering every supported
assets/schema-example.json.lightning:type
- — 必填进度检查清单和触发条件。
references/agent-checklist.md - — 验证器规则集(包根节点+每个字段+
references/schema-rules.md+每种类型允许的键+验证器特殊情况)。lightning:uiOptions - — 执行步骤5前代理内部的架构合理性检查清单。
references/pre-deploy-checklist.md - — 验证器错误→修复映射(步骤6)。
references/deployment-errors.md - — 错误思路汇总。
references/anti-patterns.md - — 步骤1b/1c/1d规则的原理。
references/discovery-details.md - —
references/discovery-query-rules.md查询构建的唯一权威标准。本步骤1c和父技能search_metadata(作为差异安全网)均引用该文件。experience-cms-content-generate - — 步骤1e的协调表和差异路由规则。
references/retrieve-and-reconcile.md - — 步骤3b编辑循环模板和路由表。
references/edit-fields-loop.md - — 步骤7.5的列/排序/截断规则。
references/schema-summary-format.md - — 步骤1d选择列表模板+无匹配结果变体。
assets/discovery-prompts.md - — 包含所有支持的
assets/schema-example.json的参考架构。lightning:type