/speckit.optimize
Provides task workflow optimization by analyzing dependencies, parallelization opportunities, and subagent delegation strategy for tasks.md. Use when you need to improve task execution efficiency.
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/speckit.optimize
Context preview
What this command does when you run it.
Provides task workflow optimization by analyzing dependencies, parallelization opportunities, and subagent delegation strategy for tasks.md. Use when you need to improve task execution efficiency.
Command definition
speckit.optimize.mddescription: Provides task workflow optimization by analyzing dependencies, parallelization opportunities, and subagent delegation strategy for tasks.md. Use when you need to improve task execution efficiency.
argument-hint: "[optional-strategy]"
allowed-tools: Read, Glob, Grep, Bash
Task Workflow Optimization for tasks.md
Overview
Provides task workflow optimization by analyzing dependencies, parallelization opportunities, and subagent delegation strategy for tasks.md. Use when you need to improve task execution efficiency.
Usage
/speckit.optimize $ARGUMENTS
Arguments
| Argument | Description | |--------------|------------------------------------------| | `$ARGUMENTS` | Combined arguments passed to the command |
Execution Steps
Execution Instructions
**Agent Selection**: To execute this task, use the following approach:
- Primary: Use `general-purpose` agent with appropriate domain expertise
- Or use specialized agent if available for the specific task type
User Input
$ARGUMENTS
You **MUST** consider the user input before proceeding (if not empty).
Outline
**Goal**: Analyze tasks.md to optimize the implementation workflow by identifying parallelization opportunities, task dependencies, resource requirements, and generating an optimized execution plan with subagent delegation strategy. This command prepares tasks.md for efficient execution via `/speckit.implement`.
**When to run**: After `/speckit.check-integration` completes, BEFORE `/speckit.implement` executes tasks.
**Critical Principle**: This command NEVER modifies tasks.md or code files. It only analyzes and reports optimization recommendations. Output is a READ-ONLY optimization report.
1. Setup & Prerequisites
Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` from repo root and parse JSON for:
- FEATURE_DIR (absolute path)
- TASKS file path
- AVAILABLE_DOCS list
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
Abort if tasks.md is missing with error: "No tasks.md found. Run `/speckit.tasks` first."
2. Load Optimization Context
**Required files**:
- tasks.md: Complete task list with phases, IDs, descriptions, and parallelization markers [P]
- plan.md: Tech stack, architecture, team structure
- spec.md: Feature requirements and complexity assessment
**Optional files** (load if present):
- data-model.md: Data dependencies between tasks
- contracts/: API contract dependencies
- research.md: Technical constraints and decisions
**Codebase scan**:
- Identify project structure and complexity
- Map existing test patterns (unit, integration, e2e)
- Assess resource requirements (memory, CPU, external services)
- List available subagent types from available configuration
3. Parse Tasks Structure
Extract task information:
For each task in tasks.md:
- Task ID: Extract [ID] (e.g., T001, T126)
- Parallelization marker: Extract [P] if present
- Phase: Which phase/group task belongs to
- Description: Full task description
- Dependencies: Infer from description or explicit phase ordering
- Complexity: Assess as LOW/MEDIUM/HIGH/CRITICAL based on:
* Lines of code expected
* Test coverage required
* External dependencies (databases, APIs)
* Integration points
4. Dependency Analysis
**Build dependency graph**:
Task → Task Dependencies Analysis:
CRITICAL (blocking):
- Phase 1 → Phase 2 (Phase 2 blocked until Phase 1 complete)
- Phase 2 → Phase 3+ (Phase 3+ blocked until Phase 2 complete)
- Within-phase: Tasks without [P] marker may have implicit dependencies
IMPLICIT DEPENDENCIES:
- T002 (pom.xml) → T018 (configuration properties)
- Configuration tasks → Infrastructure implementation
- Domain models → Repository implementations
- Service implementations → Test infrastructure
**Output**:
DEPENDENCY ANALYSIS
Blocking Dependencies (Sequential):
- Phase 1 → Phase 2: [BLOCKING] Phase 1 must complete before Phase 2 starts
- Phase 2 → User Stories: [BLOCKING] Foundational layer required for all user story work
Critical Internal Dependencies:
- [Task A] → [Task B]: [Reason] (Must complete A before starting B)
- [Task X] → [Task Y/Z]: [Reason] (Task X blocks multiple dependents)
Independent Task Groups (Can parallelize):
- Group [N]: Tasks [ID, ID, ID] - All marked [P], no internal dependencies
* Estimated parallel execution time: [minutes]
* Resource requirement: [CPU/Memory profile]
5. Parallelization Opportunities
**Identify parallelizable task groups**:
PARALLELIZATION STRATEGY
Within-Phase Parallelization:
- [P] marked tasks: Can run simultaneously (different files, no dependencies)
- Grouped by agent type for efficient team allocation
Potential Parallelization:
- Tasks that could be parallelized with refactoring
- Risks: List any hidden dependencies or integration points
- Recommendation: Whether to parallelize or keep sequential
Sequential Requirements:
- Tasks that MUST run serially (blocking relationships)
- Reasons: Dependency chains, shared state, integration points
6. Subagent Assignment Strategy
**Analyze workload distribution**:
SUBAGENT DELEGATION ANALYSIS
Task Distribution by Complexity:
- CRITICAL tasks: [Count] (needs expert/experienced subagent)
- HIGH tasks: [Count] (needs intermediate subagent)
- MEDIUM tasks: [Count] (can distribute across team)
- LOW tasks: [Count] (can batch or auto-run)
Required Subagent Types:
- spring-boot-backend-development-expert: [Task IDs] - [Time estimate]
- spring-boot-test-expert: [Task IDs] - [Time estimate]
- [Other specialists]: [Task IDs] - [Time estimate]
Resource Constraints:
- Concurrent subagents available: [N]
- Time per subagent batch: [minutes]
- Memory per subagent: [MB estimate]
7. Execution Phases & Timeline
**Generate optimized execution plan**:
OPTIMIZED EXE
Read more
description: Provides task workflow optimization by analyzing dependencies, parallelization opportunities, and subagent delegation strategy for tasks.md. Use when you need to improve task execution efficiency. argument-hint: "[optional-strategy]" allowed-tools: Read, Glob, Grep, Bash
Task Workflow Optimization for tasks.md
Overview
Provides task workflow optimization by analyzing dependencies, parallelization opportunities, and subagent delegation strategy for tasks.md. Use when you need to improve task execution efficiency.
Usage
/speckit.optimize $ARGUMENTS
Arguments
| Argument | Description | |--------------|------------------------------------------| | `$ARGUMENTS` | Combined arguments passed to the command |
Execution Steps
Execution Instructions
**Agent Selection**: To execute this task, use the following approach:
- Primary: Use `general-purpose` agent with appropriate domain expertise
- Or use specialized agent if available for the specific task type
User Input
$ARGUMENTS
You **MUST** consider the user input before proceeding (if not empty).
Outline
**Goal**: Analyze tasks.md to optimize the implementation workflow by identifying parallelization opportunities, task dependencies, resource requirements, and generating an optimized execution plan with subagent delegation strategy. This command prepares tasks.md for efficient execution via `/speckit.implement`.
**When to run**: After `/speckit.check-integration` completes, BEFORE `/speckit.implement` executes tasks.
**Critical Principle**: This command NEVER modifies tasks.md or code files. It only analyzes and reports optimization recommendations. Output is a READ-ONLY optimization report.
1. Setup & Prerequisites
Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` from repo root and parse JSON for:
- FEATURE_DIR (absolute path)
- TASKS file path
- AVAILABLE_DOCS list
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
Abort if tasks.md is missing with error: "No tasks.md found. Run `/speckit.tasks` first."
2. Load Optimization Context
**Required files**:
- tasks.md: Complete task list with phases, IDs, descriptions, and parallelization markers [P]
- plan.md: Tech stack, architecture, team structure
- spec.md: Feature requirements and complexity assessment
**Optional files** (load if present):
- data-model.md: Data dependencies between tasks
- contracts/: API contract dependencies
- research.md: Technical constraints and decisions
**Codebase scan**:
- Identify project structure and complexity
- Map existing test patterns (unit, integration, e2e)
- Assess resource requirements (memory, CPU, external services)
- List available subagent types from available configuration
3. Parse Tasks Structure
Extract task information:
For each task in tasks.md: - Task ID: Extract [ID] (e.g., T001, T126) - Parallelization marker: Extract [P] if present - Phase: Which phase/group task belongs to - Description: Full task description - Dependencies: Infer from description or explicit phase ordering - Complexity: Assess as LOW/MEDIUM/HIGH/CRITICAL based on: * Lines of code expected * Test coverage required * External dependencies (databases, APIs) * Integration points
4. Dependency Analysis
**Build dependency graph**:
Task → Task Dependencies Analysis: CRITICAL (blocking): - Phase 1 → Phase 2 (Phase 2 blocked until Phase 1 complete) - Phase 2 → Phase 3+ (Phase 3+ blocked until Phase 2 complete) - Within-phase: Tasks without [P] marker may have implicit dependencies IMPLICIT DEPENDENCIES: - T002 (pom.xml) → T018 (configuration properties) - Configuration tasks → Infrastructure implementation - Domain models → Repository implementations - Service implementations → Test infrastructure
**Output**:
DEPENDENCY ANALYSIS Blocking Dependencies (Sequential): - Phase 1 → Phase 2: [BLOCKING] Phase 1 must complete before Phase 2 starts - Phase 2 → User Stories: [BLOCKING] Foundational layer required for all user story work Critical Internal Dependencies: - [Task A] → [Task B]: [Reason] (Must complete A before starting B) - [Task X] → [Task Y/Z]: [Reason] (Task X blocks multiple dependents) Independent Task Groups (Can parallelize): - Group [N]: Tasks [ID, ID, ID] - All marked [P], no internal dependencies * Estimated parallel execution time: [minutes] * Resource requirement: [CPU/Memory profile]
5. Parallelization Opportunities
**Identify parallelizable task groups**:
PARALLELIZATION STRATEGY Within-Phase Parallelization: - [P] marked tasks: Can run simultaneously (different files, no dependencies) - Grouped by agent type for efficient team allocation Potential Parallelization: - Tasks that could be parallelized with refactoring - Risks: List any hidden dependencies or integration points - Recommendation: Whether to parallelize or keep sequential Sequential Requirements: - Tasks that MUST run serially (blocking relationships) - Reasons: Dependency chains, shared state, integration points
6. Subagent Assignment Strategy
**Analyze workload distribution**:
SUBAGENT DELEGATION ANALYSIS Task Distribution by Complexity: - CRITICAL tasks: [Count] (needs expert/experienced subagent) - HIGH tasks: [Count] (needs intermediate subagent) - MEDIUM tasks: [Count] (can distribute across team) - LOW tasks: [Count] (can batch or auto-run) Required Subagent Types: - spring-boot-backend-development-expert: [Task IDs] - [Time estimate] - spring-boot-test-expert: [Task IDs] - [Time estimate] - [Other specialists]: [Task IDs] - [Time estimate] Resource Constraints: - Concurrent subagents available: [N] - Time per subagent batch: [minutes] - Memory per subagent: [MB estimate]
7. Execution Phases & Timeline
**Generate optimized execution plan**:
OPTIMIZED EXE
Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.
Repo: giuseppe-trisciuoglio/developer-kit
Other commands on developer-kit.
- /devkit.prompt-optimize
Provides expert prompt optimization using advanced techniques (CoT, few-shot, constitutional AI) for LLM performance enhancement. Use when you need to improve prompt quality or optimize LLM interactions.
Open command - /devkit.feature-development
Provides guided feature development capability with codebase understanding and architecture focus. Use when implementing a new feature from scratch.
Open command - /devkit.fix-debugging
Provides guided bug fixing and debugging capability with systematic root cause analysis. Use when encountering bugs, errors, or unexpected behavior.
Open command - /devkit.github.create-pr
Creates a GitHub pull request with branch creation, commits, and detailed description. Use when you need to submit changes for review.
Open command - /devkit.github.review-pr
Provides comprehensive GitHub pull request review with code quality, security, and best practices analysis. Use when reviewing a PR before merging.
Open command - /devkit.refactor
Provides guided code refactoring capability with deep codebase understanding, compatibility options, and comprehensive verification. Use when restructuring or improving existing code.
Open command

