Task done

From furkantokkan/agent-foundry · View interactive version

Task done is an AI agent skill from the GitHub repository furkantokkan/agent-foundry. Close one or more exact tracked tasks. Invoke automatically for an explicit user close order in a tool command or ordinary language; use --strict to require satisfied acceptance criteria.

How to use this skill

Skill file

Task Done

Close one or more exactly resolved tracked tasks. Do not implement, rerun tests,

mutate Unity, commit, check in, push, deploy, or publish.

$task-done GAME-202
$task-done GAME-202 GAME-203
$task-done production/tasks/GAME-202/contract.md --strict

Automatic invocation from an explicit user order

Treat an unambiguous ordinary-language instruction to close an exact task as

an immediate invocation of this workflow; the user does not need to type

$task-done. For example, “Close GAME-202”, “GAME-202'i kapat”, or “Kapanışa

hazır GAME-202 görevini kapat” is equivalent to $task-done GAME-202.

“Close this task” is equivalent only when the current conversation has exactly

one unambiguous retained task. Resolve its exact ID before taking any write.

Do not infer a close order from a conditional, question, status statement, or

generic execution phrase such as “continue”, “finish”, or “go ahead”. Ask for

the exact target only when it cannot be resolved safely.

The plain command or a recognized ordinary-language close instruction is

explicit authority to close the resolved tasks. Do not ask for redundant

confirmation. Unmet or unverified acceptance criteria change the closure mode;

they do not cancel a direct user close order. An explicit user close order must

not trigger a request for a test log, screenshot, artifact, or other proof.

Where the caller's policy authorizes verified automatic closure, task-cycle

and a clean-ledger implement-task close a task themselves once every

criterion and lifecycle gate is green. This skill is the explicit

user-confirmation lane and also owns strict closure, supersede reconciliation,

legacy closure, and tasks left in ready_to_close.

--strict retains criteria-gated behavior and closes only a current

READY_TO_CLOSE task.

1. Scope, risk, and authority

Allowed low-risk writes:

production/tasks/<TASK-ID>/contract.md;

has no lifecycle block;

Forbidden writes and actions:

epics, stories, sprints, external issues, packages, project settings, save

formats, generated output, VCS history, commits, checkins, pushes, deployments,

releases, or unrelated task files;

ownership finding into PASS/VERIFIED;

records, or defect-ledger rows.

Risk contract:

authorized by the invocation;

and requires a separate explicit instruction;

history changes, and external publishing are high risk and forbidden here.

Serialized-asset ownership: none. This skill never writes a Unity serialized

asset. task-done is the sole writer of the closure transition;

task-cycle remains the sole writer of defect-ledger state.

2. Resolve and lock exactly

  1. Resolve every complete ID only as

production/tasks/<ID>/contract.md; accept an exact in-repository contract

path. Never use a partial match or close a containing epic/story.

  1. Reject an empty target list, duplicate aliases for the same contract, a

missing contract, a path outside production/tasks/, or a task ID that does

not match its parent directory.

  1. Read

../task-cycle/references/lifecycle-lock.md and

../task-cycle/references/reviewed-evidence-identity.md relative to this

installed skill before any write. These identities protect existing review

state; they do not require new proof for an explicit user close order.

  1. In Git, use the shared lock protocol exactly as documented. Outside Git,

prefer the repository's documented atomic lock service. If none exists,

manually serialize this host through an atomic FileMode.CreateNew claim

under the Codex state root that owns this installed skill:

task-lifecycle-locks/<repository-root-sha256>/<TASK-ID>.lock.claim.

Store the same owner metadata and use the same token-safe release rules from

lifecycle-lock.md. Record the mode as host_local_manual.

  1. A busy claim is a hard TASK_LIFECYCLE_BUSY stop for that task. Never steal,

overwrite, or delete another writer's claim. Continue independently with

other exact IDs in the same invocation.

  1. Under the acquired lock, re-read the canonical contract, lifecycle block,

sibling legacy status.md when present, complete ledger, linked records,

ownership, current provider revision, and commit state.

Supersede mode for orphan reconciliation

--superseded-by <NEW-ID> is accepted only from a validated create-task

