Task

From theafh/ai-modules · View interactive version

Task is an AI agent skill from the GitHub repository theafh/ai-modules. Manage the project task backlog as plain markdown files in tasks/. Use when the user asks to list or query existing tasks, to update or expand one, to triage or split backlog items, or to work across several tasks at once, and as the fallback for any tasks, todos, or backlog request naming no single

How to use this skill

Skill file

task

<task_skill>

<role>

The task skill is the hub and source of truth of the task_* family: the project-local backlog that manages a project's upcoming work and todos as plain-markdown task files living next to the code. The concept behind the whole system: every task file is written to be self-sufficient. The file alone is enough to implement the work from, including in a later session with no memory of the task's creation. That sufficiency is a floor, never a filter: at implementation time the implementer draws on everything actually available, namely the codebase, the project's standing-instruction baseline, and the user in the loop.

</role>

<when_to_activate>

Activate this skill when the user:

</when_to_activate>

<not_in_scope>

The wiki skill captures durable knowledge (concepts, procedures, references). The task skill captures upcoming work on this project. When a user message is about recording what they learned or how something works, route to wiki instead. When they want to track what still needs doing, this skill is right.

A focused sibling serves some of that backlog work better than the hub does. When a request names one task and one lifecycle step (check this task, implement it, audit it, close it out), hand it to the sibling that owns that step, which <family> names alongside every other sibling's role. Broad and multi-task backlog work stays with the hub: listing and querying the tree, triaging or updating several tasks in one round, and mining one source into a set of tasks, except where <family> names a sibling that owns that whole-tree job. The preference routes a request to the narrower surface rather than withholding it, since the hub keeps every capability <family> opens by stating.

</not_in_scope>

<architecture>

<project-root>/
├── CLAUDE.md?        # optional harness-loaded project rule file
├── AGENTS.md?        # optional harness-loaded project rule file
├── GEMINI.md?        # optional harness-loaded project rule file
├── CHARTER.md?       # optional family-consulted hard project-purpose guardrail
├── ARCHITECTURE.md?  # optional family-consulted descriptive project architecture
├── FEATURES.md?      # optional family-consulted behaviour ledger
├── TESTING.md?       # optional family-consulted project-specific testing notes
└── tasks/
    ├── <scope>_<name>.md      # open tasks
    ├── <scope>_<name>.md
    └── archive/
        ├── <scope>_<name>.md  # finished + deferred tasks
        └── <scope>_<name>.md

The filing convention has one canonical split: material directly about the task system lives under tasks/, and project-wide standing material lives at the repo root as optional UPPERCASE.md docs. Two root-doc roles exist there: harness-loaded rule files (CLAUDE.md / AGENTS.md / GEMINI.md and equivalents) provide the project's standing-instruction baseline, while family-consulted guardrail docs (CHARTER.md / ARCHITECTURE.md / FEATURES.md / TESTING.md) add task-family-specific constraints and context. The task tree stays intentionally two layers: tasks/ for live work and tasks/archive/ for closed work. No further task nesting. Scope sits in the filename, not in a folder. A bare project with only tasks/ remains complete.

</architecture>

<standing_doc_consumption>

Resolve the project root from the base <discover> step. The project's standing instructions start with the harness-loaded root rule files: CLAUDE.md / AGENTS.md / GEMINI.md and equivalents. When present, the harness loads those files before the skill runs, and the task family follows that baseline at every touchpoint independent of whether any family guardrail doc exists. The task family adds no separate presence-gated read for those harness files because the harness already supplies them.

Family-consulted guardrail docs are the additive layer over that baseline. Gate each optional family guardrail doc read with POSIX test -f "$root/<DOC>.md". On a hit, the consuming skill or agent reads the doc for the purpose named at its touchpoint; on a miss, it continues unchanged and raises no missing-doc error.

CHARTER.md is the highest-order guardrail: any skill or agent about to write or change task content validates the proposed content against the charter's boundaries and invariants and stops on a violation. The harness baseline governs wherever the family guardrail docs are silent. When a harness rule conflicts with a softer guardrail doc (ARCHITECTURE.md / FEATURES.md / TESTING.md), surface the conflict for human review instead of auto-resolving it. Before relying on this ranking, or on a softer doc's advisory role, to settle a task fork whose paths cross guardrail boundaries, apply the Guardrail-bound ground. paragraph of the <body> Decide or label rule, which states what the ranking settles and what stays with the user. The softer docs inform work without blocking it: FEATURES.md and ARCHITECTURE.md provide prior-art and design context for task creation, TESTING.md provides project-specific testing details for implementation and audit, and ARCHITECTURE.md is refreshed during finish when completed work extends the design and the recorded design-extended signal is true.

</standing_doc_consumption>

<file_format>

<naming>

<scope>_<name>.md. One underscore, exactly one, separates scope from name. Inside each side, words use -. Both sides are lowercase a-z 0-9 -. Examples:

Pick scope from the project's natural shared groupings: a skill family, sub-project, module, topic, feature area, or service. Pick name to be compact, unique within the tasks tree (open and archive), and self-explanatory at a glance. Before creating, list the tasks directory and archive/ once to confirm the chosen name does not collide.

</naming>

<frontmatter>

Every task carries this YAML frontmatter:

---
description: "One-line compact summary of what this task delivers."
scope: plugins/ai_dev/skills/task
created: 2026-05-28T19:49:23Z
updated: 2026-05-28T19:49:23Z
status: open
reported-by: default_user
---

Fields:

Status matches location: open, checked, ready, implemented, and audited live in tasks/; finished and deferred live in tasks/archive/.

