Is AI-generated code safe to merge automatically?
No. A developer should inspect the diff, run checks, verify behavior, and confirm the output matches the requirement before merging.
Docs
Review AI-generated code by checking the requirement, changed files, tests, reports, edge cases, and unexpected edits before merging.
Why it matters
AI-generated code should be treated as reviewable output, not as an automatic merge candidate.
Review AI-generated code by comparing it against the original requirement, inspecting every changed file, running project checks, and confirming acceptance criteria before merge. In a Hal loop, also inspect reports, workflow state, commits, archives, and unresolved stories left by the run.
AGENTS.md instructions used by the agent.Hal is designed to leave reviewable state around the loop. Depending on current release behavior, inspect files such as reports, workflow state, commits, and archive output alongside the code diff.
hal validate
hal run
A completed command is not proof that the product behavior is correct.
| Area | Review question |
|---|---|
| Requirement | Does the diff solve the requested behavior and avoid non-goals? |
| Scope | Did the agent touch only expected files? |
| Tests | Do relevant checks pass locally? |
| Product behavior | Are edge cases and failure states handled? |
| Standards | Did the output follow repo commands and conventions? |
| Merge safety | Can a human explain and support the change? |
Rerun a smaller loop when the generated change is directionally useful but too broad, under-specified, or missing key constraints. Fix manually when the remaining work is small and the developer can confidently review the final diff.
Verify current Hal behavior in the source repository and install docs. Hal can make AI coding work more inspectable, but it does not guarantee code quality, test success, or production readiness.
Short answers before you put this into an agent workflow.
No. A developer should inspect the diff, run checks, verify behavior, and confirm the output matches the requirement before merging.
Start with the original requirement, then inspect changed files, tests, reports, acceptance criteria, edge cases, and unexpected edits.
Keep exploring the pieces of a reviewable coding loop.
Use this checklist to review AI coding loop output from Hal before merging commits, reports, workflow state, or generated code.
Run a small Hal loop from PRD planning through validation, implementation, and human review without handing over a broad feature.
Structure AI coding tasks with a clear user, scope, constraints, acceptance criteria, non-goals, and review plan before implementation.