---
title: "User Story Template"
version: "1.0"
author: "VC-SYS Framework"
description: "Complete user story template for AI agent development workflow"
agents:
  owner: "scrum-master"
  editors: ["developer", "qa", "product-owner"]
  readonly: []
---

template:
  sections:
    - id: "header"
      title: "Story Header"
      required: true
      elicit: false
      content: |
        # Story {{EpicNum}}.{{StoryNum}}: {{StoryTitle}}
        
        ## Status: {{Status}}
        
        **Created:** {{Date}}
        **Epic:** {{EpicNum}} - {{EpicTitle}}
        **Priority:** {{Priority}}
        **Story Points:** {{StoryPoints}}
        **Sprint:** {{TargetSprint}}

    - id: "story_statement"
      title: "User Story Statement"
      required: true
      elicit: true
      content: |
        ## Story
        
        As a {{UserType}},
        I want {{Capability}},
        So that {{Value}}.

    - id: "context_source"
      title: "Context and Source"
      required: true
      elicit: false
      content: |
        ## Context Source
        
        - **Source Document:** {{SourceDocument}}
        - **Enhancement Type:** {{EnhancementType}}
        - **Existing System Impact:** {{SystemImpact}}
        - **Integration Points:** {{IntegrationPoints}}

    - id: "acceptance_criteria"
      title: "Acceptance Criteria"
      required: true
      elicit: true
      agents:
        owner: "product-owner"
        editors: ["scrum-master"]
        readonly: ["developer", "qa"]
      content: |
        ## Acceptance Criteria
        
        ### Functional Requirements
        1. **GIVEN** {{Context1}}
           **WHEN** {{Action1}}
           **THEN** {{Outcome1}}
        
        2. **GIVEN** {{Context2}}
           **WHEN** {{Action2}}
           **THEN** {{Outcome2}}
        
        3. **GIVEN** {{Context3}}
           **WHEN** {{Action3}}
           **THEN** {{Outcome3}}
        
        ### Integration Requirements
        4. Existing {{RelevantFunctionality}} continues to work unchanged
        5. New functionality follows existing {{Pattern}} pattern
        6. Integration with {{System}} maintains current behavior
        
        ### Quality Requirements
        7. Change is covered by appropriate tests
        8. Documentation is updated if needed
        9. No regression in existing functionality verified

    - id: "dev_notes"
      title: "Developer Technical Guidance"
      required: true
      elicit: true
      agents:
        owner: "scrum-master"
        editors: ["architect"]
        readonly: ["developer"]
      content: |
        ## Dev Technical Guidance
        
        ### Previous Story Insights
        {{PreviousStoryInsights}}
        
        ### Data Models
        {{DataModelsGuidance}}
        [Source: {{ArchitectureSource}}]
        
        ### API Specifications
        {{APISpecifications}}
        [Source: {{APISource}}]
        
        ### Component Specifications
        {{ComponentSpecifications}}
        [Source: {{ComponentSource}}]
        
        ### File Locations
        {{FileLocationGuidance}}
        
        ### Testing Requirements
        {{TestingRequirements}}
        [Source: testing-strategy.md]
        
        ### Technical Constraints
        {{TechnicalConstraints}}
        
        ### Integration Approach
        {{IntegrationApproach}}

    - id: "tasks_subtasks"
      title: "Implementation Tasks"
      required: true
      elicit: true
      agents:
        owner: "scrum-master"
        editors: ["developer"]
      content: |
        ## Tasks / Subtasks
        
        - [ ] **Task 1:** {{Task1Description}} (AC: {{AssociatedACs}})
          - [ ] {{Subtask1_1}}
          - [ ] {{Subtask1_2}}
          - [ ] {{Subtask1_3}}
        
        - [ ] **Task 2:** {{Task2Description}} (AC: {{AssociatedACs}})
          - [ ] {{Subtask2_1}}
          - [ ] {{Subtask2_2}}
        
        - [ ] **Task 3:** {{Task3Description}} (AC: {{AssociatedACs}})
          - [ ] {{Subtask3_1}}
          - [ ] {{Subtask3_2}}
        
        - [ ] **Task 4:** Testing and Validation
          - [ ] Write unit tests following {{ProjectTestPattern}}
          - [ ] Write integration tests for {{IntegrationPoints}}
          - [ ] Update existing tests if needed
          - [ ] Execute full test suite and verify all pass

    - id: "dev_agent_record"
      title: "Developer Agent Record"
      required: true
      elicit: false
      agents:
        owner: "developer"
        editors: ["developer"]
        readonly: ["qa", "product-owner", "scrum-master"]
      content: |
        ## Dev Agent Record
        
        ### Agent Model Used
        _TBD - Updated by developer agent_
        
        ### Task Completion Status
        _TBD - Updated by developer agent as tasks are completed_
        
        ### Debug Log References
        _TBD - Updated by developer agent if debugging is needed_
        
        ### Implementation Notes
        _TBD - Updated by developer agent with implementation decisions_
        
        ### Completion Notes
        _TBD - Updated by developer agent upon completion_
        
        ### File List
        _TBD - Updated by developer agent with all files created/modified/deleted_

    - id: "qa_results"
      title: "Quality Assurance Results"
      required: true
      elicit: false
      agents:
        owner: "qa"
        editors: ["qa"]
        readonly: ["developer", "product-owner", "scrum-master"]
      content: |
        ## QA Results
        
        _This section is updated by the QA agent during code review_

    - id: "risk_assessment"
      title: "Risk Assessment and Mitigation"
      required: true
      elicit: true
      content: |
        ## Risk Assessment
        
        ### Implementation Risks
        - **Primary Risk:** {{PrimaryRisk}}
        - **Mitigation:** {{RiskMitigation}}
        - **Verification:** {{VerificationApproach}}
        
        ### Rollback Plan
        {{RollbackSteps}}
        
        ### Safety Checks
        - [ ] Existing {{RelevantFeature}} tested before changes
        - [ ] Changes can be feature-flagged or isolated
        - [ ] Rollback procedure documented and tested

    - id: "definition_of_done"
      title: "Definition of Done"
      required: true
      elicit: false
      content: |
        ## Definition of Done
        
        ### Functional Completeness
        - [ ] All acceptance criteria met and verified
        - [ ] All tasks and subtasks completed
        - [ ] Integration requirements satisfied
        - [ ] Existing functionality regression tested
        
        ### Code Quality
        - [ ] Code follows existing patterns and standards
        - [ ] All tests pass (existing and new)
        - [ ] Code reviewed by QA agent
        - [ ] Security considerations addressed
        
        ### Documentation and Integration
        - [ ] File List complete and accurate
        - [ ] Documentation updated if applicable
        - [ ] Integration points working correctly
        - [ ] No breaking changes to existing APIs

    - id: "change_log"
      title: "Change Log"
      required: true
      elicit: false
      agents:
        owner: "developer"
        editors: ["developer", "qa"]
      content: |
        ## Change Log
        
        | Date | Agent | Change Description |
        |------|-------|-------------------|
        | {{Date}} | {{AgentName}} | Story created |
        | _TBD_ | _TBD_ | _Updated by agents as changes are made_ |

validation:
  required_fields:
    - StoryTitle
    - UserType
    - Capability
    - Value
    - Priority
    - StoryPoints
  optional_fields:
    - TargetSprint
    - EpicTitle
  dependencies:
    - execute-checklist.md
    - story-dod-checklist.md