scenarios:
  - id: create-greeting
    title: "Build a Greeting Script"
    difficulty: beginner
    xp: 20
    setup: []
    files:
      - name: greet.sh
        content: |
          #!/bin/bash
          # TODO: Accept a name argument and print a greeting
          echo "Hello, World!"
        language: bash
        readonly: false
    task: "Modify greet.sh to accept a name as the first argument ($1) and print 'Hello, <name>!' instead of 'Hello, World!'. If no argument is provided, default to 'World'."
    validations:
      - label: "Script accepts a name argument"
        check: output-contains
        pattern: "\\$1|\\${1}"
      - label: "Default fallback to World"
        check: output-contains
        pattern: "World|:-|default"
      - label: "Greeting printed correctly"
        check: output-contains
        pattern: "Hello,"
    hints:
      - "Use ${1:-World} to provide a default value when no argument is given."
      - "The full line: echo \"Hello, ${1:-World}!\""
    agent_prompts:
      on_start: "What does the :- syntax do in bash parameter expansion? Why is a default value useful?"
      on_complete: "How would you extend this to accept both a first name and last name? What about validating the input?"
