From spectre
Breaks down requirements into detailed, actionable task lists with dependency analysis, research decisions, and execution strategies. Adapts to available context and scales to scope.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spectre:spectre-create_tasksThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded `$ARGUMENTS` value.
Treat the current command arguments as this workflow's input. When invoked from a slash command, use the forwarded $ARGUMENTS value.
--depth from ARGUMENTS. Default: standard.branch_name=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo unknown)TASK_DIR={that value}TASK_DIR=docs/tasks/{branch_name}mkdir -p "${TASK_DIR}/specs" "${TASK_DIR}/research" "${TASK_DIR}/clarifications"Inventory what exists in TASK_DIR/:
task_summary.md — scope/objectivesprd.md — detailed requirementsux.md — user experience specsplan.md — technical approachtask_context.md — technical researchresearch/*.md — analysis docsAlso note: thread context, user-provided docs, ARGUMENTS content.
Simple task (research likely unnecessary):
Complex task (research likely needed):
Based on complexity assessment from 1c:
light and plan.md/task_context.md names target files → NEED_RESEARCH=falseNEED_RESEARCH=falseNEED_RESEARCH=trueAssess existing artifacts with judgment:
| Artifact | Check For |
|---|---|
task_context.md | "## Technical Research" section with relevant analysis |
research/*.md | Docs covering codebase patterns, integration points |
plan.md | Technical approach, file locations, architecture decisions |
Judgment call: Do existing artifacts sufficiently cover:
Codebase patterns relevant to this scope?
Integration points and dependencies?
Technical approach and target files?
If sufficient coverage → HAVE_RESEARCH=true
If gaps exist → HAVE_RESEARCH=false (note specific gaps)
NEED_RESEARCH=false → proceed to Step 3NEED_RESEARCH=true AND HAVE_RESEARCH=true → read existing, proceed to Step 3NEED_RESEARCH=true AND HAVE_RESEARCH=false → conduct research (Step 2d)CLAUDE.md, README.md, architecture docs${TASK_DIR}/task_context.md under "## Technical Research"Read completely (no limits):
task_summary.md, prd.md, plan.md, ux.mdSTRICT COMPLIANCE: Tasks deliver ONLY what's explicitly stated. No performance optimizations, extra features, future-proofing, or "best practices" unless requested.
Numbering: Phase 1 → Parent 1.1, 1.2 → Sub-tasks 1.1.1, 1.1.2 → Criteria
Published data on AI agent execution (Cognition's Devin reviews, Anthropic's Claude Code guidance) converges on a bounded sweet spot: each sub-task should be completable in roughly the time a junior would take in a 4–8 hour window — not a multi-day epic, not a 10-line tweak.
Hard size cap — split a sub-task if ANY of these is true:
When splitting, keep the integration-aware principle intact: each split task still names its Producer / Consumer / Replaces.
Every acceptance criterion MUST be one of three executable types. Prose criteria like "feature works correctly" or "behavior is consistent" are forbidden — an executor cannot self-check them.
Test \<test_name>` passes(ortests in <file_path> pass`)GET /api/x returns 200 with field \y`, Console logs `event=loaded params={...}`, Button click triggers within 100ms`File \` exists and contains , Migration `` applied, Env var `X` is read at startup`Mixing types within a sub-task is fine. What's not fine: criteria the agent cannot verify without asking the user.
For STANDARD/COMPREHENSIVE sub-tasks that change observable behavior (not pure refactors or cleanup), pair with a preceding RED task. For LIGHT, add a RED task only when the behavior is risky, ambiguous, or regression-prone. Pattern:
<test_name> asserting <behavior>. Acceptance: test exists and fails for the documented reason.<change>. Acceptance: the RED test passes; no other tests regress.This is the TDAD pattern (test-driven agentic development): the failing test is the executor's self-correction signal. Without it, the executor is guessing whether the implementation is right.
Pure refactors, cleanups, and config-only tasks don't require RED pairing — but if behavior changes, the RED comes first.
"A feature isn't done when pieces exist. It's done when data flows from user action to rendered pixels."
Every task that creates something must specify:
Tasks without consumers are incomplete. Tasks that don't address old code paths leave dead/duplicate logic.
Task Types:
Generate Phase 0 only when the plan introduces external dependencies, except COMPREHENSIVE where Phase 0 is always present. Each dependency sub-task verifies the package exists at the named version and exposes the API the plan assumed.
npm view <pkg>@<ver> returns valid metadata) and/or test passes (a minimal import-and-call smoke test).plan.md declared "no new packages," Phase 0 is a single sub-task that confirms no new dependencies were silently introduced during implementation (cross-check package.json diff at end). For LIGHT/STANDARD, put that check in the final implementation task instead.Sub-task structure:
What to INCLUDE in sub-tasks:
@patterns research that shows the shape to follow)plan.md for the relevant sectionWhat to AVOID in sub-tasks:
Acceptance criteria:
Decomposition (hard size cap): Split if ANY of: >3 files touched, >5 criteria, >~200 LOC, mid-task scope judgment required, or more than one concern.
Action — VerifyCoverage: Cross-reference tasks against extracted requirements.
Action — ValidateTasks: Validate complete task structure.
plan.md mapped to at least one acceptance criterion?plan.md's "Out-of-Bounds — DO NOT add" list carried forward verbatim into the task artifacts?Action — ValidateIntegration: Verify every build task is wired to consumers.
Define step-by-step execution order based on dependencies. For LIGHT, keep this to one compact ordered list:
## Sequential Execution
1. 1.1 - [Name] (no dependencies)
2. 1.2 - [Name] (depends on 1.1)
3. 2.1 - [Name] (depends on 1.1)
4. 2.2 - [Name] (depends on 1.2, 2.1)
...
Group independent parent tasks into waves for parallel execution. Skip this section for LIGHT unless two or more parent tasks can truly run concurrently:
## Parallel Execution
### Wave 1 (concurrent)
- 1.1, 2.1 — no dependencies, can start immediately
- Rationale: {why these can run concurrently}
### Wave 2 (after Wave 1)
- 1.2, 2.2 — depend on Wave 1 outputs
- Rationale: {why these depend on Wave 1}
### Wave 3 (after Wave 2)
- 3.1 — integration, needs prior waves complete
- Rationale: {why this needs prior waves}
Note: Phases (📦) are organizational; execution planning happens at parent task (📋) level.
DETAIL_FILE=${TASK_DIR}/specs/tasks.jsonEXECUTE_FILE=${TASK_DIR}/specs/execute.md${TASK_DIR}/specs/{task_name}.tasks.json and ${TASK_DIR}/specs/{task_name}.execute.md.tasks.json detail contract${DETAIL_FILE}.references/tasks.example.json as the concrete fixture reference.meta — objective, scope, out-of-bounds, requirements trace, architecture context, and coverage summary.phases[] — phase objects containing parent tasks and subtasks with full task detail plus mutable status.tasks.json MUST NOT contain stored index, indexes, wave_plan, or waves keys. The cheap planning layer belongs in execute.md.status lives only in tasks.json, using pending, in_progress, done, or skipped.id, title, summary, status, parents[]id, title, description, status, predecessor, unblocks, subtasks[]id, title, type, status, produces, consumed_by, replaces, context[], optional predecessor, acceptance_criteria[]path, anchor, notetype (test, observable, or state) and textnode -e "JSON.parse(require('fs').readFileSync(process.argv[1],'utf8'))" "${DETAIL_FILE}"{
"meta": {
"feature": "{feature name}",
"generated_at": "{ISO timestamp}",
"schema_version": 1,
"objective": "{single sentence describing outcome}",
"scope": {
"in_scope": ["{explicit in-scope item}"],
"out_of_scope": ["{explicit out-of-scope item}"]
},
"out_of_bounds": ["{forbidden addition carried from plan.md}"],
"requirements_trace": [
{
"id": "REQ-001",
"description": "{requirement}",
"source": "{source doc or anchor}",
"tasks": ["1.1"]
}
],
"architecture_context": {
"where_this_fits": ["{component/system context}"],
"technical_approach": ["{approach and existing pattern}"],
"key_decisions": ["{decision and rationale}"]
},
"coverage_summary": {
"requirements_extracted": 1,
"requirements_with_task_coverage": 1,
"phases": 1,
"parent_tasks": 1,
"subtasks": 2
}
},
"phases": [
{
"id": "1",
"title": "{Phase Name}",
"summary": "{phase purpose}",
"status": "pending",
"parents": [
{
"id": "1.1",
"title": "{Parent Task Title}",
"description": "{cohesive deliverable}",
"status": "pending",
"predecessor": "none",
"unblocks": "terminal",
"subtasks": [
{
"id": "1.1.1",
"title": "Write failing test `{test_name}` asserting `{behavior}`",
"type": "RED",
"status": "pending",
"produces": "A failing test that pins the desired behavior",
"consumed_by": "1.1.2",
"replaces": "N/A",
"context": [
{
"path": "path/to/existing/code.ts",
"anchor": "line 42",
"note": "Current behavior being changed"
}
],
"predecessor": "none",
"acceptance_criteria": [
{
"type": "state",
"text": "File `path/to/test.ts` exists and contains test `{test_name}`."
},
{
"type": "test",
"text": "Test `{test_name}` fails for the documented unimplemented behavior."
}
]
},
{
"id": "1.1.2",
"title": "{Implement the change}",
"type": "Build",
"status": "pending",
"produces": "{output variable/value/prop}",
"consumed_by": "{component/hook that uses this}",
"replaces": "{old code path or N/A}",
"context": [
{
"path": "path/to/file.ts",
"anchor": "line 120",
"note": "Code to modify"
}
],
"predecessor": "1.1.1",
"acceptance_criteria": [
{
"type": "test",
"text": "Test `{test_name}` passes."
},
{
"type": "observable",
"text": "{specific runtime signal}"
}
]
}
]
}
]
}
]
}
execute.md compact execution index contract${EXECUTE_FILE}.references/execute.example.md as the concrete fixture reference./spectre:execute without duplicating task bodies:
## Document Manifest## Task Detail Source## Execution Summary## Wave Plan## Parent Task Index## Slicing RulesDocument Manifest from the actual known artifact paths available to this workflow; do not assume literal filenames like scope.md or ux.md. Include scope, UX, prototype, plan, research/context, PRD, or other relevant docs only when their actual paths are known or discovered.Task Detail Source lists ${DETAIL_FILE} as machine-readable data. It must explicitly say not to read that file whole.Execution Summary includes counts for phases, parent tasks, subtasks, and dependency/wave totals.acceptance_criteria, produces, consumed_by, context payloads, or mutable status.tasks.json, so the primary executor can plan without opening the detail JSON.# Execute Index — {feature name}
## Document Manifest
Read these docs before execution:
- Scope: `{actual scope artifact path if known}`
- UX: `{actual UX artifact path if present}`
- Prototype: `{actual HTML prototype path if present}`
- Plan: `{actual plan artifact path}`
- Research: `{actual task_context/research path if present}`
## Task Detail Source
Do not read this file whole:
- Tasks JSON: `{DETAIL_FILE}`
Use targeted parsing only: status projections, selected parent-task slices, reviewer criteria/context slices, and status updates.
## Execution Summary
- Phases: {N}
- Parent tasks: {N}
- Subtasks: {N}
- Waves: {N}
## Wave Plan
- Wave 1: `{ id: "wave-1", label: "{label}", parent_task_ids: ["1.1"], after: [], rationale: "{why these tasks run together}" }`
- Wave 2: `{ id: "wave-2", label: "{label}", parent_task_ids: ["2.1"], after: ["wave-1"], rationale: "{dependency reason}" }`
## Parent Task Index
- Phase 1 — {Phase Name}
- `{ id: "1.1", title: "{Parent Task Title}", subtasks: ["1.1.1", "1.1.2"], predecessor: "none", unblocks: "2.1" }`
## Slicing Rules
Read this index to plan waves. For each owner, choose selected parent task ids from the Wave Plan and batching rules, then query only those parent tasks from `tasks.json` using `jq`, `node -e`, or direct targeted mechanics. Inline the selected parent-task slice under `<task_assignment>`.
Do not load the full task detail JSON into orchestration context. Do not require dispatch boundaries to match phase boundaries. Update mutable `status` fields in `tasks.json`, re-parse after every write, and update this index only if parent ids, parent titles, dependencies, or wave guidance change.
Action — RenderFooter: Use @skill-spectre:spectre-guide skill for Next Steps footer
npx claudepluginhub codename-inc/spectre --plugin spectreDecomposes specs into ordered, verifiable tasks with acceptance criteria using vertical slicing and dependency graphs. Use for large tasks, scope estimation, or parallel agent work.
Generates actionable implementation tasks from product specs and architecture documents. Handles project context, monorepo checks, and effort recommendations.
Breaks down implementation plans into detailed task lists with agent contexts, acceptance criteria, dependencies, priorities, complexity levels, and status tracking.