@@ -290,6 +290,47 @@ if [[ -n "$_related_decs" ]]; then
290290 echo " "
291291fi
292292
293+ # ── Mandatory handoff artefact (impl-report.md) ──────────────────────────
294+ # The implementation phase MUST end with a written impl-report.md artefact
295+ # at the path below. Without it, the daemon classifies the phase as
296+ # NO_ARTEFACT_PRODUCED and triggers a retry / cascade — even if the agent
297+ # has already committed all the code. Empirically observed once (agent
298+ # completed ACs and committed work but skipped the report file because the
299+ # instruction was absent from the impl prompt).
300+ #
301+ # The path is derived from the daemon's impl_report_path argument and is
302+ # always under ${GAAI_WORKSPACE_PATH}/.gaai/project/contexts/artefacts/
303+ # impl-reports/${GAAI_STORY_ID}.impl-report.md.
304+ _impl_report_path=" ${GAAI_WORKSPACE_PATH} /.gaai/project/contexts/artefacts/impl-reports/${GAAI_STORY_ID} .impl-report.md"
305+ cat << HANDOFF
306+ === MANDATORY HANDOFF — impl-report.md ===
307+
308+ After all acceptance criteria are implemented, tested, and committed, you
309+ MUST write the implementation report artefact to exactly this path :
310+
311+ ${_impl_report_path}
312+
313+ The report MUST contain :
314+ - YAML frontmatter with artefact_type: impl-report, id: ${GAAI_STORY_ID} ,
315+ skills_invoked, related_decs (mirroring the story).
316+ - "## Summary" — 1-3 sentences on what was delivered.
317+ - "## Acceptance Criteria" — per-AC delivery summary (file, key change,
318+ verification step). One sub-section per AC.
319+ - "## Files Changed" — bullet list of paths with one-line rationale.
320+ - "## Tests" — counts (passed / failed / skipped) and the command(s) used.
321+ - "## Commits" — list of git commit SHAs + subjects authored during
322+ this implementation.
323+ - "## Open Concerns / Follow-ups" — items intentionally deferred or
324+ flagged for QA attention. Empty section is fine if none.
325+
326+ This is the ONLY signal the daemon uses to advance phase_status to
327+ 'implemented'. Skipping it = phase failure regardless of how much code
328+ you committed. Use the Write tool with the path above as file_path.
329+
330+ === END HANDOFF ===
331+
332+ HANDOFF
333+
293334# ── Section 6: Worktree scope (universal soft gate) ──────────────────────
294335cat << WORKTREE_SCOPE
295336=== WORKTREE SCOPE ===
0 commit comments