mayurpise/draft/implement

Claude Code and agent skill by mayurpise/draft

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Canonical implementation parent command. Executes the active track task-by-task using TDD and verification gates, and routes to status, coverage, or revert when the user asks for progress, measurement, or rollback explicitly.

Install

npx vskill@latest install mayurpise/draft/implement

SKILL.md

The same SKILL.md was published earlier as mayurpise/draft/implement.

Implement Track

Implement tasks from the active track's plan following the TDD workflow.

/draft:implement is the canonical implementation parent.

It owns the common execution loop and absorbs three adjacent commands when appropriate:

  • /draft:status
  • /draft:coverage
  • /draft:revert

Red Flags - STOP if you're

  • Implementing without an approved spec and plan
  • Skipping TDD cycle when workflow.md has TDD enabled
  • Marking a task [x] without fresh verification evidence
  • Batching multiple tasks into a single commit
  • Proceeding past a phase boundary without running the three-stage review
  • Writing production code before a failing test (when TDD is strict)
  • Assuming a test passes without actually running it

Verify before you mark complete. One task, one commit.

Constraints

Draft skills are designed for single-agent, single-track execution. Do not run multiple Draft commands concurrently on the same track.


Parent Contract

/draft:implement owns four execution jobs:

  1. Build the next task → baseline /draft:implement
  2. Show current execution state → /draft:status
  3. Measure implementation completeness via coverage → /draft:coverage
  4. Undo implementation safely → /draft:revert

Most developers should only need /draft:implement in the common path.

Explicit Child Modes

If the user invokes explicit child intent, route directly:

  • /draft:implement status → follow /draft:status
  • /draft:implement coverage → follow /draft:coverage
  • /draft:implement revert → follow /draft:revert

Examples:

  • /draft:implement status
  • /draft:implement coverage src/auth
  • /draft:implement revert phase 2

Explicit child mode always wins over the baseline implementation workflow.

Bare /draft:implement

Without an explicit child mode, /draft:implement should:

  • continue the active track's next task
  • surface blocked-task conditions immediately
  • run review and verification gates at phase boundaries
  • suggest or attach coverage only when the implementation state justifies it

Do not make the user remember status or coverage in the happy path just to continue safe execution.


Step 0: Route Explicit Child Modes

Before loading implementation context, check whether the request is really:

  • progress inspection
  • coverage measurement
  • rollback / undo
Route to /draft:status

Route when the user asks:

  • status
  • progress
  • what's left
  • where am I
Route to /draft:coverage

Route when the user asks:

  • coverage
  • measure tests
  • how much is covered
  • coverage for <module/path>
Route to /draft:revert

Route when the user asks:

  • revert
  • undo
  • roll back
  • revert task
  • revert phase
  • revert track

If one of these applies, route directly to the specialist workflow and stop this baseline implementation flow.


Step 1: Load Context

  1. Find active track from draft/tracks.md (look for [~] In Progress or first [ ] track)
  2. Read the track's spec.md for requirements
  3. Read the track's plan.md for task list
  4. Read draft/workflow.md for TDD and commit preferences
  5. Read draft/tech-stack.md for technical context
  6. Read draft/guardrails.md (if exists) for hard guardrails and learned conventions
  7. Check for architecture context:
  • Project-level: draft/.ai-context.md (preferred) or draft/architecture.md (graph-primary)
  • Track-level design docs: draft/tracks/<id>/hld.md (+ lld.md when present)
  • If relevant design context exists → Enable architecture mode (Story, Execution State, Skeletons)
  • If neither exists → Standard TDD workflow
  1. Load production invariants (if draft/.ai-context.md exists):
  • Read the ## INVARIANTS section (and ## CONCURRENCY if present)
  • Identify which invariants reference files this task will modify (same file or same module)
  • Keep matching invariants as active constraints for this task — these govern code generation, not just review
  • If invariants reference lock ordering, fail-closed behavior, or data integrity rules: these are non-negotiable during implementation
  1. Load graph context (if draft/graph/schema.yaml exists):

First resolve the bundled helpers:

``bash # Locate Draft's bundled helpers (cwd is the user's project; ${CLAUDE_PLUGIN_ROOT} # is not exported into skill Bash). See core/shared/tool-resolver.md. DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools" [ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)" [ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)" [ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools" ``

  • Run "$DRAFT_TOOLS/hotspot-rank.sh" --repo . — check if any files this task will modify appear as hotspots
  • If modifying a hotspot file (high fanIn), warn: "This task modifies {file} (fanIn={N}). Changes here affect many downstream files. Consider running a graph impact query."
  • Query "$DRAFT_TOOLS/graph-impact.sh"/"$DRAFT_TOOLS/graph-callers.sh" for the module(s) being modified — gives file-level dependency context
  • See core/shared/graph-query.md for on-demand query subroutines (callers, impact)
  1. Update the track's entry in draft/tracks.md from [ ] to [~] In Progress

If no active track found:

  • Tell user: "No active track found. Run /draft:plan to create or resume planned work."

Architecture / Design Mode Activation:

  • Automatically enabled when .ai-context.md, graph-primary architecture.md, or track hld.md/lld.md exists.
  • Project-level context from /draft:init.
  • Track-level design docs from /draft:decompose.

