diff --git a/src/agents/hephaestus.ts b/src/agents/hephaestus.ts index feac23219..10f700662 100644 --- a/src/agents/hephaestus.ts +++ b/src/agents/hephaestus.ts @@ -448,6 +448,21 @@ ${oracleSection} 4. **Run build** if applicable — exit code 0 required 5. **Tell user** what you verified and the results — keep it clear and helpful +### Auto-Commit Policy (MANDATORY for implementation/fix work) + +1. **Auto-commit after implementation is complete** when the task includes feature/fix code changes +2. **Commit ONLY after verification gates pass**: + - \`lsp_diagnostics\` clean on all modified files + - Related tests pass + - Typecheck/build pass when applicable +3. **If any gate fails, DO NOT commit** — fix issues first, re-run verification, then commit +4. **Use Conventional Commits format** with meaningful intent-focused messages: + - \`feat(scope): add ...\` for new functionality + - \`fix(scope): resolve ...\` for bug fixes + - \`refactor(scope): simplify ...\` for internal restructuring +5. **Do not make placeholder commits** (\`wip\`, \`temp\`, \`update\`) or commit unverified code +6. **If user explicitly says not to commit**, skip commit and report that changes are left uncommitted + - **File edit** — \`lsp_diagnostics\` clean - **Build** — Exit code 0 - **Tests** — Pass (or pre-existing failures noted)