Requirements Gathering
Gather and structure requirements from any source into a standardized brief that downstream skills (schema-explorer, datasource-creator, report-creator) can consume.
When to Use
- Before creating a report (
report-creator invokes this as Phase 1)
- Before creating a datasource (
datasource-creator invokes this when requirements are unclear)
- Whenever the user provides a work item ID, mockup, spec, or description and you need to extract structured requirements before building anything
Output Contract
Regardless of source, produce a requirements brief with these sections:
## Requirements Brief
**Title:** [name of the report/datasource/feature]
**Purpose:** [1-2 sentence summary]
**Source:** [work item #ID / user conversation / document / existing report]
### Data Requirements
#### Fields with Semantic Roles
For each field, identify WHAT it is and WHERE it belongs:
| Field | Semantic Role | Report Section / Usage |
|-------|--------------|----------------------|
| ownerName | Goods principal name | Shipper/Consignor header |
| accountName | Customer name | Consignee header |
| materialLookupCode | Product identifier | Line item grid |
| tareWeight | Packaging weight | Calculated: gross = raw + qty * tare |
#### Entity Keywords
[List of OData entity search terms derived from requirements]
### Layout Expectations
- **Report category:** [Label / Official Documentation / Work Detail / Inventory-Operations]
- Labels: high visibility, scannable barcodes, tight margins
- Official Documentation: branded, legally compliant, standard margins
- Work Detail: key info only, minimal distractions
- Inventory/Operations: data comparison tables (consider if an app component would serve better)
- **Page size:** [letter/legal/A4/custom]
- **Orientation:** [portrait/landscape]
- **Key sections:** [header, detail grid, footer, etc.]
- **Special elements:** [barcodes, logos, signatures, images]
### Business Rules
- [Calculated fields with formulas]
- [Conditional visibility rules]
- [Date null-guard requirements]
- [Filtering/exclusion rules]
### Parameters
- [Input parameters with types]
### Reference Materials
- [List of attachments, screenshots, documents consulted]
Source Routing
DevOps work item
When the user provides a work item ID or URL:
- Invoke the
devops-requirements skill — it handles fetching, relations, attachments, and extraction
- Enhance the output with semantic field mapping (see below)
- Save the brief to the artifact directory
Mockup or screenshot
When the user provides an image (mockup, screenshot, PDF):
- Read every visible element — labels, column headers, data values, section boundaries, logos, barcodes
- Map labels to data fields — each visible label implies a field. "SHIPPER" is not just text, it's a data source (who is the shipper entity?)
- Identify sections — header, address blocks, detail grid, footer, signatures
- Ask clarifying questions about ambiguous elements before finalizing the brief
Natural language description
When the user describes what they want in conversation:
- Extract nouns as candidate entities — "customer shipping address" → Account, ShippingAddress
- Extract qualifiers as candidate fields — "the warehouse phone number" → Warehouse.Contact.Phone
- Ask structured questions to fill gaps:
- What data does this show? (entities + fields)
- Who uses this? (determines layout: print vs screen, page size)
- What filters/parameters drive it? (input params)
- Are there calculations or business rules? (expressions)
- Is there a similar existing report? (reference)
- Present the draft brief for confirmation before proceeding
Existing report (.rdl or .rdlx-json)
When the user provides an existing report file:
- For .rdlx-json: Use
dxs report inspect to extract structure, DataSets, field names, and expressions
- For .rdl (SSRS): Scan for
<CommandText> elements containing SQL — the SELECT columns and FROM/JOIN tables map to OData entities and fields
- Map extracted fields to semantic roles based on element names and positions in the layout
Document or spec
When the user provides a document (Word, PDF, Excel):
- Extract field lists — look for tables, SQL queries, column definitions
- Extract layout sketches — any visual representation of the output
- Extract business rules — formulas, conditions, filtering logic
Semantic Field Mapping
This is the critical step that prevents downstream errors. After extracting raw fields from any source, assign each field a semantic role — what it means in the domain context.
How to assign roles:
From SQL field names: Read prefixes as domain clues
owner* → goods principal / shipper (in BOL context)
account* → customer / bill-to party
shipTo* → delivery destination / consignee
warehouse* → facility / 3PL location
carrier* → transport provider
material* / lot* → inventory item details
order* → order-level data (reference numbers, dates, notes)
From mockup labels: Map visual labels to data entities
- "SHIPPER/CONSIGNOR" → Owner entity (NOT Account)
- "CONSIGNED TO" → Account / Ship-To entity
- "CARRIER" → Carrier entity
- "FREIGHT BILL NUMBER" → may be BOL, or may be a reference number — ask
From natural language: Map described concepts to entities
- "the customer's address" → Account.Address or ShipToContact.Address
- "who shipped it" → Owner (the goods principal, not the carrier)
When ambiguous: Flag the ambiguity and ask the user. Do NOT guess — a wrong semantic assignment cascades into wrong datasource fields and wrong report layout.
Anti-Patterns
- Flat field list without roles — listing fields without semantic mapping causes downstream skills to guess which field goes where. Always assign roles.
- Skipping fields that seem "obvious" —
packUOM, tareWeight, vlDescription may not be in the report title or main columns, but they're required. List ALL fields from the source.
- Assuming SQL = OData — SQL views pre-flatten joined data. The same data in OData may require multiple
$expand levels or linked datasources. Note complex join paths in the brief.
- Generic legal text — if the source includes specific legal language (e.g., carrier liability clauses), capture it verbatim. Don't substitute generic boilerplate.
- Ignoring images/signatures — if the source shows a logo, signature, or image field, note it. These require special handling (embedded images, database-sourced images, or flow datasources).
1---2name: requirements-gathering3description: Produces a standardized requirements brief from any source: DevOps work items, mockups, natural language descriptions, existing reports, or documents. This is a utility skill — it gathers and structures requirements but does not build anything. If the goal is to create a report, datasource, or other artifact, use the appropriate creation skill as the entry point; it will invoke this skill when it needs requirements.4---56# Requirements Gathering78Gather and structure requirements from any source into a standardized brief that downstream skills (`schema-explorer`, `datasource-creator`, `report-creator`) can consume.910## When to Use1112- Before creating a report (`report-creator` invokes this as Phase 1)13- Before creating a datasource (`datasource-creator` invokes this when requirements are unclear)14- Whenever the user provides a work item ID, mockup, spec, or description and you need to extract structured requirements before building anything1516## Output Contract1718Regardless of source, produce a **requirements brief** with these sections:1920```markdown21## Requirements Brief2223**Title:** [name of the report/datasource/feature]24**Purpose:** [1-2 sentence summary]25**Source:** [work item #ID / user conversation / document / existing report]2627### Data Requirements2829#### Fields with Semantic Roles30For each field, identify WHAT it is and WHERE it belongs:3132| Field | Semantic Role | Report Section / Usage |33|-------|--------------|----------------------|34| ownerName | Goods principal name | Shipper/Consignor header |35| accountName | Customer name | Consignee header |36| materialLookupCode | Product identifier | Line item grid |37| tareWeight | Packaging weight | Calculated: gross = raw + qty * tare |3839#### Entity Keywords40[List of OData entity search terms derived from requirements]4142### Layout Expectations43- **Report category:** [Label / Official Documentation / Work Detail / Inventory-Operations]44 - Labels: high visibility, scannable barcodes, tight margins45 - Official Documentation: branded, legally compliant, standard margins46 - Work Detail: key info only, minimal distractions47 - Inventory/Operations: data comparison tables (consider if an app component would serve better)48- **Page size:** [letter/legal/A4/custom]49- **Orientation:** [portrait/landscape]50- **Key sections:** [header, detail grid, footer, etc.]51- **Special elements:** [barcodes, logos, signatures, images]5253### Business Rules54- [Calculated fields with formulas]55- [Conditional visibility rules]56- [Date null-guard requirements]57- [Filtering/exclusion rules]5859### Parameters60- [Input parameters with types]6162### Reference Materials63- [List of attachments, screenshots, documents consulted]64```6566## Source Routing6768### DevOps work item6970When the user provides a work item ID or URL:71721. **Invoke the `devops-requirements` skill** — it handles fetching, relations, attachments, and extraction732. **Enhance the output** with semantic field mapping (see below)743. Save the brief to the artifact directory7576### Mockup or screenshot7778When the user provides an image (mockup, screenshot, PDF):79801. **Read every visible element** — labels, column headers, data values, section boundaries, logos, barcodes812. **Map labels to data fields** — each visible label implies a field. "SHIPPER" is not just text, it's a data source (who is the shipper entity?)823. **Identify sections** — header, address blocks, detail grid, footer, signatures834. **Ask clarifying questions** about ambiguous elements before finalizing the brief8485### Natural language description8687When the user describes what they want in conversation:88891. **Extract nouns as candidate entities** — "customer shipping address" → Account, ShippingAddress902. **Extract qualifiers as candidate fields** — "the warehouse phone number" → Warehouse.Contact.Phone913. **Ask structured questions** to fill gaps:92 - What data does this show? (entities + fields)93 - Who uses this? (determines layout: print vs screen, page size)94 - What filters/parameters drive it? (input params)95 - Are there calculations or business rules? (expressions)96 - Is there a similar existing report? (reference)974. **Present the draft brief** for confirmation before proceeding9899### Existing report (.rdl or .rdlx-json)100101When the user provides an existing report file:1021031. **For .rdlx-json**: Use `dxs report inspect` to extract structure, DataSets, field names, and expressions1042. **For .rdl (SSRS)**: Scan for `<CommandText>` elements containing SQL — the SELECT columns and FROM/JOIN tables map to OData entities and fields1053. **Map extracted fields** to semantic roles based on element names and positions in the layout106107### Document or spec108109When the user provides a document (Word, PDF, Excel):1101111. **Extract field lists** — look for tables, SQL queries, column definitions1122. **Extract layout sketches** — any visual representation of the output1133. **Extract business rules** — formulas, conditions, filtering logic114115## Semantic Field Mapping116117This is the critical step that prevents downstream errors. After extracting raw fields from any source, assign each field a **semantic role** — what it means in the domain context.118119**How to assign roles:**1201211. **From SQL field names**: Read prefixes as domain clues122 - `owner*` → goods principal / shipper (in BOL context)123 - `account*` → customer / bill-to party124 - `shipTo*` → delivery destination / consignee125 - `warehouse*` → facility / 3PL location126 - `carrier*` → transport provider127 - `material*` / `lot*` → inventory item details128 - `order*` → order-level data (reference numbers, dates, notes)1291302. **From mockup labels**: Map visual labels to data entities131 - "SHIPPER/CONSIGNOR" → Owner entity (NOT Account)132 - "CONSIGNED TO" → Account / Ship-To entity133 - "CARRIER" → Carrier entity134 - "FREIGHT BILL NUMBER" → may be BOL, or may be a reference number — ask1351363. **From natural language**: Map described concepts to entities137 - "the customer's address" → Account.Address or ShipToContact.Address138 - "who shipped it" → Owner (the goods principal, not the carrier)1391404. **When ambiguous**: Flag the ambiguity and ask the user. Do NOT guess — a wrong semantic assignment cascades into wrong datasource fields and wrong report layout.141142## Anti-Patterns143144- **Flat field list without roles** — listing fields without semantic mapping causes downstream skills to guess which field goes where. Always assign roles.145- **Skipping fields that seem "obvious"** — `packUOM`, `tareWeight`, `vlDescription` may not be in the report title or main columns, but they're required. List ALL fields from the source.146- **Assuming SQL = OData** — SQL views pre-flatten joined data. The same data in OData may require multiple `$expand` levels or linked datasources. Note complex join paths in the brief.147- **Generic legal text** — if the source includes specific legal language (e.g., carrier liability clauses), capture it verbatim. Don't substitute generic boilerplate.148- **Ignoring images/signatures** — if the source shows a logo, signature, or image field, note it. These require special handling (embedded images, database-sourced images, or flow datasources).