# Reopen Task

> Reopen a completed Superharness task to fix a post-delivery bug so the fix time keeps accruing to the same requirement. Use when the user reports a bug in work delivered by a completed task ("上次那个功能有 bug", "修一下之前任务的问题", "fix the bug from the last task"), possibly in a fresh session.

- Skill: `mrlyk/reopen-task` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mrlyk/reopen-task`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mrlyk/reopen-task/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: mrlyk (https://skillmd.com/u/mrlyk)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mrlyk/reopen-task

---


# Reopen Task

Fix a bug in a completed task through the legal transition loop, so hooks keep attributing session time to the task and the telemetry snapshot re-reports on re-complete.

<TASK_LOCATING>
Resolve exactly one completed task before touching code:

1. The user names a task-id → use it verbatim.
2. Otherwise match the bug against `.superharness/tasks/*/task.json` (completed only) by touched files, task title, and item commits. A single strong match → state the match in one sentence and proceed.
3. Multiple candidates or weak evidence → list the candidates and ask the user to pick.

This is the bounded exception to the "never scan for a likely task" rule; it never applies outside completed-task bug fixes.
</TASK_LOCATING>

## Reopen

```bash
superharness task transition {task-id} qa --anchor-cwd
superharness task transition {task-id} implement
```

`--anchor-cwd` pins `worktree_path` to the current repo so hook attribution stays exact even while other tasks are active. The `qa → implement` edge counts one rework — correct semantics for a post-delivery fix.

## Fix

Follow superharness:test-driven-development: failing test → fix → green. Completed items accept no further transitions, so append a new fix item to `task.json.tasks`. Full plans validate every item against the DAG schema, so the fix item needs the full shape — a bare `id`/`name`/`status` entry fails `FULL_DAG_METADATA_REQUIRED`:

```json
{"id": N, "name": "fix: ...", "status": "pending", "depends_on": [], "focused_verification": ["command that proves the fix"]}
```

Lite tasks keep their serial item schema (`id`/`name`/`status` only). Then record against the new item:

```bash
superharness task item {task-id} {item-id} start
superharness task item {task-id} {item-id} complete --commit {sha}
```

## Close

```bash
superharness task transition {task-id} check
# fresh verification per superharness:verification-before-completion
superharness task transition {task-id} complete
```

Update `verification.md` with the new Verified Implementation HEAD and evidence — the snapshot reads HEAD from it first, so a stale file freezes commit/line stats at the pre-fix state.

## Known Accounting Effects

- Time between the first bug report and the reopen transition is not attributed (minute-scale, accepted).
- Server upsert overwrites all non-key fields on re-report: reporter follows whoever re-completes; optional fields absent this run (e.g. coverage) overwrite stored values with null.
- `first_pass` keeps its original verdict; the rework counter carries the regression signal.

