ado_analyze_workitem
AZURE DEVOPS ONLY -- Fetch a Work Item and assemble ALL technical context needed for D365 F&O expert analysis. [~] PRIORITY TRIGGER: 'analyse le workitem', 'analyse la tâche', 'analyse le FDD/RDD/CR/IDD', 'read the work item', 'check the bug', 'look at ticket', 'review task', '#1234', 'WI#', 'WI ', 'item #'. NEVER for: labels (@SYS/@TRX/@FIN), X++ code lookup, AOT objects -- use search_labels / search_d365_code instead.
WHAT THIS TOOL RETURNS
Raw structured context only -- NOT a finished analysis. The tool returns:
Work item metadata (title, description, repro steps, acceptance criteria, comments)
D365 standard KB object details: fields, methods, code snippets for every matched object
Custom code on disk (customer extension model): existing CoC methods, extension bodies
Chain of Command / relation graph for all impacted objects
YOUR JOB AS COPILOT AFTER CALLING THIS TOOL
You MUST synthesize the raw context into a precise developer-ready analysis IN FRENCH. Write it in a professional tone, as if authored by a senior D365 consultant -- no emojis, no icons. The analysis must contain these sections:
Compréhension du besoin -- résume ce que le client demande en 2-3 phrases claires
Analyse technique -- identifie la cause racine en croisant le besoin + les objets KB + le code custom
Instructions de développement -- liste ordonnée et précise : quel objet, quelle méthode, quoi modifier
Si une extension custom existe sur disque -> pointer exactement quelle méthode à modifier
Si pas d'extension -> indiquer quel CoC créer, sur quel objet standard, quelle méthode
Estimation -- chiffrage en heures/jours selon la complexité détectée
Commentaire ADO -- Texte markdown sans icônes, prêt à poster sur le WI analysé UNIQUEMENT. IMPORTANT: never post (never call ado_post_comment) on any linked/related work item -- only on the analyzed WI.
Requires DEVOPS_ORG_URL + DEVOPS_PAT env vars.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Optional: Azure DevOps project name. Falls back to DEVOPS_PROJECT env var. | |
| workItemId | Yes | Work item ID (integer), e.g. 1234 | |
| maxComments | No | Number of recent comments to include (default 5, max 20). Use 3 for faster results. | |
| focusObjects | No | Comma-separated D365 object names to force-include in KB analysis, e.g. 'SalesTable,CustTable'. Providing these speeds up analysis significantly. | |
| sourceBranch | No | Git branch to read custom code from when no PR or commit is linked to the work item. Default: 'main'. Use this to point at the integration branch (e.g. 'develop', 'release/2025'). | main |
| includeImages | No | Include image attachments as base64 data URIs for visual analysis by Copilot. Default: false. Set true only when screenshots are needed -- adds latency and token cost. |