"_doc":"retired-name references replaced with plugin-scoped layout. Machine-readable I/O contract for agentforce-architecture-analyze. Orchestrator code reads this file (not SKILL.md prose) to discover the input schema, output keys, STATUS enum, and error-contract rules. The architecture skill runs inline (no subagent).",
"_schema_notes":"3.1 (2026-05-05) canonicalizes `invocation_type` on STANDARD_ACTION / UNKNOWN nodes in the metadata tree. Prior versions split this across `raw_invocation_type` (bundle-sourced nodes) and `raw_action_type` (flow-actionCall-sourced nodes). Both legacy keys are still tolerated by readers for one release.",
"input":{
"required":{
"org_alias":{
"type":"string",
"description":"sf CLI alias (e.g. 'my-org-alias'). Auth is always derived via `sf org display --target-org $ORG_ALIAS --json`."
},
"agent_api_name":{
"type":"string",
"regex":"^[A-Za-z0-9_]+$",
"description":"BotDefinition.DeveloperName (e.g. 'MyAgent'). Must match the regex above; INVALID_INPUT otherwise."
}
},
"optional":{
"agent_version_api_name":{
"type":"string",
"description":"BotVersion.DeveloperName (e.g. 'v5'). When omitted, the agent auto-picks the Active version with the highest natural-key sort (v10 > v9); VERSION_AUTO_PICKED=true in the RESULT block."
},
"org_id_15":{
"type":"string",
"regex":"^[A-Za-z0-9]{15}$",
"description":"15-char org ID. If omitted, derived from `sf org display`."
},
"org_id_18":{
"type":"string",
"regex":"^[A-Za-z0-9]{18}$",
"description":"18-char org ID. If omitted, derived from `sf org display`."
},
"session_id":{
"type":"string",
"description":"Only used to name the ephemeral $WORK_DIR. Random UUID if omitted."
"description":"If true, ignore cache and rewrite. Default: false."
}
},
"minimum_viable":{
"org_alias":"my-org-alias",
"agent_api_name":"MyAgent"
},
"notes":[
"Standalone and orchestrated modes accept the same input fields; no renames.",
"To bypass cache, delete the cache entry or pass force_refresh: true."
]
},
"output":{
"format":"Two-part return message: (1) one-line prose status, (2) blank line, (3) === RESULT === key-value block. The KV block is always LAST in the output and always present.",
"parse_rule":"Find the line '=== RESULT ===', then read subsequent lines as KEY=VALUE pairs until EOF. Values are raw strings; no quoting; one pair per line.",
"description":"True iff agent_version_api_name was omitted and the agent auto-picked."
},
"AGENT_GENERATION":{
"type":"enum",
"presence":"always",
"values":["classic","nga","unknown"],
"description":"classic = AiCopilot__ planner, nga = Atlas__ planner, unknown = anything else / not resolved."
},
"BOT_ID":{
"type":"string",
"presence":"on_success_or_after_resolve",
"description":"18-char BotDefinition.Id from SOQL."
},
"ORG_ID_15":{
"type":"string",
"presence":"on_success_or_after_auth",
"description":"15-char org ID. Cache-key prefix."
},
"ORG_ID_18":{
"type":"string",
"presence":"on_success_or_after_auth",
"description":"18-char org ID (from `sf org display`)."
},
"OUTPUT_JSON_PATH":{
"type":"absolute_path",
"presence":"on_success",
"description":"Durable {agent}_{version}_metadata_tree.json path under the resolved data_root."
},
"OUTPUT_SUMMARY_PATH":{
"type":"absolute_path",
"presence":"always_empty",
"description":"Reserved — historically pointed at {agent}_{version}_metadata_tree.summary.md. Dropped in ; field is now always emitted empty for RESULT-block shape stability."
},
"CACHE_PATH":{
"type":"absolute_path",
"presence":"on_success_or_after_cache_check",
"description":"Cache dir ($CACHE_ROOT/$ORG_ID_15/$AGENT__$VERSION/). Ends with /."
},
"CACHE_HIT":{
"type":"boolean",
"presence":"on_success_or_after_cache_check",
"description":"True iff the cache was served without any Metadata API retrieves."
},
"CACHED_AT_UTC":{
"type":"iso8601_utc_or_empty",
"presence":"on_success_or_after_cache_check",
"description":"ISO-8601 UTC built-at time. On cache hit this is the age of the cached snapshot; on cold build this is the just-computed timestamp."
},
"NODE_COUNT":{
"type":"integer",
"presence":"on_success",
"description":"Total nodes in the declared_action_tree."
},
"DEPTH":{
"type":"integer",
"presence":"on_success",
"description":"Max depth of the tree (BOT_DEFINITION = depth 0)."
},
"PARTIAL":{
"type":"boolean",
"presence":"on_success",
"description":"True iff the tree is incomplete (planner unresolved OR MAX_WAVE hit). When true, STATUS=PARTIAL_OK."
},
"UNRESOLVED_COUNT":{
"type":"integer",
"presence":"on_success",
"description":"Length of tree._unresolved[]."
},
"AVAILABLE_BOTS":{
"type":"csv",
"presence":"on_AGENT_NOT_FOUND",
"description":"Comma-separated list of all BotDefinition.DeveloperName values in the org."
"description":"`sf org display` returned nothing, or a SOQL/Metadata call failed with an auth error. Caller must run `sf org login web --alias $ORG_ALIAS`.",