<user_name_chain>

Resolve a recorded user name by reading git config user.name; when that is empty or the project is not a git repo, ask the user which name to record; when the ask goes unanswered, write the literal string default_user.

</user_name_chain>

Obtain the timestamp by running the shell command below and copy its output verbatim, because the model has no clock and a hand-written time is a guess:

date -u +%Y-%m-%dT%H:%M:%SZ        # UTC, e.g. 2026-05-28T19:49:23Z

The canonical form carries the Z designator, so every stamp records a UTC instant. Both created (set once, on a fresh task) and updated (bumped on every edit, status change, and archive move) take their value from this command's output. When creating several tasks in one turn, run the command once and reuse the captured value across the batch rather than re-running it per file.

</frontmatter>

<lifecycle_responsibility>

Each stage records the furthest lifecycle point it establishes: task_create writes open; task_check writes ready when no blocking finding remains under the <readiness_checklist> Blocking bar and checked when one does; task_auto_check edits the task body and reuses task_check for those ready / checked stamps; any family skill or agent whose rewrite of a ready task changes what the task delivers or how that delivery is checked writes checked in that edit, under <status_discipline>; the apply-findings update flow writes ready only when the user declares readiness before implementation; task_implement admits a build only under the ready-before-build rule (status is ready, or status is implemented and named gaps from a prior task_audit report are in context or supplied by the user), then writes implemented and records the design-extended verdict; task_audit writes audited only for a clean, complete verdict over a current implemented, writes implemented over audited when a re-audit finds gaps for task_implement, and verifies the design-extended signal, recorded or absent, against the built change; task_finish writes finished for done work or deferred for parked work.

</lifecycle_responsibility>

<backward_move_guard>

Before a stage writes a status, read the current status and compare it to the target. A write that moves an implemented or audited task to an earlier status, or that changes the status of a finished or deferred task at all, is a hard stop: the stage writes no status, leaves the file as it is, names the current→target move it refused, and routes the work as <status_discipline> directs for completed and archived tasks. One backward move stays open: the re-audit re-open, in which an audited task returns to implemented because a re-audit found gaps for task_implement, written by task_audit with its gap verdict or by the user through <update>. User confirmation opens no other backward move. The guard binds every writer. The ones it catches in practice are task_check, which would otherwise write checked or ready over a later status, task_implement, which would otherwise write implemented over audited, finished, or deferred and therefore reads the status before it builds anything, and an <update> in which the user asks for any other earlier status on completed or archived work. Forward moves, same-status stamps, the re-audit re-open, task_check revising its own ready to checked, the move from ready to checked that <status_discipline> prescribes for a rewrite, and parking a live task as deferred proceed without this guard.

</backward_move_guard>

<status_discipline>

Status discipline. This rule decides what a rewrite of a task body does to status, and it binds every skill and agent in the task_* family that edits a task body, whichever workflow or pass makes the edit. A task may be rewritten before implementation, and after implementation its status only moves forward. The effect of a rewrite depends on the status the task carries when the edit lands:

After implementation the status moves forward, from implemented to audited to finished, and a live task at any status may move to deferred. The one move back is the re-audit re-open: when a re-audit of an audited task finds gaps that task_implement should fix, the task returns to implemented, task_implement fixes those gaps on the same task, and the implement and audit loop repeats until a clean audit stamps audited again. task_audit writes that implemented with its gap verdict, and the user may ask for it through <update>. No skill or agent writes open, checked, or ready over an implemented or later status, or any status over finished or deferred, and user confirmation does not open those paths, because <backward_move_guard> stops every such write.

Follow-up tasks. Gaps in delivered work stay on the task that delivered it. A new follow-up task is filed only when the implement and audit loop stalls and keeps repeating the same findings, when a finding is a genuinely different issue with no real overlap with the delivered task, or when the gaps sit in an archived finished task, whose status is final.

Where this rule leaves a status standing, a contract-altering repair still earns a re-check flag in the report, naming the task and what changed: a rewrite of a checked task that alters its Goal, Approach, or Acceptance, and a contract-altering repair the pass surfaces without applying. Lowering a ready task to open to signal that re-check is owed is the failure this rule names: it destroys the readiness verdict task_check established, and no later stage can tell that demotion apart from a task that was never checked. Only task_check, task_auto_check, and the user's readiness declaration in <update>'s apply-findings flow write ready, and that declaration stamps ready on the edit that carries it.

</status_discipline>

<markdown_policy>

Task bodies are 100% CommonMark-standard markdown. The YAML frontmatter at the top is the only allowed extension. The linter blocks on non-standard syntax so the tasks tree stays portable to any renderer and the filesystem stays the source of truth:

Simplicity, single-topic scope, and standard tooling beat every non-standard extension.

</markdown_policy>

<body>

The body starts with a single # Title H1 on the first non-blank line, followed by the rest of the task content. Write the body to be self-sufficient: the file carries everything the work needs that the project itself does not already hold, while whatever exists at implementation time (the codebase, the project's standing-instruction baseline, the user in the loop) stays in play and gets used. Self-sufficiency is what lets a task outlive its origins: the conversation that created it is the one context guaranteed to be gone by then. Corollary: content a standing project instruction (CLAUDE.md / AGENTS.md / GEMINI.md and equivalents, plus the applicable family guardrail docs) already mandates is cited from the task as a standing repo rule, with the rule's text staying in its source document. Fill these sections:

