Writing Local User Stories
User stories sync between local markdown files and Azure DevOps. Follow this exact format for successful push/pull cycles.
Fixing Existing Stories (Auto-Fix Mode)
When pointed at an existing user story file, automatically fix all formatting issues without asking. Apply these fixes:
Placeholder Text → TODO Badges
| Find | Replace With |
|---|---|
(To be defined) |  |
[To be defined] or similar |  |
Example Reminders - DO NOT REMOVE
Keep these helpful reminder patterns - they list commonly forgotten items:
- (e.g.: SPO set up, Customer Insights configured, outgoing mailboxes defined & available, etc.)
These reminders should only be removed:
- •By the consultant explicitly
- •When the agent is instructed to finalize/clean up the story
- •When actual prerequisites are added to replace them
If the section has ONLY the example reminder (no real content), add a TODO badge ABOVE it:
## Prerequisites  - (e.g.: SPO set up, Customer Insights configured, outgoing mailboxes defined & available, etc.)
ADO Links → Simple Format
| Find | Replace With |
|---|---|
[#1234](https://dev.azure.com/...) | #1234 |
[#1234](full-ado-url) | #1234 |
ADO auto-links #ID format and shows title/status - no need for full URLs.
Other Auto-Fixes
- •Remove empty bullet points (lines with just
-) - •Fix heading levels (content sections must use
##, subsections###) - •Ensure Given/When/Then keywords are bold
- •Remove extra blank lines between Given/When/Then/And lines
- •Fix TODO badges that are inline with headings (move to next line)
After Fixing
- •Show a summary of changes made
- •Remind to sync using
/ado-push-items <id>or thesync-work-item-from-fileMCP tool
File Location
docs/user-stories/{id}.md where {id} is the ADO work item ID.
Required Structure
--- id: <work-item-id> title: <title> state: <state> assignedTo: <name> storyPoints: <number> parent: <parent-id> moscow: <Must|Should|Could|Won't> tags: - <tag1> areaPath: <area-path> lastSyncedRevision: <revision-number> --- # Description ## Client Requirement <User story in "As a... I want... so that..." format> ### Process Diagrams <Links to Figma/diagrams> ### Assumptions - <assumption 1> - <assumption 2> ## Proposed Technical Approach <Technical description> - <implementation detail 1> - <implementation detail 2> ## Prerequisites - #<id> - <description> --- # Acceptance Criteria ## Business Rules | Rule | Description | |---|---| | <rule name> | <description> | ## Feature: <Feature Name> ### AC1: <Title> **Given** <precondition> **When** <action> **Then** <expected result> **And** <additional result> ### AC2: <Title> **Given** <precondition> **And** <additional precondition> **When** <action> **Then** <expected result>
Empty Acceptance Criteria
When no acceptance criteria or business rules have been defined:
- •Do NOT add placeholder content to the Acceptance Criteria field
- •Leave it completely empty - omit the entire
# Acceptance Criteriasection - •This allows filtering in ADO to identify stories missing ACs
Example of a story WITHOUT acceptance criteria:
--- id: 1234 ... --- # Description ## Client Requirement **As a** user... ## Proposed Technical Approach  ## Prerequisites 
Note: No --- divider or # Acceptance Criteria section when ACs are empty.
Acceptance Criteria Scope
Only write ACs for custom behavior we are building—not for what Dynamics CRM provides out-of-the-box (OOTB).
DO NOT Write ACs For (OOTB Functionality)
Dynamics handles these automatically—testing them wastes effort and bloats the AC list:
| OOTB Capability | Why We Don't Test It |
|---|---|
| Creating/saving records | Standard Dataverse operation |
| Required field validation | Configured at column level |
| Standard navigation to forms | Model-driven app behavior |
| Basic CRUD operations | Platform capability |
| Form field visibility | Configured in form designer |
| Standard lookups/relationships | Dataverse handles referential integrity |
| Opening a form based on Figma design | If the form exists, users can open it |
DO Write ACs For (Custom Behavior)
Only test what the user story or design specifically calls out as custom:
| Custom Behavior | Example |
|---|---|
| Custom validations | "Membership number must match pattern MBR-NNNNNN" |
| Business rules with specific logic | "If grade is Student, end date must fall within academic year" |
| RBAC beyond standard security roles | "Branch Reps can only see members in their branch" |
| Calculated/rollup fields | "Total subscriptions = sum of active membership fees" |
| Integration behavior | "When status changes to Approved, trigger sync to SQL" |
| Workflow/Flow triggers | "Email sent within 24 hours of enquiry creation" |
| Custom UI behavior | "Grade dropdown filters based on selected Class" |
| Auto-population/defaulting | "Region auto-populated based on postcode lookup" |
Anti-Pattern Example
BAD - Testing OOTB functionality:
### AC1: Creating a New Enquiry **Given** a user with access to the Enquiry form **When** they submit the form with valid data **Then** a new record is saved in the Enquiry table **And** all required fields are validated before saving
This tests nothing custom—Dynamics does all of this automatically for any table.
GOOD - Testing custom behavior from the same story:
### AC1: Enquiry Auto-Assignment **Given** a new Enquiry is created **When** the member's branch is identified **Then** the Enquiry is automatically assigned to the Branch Secretary **And** an email notification is sent to the assignee ### AC2: Enquiry Reference Number **Given** a new Enquiry is saved **When** the record does not yet have a reference number **Then** a unique reference number is generated in format ENQ-YYYYMMDD-NNNN
The Litmus Test
Before writing an AC, ask: "Would this behave differently if we didn't build anything custom?"
- •YES → Write the AC (we're testing our custom work)
- •NO → Don't write it (Dynamics handles it OOTB)
If a user story is purely "create a new table with these fields," and there's no custom logic, validation rules, or automation—the story may not need any ACs at all. The table either exists with the right columns or it doesn't. Use the "Empty Acceptance Criteria" guidance above.
Template Placeholders
User stories often contain template placeholders that remind consultants to consider certain aspects. These are NOT confirmed requirements - they are prompts for Smartimpact consultants to consider.
Common patterns:
**Data Migration** (optional) [Consider: treating "existing/old" data/records differently] **Prerequisites (optional)** [e.g.: SPO set up, Customer Insights configured, outgoing mailboxes defined & available, etc.]
When you encounter these:
- •Do NOT treat them as confirmed requirements
- •Think about whether they apply to this specific user story
- •These are for Smartimpact consultants to evaluate - NOT questions for the client
- •Keep them as reminders in the Assumptions section for the consultant to address later
- •Remove or replace placeholder text only when the consultant has confirmed whether they apply
- •If after evaluation a question needs client input, THEN add the client question badge
Example of keeping a placeholder as a consultant reminder:
### Assumptions - Data Migration: Consider whether existing/old records need different handling
Prerequisites Section
Never remove the Prerequisites section - even when prerequisites are not yet confirmed:
- •Keep the section with a TODO badge (the badge itself indicates work is needed - no placeholder text required)
- •Think about what needs to be in place before this user story can be delivered
- •Consider: other user stories, system configuration, external dependencies, data setup
Example:
## Prerequisites 
Common prerequisites to consider:
- •Other user stories that must be completed first (use
#IDformat, e.g.,#1065) - •SharePoint Online configuration
- •Customer Insights setup
- •Outgoing mailboxes defined and available
- •Security roles configured
- •Environment variables set
- •Connection references established
Critical Formatting Rules
- •Marker headings use
#:# Descriptionand# Acceptance Criteriaare marker headings that indicate ADO field boundaries (not pushed to ADO itself) - •Main sections use
##: Client Requirement, Proposed Technical Approach, Prerequisites, Business Rules, Feature: - •Subsections use
###: Process Diagrams, Assumptions, AC1:, AC2:, etc. - •Given/When/Then keywords must be bold:
**Given**,**When**,**Then**,**And**,**Or** - •No blank lines between Given/When/Then/And lines within an AC
- •AC divider: Use
---on its own line before# Acceptance Criteria - •ADO work item links: Use
#1234format - ADO auto-links and displays title/status
Visual Markers
Use these badges and styles to highlight important information:
Questions for the client - Add badge at the END of items needing client confirmation:
Text needing confirmation 
TODO for Smartimpact - Add on the line BELOW the section header when work is not yet done. The badge itself indicates work is needed - no placeholder text like "(To be defined)" required:
## Proposed Technical Approach 
Critical information - Use for warnings, blockers, or must-read content:
<span style="color:red">Critical Information Here</span>
Example usage:
## Proposed Technical Approach  ### Assumptions - Data Migration: Consider whether existing/old records need different handling - <span style="color:red">Pending - WIP</span> This section requires client sign-off before implementation
Link Naming Conventions
Figma Design files (https://www.figma.com/design/...):
[Open Figma Design](https://www.figma.com/design/ABC123/...)
FigJam boards (https://www.figma.com/board/...):
[Open FigJam Board](https://www.figma.com/board/ABC123/...)
Sync Commands
Use the MCP tools or slash commands for syncing:
# Pull from ADO (overwrites local) /ado-pull-items <id> # Or use MCP tool: sync-work-item-to-file(project, [id]) # Push to ADO /ado-push-items <id> # Or use MCP tool: sync-work-item-from-file(project, [id]) # List local stories # Use MCP tool: list-synced-work-items()
Common Mistakes
- •Missing
# Descriptionmarker heading after frontmatter - •Using
#instead of##for content sections (Client Requirement, Proposed Technical Approach, etc.) - •Adding blank lines between Given/When/Then lines
- •Missing bold markers on Given/When/Then keywords
- •Wrong AC header format (use
### AC1: Titlenot**AC1: Title**) - •Putting TODO badge inline with heading instead of on the next line
- •Treating template placeholders as client questions (they're for SI consultants)
- •Removing Prerequisites section instead of keeping it with TODO badge
- •Writing ACs for OOTB functionality (record creation, required field validation, form access)—only test custom behavior