# <!-- Powered by BMAD™ Core -->
template:
  id: story-template-v2
  name: Story Document
  version: 2.0
  output:
    format: markdown
    filename: docs/stories/{{epic_num}}.{{story_num}}.{{story_title_short}}.md
    title: "Story {{epic_num}}.{{story_num}}: {{story_title_short}}"

workflow:
  mode: interactive
  elicitation: advanced-elicitation

agent_config:
  editable_sections:
    - Status
    - Story
    - Acceptance Criteria
    - Tasks / Subtasks
    - Dev Notes
    - Testing
    - Change Log

sections:
  - id: status
    title: Status
    type: choice
    choices: [Draft, Approved, InProgress, Review, Done]
    instruction: Select the current status of the story
    owner: scrum-master
    editors: [scrum-master, dev-agent]

  - id: story
    title: Story
    type: template-text
    template: |
      **As a** {{role}},
      **I want** {{action}},
      **so that** {{benefit}}
    instruction: Define the user story using the standard format with role, action, and benefit
    elicit: true
    owner: scrum-master
    editors: [scrum-master]

  - id: acceptance-criteria
    title: Acceptance Criteria
    type: numbered-list
    instruction: Copy the acceptance criteria numbered list from the epic file
    elicit: true
    owner: scrum-master
    editors: [scrum-master]

  - id: tasks-subtasks
    title: Tasks / Subtasks
    type: bullet-list
    instruction: |
      Break down the story into specific tasks and subtasks needed for implementation.
      Reference applicable acceptance criteria numbers where relevant.
    template: |
      - [ ] Task 1 (AC: # if applicable)
        - [ ] Subtask1.1...
      - [ ] Task 2 (AC: # if applicable)
        - [ ] Subtask 2.1...
      - [ ] Task 3 (AC: # if applicable)
        - [ ] Subtask 3.1...
    elicit: true
    owner: scrum-master
    editors: [scrum-master, dev-agent]

  - id: dev-notes
    title: Dev Notes
    instruction: |
      Populate relevant information, only what was pulled from actual artifacts from docs folder, relevant to this story:
      - Do not invent information
      - If known add Relevant Source Tree info that relates to this story
      - If there were important notes from previous story that are relevant to this one, include them here
      - Put enough information in this section so that the dev agent should NEVER need to read the architecture documents, these notes along with the tasks and subtasks must give the Dev Agent the complete context it needs to comprehend with the least amount of overhead the information to complete the story, meeting all AC and completing all tasks+subtasks
    elicit: true
    owner: scrum-master
    editors: [scrum-master]
    sections:
      - id: testing-standards
        title: Testing
        instruction: |
          List Relevant Testing Standards from Architecture the Developer needs to conform to:
          - Test file location
          - Test standards
          - Testing frameworks and patterns to use
          - Any specific testing requirements for this story
        elicit: true
        owner: scrum-master
        editors: [scrum-master]

  - id: change-log
    title: Change Log
    type: table
    columns: [Date, Version, Description, Author]
    instruction: Track changes made to this story document
    owner: scrum-master
    editors: [scrum-master, dev-agent, qa-agent]

  - id: dev-agent-record
    title: Dev Agent Record
    instruction: This section is populated by the development agent during implementation
    owner: dev-agent
    editors: [dev-agent]
    sections:
      - id: agent-model
        title: Agent Model Used
        template: "{{agent_model_name_version}}"
        instruction: Record the specific AI agent model and version used for development
        owner: dev-agent
        editors: [dev-agent]

      - id: debug-log-references
        title: Debug Log References
        instruction: Reference any debug logs or traces generated during development
        owner: dev-agent
        editors: [dev-agent]

      - id: completion-notes
        title: Completion Notes List
        instruction: Notes about the completion of tasks and any issues encountered
        owner: dev-agent
        editors: [dev-agent]

      - id: file-list
        title: File List
        instruction: List all files created, modified, or affected during story implementation
        owner: dev-agent
        editors: [dev-agent]

  - id: qa-results
    title: QA Results
    instruction: Results from QA Agent QA review of the completed story implementation
    owner: qa-agent
    editors: [qa-agent]
