Complexity assessment

From oimiragieo/agent-studio · View interactive version

Complexity assessment is an AI agent skill from the GitHub repository oimiragieo/agent-studio. AI-based complexity assessment for task analysis. Use when determining the appropriate workflow, phases, and validation depth for a task.

How to use this skill

Skill file

Complexity Assessment Skill

Overview

Analyze a task description and determine its true complexity to ensure the right workflow and validation depth are selected. Accuracy over speed - wrong complexity means wrong workflow means failed implementation.

Core principle: Accuracy over speed. Wrong complexity = wrong workflow = failed implementation.

When to Use

Always:

Exceptions:

Iron Laws

  1. NEVER begin planning without complexity assessment — wrong complexity tier = wrong workflow = failed implementation; always assess first, then select the appropriate workflow phases and validation depth.
  2. ALWAYS be conservative when uncertain — go higher — underestimating complexity is more dangerous than overestimating; a COMPLEX task mis-classified as STANDARD skips security review, architecture design, and comprehensive testing.
  3. ALWAYS count affected files before assigning a tier — gut-feel estimates are unreliable; scan the codebase to count files actually touched by the change before assigning SIMPLE/STANDARD/COMPLEX/EPIC.
  4. ALWAYS flag unfamiliar technologies for research — unknown tech has hidden complexity; mark any unfamiliar framework, library, or service as requiring research before proceeding with the complexity estimate.
  5. NEVER let the user's casual language lower the tier — "just a quick fix" or "small change" reflects the user's perception, not the actual technical scope; assess objectively regardless of how it is described.

Workflow Types

Determine the type of work being requested:

FEATURE

REFACTOR

INVESTIGATION

MIGRATION

SIMPLE

Complexity Tiers

SIMPLE

STANDARD

COMPLEX

Workflow

Phase 1: Load Requirements

Read the requirements document:

# Read the requirements file
cat .claude/context/requirements/[task-name].md

Extract:

Phase 2: Analyze the Task

Read the task description carefully. Look for:

Complexity Indicators (suggest higher complexity):

Simplicity Indicators (suggest lower complexity):

Phase 3: Assess Dimensions

Scope Analysis
Integration Analysis
Infrastructure Analysis
Knowledge Analysis
Risk Analysis

Phase 4: Determine Phases Needed

Based on your analysis, determine which phases are needed:

For SIMPLE tasks:

discovery → quick_spec → validation

(3 phases, no research, minimal planning)

For STANDARD tasks:

discovery → requirements → context → spec_writing → planning → validation

(6 phases, context-based spec writing)

For STANDARD tasks WITH external dependencies:

discovery → requirements → research → context → spec_writing → planning → validation

(7 phases, includes research for unfamiliar dependencies)

For COMPLEX tasks:

discovery → requirements → research → context → spec_writing → self_critique → planning → validation

(8 phases, full pipeline with research and self-critique)

Phase 5: Determine Validation Depth

Based on complexity and risk analysis, recommend validation depth:

| Risk Level | When to Use | Validation Depth |

| ------------ | ---------------------------------------------- | ----------------------------------- |

| TRIVIAL | Docs-only, comments, whitespace | Skip validation entirely |

| LOW | Single area, < 5 files, no DB/API changes | Unit tests only |

| MEDIUM | Multiple files, 1-2 areas, API changes | Unit + Integration tests |

| HIGH | Database changes, auth/security, cross-service | Unit + Integration + E2E + Security |

| CRITICAL | Payments, data deletion, security-critical | All above + Manual review + Staging |

Skip Validation Criteria (TRIVIAL):

Set only when ALL are true:

Security Scan Required when ANY apply:

Phase 6: Output Assessment

Create the structured assessment:

# Complexity Assessment: [Task Name]

## Summary

| Dimension     | Assessment                                        |
| ------------- | ------------------------------------------------- |
| Complexity    | [simple/standard/complex]                         |
| Workflow Type | [feature/refactor/investigation/migration/simple] |
| Confidence    | [0.0-1.0]                                         |

## Reasoning

[2-3 sentence explanation]

## Analysis

### Scope

- Estimated files: [number]
- Estimated areas: [number]
- Cross-cutting: [yes/no]
- Notes: [brief explanation]

### Integrations

- External services: [list]
- New dependencies: [list]
- Research needed: [yes/no]
- Notes: [brief explanation]

### Infrastructure

- Docker changes: [yes/no]
- Database changes: [yes/no]
- Config changes: [yes/no]
- Notes: [brief explanation]

### Knowledge

- Patterns exist: [yes/no]
- Research required: [yes/no]
- Unfamiliar tech: [list]
- Notes: [brief explanation]

### Risk

- Level: [low/medium/high]
- Concerns: [list]
- Notes: [brief explanation]

## Recommended Phases

1. [phase1]
2. [phase2]
3. ...

## Validation Recommendations

| Setting          | Value                              |
| ---------------- | ---------------------------------- |
| Risk Level       | [trivial/low/medium/high/critical] |
| Skip Validation  | [yes/no]                           |
| Minimal Mode     | [yes/no]                           |
| Test Types       | [unit, integration, e2e]           |
| Security Scan    | [yes/no]                           |
| Staging Required | [yes/no]                           |

**Reasoning**: [1-2 sentences explaining validation depth]

## Flags

- Needs research: [yes/no]
- Needs self-critique: [yes/no]
- Needs infrastructure setup: [yes/no]

Decision Flowchart

START
  |
  +--> Are there 2+ external integrations OR unfamiliar technologies?
  |     YES -> COMPLEX (needs research + critique)
  |     NO
  |      |
  +--> Are there infrastructure changes (Docker, DB, new services)?
  |     YES -> COMPLEX (needs research + critique)
  |     NO
  |      |
  +--> Is there 1 external integration that needs research?
  |     YES -> STANDARD + research phase
  |     NO
  |      |
  +--> Will this touch 3+ files across 1-2 areas?
  |     YES -> STANDARD
  |     NO
  |      |
  +--> SIMPLE (1-2 files, single area, no integrations)

Verification Checklist

Before completing assessment:

Common Mistakes

Underestimating Integrations

Why it's wrong: One integration can touch many files.

Do this instead: Flag research needs for any unfamiliar technology.

Ignoring Infrastructure

Why it's wrong: Docker/DB changes add significant complexity.

Do this instead: Check for infrastructure needs early.

Over-Confident

Why it's wrong: Rarely should confidence be above 0.9.

Do this instead: Be conservative. When in doubt, go higher complexity.

Integration with Other Skills

This skill works well with:

Anti-Patterns

| Anti-Pattern | Why It Fails | Correct Approach |

| --------------------------------------- | --------------------------------------------- | ------------------------------------------------- |

| Assigning SIMPLE without file scan | Underestimates actual affected file count | Count affected files before assigning tier |

| "Quick fix" language lowers tier | User perception ≠ technical scope | Assess objectively; ignore casual user framing |

| Ignoring integrations and external APIs | External dependencies add risk and complexity | List all external services/APIs in the assessment |

| Skipping research flag for unknown tech | Unfamiliar tech has invisible complexity | Flag any unfamiliar technology for research |

| Not considering rollback complexity | COMPLEX/EPIC need recovery plans | Include rollback difficulty in complexity scoring |

Memory Protocol

Before starting:

Read .claude/context/memory/learnings.md

After completing:

ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.