[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ARP93SR1CZGW8XQD2EGT6T":3,"skill-same:01M7ARP93SR1CZGW8XQD2EGT6T":66},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ARP93SR1CZGW8XQD2EGT6T","task",null,"Delivery funnel for one repository task: a feature, bug fix, refactor or chore, from description or issue number to a pushed branch and a draft pull request with the board moved. Use whenever the user asks, in any language, to implement, fix, build, change or refactor something in this repository, including requests like \"fix this and leave it ready for a PR\", \"open a pull request for\", or a bare issue number, and a one-line change the user dictates, calls urgent or says is already approved, and on \u002Ftask \u003Cdescription | issue number>. Not for questions about why something happens: that is investigate. Every path, gate command and board id comes from .claude\u002Ffunnel.config.json, so this runs on any stack.","gabrielbsandim\u002Ftask-funnel","gabrielbsandim","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F60983735?v=4","01M7ARN6YCBDCDDZMHF6F15RHS","Gabriel Sandim","01M7ARN6YY90S7NGNF1WSPQSEN",3,"MIT","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Ftask\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: task\ndescription: \"Delivery funnel for one repository task: a feature, bug fix, refactor or chore, from description or issue number to a pushed branch and a draft pull request with the board moved. Use whenever the user asks, in any language, to implement, fix, build, change or refactor something in this repository, including requests like \\\"fix this and leave it ready for a PR\\\", \\\"open a pull request for\\\", or a bare issue number, and a one-line change the user dictates, calls urgent or says is already approved, and on \u002Ftask \u003Cdescription | issue number>. Not for questions about why something happens: that is investigate. Every path, gate command and board id comes from .claude\u002Ffunnel.config.json, so this runs on any stack.\"\n---\n\n# task: one task, from description to draft pull request\n\nYou run the funnel **and you write the code**. Agents read: a premise check before a\nrisky change, a test writer that works before the code exists, a reviewer and a\nverifier after it. None of them writes production code, and none of them approves\nwhat you wrote.\n\nInput: the task description or issue number after the command. Empty → ask which\ntask and stop.\n\nThree files sit next to this one and are **not** loaded with it. `review.md` is stage\n4 in full and `ship.md` is stages 5 and 6, each read when its stage starts. `evidence.md` is the\nmeasurement behind every rule here that reads as arbitrary; open it when you are about\nto disagree with a rule or adapt the funnel to a repository it was not written\nagainst, never to run a task.\n\n## The repo describes itself\n\nNothing in this skill knows your paths, commands or board. All of that is in\n`.claude\u002Ffunnel.config.json`, read through `kit`:\n\n```\nkit doctor                     # is this machine and this repo ready\nkit config get .base           # the base branch\nkit config gates ship          # which gates a stage runs\nkit lane src\u002Fbilling\u002Ffee.ts    # direct or risk, from the repo's risk.paths\nkit review                     # the review plan for this branch's lane\n```\n\nIf `kit` is not on PATH or cannot run, use `${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fkit` for the\nwhole task, written as that absolute path wherever a file or a dispatch says `kit`,\nbecause a Bash call keeps no alias. No config: `kit config init`, then `kit config check`.\n\n## Before stage 0: is this skill the one that shipped\n\n```\nkit version 0.21.0\n```\n\nThe literal is the version this file shipped in (`evidence.md` &middot; *Stale kit*).\n\n- **STALE SKILL**: this skill was loaded from a directory newer than the installed\n  `kit`. Use `${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fkit` for the whole task and carry on.\n- **STALE KIT**: run the `kit setup` line it prints, then carry on.\n- **`unknown subcommand: version`**: a `kit` older than 0.3.0. Run `kit setup` from the\n  newest copy under `plugins\u002Fcache\u002F*\u002Ftask-funnel\u002F`.\n- Anything else: carry on without mentioning it.\n\n## Rules that hold for the whole funnel\n\n- **The repo's own pipeline document wins.** `kit config get .docs.pipeline` names\n  it. Where it and this skill disagree, that document is right.\n- **Verification is inside the loop, and it is the repo's gate.** Every change to\n  source is followed by `kit gate \u003Cstage>` before you report it, never by a bare\n  `tsc` or `vitest`: the gate carries the environment the repo needs (a heap size, a\n  flag) and leaves a receipt. A Stop hook refuses to end a turn that changed code in\n  a funnel checkout without one, and a guard refuses a gate's tool run without its\n  environment.\n- **Full spec in every dispatch.** A subagent inherits none of your context. Every\n  prompt carries objective, file scope, prohibitions and acceptance criteria, the\n  prohibitions always including: _you are one stage inside the task funnel; do not\n  invoke the task or investigate skills yourself_.\n- **Never write a `model` field into a dispatch.** Every agent declares its model in\n  its own frontmatter, and a `model` in the Agent input silently overrides it. The\n  only exception is a `model:` line `kit review` printed (`evidence.md` &middot; *The\n  model of a dispatch*).\n- **The writer never approves their own work.** You write; review runs in clean\n  agents that did not.\n- **Never merge.** The funnel ends at the draft pull request.\n- **An inherited claim is not a fact.** A triage finding carried into the spec is\n  marked **MEASURED**, with the command that proved it, or **INFERRED**, and whoever\n  writes an INFERRED claim into code measures it first.\n- **Everything the funnel writes is English**: branch, commits, pull request, code,\n  comments, dispatches. Talk to the user in their language.\n- **A code comment says why, in at most two lines.** No ticket key, pull request\n  number, date or count.\n- **A new issue is the last resort, and never an orphan.** Before creating one, run\n  `kit issues related \"\u003Ctitle>\" --files a.ts,b.ts --parent \u003Cepic>`; two distinctive\n  files in common means it is the same work. If you create it, link it to a parent\n  (`evidence.md` &middot; *Orphan issues*).\n- **One task per session on the risk lane.** You write the code now, so the session\n  carries the task's whole context, and the next task should not inherit it. After the\n  report, say `\u002Fclear` is the next step.\n- **Compact at a boundary, by prefix size, and always before a long pause.**\n  `kit context` prints **HOLD** below 120k tokens in context, **AT THE NEXT BOUNDARY**\n  from 120k to 300k, **NOW** above 300k, and **LATE** below 15% of the window free\n  (`evidence.md` &middot; *Prefix rewrite*, *A pause is the expensive moment*).\n\n## Stage 0 · Pre-flight and the lane, read-only\n\n- `kit doctor`. A missing `project` scope or an invalid config is cheaper to find now.\n- Issue number known → run the pre-flight the pipeline document prescribes for picking\n  up an issue. An existing remote branch may mean the issue is taken, abandoned or done.\n- `git status` clean, including your own edits.\n- No worktree yet: the environment is paid for after the spec says the task is real.\n- **Which lane.** Answered here, before anything is dispatched, because the risk lane's\n  first step is already its most expensive question (`evidence.md` &middot; *The\n  triage floor*).\n\n### Three lanes, decided by what the change can break\n\n**Not a line count.** One line in an auth guard is the most dangerous change in the\nrepository and thirty lines of copy are nothing, so size is the wrong axis. The axis is\nwhich surface moves:\n\n| Surface | Examples of it moving | Lane |\n| --- | --- | --- |\n| Money, permission, tenancy | anything a customer is charged, refused or shown | risk |\n| Data | a migration, a write path, a query's scope, a cache key | risk |\n| Contract | a signature, route, schema or exported type another module reads | risk |\n| Behaviour | a new branch, a new state, an order of operations, a cap or a retry | direct |\n| Published prose | a help entry, a policy, the assistant corpus, a public document | direct |\n| None of the above | a copy string, a config value, a comment, a typo, a rename in one file | trivial |\n\nThen ask the repo. `kit lane \u003Cthe files you expect to change>` prints `risk` when any\nof them matches the config's `risk.paths`, and a repo's list of risky paths outranks\nyour reading of the table: it was written by someone who knows which files bite.\nAfter code exists, `kit lane` with no argument reads the branch's own diff.\n\n- **direct** is the default: most tasks. You write a short spec, write the code, the\n  gates run, one reviewer reads it, a verifier checks each finding, and that is the\n  only review round.\n- **risk** buys the premise check, tests written before the code, five review lenses\n  and a second round that reads only the fix.\n- **trivial** is the direct lane without the review, for a change no reviewer would\n  have anything to read in.\n\n**Announce and proceed, without waiting.** Say in one line which lane and which\nsurface decided it, then run it. The user chose announce-and-proceed on 2026-08-18,\nover announce-and-confirm; naming the criterion is what lets them stop you.\n\n**Uncertainty goes up, never down.** If the table is arguable, take the higher lane:\na risky change on the direct lane ships a defect with a green report. Triage may raise a direct task to risk\n(the user says so, or the premise check finds a surface you missed); nothing lowers a\nrisk task except the triage verdict `DIRECT_LANE`.\n\n### What every lane runs\n\nThe lanes differ in who reads the change. They do not differ in the rails:\n\n| Step | Risk | Direct | Trivial |\n| --- | --- | --- | --- |\n| Stage 0 pre-flight | yes | yes | yes |\n| Board to in progress | yes | yes | yes |\n| Branch and worktree from the config | yes | yes | yes |\n| `kit gate` for the stage | yes | yes | yes |\n| Commit under the repo's convention | yes | yes | yes |\n| `kit gate ship`, push, draft pull request | yes | yes | yes |\n| Body under the `kit pr-body` budget | yes | yes | yes |\n| `kit board in_review`, `kit worktree gc --yes` | yes | yes | yes |\n| Premise check (triage) and spec approval | yes | no | no |\n| Tests written before the code, by an agent | yes | no | no |\n| Review rounds, each finding verified | 2 | 1 | 0 |\n\nAn issue already on the board is used and moved; the trivial lane never creates one,\nbecause a typo that opens an issue is backlog growth nobody decided on.\n\n### A repo on the lite lane\n\n`kit config get .lane` printing `lite`: run the direct lane for every task; on a risky\npath `kit review` adds the risk lenses to its one round.\n\n## The agents this skill dispatches\n\nEach dispatch names its agent, or it resolves to a general-purpose one without them:\n\n| Stage | Agent | Model | Lane | Carries |\n| --- | --- | --- | --- | --- |\n| 1 | `task-funnel:funnel-triage` | inherit | risk | the premise questions, the return shape, the invariant table |\n| 2 | `task-funnel:funnel-test-writer` | sonnet | risk | tests from the spec before the code, and proof each fails for its reason |\n| 4 | `task-funnel:funnel-reviewer` | sonnet | direct, risk | the reading discipline, Critical and Important only, NEW against PRE-EXISTING |\n| 4 | `task-funnel:funnel-verifier` | sonnet | direct, risk | refute each finding, and REAL only with a trace or a reproduction |\n| 4 | `task-funnel:funnel-screen-lens` | inherit | risk, when a screen moved | report only what you observed, and NOT PROVEN is not a pass |\n\n## Stage 1 · The spec\n\n### Direct and trivial: inline\n\nWrite it yourself in 3 to 5 lines: what, why, the files, the acceptance in one\nsentence a test can check, and a REVIEW FOCUS of the inputs likeliest to break it. For a bug, the acceptance is the failing test that\nreproduces it. A screen adds a SCREEN line: tokens and components reused, the sibling\nscreen copied, the states that apply. Show it with the lane announcement and continue.\n\n### Risk: the premise check\n\nOne dispatch to `funnel-triage`, structured return, even when the user hands you a\nspec already approved: approval settles what to build, and the premise check measures\nwhether the code is what the request assumes. The gate reads `VERDICT` first:\n\n- `PROCEED` → show the user the spec in 5 to 10 lines, with the PREMISE block, and\n  **wait for approval**, unless the user already approved this spec and the PREMISE\n  block contradicts nothing in it. This is the one question the funnel keeps, because a spec that\n  is wrong makes every later stage correct against the wrong thing.\n- `DIRECT_LANE` → the premise holds and no risky surface moves. Say so in one line with\n  what triage checked, and run the direct lane on the spec it returned. Do not\n  re-dispatch triage to get a different answer, which is US$ 2.46 spent to disagree\n  with the first one.\n- `NEEDS_DECISION` or `BLOCKED` → stop and present the evidence. AskUserQuestion when\n  the alternatives are objective.\n- `ALREADY_DONE` → stop and show the commit or the code.\n\n`NEEDS_DECISION` answered by an investigation → **stage 1 does not run again**: write\nthe spec from the investigation's child issue, run stage 0 against its number, and go\nto stage 2 (`evidence.md` &middot; *Paying triage twice*).\n\n`PROCEED` with no issue yet → open one the way the pipeline document says, and re-run\nthe stage 0 pre-flight against its number.\n\n### Invariants, not only criteria\n\nOn the run this funnel was first measured on, three of four review rounds went to one\nrule nobody had written down (`evidence.md` &middot; *One invariant, found three\ntimes*). So the spec names them up front, on every lane:\n\n| Scope in the spec | The invariant it carries |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| **Money** | every path that spends records the spend, **including the one that throws**; a cap sums an aggregate, never a rounded per-row value |\n| **External call** | every new call has a timeout and a `catch`; the `catch` logs what was lost, because a silent `return { status: 'failed' }` is no handler |\n| **Untrusted inbound** | the response code is chosen for the sender, not for us; a path that always answers 200 must not be the path that swallows a retry |\n| **Prose it touches** | any comment, document or knowledge entry the change **falsifies** moves in the same commit, not only the ones it adds |\n\nToo big for one reviewable pull request → present the slices and stop.\n\n### Self-review, inline, before you show the spec\n\nNot a subagent. Ask yourself, in writing:\n\n1. Which acceptance criterion cannot be checked by a command or a test?\n2. Which file in scope has no criterion attached, and which criterion has no file?\n3. Which invariant above applies and is not stated?\n4. What would make this \"the spec was wrong\" rather than \"the code was wrong\"?\n\n## Stage 2 · The worktree, and on the risk lane the tests\n\n**Risk lane: no worktree without a `funnel-triage` VERDICT from this task.** Measuring\nthe bug yourself is not it: the premise check is a reader that did not write the\nspec, and a spec the user approved in the request does not skip it.\n\n```\nkit worktree add \u003Cissue, or 0 without one> \u003Cslug> --kind \u003Cfeature|bug|refactor|chore>\nkit board in_progress --issue \u003Cissue>\n```\n\nThe board moves right after the worktree exists, so no other cycle picks the work up.\n\n**A refused git step is reported, never inferred.** Run `kit worktree add` even when a\nprobe says git is read-only. If it, or `git switch -c`, is refused, still write the\nchange with the Edit tool (a failed `touch` proves nothing about Edit), run the gates,\ncommit nothing to trunk, and name each refused step with its error in the report.\n\n**Risk lane: the tests come first.** Dispatch the spec, including its INTERFACE line,\nto `funnel-test-writer`, working in the worktree. It writes the tests from the\nacceptance criteria and the invariants, runs them, and commits them failing.\n\n**GATE**: every new test fails, and for the reason its criterion names (an assertion on\nthe value, or the missing export the INTERFACE declares). A test that passes before the\ncode exists asserts nothing about the change; send it back once, with the test named.\n\nTests from an agent that never saw the code were correct 88% of the time, against 61%\nfor the agent testing its own (`evidence.md` &middot; *Tests before the code*).\n\n**Direct lane**: you write the tests, and for a bug the reproduction comes first:\nwrite it, watch it fail, then fix.\n\n## Stage 3 · Implement, in this session\n\nWrite the change in the worktree, against the spec.\n\n**The least code that fully meets the spec.** Having read the code the change touches,\ntake the first option that holds: nothing needs to change; it already exists in this\nrepo; the standard library or the platform does it; an installed dependency does it;\nonly then the smallest new code, with its test. Every added line is read by every\nreviewer (`evidence.md` &middot; *Less code to read*). Never smaller than the spec, and\nnever cut: validation at a trust boundary, data-loss handling, security, accessibility,\nthe repo's structure and house components, or the tests (*The ladder's floor*).\n\n**A bug is fixed where it lives.** Before the fix, grep every caller of the function at\nfault, and the report names each by `file:line`; a defect in shared code is fixed once there, never in the caller that reported\nit (*Root cause*).\n\n**A screen moved** (a file under `.browser.screenGlobs`): read `screen.md` in this\nskill's directory before writing it, on every lane, and run `kit design`.\n\nOn the risk lane, the goal is the\ntest writer's tests passing **without editing them**: a test that looks wrong is a\nspec question, raised with the user, not an edit. The `protect-tests` hook refuses the\nusual ways a suite gets faked.\n\n**GATE**: `kit gate implement_first_pass`, then the work **committed** per the repo's\ncommit convention. The review diffs commits, so uncommitted work is invisible to it.\n\n**A red gate is not automatically your defect.** `kit gate` prints a `flake` line when\na failing file is on the config's quarantine list, and says whether this branch's diff\ncan reach it. A red gate in a file the diff never touched is a re-run of that file, not\na fix. A gate that stays red after two honest attempts is a report, with the output.\n\nOn a doc-only scope the worktree has no dependencies installed, so no gate command can\nrun. The gate is then the commit alone.\n\n## Stage 4 · Review, counted by `kit`\n\n```\nkit review                       # this branch's lane, first round\nkit review --since \u003Csha>         # risk lane only: the fix round\n```\n\n`kit review` decides the lane from `risk.paths` and prints `lane, round N of M`;\n`kit review risk` or `kit review direct` passes on a lane triage or the user decided.\n**The cap is counted, not remembered**: one round on the direct lane, two on the risk\nlane, and a further `kit review` on a new head is refused (`evidence.md` &middot;\n*Rounds without a counter*). Only the user buys another round, with `--reset-rounds`.\n\n### Before the dispatches go out\n\nRead `review.md` in this skill's directory now. What a skipped read must not lose:\n\n- **Each printed block goes verbatim to its own `funnel-reviewer`**, plus what the\n  change is for, the acceptance criteria, the spec's INVARIANTS, CONSTRAINTS and REVIEW\n  FOCUS verbatim, what was left out, and from round 2 the `ALREADY DECIDED` list.\n  Never an instruction about what not to flag.\n- **The browser half runs only on the risk lane, when `kit screens --preflight` prints\n  `ready`**, one screen lens at a time, with the app brought up by you.\n- **Every finding goes to `funnel-verifier`**, one dispatch per round. REAL is fixed,\n  REFUTED dropped, PRE-EXISTING goes to the body as one line.\n- **REAL findings are fixed in this session, all in one pass**, then\n  `kit gate implement_fix_round` and one commit.\n- **The direct lane stops there.** The risk lane runs `kit review --since \u003Cthe sha\n  round 1 reviewed>` once, through the verifier the same way.\n- **At the cap every open finding gets a written decision** in the body; a fix larger\n  than the original commit is the spec having been wrong: say so and stop.\n\n## Stages 5 and 6 · Ship and report\n\n**Read `ship.md` in this skill's directory now.** What a skipped read must not lose:\n\n- `kit gate ship`, then push. The fix for a red pre-push hook is the failing check,\n  never `--no-verify`.\n- The body is written to a file and checked with `kit pr-body \u003Cfile>` before\n  `gh pr create`: at most **2000 characters of prose** and **600 per section**. Cut,\n  do not relocate. Its last line is the lane marker, `\u003C!-- funnel: direct -->`,\n  `\u003C!-- funnel: risk -->` or `\u003C!-- funnel: trivial -->`; a hook refuses a body\n  without it.\n- `kit board in_review --issue \u003Cissue>` after the URL exists, never `done`, then\n  `kit worktree gc --yes`.\n- The report is six items in at most 600 characters of prose, then `kit context`.\n  Never declare done without the gate count and the review rounds.\n","# task: one task, from description to draft pull request\n\nYou run the funnel **and you write the code**. Agents read: a premise check before a\nrisky change, a test writer that works before the code exists, a reviewer and a\nverifier after it. None of them writes production code, and none of them approves\nwhat you wrote.\n\nInput: the task description or issue number after the command. Empty → ask which\ntask and stop.\n\nThree files sit next to this one and are **not** loaded with it. `review.md` is stage\n4 in full and `ship.md` is stages 5 and 6, each read when its stage starts. `evidence.md` is the\nmeasurement behind every rule here that reads as arbitrary; open it when you are about\nto disagree with a rule or adapt the funnel to a repository it was not written\nagainst, never to run a task.\n\n## The repo describes itself\n\nNothing in this skill knows your paths, commands or board. All of that is in\n`.claude\u002Ffunnel.config.json`, read through `kit`:\n\n```\nkit doctor                     # is this machine and this repo ready\nkit config get .base           # the base branch\nkit config gates ship          # which gates a stage runs\nkit lane src\u002Fbilling\u002Ffee.ts    # direct or risk, from the repo's risk.paths\nkit review                     # the review plan for this branch's lane\n```\n\nIf `kit` is not on PATH or cannot run, use `${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fkit` for the\nwhole task, written as that absolute path wherever a file or a dispatch says `kit`,\nbecause a Bash call keeps no alias. No config: `kit config init`, then `kit config check`.\n\n## Before stage 0: is this skill the one that shipped\n\n```\nkit version 0.21.0\n```\n\nThe literal is the version this file shipped in (`evidence.md` &middot; *Stale kit*).\n\n- **STALE SKILL**: this skill was loaded from a directory newer than the installed\n  `kit`. Use `${CLAUDE_PLUGIN_ROOT}\u002Fscripts\u002Fkit` for the whole task and carry on.\n- **STALE KIT**: run the `kit setup` line it prints, then carry on.\n- **`unknown subcommand: version`**: a `kit` older than 0.3.0. Run `kit setup` from the\n  newest copy under `plugins\u002Fcache\u002F*\u002Ftask-funnel\u002F`.\n- Anything else: carry on without mentioning it.\n\n## Rules that hold for the whole funnel\n\n- **The repo's own pipeline document wins.** `kit config get .docs.pipeline` names\n  it. Where it and this skill disagree, that document is right.\n- **Verification is inside the loop, and it is the repo's gate.** Every change to\n  source is followed by `kit gate \u003Cstage>` before you report it, never by a bare\n  `tsc` or `vitest`: the gate carries the environment the repo needs (a heap size, a\n  flag) and leaves a receipt. A Stop hook refuses to end a turn that changed code in\n  a funnel checkout without one, and a guard refuses a gate's tool run without its\n  environment.\n- **Full spec in every dispatch.** A subagent inherits none of your context. Every\n  prompt carries objective, file scope, prohibitions and acceptance criteria, the\n  prohibitions always including: _you are one stage inside the task funnel; do not\n  invoke the task or investigate skills yourself_.\n- **Never write a `model` field into a dispatch.** Every agent declares its model in\n  its own frontmatter, and a `model` in the Agent input silently overrides it. The\n  only exception is a `model:` line `kit review` printed (`evidence.md` &middot; *The\n  model of a dispatch*).\n- **The writer never approves their own work.** You write; review runs in clean\n  agents that did not.\n- **Never merge.** The funnel ends at the draft pull request.\n- **An inherited claim is not a fact.** A triage finding carried into the spec is\n  marked **MEASURED**, with the command that proved it, or **INFERRED**, and whoever\n  writes an INFERRED claim into code measures it first.\n- **Everything the funnel writes is English**: branch, commits, pull request, code,\n  comments, dispatches. Talk to the user in their language.\n- **A code comment says why, in at most two lines.** No ticket key, pull request\n  number, date or count.\n- **A new issue is the last resort, and never an orphan.** Before creating one, run\n  `kit issues related \"\u003Ctitle>\" --files a.ts,b.ts --parent \u003Cepic>`; two distinctive\n  files in common means it is the same work. If you create it, link it to a parent\n  (`evidence.md` &middot; *Orphan issues*).\n- **One task per session on the risk lane.** You write the code now, so the session\n  carries the task's whole context, and the next task should not inherit it. After the\n  report, say `\u002Fclear` is the next step.\n- **Compact at a boundary, by prefix size, and always before a long pause.**\n  `kit context` prints **HOLD** below 120k tokens in context, **AT THE NEXT BOUNDARY**\n  from 120k to 300k, **NOW** above 300k, and **LATE** below 15% of the window free\n  (`evidence.md` &middot; *Prefix rewrite*, *A pause is the expensive moment*).\n\n## Stage 0 · Pre-flight and the lane, read-only\n\n- `kit doctor`. A missing `project` scope or an invalid config is cheaper to find now.\n- Issue number known → run the pre-flight the pipeline document prescribes for picking\n  up an issue. An existing remote branch may mean the issue is taken, abandoned or done.\n- `git status` clean, including your own edits.\n- No worktree yet: the environment is paid for after the spec says the task is real.\n- **Which lane.** Answered here, before anything is dispatched, because the risk lane's\n  first step is already its most expensive question (`evidence.md` &middot; *The\n  triage floor*).\n\n### Three lanes, decided by what the change can break\n\n**Not a line count.** One line in an auth guard is the most dangerous change in the\nrepository and thirty lines of copy are nothing, so size is the wrong axis. The axis is\nwhich surface moves:\n\n| Surface | Examples of it moving | Lane |\n| --- | --- | --- |\n| Money, permission, tenancy | anything a customer is charged, refused or shown | risk |\n| Data | a migration, a write path, a query's scope, a cache key | risk |\n| Contract | a signature, route, schema or exported type another module reads | risk |\n| Behaviour | a new branch, a new state, an order of operations, a cap or a retry | direct |\n| Published prose | a help entry, a policy, the assistant corpus, a public document | direct |\n| None of the above | a copy string, a config value, a comment, a typo, a rename in one file | trivial |\n\nThen ask the repo. `kit lane \u003Cthe files you expect to change>` prints `risk` when any\nof them matches the config's `risk.paths`, and a repo's list of risky paths outranks\nyour reading of the table: it was written by someone who knows which files bite.\nAfter code exists, `kit lane` with no argument reads the branch's own diff.\n\n- **direct** is the default: most tasks. You write a short spec, write the code, the\n  gates run, one reviewer reads it, a verifier checks each finding, and that is the\n  only review round.\n- **risk** buys the premise check, tests written before the code, five review lenses\n  and a second round that reads only the fix.\n- **trivial** is the direct lane without the review, for a change no reviewer would\n  have anything to read in.\n\n**Announce and proceed, without waiting.** Say in one line which lane and which\nsurface decided it, then run it. The user chose announce-and-proceed on 2026-08-18,\nover announce-and-confirm; naming the criterion is what lets them stop you.\n\n**Uncertainty goes up, never down.** If the table is arguable, take the higher lane:\na risky change on the direct lane ships a defect with a green report. Triage may raise a direct task to risk\n(the user says so, or the premise check finds a surface you missed); nothing lowers a\nrisk task except the triage verdict `DIRECT_LANE`.\n\n### What every lane runs\n\nThe lanes differ in who reads the change. They do not differ in the rails:\n\n| Step | Risk | Direct | Trivial |\n| --- | --- | --- | --- |\n| Stage 0 pre-flight | yes | yes | yes |\n| Board to in progress | yes | yes | yes |\n| Branch and worktree from the config | yes | yes | yes |\n| `kit gate` for the stage | yes | yes | yes |\n| Commit under the repo's convention | yes | yes | yes |\n| `kit gate ship`, push, draft pull request | yes | yes | yes |\n| Body under the `kit pr-body` budget | yes | yes | yes |\n| `kit board in_review`, `kit worktree gc --yes` | yes | yes | yes |\n| Premise check (triage) and spec approval | yes | no | no |\n| Tests written before the code, by an agent | yes | no | no |\n| Review rounds, each finding verified | 2 | 1 | 0 |\n\nAn issue already on the board is used and moved; the trivial lane never creates one,\nbecause a typo that opens an issue is backlog growth nobody decided on.\n\n### A repo on the lite lane\n\n`kit config get .lane` printing `lite`: run the direct lane for every task; on a risky\npath `kit review` adds the risk lenses to its one round.\n\n## The agents this skill dispatches\n\nEach dispatch names its agent, or it resolves to a general-purpose one without them:\n\n| Stage | Agent | Model | Lane | Carries |\n| --- | --- | --- | --- | --- |\n| 1 | `task-funnel:funnel-triage` | inherit | risk | the premise questions, the return shape, the invariant table |\n| 2 | `task-funnel:funnel-test-writer` | sonnet | risk | tests from the spec before the code, and proof each fails for its reason |\n| 4 | `task-funnel:funnel-reviewer` | sonnet | direct, risk | the reading discipline, Critical and Important only, NEW against PRE-EXISTING |\n| 4 | `task-funnel:funnel-verifier` | sonnet | direct, risk | refute each finding, and REAL only with a trace or a reproduction |\n| 4 | `task-funnel:funnel-screen-lens` | inherit | risk, when a screen moved | report only what you observed, and NOT PROVEN is not a pass |\n\n## Stage 1 · The spec\n\n### Direct and trivial: inline\n\nWrite it yourself in 3 to 5 lines: what, why, the files, the acceptance in one\nsentence a test can check, and a REVIEW FOCUS of the inputs likeliest to break it. For a bug, the acceptance is the failing test that\nreproduces it. A screen adds a SCREEN line: tokens and components reused, the sibling\nscreen copied, the states that apply. Show it with the lane announcement and continue.\n\n### Risk: the premise check\n\nOne dispatch to `funnel-triage`, structured return, even when the user hands you a\nspec already approved: approval settles what to build, and the premise check measures\nwhether the code is what the request assumes. The gate reads `VERDICT` first:\n\n- `PROCEED` → show the user the spec in 5 to 10 lines, with the PREMISE block, and\n  **wait for approval**, unless the user already approved this spec and the PREMISE\n  block contradicts nothing in it. This is the one question the funnel keeps, because a spec that\n  is wrong makes every later stage correct against the wrong thing.\n- `DIRECT_LANE` → the premise holds and no risky surface moves. Say so in one line with\n  what triage checked, and run the direct lane on the spec it returned. Do not\n  re-dispatch triage to get a different answer, which is US$ 2.46 spent to disagree\n  with the first one.\n- `NEEDS_DECISION` or `BLOCKED` → stop and present the evidence. AskUserQuestion when\n  the alternatives are objective.\n- `ALREADY_DONE` → stop and show the commit or the code.\n\n`NEEDS_DECISION` answered by an investigation → **stage 1 does not run again**: write\nthe spec from the investigation's child issue, run stage 0 against its number, and go\nto stage 2 (`evidence.md` &middot; *Paying triage twice*).\n\n`PROCEED` with no issue yet → open one the way the pipeline document says, and re-run\nthe stage 0 pre-flight against its number.\n\n### Invariants, not only criteria\n\nOn the run this funnel was first measured on, three of four review rounds went to one\nrule nobody had written down (`evidence.md` &middot; *One invariant, found three\ntimes*). So the spec names them up front, on every lane:\n\n| Scope in the spec | The invariant it carries |\n| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| **Money** | every path that spends records the spend, **including the one that throws**; a cap sums an aggregate, never a rounded per-row value |\n| **External call** | every new call has a timeout and a `catch`; the `catch` logs what was lost, because a silent `return { status: 'failed' }` is no handler |\n| **Untrusted inbound** | the response code is chosen for the sender, not for us; a path that always answers 200 must not be the path that swallows a retry |\n| **Prose it touches** | any comment, document or knowledge entry the change **falsifies** moves in the same commit, not only the ones it adds |\n\nToo big for one reviewable pull request → present the slices and stop.\n\n### Self-review, inline, before you show the spec\n\nNot a subagent. Ask yourself, in writing:\n\n1. Which acceptance criterion cannot be checked by a command or a test?\n2. Which file in scope has no criterion attached, and which criterion has no file?\n3. Which invariant above applies and is not stated?\n4. What would make this \"the spec was wrong\" rather than \"the code was wrong\"?\n\n## Stage 2 · The worktree, and on the risk lane the tests\n\n**Risk lane: no worktree without a `funnel-triage` VERDICT from this task.** Measuring\nthe bug yourself is not it: the premise check is a reader that did not write the\nspec, and a spec the user approved in the request does not skip it.\n\n```\nkit worktree add \u003Cissue, or 0 without one> \u003Cslug> --kind \u003Cfeature|bug|refactor|chore>\nkit board in_progress --issue \u003Cissue>\n```\n\nThe board moves right after the worktree exists, so no other cycle picks the work up.\n\n**A refused git step is reported, never inferred.** Run `kit worktree add` even when a\nprobe says git is read-only. If it, or `git switch -c`, is refused, still write the\nchange with the Edit tool (a failed `touch` proves nothing about Edit), run the gates,\ncommit nothing to trunk, and name each refused step with its error in the report.\n\n**Risk lane: the tests come first.** Dispatch the spec, including its INTERFACE line,\nto `funnel-test-writer`, working in the worktree. It writes the tests from the\nacceptance criteria and the invariants, runs them, and commits them failing.\n\n**GATE**: every new test fails, and for the reason its criterion names (an assertion on\nthe value, or the missing export the INTERFACE declares). A test that passes before the\ncode exists asserts nothing about the change; send it back once, with the test named.\n\nTests from an agent that never saw the code were correct 88% of the time, against 61%\nfor the agent testing its own (`evidence.md` &middot; *Tests before the code*).\n\n**Direct lane**: you write the tests, and for a bug the reproduction comes first:\nwrite it, watch it fail, then fix.\n\n## Stage 3 · Implement, in this session\n\nWrite the change in the worktree, against the spec.\n\n**The least code that fully meets the spec.** Having read the code the change touches,\ntake the first option that holds: nothing needs to change; it already exists in this\nrepo; the standard library or the platform does it; an installed dependency does it;\nonly then the smallest new code, with its test. Every added line is read by every\nreviewer (`evidence.md` &middot; *Less code to read*). Never smaller than the spec, and\nnever cut: validation at a trust boundary, data-loss handling, security, accessibility,\nthe repo's structure and house components, or the tests (*The ladder's floor*).\n\n**A bug is fixed where it lives.** Before the fix, grep every caller of the function at\nfault, and the report names each by `file:line`; a defect in shared code is fixed once there, never in the caller that reported\nit (*Root cause*).\n\n**A screen moved** (a file under `.browser.screenGlobs`): read `screen.md` in this\nskill's directory before writing it, on every lane, and run `kit design`.\n\nOn the risk lane, the goal is the\ntest writer's tests passing **without editing them**: a test that looks wrong is a\nspec question, raised with the user, not an edit. The `protect-tests` hook refuses the\nusual ways a suite gets faked.\n\n**GATE**: `kit gate implement_first_pass`, then the work **committed** per the repo's\ncommit convention. The review diffs commits, so uncommitted work is invisible to it.\n\n**A red gate is not automatically your defect.** `kit gate` prints a `flake` line when\na failing file is on the config's quarantine list, and says whether this branch's diff\ncan reach it. A red gate in a file the diff never touched is a re-run of that file, not\na fix. A gate that stays red after two honest attempts is a report, with the output.\n\nOn a doc-only scope the worktree has no dependencies installed, so no gate command can\nrun. The gate is then the commit alone.\n\n## Stage 4 · Review, counted by `kit`\n\n```\nkit review                       # this branch's lane, first round\nkit review --since \u003Csha>         # risk lane only: the fix round\n```\n\n`kit review` decides the lane from `risk.paths` and prints `lane, round N of M`;\n`kit review risk` or `kit review direct` passes on a lane triage or the user decided.\n**The cap is counted, not remembered**: one round on the direct lane, two on the risk\nlane, and a further `kit review` on a new head is refused (`evidence.md` &middot;\n*Rounds without a counter*). Only the user buys another round, with `--reset-rounds`.\n\n### Before the dispatches go out\n\nRead `review.md` in this skill's directory now. What a skipped read must not lose:\n\n- **Each printed block goes verbatim to its own `funnel-reviewer`**, plus what the\n  change is for, the acceptance criteria, the spec's INVARIANTS, CONSTRAINTS and REVIEW\n  FOCUS verbatim, what was left out, and from round 2 the `ALREADY DECIDED` list.\n  Never an instruction about what not to flag.\n- **The browser half runs only on the risk lane, when `kit screens --preflight` prints\n  `ready`**, one screen lens at a time, with the app brought up by you.\n- **Every finding goes to `funnel-verifier`**, one dispatch per round. REAL is fixed,\n  REFUTED dropped, PRE-EXISTING goes to the body as one line.\n- **REAL findings are fixed in this session, all in one pass**, then\n  `kit gate implement_fix_round` and one commit.\n- **The direct lane stops there.** The risk lane runs `kit review --since \u003Cthe sha\n  round 1 reviewed>` once, through the verifier the same way.\n- **At the cap every open finding gets a written decision** in the body; a fix larger\n  than the original commit is the spec having been wrong: say so and stop.\n\n## Stages 5 and 6 · Ship and report\n\n**Read `ship.md` in this skill's directory now.** What a skipped read must not lose:\n\n- `kit gate ship`, then push. The fix for a red pre-push hook is the failing check,\n  never `--no-verify`.\n- The body is written to a file and checked with `kit pr-body \u003Cfile>` before\n  `gh pr create`: at most **2000 characters of prose** and **600 per section**. Cut,\n  do not relocate. Its last line is the lane marker, `\u003C!-- funnel: direct -->`,\n  `\u003C!-- funnel: risk -->` or `\u003C!-- funnel: trivial -->`; a hook refuses a body\n  without it.\n- `kit board in_review --issue \u003Cissue>` after the URL exists, never `done`, then\n  `kit worktree gc --yes`.\n- The report is six items in at most 600 characters of prose, then `kit context`.\n  Never declare done without the gate count and the review rounds.\n",{"name":5,"description":7},"main","2bbd85f0592bea6a207bd6cbf1909835a911585b","skills\u002Ftask",0,"https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel","https:\u002F\u002Fwww.gbstec.dev.br\u002F","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim","https:\u002F\u002Fwww.gbstec.dev.br","Senior Full Stack Engineer | AI & LLM-powered products | TypeScript, React, Next.js, Node.js","2026-11-14 01:22:50",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add gabrielbsandim\u002Ftask-funnel --skill task",{"tool":40,"command":41},"bunx","bunx skills add gabrielbsandim\u002Ftask-funnel --skill task",{"tool":43,"command":44},"pnpm","pnpm dlx skills add gabrielbsandim\u002Ftask-funnel --skill task","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Ftask\u002FSKILL.md",true,[48,54,58,62],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"evidence.md","REFERENCE","参考文档",34268,"https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Ftask\u002Fevidence.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"review.md",14218,"https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Ftask\u002Freview.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"screen.md",3381,"https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Ftask\u002Fscreen.md",{"path":63,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":64,"sourceHtmlUrl":65},"ship.md",3959,"https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Ftask\u002Fship.md",[67,74,81,88,95],{"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},"01M7ARP4Q4APYNW2EX2XG1X44B","ship","Takes work that is already implemented and committed on a branch and ships it: runs the repo's ship gates off receipts, pushes, opens a draft pull request, moves the board to in review, and removes the worktree. Use when the code exists and the task is to get it reviewable, or on \u002Fship, and not when anything still needs writing.","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Fship\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},"01M7ARNVGW2CKNWHRVXT06RJPZ","review","Reviews a diff, branch, commit or pull request this session did not write and returns only the Critical and Important findings that survive an attempt to refute them, each with the input and the wrong output. Use when asked, in any language, to review, check or look over a diff, a branch, a commit or a pull request, or on \u002Freview. Not for a change the task funnel is writing: it reviews that with its own agents.","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Freview\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},"01M7ARNQD9MMEEBEPCZG7JQ035","note","Writes one durable fact into a markdown knowledge vault, with the frontmatter and the provenance that keep it checkable, then reindexes so search can find it. Use when something learned in a session has to outlive it, or on \u002Fnote \u003Cthe fact>, and not for what the repo already records.","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Fnote\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7ARNGRFNRF4K0VHR4D7NS1Q","investigate","Investigation flow. Takes a question about the system (why does X happen, where does Y live, is Z feasible, what broke) and returns a verified written answer with evidence. Read-only end to end, no branch, no code change, no pull request. Use when asked to investigate, diagnose, explain behaviour or assess feasibility, or on \u002Finvestigate \u003Cquestion>.","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Finvestigate\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7ARNCBN087J3EYW7TXNCKJZ","backlog","Grooms an open backlog before the next task is picked: finds issues that are the same work, adopts orphans into the epic they belong to, and proposes what can ship in one pull request. Read-only until the user approves each move. Use when the board feels like it only grows, before planning a sprint or picking the next issue, or on \u002Fbacklog [epic-number].","https:\u002F\u002Fgithub.com\u002Fgabrielbsandim\u002Ftask-funnel\u002Fblob\u002Fmain\u002Fskills\u002Fbacklog\u002FSKILL.md",[],[]]