[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75K5SR6QSW2FM8416MB08GN":3,"skill-same:01M75K5SR6QSW2FM8416MB08GN":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M75K5SR6QSW2FM8416MB08GN","execute-task",null,"Implement one task (or a cohesion bundle) from a signed-off spec (Ready or Active): recompute the execution freshness gate, write the verifying test first, implement to green, run the project's full CI with adaptive retry, converge via the steps_convergence list (default \u002Fpolish --nested), then open a draft PR referencing the brief, tasks, REQs, and tests. The execution workhorse of the planwright pipeline. Assumes the worktree already exists; never creates worktrees; merges or readies only through its helpers.","inkatze\u002Fplanwright","inkatze","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2029270?v=4","01M75K412KAPRFBSFXA7ZF2ZVY","Diego Romero","01M75K41364G95D0ZS5MWK7PZ3",4,"MIT","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fexecute-task\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: execute-task\ndescription: >\n  Implement one task (or a cohesion bundle) from a signed-off spec (Ready or Active):\n  recompute the execution freshness gate, write the verifying test first,\n  implement to green, run the project's full CI with adaptive retry, converge\n  via the steps_convergence list (default \u002Fpolish --nested), then open a\n  draft PR referencing the brief, tasks, REQs, and tests. The execution\n  workhorse of the planwright pipeline. Assumes the worktree already exists;\n  never creates worktrees; merges or readies only through its helpers.\nargument-hint: \"\u003Ctask-id> [\u003Ctask-id> …] [\u003Cspec>] [--resume \u003Crun>:\u003Cpoint>]\"\n---\n\n# \u002Fexecute-task\n\nThe execution layer of the planwright pipeline (REQ-E1.1–REQ-E1.5): take one\nready unit (a single task or a cohesion bundle) from a Ready or Active spec with\na signed-off kickoff brief and carry it from a failing test to a draft PR.\n`\u002Forchestrate` dispatches it into a prepared worktree; a human may also run it\ninside one. It works from the kickoff\nbrief, the durable contract (D-3), not by re-reading the spec; sign-off and\nmerge authorization are human gates (see Invariants).\n\n## Doctrine\n\nThis skill is procedure, not doctrine. Read the manifest's rule docs via\n`scripts\u002Fresolve-rule-doc.sh \u003Cdoc-name>` (under the resolved planwright root);\ntheir definitions govern the concepts this skill names. Per\n`doctrine\u002Finstruction-hygiene.md`, `run-start` entries load before work begins,\n`point-of-use` entries at the named step or branch.\n\n**Invoking plugin scripts (REQ-D1.1, D-7).** Call `scripts\u002F\u003Cname>.sh` by the\n**resolved literal absolute path** (never `$VAR\u002Fscripts\u002F\u003Cname>.sh`), one plain\ncommand per Bash call — `doctrine\u002Fplugin-script-invocation.md`.\n\nIf a manifest doc does not resolve — at run start or its point of use — halt\nnaming the missing doc and the chain consulted (REQ-K1.7). `decision-domains`\ndegrades gracefully instead: absent, note it in one line, skip the drift check,\nand use engineering judgment.\n\nDoctrine: run-start spec-format (lifecycle, anchors, freshness, commit trailer)\nDoctrine: run-start proportionality\nDoctrine: point-of-use research-rigor\nDoctrine: point-of-use security-posture\nDoctrine: point-of-use validation-rigor\nDoctrine: point-of-use finding-categorization\nDoctrine: point-of-use gate-wiring\nDoctrine: point-of-use decision-domains\nDoctrine: point-of-use custom-steps\nDoctrine: point-of-use venture-task\n\n## Pre-flight\n\nRun once per invocation, in order. Any halt records the unit to the spec's\n`tasks.md` `## Awaiting input` section with the reason — on a v2 bundle as a\ncommitted reference bullet on the task branch, `**Task \u003Cid>** — \u003Creason>`, the\nblock staying in `## Tasks` (D-3); in a holder or plain store,\n`scripts\u002Fhalt-note.sh` writes it uncommitted, named in the handoff\n(custom-spec-location REQ-E1.9) — and ends the step (the `gate-wiring` pause\nprotocol's dispatched arm); attended, present and wait.\n\n1. **Parse `$ARGUMENTS`.** A `T-\u003Cn>` ID and venture: follow `venture-task`\n   instead. Otherwise extract one or more task IDs (`5`, `3.5`, or `5 6`\n   for a bundle), plus optional `--resume \u003Crun>:\u003Cpoint>` and bare\n   `\u003Cspec>` (alias `specs\u002F\u003Cspec>`, one trailing slash allowed). Validate each\n   `\u003Cid>` against `^[0-9]+(\\.[0-9]+)?$`, and the mapped identifier against the\n   anchored identifier pattern `^[a-z0-9][a-z0-9-]*$` (≤64 chars, REQ-A1.8),\n   refusing the reserved word `flight`, **before** it appears in any path\n   or command; a failing token is never interpolated. No task ID: halt and\n   ask which task to execute.\n2. **Resolve the spec path**, in order: (a) an explicit spec argument\n   (validated in step 1); (b) the branch name\n   parsed against `planwright\u002F\u003Cspec>\u002Ftask-\u003Cids>` (D-36); (c) the spec root's\n   primary view (`scripts\u002Fresolve-root.sh spec --primary`, `\u003Croot>` below) when\n   it holds exactly one bundle whose `Status:` is `Ready` or `Active`; (d) ask,\n   listing the available bundles (underscore-prefixed reserved directories are\n   not bundles). Verify the directory holds `requirements.md`, `design.md`,\n   `tasks.md`, and `test-spec.md`.\n3. **Resolve the run-start doctrine docs** (above).\n4. **Verify the spec is Ready or Active** (see Invariants). Read the\n   `**Status:**` line in `requirements.md`. `Ready` (signed off, no work\n   started) and `Active` (work in flight) are both executable; refuse\n   Draft, Done, Retired, and Superseded. The spec file **stays `Ready`** during\n   execution: Ready↔Active is **derived, not stored**. On **Draft**,\n   halt and suggest `\u002Fspec-kickoff`. A `Ready` spec runs on the same terms as Active:\n   the freshness gate (step 7) still applies (REQ-C1.3); the two gates compose.\n5. **Run the validator.** `scripts\u002Fspec-validate.sh \u003Croot>\u002F\u003Cspec>`. On this\n   dispatch path a missing or non-executable validator fails closed and halts\n   (REQ-K1.7). A Ready or Active bundle's findings are errors: surface them and\n   halt.\n6. **Verify the kickoff brief.** `\u003Croot>\u002F\u003Cspec>\u002Fkickoff-brief.md` must exist and\n   carry a final sign-off record with an anchor line (D-36). Absent, or partial\n   (sections signed but no sign-off record, or a record without its anchor line\n   — anchor-written-last makes a killed kickoff look absent, by design): halt\n   and prompt `\u002Fspec-kickoff`.\n7. **Run the execution freshness gate** (REQ-F1.9, REQ-F1.10, D-45; the\n   `spec-format` anchor rules; fleet-hardening D-9). It stops execution against\n   content changed since sign-off and against a **stale local `main`**:\n   - **Fetch-before-gate** (D-9, REQ-D1.1). Run `scripts\u002Fdispatch-fetch.sh\n     --spec \u003Cspec> \u003Cprimary-checkout>`: it fetches `origin` (bounded, **no\n     local-`main` advance**) and prints the anchor of the bundle's primary view\n     (`spec-format` *Read surface per posture*). Exit **0**, or **3**\n     (`no-remote`, offline) → gate against it; any other nonzero → do not\n     silently proceed: park to Awaiting input.\n   - **Validate the entry** (brief's most recent, from the primary view): it\n     parses, uses a **sanctioned command form** (any form on `spec-format`'s\n     *Sanctioned command forms* list), a **sanctioned writer** (a\n     `\u002Fspec-kickoff` sign-off or the marked `Class: expression-only` ritual), and\n     — meaning-class — a dispositioned `Lens-pass:`.\n   - **Compare** the recorded anchor against the one `dispatch-fetch.sh`\n     recomputed. **Match** → proceed. **Mismatch** → halt (remedy: a\n     `\u002Fspec-kickoff` delta re-walkthrough). **No \u002F unparseable \u002F non-sanctioned \u002F\n     wrong-writer entry** → halt (repair the record per REQ-F1.10). A\n     **pre-change entry** (predating the header-`**Status:**` exclusion, or\n     whole-file form) mismatches over unedited content; remedy: the one-time\n     classify-then-self-re-anchor.\n8. **Read the brief slice and task block(s).** From the brief: the signed-off\n   goal restatement, the task graph, and the unit's risk entries; from\n   `tasks.md`, each block's definition fields. Confirm every dependency is\n   completed: in `## Completed` (v1), or derived Completed by\n   `scripts\u002Forchestrate-state.sh` (version 3: from the repository its block\n   names, by default the work repository); else halt naming it, a\n   `repository-unresolved` one by alias.\n9. **Derive the full-CI command** (D-19). Pick the most comprehensive guard the\n   repo ships, checking in order: a `mise.toml` aggregate task (planwright's own\n   is `mise run check`); a `package.json` `ci`\u002F`test` script; a `Makefile`\n   `ci`\u002F`test` target; a `lefthook.yml` `pre-commit` stack; a language\n   toolchain's check. Prefer the aggregate over a bare test run. If none can be\n   derived, ask.\n10. **Resolve `dispatch_isolation`** (D-5, REQ-C1.3). Run\n    `scripts\u002Fresolve-dispatch-isolation.sh` (under the resolved planwright root)\n    to read the knob through the four-layer overlay; it prints `per-step` (the\n    assigned-decision default) or `per-unit` and applies the REQ-E1.4 by-layer\n    malformed policy. A hard-fail (exit 4 — a malformed team-shared value or\n    config; exit 5 — a broken install whose core default is unresolvable) is a\n    **stop condition**: record to `tasks.md` Awaiting input and halt. A\n    warn+degrade (an adopter\u002Fmachine-local value degraded to the core default,\n    exit 0) proceeds. Record the mode; it governs how Implementation and\n    Convergence host this unit's steps (see *Step isolation*).\n11. **Update Last activity (v1); write no placement or `Status`.** On a\n    format-version 2 bundle this step writes nothing — a v2 block carries no\n    annotations, and derived execution state never produces commits (version\n    keying, here and throughout this skill, reads the declared `Format-version:`\n    as the scripts do; unparseable fails closed, never the v1 arm — D-7). On v1:\n    the dispatch record (task branch + runtime marker) already makes the unit\n    derivable as In progress, so write **no** section placement and **no**\n    `Status` line (REQ-B1.1, D-1); a\n    block still in `## Forward plan` while its branch is in flight is intentional\n    snapshot lag, not corruption (REQ-B1.2). The only edit is the block's\n    `- **Last activity:** \u003Ctoday>` annotation, anchor-excluded (`spec-format`\n    canonical extraction) and not a `Status` line, so it trips neither\n    corruption guard. Commit it when\n    `commit_on_state_move` is true (read `config\u002Fdefaults.yml` overridden by\n    `\u003Crepo>\u002F.claude\u002Fplanwright.local.yml`, local wins; absent\u002Fmalformed falls\n    back to the default with a one-line warning).\n12. **Check every point, run `pre-implementation`**:\n    `scripts\u002Fresolve-steps.sh pre-implementation pre-ci convergence pre-pr\n    post-pr --explain --check --unattended` (plus `pre-ready-flip` under\n    `ready_flip_policy: unit-owner`); a non-zero exit halts, naming only\n    step ids.\n\n## Points (`custom-steps`, D-3)\n\nThis skill is the runner at its five in-run points; `custom-steps` owns the\ncontract. Issue one run id (`scripts\u002Fstep-record.sh new-run`) per invocation.\n`--resume \u003Crun>:\u003Cpoint>` runs start there, skipping what\n`scripts\u002Fstep-run.sh resume --run \u003Cthis-run> --from \u003Crun>:\u003Cpoint>` prints. **Run a point**\nin the worktree, the `PLANWRIGHT_STEP_*` context exported (a PR number\nwhenever one exists):\n\n1. **Resolve** it whole first: `scripts\u002Fstep-run.sh resolve --run \u003Crun> \u003Cpoint>\n   --attended` when `launch-backend` is interactive,\n   else `--unattended`. Exit 1: `ask`, or attended all-`refuse` rows, presents\n   and waits for a repair and re-resolve; otherwise park. Exit 2, 4, or 5: a stop condition.\n2. **Host** each step in order by its printed hosting, per the doc's\n   *Hosting* table, a skill or prompt step receiving the `--preamble` block:\n   `isolated` sessions launch at `execute_step` tier through the backend\n   seam (`offload-dispatch`; headless refuses `tmux`:\n   `scripts\u002Ffleet-streamjson.sh launch \u003Cworker> \u003Cscope> --prompt-file \u003Cfile>`), recording\n   session id (a backend that cannot spawn degrades to `in-session`, recorded, a following\n   `continue` attaching to unit's session); `continue` resumes the predecessor's id\n   (behind a skip, the one its line names) or records `failed`. Commands run\n   through `step-run.sh` (foreground, waited in-turn): `isolated` by\n   `command`, session-hosted between `begin --owner $PPID`, whose printed\n   `run` line the shell tool runs, and `end`. A refused context value\n   (exit 6) is `failed`. Past its `timeout`, a session-owned step is stopped\n   through the seam or no longer waited on (recording which), outcome\n   `failed`; an `in-session` command's goes to the shell tool.\n3. **Record** each session step's outcome from its handoff through\n   `step-record.sh write`, which prints the next step's `PREV_RECORD`\n   (`step-record.sh heads`: the head move); a `skip` line records `skipped`, code `missing`.\n4. **Posture:** a `halted` or `failed` step under `on-failure: halt` ends the\n   point and the unit through the pause protocol, the entry naming only the\n   point, step id, outcome, and worktree-relative record path; `continue`\n   proceeds.\n5. **Complete** it (`step-record.sh write --completion`, the ending head and\n   each warning), a halted list included; a parked, asked, or unresolved\n   point writes none.\n\n## Implementation\n\n### Step isolation (`dispatch_isolation`, REQ-C1.3, REQ-C1.4, D-5)\n\nThe mode resolved in pre-flight step 10 governs how this unit's **steps** — the\nimplementation phase (test-first loop, research, security pass, CI), then every\npoint's steps with no declared hosting — are **hosted**. It changes hosting, not\nwork or order.\n\n- **`per-unit`** (strictly preserved): the whole unit runs in **one session** —\n  implement, run CI, run each point's steps inline, then push and open the PR.\n  Context carries across steps.\n- **`per-step`** (the assigned-decision default): each step runs in its **own\n  fresh session**, seeded by `\u002Fresume` from durable state alone (brief,\n  `tasks.md` snapshot, git log, open PR), so context stays bounded and each\n  review's perspective is uncontaminated by prior steps. Each step commits its\n  work with the `Planwright-Task:` trailer. Realization is\n  the backend's job (D-2): a session-grade backend spawns a session per step; the\n  terminal rung (D-3) approximates it with a context clear + `\u002Fresume` reseed; a\n  backend doing neither degrades to `per-unit` (degrade capability, never\n  safety).\n\n**Launch tier.** A per-step session is a launch: resolve\n`scripts\u002Fallocation-apply.sh plan --key execute_step --backend \u003Cbackend> --unit\n\u003Cspec>:task-\u003Cid> --step \u003Cstep>` and apply per `backend-capability-contract`'s\n*Applying a resolved tier*. Exit 3 is withheld: do not launch; only exit 6\ndegrades. The terminal rung advertises none, inheriting the operator's\nsession.\n\n### Commit convention (REQ-C1.4, D-2)\n\nEvery commit this skill authors for the unit carries the\n`Planwright-Task` trailer `spec-format` defines under *Branch, worktree, and\ntask-id grammar*, stamped by the helper:\n\n```sh\nscripts\u002Fplanwright-commit-trailers.sh \u003Cspec>\u002F\u003Cid> [\u003Cspec>\u002F\u003Cid> ...] \u003C \u003Cmessage-file> | git commit -F -\n```\n\n### Test-first development (REQ-E1.1, `validation-rigor`)\n\nRead `test-spec.md` for the unit's cited REQs first: each entry describes the\nverification path — what to test and which edge cases matter. Then, for every\npiece of new behavior or bug fix the unit introduces:\n\n1. **Write the test**, grounded in the `test-spec.md` entry and the `Done when:`\n   conditions. It must be specific enough to fail for the intended reason and\n   pass only when the implementation is correct.\n2. **Run it and confirm it fails for the right reason** — the failure message\n   corresponds to the behavior being implemented, not a syntax, import, or\n   unrelated error. A test that passes immediately, or fails for the wrong\n   reason and cannot be isolated, is a stop condition.\n3. **Implement** to make the test pass, consulting the brief's goal restatement\n   and risk register.\n4. **Confirm the test passes** — the same test, unchanged. Iterate on the\n   implementation, never the test.\n\nValidate the solution per `validation-rigor`: the targeted test, the wider\nproject suite (the CI step below), and the altitude check (fix the cause at the\nright layer, not the symptom). A unit that is purely configuration,\ndocumentation, or infrastructure with no testable behavior per `test-spec.md`\nskips the loop; note in the PR body why no test was added.\n\n### Research Rigor (REQ-D1.5, `research-rigor`)\n\nResearch fires **before** implementation when a trigger holds — a new\ndependency, an unfamiliar domain, a security-touching pattern, a\nversion-sensitive API, or a \"how do mature projects do this\" question. Consult\ncurrent sources in `research-rigor`'s order, recency over model memory, with\nits antipattern check before adopting a pattern. **Record** the\nfindings, tradeoffs, and sources in the brief's **risk register**, appended to a\nnamed section — never overwriting existing rows, never as an anchor entry.\nDeclare the research depth's scoping per `proportionality`. A significant risk\nthe brief did not anticipate is a stop condition: record it and hand off.\n\n### Write-time security pass (REQ-D1.6, `security-posture`)\n\nWhen the diff touches a write-time trigger class — untrusted input, subprocess\nor shell construction, path handling, authorization, crypto, or serialization —\nrun a focused security pass on that risk class before opening the PR, distinct\nfrom the general review lens, with Research Rigor consulted. Apply artifact\ndata-hygiene to everything committed (brief, risk register, observations log, PR\nbody): no secrets, credentials, internal hostnames, or sensitive detail. Work in\na hard-disqualifier zone (security-sensitive code, migrations or destructive\nops, CI config, lockfiles, secrets files) follows the `gate-wiring` pause\nprotocol rather than landing autonomously.\n\n### Decision-domains drift triggers (REQ-G1.8, `decision-domains`)\n\nWhen implementation is about to cross a catalogued decision domain the brief did\nnot decide, the drift trigger fires: if the brief or spec already decides it,\nproceed citing that decision; otherwise research per stake, then recommend (a\nlow-stake, reversible call, considerations recorded) or **escalate** (a\nload-bearing or hard-disqualifier-adjacent call) rather than auto-defaulting. A\ndecision in an uncatalogued domain writes an **observation** (the catalog grows\nthrough the drain loop). The catalogued domains are the prose seed unioned with\nadopter\u002Fteam\u002Fmachine-local additions via `scripts\u002Fresolve-catalog.sh\ndecision-domains` (REQ-D1.1), so overlay domains trigger drift too. If\n`decision-domains` did not resolve, note the skipped check and use engineering\njudgment.\n\n### Run the full project CI (REQ-E1.2)\n\nRun the `pre-ci` point, then pre-flight step 9's command, saved to a `mktemp`\nfile; each attempt is `scripts\u002Fdetached-run.sh start -- scripts\u002Ffull-suite-run.sh\n--run \u003Crun> -- bash \u003Cfile>`, polling `status \u003Crun-dir>` in-turn. A failed start,\n`died` or `never-started` fails it as `logic`; `finished 75` parks naming holders\nin its `log`, unretried. The suite must pass before convergence.\n\n### Adaptive CI-failure handling (REQ-E1.2, D-25)\n\nOn a CI failure, classify it with `scripts\u002Fclassify-ci-failure.sh` over the\nattempt's `log`:\n\n- **`transient`** (network\u002FDNS errors, registry failures, rate limits,\n  timeouts): retry up to twice, waiting 30s before the first retry and 90s\n  before the second. A retry that goes green proceeds; if both still fail,\n  reclassify as logic and escalate.\n- **`logic`** (assertion mismatches, type\u002Fcompile\u002Fsyntax errors, lint\u002Fformat\n  violations, test-runner failures): escalate immediately, never retried. Record\n  the failure with the full CI output to `tasks.md` Awaiting input and halt\n  (attended: surface and wait).\n\n## Convergence (REQ-E1.4, D-39; custom-steps REQ-E1.1)\n\nAfter CI passes, resolve the `convergence` point (*Points* step 1), then **sync\n`main`** once (REQ-B1.1, REQ-B1.4, D-4), an empty list\nincluded: run `scripts\u002Fconverge-sync-main.sh`; a non-zero exit halts the\nunit, parking a `park` record's text; a `resolve` or `repair` record's text\noverrides. `--need \u003Creason>` records a stale test or needed `main` change. The sync\nchanges the head a later ready-flip lands on, never who flips.\n\n**Run the convergence steps** (*Points* steps 2–5); `steps_convergence` is the\nunit's convergence phase, core's default being `polish` with `--nested`. A\nreview step's `--nested` run returns its audit record without pushing or\nopening a PR. Classify each handoff:\n\n- **Normal exit** (converged, or handed off with queued forks): `applied` or\n  `passed`; fold its audit record — the four bucket tables (per\n  `finding-categorization`, whose *Prose findings* axis classes a prose-only fix\n  expression-only or meaning-class), the declined log, the pending-sign-off\n  checklist (attended or unattended, a Needs-sign-off fix is committed on the\n  branch, never asked about first; prose-only ones batch into one commit per\n  loop iteration under `gate-wiring`'s commit discipline), and any queued\n  Needs-human-judgment forks — into the PR body. A queued meaning-class spec\n  fork is `halted` and stops PR creation whatever the posture: contract drift,\n  governed by the meaning-class refusal below.\n- **Safety stop** (wider-suite failure, loop detection, iteration cap): `failed`;\n  the branch may be known-broken, so open no PR over it.\n- **Hard-disqualifier finding** left unresolved: `halted`, for human direction.\n\n**A convergence finding whose fix edits this spec's anchored content** is an in-flight\namendment, never a direct edit: it takes the ritual below — the stale-anchor\npre-flight first, then the expression-only lane or the meaning-class refusal.\n\n## In-flight amendments (D-19, REQ-A3.3, REQ-F1.10)\n\nIf implementation or convergence reveals the spec itself needs an edit, the\nmeta-spec's writer prose (`spec-format`, *Sign-off records and content\nanchors*) governs what this skill owes. **Pre-flight first:** before the first\nedit, recompute the anchor with the brief's most recent recorded command; a\nmismatch, an absent or unparseable entry, and a failed recompute each block the\nedit — surface the condition instead of editing on top of it. A blocked\nedit takes its disposition from its route: a convergence finding queues as an\nirreducible fork routed to the anchor repair, folded into the PR body; an edit\nthis task's own implementation work revealed is a **stop condition** — record\nthe unit to `tasks.md` Awaiting input and halt. With the pre-flight clean,\nclassify the edit on the amendment axis:\n\n- **Expression-only** (a typo, ambiguity, or gap-fill consistent with the\n  accepted decisions): fix it in place in **one commit** with a dated\n  `## Changelog` entry, and a **marked self-re-anchor entry** to the brief's\n  amendment log — `Class: expression-only`, citing the changelog line, anchor by\n  the brief's recorded command form, written last. This is the one anchor\n  entry an execution skill may write.\n- **Meaning-class** (contradicts an accepted decision, alters a REQ's meaning,\n  or adds a REQ\u002FD-ID): **contract drift** — do not edit the contract from\n  execution. Halt, surface the drift with the conflicting reading, and route the\n  human to a `\u002Fspec-kickoff` delta re-walkthrough. There is no silent proceed.\n\n## PR creation (REQ-E1.5, D-21)\n\n1. **Run the `pre-pr` point, then push the branch:** `git push origin \u003Cbranch>`\n   (with `-u` on first push). On push or `gh` auth failure, degrade\n   gracefully (REQ-K1.6, REQ-K1.7): the local work is committed; record an\n   Awaiting-input note in `tasks.md` naming the pending step and the failure,\n   surface it, and stop. Never retry into an opaque failure.\n2. **Open or update a draft PR.** If a PR already exists for the branch, update\n   its body in place; otherwise `gh pr create --draft` with an explicit\n   `--title` and `--body` (headless `gh` prompts or fails without them). The\n   title is conventional and passes the PR-title lint\n   (`scripts\u002Fcheck-commit-msgs.sh`): `feat(\u003Cscope>): \u003Ctask title>` or the fitting\n   type. Assemble the body per the **PR-body assembly** section of the\n   `gate-wiring` doctrine (D-2). This skill supplies the summary inputs: the\n   kickoff brief path relative to its repository or plain root, the task IDs,\n   the REQs satisfied (from the task `Citations:`), the test additions and what\n   they verify, and key decisions. The audit record is the convergence\n   steps' folded output plus every in-run point's table (`step-record.sh\n   render --run \u003Cid>`, `none` rows included). The approval act, never the\n   ready flip, signs off pending-sign-off items; reject one before it by its\n   printed recipe.\n\n   Then run the `post-pr` point (PR number in context) without waiting on\n   checks (custom-steps); after its list and the\n   re-fire pass (`step-run.sh refire`'s lines, hosted with `--refire-of`,\n   before post-pr's completion), re-emit the tables, and if a post-pr record moved the\n   head fetch and regenerate the\n   checklist (`step-record.sh regenerate --base origin\u002F\u003Cbase> --head\n   origin\u002F\u003Cbranch> --checklist-only`) and re-emit the handoff; verify the PR is still a draft,\n   else park naming the post-pr steps (custom-steps REQ-E1.2); a failed\n   re-fire under `halt` then parks. Earlier points\n   never re-run. When `ready_flip_policy` resolves `unit-owner`, run\n   `scripts\u002Fready-flip.sh`'s header sequence. Under `merge_policy:\n   policy-class`, `scripts\u002Fmerge-admitted.sh`'s follows.\n3. **Annotate the unit (v1 bundles only).** On a format-version 2 bundle no\n   annotation exists to write — skip this step. Update only the task\n   block's `- **Last activity:** \u003Ctoday>` annotation; write **no** `Status`\n   line. Section placement is the `tasks-pr-sync` reconcile's sole job\n   (REQ-B1.1, D-1); the reconcile preserves annotations untouched and does not\n   author the `Status` text. A `PR #\u003CN> draft` Status here would race it: the\n   hook is fail-soft on a busy lock, leaving the block in `## Forward plan` with\n   the section\u002Fstatus contradiction `scripts\u002Fcheck-ledger.sh` flags (REQ-E1.1,\n   REQ-E1.2).\n\n**Hand off.** Report: the unit and spec, the freshness-gate result, tests\nwritten and CI outcome, step counts per point, the convergence summary, the verified anchor, the\npush\u002FPR outcome (or degradation note), and the human's decisions — the\npending-sign-off checklist and queued forks; print each trailered\ncommit's SHA and the command `git log --format='%h\n%(trailers:key=Planwright-Sign-Off,key=Planwright-Sign-Off-Rejected,separator=%x20)\n%s' \u003Cbase>..HEAD`.\nApply artifact data-hygiene to everything surfaced.\n\n## Stop conditions (mandatory human handoff)\n\nHalt and hand back when any of these fires, recording the unit to `tasks.md`\nAwaiting input with the reason; each is\ndescribed at its point of use: every pre-flight halt;\na test that cannot fail for the right reason; a CI logic failure, or transient\nretries exhausted; research revealing a risk the brief did not anticipate;\ncontract drift (route to `\u002Fspec-kickoff`); `Done when:` or `Deliverables:`\nadmitting multiple valid interpretations; a point ending the unit (*Points*);\n`gh` not authenticated or the push rejected.\n\n## Invariants\n\nThese hold at every step, each list rule labelled with its\n`doctrine\u002Fhuman-gates.md` kind:\n\n- **Gate:** **never** act on a spec neither Ready nor Active, nor bypass the\n  freshness gate composing with it; no bypass flag (REQ-C1.1, superseding\n  REQ-J1.2, D-33; D-2, D-3, REQ-F1.9, REQ-C1.3). Merge authorization is the\n  human's; pushed history stays append-only.\n- **Policy:** merge only under `merge_policy`, flip only under\n  `ready_flip_policy`, through both header sequences above (D-21;\n  human-gates REQ-C1.5, REQ-D1.4); reshape never-pushed commits only per\n  `unpushed_rewrite`.\n- **Contract:** this skill owns push and the draft PR; no step pushes before\n  `post-pr`, merges, flips, or rewrites history (D-39; custom-steps REQ-D1.6).\n- **Never** create a worktree; this skill runs inside one (D-37, D-44).\n- **Never** let `per-step` isolation weaken state-safety: every `tasks.md`\n  placement move goes through the sibling reconcile under the per-spec lock, and\n  no step session writes dispatch or progress state or opens a PR (REQ-C1.4).\n- **Never** skip the test-first loop for a behavior-introducing unit with a\n  `test-spec.md` verification path (REQ-E1.1).\n- **Never** silently proceed past a meaning-class contract drift; route to\n  `\u002Fspec-kickoff` (REQ-A3.3).\n- **Never** write a meaning-class anchor entry; the only one this skill writes\n  is the marked `Class: expression-only` self-re-anchor (REQ-F1.10).\n\n## Observations\n\nWhen something outside the unit's scope surfaces during implementation or\nconvergence (complexity growth, an outdated pattern, a newly available\ndependency feature, an uncatalogued decision domain), record it as its own\nfragment through the shared helper: `scripts\u002Fobs-record.sh --slug \u003Ctopic>\n--scope \u003Crepo> --text '\u003Cobservation>'` (resolved under the planwright root; it\nwrites into the spec root's `_observations\u002Fentries\u002F`). Commit the fragment\nwithin the iteration that produced it so the tree returns to clean; on a\nnon-zero helper exit, surface the failure rather than dropping it. Do not act on\nobservations during the unit; they are seed material for `\u002Fspec-draft`\n(REQ-E2.1, REQ-H1.6).\n\n## Maintenance\n\nAfter the run completes (or halts), compare these instructions against the\nresolved doctrine docs (REQ-B3.2, D-42) — especially `spec-format` and\n`gate-wiring`. If a concept this skill names changed meaning, gained or lost a\nstep, or moved between docs, record a drift observation via the shared helper\n(`scripts\u002Fobs-record.sh --slug skill-drift --scope \u003Crepo> --text\n'skill-drift(execute-task): \u003Cwhat>'`, keeping the `skill-drift(...)` prefix),\ncommit it as its own chore commit, and tell the user. Do not edit this skill or\nthe doctrine docs to resolve the drift; `\u002Fspec-draft` owns folding drift into\nspec amendments.\n","# \u002Fexecute-task\n\nThe execution layer of the planwright pipeline (REQ-E1.1–REQ-E1.5): take one\nready unit (a single task or a cohesion bundle) from a Ready or Active spec with\na signed-off kickoff brief and carry it from a failing test to a draft PR.\n`\u002Forchestrate` dispatches it into a prepared worktree; a human may also run it\ninside one. It works from the kickoff\nbrief, the durable contract (D-3), not by re-reading the spec; sign-off and\nmerge authorization are human gates (see Invariants).\n\n## Doctrine\n\nThis skill is procedure, not doctrine. Read the manifest's rule docs via\n`scripts\u002Fresolve-rule-doc.sh \u003Cdoc-name>` (under the resolved planwright root);\ntheir definitions govern the concepts this skill names. Per\n`doctrine\u002Finstruction-hygiene.md`, `run-start` entries load before work begins,\n`point-of-use` entries at the named step or branch.\n\n**Invoking plugin scripts (REQ-D1.1, D-7).** Call `scripts\u002F\u003Cname>.sh` by the\n**resolved literal absolute path** (never `$VAR\u002Fscripts\u002F\u003Cname>.sh`), one plain\ncommand per Bash call — `doctrine\u002Fplugin-script-invocation.md`.\n\nIf a manifest doc does not resolve — at run start or its point of use — halt\nnaming the missing doc and the chain consulted (REQ-K1.7). `decision-domains`\ndegrades gracefully instead: absent, note it in one line, skip the drift check,\nand use engineering judgment.\n\nDoctrine: run-start spec-format (lifecycle, anchors, freshness, commit trailer)\nDoctrine: run-start proportionality\nDoctrine: point-of-use research-rigor\nDoctrine: point-of-use security-posture\nDoctrine: point-of-use validation-rigor\nDoctrine: point-of-use finding-categorization\nDoctrine: point-of-use gate-wiring\nDoctrine: point-of-use decision-domains\nDoctrine: point-of-use custom-steps\nDoctrine: point-of-use venture-task\n\n## Pre-flight\n\nRun once per invocation, in order. Any halt records the unit to the spec's\n`tasks.md` `## Awaiting input` section with the reason — on a v2 bundle as a\ncommitted reference bullet on the task branch, `**Task \u003Cid>** — \u003Creason>`, the\nblock staying in `## Tasks` (D-3); in a holder or plain store,\n`scripts\u002Fhalt-note.sh` writes it uncommitted, named in the handoff\n(custom-spec-location REQ-E1.9) — and ends the step (the `gate-wiring` pause\nprotocol's dispatched arm); attended, present and wait.\n\n1. **Parse `$ARGUMENTS`.** A `T-\u003Cn>` ID and venture: follow `venture-task`\n   instead. Otherwise extract one or more task IDs (`5`, `3.5`, or `5 6`\n   for a bundle), plus optional `--resume \u003Crun>:\u003Cpoint>` and bare\n   `\u003Cspec>` (alias `specs\u002F\u003Cspec>`, one trailing slash allowed). Validate each\n   `\u003Cid>` against `^[0-9]+(\\.[0-9]+)?$`, and the mapped identifier against the\n   anchored identifier pattern `^[a-z0-9][a-z0-9-]*$` (≤64 chars, REQ-A1.8),\n   refusing the reserved word `flight`, **before** it appears in any path\n   or command; a failing token is never interpolated. No task ID: halt and\n   ask which task to execute.\n2. **Resolve the spec path**, in order: (a) an explicit spec argument\n   (validated in step 1); (b) the branch name\n   parsed against `planwright\u002F\u003Cspec>\u002Ftask-\u003Cids>` (D-36); (c) the spec root's\n   primary view (`scripts\u002Fresolve-root.sh spec --primary`, `\u003Croot>` below) when\n   it holds exactly one bundle whose `Status:` is `Ready` or `Active`; (d) ask,\n   listing the available bundles (underscore-prefixed reserved directories are\n   not bundles). Verify the directory holds `requirements.md`, `design.md`,\n   `tasks.md`, and `test-spec.md`.\n3. **Resolve the run-start doctrine docs** (above).\n4. **Verify the spec is Ready or Active** (see Invariants). Read the\n   `**Status:**` line in `requirements.md`. `Ready` (signed off, no work\n   started) and `Active` (work in flight) are both executable; refuse\n   Draft, Done, Retired, and Superseded. The spec file **stays `Ready`** during\n   execution: Ready↔Active is **derived, not stored**. On **Draft**,\n   halt and suggest `\u002Fspec-kickoff`. A `Ready` spec runs on the same terms as Active:\n   the freshness gate (step 7) still applies (REQ-C1.3); the two gates compose.\n5. **Run the validator.** `scripts\u002Fspec-validate.sh \u003Croot>\u002F\u003Cspec>`. On this\n   dispatch path a missing or non-executable validator fails closed and halts\n   (REQ-K1.7). A Ready or Active bundle's findings are errors: surface them and\n   halt.\n6. **Verify the kickoff brief.** `\u003Croot>\u002F\u003Cspec>\u002Fkickoff-brief.md` must exist and\n   carry a final sign-off record with an anchor line (D-36). Absent, or partial\n   (sections signed but no sign-off record, or a record without its anchor line\n   — anchor-written-last makes a killed kickoff look absent, by design): halt\n   and prompt `\u002Fspec-kickoff`.\n7. **Run the execution freshness gate** (REQ-F1.9, REQ-F1.10, D-45; the\n   `spec-format` anchor rules; fleet-hardening D-9). It stops execution against\n   content changed since sign-off and against a **stale local `main`**:\n   - **Fetch-before-gate** (D-9, REQ-D1.1). Run `scripts\u002Fdispatch-fetch.sh\n     --spec \u003Cspec> \u003Cprimary-checkout>`: it fetches `origin` (bounded, **no\n     local-`main` advance**) and prints the anchor of the bundle's primary view\n     (`spec-format` *Read surface per posture*). Exit **0**, or **3**\n     (`no-remote`, offline) → gate against it; any other nonzero → do not\n     silently proceed: park to Awaiting input.\n   - **Validate the entry** (brief's most recent, from the primary view): it\n     parses, uses a **sanctioned command form** (any form on `spec-format`'s\n     *Sanctioned command forms* list), a **sanctioned writer** (a\n     `\u002Fspec-kickoff` sign-off or the marked `Class: expression-only` ritual), and\n     — meaning-class — a dispositioned `Lens-pass:`.\n   - **Compare** the recorded anchor against the one `dispatch-fetch.sh`\n     recomputed. **Match** → proceed. **Mismatch** → halt (remedy: a\n     `\u002Fspec-kickoff` delta re-walkthrough). **No \u002F unparseable \u002F non-sanctioned \u002F\n     wrong-writer entry** → halt (repair the record per REQ-F1.10). A\n     **pre-change entry** (predating the header-`**Status:**` exclusion, or\n     whole-file form) mismatches over unedited content; remedy: the one-time\n     classify-then-self-re-anchor.\n8. **Read the brief slice and task block(s).** From the brief: the signed-off\n   goal restatement, the task graph, and the unit's risk entries; from\n   `tasks.md`, each block's definition fields. Confirm every dependency is\n   completed: in `## Completed` (v1), or derived Completed by\n   `scripts\u002Forchestrate-state.sh` (version 3: from the repository its block\n   names, by default the work repository); else halt naming it, a\n   `repository-unresolved` one by alias.\n9. **Derive the full-CI command** (D-19). Pick the most comprehensive guard the\n   repo ships, checking in order: a `mise.toml` aggregate task (planwright's own\n   is `mise run check`); a `package.json` `ci`\u002F`test` script; a `Makefile`\n   `ci`\u002F`test` target; a `lefthook.yml` `pre-commit` stack; a language\n   toolchain's check. Prefer the aggregate over a bare test run. If none can be\n   derived, ask.\n10. **Resolve `dispatch_isolation`** (D-5, REQ-C1.3). Run\n    `scripts\u002Fresolve-dispatch-isolation.sh` (under the resolved planwright root)\n    to read the knob through the four-layer overlay; it prints `per-step` (the\n    assigned-decision default) or `per-unit` and applies the REQ-E1.4 by-layer\n    malformed policy. A hard-fail (exit 4 — a malformed team-shared value or\n    config; exit 5 — a broken install whose core default is unresolvable) is a\n    **stop condition**: record to `tasks.md` Awaiting input and halt. A\n    warn+degrade (an adopter\u002Fmachine-local value degraded to the core default,\n    exit 0) proceeds. Record the mode; it governs how Implementation and\n    Convergence host this unit's steps (see *Step isolation*).\n11. **Update Last activity (v1); write no placement or `Status`.** On a\n    format-version 2 bundle this step writes nothing — a v2 block carries no\n    annotations, and derived execution state never produces commits (version\n    keying, here and throughout this skill, reads the declared `Format-version:`\n    as the scripts do; unparseable fails closed, never the v1 arm — D-7). On v1:\n    the dispatch record (task branch + runtime marker) already makes the unit\n    derivable as In progress, so write **no** section placement and **no**\n    `Status` line (REQ-B1.1, D-1); a\n    block still in `## Forward plan` while its branch is in flight is intentional\n    snapshot lag, not corruption (REQ-B1.2). The only edit is the block's\n    `- **Last activity:** \u003Ctoday>` annotation, anchor-excluded (`spec-format`\n    canonical extraction) and not a `Status` line, so it trips neither\n    corruption guard. Commit it when\n    `commit_on_state_move` is true (read `config\u002Fdefaults.yml` overridden by\n    `\u003Crepo>\u002F.claude\u002Fplanwright.local.yml`, local wins; absent\u002Fmalformed falls\n    back to the default with a one-line warning).\n12. **Check every point, run `pre-implementation`**:\n    `scripts\u002Fresolve-steps.sh pre-implementation pre-ci convergence pre-pr\n    post-pr --explain --check --unattended` (plus `pre-ready-flip` under\n    `ready_flip_policy: unit-owner`); a non-zero exit halts, naming only\n    step ids.\n\n## Points (`custom-steps`, D-3)\n\nThis skill is the runner at its five in-run points; `custom-steps` owns the\ncontract. Issue one run id (`scripts\u002Fstep-record.sh new-run`) per invocation.\n`--resume \u003Crun>:\u003Cpoint>` runs start there, skipping what\n`scripts\u002Fstep-run.sh resume --run \u003Cthis-run> --from \u003Crun>:\u003Cpoint>` prints. **Run a point**\nin the worktree, the `PLANWRIGHT_STEP_*` context exported (a PR number\nwhenever one exists):\n\n1. **Resolve** it whole first: `scripts\u002Fstep-run.sh resolve --run \u003Crun> \u003Cpoint>\n   --attended` when `launch-backend` is interactive,\n   else `--unattended`. Exit 1: `ask`, or attended all-`refuse` rows, presents\n   and waits for a repair and re-resolve; otherwise park. Exit 2, 4, or 5: a stop condition.\n2. **Host** each step in order by its printed hosting, per the doc's\n   *Hosting* table, a skill or prompt step receiving the `--preamble` block:\n   `isolated` sessions launch at `execute_step` tier through the backend\n   seam (`offload-dispatch`; headless refuses `tmux`:\n   `scripts\u002Ffleet-streamjson.sh launch \u003Cworker> \u003Cscope> --prompt-file \u003Cfile>`), recording\n   session id (a backend that cannot spawn degrades to `in-session`, recorded, a following\n   `continue` attaching to unit's session); `continue` resumes the predecessor's id\n   (behind a skip, the one its line names) or records `failed`. Commands run\n   through `step-run.sh` (foreground, waited in-turn): `isolated` by\n   `command`, session-hosted between `begin --owner $PPID`, whose printed\n   `run` line the shell tool runs, and `end`. A refused context value\n   (exit 6) is `failed`. Past its `timeout`, a session-owned step is stopped\n   through the seam or no longer waited on (recording which), outcome\n   `failed`; an `in-session` command's goes to the shell tool.\n3. **Record** each session step's outcome from its handoff through\n   `step-record.sh write`, which prints the next step's `PREV_RECORD`\n   (`step-record.sh heads`: the head move); a `skip` line records `skipped`, code `missing`.\n4. **Posture:** a `halted` or `failed` step under `on-failure: halt` ends the\n   point and the unit through the pause protocol, the entry naming only the\n   point, step id, outcome, and worktree-relative record path; `continue`\n   proceeds.\n5. **Complete** it (`step-record.sh write --completion`, the ending head and\n   each warning), a halted list included; a parked, asked, or unresolved\n   point writes none.\n\n## Implementation\n\n### Step isolation (`dispatch_isolation`, REQ-C1.3, REQ-C1.4, D-5)\n\nThe mode resolved in pre-flight step 10 governs how this unit's **steps** — the\nimplementation phase (test-first loop, research, security pass, CI), then every\npoint's steps with no declared hosting — are **hosted**. It changes hosting, not\nwork or order.\n\n- **`per-unit`** (strictly preserved): the whole unit runs in **one session** —\n  implement, run CI, run each point's steps inline, then push and open the PR.\n  Context carries across steps.\n- **`per-step`** (the assigned-decision default): each step runs in its **own\n  fresh session**, seeded by `\u002Fresume` from durable state alone (brief,\n  `tasks.md` snapshot, git log, open PR), so context stays bounded and each\n  review's perspective is uncontaminated by prior steps. Each step commits its\n  work with the `Planwright-Task:` trailer. Realization is\n  the backend's job (D-2): a session-grade backend spawns a session per step; the\n  terminal rung (D-3) approximates it with a context clear + `\u002Fresume` reseed; a\n  backend doing neither degrades to `per-unit` (degrade capability, never\n  safety).\n\n**Launch tier.** A per-step session is a launch: resolve\n`scripts\u002Fallocation-apply.sh plan --key execute_step --backend \u003Cbackend> --unit\n\u003Cspec>:task-\u003Cid> --step \u003Cstep>` and apply per `backend-capability-contract`'s\n*Applying a resolved tier*. Exit 3 is withheld: do not launch; only exit 6\ndegrades. The terminal rung advertises none, inheriting the operator's\nsession.\n\n### Commit convention (REQ-C1.4, D-2)\n\nEvery commit this skill authors for the unit carries the\n`Planwright-Task` trailer `spec-format` defines under *Branch, worktree, and\ntask-id grammar*, stamped by the helper:\n\n```sh\nscripts\u002Fplanwright-commit-trailers.sh \u003Cspec>\u002F\u003Cid> [\u003Cspec>\u002F\u003Cid> ...] \u003C \u003Cmessage-file> | git commit -F -\n```\n\n### Test-first development (REQ-E1.1, `validation-rigor`)\n\nRead `test-spec.md` for the unit's cited REQs first: each entry describes the\nverification path — what to test and which edge cases matter. Then, for every\npiece of new behavior or bug fix the unit introduces:\n\n1. **Write the test**, grounded in the `test-spec.md` entry and the `Done when:`\n   conditions. It must be specific enough to fail for the intended reason and\n   pass only when the implementation is correct.\n2. **Run it and confirm it fails for the right reason** — the failure message\n   corresponds to the behavior being implemented, not a syntax, import, or\n   unrelated error. A test that passes immediately, or fails for the wrong\n   reason and cannot be isolated, is a stop condition.\n3. **Implement** to make the test pass, consulting the brief's goal restatement\n   and risk register.\n4. **Confirm the test passes** — the same test, unchanged. Iterate on the\n   implementation, never the test.\n\nValidate the solution per `validation-rigor`: the targeted test, the wider\nproject suite (the CI step below), and the altitude check (fix the cause at the\nright layer, not the symptom). A unit that is purely configuration,\ndocumentation, or infrastructure with no testable behavior per `test-spec.md`\nskips the loop; note in the PR body why no test was added.\n\n### Research Rigor (REQ-D1.5, `research-rigor`)\n\nResearch fires **before** implementation when a trigger holds — a new\ndependency, an unfamiliar domain, a security-touching pattern, a\nversion-sensitive API, or a \"how do mature projects do this\" question. Consult\ncurrent sources in `research-rigor`'s order, recency over model memory, with\nits antipattern check before adopting a pattern. **Record** the\nfindings, tradeoffs, and sources in the brief's **risk register**, appended to a\nnamed section — never overwriting existing rows, never as an anchor entry.\nDeclare the research depth's scoping per `proportionality`. A significant risk\nthe brief did not anticipate is a stop condition: record it and hand off.\n\n### Write-time security pass (REQ-D1.6, `security-posture`)\n\nWhen the diff touches a write-time trigger class — untrusted input, subprocess\nor shell construction, path handling, authorization, crypto, or serialization —\nrun a focused security pass on that risk class before opening the PR, distinct\nfrom the general review lens, with Research Rigor consulted. Apply artifact\ndata-hygiene to everything committed (brief, risk register, observations log, PR\nbody): no secrets, credentials, internal hostnames, or sensitive detail. Work in\na hard-disqualifier zone (security-sensitive code, migrations or destructive\nops, CI config, lockfiles, secrets files) follows the `gate-wiring` pause\nprotocol rather than landing autonomously.\n\n### Decision-domains drift triggers (REQ-G1.8, `decision-domains`)\n\nWhen implementation is about to cross a catalogued decision domain the brief did\nnot decide, the drift trigger fires: if the brief or spec already decides it,\nproceed citing that decision; otherwise research per stake, then recommend (a\nlow-stake, reversible call, considerations recorded) or **escalate** (a\nload-bearing or hard-disqualifier-adjacent call) rather than auto-defaulting. A\ndecision in an uncatalogued domain writes an **observation** (the catalog grows\nthrough the drain loop). The catalogued domains are the prose seed unioned with\nadopter\u002Fteam\u002Fmachine-local additions via `scripts\u002Fresolve-catalog.sh\ndecision-domains` (REQ-D1.1), so overlay domains trigger drift too. If\n`decision-domains` did not resolve, note the skipped check and use engineering\njudgment.\n\n### Run the full project CI (REQ-E1.2)\n\nRun the `pre-ci` point, then pre-flight step 9's command, saved to a `mktemp`\nfile; each attempt is `scripts\u002Fdetached-run.sh start -- scripts\u002Ffull-suite-run.sh\n--run \u003Crun> -- bash \u003Cfile>`, polling `status \u003Crun-dir>` in-turn. A failed start,\n`died` or `never-started` fails it as `logic`; `finished 75` parks naming holders\nin its `log`, unretried. The suite must pass before convergence.\n\n### Adaptive CI-failure handling (REQ-E1.2, D-25)\n\nOn a CI failure, classify it with `scripts\u002Fclassify-ci-failure.sh` over the\nattempt's `log`:\n\n- **`transient`** (network\u002FDNS errors, registry failures, rate limits,\n  timeouts): retry up to twice, waiting 30s before the first retry and 90s\n  before the second. A retry that goes green proceeds; if both still fail,\n  reclassify as logic and escalate.\n- **`logic`** (assertion mismatches, type\u002Fcompile\u002Fsyntax errors, lint\u002Fformat\n  violations, test-runner failures): escalate immediately, never retried. Record\n  the failure with the full CI output to `tasks.md` Awaiting input and halt\n  (attended: surface and wait).\n\n## Convergence (REQ-E1.4, D-39; custom-steps REQ-E1.1)\n\nAfter CI passes, resolve the `convergence` point (*Points* step 1), then **sync\n`main`** once (REQ-B1.1, REQ-B1.4, D-4), an empty list\nincluded: run `scripts\u002Fconverge-sync-main.sh`; a non-zero exit halts the\nunit, parking a `park` record's text; a `resolve` or `repair` record's text\noverrides. `--need \u003Creason>` records a stale test or needed `main` change. The sync\nchanges the head a later ready-flip lands on, never who flips.\n\n**Run the convergence steps** (*Points* steps 2–5); `steps_convergence` is the\nunit's convergence phase, core's default being `polish` with `--nested`. A\nreview step's `--nested` run returns its audit record without pushing or\nopening a PR. Classify each handoff:\n\n- **Normal exit** (converged, or handed off with queued forks): `applied` or\n  `passed`; fold its audit record — the four bucket tables (per\n  `finding-categorization`, whose *Prose findings* axis classes a prose-only fix\n  expression-only or meaning-class), the declined log, the pending-sign-off\n  checklist (attended or unattended, a Needs-sign-off fix is committed on the\n  branch, never asked about first; prose-only ones batch into one commit per\n  loop iteration under `gate-wiring`'s commit discipline), and any queued\n  Needs-human-judgment forks — into the PR body. A queued meaning-class spec\n  fork is `halted` and stops PR creation whatever the posture: contract drift,\n  governed by the meaning-class refusal below.\n- **Safety stop** (wider-suite failure, loop detection, iteration cap): `failed`;\n  the branch may be known-broken, so open no PR over it.\n- **Hard-disqualifier finding** left unresolved: `halted`, for human direction.\n\n**A convergence finding whose fix edits this spec's anchored content** is an in-flight\namendment, never a direct edit: it takes the ritual below — the stale-anchor\npre-flight first, then the expression-only lane or the meaning-class refusal.\n\n## In-flight amendments (D-19, REQ-A3.3, REQ-F1.10)\n\nIf implementation or convergence reveals the spec itself needs an edit, the\nmeta-spec's writer prose (`spec-format`, *Sign-off records and content\nanchors*) governs what this skill owes. **Pre-flight first:** before the first\nedit, recompute the anchor with the brief's most recent recorded command; a\nmismatch, an absent or unparseable entry, and a failed recompute each block the\nedit — surface the condition instead of editing on top of it. A blocked\nedit takes its disposition from its route: a convergence finding queues as an\nirreducible fork routed to the anchor repair, folded into the PR body; an edit\nthis task's own implementation work revealed is a **stop condition** — record\nthe unit to `tasks.md` Awaiting input and halt. With the pre-flight clean,\nclassify the edit on the amendment axis:\n\n- **Expression-only** (a typo, ambiguity, or gap-fill consistent with the\n  accepted decisions): fix it in place in **one commit** with a dated\n  `## Changelog` entry, and a **marked self-re-anchor entry** to the brief's\n  amendment log — `Class: expression-only`, citing the changelog line, anchor by\n  the brief's recorded command form, written last. This is the one anchor\n  entry an execution skill may write.\n- **Meaning-class** (contradicts an accepted decision, alters a REQ's meaning,\n  or adds a REQ\u002FD-ID): **contract drift** — do not edit the contract from\n  execution. Halt, surface the drift with the conflicting reading, and route the\n  human to a `\u002Fspec-kickoff` delta re-walkthrough. There is no silent proceed.\n\n## PR creation (REQ-E1.5, D-21)\n\n1. **Run the `pre-pr` point, then push the branch:** `git push origin \u003Cbranch>`\n   (with `-u` on first push). On push or `gh` auth failure, degrade\n   gracefully (REQ-K1.6, REQ-K1.7): the local work is committed; record an\n   Awaiting-input note in `tasks.md` naming the pending step and the failure,\n   surface it, and stop. Never retry into an opaque failure.\n2. **Open or update a draft PR.** If a PR already exists for the branch, update\n   its body in place; otherwise `gh pr create --draft` with an explicit\n   `--title` and `--body` (headless `gh` prompts or fails without them). The\n   title is conventional and passes the PR-title lint\n   (`scripts\u002Fcheck-commit-msgs.sh`): `feat(\u003Cscope>): \u003Ctask title>` or the fitting\n   type. Assemble the body per the **PR-body assembly** section of the\n   `gate-wiring` doctrine (D-2). This skill supplies the summary inputs: the\n   kickoff brief path relative to its repository or plain root, the task IDs,\n   the REQs satisfied (from the task `Citations:`), the test additions and what\n   they verify, and key decisions. The audit record is the convergence\n   steps' folded output plus every in-run point's table (`step-record.sh\n   render --run \u003Cid>`, `none` rows included). The approval act, never the\n   ready flip, signs off pending-sign-off items; reject one before it by its\n   printed recipe.\n\n   Then run the `post-pr` point (PR number in context) without waiting on\n   checks (custom-steps); after its list and the\n   re-fire pass (`step-run.sh refire`'s lines, hosted with `--refire-of`,\n   before post-pr's completion), re-emit the tables, and if a post-pr record moved the\n   head fetch and regenerate the\n   checklist (`step-record.sh regenerate --base origin\u002F\u003Cbase> --head\n   origin\u002F\u003Cbranch> --checklist-only`) and re-emit the handoff; verify the PR is still a draft,\n   else park naming the post-pr steps (custom-steps REQ-E1.2); a failed\n   re-fire under `halt` then parks. Earlier points\n   never re-run. When `ready_flip_policy` resolves `unit-owner`, run\n   `scripts\u002Fready-flip.sh`'s header sequence. Under `merge_policy:\n   policy-class`, `scripts\u002Fmerge-admitted.sh`'s follows.\n3. **Annotate the unit (v1 bundles only).** On a format-version 2 bundle no\n   annotation exists to write — skip this step. Update only the task\n   block's `- **Last activity:** \u003Ctoday>` annotation; write **no** `Status`\n   line. Section placement is the `tasks-pr-sync` reconcile's sole job\n   (REQ-B1.1, D-1); the reconcile preserves annotations untouched and does not\n   author the `Status` text. A `PR #\u003CN> draft` Status here would race it: the\n   hook is fail-soft on a busy lock, leaving the block in `## Forward plan` with\n   the section\u002Fstatus contradiction `scripts\u002Fcheck-ledger.sh` flags (REQ-E1.1,\n   REQ-E1.2).\n\n**Hand off.** Report: the unit and spec, the freshness-gate result, tests\nwritten and CI outcome, step counts per point, the convergence summary, the verified anchor, the\npush\u002FPR outcome (or degradation note), and the human's decisions — the\npending-sign-off checklist and queued forks; print each trailered\ncommit's SHA and the command `git log --format='%h\n%(trailers:key=Planwright-Sign-Off,key=Planwright-Sign-Off-Rejected,separator=%x20)\n%s' \u003Cbase>..HEAD`.\nApply artifact data-hygiene to everything surfaced.\n\n## Stop conditions (mandatory human handoff)\n\nHalt and hand back when any of these fires, recording the unit to `tasks.md`\nAwaiting input with the reason; each is\ndescribed at its point of use: every pre-flight halt;\na test that cannot fail for the right reason; a CI logic failure, or transient\nretries exhausted; research revealing a risk the brief did not anticipate;\ncontract drift (route to `\u002Fspec-kickoff`); `Done when:` or `Deliverables:`\nadmitting multiple valid interpretations; a point ending the unit (*Points*);\n`gh` not authenticated or the push rejected.\n\n## Invariants\n\nThese hold at every step, each list rule labelled with its\n`doctrine\u002Fhuman-gates.md` kind:\n\n- **Gate:** **never** act on a spec neither Ready nor Active, nor bypass the\n  freshness gate composing with it; no bypass flag (REQ-C1.1, superseding\n  REQ-J1.2, D-33; D-2, D-3, REQ-F1.9, REQ-C1.3). Merge authorization is the\n  human's; pushed history stays append-only.\n- **Policy:** merge only under `merge_policy`, flip only under\n  `ready_flip_policy`, through both header sequences above (D-21;\n  human-gates REQ-C1.5, REQ-D1.4); reshape never-pushed commits only per\n  `unpushed_rewrite`.\n- **Contract:** this skill owns push and the draft PR; no step pushes before\n  `post-pr`, merges, flips, or rewrites history (D-39; custom-steps REQ-D1.6).\n- **Never** create a worktree; this skill runs inside one (D-37, D-44).\n- **Never** let `per-step` isolation weaken state-safety: every `tasks.md`\n  placement move goes through the sibling reconcile under the per-spec lock, and\n  no step session writes dispatch or progress state or opens a PR (REQ-C1.4).\n- **Never** skip the test-first loop for a behavior-introducing unit with a\n  `test-spec.md` verification path (REQ-E1.1).\n- **Never** silently proceed past a meaning-class contract drift; route to\n  `\u002Fspec-kickoff` (REQ-A3.3).\n- **Never** write a meaning-class anchor entry; the only one this skill writes\n  is the marked `Class: expression-only` self-re-anchor (REQ-F1.10).\n\n## Observations\n\nWhen something outside the unit's scope surfaces during implementation or\nconvergence (complexity growth, an outdated pattern, a newly available\ndependency feature, an uncatalogued decision domain), record it as its own\nfragment through the shared helper: `scripts\u002Fobs-record.sh --slug \u003Ctopic>\n--scope \u003Crepo> --text '\u003Cobservation>'` (resolved under the planwright root; it\nwrites into the spec root's `_observations\u002Fentries\u002F`). Commit the fragment\nwithin the iteration that produced it so the tree returns to clean; on a\nnon-zero helper exit, surface the failure rather than dropping it. Do not act on\nobservations during the unit; they are seed material for `\u002Fspec-draft`\n(REQ-E2.1, REQ-H1.6).\n\n## Maintenance\n\nAfter the run completes (or halts), compare these instructions against the\nresolved doctrine docs (REQ-B3.2, D-42) — especially `spec-format` and\n`gate-wiring`. If a concept this skill names changed meaning, gained or lost a\nstep, or moved between docs, record a drift observation via the shared helper\n(`scripts\u002Fobs-record.sh --slug skill-drift --scope \u003Crepo> --text\n'skill-drift(execute-task): \u003Cwhat>'`, keeping the `skill-drift(...)` prefix),\ncommit it as its own chore commit, and tell the user. Do not edit this skill or\nthe doctrine docs to resolve the drift; `\u002Fspec-draft` owns folding drift into\nspec amendments.\n",{"name":5,"description":24,"argument-hint":25},"Implement one task (or a cohesion bundle) from a signed-off spec (Ready or Active): recompute the execution freshness gate, write the verifying test first, implement to green, run the project's full CI with adaptive retry, converge via the steps_convergence list (default \u002Fpolish --nested), then open a draft PR referencing the brief, tasks, REQs, and tests. The execution workhorse of the planwright pipeline. Assumes the worktree already exists; never creates worktrees; merges or readies only through its helpers.\n","\u003Ctask-id> [\u003Ctask-id> …] [\u003Cspec>] [--resume \u003Crun>:\u003Cpoint>]","main","0e89829fc3d77908a19509e9df64697454d121fd","skills\u002Fexecute-task",0,"https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright","https:\u002F\u002Fgithub.com\u002Finkatze","https:\u002F\u002Fwww.inkatze.com","Software Engineer | Open Source n00b","2026-11-15 05:06:45",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add inkatze\u002Fplanwright --skill execute-task",{"tool":41,"command":42},"bunx","bunx skills add inkatze\u002Fplanwright --skill execute-task",{"tool":44,"command":45},"pnpm","pnpm dlx skills add inkatze\u002Fplanwright --skill execute-task","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fexecute-task\u002FSKILL.md",true,[],[50,56,62,67,74,81],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M75K7QKF8AFQ3JAJ1T67HT3F","demo","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript-invocation\u002Fsh-runs-bash\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M75K7NKAW0V15FAVSWPVV4NZ","usage","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript-invocation\u002Fclean\u002Fskills\u002Fusage\u002FSKILL.md",[],[],{"skillNo":63,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M75K7MD8DA50HDQ1NSTZCVXM","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fscript-invocation\u002Fclean\u002Fskills\u002Fdemo\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M75K7GFAKYN7X3QZ385P3V7H","tower","The front door: a standing conversational session that takes any ask about the repository in plain language, answers questions, and routes work that changes the repository per request onto visual flight (an isolated worker that lands a draft PR) or instrument flight (the spec pipeline), stating its grounds, with status on demand. Use it to start work without writing a spec first. It never edits the repository itself, never merges, never marks a PR ready, and never starts a kickoff.","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Ftower\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M75K7AVKFPCAKKX8BBK2HWWN","spec-walkthrough","Render a spec bundle (or a chosen slice) into a plain-language, didactic comprehension artifact a human reads and judges for themselves: an unaided cold read before kickoff, re-orientation mid-execution, or onboarding to a finished or abandoned spec. Standalone and strictly read-only: it renders any status, never edits, signs off, mutates the pipeline, or delivers a verdict of its own. The independent complement to \u002Fspec-kickoff's guided dialogue.","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fspec-walkthrough\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M75K72A3397KH8GXFDJ0FCJM","spec-draft","Interactively elicit a four-file spec bundle (requirements.md, design.md, tasks.md, test-spec.md) at Status Draft on the spec's own branch, mining seed sources (pending notes, the observations log, transcripts) and citing them. Runs fold-detection against existing specs on every invocation and surfaces an extend recommendation instead of spinning a duplicate bundle. Commits the completed bundle (commit_on_draft opt-out); never pushes, never flips a spec to Ready.","https:\u002F\u002Fgithub.com\u002Finkatze\u002Fplanwright\u002Fblob\u002Fmain\u002Fskills\u002Fspec-draft\u002FSKILL.md",[],[]]