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
This commit is contained in:
Fusion
2026-05-17 23:18:10 +02:00
parent 577b052c05
commit 75657bbcb0
+31
View File
@@ -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.