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…
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.
> /plugin marketplace add giuseppe-trisciuoglio/developer-kit > /plugin install developer-kit@developer-kit
How it fires
How this command gets triggered: by you, by Claude, or both.
/speckit.optimizeContext 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.
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
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.
/speckit.optimize $ARGUMENTS
| Argument | Description | |--------------|------------------------------------------| | `$ARGUMENTS` | Combined arguments passed to the command |
**Agent Selection**: To execute this task, use the following approach:
$ARGUMENTS
You **MUST** consider the user input before proceeding (if not empty).
**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.
Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` from repo root and parse JSON for:
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."
**Required files**:
**Optional files** (load if present):
**Codebase scan**:
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
**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]
**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
**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]
**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
Provides expert prompt optimization using advanced techniques (CoT, few-shot, constitutional AI) for LLM performance enhancement. Use when you need to improve…
Provides guided feature development capability with codebase understanding and architecture focus. Use when implementing a new feature from scratch.
Provides guided bug fixing and debugging capability with systematic root cause analysis. Use when encountering bugs, errors, or unexpected behavior.
Creates a GitHub pull request with branch creation, commits, and detailed description. Use when you need to submit changes for review.
Provides comprehensive GitHub pull request review with code quality, security, and best practices analysis. Use when reviewing a PR before merging.
Provides guided code refactoring capability with deep codebase understanding, compatibility options, and comprehensive verification. Use when restructuring or…