reconciliation handoff or an explicit user command. Require the replacement

contract to exist, be ready, link Supersedes: <OLD-ID>, and describe the

same high-confidence outcome. Also require no active lifecycle lock/owner,

worktree/handoff, attributable implementation changes, attempts, or defect

rows on the old planning task. Age alone is insufficient.

Under the normal lifecycle lock, preserve all evidence and update only the old

managed block to Task state: closed, Current phase: closed,

Last cycle verdict: SUPERSEDED, Closure mode: superseded,

Superseded by: <NEW-ID>, Closed by: task_reconciliation, a current UTC

closed timestamp/revision, and Next action: None. Append one transition

entry. Never delete the old directory, contract, ledger, or evidence.

Return TASK SUPERSEDED idempotently when the same link already exists. If

any identity, ownership, lock, progress, or replacement check fails, write

nothing and return STALE_TASK_RECONCILIATION_REQUIRED.

3. Choose the closure mode

Strict criteria closure

With --strict, require all of the following:

defined by reviewed-evidence-identity.md;

recorded verification channel of an automated test, manual verification, or

explicit user acceptance;

record;

An explicit user acceptance may satisfy one named criterion or all criteria. It

needs no test run, artifact, screenshot, or model-generated proof. In strict

mode it must already be recorded as the criterion's verification channel by

implement-task or task-cycle; task-done does not reclassify criteria. New contracts use `### Acceptance

criteria; treat a legacy ### Acceptance evidence` block as the same preserved

table and do not rename it during closure.

Missing, stale, contradictory, or changed criteria state returns

TASK CLOSURE BLOCKED (STRICT) and routes to $task-cycle <ID>. Strict mode

does not repair, migrate, or rerun checks.

Direct user confirmation closure

Without --strict, the exact user close order authorizes closure regardless of

the current lifecycle state, contract readiness, incomplete acceptance

criteria, blocker, legacy status, or unresolved defect rows. This is the

user's completion decision, not a request for the model to collect proof.

Before writing:

verification channels, unresolved defects, ownership findings, and the prior

blocker for the report;

defect resolution.

An already closed task returns TASK ALREADY CLOSED. A missing/corrupt

contract, ambiguous target, or active lifecycle writer remains a hard blocker;

user confirmation does not authorize guessing a target or overwriting concurrent

work.

4. Write the closure

For an existing managed block, update only closure-owned fields:

READY_TO_CLOSE in strict mode;

otherwise the exact current provider revision labeled as unreviewed;

For a legacy contract without a managed block, append one delimited managed

lifecycle block containing those fields plus:

deterministic identities already exist;

Never modify or delete a legacy status.md.

After the write:

  1. Re-read the complete contract and confirm exactly one valid lifecycle block.
  2. Confirm state/phase/closure status are closed, Next action is None, and

retained acceptance-criteria/verification and ledger bytes are unchanged.

  1. In strict mode, recompute reviewed/evidence identities and require them to

remain unchanged. In user-confirmation mode, recompute the contract-authority

fingerprint and require it to remain unchanged.

  1. Release the lifecycle lock only when claim and metadata owner tokens still

match.

  1. If post-write validation fails, report TASK CLOSURE WRITE INVALID; do not

claim closure or edit production/defect evidence to compensate.

5. Report

Report every requested task independently:

TASK CLOSED (USER CONFIRMED) | TASK CLOSED | TASK ALREADY CLOSED | TASK CLOSURE BLOCKED
ID: <ID>
Contract: production/tasks/<ID>/contract.md
State: closed | <current-state>
Closure mode: user_confirmed | criteria_verified | none
Closed revision: <revision | none>
Acceptance criteria: <preserved pass/unmet/unverified summary; verification channels>
Defects: <preserved verified/unresolved summary>
Scope/ownership: PASS | <preserved finding>
Commit status: <uncommitted | committed revision | none | UNKNOWN>
Next: $daily-handoff <ID> | $task-bug <ID> "<feedback>" | <unblock action>

For user-confirmation closures, say explicitly that incomplete or unverified

criteria and unresolved defects were preserved rather than verified.

6. Follow-up actions

cycle may reopen the closed task when the evidence fits unchanged authority.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.