schema_version: "1.0"

extension:
  id: git
  name: "Git Branching Workflow"
  version: "1.0.0"
  description: "Feature branch creation, numbering (sequential/timestamp), validation, and Git remote detection"
  author: adspecs
  repository: https://gitee.com/yuebon/adspecs
  license: MIT

requires:
  adspecs_version: ">=0.1.0"
  tools:
    - name: git
      required: false

provides:
  commands:
    - name: adspecs.git.feature
      file: commands/adspecs.git.feature.md
      description: "Create a feature branch with sequential or timestamp numbering"
    - name: adspecs.git.validate
      file: commands/adspecs.git.validate.md
      description: "Validate current branch follows feature branch naming conventions"
    - name: adspecs.git.remote
      file: commands/adspecs.git.remote.md
      description: "Detect Git remote URL for GitHub integration"
    - name: adspecs.git.initialize
      file: commands/adspecs.git.initialize.md
      description: "Initialize a Git repository with an initial commit"
    - name: adspecs.git.commit
      file: commands/adspecs.git.commit.md
      description: "Auto-commit changes after a adspecs command completes"

  config:
    - name: "git-config.yml"
      template: "config-template.yml"
      description: "Git branching configuration"
      required: false

hooks:
  before_constitution:
    command: adspecs.git.initialize
    optional: false
    description: "Initialize Git repository before constitution setup"
  before_prd:
    command: adspecs.git.feature
    optional: false
    description: "Create feature branch before PRD"
  before_clarify:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before clarification?"
    description: "Auto-commit before spec clarification"
  before_plan:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before planning?"
    description: "Auto-commit before implementation planning"
  before_tasks:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before task generation?"
    description: "Auto-commit before task generation"
  before_implement:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before implementation?"
    description: "Auto-commit before implementation"
  before_checklist:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before checklist?"
    description: "Auto-commit before checklist generation"
  before_analyze:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before analysis?"
    description: "Auto-commit before analysis"
  before_taskstoissues:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit outstanding changes before issue sync?"
    description: "Auto-commit before tasks-to-issues conversion"
  after_constitution:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit constitution changes?"
    description: "Auto-commit after constitution update"
  after_prd:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit PRD changes?"
    description: "Auto-commit after PRD"
  after_clarify:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit clarification changes?"
    description: "Auto-commit after spec clarification"
  after_plan:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit plan changes?"
    description: "Auto-commit after implementation planning"
  after_tasks:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit task changes?"
    description: "Auto-commit after task generation"
  after_implement:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit implementation changes?"
    description: "Auto-commit after implementation"
  after_checklist:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit checklist changes?"
    description: "Auto-commit after checklist generation"
  after_analyze:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit analysis results?"
    description: "Auto-commit after analysis"
  after_taskstoissues:
    command: adspecs.git.commit
    optional: true
    prompt: "Commit after syncing issues?"
    description: "Auto-commit after tasks-to-issues conversion"

tags:
  - "git"
  - "branching"
  - "workflow"

config:
  defaults:
    branch_numbering: sequential
    init_commit_message: "[adspecs] Initial commit"
