# Git Workflow configuration template - docs/git_workflow.yaml
kind: git_workflow
version: "1"
updated_at: "{{ today }}"

# Branch Strategy
branches:
  main: "{{ git_workflow.branches.main | default('main') }}"
  dev: "{{ git_workflow.branches.dev | default('dev') }}"
  feature_prefix: "{{ git_workflow.branches.feature_prefix | default('feature/') }}"
  design_prefix: "{{ git_workflow.branches.design_prefix | default('design/') }}"
  refactor_prefix: "{{ git_workflow.branches.refactor_prefix | default('refactor/') }}"
  fix_prefix: "{{ git_workflow.branches.fix_prefix | default('fix/') }}"
  release_prefix: "{{ git_workflow.branches.release_prefix | default('release/') }}"

branch_strategy_description: |
  {{ git_workflow.branches.main | default('main') }}                 # stable release
  +-- {{ git_workflow.branches.dev | default('dev') }}              # development mainline
  |   +-- {{ git_workflow.branches.feature_prefix | default('feature/') }}{feature-name}     # feature development
  |   +-- {{ git_workflow.branches.design_prefix | default('design/') }}{design-doc}    # design iteration
  |   +-- {{ git_workflow.branches.refactor_prefix | default('refactor/') }}{module-name}    # refactoring
  |   +-- {{ git_workflow.branches.fix_prefix | default('fix/') }}{issue-desc}       # bug fix

# Commit Prefixes
commit_prefixes:
{% for prefix in git_workflow.commit_prefixes %}
  - prefix: "{{ prefix.prefix }}"
    description: "{{ prefix.description }}"
{% endfor %}
{% if not git_workflow.commit_prefixes %}
  - prefix: "feat:"
    description: "New feature"
  - prefix: "fix:"
    description: "Bug fix"
  - prefix: "docs:"
    description: "Documentation only changes"
  - prefix: "style:"
    description: "Code style changes (formatting, semicolons, etc)"
  - prefix: "refactor:"
    description: "Code refactoring"
  - prefix: "test:"
    description: "Adding or updating tests"
  - prefix: "chore:"
    description: "Build process or auxiliary tool changes"
  - prefix: "perf:"
    description: "Performance improvements"
  - prefix: "security:"
    description: "Security fixes"
{% endif %}

# Commit Requirements
commit_required: {{ git_workflow.commit_required | default(true) }}
commit_message_guidelines:
  - "Use imperative mood: 'Add feature' not 'Added feature'"
  - "First line is summary (max 50 chars)"
  - "Blank line, then detailed description if needed"
  - "Reference issue/TASK IDs when applicable"

# Git History as Design Record
git_as_design_record:
  enabled: true
  description: "Git history records the evolution of design thinking"
  principles:
    - "Every productive dialogue must produce a Git commit"
    - "Commits record the evolution of thinking"
    - "Commit messages explain the 'why', not just the 'what'"

# Tagging
version_tag_pattern: "v{major}.{minor}.{patch}"
annotated_tags: true

# Hooks (if enabled)
hooks:
  enabled: {{ git_workflow.hooks.enabled | default(false) }}
  types:
    - pre-commit
    - post-commit
    - pre-push
