workflow-close
Close an accepted or aborted workflow run while preserving history.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 65
- Forks
- 0
01 前言 Front Matter
- name
- workflow-close
- description
- Close an accepted or aborted workflow run while preserving history.
03 SKILL.md 正文
Objective
Close an accepted or intentionally aborted workflow run without deleting its canonical history: summarize the run, record metrics, preserve unresolved risks, and record the close event.
Input
.agent-surface/workflows/current.json
.agent-surface/workflows/<run_id>/run.json
.agent-surface/workflows/<run_id>/events.ndjson
.agent-surface/workflows/<run_id>/boss.json
.agent-surface/workflows/<run_id>/reviewer.json
.agent-surface/workflows/<run_id>/judger.json when present
Run workflow-doctor first as the required structural check, and do not close a run with blocking doctor findings unless the user explicitly asks to abort or quarantine it. Use ops-report or ops-learn only as helper analysis for summaries or lesson candidates, with output in this skill's close format; unless the user explicitly asks, edit no global memory, run no shipping commands, and change no workflow state outside the close artifacts.
Procedure
- Choose the state:
closed(accepted work is merged or intentionally complete),quarantined(artifacts are useful but unsafe to continue automatically), oraborted(the user or policy stopped the run before completion). While required role artifacts are missing, onlyabortedis allowed. - Write
.agent-surface/workflows/<run_id>/run-summary.mdand.agent-surface/workflows/<run_id>/metrics.jsonwithtasks_total,tasks_accepted,tasks_reworked,tasks_deferred,tasks_closed,review_reject_count,judger_escalation_count,rescue_count,verify_command_count,failed_verify_count,scope_violations_caught,artifact_validation_failures, andhuman_interventions. - Record the close state with
agent-surface workflow close --run <run_id> --state closed|quarantined|aborted. It setsrun.json.status, clearsworkflow_next_command, appends the close event, and clearscurrent.jsonwhen it names the run; it refuses a run whoserun.jsonor event chain is invalid, and a run already closed in another state. Never hand-editrun.json,events.ndjson, orcurrent.json.
Rules
- Never delete
.agent-surface/workflows/<run_id>/. - Do not claim work shipped; shipping belongs to the
ship-*commands. - Preserve readiness boundaries: a closed run means the accepted tasks passed review, not that the work is production-ready, deployed, or pushed. Do not upgrade
stable/production-ready/release-ready/E2E passedclaims in the summary; readiness stays unproven untilship-commitand the push/MR/release gate run with real-run proof. Record any surviving readiness claim as an unresolved risk. - Extract lessons as candidates only; edit global memory or rule files only when the user explicitly asks.
Output
Workflow closed: <run_id>
State: closed|quarantined|aborted
Summary: .agent-surface/workflows/<run_id>/run-summary.md
Metrics: .agent-surface/workflows/<run_id>/metrics.json
Unresolved risks: N
04 同仓库更多 Skills
workflow-runtime
Prove skill or workflow discovery, full-autonomy tool execution, and task-shaped materialization before assigning a CLI, extension, provider, or model to a workflow role.
workflow-reviewer
Review batched implementation output against the BOSS spec and evidence.
workflow-rescue
Resolve repeated workflow failures with a single decisive action.
workflow-orchestrator
Run risk-adaptive development, review, multi-agent, and release workflows with runtime preflight, bounded retries, liveness checks, isolated writers, and evidence-backed handoffs.
workflow-judger
Arbitrate repeated task failures and decide merge, rework, or escalation.
workflow-doctor
Validate active workflow state before any role acts on it.