AGENT SKILL

slice

Split an agreed design into ordered, PR-sized slice tickets under a container ticket in Linear. Drafts the tickets, checks them, creates them in order, and reports the layout. Use it for "slice this design", "plan the slices", "break this into sub-tickets", or "plan this as PR-sized pieces". It does not split existing commits or a finished branch.

License 许可
MIT
所属仓库
sQVe/tau
最近更新
2026-11-13
Stars
★ 3
Forks
0

01 前言 Front Matter

name
slice
metadata
{ "required-for": "creating or re-planning slice sub-tickets for a design in Linear" }
description
Split an agreed design into ordered, PR-sized slice tickets under a container ticket in Linear. Drafts the tickets, checks them, creates them in order, and reports the layout. Use it for "slice this design", "plan the slices", "break this into sub-tickets", or "plan this as PR-sized pieces". It does not split existing commits or a finished branch.

02 资源文件 1

03 SKILL.md 正文

Slice

When to use

Use this skill to plan an agreed design as slices in Linear. Each slice becomes one branch and one PR. Run it again on the same design to change the plan. It needs the linear CLI authenticated for the workspace.

Do not use it to guide the design conversation, or to split commits or a branch that already exist.

Goal

The container ticket holds a short summary and one line per key decision. Each slice holds the design it follows in its Design section. The container has one sub-ticket per slice, in order, with blocked-by relations only for real dependencies.

Hard rules

  • Follow the tracker skill's Hard rules.
  • Do not create agent tickets, start a slice, create branches, or stack PRs. Change no ticket's status, except cancelling a dropped slice after the user approves it in step 8. Never change or reorder a merged slice.
  • Use the slice tool for the draft directory, for reading the container and its slices, and for every write to them other than a cancellation. Save drafts only in the directory the tool returned last, since apply moves the draft after it creates the container.
  • If apply fails, stop and report the steps it applied and the steps it did not. Before any retry, follow the tool's recovery steps for that error, including a ticket whose identifier was not saved.

