# AIOS Core Configuration
# Generated by AIOS Documentation Integrity System
# Mode: Greenfield (New Project)
# Date: {{GENERATED_DATE}}

# =============================================================================
# PROJECT CONFIGURATION
# =============================================================================
project:
  type: USER_PROJECT
  mode: greenfield
  name: "{{PROJECT_NAME}}"
  created: "{{GENERATED_DATE}}"
  version: "0.1.0"

# =============================================================================
# DEV CONTEXT LOADING
# Files loaded automatically when @dev agent activates
# =============================================================================
devLoadAlwaysFiles:
  - docs/architecture/coding-standards.md
  - docs/architecture/tech-stack.md
  - docs/architecture/source-tree.md

# =============================================================================
# DEPLOYMENT CONFIGURATION
# All @devops agent tasks read from this section
# See docs/guides/DEPLOYMENT-GUIDE.md for details
# =============================================================================
deployment:
  # Workflow type: staging-first (with staging branch) or direct-to-main
  workflow: {{DEPLOYMENT_WORKFLOW}}

  # Branch routing configuration
  branches:
    # These branch patterns will target staging (if staging-first workflow)
    staging_targets:
      - "feature/*"
      - "fix/*"
      - "docs/*"
      - "chore/*"
      - "refactor/*"
      - "test/*"

    # These branch patterns will target production directly (emergency fixes)
    production_targets:
      - "hotfix/*"

    # Branch names
    staging_branch: {{STAGING_BRANCH}}
    production_branch: {{PRODUCTION_BRANCH}}

    # Default PR target for ambiguous cases
    default_target: {{DEFAULT_TARGET}}

  # Environment configuration
  environments:
    staging:
      name: "{{STAGING_ENV_NAME}}"
      branch: {{STAGING_BRANCH}}
      auto_deploy: true
      platform: "{{DEPLOYMENT_PLATFORM}}"
      url: "${STAGING_URL}"
      promotion_message: "After validation, create PR to {{PRODUCTION_BRANCH}} for production"

    production:
      name: "{{PRODUCTION_ENV_NAME}}"
      branch: {{PRODUCTION_BRANCH}}
      auto_deploy: true
      platform: "{{DEPLOYMENT_PLATFORM}}"
      url: "${PRODUCTION_URL}"
      promotion_message: "This is the final production deployment"

  # Quality gates for PRs
  quality_gates:
    lint: {{QUALITY_LINT}}
    typecheck: {{QUALITY_TYPECHECK}}
    tests: {{QUALITY_TESTS}}
    security_scan: {{QUALITY_SECURITY}}
    min_coverage: {{MIN_COVERAGE}}

  # PR defaults
  pr_defaults:
    auto_assign_reviewers: false
    draft_by_default: false
    include_deployment_info: true
    labels:
      staging: ["staging", "needs-review"]
      production: ["production", "promotion"]

# =============================================================================
# GITHUB INTEGRATION
# Pull Request and semantic-release configuration
# =============================================================================
github:
  enabled: true
  cli_required: false

  # Pull Request Configuration
  # Controls how @devops *create-pr generates PR titles
  pr:
    # Title format options:
    # - "conventional": For semantic-release (feat: description [Story X.Y])
    # - "story-first": Simple format ([Story X.Y] Description) - DEFAULT
    # - "branch-based": Just branch name as title
    title_format: {{PR_TITLE_FORMAT}}

    include_story_id: true

    # Only used when title_format: conventional
    conventional_commits:
      enabled: {{CONVENTIONAL_COMMITS_ENABLED}}
      branch_type_map:
        feature/: feat
        feat/: feat
        fix/: fix
        bugfix/: fix
        hotfix/: fix
        docs/: docs
        chore/: chore
        refactor/: refactor
        test/: test
      default_type: feat

    auto_assign_reviewers: false
    draft_by_default: false

  # Semantic Release (only for NPM packages)
  semantic_release:
    enabled: {{SEMANTIC_RELEASE_ENABLED}}

# =============================================================================
# AGENT CONFIGURATION
# Agent-specific settings
# =============================================================================
agents:
  dev:
    auto_load_context: true
    story_tracking: true

  qa:
    run_on_pr: true
    coverage_threshold: {{MIN_COVERAGE}}

  devops:
    auto_detect_workflow: true

# =============================================================================
# FEATURES
# Feature flags for optional functionality
# =============================================================================
features:
  documentation_integrity: true
  source_tree_guardian: true
  quality_metrics: true

  documentation_integrity_options:
    generate_source_tree: true
    generate_coding_standards: true
    generate_tech_stack: true
    brownfield_analysis: false
    gitignore_generation: true

# =============================================================================
# CUSTOM CONFIGURATION
# Project-specific settings
# =============================================================================
custom: {}
