phase-wrap

Executes phase-boundary closeout with retrospective evidence, drift gates, and council reviews.

Updated May 31, 2026
One-click install
npx skills add https://github.com/AlexanderNarbaev/agi --skill phase-wrap-alexandernarbaev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: phase-wrap
Source: https://github.com/AlexanderNarbaev/agi/tree/main/.opencode/skills/phase-wrap
Command: npx skills add https://github.com/AlexanderNarbaev/agi --skill phase-wrap-alexandernarbaev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Multi-phase AI agent workflows often close phases without verified evidence, leading to undocumented changes, undetected spec drift, hallucinated APIs, and untested code shipping silently. This Skill enforces a deterministic closeout protocol that blocks phase completion until all required evidence artifacts exist. ## Core Features & Use Cases - Mandatory Retrospective Gate: Writes a structured retrospective bundle (task counts, rejections, test failures, lessons learned) to .swarm/evidence/ before phase_complete can succeed. - Verification Gates: Runs drift verification against spec.md, hallucination checks on changed files, mutation testing, and SBOM generation, each enforced by runtime hooks that block phase_complete when evidence is missing. - Council Reviews: Dispatches 5-member phase and final councils (critic, reviewer, SME, test engineer, explorer) whose verdicts gate the last phase of a plan. - Use Case: An architect agent finishing Phase 2 of a coding plan uses this protocol to rescan the codebase, update docs, record retrospective metrics, verify no drift from the spec, and only then call phase_complete. ## Quick Start Ask the architect agent to wrap up the current phase and run the full phase-wrap protocol before completing it.

Frequently Asked Questions about phase-wrap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I complete a phase in a swarm agent workflow?▼

Write a retrospective bundle with write_retro, run drift and hallucination verification, then call phase_complete. The tool blocks with RETROSPECTIVE_MISSING if the evidence bundle for that phase number does not exist in .swarm/evidence/.

Why does phase_complete return RETROSPECTIVE_MISSING?▼

The retrospective gate requires a retro-N evidence bundle written via write_retro before phase_complete(N). The bundle must include phase, summary, task_count, task_complexity, and metric fields, with verdict auto-set to pass.

What is drift verification in phase closeout?▼

Drift verification delegates to a critic_drift_verifier agent that reads every changed file and checks it against .swarm/spec.md, returning ALIGNED, MINOR_DRIFT, MAJOR_DRIFT, or OFF_SPEC per task. The architect then writes the verdict with write_drift_evidence.

When is the hallucination guard gate required?▼

It is required only when hallucination_guard is enabled in the effective QA gate profile. If enabled and .swarm/evidence/{phase}/hallucination-guard.json is missing or not APPROVED, phase_complete is blocked by the plugin.

Which agents must be dispatched before phase_complete?▼

Coder and reviewer are always required; test_engineer is required when source or tests change; docs is required only when require_docs is true in the QA gate profile. Missing agents cause phase_complete to return an incomplete status listing the missing agents.

Can phase gates be skipped in turbo mode?▼

Yes. Turbo mode skips drift, hallucination, and mutation gates automatically, and the retrospective flow proceeds directly to phase_complete. Gate enforcement only applies when the corresponding QA gate profile options are enabled.