Inspect /Users/samaguiar/Documents/Projects/Repos/sail-litify/Litify_AI_Integration_Project/salesforce-metadata without editing files. Report the minimal files and shape needed to add a safe draft-only document generation/prep action to Nick's Agentforce section.
LITIFY_ORG is connected as sam@kylawoffice.com.AttorneyHubAgentforceCaseSearchAction, the Nick Team Resources controller and LWC, the Nick Agentforce authoring bundle, and the relevant permission sets.AttorneyHubAgentforceCaseSearchAction, AttorneyHubArchiveMatterSearchAction, AttorneyHubReportDashboardAdvisorAction, AttorneyHubInsuranceKnowledgeAction, AttorneyHubNickTeamResourcesController, and AttorneyHubNickShared.Attorney_Hub_Resource__c fields live: Resource_Type__c, Team__c, Topic__c, Description__c, Body__c, URL__c, Sort_Order__c, and Active__c are available for template/resource inventory.0055e000005xULwAAM and tab Attorney_Hub_Nick.litify_docs__Template__c exists and includes matter-starting templates such as Demand Draft w/ AI Prompts; active Nick/All Teams Team Template resource records were not present in the queried sample.Minimal additive path: add AttorneyHubDocumentDraftPrepAction.cls plus test, expose it through AttorneyHubNickTeamResourcesController.runDocumentDraftPrep, add one compact Document Draft Prep workbench section in attorneyHubNickTeamResources, update Nick_Attorney_Hub_Agent.agent so the existing Document Generation Advisor calls the new Apex action, and add Apex class access to the relevant hub user and Nick agent permission sets.
The action should stay draft-only. It should read matter data, selected Litify Docs template/resource metadata, and checklist fields, then return JSON containing template recommendation, missing inputs, draft outline or draft text, warnings, linked matter/template/resource URLs, and a review-required flag. It should not insert ContentVersion, send messages, file documents, update matter records, or invoke Docrio generation until Sam approves a later go-live action.
The requested read-only inspection and report were completed. No local project files or live Salesforce metadata were changed.
A future implementation agent can build the additive class/test/controller/LWC/agent/permission set changes on a branch, run sf project deploy validate --test-level RunSpecifiedTests, validate the Agentforce bundle, then preview with draft-only prompts before requesting any live activation or final document generation.
The safest starting point is the existing Nick Team Resources lane. It already teaches users that document generation is a template lane, and the Nick agent already routes document requests to a Document Generation Advisor. The gap is only the bounded Apex action plus UI/action wiring. Reuse Attorney_Hub_Resource__c for uploaded team templates and litify_docs__Template__c for actual Litify Docs merge template discovery. Keep Docrio or final generation out of scope unless schema and permissions are rechecked live.