home / skills / yonatangross / orchestkit / assess-complexity

assess-complexity skill

/plugins/ork/skills/assess-complexity

This skill analyzes a codebase to assess task complexity and guide task breakdown and planning before work.

npx playbooks add skill yonatangross/orchestkit --skill assess-complexity

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
4.4 KB
---
name: assess-complexity
description: Assess task complexity with automated codebase metrics. Use before starting work to determine if task needs breakdown.
context: fork
user-invocable: true
allowedTools: [Read, Grep, Glob, Bash, Task, mcp__memory__search_nodes]
skills: [quality-gates, brainstorming, recall]
argument-hint: [file-or-directory]
tags:
  - quality-gates
  - planning
  - complexity
  - assessment
---

# Assess Complexity

Evaluate task complexity using automated codebase analysis before starting implementation work.

## Overview

- Determining if a task is ready for implementation
- Deciding whether to break down a large task
- Estimating effort before committing to work
- Identifying high-risk areas in the codebase
- Planning sprint work with complexity scores

## Usage

Assess complexity for: **$ARGUMENTS**

## Step 1: Gather Metrics

Run the analysis script to collect codebase metrics:

!`./scripts/analyze-codebase.sh $ARGUMENTS`

## Step 2: Assess Each Criterion

Score each criterion from 1-5 based on the metrics and your understanding:

### 1. Lines of Code

| Range | Score |
|-------|-------|
| < 50 lines | 1 |
| 50-200 lines | 2 |
| 200-500 lines | 3 |
| 500-1500 lines | 4 |
| 1500+ lines | 5 |

### 2. Time Estimate

| Duration | Score |
|----------|-------|
| < 30 minutes | 1 |
| 30 min - 2 hours | 2 |
| 2-8 hours | 3 |
| 8-24 hours (1-3 days) | 4 |
| 24+ hours (3+ days) | 5 |

### 3. Number of Files

| Count | Score |
|-------|-------|
| 1 file | 1 |
| 2-3 files | 2 |
| 4-10 files | 3 |
| 11-25 files | 4 |
| 26+ files | 5 |

### 4. Dependencies Count

| Unique Modules | Score |
|----------------|-------|
| 0 dependencies | 1 |
| 1 dependency | 2 |
| 2-3 dependencies | 3 |
| 4-6 dependencies | 4 |
| 7+ dependencies | 5 |

### 5. Unknowns/Uncertainty

| Level | Score |
|-------|-------|
| No unknowns - Everything clear | 1 |
| Minimal - 1-2 minor questions | 2 |
| Some - Several questions, researchable | 3 |
| Significant - Many questions, requires exploration | 4 |
| Many - Unclear scope, needs prototyping | 5 |

### 6. Cross-Cutting Concerns

| Scope | Score |
|-------|-------|
| Isolated change - Single module | 1 |
| Minor integration - 2-3 modules | 2 |
| Multiple integrations - 4-5 modules | 3 |
| Cross-cutting - Affects many modules | 4 |
| Architectural - System-wide impact | 5 |

### 7. Risk Level

| Risk | Score |
|------|-------|
| No risk - Trivial change | 1 |
| Low risk - Well-understood pattern | 2 |
| Medium risk - Some complexity, testable | 3 |
| High risk - Complex logic, many edge cases | 4 |
| Very high risk - Mission-critical, high stakes | 5 |

## Step 3: Calculate Total Score

**Sum all scores:** _____ / 35

**Calculate average:** Total / 7 = _____

### Complexity Level Assignment

| Average Score | Level | Classification |
|---------------|-------|----------------|
| 1.0 - 1.4 | 1 | Trivial |
| 1.5 - 2.4 | 2 | Simple |
| 2.5 - 3.4 | 3 | Moderate |
| 3.5 - 4.4 | 4 | Complex |
| 4.5 - 5.0 | 5 | Very Complex |

## Step 4: Decision

### Level 1-3: Proceed

Task is manageable. Continue with implementation.

### Level 4-5: Break Down

Task is too complex. Decompose into subtasks and reassess each part.

## Output Format

Provide assessment in this format:

```
## Complexity Assessment: [Target]

**Date:** YYYY-MM-DD
**Assessor:** [Agent Name]

### Scores
| Criterion | Score |
|-----------|-------|
| Lines of Code | X/5 |
| Time Estimate | X/5 |
| Files Affected | X/5 |
| Dependencies | X/5 |
| Unknowns | X/5 |
| Cross-Cutting | X/5 |
| Risk Level | X/5 |
| **Total** | **XX/35** |

### Result
**Average Score:** X.X
**Complexity Level:** X ([Classification])
**Can Proceed:** Yes/No

### Recommendation
[Next steps based on complexity level]
```

## Related Skills

- quality-gates - Full gate checking workflow
- brainstorming - Breaking down complex tasks
- architecture-decision-record - Documenting decisions for complex work

## Capability Details

### complexity-scoring
**Keywords:** complexity, assessment, scoring, estimate, effort
**Solves:**
- How complex is this task?
- Should I break this down first?
- What is the effort estimate?

### codebase-analysis
**Keywords:** metrics, lines of code, files, dependencies, analysis
**Solves:**
- How many files will this touch?
- What are the dependencies?
- How much code is involved?

### risk-assessment
**Keywords:** risk, unknowns, cross-cutting, architectural
**Solves:**
- What are the risks of this change?
- Are there unknowns to address first?
- Does this have system-wide impact?

Overview

This skill assesses task complexity by running automated codebase metrics and applying a seven-criterion scoring rubric. Use it before starting work to decide if a task is ready, needs decomposition, or requires risk mitigation. It produces a clear score, a complexity level, and actionable recommendations.

How this skill works

The skill runs an analysis script to gather metrics (lines of code, files affected, dependencies, etc.), then scores seven criteria from 1–5: LOC, time estimate, files, dependencies, unknowns, cross-cutting concerns, and risk. Scores are summed and averaged to map to a five-level complexity classification and a proceed/breakdown decision. The output follows a standardized assessment format you can paste into tickets or sprint notes.

When to use it

  • Before committing to implement a new feature or change
  • When estimating effort for sprint planning or PRs
  • To decide whether to decompose a large task
  • When evaluating high-risk or cross-cutting changes
  • During backlog grooming to prioritize work

Best practices

  • Run the analysis script with relevant path/args to scope metrics accurately
  • Combine automated metrics with a quick manual review for unknowns and risk
  • Score conservatively for unfamiliar areas to surface hidden work
  • Break down level 4–5 tasks into smaller pieces and reassess each
  • Attach the assessment output to the issue or PR for traceability

Example use cases

  • Assessing a refactor that touches multiple services and shared libs
  • Estimating effort for a new API endpoint that adds several modules
  • Deciding whether a complex UI change should be split into iterations
  • Evaluating risk and unknowns before a migration or dependency upgrade
  • Quickly scoring small bug fixes versus feature prototypes

FAQ

What input does the analysis script need?

Provide target paths or arguments that limit the scan to the files or modules under consideration (e.g., component path or package).

How strict should scoring be for unknowns?

Err on the side of higher scores when scope or behavior is unclear; this encourages early prototyping or spike tasks.