Procedure

  1. Read the design from the Linear ticket, file, or conversation the user names. For a ticket, run linear issue view <id> --json --no-pager. When the user names no source and no container exists, read design.md in the draft directory that step 2 returns, such as one the brainstorm skill wrote. Once plan.json records a container identifier, read the design from Linear and ignore later edits to design.md. Route the container and its slices with the tracker skill, which stops when an existing container is in another team or project. Ask no question about whether the design is agreed.

  2. Read the current state. Call slice with prepare, then with read.

    • Use the draft it returns as the last plan, and the container's description and children as Linear now, even when the design came from elsewhere.
    • Show each entry in problems and ask the user how to resolve it. Never call apply while problems is not empty.
  3. Follow the decision evidence planning guidance before splitting the design into slices.

    • Each slice leaves main working and fits one review sitting, ideally a few hundred changed lines.
    • Make each refactor in the design's Structure an earlier groundwork slice. Put new helpers the behavior needs in an earlier slice too.
    • Prefer thin slices that deliver real behavior over layers that deliver nothing until the last one.
    • Use one slice only when the work cannot split, and say why. Then the ticket is the slice, and there is no container.
    • Mark a slice blocked-by another only when it cannot work or merge without it.
    • Block the slice with a journey's last step by each other slice that delivers an earlier step.
    • Give every slice a title that no other slice in the plan uses.
  4. Write the draft in the directory, one body file per ticket. Before you write each new ticket, the container and every new slice, search for an open duplicate with the tracker skill.

    • container.md: the container's full description in the container template: a short summary and one line per key decision in ## Decisions, not the full design. For an existing container, keep all text outside the changed sections unchanged.
    • slice-<n>.md, numbered in plan order, in the slice template, with its rules and applicable record links in ## Design. Put each needed record or mechanical-check change in ## Acceptance.
    • plan.json: the route from the tracker skill, the container, and the slices in plan order. Keep the identifier of each ticket that exists, even when the plan renames or renumbers it.
    • plan.md: a readable summary of the plan: the container title, then each slice with its title, its blockers, and its goal. Change it whenever you change plan.json. apply reads only plan.json and the body files, so carry each change the user makes in plan.md there: a title or blocker into plan.json, keeping each identifier, and a goal into the ## Goal of the slice's body file.

    Carry each structure choice into the draft: a key decision, such as an owning module or a prerequisite refactor, gets a line in container.md; a rule for one slice, such as reusing an existing helper, goes in that slice's ## Design.

    Carry flows marked as a new journey or new steps of an indexed journey from ## Usage into container.md's ## Journeys. Write each whole planned journey once, using the QA-guide template's journey shape. Give each slice that delivers steps a normal journey acceptance item in the slice template's shape. The item for the last step also requires that the end state holds and the whole journey passes. No item asks for a planned step in the journey file or its test: they hold only the steps built so far.

    For a design with one slice, write ticket.md as the container's file, as the slice template describes, and list no slices. Keep each whole planned journey in that ticket's ## Design.

    Then call read again. Resolve its problems as in step 2.

  5. Check the plan.

    • Map each acceptance criterion of the design to the slice numbers that cover it. Map each refactor, record update, and mechanical-check change to the slice that delivers it, alongside that coverage. Map every journey step to its delivering slice. When any item or journey step has no delivering slice, change the draft and call read again. Do not proceed to apply until all are covered.
    • Judge each ## Acceptance item in the slice body files. An item passes when it names a test, a command, or a manual observation, with its expected result. When the design says what to check, rewrite the item and call read again. Before step 6, list each item that still names no check, with its body file, and tell the user it may reach a worker as a vague task. When every item passes, say nothing about it. The list never stops apply.
  6. Call slice with apply for the last read.

    • First follow the approval rule in the tracker skill's Procedure step 5 over plan.md and every body file plan.json names, such as container.md or ticket.md and the slice-<n>.md files. Pass plan.md first, then the container body, then the slice files in plan order. After a review, carry plan.md changes into the draft as step 4 says, call read again, and resolve its problems. Map the coverage again, and judge each acceptance item the review added or changed, as step 5 says.
    • When apply would write to a container or slice another person owns, it asks the user first and writes nothing if the user declines. Do not ask again with ask_user_question for those writes; the tool's confirm is the approval the tracker skill's Hard rules require.
    • When it says the state changed, call read again, resolve its problems as in step 2, and apply again.
    • When it returns declined, the user refused the writes or no user could answer: stop, and report that nothing was written.
    • When it returns unchanged, report that Linear already matches the plan.
    • When orderInPlace is false, report that the slice order is still wrong.
  7. Report what you wrote. Keep it to about 40 lines, and leave out raw commands and details of the local environment.

    • The Linear layout in the report template, with each ticket's identifier and URL, or the one ticket of a one-slice design.
    • When the slices branch or join, a flowchart TD of the blocked-by edges, drawn with the diagram skill as a top-level block after the tree. Keep the tree; it holds the status, size, and scope a flowchart cannot.
    • One line of reason for each dependency, or missing dependency, that is not obvious.
    • Each acceptance criterion of the design, with the slice numbers that cover it.
    • Each choice in the decisions or slice designs that the agreed design did not already state, one line each, and the path of the draft that holds it. For an existing container, say that the text outside the changed sections stayed unchanged.
    • On a later run, each write from the applied list that apply returned, including blocked-by relations added and removed and each move of an existing slice into plan order. apply finds some of those moves only after its updates, so the writes of the last read do not list them.
  8. Ask with ask_user_question which dropped slices that are not merged or completed to cancel, by identifier and title. A dropped slice stays in Linear until it is cancelled. Cancel the chosen ones with the tracker skill, and report which were cancelled and which were kept. This selection follows the approval rule in the tracker skill's Procedure step 5 over plan.md. When the comments or edits change the plan, return to step 6 to apply it before you cancel.

04 同仓库更多 Skills