com um clique
cwf-new-subtask
Create sub-implementation task within existing task (v2.0)
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Create sub-implementation task within existing task (v2.0)
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Guide user through planning phase
Guide user through implementation execution phase
Guide user through maintenance phase
Guide user through retrospective phase
Guide user through rollout phase
Guide user through testing execution phase
| name | cwf-new-subtask |
| description | Create sub-implementation task within existing task (v2.0) |
| user-invocable | true |
| allowed-tools | ["Read","Write","Bash"] |
This step: Create a subtask within an existing parent task, on its own git branch. Not this step: Planning, design, or implementation of the subtask.
Task arguments: {arguments}
First: Run .cwf/scripts/command-helpers/context-manager location using the Bash tool to confirm git root.
Mandatory context (run these before proceeding):
.cwf/scripts/command-helpers/context-manager hierarchy <parent-path> using the Bash tool to resolve parent task directory and verify it exists..cwf/scripts/command-helpers/context-manager inheritance <parent-path> using the Bash tool to load parent context (structural map for scope constraints).Parse arguments: <parent-path> <num> [<type>] "description"
Disambiguation rule: if the token between <num> and the quoted
description matches a value in cwf-project.json:supported-task-types,
treat it as <type> and proceed with the existing 4-arg flow (no
inference). Otherwise <type> is treated as omitted and Type Inference
runs. To use a bare type-name word as the description, provide <type>
explicitly.
Examples:
/cwf-new-subtask 1 1.1 chore "Setup database schema" (explicit type)/cwf-new-subtask 1 1.2 "Refactor auth helpers" (type inferred)<type> is omitted)When <type> is not supplied, infer it before validation:
.cwf/docs/skills/task-type-inference.md using the Read tool.S, always including the
always-required steps the rubric names.T listed in the rubric's Canonical Step
Sets table, compute the symmetric-difference distance
|S Δ C_T| between S and the canonical step set C_T of T.0, use it silently as the
resolved <type> and continue to step 1 of the normal flow.
Otherwise show the rubric's Ambiguity Prompt Format with the top
candidates, let the user pick, and use the picked type. Cancel
(no directory, no branch) on any non-numeric or out-of-range
response.If the rubric file is unreadable, or the minimum distance across all
candidate types is >= 3, refuse the 2-arg form and tell the user to
rerun with explicit <type>. No directory creation, no branch
checkout in either failure path.
context-manager hierarchy <parent-path> output to find parentcontext-manager inheritance <parent-path> output for structural mapnum follows hierarchical pattern from parent--description raw to the script (same handling as /cwf-new-task — script slugifies and rejects descriptions whose slug exceeds 50 chars with [CWF] ERROR:)implementation-guide/48-feature-parent/48.1-bugfix-slug/)task-workflow create to whatever HEAD
is at invocation time. To pin a specific non-HEAD baseline, pass
--baseline-commit=<40-char-sha> explicitly; otherwise omit the flag.task-workflow create with --destination pointing inside parent dir{{parentTask}} to parent task numbergit checkout -b "<type>/<num>-<slug>"
<num> is the subtask's full decimal (e.g. 48.1); reuse the slug from the directory Step 3
created — do not re-derive it. Branches off the current parent-branch HEAD, so the parent
branch is an ancestor of the subtask branch — the precondition the retrospective's ff-merge
back into the parent relies on.
Create this subtask's scratch leaf. It reuses the same per-project parent
as every other task in this repo, with its own task-<subnum>/ leaf. The
CWF PATHS block injected into context each turn already carries that scratch
parent — do not derive it. Append task-<num> (this subtask's full decimal
<num>, e.g. 48.1) as a literal and create it, substituting the injected
scratch path into an all-literal command (no $/substitution, so it does
not prompt):
mkdir -m 0700 -p <injected-scratch-parent>/task-<num>
Non-fatal: a failed mkdir must NOT block subtask creation; do not print
the path as if it exists on failure.
/cwf-task-plan <num>