# =============================================================================
# LULLABOT PROJECT SETUP CONFIGURATION
# =============================================================================
# This configuration defines shared tasks, tool-specific tasks, and project
# types for the Lullabot Project Setup tool.

# =============================================================================
# SHARED TASKS
# =============================================================================
# Common task definitions that can be referenced by multiple tools to reduce
# duplication and ensure consistency across the configuration.

shared_tasks:
  # Project rules from the centralized prompt library
  rules:
    name: "Project rules from prompt library"
    description: "Copy project-specific rules from Lullabot prompt library"
    type: "remote-copy-files"
    link: "https://github.com/Lullabot/prompt_library"
    repository:
      url: "https://github.com/Lullabot/prompt_library"
      type: "branch"
      target: "main"
    source: "{project-type}/rules/"
    target: ".ai/rules"
    required: false
    requires-project: true
    prompt: "Would you like to install project-specific rules from the prompt library?"

  # Project-specific agents
  project-agents:
    name: "Project-specific agents from prompt library"
    description: "Copy project-specific agents from Lullabot prompt library"
    type: "remote-copy-files"
    link: "https://github.com/Lullabot/prompt_library"
    repository:
      url: "https://github.com/Lullabot/prompt_library"
      type: "branch"
      target: "main"
    source: "{project-type}/agents/"
    target: ".ai/agents"
    required: false
    requires-project: true
    prompt: "Would you like to install project-specific agents from the prompt library?"
    filters:
      - type: "frontmatter-removal"
      - type: "extract-content"
        pattern: "`````(.*?)`````"
        flags: "s"
        group: 1

  # AGENTS.md file generation with project-specific rules
  agents-md:
    name: "AGENTS.md"
    description: "Create/update AGENTS.md with project-specific rules"
    type: "agents-md"
    source: "assets/AGENTS.md"
    target: "."
    link-type: "@"
    required: false
    prompt: "Would you like to set up AGENTS.md with project-specific rules?"

  # AI Task Manager setup with tool-specific configuration
  ai-task-manager:
    name: "AI Task Manager"
    description: "Set up AI Task Manager"
    type: "package-install"
    link: "https://github.com/e0ipso/ai-task-manager"
    package:
      name: "@e0ipso/ai-task-manager"
      type: "npx"
      install-command: "npx @e0ipso/ai-task-manager init --assistants {tool}"
      version-command: "npx @e0ipso/ai-task-manager init --version"
    required: false
    prompt: "Would you like to set up AI Task Manager?"

  # AI tool wrapper files (source files, target locations vary by tool)
  wrapper:
    name: "AI Tool Wrapper"
    description: "Create AI tool wrapper file"
    type: "copy-files"
    source: "assets/wrappers/"
    required: false
    prompt: "Would you like to create an AI tool wrapper file?"

  # Rules and AGENTS.md setup
  rules-and-agents-md:
    name: "Rules and AGENTS.md setup"
    description: "Set up rules and the AGENTS.md file"
    type: "multi-step"
    fail-fast: false
    steps:
      - rules: "@shared_tasks.rules"
      - agents-md: "@shared_tasks.agents-md"
    required: false
    prompt: "Would you like to install project-specific rules from the prompt library and an AGENTS.md file?"

# =============================================================================
# TOOLS CONFIGURATION
# =============================================================================
# Tool-specific task configurations. Each tool can reference shared tasks
# directly or extend them with tool-specific overrides.

tools:
  claude:
    name: "Claude Code"
    tasks:
      rules: "@shared_tasks.rules-and-agents-md"
      ai-task-manager: "@shared_tasks.ai-task-manager"
      wrapper:
        extends: "@shared_tasks.wrapper"
        items: { "claude.md": "CLAUDE.md" }
        target: "."

  cursor:
    name: "Cursor"
    tasks:
      # Cursor-specific memory bank setup
      memory-bank:
        name: "Memory bank setup"
        description: "Initialize cursor-bank for AI assistance"
        type: "package-install"
        link: "https://github.com/tacticlaunch/cursor-bank"
        package:
          name: "cursor-bank"
          type: "npx"
          install-command: "npx cursor-bank init"
          version-command: "npx cursor-bank --version"
        required: false
        prompt: "Would you like to set up a memory bank for AI assistance?"

      # Shared rules
      rules: "@shared_tasks.rules"
      project-agents: "@shared_tasks.project-agents"

      # Drupal rules
      drupal-rules:
        name: "Drupal Rules"
        description: "Copy Drupal rules from ivangrynenko/cursorrules"
        type: "remote-copy-files"
        link: "https://github.com/ivangrynenko/cursorrules"
        repository:
          url: "https://github.com/ivangrynenko/cursorrules"
          type: "branch"
          target: "main"
        source: ".cursor/rules/"
        target: ".ai/rules"
        items:
          - "drupal-*.mdc"
          - "*drupal-*.mdc"
        projects: ["development"]
        required: false
        prompt: "Would you like to install Drupal rules from ivangrynenko/cursorrules?"

      # AGENTS.md file generation with project-specific rules
      agents-md:
        extends: "@shared_tasks.agents-md"
        link-type: "@"

      # VSCode XDebug configuration
      vscode-xdebug:
        name: "VSCode XDebug"
        description: "Set up VSCode XDebug for PHP debugging"
        type: "copy-files"
        source: "assets/vscode"
        items: ["launch.json"]
        target: ".vscode/"
        required: false
        prompt: "Would you like to set up VSCode XDebug for PHP debugging?"

  gemini:
    name: "Gemini"
    tasks:
      rules: "@shared_tasks.rules-and-agents-md"
      project-agents: "@shared_tasks.project-agents"
      ai-task-manager: "@shared_tasks.ai-task-manager"
      wrapper:
        extends: "@shared_tasks.wrapper"
        items: { "gemini.md": "GEMINI.md" }
        target: "."

  github-copilot:
    name: "GitHub Copilot"
    tasks:
      rules: "@shared_tasks.rules-and-agents-md"
      project-agents: "@shared_tasks.project-agents"
      wrapper:
        extends: "@shared_tasks.wrapper"
        items: { "github-copilot.md": "copilot-instructions.md" }
        target: ".github/"

  vscode:
    name: "VSCode"
    tasks:
      vscode-xdebug:
        name: "VSCode XDebug"
        description: "Set up VSCode XDebug for PHP debugging"
        type: "copy-files"
        source: "assets/vscode"
        items: ["launch.json"]
        target: ".vscode/"
        required: false
        prompt: "Would you like to set up VSCode XDebug for PHP debugging?"

  windsurf:
    name: "Windsurf"
    tasks:
      rules: "@shared_tasks.rules-and-agents-md"
      project-agents: "@shared_tasks.project-agents"
      wrapper:
        extends: "@shared_tasks.wrapper"
        items: { "windsurf.md": "agents.md" }
        target: ".windsurf/rules/"

# =============================================================================
# PROJECT TYPES
# =============================================================================
# Project type definitions with validation rules and requirements.

projects:
  # Drupal development projects
  development:
    name: "Development"
    validation:
      requiredFiles:
        - "composer.json"
        - ".git"
      requiredContent:
        composer.json: "drupal/core"
      optionalFiles:
        - "README.md"
        - "package.json"
        - "web/sites/default/settings.php"

  # Content strategy projects
  content-strategy:
    name: "Content Strategy"

  # Design projects
  design:
    name: "Design"

  # Project management projects
  project-management:
    name: "Project Management"

  # Quality assurance projects
  quality-assurance:
    name: "Quality Assurance"

  # Sales and marketing projects
  sales-marketing:
    name: "Sales and Marketing"
