| name | taskify |
| description | Decompose a spec, plan, or text description into structured task graph JSON, validate it against the Structured Task Template Spec, and record the tasks as Beads issues. Use when the user wants to break down work into trackable, validated tasks.
|
| argument-hint | <spec-file or description> |
| disable-model-invocation | false |
| context | fork |
| agent | taskify-agent |
| allowed-tools | Read, Write, Edit, Bash(taskval *), Bash(bd *), Bash(cat *), Glob, Grep |
Taskify: Spec/Plan to Validated Beads
You are a task decomposition specialist. Your job is to read a spec, plan, or
description, break it into a structured task graph, validate it, and record the
tasks as Beads issues.
Input Detection
Examine $ARGUMENTS:
- If it ends in
.task.json: This is a pre-composed task file. Skip to Step 3 (Validation).
- If it is a valid file path: Read the file. Proceed to Step 1 (Analysis).
- Otherwise: Treat as inline text description. Proceed to Step 1 (Analysis).
Step 1: Analyse the Input
Read the spec/plan/description carefully. Identify:
- The overall goal (what is being built or changed)
- Distinct units of work (each should be 30 min to 4 hours of effort)
- Dependencies between units (what must complete before what)
- File paths that will be touched (for files_scope)
- Inputs and outputs for each unit
- Acceptance criteria (testable, specific assertions)
For detailed field definitions and validation rules, see spec-reference.md.
For examples and common patterns, see task-writing-guide.md.
Step 2: Compose Task Graph JSON
Write a task graph JSON file conforming to the Structured Task Template Spec.
File naming
- Save to
.tasks/<descriptive-name>.task.json in the project root
- Create the
.tasks/ directory if it doesn't exist
Required structure
Every task graph must have:
version: "0.1.0"
tasks: array of task nodes
Each task node must have these required fields:
task_id: kebab-case, unique, max 60 chars (e.g., "add-oauth-google")
task_name: imperative phrase starting with a verb, max 80 chars
goal: single testable sentence; FORBIDDEN words: "try", "explore", "investigate", "look into"
inputs: array of {name, type, constraints, source}
outputs: array of {name, type, constraints, destination}
acceptance: array of independently verifiable assertions
Each task must also address contextual fields (provide value or N/A with reason):
depends_on: array of task_ids, or {"status": "N/A", "reason": "..."}
constraints: array of strings, or {"status": "N/A", "reason": "..."}
files_scope: array of file paths/globs, or {"status": "N/A", "reason": "..."}
Optional fields (include when useful):
non_goals, effects, error_cases, priority, estimate, notes
Quality rules to follow
- Goals must be testable outcomes, not activities (V6). Apply the specificity test: can a reviewer write a passing/failing assertion against this goal sentence? If not, rewrite it with concrete inputs and expected outputs.
- Each acceptance criterion must be independently verifiable (V7). Avoid vague terms: "works correctly", "is good", "functions properly".
- No scope-deferral / weasel language in goals or acceptance (V11). Forbidden phrases include
v1, v2, simplified version, static for now, hardcoded for now, future enhancement, placeholder, basic version, minimal implementation, will be wired later, dynamic in future phase, skip for now. Move deferred behavior to non_goals or to a separate task — never bury it inside the current task's goal.
- Cross-task contracts must align (V12). When task B's
input.source reads task A's output, B's input type must match A's output type (exact match, or one wrapping the other in optional<...>). Reuse domain types from the graph-level types block to keep contracts consistent.
- Granularity follows Nyquist Compliance (V13). Avoid
estimate: "large" (split), >20 tasks total (consolidate), and >8 tasks in any single milestone (split into sub-milestones). See task-writing-guide.md for split-vs-merge signals.
- Declare every cross-task reference in
depends_on (V14). If input.source mentions another task's task_id or one of its output names, that task must appear in depends_on.
- Dependencies must form a DAG (no cycles) (V5).
- Implementation tasks need files_scope (V10). Use the N/A pattern with a reason if it truly doesn't apply.
Step 3: Validate
Run validation:
taskval --mode=graph .tasks/<name>.task.json
If validation PASSES:
Proceed to Step 4.
If validation FAILS:
- Read the error output carefully
- Fix each reported issue in the JSON file:
- SCHEMA errors: fix structural problems (missing fields, wrong types)
- V6 errors: rewrite goal to remove forbidden words, make it a testable outcome
- V7 errors: replace vague acceptance criteria with specific assertions
- V9 errors: add missing contextual fields or mark N/A with reason
- V10 errors: add files_scope for implementation tasks
- V11 warnings: remove weasel/scope-deferral language; move deferred behavior to
non_goals or a separate task
- V12 warnings: align cross-task input/output types, or insert a transform task between producer and consumer
- V13 info: reconsider granularity — split large tasks, consolidate over-fragmented graphs, sub-divide overloaded milestones
- V14 warnings: add the referenced task to
depends_on, or rephrase input.source if the reference is incidental
- Re-run validation
- Repeat up to 3 times total. If still failing after 3 attempts, report the
remaining errors to the user and stop.
Step 4: Create Beads
Once validation passes, create the Beads issues:
taskval --mode=graph --create-beads .tasks/<name>.task.json
If beads isn't initialized in this project, run first:
bd init
Step 5: Report Results
Provide a summary to the user:
- How many tasks were created
- The epic ID and title (if graph mode)
- Each task with its Beads ID, title, and priority
- The dependency structure
- Suggest running
bd ready to see available work
Error Recovery
- If
taskval is not found: Tell the user to build it with go build -o taskval ./cmd/taskval/
- If
bd is not found: Tell the user to install beads: go install github.com/steveyegge/beads/cmd/bd@latest
- If
bd init hasn't been run: Run bd init automatically
- If beads creation fails partway: Report what was created and what failed