.stencila/skills/software-slice-selection/SKILL.md
Mark the just-completed slice or slice batch (if any), update the completed slices list, select the next unfinished execution unit from a delivery plan based on phase ordering and dependency constraints, and report whether more slices remain. Determines slice exhaustion, not full plan completion — does not verify plan-level Definition of Done items. Combines completion tracking with next-work selection in a single step. Reads plans from .stencila/plans/, parses phase and slice structure, validates package references against the codebase, and can normalize overly narrow plan slices by combining adjacent compatible slices into one execution unit.
npx skillsauth add stencila/stencila software-slice-selectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Mark the just-completed slice or slice batch (if any), update the completed slices list, and select the next unfinished execution unit from a software delivery plan stored in .stencila/plans/. Given a just-finished slice name and a list of already-completed slices, append the finished slice or slices, identify the next unit of work to execute based on phase ordering and dependency constraints, validate its package references against the codebase, and report the unit details along with the updated completed list. If all slices are complete, report that no slices remain.
This skill determines slice exhaustion — whether there are more execution slices to select — not full plan completion. Many plans include a ## Definition of Done section with plan-level closure checks (e.g., all tests passing, linting clean, generated types updated, documentation complete). This skill does not evaluate those checks. When all slices have been selected and completed, the skill reports that no slices remain, but the caller must verify Definition of Done items separately before treating the plan as finished.
This skill reads a plan file, parses its structure, tracks completions, and determines what comes next. It does not write code, create tests, modify the plan, or manage any external state beyond reporting its findings. It also acts as a normalizer of planning granularity: plan-authored slices are advisory, and the selected execution unit may consist of one slice or several adjacent compatible slices when that would reduce workflow overhead without creating an unmanageably broad TDD loop.
| Input | Required | Description | |---------------------|----------|--------------------------------------------------------------------| | Just-completed slice | No | The slice name that was just completed (empty on first invocation) | | Completed slices | No | A list of slice names already finished (empty if starting fresh) | | Plan name or goal | No | Which plan to read (defaults to the only or most recent plan) |
When used standalone, these inputs come from the user or the agent's prompt. When used within a workflow, the workflow's stage prompt will specify how to obtain them.
| Output | Description | |--------------------------|----------------------------------------------------------------------------------| | Updated completed slices | The completed slices list with the just-finished slice or slices appended (if provided) | | Selected slice name | The selected execution unit name or identifier, or a signal that no slices remain | | Included slices | The underlying plan slice identifiers covered by the selected execution unit | | Scope | A concise description of what the selected execution unit covers | | Acceptance criteria | The criteria for the selected execution unit | | Packages | The packages, crates, modules, or directories involved | | Status | Whether an execution unit was selected (more slices remain) or no slices remain (slice exhaustion, but not necessarily plan-level Definition of Done)|
Mark the just-completed slice or slice batch (if provided):
Locate the delivery plan:
glob with pattern .stencila/plans/*.md to discover available plansread_file to load the full plan contentParse the plan structure:
## Definition of Done section. Record its presence for use in the final reporting step, but do not convert Definition of Done items into slicesDetermine which slices are already completed:
Select the next unfinished execution unit:
Validate package references against the codebase:
glob and grep to verify that the packages, crates, or directories mentioned in the slice actually exist in the workspaceReport the selected execution unit:
Phase 1 / Slice 2 for a single slice, or Phase 1 / Slices 2-3 for a combined unit)All slices complete:
## Definition of Done section, include a note: "All execution slices are complete. The plan includes a Definition of Done section — verify those plan-level completion checks separately before treating the plan as finished."## Definition of Done section, include a note: "All execution slices are complete. Verify any plan-level completion criteria separately before treating the plan as finished."Always end your response with a structured report using exactly these labeled fields so the caller can reliably extract each value:
Updated completed slices: <comma-separated list, or "(none)" if empty>
Slice name: <selected slice identifier, or "ALL SLICES COMPLETE" if no slices remain>
Included slices: <comma-separated list of exact plan slice identifiers included in the selected execution unit; use "(none)" only when Slice name is "ALL SLICES COMPLETE">
Scope: <concise scope description>
Acceptance criteria: <the criteria for this slice>
Packages: <comma-separated list of packages, crates, or directories>
Status: <"more work remains" or "all slices are complete">
When all slices are complete, omit the Scope, Acceptance criteria, and Packages fields and set Included slices to (none). Include a Definition of Done note if the plan has one:
Updated completed slices: Phase 1 / Slice 1, Phase 1 / Slice 2
Slice name: ALL SLICES COMPLETE
Included slices: (none)
Status: all slices are complete
Note: All execution slices are complete. The plan includes a Definition of Done section — verify those plan-level completion checks separately before treating the plan as finished.
Narrative explanation or warnings (e.g. stale package references) may precede the structured block, but the block itself must always appear last and use the exact field labels above.
When the selected execution unit consists of a single plan slice, the Included slices field should contain just that one slice identifier. When the selected execution unit combines several adjacent plan slices, the Slice name should be a concise synthesized label and Included slices must enumerate the exact underlying plan slices in execution order. Do not use ranges, abbreviations, or paraphrases in Included slices; use the exact deterministic slice identifiers that should be added to completed_slices once the unit is accepted.
Slices are identified using a combination of phase and slice number or name. Use a consistent naming scheme:
Phase 1 / Token parsing validationPhase 1 / Slice 1Phase 1 / Task 1Consistency matters because the names produced here may be used later to track completions — the name must be deterministic and reproducible for the same plan input.
Plan has Phase 1 (3 slices) and Phase 2 (2 slices). No just-completed slice. No completed slices provided.
Action:
Just-completed slice: "Phase 1 / Slice 2". Completed slices: "Phase 1 / Slice 1".
Action:
Plan has Phase 1 / Slice 1 = add parser tests, Phase 1 / Slice 2 = add parser implementation, and Phase 1 / Slice 3 = add parser error formatting. Slices 2 and 3 both affect the same module and are both small.
Action:
Phase 1 / Slice 2Phase 1 / Slice 3 because both are small, contiguous, same-package changes with no meaningful review boundary between themJust-completed slice: "Phase 1 / Slice 3". Completed slices: "Phase 1 / Slice 1, Phase 1 / Slice 2".
Action:
Just-completed slice: "Phase 2 / Slice 2". Completed slices: "Phase 1 / Slice 1, Phase 1 / Slice 2, Phase 1 / Slice 3, Phase 2 / Slice 1". The plan contains a ## Definition of Done section.
Action:
["Slice A", "Slice B"]). Write back in whichever format was read, defaulting to comma-separated if starting fresh.documentation
An agent skill providing instructions for AI agents.
testing
Critically review a Stencila workflow and suggest improvements. Use when asked to review, audit, critique, evaluate, or improve a workflow directory or WORKFLOW.md file. Covers frontmatter validation, DOT pipeline quality, workflow structure, agent selection quality, discovery metadata, ephemeral workflow conventions, workflow composition, and adherence to Stencila workflow patterns.
development
Create a new Stencila workflow. Use when asked to create, write, scaffold, or set up a workflow directory or WORKFLOW.md file. Covers workflow discovery, duplicate-name checks, ephemeral workflows, WORKFLOW.md frontmatter, DOT pipeline authoring, goals, agents, branching, composition, and validation.
development
Critically review an existing or proposed Stencila theme artifact for correctness, token usage, target coverage, cross-target portability, dark-mode handling, maintainability, and approval readiness. Use when asked to review, critique, assess, audit, or validate a theme.css file, theme patch, theme plan, site theme, document theme, plot theme, print or PDF theme, check design tokens, assess DOCX or email behavior, review dark mode support, or validate with stencila themes validate.