Git Commit Design & Workflow Standards
This skill defines the Commit Design Taxonomy, commit classification standards, message conventions, validation requirements, and the strict Human-In-The-Loop (HITL) Push Boundary for all AI agents and human contributors across repositories.
1. High-Priority Rule: Frequent, Atomic & Explanatory Commits
2. Commit Design Taxonomy & Classification
All commits in repositories adhering to this standard MUST be classified under one of the standard commit categories outlined below:
┌─────────────────────────────────────────────────────────────────────────┐
│ COMMIT DESIGN TAXONOMY │
├───────────────┬─────────────────────────────────────────────────────────┤
│ feat │ Feature Addition (new capability, endpoint, service) │
│ perf │ Performance Optimization (caching, query/vector speed) │
│ refactor │ Structural Improvement (cleaner code, zero logic change)│
│ fix │ Bug Fix & Error Resolution (runtime fix, edge cases) │
│ ui / style │ UI & Visual Design (Tailwind, components, theme, layout)│
│ ci / deploy │ CI/CD, Containerization & DevOps (Actions, Docker, YAML)│
│ db │ Database & Migration (idempotent schemas, pgvector) │
│ test │ Testing & Quality Assurance (unit, mock, agent tests) │
│ docs │ Documentation & Specifications (README, SKILL.md, docs) │
│ chore │ Routine Maintenance (dependency updates, tool configs) │
└───────────────┴─────────────────────────────────────────────────────────┘Category 1: Feature Addition (feat)
feat(<scope>): <short imperative description>backend, frontend, worker, agent, connectors, storage, mcp, api, auth - feat(agent): add model multi-key automatic failover client
- feat(worker): implement SHA-256 archive checksum verification
- feat(connectors): add AES-256 encrypted credential vault
- feat(mcp): implement native MCP server tool handlers
Category 2: Improvement & Optimization (perf, refactor)
- Performance: perf(<scope>): <short imperative description>
- Restructuring: refactor(<scope>): <short imperative description>
db, vector, api, backend, worker, cache, websocket - perf(db): add GIN index on logs for sub-millisecond full-text queries
- perf(agent): cache model capability registry in-memory
- refactor(backend): consolidate WebSocket hub client connection lifecycle
- refactor(worker): decouple job execution loop from direct database calls
Category 3: Fix & Bug Resolution (fix)
fix(<scope>): <short imperative description>agent, docker, ci, db, auth, api, worker, frontend - fix(agent): prevent session crash by rotating API key on 429 rate limit
- fix(docker): enable --ignore-scripts in builder for pnpm 10 compatibility
- fix(db): ensure migration applies idempotent alter column statement
- fix(ci): resolve toolchain version mismatch in GitHub Actions runner
Category 4: UI & Visual Design (ui, style)
ui(<scope>): <short imperative description> or feat(ui): <short imperative description>dashboard, analytics, components, theme, layout - ui(dashboard): modernize real-time progress cards and status badges
- ui(analytics): add interactive latency distribution charts
- ui(theme): implement high-contrast dark mode color palette
- ui(components): add confirmation modal for Human-In-The-Loop agent approvals
Category 5: CI/CD, Containerization & DevOps (ci, deploy)
ci(<scope>): <short imperative description> or feat(deploy): <short imperative description>actions, docker, deploy, hooks, precommit - ci(actions): implement production-grade automated CI/CD pipeline
- feat(deploy): configure deployment manifests and runtime configurations
- ci(docker): switch Go builder to golang:alpine for multi-platform compatibility
- feat(hooks): configure comprehensive pre-commit validation gates
Category 6: Database & Schema Evolution (db)
db(<scope>): <short imperative description> or feat(db): <short imperative description>DROP TABLE or TRUNCATE. Must use CREATE TABLE IF NOT EXISTS and CREATE INDEX IF NOT EXISTS.migrations, pgvector, indexes, pool - db(migrations): add credentials table for encrypted vault
- db(pgvector): add HNSW vector index generation lifecycle triggers
Category 7: Testing & Quality Assurance (test)
test(<scope>): <short imperative description>agent, backend, worker, frontend, e2e - test(agent): add test suite for multi-turn HITL confirmation workflow
- test(backend): add unit tests for WebSocket client hub lifecycle
- test(worker): add mock API server for job deduplication tests
Category 8: Documentation & Architectural Blueprints (docs)
.agents/skills/), CHANGELOG notes, and developer setup instructions.docs(<scope>): <short imperative description>architecture, skills, deployment, readme, changelog - docs(skills): document commit design taxonomy and CLI tooling guide
- docs(deployment): document automated CI/CD pipeline and branching runbooks
3. Mandatory Local Branch First
<github-username>/<parent-branch>/<feature>). ``bash git switch -c <github-username>/main/<feature-name> ` NEVER make changes, staging, or commits directly on main or dev`.4. The Strict Push Permission Boundary (HITL)
┌─────────────────────────────────────────────────────────┐
│ AGENT DOMAIN │
│ │
│ 1. Modify files for specific logical milestone │
│ 2. Run linters, type checks, and pre-commit gates │
│ 3. Create LOCAL signed Git commit (git commit -s -S) │
│ 4. Repeat steps 1-3 for each milestone │
└────────────────────────────┬────────────────────────────┘
│
[HUMAN REVIEW BOUNDARY]
│
┌────────────────────────────▼────────────────────────────┐
│ HUMAN DOMAIN │
│ │
│ 5. Human inspects git diff and git log │
│ 6. Human decides whether to push or request changes │
│ 7. Human executes git push origin <branch> (or prompts)│
└─────────────────────────────────────────────────────────┘git commit -s -S). - Agents must never run git push or create Pull Requests automatically without explicit user instruction. - Pushing to remote and opening a Pull Request is permitted ONLY when explicitly requested by the human user (e.g. *"create a PR to main"*). - All Pull Requests must target `main` only.5. Mandatory Sign-off (-s) and Signing (-S) Flags
-s and -S flags: - `-s` (`--signoff`): Adds the standard Signed-off-by: Author <email> trailer (DCO compliance). - `-S` (`--gpg-sign`): Cryptographically signs the commit with the configured GPG/SSH signing key.6. Pre-Commit Validation Checklist
Before staging files or creating a local commit, verify that the code passes validation:
# Unified pre-commit validation gate
make pre-commit
# Or individual verifications:
make lint
make typecheck
make test
make build7. Step-by-Step Commit Runbook for AI Agents
```bash
git status
```
```bash
git add <path/to/relevant/files>
```
feat, perf, refactor, fix, ui, ci, db, test, docs, chore.
```bash
git commit -s -S -m "<type>(<scope>): <clear descriptive summary>"
```
```bash
git log -n 1 --show-signature --stat
```