skills/ah-implement-tasks/SKILL.md
Implement tasks from tasks.md with the "ah" prefix. Use for "ah implement tasks", or to execute a task list / start coding after task creation. Validates prerequisites, detects the tech stack to load relevant best-practice context, gathers live docs via context7, fetches dependency source via npx opensrc, then runs speckit.implement as a subagent with TDD, progress tracking, and commit-after-pass. Subagents can search GitHub via grep MCP, look up docs via context7, and verify UI via agent-browser. Supports resume, monorepo scoping, and retry on incomplete passes.
npx skillsauth add arinhubcom/arinhub ah-implement-tasksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Execute tasks.md implementation plan with full orchestration: pre-validation, tech-stack-aware best-practice context loading, external doc/source gathering, subagent-driven implementation, commit after each pass, automatic retry, progress tracking.
/commit. Pass produced no file changes: skip commit.git diff "${MERGE_BASE}" before starting, so it sees latest state including prior-pass commits.Tools below available to orchestrator and implementer subagents. Use when situation calls for it -- not mandatory every run.
| Tool | What It Does | When to Use |
|------|-------------|-------------|
| context7 MCP | Fetches current, version-specific library documentation | During context loading (step 2) and inside implementer subagents on unfamiliar or recently-changed APIs |
| grep MCP | Searches 1M+ public GitHub repos for code patterns | Inside implementer subagents needing real-world usage, implementation patterns, solutions to tricky problems |
| agent-browser skill | Browser automation: navigate, snapshot a11y tree, screenshots, DOM inspection | Inside implementer subagents for visual verification of UI implementations (frontend tasks only) |
| npx opensrc | Fetches npm package source code locally | During context loading (step 2) when tasks reference libraries where type definitions alone insufficient |
| npx repomix | Packs codebase sections into AI-friendly format | During context loading (step 2) to give implementer compact context of relevant source files |
/speckit.implement (e.g., specific task IDs, phases to focus on).skip context skips best-practice and documentation loading, skip checklists skips checklist verification.autonomous to run non-interactively. The skill then never prompts the user: it picks deterministic defaults (resume an existing run, proceed past incomplete checklists with a recorded note), fails fast on missing required inputs/metadata, and on persistent failure reports remaining tasks instead of asking how to proceed. It also suppresses its own Step 5 user report (returns only artifact paths + status). Default off (interactive). Always set by ah-workflow.BRANCH_NAME=$(git branch --show-current)
REPO_NAME=$(basename -s .git "$(git remote get-url origin)")
SAFE_BRANCH_NAME=$(echo "${BRANCH_NAME}" | tr '/' '-')
SPEC_DIR="specs/${BRANCH_NAME}"
PROGRESS_DIR=~/.agents/arinhub/progresses
PROGRESS_FILE="${PROGRESS_DIR}/progress-implement-${REPO_NAME}-${SAFE_BRANCH_NAME}.md"
mkdir -p "${PROGRESS_DIR}"
Determine autonomy: if the user passed autonomous, set AUTONOMOUS=1, else AUTONOMOUS=0. When AUTONOMOUS=1, never prompt the user anywhere in this skill -- use the deterministic defaults noted at each decision point, and fail fast on any missing required value.
Tasks exist: Verify ${SPEC_DIR}/tasks.md exists. If missing, stop: "No tasks.md found at ${SPEC_DIR}/tasks.md. Run /ah-create-tasks first."
Spec exists: Verify ${SPEC_DIR}/spec.md exists. If missing, stop: "No spec.md found. The spec directory may be incomplete."
No uncommitted changes: Run git status --porcelain. If uncommitted changes exist, ask user: stash, commit first, or abort. When AUTONOMOUS=1, do not ask -- fail fast with a clear error listing the uncommitted paths (the caller must hand over a clean tree).
Read ${SPEC_DIR}/spec.md, extract:
BASE_BRANCH from Base Branch metadata fieldISSUE_NUMBER from Issue Number metadata fieldIf either missing, ask the user before proceeding (or, when AUTONOMOUS=1, fail fast with a clear error naming the missing field).
Read ${SPEC_DIR}/plan.md (and package.json if it exists) to determine tech stack:
| Stack | Indicators |
|-------|-----------|
| React / Next.js | react in dependencies, .tsx/.jsx files, Next.js config |
| Vue | vue in dependencies, .vue files |
| Svelte | svelte in dependencies, .svelte files |
| Angular | @angular/core in dependencies |
| Non-frontend | No frontend framework detected |
Store detected stack as TECH_STACK for step 2.
Also extract KEY_LIBRARIES -- primary libraries referenced in tasks.md and plan.md (e.g., react-query, zod, drizzle-orm, tailwindcss). Used in step 2 for documentation fetching.
If repo is a monorepo (multiple package.json files, workspace config in root package.json, or monorepo tools like turborepo/nx), identify target application from changed file paths or tasks.md references. Scope all commands (test, lint, build) to that application.
Progress is recorded as a deterministic append-only log written by a shell helper -- not an LLM-maintained markdown file. Source the helper (resolve path relative to this SKILL.md's directory) and initialize:
source "<skill_dir>/scripts/progress.sh"
progress_init "${PROGRESS_FILE}" "${BRANCH_NAME}" "${BASE_BRANCH}" "${ISSUE_NUMBER}"
progress_init writes the header only when the file does not yet exist, so a re-run leaves an existing log untouched.
If ${PROGRESS_FILE} already existed before this run:
grep '^step|' "${PROGRESS_FILE}". If some steps are logged done/skipped(...), show them and ask: "Resume from step N, or restart?" If resuming, skip completed steps and their commits. When AUTONOMOUS=1, do not ask -- default to resuming from the first incomplete step.rm "${PROGRESS_FILE}" and call progress_init again for a fresh log.Record each step with progress_log "${PROGRESS_FILE}" <n> <name> <status> [commit] (status: done, skipped(user), skipped(none), failed). The helper stamps timestamps itself.
git fetch origin "${BASE_BRANCH}" --quiet
MERGE_BASE=$(git merge-base "origin/${BASE_BRANCH}" HEAD)
Skip if user specified skip checklists.
If ${SPEC_DIR}/checklists/ exists, scan all checklist files:
Count total, completed ([X]/[x]), incomplete ([ ]) items per file
Display status table:
| Checklist | Total | Done | Remaining | Status |
|-------------|-------|------|-----------|--------|
| ux.md | 12 | 12 | 0 | PASS |
| test.md | 8 | 5 | 3 | FAIL |
If any incomplete: Ask "Some checklists are incomplete. Proceed anyway?" Wait for user response. If user declines, halt execution. When AUTONOMOUS=1, do not ask -- proceed anyway and record a one-line note listing which checklists were incomplete.
If all complete or no checklists directory: Proceed automatically.
progress_log "${PROGRESS_FILE}" 1 checklists done (or skipped(user) if skipped).
Skip if user specified skip context.
Gathers three context categories implementer subagents use: best-practice skills, live library documentation, codebase context.
Based on TECH_STACK from step 0, determine which skills the implementation subagent loads:
| Tech Stack | Skills to Load |
|-----------|---------------|
| React / Next.js | /vercel-composition-patterns, /vercel-react-best-practices, /building-components |
| Vue / Svelte / Angular | /building-components |
| Non-frontend | (none) |
Store skill list as CONTEXT_SKILLS.
For each library in KEY_LIBRARIES, use context7 to fetch current documentation relevant to tasks. Store as LIBRARY_DOCS -- forwarded to implementer subagent prompt.
Limit to 5 most task-relevant libraries. Skip unresolvable libraries silently.
Scan tasks.md for tasks needing deep npm-package integration (extending internals, wrapping unexported utilities, working around undocumented behavior). Use npx opensrc to fetch those packages locally. Implementer subagent then reads source directly.
Skip if no tasks need source-level understanding. Limit to 3 packages.
If tasks.md references many existing files (5+), use npx repomix to pack relevant directories into a compressed file. Derive scope from file paths in tasks.md and plan.md. Implementer reads this at session start for codebase overview.
Skip if scope is narrow -- implementer can read files directly.
Briefly confirm to user which contexts will load (one line per category). This is informational only -- do not pause for a response; when AUTONOMOUS=1, emit it only to the log, not to the user:
Skills: /vercel-composition-patterns, /vercel-react-best-practices, /building-components
Docs: react-query (TanStack Query v5), zod (v3.23), tailwindcss (v4)
Source: @tanstack/react-query (npx opensrc)
Codebase: src/components/**, src/hooks/** (npx repomix, compressed)
progress_log "${PROGRESS_FILE}" 2 context done (or skipped(user) if skipped).
Spawn subagent implementer (Opus, low):
Context loading phase (beginning of subagent session):
CONTEXT_SKILLS not empty, invoke each skill to load best-practice guidanceLIBRARY_DOCS not empty, include fetched documentation summaries in subagent promptnpx opensrc packages fetched, mention their paths so subagent reads source when neededImplementation phase:
/speckit.implement with any user-provided arguments forwardedAvailable tools during implementation -- all external tools from Configuration section available. Use as needed, not mandatory.
After subagent completes, progress_log "${PROGRESS_FILE}" 3 implement-pass-1 done <commit> (use failed if the pass errored). Per-step prose (tasks completed/remaining, tools used) goes into the final report, not the log.
Spawn subagent committer (Opus, low): Run /commit.
Read ${SPEC_DIR}/tasks.md, check whether all tasks marked [X].
If all complete: Skip to step 5.
If tasks remain ([ ]): Run up to 2 additional passes (3 total). For each retry:
CONTEXT_SKILLS again (fresh context window needs them reloaded)LIBRARY_DOCS and any new documentation gathered during diagnosis/speckit.implement -- picks up uncompleted tasks automatically because only [ ] tasks remainprogress_log "${PROGRESS_FILE}" <3+N> implement-pass-N done <commit> (or failed)./commit.tasks.md -- if all complete, break out of retry loop.If still incomplete after 3 passes: Report remaining tasks with IDs and descriptions, ask user how to proceed:
When AUTONOMOUS=1, do not ask -- skip remaining tasks and continue to the report, listing the remaining task IDs/descriptions so the caller can surface them.
Interactive mode (AUTONOMOUS=0): Present summary:
${PROGRESS_FILE} plus a compact rendering via progress_render "${PROGRESS_FILE}"/ah-finalize-code to prepare for PRAutonomous mode (AUTONOMOUS=1): skip the user-facing summary; return only the artifact paths (progress file, tasks.md completion) plus a one-line status (and any remaining task IDs) to the caller.
[0] Initialize -- validate, detect tech stack + key libraries, check/resume progress
|
v
[1] Check checklists (main session, may pause for user)
|
v
[2] Load implementation context
[2a] Best-practice skills
[2b] Library docs (context7)
[2c] Dependency source (npx opensrc) -- skip if not needed
[2d] Codebase context (npx repomix) -- skip if scope is narrow
|
v
[3] Subagent: load context + /speckit.implement (pass 1) --> commit
External tools available
|
v
[4] All tasks [X]?
| |
YES NO
| |-- Diagnose blockers (external tools)
| |-- Subagent: /speckit.implement (pass 2) --> commit
| |-- All [X]? --NO--> diagnose + pass 3 --> commit
| | |
| YES All [X]? --NO--> ask user
| | |
v v YES
[5] Report <--------------------------+
committer only creates a commit via /commit.${PROGRESS_FILE} is an append-only log written by scripts/progress.sh, not an LLM-maintained markdown file. Each step appends one progress_log line; no markdown re-reads/re-writes.grep '^step|', offers resume from last incomplete step. Completed steps and their commits skipped.date -- the model never supplies timestamps or durations.specs/<branch-name>/.${PROGRESS_FILE} and report to user. Do not silently skip steps./ah-finalize-code -- handles simplification, testing, docs, code review, PR creation.spec.md metadata -- if missing, ask the user (or, when AUTONOMOUS=1, fail fast with a clear error). Steps that interact with the user (uncommitted-changes, resume, checklist gate, after-3-passes) only do so when AUTONOMOUS=0; with the autonomous flag they take deterministic defaults or fail fast, as noted at each step.development
Use when: (1) building a skill/command that orchestrates other skills by spawning subagents, (2) a delegated sub-skill reads git working-tree state (e.g. `git branch --show-current`) instead of taking it as an argument, (3) a sub-skill is supposed to "reflect on this session" / capture session learnings (like revise-claude-md) but runs in a subagent, (4) base branch ends up wrong or a session-reflection step sees an empty/trivial context. Keywords: orchestrator, subagent isolated context, git branch --show-current, base branch checkout, revise-claude-md, this session.
development
Run the full ArinHub feature-development pipeline end-to-end with the "ah" prefix. Use for "ah workflow", "ah run workflow", "ah full workflow", a GitHub issue URL to take from issue to PR, or any request to run the whole ah pipeline at once. Takes a feature description + issue number + base branch, OR a GitHub issue URL (resolved via references/resolve-gh-issue.md). Sequentially launches subagents: ah-create-prd-adr -> ah-create-tasks -> ah-implement-tasks -> optional ah-check-qa verification -> ah-finalize-code (creates the PR), anchored with /goal and guarded by retry + escalation.
testing
Verify that a PR or local changes fully implement requirements from a linked GitHub issue, with the "ah" prefix. Use for "ah verify requirements coverage", "ah verify requirements coverage issue 42", "ah verify requirements coverage PR 123", or both ("PR 123, issue 42").
development
Submit a completed code review with line-specific comments and suggestions to a GitHub PR, with the "ah" prefix. Use for "ah submit code review 123".