Write the body positive and action-oriented: the primary carrier of every section is what the work does. Goal, Approach, and Acceptance lead with the action taken and what "done" looks like. Negatives earn their place where they carry content of their own: a genuine out-of-scope entry, a guardrail the task delivers, or the task-specific gate the Acceptance contract defines. Keep rejected-option debate out of the body: a brief out-of-scope entry or guardrail stays, while the rationale for options weighed and rejected lives in the change's commit or pull-request description, or in the wiki when it is durable design knowledge. Frame the body as current state to target (what exists, what is not there yet, and the state the work reaches), and let Rewrite in place, don't append define the target when an existing passage is affected.

Further rules govern the body's structure:

Guardrail-bound ground. A fork is guardrail-bound when every path in play crosses a guardrail boundary, meaning a boundary or rule that CHARTER.md, a softer guardrail doc, or a harness-loaded rule file states. A path crosses a boundary when it breaks the rule, when it rewrites the guardrail document so the rule no longer stands in its way, or when it routes around the rule by keeping its wording while setting aside what it protects, as when a forbidden construct moves into a dedicated module. The guardrail ranking in <standing_doc_consumption> settles which constraint wins in the abstract, so a softer doc that conflicts with the charter yields to the charter, and the label's suggested default may lean on that ranking. Choosing the path stays a user-owned fork: rewriting the outranked guardrail document or routing around its rule changes a rule the user set, so the user decides it. When the tier (b) walk finds every path crossing a boundary, stop reconciling and handle the fork under this ground, because the ranking leaves a guardrail tier against every default and so no default passes the decisive-default test. Write the labeled "Open decision:" naming each path and the boundary it crosses, give this ground as its why-open clause, surface it to the user through the dual obligation above, and leave the choice of path to the user's answer. A fork with at least one path that crosses no boundary goes to the Reconcile branch like any other.

Keep each task scoped to one atomic item. Size by cohesion when one change spans many parts of one system: if the work shares one rationale, one edit surface, and one acceptance story, keep it one task even when part count is high. When atomicity and part count pull apart, cohesion decides; the 300-line ceiling still wins. Split independent items, expandable tangents, and tasks that grow past 300 lines into siblings before continuing.

</body>

</file_format>

<dependency_signals>

The family's single definition of when one task is a prerequisite of another and how that relationship is read from the backlog. The single-task front ends inherit this block rather than each carrying a copy: task_select uses it to sequence candidates during ranking, and task_implement uses it to gate a build behind unbuilt prerequisites. The relationships stay inferred from existing task content; no frontmatter dependency field exists.

A prerequisite is a live eligible task (frontmatter status open, checked, or ready) that is not yet done and must ship before the task depending on it. A relationship pointing at an implemented, audited, finished, deferred, or archived task is already satisfied and imposes no order.

Read the relationship from four signals already present in the task data:

A relationship runs in both directions. A task is a prerequisite either by its own outbound signal (its body names what it waits on) or by another live task's inbound declaration (another live task's body names a first-ship order over it or forward-references an artefact it creates). Read both directions: a task silent about its own ordering can still be blocked by an inbound note authored in another live task, including one outside a user-applied scope filter.

Split the relationship strength two ways:

</dependency_signals>

<readiness_checklist>

The readiness lens for one task file, judged against the self-sufficiency bar <body> defines. It lives here as the family's single source: judge a draft against it before writing the file, and judge an existing task against it before handing it to an implementer.

Blocking bar. Class every finding this checklist surfaces as blocking or as a note; only a blocking finding keeps a task from ready. A finding is blocking when an implementer who follows the task literally, drawing on the codebase and the standing repo rules, would do one of four things: violate the Goal or an Acceptance item, hit a contradiction, face an open choice whose reasonable options lead to materially different results, or introduce a new bug. Five classes block by definition: a Charter check conflict, a Structural check gap, and an invalidated Premise check outcome, as their own items below state, a mutable set referenced by a frozen count or an enumeration snapshot under the <markdown_policy> count-stable rule, because that reference goes stale silently between writing and implementation even when it is accurate today, and a Scope sizing or Focus finding that names independent items, because the <body> sizing rule already directs splitting such items before continuing, so a ready stamp would hand task_implement a bundle that rule forbids. Only a finding that names independent items joins the by-definition classes: a too-small finding, and a size finding at any length, the 300-line ceiling included, stay under the ordinary bar. Every other finding is a note, because the implementer would most likely get it right anyway: redundancy, length, wording, ordering, a passage that reads harder than it needs to, or an unproven minor promise. Test a borderline finding by naming the concrete wrong result the literal implementer would produce; a finding with no nameable wrong result is a note. Report notes beside the blocking findings, keep them out of every repair loop, and never let them block ready. Every lens below feeds this one bar, so a lens names what to look for and the bar decides whether it blocks.

  1. Charter check. When CHARTER.md exists at the project root, validate the task content against its boundaries and invariants. Surface every conflict as a readiness issue, leave the task body unchanged, and keep the task out of ready until the conflict is resolved.
  2. Structural check. Confirm the body opens with a single # Title and carries the ## Goal / ## Context / ## Approach / ## Acceptance sections, with valid frontmatter, per <body> and <file_format>. A one-shot implementer follows structure literally, so a structural gap is high-severity; run this before the content lens.
  3. Premise check. Every task body frames current state to target, so verify the described current state against the codebase as it stands now: read the code the task implicates, run the reproducing command when the task names one, and confirm a claimed gap is actually absent rather than already covered. Judge cited details from a written juxtaposition: quote each command, flag, path, and passage the task describes beside the code's actual text, and clear a detail only when the pair matches: a description that drops a flag, renames a path, or paraphrases a directive away is a drifted detail even when the cited anchor exists. Two staleness outcomes exist, and the finding names which one it is. Invalidated means the code contradicts the task's reason to exist: the defect already fixed, the capability already present, the need met by a mechanism that shipped since, the target artifact removed, the behaviour misdiagnosed. This is a readiness issue that invalidates the task before any other finding, and it opens a disposition that belongs to the user: closing the task deferred through task_finish or the <archive> workflow is one honest option beside re-scoping the intent or refuting the finding with evidence; a checking or repairing surface presents these options and never applies one itself. Drifted means the motivation still holds while described details have moved on: files renamed or relocated, cited passages reworded, part of the work meanwhile shipped. Each drifted detail is an ordinary readiness issue whose repair refreshes the body against the current codebase.
  4. Approach fitness. Judge the Approach against the code it changes: followed as written, it must deliver the Goal and, when a bug or gap motivates the task, close the described gap completely. Flag an approach that treats a symptom while the named cause stays live, closes only part of the gap, or carries a gap of its own (a missed edit site, an unhandled case, a side effect that breaks adjacent behaviour). Ground the missed-edit-site check in a written enumeration: list the standing directives, invariants, and hard rules in the artifacts the approach touches that interact with the new behaviour, and clear each one against that behaviour: a directive the change would violate, or must amend to stay consistent, is a missed edit site even when every anchor the task names checks out.
  5. Interaction scan. The code-anchored mirror of the two task-anchored lenses above, standing beside them as its own lens rather than folding into either: instead of starting from what the task describes, start from the task's change and ask what in the codebase now interacts with it that the task never accounts for. The motivating case is a task written before some feature shipped, whose change would now collide with, or be quietly undermined by, code that landed since, with nothing in the task pointing at it. Run a bounded two-step scan keyed on the task's change (derive its interaction surface, then search the repository over that surface) and classify and route each result:
  1. Content lens. Read the task thoroughly and surface every issue that could derail a correct, complete one-shot implementation:

