Smart Code To Task
A command template for utilities workflows. Streamlines development with pre-configured patterns and best practices.
Smart Code to Task
Analyze a codebase or feature request and generate a structured task breakdown with dependencies, effort estimates, and priority ordering for project management tools.
When to Use This Command
Run this command when...
- You have a feature request and need to break it into implementable, trackable tasks
- You want to generate tickets for Jira, Linear, or GitHub Issues from codebase analysis
- You are planning a sprint and need to estimate and sequence tasks with dependency ordering
Avoid this command when...
- You already have a detailed task list and just need to implement it
- The work is a single well-defined bug fix that does not need decomposition
Quick Start
# .claude/commands/smart-code-to-task.md --- allowed-tools: ["Read", "Grep", "Glob", "WebSearch"] --- Analyze the codebase and the provided feature description. Generate a task breakdown with dependencies, estimates, and priority. Output in a format suitable for bulk import.
Example usage:
/smart-code-to-task "Add OAuth2 login with Google and GitHub providers"
Example output:
Task Breakdown: OAuth2 Login
============================
1. [P0] Set up OAuth2 provider configuration (2h)
Dependencies: none
2. [P0] Implement Google OAuth callback handler (3h)
Dependencies: Task 1
3. [P0] Implement GitHub OAuth callback handler (3h)
Dependencies: Task 1
4. [P1] Add login button components (2h)
Dependencies: Tasks 2, 3
5. [P1] Update session management for OAuth (3h)
Dependencies: Task 1
6. [P2] Write integration tests (4h)
Dependencies: Tasks 2, 3, 4, 5
Total estimate: 17h (3 working days)
Core Concepts
| Concept | Description |
|---|---|
| Feature decomposition | Breaks a feature into atomic, implementable work items |
| Dependency mapping | Identifies which tasks must complete before others can begin |
| Effort estimation | Estimates hours based on code complexity and scope |
| Priority assignment | Ranks tasks by criticality (P0 = blocker, P2 = nice-to-have) |
Feature Request --> Analyze Codebase --> Identify Components
|
+----+----+----+
| | | |
Tasks with Dependencies
| | | |
+----+----+----+
|
Estimate + Prioritize
|
Task List Output
Configuration
| Option | Default | Description |
|---|---|---|
format | markdown | Output format (markdown, json, csv, linear) |
granularity | medium | Task size target (fine = 1-2h, medium = 2-4h, coarse = 4-8h) |
include-tests | true | Generate explicit test-writing tasks |
include-docs | false | Generate documentation update tasks |
max-tasks | 20 | Maximum number of tasks to generate |
Best Practices
- Be specific in the feature description -- "add login" is too vague; "add OAuth2 login with Google and GitHub using PKCE flow" generates far better tasks.
- Review estimates critically -- automated estimates are starting points, not commitments to stakeholders.
- Check dependency order -- ensure no task depends on something that appears after it in the sequence.
- Include test tasks -- testing is often underestimated; explicit test tasks prevent it from being skipped.
- Import into your tool -- use json or csv format to bulk-import tasks into Jira, Linear, or GitHub Projects.
Common Issues
- Tasks too granular -- set granularity to
coarsefor high-level planning orfinefor sprint-level detail. - Missing dependencies -- the analyzer may miss implicit dependencies like database migrations. Review the dependency graph manually.
- Estimates feel inaccurate -- estimates are based on code complexity heuristics. Calibrate them against your team's actual velocity.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.