com um clique
spectre-create-tasks
// 👻 | Transform requirements into executable tasks - primary agent
// 👻 | Transform requirements into executable tasks - primary agent
👻 | Transform requirements into executable tasks - primary agent
👻 | Independent multi-lens review of plan.md and/or tasks.md — finds overengineering, missing verification, hallucinated deps, weak references
👻 | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
👻 | Independent multi-lens review of plan.md and/or tasks.md — finds overengineering, missing verification, hallucinated deps, weak references
👻 | Unified planning entry point - researches, assesses complexity, routes to workflow - primary agent
Run the SPECTRE release workflow, including version bumps, Codex sync, global Codex install verification, GitHub release, manual npm publish handoff, npm verification, and final global Codex refresh.
| name | spectre-create_tasks |
| description | 👻 | Transform requirements into executable tasks - primary agent |
| user-invocable | true |
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 tasks.md banner?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.
TASKS_FILE (default ${TASK_DIR}/specs/tasks.md; if it already exists, create a scoped name like ${TASK_DIR}/specs/{task_name}_tasks.md or tasks_{timestamp}.md to avoid overwriting).
Save to ${TASKS_FILE}:For LIGHT, keep the template compact: Objective, Scope, Out-of-Bounds, Architecture Context, Tasks, and a short Execution Order. Omit Requirements Traced, Coverage Summary, and Parallel Execution unless needed. STANDARD/COMPREHENSIVE use the fuller structure below.
# Tasks — {feature name}
*Generated by create_tasks on {timestamp}*
## Objective
{single sentence describing outcome}
## Scope
- **In Scope**: {bullet list}
- **Out of Scope**: {bullet list}
## Out-of-Bounds — DO NOT add
*Carried forward verbatim from plan.md. Executors: if a task tempts you to add any of these, stop and ask.*
- {Forbidden addition 1, e.g. "rate limiting"}
- {Forbidden addition 2, e.g. "retry/backoff"}
- {Forbidden addition 3, e.g. "telemetry events"}
- {Forbidden addition 4, e.g. "admin UI"}
## Requirements Traced
| ID | Description | Source | Tasks |
|----|-------------|--------|-------|
| REQ-001 | ... | prd.md | 1.1, 1.2 |
| REQ-002 | ... | task_summary.md | 2.1 |
---
## Architecture Context
### Where This Fits
- {Which system/component this work extends or modifies}
- {How it connects to existing architecture — with file references}
### Technical Approach
- {Key pattern/approach we're following — reference existing code if applicable}
- {Why this approach vs alternatives}
- {What existing code we're leveraging}
### Key Decisions
- {Decision 1 and rationale}
- {Decision 2 and rationale}
---
## Tasks
### Phase 0: Dependency Verification
*Confirms every external dependency in plan.md exists at the declared version before any implementation begins.*
#### [0.1] Verify external dependencies
- **Predecessor**: none
- **Unblocks**: 1.1
- [ ] **0.1.1** Verify each package@version from plan.md "External Dependencies" section exists
- **Produces**: confirmation log of resolved package metadata
- **Consumed by**: Phase 1 implementation tasks
- **Context**:
- plan.md anchor: `## External Dependencies — Verify Before Implementation`
- check commands listed in plan section
- [ ] State condition: `npm view <pkg>@<ver>` returns valid metadata for every package
- [ ] State condition: no package in the list is flagged as deprecated or security-advised
- [ ] Test passes: minimal import-and-call smoke for each new package
### Phase 1: {Phase Name}
#### [1.1] {Parent Task Title}
- **Predecessor**: 0.1
- **Unblocks**: 1.2
- [ ] **1.1.1 RED** Write failing test `{test_name}` asserting `{behavior}`
- **Produces**: a failing test that pins the desired behavior
- **Consumed by**: 1.1.2 (turns this red to green)
- **Replaces**: N/A
- **Context**:
- `path/to/existing/code.ts:42` — current behavior being changed
- `path/to/similar/test.ts:18` — canonical test shape to follow
- plan.md anchor: `### Verification — How We Know This Works`
- [ ] State condition: file `path/to/test.ts` exists and contains test `{test_name}`
- [ ] Test passes: the new test fails, with failure message referencing the unimplemented behavior
- [ ] **1.1.2 Build** {Implement the change}
- **Produces**: {output variable/value/prop}
- **Consumed by**: {component/hook that uses this}
- **Replaces**: {old code path, or "N/A" if new}
- **Context**:
- `path/to/file.ts:120` — code to modify
- `path/to/file.ts:180` — adjacent code that must not regress
- `path/to/canonical/example.ts:55` — pattern to follow (from @patterns research)
- plan.md anchor: `## Technical Approach`
- [ ] Test passes: `{test_name}` (from 1.1.1) now passes
- [ ] Test passes: existing tests in `path/to/related.test.ts` still pass
- [ ] Observable behavior: `{specific runtime signal, e.g. log line, HTTP response shape}`
#### [1.2] {Parent Task Title} — Integration
- **Predecessor**: 1.1
- **Unblocks**: {next parent or "terminal"}
- [ ] **1.2.1** Wire {1.1.2 output} to {consumer}
- **Wires**: {1.1.2 output} → {consumer component/render}
- **Removes**: {old code path being replaced}
- **Context**:
- `path/to/consumer.tsx:30` — where the wire lands
- `path/to/old/path.ts:12` — old code path to remove
- plan.md anchor: `### Technical Approach`
- [ ] Test passes: integration test asserting consumer renders new data source
- [ ] State condition: old code path file `path/to/old/path.ts` deleted or import removed
- [ ] Observable behavior: data flows from producer to rendered output (with `{specific assertion}`)
### Phase 2: {Phase Name}
...
---
## Execution Strategies
### Sequential Execution
1. Task 1.1 - [Name] (no dependencies)
2. Task 1.2 - [Name] (depends on 1.1)
3. Task 2.1 - [Name] (depends on 1.1)
...
### Parallel Execution
**Wave 1 (concurrent)**: 1.1, 2.1
- Rationale: {why concurrent}
**Wave 2 (after Wave 1)**: 1.2, 2.2
- Rationale: {why sequenced}
**Wave 3 (after Wave 2)**: 3.1
- Rationale: {why sequenced}
---
## Coverage Summary
- Total Requirements Extracted: [X]
- Requirements with Task Coverage: [X] (100%)
- Phases: [N]
- Parent Tasks: [Y]
- Sub-tasks: [Z]
Action — RenderFooter: Use @skill-spectre:spectre-guide skill for Next Steps footer