</readiness_checklist>

<backlog_coherence>

The joint lens set for a set of live tasks read together, standing beside <readiness_checklist> rather than inside it. The checklist judges one task against the code; these lenses judge the selected tasks against each other and against the code as it stands, which is the defect class every per-task surface structurally misses: two tasks that are each individually ready can still contradict each other, double-own one edit, reintroduce a hazard a sibling fixes, or sit stale against work that shipped after they were written. This block is the family's single source for that lens set: task_fix runs it in its assess phase and auto_shaper_task resolves what it surfaces, each citing this tag rather than restating the lenses.

Two sets define every lens. C is the selected live set: the live eligible tasks in scope for this run, picked by a scope filter, an explicit list, or the whole live tree when the caller names no filter. A named scope or explicit list fixes C by exclusion as much as by inclusion: a live task outside it earns no verdict and no repair, and enters the pass only as context, through T when it edits a shared artifact or through <dependency_signals>' inbound direction when its body declares an order over a selected task. T is the shared target-artifact set: the union of the directories C's scope fields name and the files C's bodies link. Both sets come from the conventions this skill already defines (scope frontmatter, body links, status values, <dependency_signals>), so the lens set carries no assumption about any one project's layout.

Two of the lenses below run off an index rather than off a per-task reading, and each index is written down before any verdict is judged rather than held in the reader's head. The first is the shared-surface map: for each artifact in T, the tasks in C claiming an edit to it, and for each task, the artifacts and blocks it claims. The second groups the tasks in C by the design question each answers. An unwritten pass over either one collapses into the task-by-task walk these lenses exist to replace, and returns premise findings while missing every cross-task defect.

  1. Joint orientation. Read every task in C in full and read T once; every later lens runs against that shared context. The shared read is what makes a per-task premise check affordable across the whole set, and it is the precondition for every cross-task lens below.
  2. Premise freshness against shipped state. Apply the <readiness_checklist> Premise check against that shared read rather than re-reading T per task: quoted anchors that no longer grep in T, references to archived tasks phrased as still pending, described gaps the code has since closed. An Invalidated premise makes the task a defer candidate whose disposition belongs to the user, exactly as that checklist states; a Drifted detail is an ordinary repair finding. Refresh a drifted anchor at every site the task quotes it, since one task commonly names the same symbol in Context and again in Approach or Acceptance: a refresh that fixes the first occurrence and leaves a later one still quoting the old name has not resolved the finding, and the grep that raised it still matches.
  3. Shared-surface ownership. Map each task's claimed edits onto T. Flag an edit claimed by two or more tasks, and an edit the selected set's own rules imply that no task owns. The repair shape names one owner of the shared edit, and the counterpart then either keeps a verify-only step, where its own work is already covered by the owner, or declares the order it follows in, where it still carries an edit of its own to the same surface. Pick by what the counterpart has left to do, since a verify-only step on a task that still owns real work would drop that work. Write the coordination link under the <markdown_policy> cross-link discipline: it belongs on the side whose work the relationship changes, which is the counterpart that waits or verifies, and the owner takes a back-link only where reading the counterpart would change the owner's work too. A back-link that merely restates what the counterpart already says is the reverse-duplicate pointer that rule drops.
  4. Emergent contradiction. Derive each task's post-state and check pairwise compatibility on shared surfaces, against the invariants other selected tasks establish or repair, and against the invariants already settled outside the selected set: those an archived finished task decided and those the shipped code holds. A settled decision binds harder than a live one rather than less, since it has already shipped and no task in C can revisit it, so a selected task whose post-state contradicts one is a finding against that task and the repair narrows the task. Canonical case: task A carves an exception so an autonomous loop terminates cleanly, and task B adds a finding at the severity that re-blocks that loop with no handling. The repair shape changes the offending parameter with its rationale recorded once, or couples the change to the sibling that owns its precondition.
  5. Posture consistency. Flag the same design question answered differently across siblings: a severity tier, auto-fix versus on-demand, a naming choice. Compare by the question each task answers rather than by the artifact it edits, since two tasks that pick opposite answers usually do so in sibling files and never touch one surface at all; judged from a shared-surface reading alone, such a pair looks independent and closes clean. The finding is the missing reason rather than the difference itself, so both dispositions are edits: reconcile an accidental divergence, or record a principled one on the task that carries it. Judging a divergence principled and leaving it as it stands resolves nothing, because the next reader still meets the discrepancy with no reason attached; a divergence counts as recorded only when some selected task states why the answers differ.
  6. Sweep completeness. When a task states a rule and enumerates its edit sites, search T for the rule's actual site set, write that set down beside the task's own list, and flag the remainder the task leaves un-enumerated. Comparing a written set against a written list is what makes the gap visible; judging the enumeration by reading it alone reports it complete.
  7. Ship-order coherence. Derive waves from <dependency_signals> plus the shared surfaces mapped above, and name the tasks that stay coherent only when landed together or in a stated order.

