From 75657bbcb050a7f66c955241e143049974617f68 Mon Sep 17 00:00:00 2001 From: Fusion Date: Sun, 17 May 2026 23:18:10 +0200 Subject: [PATCH] docs: add git workflow and auto-commit rules to AGENTS.md Add section documenting: - Auto-commit on OpenSpec completion - Conventional commit format requirements - Commit scope rules - Integration with definition of done --- AGENTS.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 582a176..3d0a94b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -85,6 +85,36 @@ Before completion, report: Do not claim completion without verification evidence. +## Git workflow + +### Auto-commit on spec completion + +When an OpenSpec change is fully implemented and all tasks are complete: + +1. Stage all changes with `git add -A` +2. Create a commit with a proper conventional commit message +3. The commit message should: + - Use conventional commit format (`feat:`, `fix:`, `refactor:`, etc.) + - Reference the OpenSpec change name and relevant user stories + - Include a brief summary of what changed + - Mention quality gate results (tests passed, etc.) + - Example: + ``` + feat: implement user profile management + + - Add authenticated profile endpoints (GET/PUT /users/me) + - Add avatar upload with file validation + - Create frontend profile page + + Quality gates: pytest (50 passed), ruff, mypy + ``` + +### Commit scope + +- One commit per completed OpenSpec change (or related group of changes) +- Do not commit untested or broken code +- Do not commit secrets, .env files, or credentials + ## Definition of done A task is done when: @@ -94,4 +124,5 @@ A task is done when: * Relevant tests/checks passed or limitations are stated. * No unrelated scope was added. * Remaining risks or follow-ups are documented. +* Changes are committed with a proper conventional commit message.