Guia de compromisso do AI Compose
Editar páginaVisão geral
Seção intitulada “Visão geral”AI Compose Commit lê as alterações de código atuais e gera mensagens de commit no formato Convencional Commits. A questão é simples: gaste menos tempo escrevendo commits enquanto mantém o histórico mais claro.
O que é o AI Compose Commit?
Seção intitulada “O que é o AI Compose Commit?”O AI Compose Commit analisa suas alterações e escreve mensagens de commit padronizadas para elas. Ele troca a escrita manual de commits por um histórico mais consistente.
Use-o quando:
- Grandes alterações de código que exigem vários commits
- Projetos multi-repositórios com mudanças coordenadas
- Equipes que exigem formatos de commit padronizados
- Desenvolvedores que desejam melhorar a qualidade do commit
Principais vantagens
Seção intitulada “Principais vantagens”| Recurso | Confirmações manuais tradicionais | Compromisso de composição de IA |
|---|---|---|
| Comprometa a qualidade | Depende da experiência individual | Baseado nas melhores práticas, qualidade consistente |
| Velocidade de confirmação | Requer pensamento e organização | Geração instantânea com um clique |
| Consistência | Pode variar entre commits | Segue padrões automaticamente |
| Suporte a vários repositórios | Coordenação manual necessária | Reconhecimento e agrupamento automático de repositórios |
| Economia de tempo | Pode levar um tempo significativo | Economiza de 10 a 60+ segundos por commit |
Início rápido
Seção intitulada “Início rápido”Habilitar recurso
Seção intitulada “Habilitar recurso”No aplicativo de desktop HagiCode, navegue até o projeto onde deseja usar o AI Compose Commit e habilite este recurso.
Importante: Certifique-se de que seu projeto foi adicionado ao HagiCode primeiro.
Recurso de gatilho
Seção intitulada “Recurso de gatilho”Localize o botão “AI Combined Commit” na seção de operações do Git.

Este botão normalmente está localizado em destaque na seção de operações do Git, próximo a outras ações de controle de versão.
Nota importante: Clicar neste botão acionará a geração automática de mensagens de commit. Se você precisar reverter ou modificar commits, use comandos padrão do Git.
Alerta de risco de primeiro uso
Seção intitulada “Alerta de risco de primeiro uso”Ao usar o AI Compose Commit pela primeira vez ou com alterações não aprovadas, o sistema exibirá uma caixa de diálogo de confirmação.

