Review /Users/samaguiar/Documents/Projects/Repos/sail-litify/Litify_AI_Integration_Project/salesforce-metadata generated aiAuthoringBundles and scripts/generate-attorney-agentforce-bundles.mjs without editing files. Explain exactly how to add a document draft/prep advisor subagent/action consistently for all eight attorney bundles.
LITIFY_ORG is connected and a sample Matter query succeeded.scripts/generate-attorney-agentforce-bundles.mjs and the generated bundle files under force-app/main/default/aiAuthoringBundles.document_generation_advisor, go_to_document_generation_advisor, and the router rule for document generation/templates/drafting, but the current subagent is reasoning-only and has no action block.sf agent validate authoring-bundle --api-name <bundle> --target-org LITIFY_ORG --json; all returned success: true with no warnings.Add one shared bounded Apex invocable action, recommended name AttorneyHubDocumentPrepAdvisorAction, then update the generator so each attorney gets a team-scoped tool named advise_${team.toLowerCase()}_document_prep. Add variables document_prep_summary, document_prep_result_count, and document_prep_result_json, update the router copy to route drafts/templates/demand packages/letters/forms to Document Draft Prep Advisor, and give the subagent a real action block that maps teamName, documentType, matterNameOrId, prepTopic, and maxResults into the action. Keep the action read-only and explicitly blocked from creating, saving, sending, filing, or finalizing documents.
inputs and outputs must exactly match the Apex @InvocableVariable fields, especially camelCase names such as resultCount and resultJson.GenAiPlannerBundle metadata. Prior planner attempts failed because Salesforce rejected arbitrary local source values for new topic/action metadata.sf agent validate authoring-bundle, then deploy the Apex class, test, permission-set update, and AiAuthoringBundle metadata through normal validation/deploy.The requested read-only review is complete. No source files were edited. Salesforce CLI validation touched an untracked local CLI cache file under .sfdx/agents/Nick_Attorney_Hub_Agent/index.md; the reviewed generator and bundle source paths have an empty git diff.
A next agent can implement the shared Apex action, add its test class, add Attorney_Hubs_Access class access, update only the generator, regenerate all eight bundles, validate with sf agent validate authoring-bundle, and then stage the change for Sam's go-live approval if live publication is required.