dev-git-workflow
Skill6 starsChanged 24 days agoMITView on GitHub
Git workflow para projetos de software complexo — branch strategy, conventional commits, PR templates, merge flows e regras de autoridade.
- Reads credentials
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- vasilyu1983/AI-Agents-publictheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- vasilyu1983/AI-Agents-public★ 94same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- ai-ml-data-scienceSkill
- ai-ml-timeseriesSkill
- brand-platformSkill
- brand-researchSkill
- brand-rolloutSkill
- brand-trackingSkill
- brand-verbal-identitySkill
- brand-visual-systemSkill
- copy-humanizeSkill
- core-web-vitalsSkill
- data-analytics-engineeringSkill
- data-lake-platformSkill
- data-sql-optimizationSkill
- data-supabase-patternsSkill
- deep-researchSkill
- dev-api-designSkill
- dev-database-patternsSkill
- dev-debuggingSkill
- dev-defuddleSkill
- dev-error-handlingSkill
- dev-security-patternsSkill
- dev-technical-writingSkill
- dev-testing-strategySkill
- dev-typescript-patternsSkill
- doc-to-markdownSkill
- finance-bookkeepingSkill
- finance-cash-flowSkill
- finance-receivables-payablesSkill
- finance-reportingSkill
- finance-tax-complianceSkill
- instagram-dm-flowsSkill
- instagram-publishingSkill
- instagram-strategySkill
- legal-clause-librarySkill
- legal-compliance-lgpdSkill
- legal-contract-draftingSkill
- legal-contract-lifecycleSkill
- legal-researchSkill
- linkedin-publishingSkill
- linkedin-strategySkill
- negotiationSkill
- nextjs-react-best-practicesSkill
- presentation-designSkill
- pricingSkill
- sala-de-controleSkill
- sales-deck-productionSkill
- sales-discovery-intakeSkill
- sales-enablementSkill
- sales-pricing-paybackSkill
- sales-proposal-copySkill
- sales-proposal-planningSkill
- security-audit-methodSkill
- security-incident-responseSkill
- security-privacy-data-mapSkill
- security-threat-modelingSkill
- seo-ahrefsSkill
- seo-auditSkill
- seo-backlinksSkill
- The first 60 shown.
The file
Files
Git Workflow — Software Complexo
Branch Strategy
⚠️ Regra dura — branch de publicação: antes de qualquer
push/PR/merge, pergunte em qual branch publicar; amainé o padrão prioritário. Nunca crie branch nova nem assuma a branch atual por conta própria. Só usefeature/*(ou outra) quando o usuário pedir explicitamente — nesse caso vale a nomenclatura abaixo.
main → padrão de publicação, produção, sempre estável
├── feature/ → novas features SÓ quando o usuário pedir (ex: feature/42-user-auth)
├── fix/ → bugfixes sob demanda (ex: fix/login-null-pointer)
├── hotfix/ → urgente produção, parte de main
└── chore/ → deps, config, infraNomenclatura (quando branch for solicitada): {type}/{issue-id}-{slug} — ex: feature/42-user-authentication
Conventional Commits
Formato: type(scope): descrição imperativa em inglês
| Type | Quando usar |
feat | Nova funcionalidade |
fix | Correção de bug |
refactor | Mudança sem feature nem fix |
test | Adicionar/corrigir testes |
chore | Deps, config, build |
docs | Documentação |
perf | Melhoria de performance |
ci | CI/CD |
Exemplos:
feat(auth): add JWT refresh token rotation
fix(api): handle null response from payment provider
test(auth): add token expiration edge cases
chore(deps): upgrade Next.js to 15.2.0Regras:
- Imperativo, minúsculo, sem ponto final
- Scope identifica o módulo (
auth,api,ui,db) - Breaking change:
feat(api)!: rename user endpoint - Referenciar story no rodapé:
Story: docs/smart-memory/stories/active/2.3-titulo.md
Autoridade de Git
| Operação | Quem pode |
git add, git commit | Todos os devs |
git branch, git checkout | Todos os devs |
git diff, git log, git status | Todos os agentes |
git merge (local) | Todos os devs |
git push | EXCLUSIVO dev-devops (Grav) |
gh pr create/merge | EXCLUSIVO dev-devops (Grav) |
Garantia técnica: Os agentes dev-dev-alpha, dev-dev-beta, dev-dev-gamma e dev-dev-delta têm o hook block-git-push.sh configurado via PreToolUse no frontmatter. Qualquer tentativa de git push nesses agentes é bloqueada automaticamente antes de executar — não é apenas uma regra no prompt, é uma barreira técnica.
O hook está em .claude/hooks/block-git-push.sh no projeto e é referenciado diretamente no frontmatter de cada agente implementer via $CLAUDE_PROJECT_DIR/.claude/hooks/block-git-push.sh.
Se git push for necessário em algum desses agentes, o fluxo correto é:
- Dev completa o commit local
- Dev notifica lead via SendMessage
- Lead delega ao Grav (dev-devops)
- Grav executa os quality gates e faz o push
Worktree por Dev
Cada dev trabalha em worktree isolado — zero conflito entre agentes paralelos.
Isolamento automático via frontmatter (recomendado)
Agentes com isolation: worktree no frontmatter recebem worktree própria automaticamente ao serem spawnados como subagents. Não é necessário criar manualmente. Os agentes dev-dev-alpha, dev-dev-beta, dev-dev-gamma e dev-dev-delta já têm esse campo configurado.
Isolamento manual (quando necessário controle explícito)
# Dev Alpha inicia story-2.1
git worktree add .claude/worktrees/story-2.1 -b feature/story-2.1
# Dev Beta inicia story-2.2 simultaneamente
git worktree add .claude/worktrees/story-2.2 -b feature/story-2.2Adicione
.claude/worktrees/ao.gitignorepara que worktrees não apareçam como untracked no checkout principal.
Copiar arquivos gitignored (.env, secrets)
Crie .worktreeinclude na raiz do projeto para copiar automaticamente arquivos gitignored para cada nova worktree:
# .worktreeinclude
.env
.env.local
config/secrets.jsonSó arquivos que já estão no .gitignore são copiados — arquivos rastreados nunca são duplicados.
Base branch da worktree
Por padrão worktrees partem de origin/HEAD (branch padrão remota, sempre limpa). Para partir do HEAD local (útil quando se quer incluir commits não publicados):
// .claude/settings.json
{
"worktree": {
"baseRef": "head"
}
}Sessões em background e worktrees
Sessões iniciadas com claude --bg ou via Agent View ganham worktree isolada automaticamente em .claude/worktrees/, sem necessidade de --worktree. Para desativar esse comportamento:
{ "worktree": { "bgIsolation": "none" } }Remoção (responsabilidade do DevOps)
git worktree list
git worktree remove .claude/worktrees/story-2.1
git branch -d feature/story-2.1Merge Strategy
| Situação | Estratégia |
| Feature → main | Squash merge (histórico limpo) |
| Hotfix → main | Merge commit (rastreabilidade) |
| Chore/deps | Squash merge |
PR Template
## O que esta PR faz
{1-3 bullets descrevendo a mudança}
## Story
docs/smart-memory/stories/done/{story-id}.md
## Checklist
- [ ] `npm test` passando
- [ ] `npm run lint` sem erros
- [ ] `npm run typecheck` sem erros
- [ ] QA Gate: PASS (Axis)
- [ ] Docs atualizadas (se aplicável)
🤖 Generated with [Claude Code](https://claude.ai/claude-code)Quality Gates antes de push (responsabilidade de Grav)
npm run lint && npm run typecheck && npm test && npm run buildTodos devem passar. Se algum falhar, Grav notifica o lead e retorna ao dev responsável.
Regras absolutas
- Nunca commitar
.env, secrets ou credenciais - Nunca force push em
main - Sempre
git statusantes de commitar - Nunca
git add .— sempre arquivos específicos - Branch deletado após merge — zero branches stale
git pushé exclusivo de Grav — garantido por hook técnico nos agentes dev
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