A caixa de diálogo contém opções, incluindo:
- Confirme e inicie o processamento
- Entenda os riscos, não mostre mais este aviso
- Marcar esta opção torna o uso subsequente mais conveniente
Recomendamos a leitura cuidadosa do prompt de risco durante o primeiro uso para compreender as implicações dos commits automáticos.
Ver resultados
Seção intitulada “Ver resultados”Depois que o AI concluir o processamento, você verá uma notificação de sucesso.
As mensagens de commit foram geradas e estão prontas. Você pode revisá-los antes de finalizar, se necessário.
Detalhes do recurso
Seção intitulada “Detalhes do recurso”Lógica de análise de IA
Seção intitulada “Lógica de análise de IA”O AI Compose Commit analisa as alterações do seu código por meio do seguinte processo:
1. Leia as alterações no espaço de trabalho
Seção intitulada “1. Leia as alterações no espaço de trabalho”O sistema coleta todos os arquivos modificados, adicionados recentemente e excluídos no espaço de trabalho atual.
2. Analise o conteúdo do arquivo
Seção intitulada “2. Analise o conteúdo do arquivo”A IA analisa profundamente o conteúdo dos arquivos alterados para compreender:
- Mudanças funcionais implementadas
- Correções de bugs aplicadas
- Padrões de refatoração usados
- Dependências adicionadas ou removidas
3. Identifique associações de mudança
Seção intitulada “3. Identifique associações de mudança”A IA identifica de forma inteligente quais mudanças devem ser agrupadas:
- Mudanças de front-end e back-end para o mesmo recurso
- Modificações relacionadas ao arquivo de configuração
- Teste atualizações junto com mudanças de implementação
4. Gerar estrutura de commit
Seção intitulada “4. Gerar estrutura de commit”AI gera informações de commit estruturadas seguindo a especificação de commits convencionais:
<type>(<scope>): <subject> <body> <footer>5. Write Commit Message
Seção intitulada “5. Write Commit Message”Each change is transformed into a clear, descriptive commit message.
Commit Format Specification
Seção intitulada “Commit Format Specification”AI-generated commit messages follow the Conventional Commits format:
<tipo>(<escopo>): <assunto> <corpo> <rodapé>type: Commit type (required)
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no code change)refactor: Code refactoringtest: Adding or updating testschore: Build process or auxiliary tool changesperf: Performance improvements
scope: Scope of the change (optional)
- Indicates which part of the project is affected
- Format:
module/nameorcategory/name
subject: Short description of the change (required)
- Imperative mood
- Max 50 characters
- Use present tense: “Add” not “Added”
body: Detailed description (optional)
- What was changed and why
- Can use multiple paragraphs
- Max 100 characters for first line, 72 for subsequent lines
footer: References to related issues (optional)
Closes #123BREAKING CHANGE: ...Co-Authored-By: @anthropic.com>
Example Output
Seção intitulada “Example Output”feat(auth): adiciona funcionalidade de login do usuárioImplementei autenticação OAuth2 com provedores Google e GitHub.
O componente de login agora suporta:- Integração do Google OAuth- Integração GitHub OAuth- Gerenciamento de sessão com tokens JWT
Coautor: Claude Opus 4.6 <noreply@anthropic.com>Comparison with Traditional Manual Commits
Seção intitulada “Comparison with Traditional Manual Commits”Manual Commits
Seção intitulada “Manual Commits”Traditional Git commits rely on:
- Developer’s experience and mood
- Individual writing habits
- Time constraints affecting quality
- Inconsistent formatting across team
AI Compose Commit
Seção intitulada “AI Compose Commit”AI Compose Commit provides:
- Standardized format: Always follows Conventional Commits specification
- Intelligent analysis: Understands code context and relationships
- Quality consistency: Maintains professional tone and accuracy
- Time efficiency: Reduces commit writing time from 5-30 minutes to seconds
When to Use Each
Seção intitulada “When to Use Each”Use AI Compose Commit When:
- Large batch changes (multiple files, complex features)
- Coordinated changes across multiple repositories
- Need for high-quality, consistent commit messages
- Team projects with multiple contributors
Use Manual Commits When:
- Small, focused changes (single file, simple bug fix)
- Personal projects with full control over commit quality
- When you have time to craft thoughtful, personalized messages
Multi-Repository Support
Seção intitulada “Multi-Repository Support”monospecs Integration
Seção intitulada “monospecs Integration”When managing monospecs-based multi-repository projects, AI Compose Commit provides enhanced capabilities:
Read monospecs.yaml
Seção intitulada “Read monospecs.yaml”AI automatically reads the monospecs.yaml configuration to:
- Identify all configured sub-repositories
- Match file paths to corresponding repositories
- Access display names and icons for UI rendering
Match File Changes
Seção intitulada “Match File Changes”AI intelligently matches each changed file to the correct sub-repository:
- Analyzes file path in project structure
- Matches against monospecs repository configurations
- Groups related changes together for logical commits
Separate Commits
Seção intitulada “Separate Commits”Each sub-repository receives independent commits:
- Frontend changes committed to
repos/frontend - Backend changes committed to
repos/backend - Maintains independent git history and version control
Co-Authored-By Footer
Seção intitulada “Co-Authored-By Footer”AI Compose Commit appends the currently effective Co-Authored-By trailer to every generated commit. Interactive Git commits and the OpenSpec v1 archive prompt reuse the same resolution rules, so teams only need to maintain one convention.
The precedence order is fixed:
- Project-level config: local Git config in the current repository (
git config --local) - Global config: user-level Git config (
git config --global) - Built-in default:
HagiCode <noreply@hagicode.com>
If a layer is missing name, missing email, or contains an invalid email address, HagiCode skips that layer and falls back to the next one instead of emitting a malformed trailer.
Default output:
Coautor: HagiCode <noreply@hagicode.com>Repository override example:
git config --local coAuthoredBy.name "Bot da plataforma"git config --local coAuthoredBy.email "platform-bot@example.com"Global fallback example:
git config --global coAuthoredBy.name "HagiCode"git config --global coAuthoredBy.email "noreply@hagicode.com"With the local override above, the trailer becomes:
Coautor: Platform Bot <platform-bot@example.com>Operational details:
- If the commit message already contains the same resolved trailer, HagiCode does not append a duplicate.
- If the message already contains a different
Co-Authored-Byline, HagiCode keeps that line and still appends the resolved AI trailer. - Teams should treat repository-level config as the canonical rule and keep global config as a personal fallback.
Advantages for Multi-Repo Projects
Seção intitulada “Advantages for Multi-Repo Projects”Traceability: Clear history of which repository received which changes Coordination: Changes across multiple repos can be committed simultaneously or sequentially Consistency: Uniform commit format across all repositories Efficiency: Reduced coordination overhead for changes spanning multiple repositories
Usage Guidelines
Seção intitulada “Usage Guidelines”Best Practices
Seção intitulada “Best Practices”For optimal AI Compose Commit results:
1. Keep Changes Focused
- Each commit should address a single feature or fix
- Avoid bundling unrelated changes in one commit
- Make incremental progress with meaningful commit messages
2. Clear Code Comments
- Add comments in complex code to help AI understand intent
- Use descriptive comments for non-obvious implementation details
- Keep comments updated as code evolves
3. Reasonable File Naming
- Use clear, descriptive file names
- Follow project naming conventions
- Avoid overly generic names that don’t convey purpose
4. Timely Committing
- Commit frequently as meaningful changes are completed
- Don’t accumulate large batches of uncommitted work
- Each commit should represent a logical unit of progress
5. Leverage Multi-Repo Intelligence
- Let AI group related changes across repositories
- Use descriptive scopes to indicate affected modules
- Review AI’s suggested groupings before committing
Usage Restrictions
Seção intitulada “Usage Restrictions”Limitations
Seção intitulada “Limitations”AI Compose Commit has the following usage limitations:
1. Network Dependency
- Requires active connection to AI service
- Processing time depends on network conditions
- Large codebases may take longer to analyze
2. File Size Limits
- Very large files (>10MB) may exceed processing limits
- Binary files are not analyzed (only text-based content)
- Split large changes into smaller commits if needed
3. Codebase Complexity
- Extremely complex code may be difficult to analyze fully
- Deeply nested or obfuscated code may have reduced accuracy
- Results are best-effort based on visible code
4. First Use Considerations
When using AI Compose Commit for the first time:
- Start with smaller, safer changes to understand AI behavior
- Verify generated commits before finalizing
- Provide clear code comments to improve AI understanding
- Check that project is properly connected in HagiCode
Troubleshooting
Seção intitulada “Troubleshooting”Feature Not Available
Seção intitulada “Feature Not Available”If you don’t see the AI Combined Commit button:
- Ensure the project is added to HagiCode
- Refresh the interface
- Check if this feature is enabled in your version
- Verify your network connection to AI service
No Response After Clicking
Seção intitulada “No Response After Clicking”If nothing happens after clicking the button:
- Check for notification dialogs (may be hidden behind other windows)
- Check browser console for error messages
- Verify network connectivity
- Try restarting the application
Incorrect Generated Messages
Seção intitulada “Incorrect Generated Messages”If AI generates incorrect commit messages:
- Manually modify using
git commit --amend - Add more descriptive comments to help AI understand
- Check code changes are accurately represented
- Re-trigger the feature after making adjustments
Processing Takes Too Long
Seção intitulada “Processing Takes Too Long”If processing seems to be taking an unusually long time:
- Check if there are very large files being analyzed
- Verify network stability
- Try splitting changes into smaller batches
- Check if AI service is experiencing high load
Co-Authored-By Footer Missing
Seção intitulada “Co-Authored-By Footer Missing”If commits don’t include the expected footer:
- This may indicate AI service is unavailable
- Check your API token configuration in HagiCode settings
- Verify network connectivity
- Check whether the local
coAuthoredBy.name/coAuthoredBy.emailconfig is incomplete and therefore falling back to another layer - Consider generating commits manually if issue persists
For more information, refer to the HagiCode documentation or check the monospecs repository for configuration examples.