Use this skill to create tasks from a PRD and ADR using the "ah" prefix. Use when asked to "ah create tasks". This skill runs the full Spec Kit pipeline -- specify, clarify, plan, research, complexity check, checklist, and task generation -- with consistency analysis passes, committing after each major step. Also supports "update" mode (e.g., "ah create tasks update 001") which skips initial specify/verify steps, creates a new branch, and starts from clarify.
Orchestrate the full Spec Kit pipeline to transform a prd.md and adr.md file into a well-structured tasks.md file. The workflow generates intermediate design artifacts (spec.md, plan.md, research.md, checklists), performs consistency checks, and commits after each major step.
Supports two modes:
001). Creates a new git branch, skips steps 1-4 (specify/verify), and starts from Clarify using the PRD to generate the clarification prompt.42). If not provided by the user, ask before proceeding.update to skip steps 1-4 and start from Clarify. Default is create (full pipeline).001). Used to construct the branch name.committer, which uses SonnetBASE_BRANCH=$(git branch --show-current)
REPO_NAME=$(basename -s .git "$(git remote get-url origin)")
PROGRESS_TEMPLATE="progress-tasks.md"
Determine the mode:
MODE=update and store the spec number as SPEC_NUMBER.MODE=create.If the user did not provide prd.md path, adr.md path, or issue number, ask them for all missing values now (before any other work begins). In update mode, also ask for spec number if not provided. Store these values as PRD_PATH, ADR_PATH, ISSUE_NUMBER, and (in update mode) SPEC_NUMBER.
Verify that prd.md exists at PRD_PATH and adr.md exists at ADR_PATH. If either file does not exist, ask the user for the correct path.
If MODE=update:
Resolve the git branch prefix:
GIT_BRANCH_PREFIX="${GIT_BRANCH_PREFIX:-}"
If GIT_BRANCH_PREFIX is empty, ask the user for their branch prefix (e.g., jj).
Read prd.md at ${PRD_PATH} and derive a short kebab-case branch description from its title/main feature (e.g., fix-submit-button). The description should capture the main feature or fix in 2-5 words.
Create and switch to the new branch:
BRANCH_DESCRIPTION="<derived-kebab-case-description>"
NEW_BRANCH_NAME="${GIT_BRANCH_PREFIX}/${SPEC_NUMBER}-${BRANCH_DESCRIPTION}"
git checkout -b "${NEW_BRANCH_NAME}"
SPEC_DIR="specs/${NEW_BRANCH_NAME}"
SAFE_BRANCH_NAME=$(echo "${NEW_BRANCH_NAME}" | tr '/' '-')
PROGRESS_FILE="~/.agents/arinhub/progresses/progress-tasks-${REPO_NAME}-${SAFE_BRANCH_NAME}.md"
Initialize ${PROGRESS_FILE} using the template references/${PROGRESS_TEMPLATE}. Replace all <PLACEHOLDER> values with actual values. Mark Specifier and Spec Verifier sections as status: skipped (update mode) in the progress file.
Verify that ${SPEC_DIR} exists and contains spec.md. If not, create the directory and report to the user that a new spec.md will be generated during the Clarify step.
Skip steps 1-4. Proceed directly to step 5 (Clarify).
Update mode: Skip this step and steps 2-4. Proceed directly to step 5 (Clarify).
Read prd.md at ${PRD_PATH} and distill it into a prompt for the /speckit.specify command. The prompt should focus on what and why -- strip out tech stack details, implementation specifics, and architecture choices. Keep only the user-facing requirements, goals, motivation, and any relevant context that would be important for a specifier to know when writing the initial spec.md. The goal is to create a clear and concise prompt that captures the essence of the feature without prescribing how it should be implemented.
Spawn subagent specifier (Opus, ultrathink):
${PRD_PATH} so the subagent can read the PRD file directly for additional context/speckit.specify with the distilled prompt/speckit.specify completes, it will have created a new branch. Capture it:
NEW_BRANCH_NAME=$(git branch --show-current)
SPEC_DIR="specs/${NEW_BRANCH_NAME}"
SAFE_BRANCH_NAME=$(echo "${NEW_BRANCH_NAME}" | tr '/' '-')
PROGRESS_FILE="~/.agents/arinhub/progresses/progress-tasks-${REPO_NAME}-${SAFE_BRANCH_NAME}.md"
${PROGRESS_FILE} using the template references/${PROGRESS_TEMPLATE}. Replace all <PLACEHOLDER> values with actual values (branch name, base branch, PRD path, ADR path, issue number, timestamp). Every subagent updates its own section in this file after completing its work.spec.md (before any existing content):
**Base Branch**: <BASE_BRANCH>
**Issue Number**: <ISSUE_NUMBER>
**Input**: <the distilled prompt>
${PROGRESS_FILE} Specifier section (status: completed, findings)Spawn subagent committer (Sonnet):
/commitSpawn subagent spec-verifier (Opus, ultrathink):
Act as a Senior Code Reviewer. Analyze spec.md in ${SPEC_DIR} and identify errors, logical gaps, or inconsistencies. If the spec.md references refactoring or existing codebases, perform a comparative analysis to ensure functional parity and identify any missing requirements. Fix all issues you find.${PROGRESS_FILE} Spec Verifier sectionSpawn subagent committer (Sonnet):
/commitUpdate mode: Read prd.md at ${PRD_PATH} and distill it into a prompt for /speckit.clarify. The prompt should focus on what and why -- strip out tech stack details, implementation specifics, and architecture choices. Keep only the user-facing requirements, goals, motivation, and any relevant context that would be important for a clarifier to know when refining the spec.md. Pass this prompt to /speckit.clarify.
Run /speckit.clarify yourself (not as a subagent -- this command may require user interaction).
If the clarification process asks questions that need user input, wait for the user to respond before proceeding. Do not skip or auto-answer clarification questions.
Update ${PROGRESS_FILE} Clarifier section.
Spawn subagent committer (Sonnet):
/commitRead adr.md at ${ADR_PATH} and distill it into a prompt for the /speckit.plan command. The ADR contains architectural decisions, constraints, and rationale -- use these to inform the prompt with tech stack choices, architecture patterns, and design trade-offs.
Also read AGENTS.md in the repo root to gather active technologies and recent changes. After generating the plan, update AGENTS.md with any new active technologies or recent changes discovered during planning.
Spawn subagent planner (Opus, ultrathink):
${ADR_PATH} so the subagent can read the ADR file directly for additional context/speckit.plan with the distilled prompt${PROGRESS_FILE} Planner sectionSpawn subagent committer (Sonnet):
/commitSpawn subagent researcher (Opus, ultrathink):
I want you to go through the implementation plan and implementation details in ${SPEC_DIR}, looking for areas that could benefit from additional research. For those areas that you identify that require further research, update the research document with additional details about the specific versions that we are going to be using in this application and spawn parallel research tasks to clarify any details using research from the web or context7 tool.${PROGRESS_FILE} Researcher sectionSpawn subagent committer (Sonnet):
/commitSpawn subagent complexity-checker (Opus, ultrathink):
Cross-check the details to see if there are any over-engineered pieces in folder ${SPEC_DIR}. Return a numbered list of all issues found with severity and recommended fix for each.After the subagent returns, present its findings to the user yourself (not in a subagent) and ask which issues to fix. Wait for the user to respond before continuing.
Once the user responds, spawn subagent complexity-fixer (Opus, ultrathink):
Fix the following issues in ${SPEC_DIR}: <list of user-selected issues from complexity-checker findings>${PROGRESS_FILE} Complexity Checker sectionSpawn subagent committer (Sonnet):
/commitSpawn subagent checklist-generator (Opus, ultrathink):
/speckit.checklist with prompt: full breadth pre-implementation checklist, exclude the general spec-quality items already covered in requirements.md and focus only on domain-specific requirement gaps${PROGRESS_FILE} Checklist Generator sectionSpawn subagent checklist-checker (Opus, ultrathink):
Read the checklist in ${SPEC_DIR}, and check off each item in the checklist if the feature spec meets the criteria. Leave it empty if it does not. Fix all gaps.${PROGRESS_FILE} Checklist Checker sectionSpawn subagent committer (Sonnet):
/commitSpawn subagent tasks-generator (Opus, ultrathink):
/speckit.tasks${PROGRESS_FILE} Tasks Generator sectionSpawn subagent committer (Sonnet):
/commitSpawn subagent tasks-analyzer (Opus, ultrathink):
/speckit.analyze with prompt: if there are any issues fix all${PROGRESS_FILE} Tasks Analyzer (pass 1) sectionSpawn subagent committer (Sonnet):
/commitSpawn subagent tasks-analyzer-2 (Opus, ultrathink):
/speckit.analyze with prompt: if there are any issues fix all${PROGRESS_FILE} Tasks Analyzer (pass 2) sectionSpawn subagent committer (Sonnet):
/commitPresent a summary:
tasks.md${PROGRESS_FILE} with the full audit trail${SPEC_DIR}//speckit.implement to begin implementationprd.md + adr.md
| |
v |
[1] /speckit.specify --> spec.md (uses prd.md)
| |
v |
[3] spec-verifier --> fixes spec.md
| |
v |
[5] /speckit.clarify --> user Q&A --> updates spec.md
| |
v v
[7] /speckit.plan --> plan.md, research.md, data-model.md (uses adr.md)
|
v
[9] researcher --> updates research.md
|
v
[11] complexity-checker --> user picks fixes
|
v
[13-14] /speckit.checklist --> checklist-checker --> fixes gaps
|
v
[16] /speckit.tasks --> tasks.md
|
v
[18] /speckit.analyze (pass 1) --> fixes
|
v
[20] /speckit.analyze (pass 2) --> fixes
|
v
tasks.md (final)
prd.md + adr.md + spec number
| |
| [0] create branch: ${GIT_BRANCH_PREFIX}/${SPEC_NUMBER}-${description}
| |
| [1-4] SKIPPED
| |
v |
[5] /speckit.clarify (prompt distilled from prd.md) --> user Q&A --> updates spec.md
| |
v v
[7] /speckit.plan --> plan.md, research.md, data-model.md (uses adr.md)
|
v
[9] researcher --> updates research.md
|
v
[11] complexity-checker --> user picks fixes
|
v
[13-14] /speckit.checklist --> checklist-checker --> fixes gaps
|
v
[16] /speckit.tasks --> tasks.md
|
v
[18] /speckit.analyze (pass 1) --> fixes
|
v
[20] /speckit.analyze (pass 2) --> fixes
|
v
tasks.md (final)
Each arrow includes a /commit step (not shown for brevity).
committer runs on Opus with ultrathink effort mode. The committer subagent runs on Sonnet.${PROGRESS_FILE} file serves as a running audit trail. Each subagent updates its section immediately after finishing, so you can always see what has been done and what remains.specs/<NEW_BRANCH_NAME>/.${PROGRESS_FILE} and report to the user before continuing. Do not silently skip steps./commit command creates a conventional commit with a descriptive message based on the staged changes. The committer subagent should not do anything else beyond creating the commit.