Step 1.5: Readiness Gate (Fresh Start Only)

Skip if: Any task in plan.md is already [x] — the track is in progress, this check has already passed.

Run once, before the first task of a new track:

AC Coverage Check

For each acceptance criterion in spec.md:

  • Verify at least one task in plan.md references or addresses it
  • If an AC has no corresponding task, flag it: "⚠️ AC: '[criterion]' has no task in plan.md"
Sync Check (if .ai-context.md exists)

Compare the synced_to_commit values in the YAML frontmatter of spec.md and plan.md.

  • Skip if either file has no YAML frontmatter or no synced_to_commit field (quick-mode tracks omit it).
  • If they differ: "⚠️ Spec and plan were synced to different commits — verify they are still aligned."
Result

Issues found: List them, then ask:

text
Readiness issues found (see above). Proceed anyway or update first? [proceed/update]
  • proceed → add a ## Notes entry in plan.md listing the issues, then continue to Step 2
  • update → stop here and let the user refine spec or plan before re-running

No issues: Print Readiness check passed. and continue to Step 2.

Step 1.7: Testing Strategy Loading

Before starting TDD cycle for the first task:

  1. Check for testing strategy:
  • Track-level: draft/tracks/<id>/testing-strategy.md
  • Project-level: draft/testing-strategy.md or draft/testing-strategy-latest.md
  1. If found: load coverage targets, test boundaries, and strategy into TDD context
  2. If not found and TDD is enabled: suggest "Run /draft:testing-strategy to define test approach"
Bug Track Test Guardrail

If track type is bugfix (from metadata.json):

text
BEFORE writing any test file:
ASK: "This is a bug fix track. Want me to write tests as part of the fix? [Y/n]"
If declined: skip TDD cycle, note in plan.md: "Tests: developer-handled"

Step 2: Find Next Task

Scan plan.md for the first uncompleted task:

  • [ ] = Pending (pick this one)
  • [~] = In Progress (resume this one)
  • [x] = Completed (skip)
  • [!] = Blocked (skip - requires manual intervention)

IMPORTANT: If blocked task found, notify user:

  • "Task [task description] is marked [!] Blocked"
  • Show the blocked task details and recovery message
  • "Resolve the blockage manually before continuing implementation"
  • Do NOT attempt to implement blocked tasks

If resuming [~] task, check for partial work.

Implementation-State Escalations

After choosing the next task, check whether baseline implementation should remain in build mode or whether it should surface another execution helper.

Escalate to Status-Style Summary

If the track has:

  • many blocked tasks
  • no obvious next runnable task
  • conflicting in-progress markers

then present a concise status summary before proceeding so the user can see the execution state clearly.

This does not require fully routing to /draft:status; it is an implementation-owned checkpoint.

Escalate to Coverage Guidance

If the implementation is at one of these points:

  • phase just completed
  • track just completed
  • high-risk module just changed and tests exist but coverage is unknown

then /draft:implement should suggest coverage or auto-attach it when the workflow and user intent imply measurement is expected.

Examples:

text
Implementation checkpoint:
- Phase 2 is complete
- Next recommended action: /draft:implement coverage
- Reason: high-risk auth code changed and coverage has not been measured for this phase
Escalate to Revert Guidance

If the selected task is blocked because earlier implementation appears invalid, conflicting, or partially reverted, /draft:implement should recommend /draft:implement revert explicitly rather than pushing forward blindly.

Step 2.5: Write Story (Architecture Mode Only)

Activation: Only runs when .ai-context.md, graph-primary architecture.md, or track hld.md/lld.md exists.

When the next task involves creating or substantially modifying a code file:

  1. Check if file already has a Story comment - If yes, skip this step
  2. Skip for trivial tasks - Config files, type definitions, simple one-liners
  3. Write a natural-language algorithm description as a comment block at the top of the target file
Story Format
text
// Story: [Module/File Name]
//
// Input: [what this module/function receives]
// Process:
// 1. [first algorithmic step]
// 2. [second algorithmic step]
// 3. [third algorithmic step]
// Output: [what this module/function produces]
//
// Dependencies: [what this module relies on]
// Side effects: [any mutations, I/O, or external calls]

Adapt comment syntax to the language (# for Python, /* */ for CSS, etc.).

CHECKPOINT (MANDATORY)

STOP. Present the Story to the developer for review.

  • Developer may refine, modify, or rewrite the Story
  • Do NOT proceed to execution state or implementation until Story is approved
  • Developer can say "skip" to bypass this checkpoint for the current task

See core/agents/architect.md for story writing guidelines.


Step 3: Execute Task

Step 3.0: Design Before Code (Architecture Mode Only)

Activation: Only runs when .ai-context.md, graph-primary architecture.md, or track hld.md/lld.md exists. Skip for trivial tasks - Config updates, type-only changes, single-function tasks where the design is obvious.

3.0a. Execution State Design

Study the control flow for the task and propose intermediate state variables:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
39
Repository forks
5
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mayurpise/draft/implement/badge)](https://verified-skill.com/skills/mayurpise/draft/implement)

Something wrong with this skill or its page? Tell us.