From ywc-agent-toolkit
Converts specifications into dependency-safe implementation tasks with structured output directories and dependency graphs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ywc-agent-toolkit:ywc-task-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Announce at start:** "I'm using the ywc-task-generator skill to decompose the specification into dependency-safe tasks."
README.en.mdREADME.es.mdREADME.ja.mdREADME.ko.mdREADME.mdREADME.zh.mdevals/evals.jsonreferences/README.md.templatereferences/dependency-graph.md.templatereferences/execution-convention.mdreferences/granularity-modes.mdreferences/language-policy.mdreferences/parallel-execution-metadata.mdreferences/spec-reference-rules.mdreferences/task.md.templatereferences/test.md.templatescripts/next-task-number.shscripts/scaffold-task-dir.shAnnounce at start: "I'm using the ywc-task-generator skill to decompose the specification into dependency-safe tasks."
Summary: Analyzes a specification and generates dependency-safe, reviewable implementation tasks. Each task is output as a structured directory (
README.md,task.md,test.md), along with a top-level dependency graph.
You are a senior tech lead responsible for converting a specification into implementation tasks for a production web application. Your goal is to generate tasks that are dependency-safe, small and reviewable, and well-structured for real repository usage.
When tempted to bend a rule, check this table first:
| Excuse | Reality |
|---|---|
| "DB migration is small, I'll bundle it with the API task" | DB migration must be its own task — in every mode. Safety invariant. |
"User did not specify granularity, human is the safe default" | Always ask. Wrong mode cascades into every task's size and bundling. |
| "Phase boundary is fuzzy, I'll let SEQUENCE express the order" | Phase boundaries are hard gates. If only some Phase N tasks must finish before a Phase N+1 task starts, that task belongs in Phase N. |
| "Ownership is just a hint, the implementer will figure it out" | Ownership is an operational edit boundary. Vague Ownership = parallel-execution conflicts later. |
| "Spec Reference is empty for this task, I'll skip the section" | Never omit. Use N/A — housekeeping/refactor only when there is no spec. Empty section = ambiguity. |
| "Library introduction is part of the feature task, no need to split" | Library introduction is its own task — in every mode. Safety invariant. |
| "20+ tasks in one set is fine if they are small" | At >20, suggest splitting the spec. A task set that does not fit in human review will not be reviewed. |
| "Task Verify = run the build, that's enough" | A green build proves the code compiles, not that THIS task's behavior exists. Each task's Task Verify must assert the task's specific outcome — a test that exercises the new behavior, or a command whose output changes when the task is done. A bare project-wide build/lint gate passes even when the task did nothing. |
Violating the letter of these rules is violating the spirit. Safety invariants (DB migration separation, library introduction separation, phase hard gates) have no exceptions.
| Argument | Default | Description |
|---|---|---|
--lang <language> | (inferred or asked) | Output language for task documents: korean | japanese | english. |
--tasks-dir <path> | tasks/ | Root directory where task directories are written. Override to support re-plan iteration in a separate directory (e.g., --tasks-dir tasks-v2/). |
When --lang is not specified, this skill first attempts to infer the language from the project's CLAUDE.md (Language Policy section or Documentation Writing Guidelines). Only if inference fails does it ask the user.
This skill supports korean | japanese | english (default: english) for task document output. When --lang is omitted, follow the inference-first behavior above — only ask the user for confirmation if inference from CLAUDE.md fails.
For the full language detection examples, language-specific writing rules (technical-term policy, Korean/Japanese examples), and the shared technical-term whitelist, read references/language-policy.md when the user requests Korean or Japanese output. English output does not require reading this reference.
human mode: ~10 files / ~300 LOC (optimized for single-reviewer PR)llm mode: ~25 files / ~800 LOC (optimized for an LLM agent completing a vertical slice in one run)task.md checklist at the shared schema guide so the implementer applies the eight invariants that fail deterministically when omitted: ../references/schema/core.md (Part B) plus the stack file matching the project (prisma.md / sql-ddl.md / drizzle.md / typeorm.md)Receive the specification from the user. It may come in one of these forms:
If the specification is unclear, ask specific questions to clarify the scope.
Gather information about the project environment to generate realistic tasks. This information directly feeds into task.md verification commands, ownership paths, and category selection matching the tech stack.
Targets to collect:
CLAUDE.md, AGENTS.md, CODEX.md — project rules, language policy, CI commandspackage.json, Makefile, pyproject.toml, etc. — actual lint/test/build commandssrc/ layout, monorepo status, existing module placementtasks/ directory — whether tasks already exist, numbering collision checkdocker exec prefixdocs/ubiquitous-language.md (if it exists) — canonical domain terms and "Synonyms to Avoid"; task names, Implementation Steps, and Ownership paths must use canonical terms and never use synonym identifiersWhen existing tasks are present:
<tasks-dir>/ and <tasks-dir>/completed/ (default: tasks/ and tasks/completed/). Completed tasks are moved out of <tasks-dir>/ into <tasks-dir>/completed/ by the executors (ywc-sequential-executor / ywc-parallel-executor), so scanning only the active root misses them and risks reusing a number that already exists. Take the highest PHASE across the union of the two directories; the new batch's first task starts at highest PHASE + 1 with SEQUENCE reset to 010. Example: if the highest existing number is 000016-040 — whether it currently lives in <tasks-dir>/ or in <tasks-dir>/completed/ — the new batch starts at 000017-010. If <tasks-dir>/ is empty (every task already completed and archived), fall back to the highest number in <tasks-dir>/completed/ and apply the same +1 phase rule.Depends OnReview the specification for completeness and verify that sufficient information exists for decomposition. The goal is not to demand a perfect spec, but to confirm that the key information needed to determine task boundaries is present.
Checklist:
When unclear areas are found:
If the user has not specified an output language, ask:
"Which language should the task documents be written in? (korean / japanese / english)"
Always ask the user which granularity mode to apply. Do not silently default — the correct mode depends on who will execute the tasks.
"Which granularity mode should the tasks be generated in?
human— small, single-PR reviewable units (~10 files / ~300 LOC)llm— larger vertical slices optimized for a single LLM agent run (~25 files / ~800 LOC)"
Mode selection criteria (share with the user if they are unsure):
human when a person will implement and code-review each task in sequencellm when tasks will be executed autonomously by an LLM agent (Claude Code, Codex, etc.) in isolated worktrees, and reviewed in aggregate after completionSafety invariants — DB migration separation, Library introduction separation, Phase hard gate, post-task buildability — apply in both modes. Only size and internal bundling differ.
See references/granularity-modes.md for the full mode specification.
Persist the decision. After confirmation, record the selected mode in a re-checkable location (e.g., a top-line scratchpad note, or write_memory("granularity_mode", <value>) when Serena MCP is available) and apply it consistently through Steps 6–9 (size, bundling, Ownership scope, Implementation Steps depth, test.md inclusion). Mode drift mid-generation produces inconsistent task directories.
Analyze the specification and decompose it into tasks following the Task Design Principles and the selected Granularity Mode.
Scale guidelines (task counts scale down in llm mode due to vertical bundling):
human mode, ~3–8 in llm mode): Organize into 2–3 phases. This is the typical case.human mode, 8+ in llm mode): Suggest to the user that the spec itself be split into multiple features. A single task set exceeding 20 tasks becomes difficult to manage.For Medium and Large specs, phase boundary decisions and task size splits benefit from frontier judgment. A wrong Phase boundary cascades into every subsequent dependency declaration and is expensive to undo once the task directories are generated.
This skill applies Pattern C from advisor-pattern.md: a single upfront Opus advisor call before writing any task directories. The executor handles everything else — Task Naming, Directory Generation, Dependency Graph, and Final Validation.
When to invoke:
How to invoke: Use the Task tool with model: opus. Pass the following as context payload:
tasks/, tech-stack constraints affecting dependency order.Ask the advisor for three things:
Budget: exactly 1 Opus call per invocation of this skill. Pattern C explicitly rules out re-invocation during execution — if the initial plan proves wrong, re-run the whole skill with refined input rather than calling Opus mid-generation. This rule exists because mid-generation re-planning leads to inconsistent task directories; a fresh start is cleaner and more auditable.
Payload rules: the summary and task list together must not exceed ~200 lines of payload. If the first-pass decomposition is already larger, narrow it before the advisor call (split the spec into sub-specs and plan each separately). Never forward the full spec verbatim.
Advisor output format (≤300 words):
After receiving the verdict, the executor either continues to Step 7 (Task Naming) with the adjusted plan, or surfaces the "reconsider" verdict to the user for refinement before proceeding.
Each task name follows this format:
[PHASE]-[SEQUENCE]-[CATEGORY]-[SHORT-DESCRIPTION]
Example:
000001-010-db-create-user-table= PHASE000001+ SEQUENCE010+ category + description.
Numbering Rules:
000001, 000002, ...) — the wider width reserves headroom for multi-year project growth010, 020, 030, ...)-) to separate PHASE and SEQUENCE for readability<tasks-dir>/ and <tasks-dir>/completed/ (default: tasks/ and tasks/completed/), take the highest PHASE across the union, and start the new batch at highest PHASE + 1 with SEQUENCE 010 (see Step 2). A freshly generated batch never reuses a number that was already used and then archived into <tasks-dir>/completed/.Category:
lib — New library/framework introductiondb — Database migration, schema changeapi — API endpoint implementationdomain — Business logic, service layerworker — Background job, async processingui — Frontend component, pagetest — Test-only task (e2e, load test, etc.)refactor — Code structure improvement with no behavior changeinfra — CI/CD, deployment, configurationconfig — Environment variables, feature flags, .env setup (distinct from infra: infra covers CI/CD pipelines and deployment, config covers application-level settings)Category Selection Guidelines:
llm mode (Safety Invariant)config; tasks modifying deployment pipelines use infraapi (endpoint), domain (logic), or lib (library introduction)llm mode, a single task may bundle domain + api for one feature — label it with the dominant category (usually api when an endpoint is exposed, otherwise domain)Naming Quality Rules:
llm mode, "one primary concern" may cover a vertical slice of a single feature)user-auth rather than registration-and-login)Examples:
000001-010-db-create-user-table000001-020-lib-setup-auth-library000001-030-api-user-registration000002-010-ui-login-form000001 = foundation, 000002 = core features, 000003 = integration)Phase Boundary Rules:
Use the resolved --tasks-dir path specified by the user for output. If not specified, default to tasks/.
Generate the following structure for each task:
<tasks-dir>/[TASK_NAME]/
├── README.md
├── task.md
└── test.md (optional — included when manual verification is needed)
Refer to templates in the references/ directory when writing files:
references/README.md.template — Task overview and dependency documentationreferences/task.md.template — Implementation checklistreferences/test.md.template — Manual test planreferences/dependency-graph.md.template — Top-level dependency summaryEach README.md must include the following:
Bidirectional dependency tracking matters because developers executing a task can immediately see which downstream tasks are affected, allowing them to consider downstream requirements when designing interfaces.
Every task's README.md must include a ## Spec Reference section with three subsections: Primary Sources (links to source-of-truth docs, project-relative by default), Summary (2–5 sentence orientation), and Out of Scope (from spec) (scope-creep guardrail).
Hard rule: never leave Spec Reference empty or omitted — use N/A — no external spec (housekeeping / refactor / config only) when no spec exists.
For the full structure, the external-URL policy, the link-vs-summary drift protocol, and the cross-task scope-handoff convention, read references/spec-reference-rules.md.
When tasks may be executed via git worktree, Codex, Claude Code, or other isolated worker setups, every task's README.md must declare:
backend, frontend related files. Good: api/src/routes/metrics.ts, OpenAPI contract: /api/v1/metrics.(None identified) if none.Depends On).For the full rule set including good/bad Ownership examples, the complete shared-surfaces taxonomy, and the dependency-graph Parallel Execution Notes format, read references/parallel-execution-metadata.md.
Each task.md must include the following:
README.md Ownership as an operational boundaryWhen <trigger>, system does <behavior>, observable as <concrete check> form — distinct from the imperative Implementation Steps below. This is the declarative success target the implementer loops against; the steps are one way to reach it.Create src/models/user.ts with User entity definitionbuild/lint gateWrite structured scenario-based tests (Steps + Expected Result).
Include when:
May omit when:
After generating all tasks, create <tasks-dir>/dependency-graph.md at the top level. This file serves as the single source of truth for execution order.
Refer to references/dependency-graph.md.template for format. List tasks by phase and express each task's dependencies using arrow notation.
This graph must be consistent with the Dependencies sections in individual README.md files.
After generating all tasks, verify the following:
Dependency & Structure:
Naming & Size:
[PHASE:6]-[SEQUENCE:3]-[CATEGORY]-[SHORT-DESCRIPTION])README.md Quality:
N/Atask.md Quality:
When <trigger>, does <behavior>, observable as <check> form (distinct from Implementation Steps)build/lint)Consistency:
The final output includes:
<tasks-dir>/ (default: tasks/)<tasks-dir>/dependency-graph.md generated — single source of truth for execution order<tasks-dir>/dependency-graph.md when parallel worktree execution is expectedWhen parallel execution is expected, verify that each task is safe for isolated worktree or agent execution.
User input: "Break down the user authentication spec into tasks. In Korean." (Granularity Mode: human)
For execution rules after task generation (completion handling, directory moves, etc.), see references/execution-convention.md.
npx claudepluginhub yongwoon/ywc-agent-toolkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.