AgentSkillsCN

figjam-extract-user-stories

从 FigJam 白板中提取 ADO 用户故事组件,并以结构化的 Markdown 表格形式输出。适用于用户希望从 FigJam 中提取用户故事、分析 FigJam 以识别 ADO 项目、从 FigJam 白板中获取 ADO 工作项,或任何涉及从 Figma/FigJam 白板中提取结构化 ADO/用户故事数据的需求时使用。支持嵌套组件的解析、父级上下文的提取,以及链接的生成。

SKILL.md
--- frontmatter
name: figjam-extract-user-stories
description: Extract ADO User Story components from FigJam boards and output them as a structured markdown table. Use when users ask to extract user stories from FigJam, analyze FigJam for ADO items, get ADO work items from FigJam boards, or any request involving extracting structured ADO/user story data from Figma/FigJam boards. Handles nested components, parent context extraction, and link generation.

FigJam ADO User Story Extraction

Overview

This skill extracts ADO User Story components from FigJam boards by analyzing the Figma data structure. It identifies all visible ADO components (both standalone and nested within parent components), extracts their properties, and outputs a structured markdown table with ADO links and FigJam links.

Technical Instructions

When analyzing Figma data from this board, identify all visible ADO User Story Components and list them in a table. If a link to figjam has not been provided, ask for it.

Technical Identification Criteria

Primary Identifier - ADO User Story Component:

PropertyValue/Pattern
type"INSTANCE"
name"ADO User Story Component"
componentIdReferences componentSet 814:2104 (e.g., 814:2105)
Critical Rule: Only include ADO components that are actually present in the node tree. Some parent components have variants that hide the ADO component — if the "ADO User Story Component" node doesn't appear in the children, it should NOT be counted.
Search Strategy:
  1. Recursively search through ALL nodes and their children
  2. Look for nodes where name === "ADO User Story Component" AND type === "INSTANCE"
  3. The ADO component can appear:
  • Standalone: Directly as a top-level instance
  • Nested: Inside parent components (API Endpoint, Dataverse Table, Plugin Component, Power Automate Flow, etc.)

Extract from componentProperties array

Property Key PatternContainsExample
ADO Name#311:0ADO ID"ADO 69505" → extract 69505
ADO Description#311:1Work item title/description"SCC | Config | sic_examtype"
ADO StateStatus variant"Pending User Story"

Extract Context from Parent Component

When the ADO component is nested inside a parent component, extract descriptive text from the parent's componentProperties to populate the Context column:

Parent Component TypeProperties to ExtractExample Output
API EndpointHeader#74:1 + Endpoint call#74:13"API Endpoint: GET si_event"
Power Automate Flow ComponentHeader#86:2 + Description#86:3"Power Automate Flow: Use si_MembershipActionSubmitAction..."
Dataverse Table ComponentHeader#86:2 + Description#86:3"Dataverse Table: si_membership"
Plugin ComponentHeader#86:2 + Description#86:3"Dataverse Plugin: Run on Invoice creation..."
Customer Insights ComponentHeader#86:2 + Description#86:3"Customer Insights: Member notified via CI"
Format: {Header}: {Description/Call} (clean up newlines, truncate if very long)
For standalone ADO components, use the component's own ADO Description value as context.

Known Parent Component Variants

Some component sets have variants with/without ADO tags. Only the variants that include the ADO component should result in table entries:

Component SetWith ADO (include)Without ADO (exclude)
Dataverse Table Component (814:2357)814:2358 (Default)814:2363 (Variant2)
API Endpoint (814:2212)814:2213, 814:2214814:2216 (without ADO tag)

ADO Link Construction

code
https://dev.azure.com/{ORGANISATION}/{PROJECT}/_workitems/edit/{ID}

Where:

  • {ORGANISATION} = Azure DevOps organisation name (e.g., smartimpactuk)
  • {PROJECT} = Project name/abbreviation (e.g., AOP, ClientX, etc.)
  • {ID} = Numeric ADO ID extracted from the component Extract the numeric ID from ADO Name value:
  • "ADO 69505"69505
  • "ADO xxxxx" or "ADO XXXXX" → Placeholder, no link (show ) Note: The organisation and project should be provided by the user or inferred from context.

Figma Link Construction

code
https://www.figma.com/board/{FILE_KEY}/?node-id={NODE_ID}

Where:

  • {FILE_KEY} = The Figma file key from the board URL (e.g., H3EJTOhyignzJdrsWEh0WB)
  • {NODE_ID} = The node ID of the parent component containing the ADO component (or the ADO component itself if standalone), with : replaced by - Example:
  • Parent component node ID: 1653:4098
  • Figma Link: https://www.figma.com/board/H3EJTOhyignzJdrsWEh0WB/?node-id=1653-4098

Output Format

Produce a markdown table with the following columns:

#ADODescriptionStatusContextADO LinkFigma
169505SCC | Config | sic_examtypePending User StoryAPI Endpoint: GET si_eventADOFigma
269504CRM Customisation | Table NamePending User Story(standalone)ADOFigma
3xxxxxPowerAutomate | DescriptionPending User StoryPower Automate Flow: Fetch un-processed paymentsFigma

Filtering Options

By default, return all items unless asked to filter the list. Example filters:

  • All items: Include everything (placeholders + real IDs)
  • Real items only: Filter out entries where ADO ID matches placeholder pattern (regex: ^[xX]+$)
  • By status: Filter by ADO State value

Implementation Notes

  1. Only count visible ADO components: If walking a parent component's children and no "ADO User Story Component" node exists, skip it — the variant being used hides the ADO tag
  2. For nested components, the node ID contains semicolons (e.g., I1641:5423;73:835) — use the parent's node ID for the Figma link, not the nested ADO component's ID
  3. Track the parent component's node ID and componentProperties while recursing
  4. The componentProperties is an array of objects with name, value, and type keys
  5. Clean up context text: replace \n with spaces, trim excessive whitespace

Final Output

IMPORTANT: ALWAYS produce a clean markdown table that the user can easily copy and paste. Present it after any analysis or explanation.