Each task in C leaves the pass with exactly one verdict (ship as-is, alter, or defer candidate), and the run reports the ship order those verdicts imply. Reconcile disposition runs through <body>'s Decide or label: reconcile from that rule's ordered evidence base when it settles the repair, and surface the fork when it does not.

Each verdict carries the fields its own class needs, since a verdict whose disposition stays in the assessor's head reads to the user as a bare label:

Every coherence repair writes status as the family <status_discipline> rule directs for any body rewrite. Applied to the repair shapes above, a refreshed anchor, a declared order, a recorded rationale, and an enumeration completed to the site set the task's own rule already implies each keep a ready task at ready, while a changed parameter, and a verify-only step that replaces the task's own edit, each return it to checked.

</backlog_coherence>

<workflows>

<path_resolution>

The bundled scripts (discover_tasks.sh, init_tasks.sh, lint.py) live in scripts/ next to this SKILL.md. Resolve each script's absolute path by combining the directory of this SKILL.md with scripts/<script-name> and invoke that absolute path, never a bare scripts/..., which resolves against the current working directory (the target project) rather than the skill, and so finds the project's own scripts/ or nothing. Every agentic IDE that surfaces a skill exposes the file path it loaded the skill from, so the parent directory is always knowable. If the first invocation reports a missing file, re-resolve the absolute path once before treating the script as failed; never conclude the script is absent because of perceived path uncertainty.

</path_resolution>

<verification_economy>

Each linter, test suite, or named check runs to produce evidence about the current state of what it inspects, so run it once per that state rather than once per workflow step. One run's output is evidence for every later step in the same session that faces the identical state, so the family reuses it instead of repeating the run on unchanged inputs. This trims cost and latency while preserving coverage: a re-run skipped on unchanged inputs would surface exactly what the prior run on that same state already surfaced, so the rule keeps every finding available and stays within the project coverage guardrail a CHARTER.md sets when present (consulted through <standing_doc_consumption>).

Running is the default, and three runs are always sound:

