with one click
aif-done
// Finalize a verified OpenSpec-native change or legacy AI Factory-only plan, prepare commit/PR summaries, and drive evidence-backed follow-ups.
// Finalize a verified OpenSpec-native change or legacy AI Factory-only plan, prepare commit/PR summaries, and drive evidence-backed follow-ups.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | aif-done |
| description | Finalize a verified OpenSpec-native change or legacy AI Factory-only plan, prepare commit/PR summaries, and drive evidence-backed follow-ups. |
| version | 1.2.0 |
| author | ichi |
AIFHub/Handoff finalization skill. Finalizes a verified OpenSpec-native change or a legacy AI Factory-only plan, drafts commit and PR summaries, drives evidence-backed governance follow-ups, and can run or recommend evolution follow-ups.
This skill does not duplicate /aif-verify — it runs after a passing verification (PASS or PASS-with-notes).
Resolve mode from .ai-factory/config.yaml:
aifhub.artifactProtocol: openspec.OpenSpec-native mode finalizes the verified change state through scripts/openspec-done-finalizer.mjs. It is the only OpenSpec-native archive/finalization step after /aif-verify passes.
<change-id>..ai-factory/qa/<change-id>/.aif-gate-result block in verify.md to be valid JSON with "gate": "verify" and status of pass or warn..ai-factory/qa/<change-id>/coverage.json to exist, be current, and have coverage status pass or policy-accepted warn.fail, stop and suggest /aif-verify or /aif-fix.fail, stop and suggest rerunning /aif-verify <change-id> or /aif-fix <change-id>./aif-verify <change-id>.Code verification: PENDING as final verification.Read canonical OpenSpec artifacts:
openspec/specs/**openspec/changes/<change-id>/proposal.mdopenspec/changes/<change-id>/design.mdopenspec/changes/<change-id>/tasks.mdopenspec/changes/<change-id>/specs/**/spec.mdRead generated rules as derived guidance when present:
.ai-factory/rules/generated/openspec-merged-<change-id>.md.ai-factory/rules/generated/openspec-change-<change-id>.md.ai-factory/rules/generated/openspec-base.mdRuntime state and QA evidence live outside canonical changes:
.ai-factory/state/<change-id>/.ai-factory/qa/<change-id>/, including verify.md and coverage.jsonarchiveOpenSpecChange(changeId, options) from scripts/openspec-runner.mjs; this corresponds to openspec archive <change-id> --yes.archiveOpenSpecChange(changeId) for normal finalization.archiveOpenSpecChange(changeId, { skipSpecs: true }) for docs/tooling-only finalization; this corresponds to openspec archive <change-id> --yes --skip-specs --no-color.--skip-specs path while still writing final QA evidence and final summaries./aif-verify; /aif-verify does not archive and only records verification evidence..ai-factory/specs archive in OpenSpec-native mode..ai-factory/specs archive..ai-factory/specs.openspec/changes/<change-id>/.openspec/specs/** or manually move OpenSpec change folders.Normal output must report:
change-id;.ai-factory/qa/<change-id>/;.ai-factory/state/<change-id>/;/aif-mode sync, /aif-commit, and optional /aif-evolve.After successful finalization:
/aif-mode sync to refresh derived artifacts after archive./aif-commit as the next AI Factory command./aif-evolve when durable learning evidence exists./aif-done does not replace /aif-commit.Legacy AI Factory-only mode preserves the verified plan finalization contract based on .ai-factory/plans/<plan-id>/ and .ai-factory/specs/<plan-id>/.
pass or pass-with-notes).fail, this skill stops and suggests running /aif-verify first./aif-implement).status.yaml and check verification.verdict.pass/pass-with-notes:
/aif-verify first."git status shows uncommitted changes outside the current plan scope:
.ai-factory/specs/<plan-id>/..ai-factory/specs/<plan-id>/ already exists:
spec.md, refresh the index entry, and regenerate commit/PR/follow-up outputs from current plan evidence./aif-verify auto-archive behavior, adopt it instead of failing or blindly re-copying.status.yaml execution metadata) into the archive.plan.md alongside the folder artifacts.spec.md summarizing what was implemented, if part of the current contract..ai-factory/specs/index.yaml with the new entry.gh CLI is available:
gh is not available:
/aif-evolve./aif-roadmap handoff./aif-architecture handoff./aif-evolve when the user explicitly asked for integrated finalization and the runtime can chain the action; otherwise propose it as the next step.status.yaml:
status: done./aif-evolve action taken or recommended.| Artifact | Owner | This Skill |
|---|---|---|
openspec/changes/<change-id>/ | OpenSpec-native workflow | Reads before archive; OpenSpec CLI owns lifecycle mutation |
.ai-factory/qa/<change-id>/ | /aif-verify and aif-done | Reads verification and coverage evidence; writes done.md, openspec-archive.json, and raw archive output |
.ai-factory/state/<change-id>/ | OpenSpec-native runtime and aif-done | Reads traces; writes final-summary.md |
.ai-factory/specs/<plan-id>/ | aif-done legacy mode only | Creates or refreshes on legacy finalization |
.ai-factory/specs/index.yaml | aif-done | Updates |
.ai-factory/plans/<plan-id>/status.yaml | aif-done | Updates status: done |
| Commit/PR drafts | aif-done | Outputs to user |
.ai-factory/ROADMAP.md | roadmap owner | Update only with plan-backed evidence; otherwise hand off |
.ai-factory/RULES.md | project rules owner | Update only for durable plan-backed rules; otherwise hand off |
.ai-factory/ARCHITECTURE.md | architecture owner | Update only with plan-backed evidence; otherwise hand off |
coverage.json.archiveOpenSpecChange; never use custom OpenSpec archive logic..ai-factory/specs./aif-done; hand commit creation to /aif-commit or the user's normal git workflow.gh is unavailable, provide manual instructions instead of failing./aif-done as the canonical upstream workflow step, and do not present /aif-done as replacing /aif-commit.