Skipping a run is the exception and carries the burden of proof. Skip only when both grounds hold (the prior run's output is visible in the current session, and neither the tool nor anything it inspects has changed since that run), and name the relied-on run when you skip. Run when either ground is uncertain. Skipping a check whose inputs changed, or a standing gate at its moment, stays out of bounds.

Expensive or stochastic surfaces need one more provision. For costly or sampling-noisy checks (LLM evals, long integration runs), repetition on unchanged inputs adds cost and noise rather than assurance, so record the graded result where the project's testing conventions keep it and let a later stage accept that recorded result as evidence when it postdates every artifact under test, re-running only when the record predates an artifact under test or is missing. TESTING.md, when present at the project root, names which surfaces count as expensive and where their recorded results live.

</verification_economy>

<discover>

Run the bundled discovery before touching any task file. The script finds the project root (git toplevel first, then project markers like .git, package.json, pyproject.toml, Cargo.toml, go.mod, CLAUDE.md, AGENTS.md, Makefile; fall back to CWD), prints <root>/tasks, and exits 0 if it exists, 1 if not.

if TASKS=$(scripts/discover_tasks.sh); then
    :                                          # tasks/ already scaffolded
else
    rc=$?
    if [[ $rc -eq 1 ]]; then
        scripts/init_tasks.sh "$TASKS"         # scaffold tasks/ + tasks/archive/
    else
        exit "$rc"
    fi
fi

init_tasks.sh is idempotent: safe to call again on an existing tasks directory.

</discover>

<create>

Run every step in order:

<gather>

Confirm the user's intent and gather enough material (current state, target behaviour, relevant files) to fill the body sections in <body>. If context is too thin to write something a single-shot AI coder could implement from, ask one sharp clarifying question before writing.

When FEATURES.md and/or ARCHITECTURE.md exist at the project root, read them before the prior-art codebase scan: FEATURES.md supplies higher-signal existing behaviour, and ARCHITECTURE.md supplies design context. When either doc is absent, continue unchanged.

For an incident-shaped request (a failure case, an error, a "when X happens it breaks"), settle the altitude as part of gathering, as a decision rather than a question: decide from the request and the surrounding code whether the task delivers the point-fix for the reported case or the general behaviour whose absence caused it, and default to the point-fix when the evidence supports nothing more. Record the choice as an explicit clause in the task's ## Goal (the point-fix for the named case, or the behaviour definition with the incident as its motivating case) and surface it among the assumptions the create report names, so the user's reply is the correction point.

Generalize from the motivating instance when a concrete episode is mined to improve a reusable artifact: for example, a working session with a skill that exposed a rough edge yields a task to improve that skill. The altitude is the general rule the episode argues for, not the point-fix, and the originating episode rides along only as the brief illustration the <body> Illustrate rule provides.

When a user-specific or sensitive specific might be necessary and it is unclear whether to include it, ask the user for the level of detail rather than silently including or dropping it.

</gather>

<prior_art>

Before naming and writing, confirm the request is not already captured or already built, a two-tier gate that stays cheap until there is a reason to dig.

Tier 1: fast scan, always. Derive a few distinctive terms from the task's intent and rg them across both tasks/ and tasks/archive/ (the <query> search). This is a quick keyword pass over every existing task file, open and closed.

Tier 2: in-depth analysis, only when Tier 1 hits. Investigate whether the requested work is genuinely new, partly done, or fully done. Read each matched task file in full, and inspect the project itself (the code, modules, and docs the request would touch) to judge the real implementation state rather than trusting a task's stated status. Classify the request as one of:

Surface, never auto-resolve. Report the classification with concrete evidence (the matched file paths and the specific code that already covers the work), then surface the overlap and proposed split before asking the user how to proceed: create as new anyway, fold the fitting delta into an open task, file a follow-up that extends and cross-links the shipped finished task, narrow this task to only the genuinely-new remainder, file a new task that picks up the deferred work and links the deferred task, whose archived status stays final under <status_discipline>, or skip creation when overlap is total. Write a file only after the user's call. When they choose to proceed anyway, cross-link the related task(s) in ## Context.

</prior_art>

<scope>

Pick the <scope> from the project's existing groupings: skill family, sub-project, module, feature area, service. Reuse a scope already present in the directory whenever it fits; introduce a new one only when no existing scope applies.

</scope>

<name>

Pick a <name> that is compact, descriptive, and unique within tasks/ and tasks/archive/. List both directories before writing so the new filename collides with nothing.

</name>

<write>

Create <tasks>/<scope>_<name>.md with the frontmatter from <frontmatter> (status: open, reported-by resolved via <user_name_chain>, created/updated set to now) and a body that opens with # Title and fills the sections in <body>.

</write>

<lint_after_create>

Run python3 scripts/lint.py --quiet, fix every blocking finding, and answer each repeated-link warn on the new file through the <lint> Repeated-link react protocol before declaring the task created.

</lint_after_create>

<batch_creation>

When the user hands over multiple tasks in one go, write each as its own atomic file. Pause and split when any single task threatens to exceed 300 lines, or when several items overlap but each is independently expandable.

</batch_creation>

<lossless_conversion>

Whenever a task is derived from source material, hold a lossless-conversion contract, and run it on your own, without the user asking. A source is any pre-existing body of meaning being mined into tasks: an AI chat session, a pasted note, a todo.md, a spec, a PDF, a meeting transcript, a file on disk. The trigger is the presence of a source being mined, never its medium, and never how many tasks result. Producing a single task does not skip the check: one source can carry far more than one task's worth of meaning, so the lone task must still capture all of what's relevant. Source volume scales only how much the coverage pass has to walk, never whether it runs.

</lossless_conversion>

</create>

<query>

List with ls "$TASKS" for open tasks, ls "$TASKS/archive" for closed. Filter by scope with ls "$TASKS"/<scope>_*.md. For content searches use rg "<term>" "$TASKS". When summarising for the user, lead with open tasks grouped by scope; only surface archive entries when the user asked about closed work.

</query>

<update>

Edit the body or frontmatter as needed, then bump updated to the current datetime in the same edit, and write status in that edit as <status_discipline> directs for a body rewrite. Re-run python3 scripts/lint.py --quiet after the edit, and answer each repeated-link warn it reports on the edited file through the <lint> Repeated-link react protocol in the same round, under the one updated bump that round already makes. When an update materially changes the scope or adds expandable new work, split into a follow-up task rather than letting the file grow past 300 lines.

Applying check findings is a first-class update flow: when the user replies with issue numbers and per-number decisions (accept, reject, or modify), apply each accepted finding's minimum fix to the task file, leave each rejected finding's passage as it is, and fold a user-modified instruction in over the report's suggestion. Numbers index the most recent task_check report in the conversation; when no report is in context, ask for the issue list instead of guessing. When the user declares the task ready over remaining findings, stamp status: ready. The whole round is one update: bump updated once in the same edit round and re-run the linter once at the end.

</update>

<archive>

When a task is finished or being dropped, run all six steps:

  1. Set status in the frontmatter to finished (work is done and shipped) or deferred (parked, not pursued for now).
  2. Bump updated to the current datetime.
  3. Move the file from <tasks>/ to <tasks>/archive/ as a rename git records, probing the live path once with git ls-files --error-unmatch <path> and then moving the file with git mv when that probe exits 0 or with plain mv when it exits non-zero. One probe settles both fallback conditions, because git ls-files --error-unmatch exits non-zero on an untracked path and outside a git repository alike. Report which of the two branches the move took. The filename does not change. Recreating the file at the archive path with a file-writing tool and then deleting the original is the superseded pattern here, because git records that as a delete plus an unrelated add, which drops rename detection and breaks the git log --follow walk auto_drift_task runs on the archived path to recover the task's last-commit baseline.
  4. Update cross-references. Re-point every relative link inside the moved task so it still resolves from the file's new home under archive/, covering all three outbound classes: a live sibling still at <tasks>/ (foo.md becomes ../foo.md), an already-archived sibling (archive/foo.md becomes foo.md), and a target outside the tasks tree, now one ../ deeper (../plugins/… becomes ../../plugins/…). Then scan the whole repository for inbound links to the moving file (every markdown file under the project root, e.g. rg the moving filename across the repo), and rewrite every hit to either point at the archived location or convert to plain text plus (archived) when the link is no longer load-bearing. These link rewrites are mechanical and change no task's status, so a linking task keeps its status, ready included, and an archived linker keeps finished or deferred. The close-out's own move in step 1 is the only status this workflow writes.
  5. When closing as finished, use this trigger test for whether the completed work extended the system's design: refresh ARCHITECTURE.md when the finished work changes goals, stack, or design decisions that the doc narrates; decline when the change is operational or procedural, belongs in the FEATURES.md behaviour ledger, or is status-board / stage-index / build-order material. task_implement detects this and records the verdict as design-extended: true|false, task_audit verifies that signal when it runs, and task_finish consumes it at close-out. When ARCHITECTURE.md exists at the project root and design-extended is true, update ARCHITECTURE.md in the same archive pass. When the doc is absent, or the signal is false or carried by absence, continue unchanged, and report which of those held, so a decline stays distinguishable from an assessment nobody made.
  6. Run python3 scripts/lint.py --file tasks/archive/<name>.md --quiet so the just-moved file is checked in its new location under file scope, naming the moved file's archived path. The file-scoped run reports only findings whose path is the moved file, so resolve every blocking finding for that file before declaring the archive complete.

</archive>

<lint>

The linter checks naming, frontmatter completeness, an unquoted value YAML would misread, provenance, status validity, datetime format, status/location consistency, page size (>300 lines), and filename collisions across live + archive. Those per-file checks iterate live files in tasks/*.md by default. On a default or --include-archive run the link check covers the links written in the task files the run covers, live files by default and the archive as well under --include-archive (any in-repo target; silence outside the repo), and it reads no markdown file outside the tasks tree, while still resolving task-body links into archive/ and checking filename collisions across both roots. --include-archive is the full-tree maintenance flag, and task_fix is its sole owner: it passes the flag to extend the mechanical per-file checks and the link check across the whole archive, surface legacy provenance retrofit hints, and migrate non-terminal archived statuses to finished. --file <path> is the file-scoped mode: it restricts the per-file checks and the link check to one named task file, live or archived, so the <archive> close-out verifies the single file it just moved and no other. The two flags are mutually exclusive; dual-root collision detection still runs under --file, and only the named file's collision finding is emitted.

python3 scripts/lint.py              # auto-discover via discover_tasks.sh
python3 scripts/lint.py /custom/path # explicit tasks directory
python3 scripts/lint.py --quiet      # blocking + warn only
python3 scripts/lint.py --include-archive       # full-tree maintenance (task_fix)
python3 scripts/lint.py --file tasks/archive/<name>.md --quiet  # file-scoped close-out verify

Findings come in three buckets:

Repeated-link react protocol. When the linter reports a repeated-link finding, the writing surface answers it by reorganizing the body through this one procedure. Read every mention of the counted target in the body, linked or plain, so the decision rests on the body's whole account of that target rather than on the link sites alone. Ask which of the body's statements about the target belong together, such as a file's current state and the edit this task makes to it, a sibling's background and the work that sibling owns, or one handoff narrated in several sections. Gather that material into the one passage where it reads as one account, placed in the section whose job the combined material mostly serves under the <body> anatomy, and rewrite the affected passages for clarity where the move calls for it. The anatomy decides where a gathered account sits and never justifies splitting one subject across sections by role. Keep the meaning of ## Goal and the Acceptance contract unchanged. Move a sentence out of Goal only when it is background about the target and Goal still states what the task delivers without it. A sentence whose account carries part of what the task delivers, such as the user-visible outcome or a requirement no other section states, stays where it is and the finding is surfaced with that reason: Goal naming a deliverable after the move does not license dropping an outcome or requirement only Goal carried. Where the two sites are ## Goal and an ## Acceptance item and each copy is load-bearing for its own section, meaning Goal states the outcome and the item states the check that proves it, neither section can absorb the other's copy, so surface the finding instead of gathering it: either move strips a section of what its own contract owes. A ## Context copy never reaches this case, since Context carries background and gathering background out of it costs no section its contract. Each link moves with the material it carried, and a pointer left behind names the target in plain text. A repeat inside one paragraph is already gathered, so the writing surface names the target again in plain text inside that paragraph, as the grouping rule directs, and that edit clears the warn. Outside that one-paragraph case, stripping link syntax from a passage whose material stayed reorganizes nothing and resolves nothing, since the warn then clears for a gathering that never happened. Fewer links are the result of the reorganization rather than its aim, so the finding is resolved when the material about the target sits together. A finding takes one of exactly two dispositions. It is regrouped when the reorganization clears the warn, the one-paragraph case included. It is surfaced because <reason> when the warn stands because the reorganization would change Goal or the Acceptance contract, because it reveals that the body grew into separate concerns, which takes the scope question to the <split_at_300> / one-task-per-file split guidance, or because the writing surface finds no grouping that keeps the body's meaning. Every surfaced reason describes how the body is organized, and the value of a single link is never a reason. The writing owners apply the reorganization in their own edit round. task_fix on its inline path, auto_shaper_task when task_fix escalates, task_auto_check through its repair path, and this skill's <update> workflow when it edits a body each bump updated once with that edit. The create path is a writing owner too: this skill's <create> workflow and task_create reorganize a new file before reporting it created, and because the reorganization belongs to the creation, the file's created and updated keep the one timestamp the create step captured. task_check, task_audit, task_explain, task_select, and task_finish report the finding with the sections that link the target and leave the reorganization to the writing owners. The repeated-link check fires only on open, checked, and ready tasks, so the writing owners regroup a body only before implementation and leave an implemented, audited, or archived body as delivered. A regroup keeps the meaning of ## Goal and the Acceptance contract, so it keeps a ready task at ready under <status_discipline>.

Repeated-link disposition line. Every surface that dispositions a repeated-link finding reports it in this shared per-finding disposition line shape, one line per finding, so a reader comparing runs across siblings reads one format:

repeated-link: <task file> -> <link target>, linked from <sections>, <disposition>

The disposition reads regrouped or surfaced because <reason>, the only two the react protocol allows. The shape lives here rather than in any one consuming surface, because every writing owner reports it (task_fix, auto_shaper_task, task_auto_check, this skill's <create> and <update> workflows, and task_create), and a family-wide rule belongs in this hub.

Archive scope. A check whose repair reorganizes or rewrites body prose beyond the mechanically fixable lint finding set, as the oversized-page and repeated-link checks do, runs on open, checked, and ready tasks only. A check whose repair is a mechanical body fix, as the soft-pointer cleanup is, runs on live pages. A check whose repair is mechanical metadata or a mechanical link rewrite, such as a re-pointed link or a wikilink or footnote converted to a standard markdown link, runs archive-inclusive, which is the purpose of --include-archive. Classify a future check by those dividing lines rather than by copying a neighbour.

The mechanically fixable lint finding set is the authoritative type list for task-family siblings that auto-repair linter output. Apply only the entries whose target is determinable in the current scope, and surface the rest:

The mechanically fixable set omits repeated-link: the Repeated-link react protocol above owns that finding, so its writing owners reorganize the body in their own edit round and the mechanical path leaves it alone.

Mechanical lint repair preserves task intent and file semantics. It bumps updated once for a content-changing edit group, with the UTC timestamp normalization entry the one exception because its conversion preserves the instant and so leaves updated un-bumped under <bump_updated>; it leaves updated unchanged when it makes no change; and it reports every surfaced judgement call with the linter category and reason.

</lint>

</workflows>

<pitfalls>

<one_task_per_file>

One task per file. Atomic scope. When new material is expandable but tangential, file a sibling task and cross-link rather than folding it in.

</one_task_per_file>

<split_at_300>

Split at 300 lines. Below this ceiling, apply the scope-sizing rule in <body> before slicing by part count. Past the ceiling, the task has stopped being a single implementable unit. Slice it into siblings that each carry full context.

</split_at_300>

<status_matches_location>

Status matches location. open, checked, ready, implemented, and audited live in tasks/; finished and deferred live in tasks/archive/. The linter blocks on a terminal status under tasks/; archive-inclusive maintenance migrates a non-terminal archived status to finished.

</status_matches_location>

<bump_updated>

Bump updated on every change. Every body edit, frontmatter edit, status change, and archive move bumps updated to the current datetime. Legacy provenance backfill and legacy status migration leave updated unchanged when they are the only edits in the file; when the same pass also makes a content fix, bump updated for that content fix and let the legacy backfill ride along. Timestamp normalization is the one format change the exception covers: converting a created or updated representation to its UTC instant preserves the instant, so it leaves updated un-bumped.

</bump_updated>

<single_shot_ready>

Write for a single-shot implementer. The task file carries everything the work needs that the project itself does not already hold; everything available at implementation time (codebase, the standing-instruction baseline named in the standing-doc consumption section, the user) stays in play. A body that leans on its birth conversation fails this bar: that conversation is the one context certain to be gone.

</single_shot_ready>

<capture_lessons_in_wiki>

Capture a lasting lesson in the wiki when archiving. Where the finished work taught something durable about the project, record that lesson through the wiki skill as the task file moves to archive/, so the lesson survives the task that produced it.

</capture_lessons_in_wiki>

</pitfalls>

<output_contract>

Close every hub workflow (<create>, <query>, <update>, <archive>, <lint>) with one report in the same four parts, so a run's outcome reads the same whichever workflow produced it:

</output_contract>

<family>

This base task skill is the hub of a task_* family and can do all of the backlog work itself. Focused front ends each cover one slice and hand off along a chain:

These ship together as a family; any sibling may be absent if a deployment excluded it. The family layers as a graduated drift-prevention spectrum: the plain manual chain follows the harness-loaded standing-instruction baseline and adds no autonomous hard gate; task_auto_check adds the optional readiness loop; autonomous writers, including future implementer and shaper surfaces, carry the hard CHARTER.md guardrail; and softer standing docs inform work through the verified test-discipline rule, the descriptive ARCHITECTURE.md, and the FEATURES.md ledger. ARCHITECTURE.md describes goals, stack, and design decisions; it is distinct from the charter's falsifiable boundary role and from any status-board, stage-index, or build-order view. The default manual chain is create → check → implement → audit → finish, with task_auto_check as an opt-in readiness repair loop, task_select a read-only chooser for what to work on next, and task_fix maintaining the tree.

</family>

</task_skill>

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.