AG

agent-spec-estimate

Estimates development effort, round counts, and risks from agent-spec contract files.

Install

mkdir -p .claude/skills/agent-spec-estimate && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11226" && unzip -o skill.zip -d .claude/skills/agent-spec-estimate && rm skill.zip

Installs to .claude/skills/agent-spec-estimate

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

CRITICAL: Use for estimating work effort from agent-spec Task Contracts. Triggers on: estimate, estimation, how long, work effort, round count, time estimate, scope, sizing, cost, budget, planning, sprint, capacity, "how many rounds", "how long will this take", "estimate this spec", 估算, 工作量, 多久, 时间估算, 预估, 工时, 规模, 评估工作量, "这个 spec 要多久", "估算一下", "工作量评估"
352 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Estimate work effort
  • Rank tasks by effort
  • Assess project risk
  • Calibrate estimates

How it works

It parses Task Contracts to map scenarios and constraints to round-based effort estimates.

Inputs & outputs

You give it
Task contract spec file
You get back
Round-based effort estimate

When to use agent-spec-estimate

  • Estimate work for a project spec
  • Rank multiple tasks by effort
  • Assess project risk from contracts
  • Calibrate estimates based on history

About this skill

Agent Spec Estimate

Version: 1.3.1 | Last Updated: 2026-08-14 | Tracks: agent-spec 1.4.0

You are an expert at estimating AI agent work effort from structured Task Contracts. Help users by:

  • Estimating specs: Read a .spec/.spec.md file and produce a round-based effort estimate
  • Comparing tasks: Rank multiple specs by effort for sprint planning
  • Risk assessment: Identify which Contract elements drive uncertainty
  • Calibrating: Adjust estimates based on actual lifecycle retry counts

IMPORTANT: CLI Prerequisite Check

Before running any agent-spec command, Claude MUST check:

command -v agent-spec || cargo install agent-spec

If agent-spec is not installed, inform the user:

agent-spec CLI not found. Install with: cargo install agent-spec

Quick Reference

ActionCommandOutput
Estimate a specagent-spec contract <spec> then apply estimationRound-based breakdown table
Batch estimateRun on all specs in specs/Sorted effort ranking
Calibrate from historyagent-spec explain <spec> --historyCompare predicted vs actual rounds
Library sizing signal (0.3.0)agent-spec audit --spec-dir specs --format jsonCounts of rules/scenarios/unproven-rules/open-questions to weight remaining effort

0.3.0 signal: audit gives a mechanical library-level view — unproven_rules and open_questions are leading indicators of remaining work (a Rule with no proving Example, or an open Discovery question, is unfinished). Use it as input to risk coefficients, not as a substitute for round estimation.

Core Method

Contract → Rounds Mapping

A Task Contract has structured elements that map directly to estimation inputs:

Contract ElementEstimation InputHow It Affects Estimate
Completion Criteria scenariosModule decompositionEach scenario ≈ 1 module (1-15 rounds)
Decisions (fixed tech choices)Risk reductionKnown tech → risk 1.0; new tech → risk 1.3-1.5
Boundaries: Allowed ChangesScope breadthMore paths → more modules; fewer paths → focused
Boundaries: ForbiddenConstraint overheadEach prohibition adds 0-1 verification rounds
Constraints: Must NOTStructural checksPattern avoidance adds ~1 round per constraint
Out of ScopeScope controlReduces estimate (explicitly excluded work)
inherits: project/orgInherited overheadInherited constraints add ~1-2 rounds for compliance
Exception scenario countQuality indicatorMore exceptions = better spec but more rounds

Scenario Complexity Tiers

Scenario TypeBase RoundsSignal
Happy path with known pattern1-2Test selector points to simple CRUD/boilerplate
Happy path with business logic3-5Step table with multiple fields, custom validation
Error/exception path1-3Usually simpler than happy path (reject early)
Boundary/integration scenario3-8Involves file I/O, external calls, or multi-step state
Exploratory/under-documented5-10No Decisions for the tech, or sparse step descriptions

Risk Coefficient from Contract Signals

Contract SignalRiskRationale
Decisions list specific tech + version1.0No technology shopping
Decisions exist but are vague1.3Agent may need to explore
No Decisions section1.5Agent must choose, retry likely
Boundaries are tight (2-3 paths)1.0Clear scope
Boundaries are broad (10+ paths)1.3More surface area for mistakes
inherits: project with strict constraints1.2Must satisfy inherited rules too
Step text uses quantified assertions1.0Deterministic test expected
Step text uses vague language1.5Test may not match intent

Estimation Procedure

Step 1: Read the Contract

agent-spec contract specs/task.spec.md

Extract: scenario count, decision count, boundary path count, constraint count.

Step 2: Decompose Scenarios into Modules

Each scenario is a potential module. Group related scenarios:

  • If 3 scenarios all test the same endpoint → 1 module (implementation) + 1 module (tests)
  • If scenarios span different subsystems → separate modules

Step 3: Estimate Rounds per Module

Apply the Scenario Complexity Tiers table. For each module:

base_rounds = sum of scenario base rounds in this module

Step 4: Apply Risk Coefficients

Read the Contract's Decisions and Boundaries. Apply the Risk Coefficient table:

effective_rounds = base_rounds × risk_coefficient

Step 5: Add Integration + Verification Overhead

integration_rounds = 10-15% of base total
verification_rounds = ceil(scenario_count / 3)  # ~1 lifecycle run per 3 scenarios
total_rounds = effective_rounds + integration_rounds + verification_rounds

Step 6: Convert to Wallclock Time

wallclock_minutes = total_rounds × 3  # default 3 min/round

Adjust minutes_per_round:

  • Fast iteration, agent barely paused: 2 min
  • Human reviews each step: 4 min
  • Manual testing needed (mobile, hardware): 5 min

Output Format

Always produce this exact structure:

### Estimate: [spec name]

#### Contract Summary
- **Scenarios**: N (H happy + E exception)
- **Decisions**: N fixed choices
- **Boundaries**: N allowed paths, M forbidden rules
- **Inherited constraints**: N

#### Module Breakdown

| # | Module | Scenarios | Base Rounds | Risk | Effective | Notes |
|---|--------|-----------|-------------|------|-----------|-------|
| 1 | ...    | S1, S2    | N           | 1.x  | M         | why   |

#### Summary

- **Base rounds**: X
- **Integration**: +Y rounds
- **Verification**: +Z rounds (lifecycle retries)
- **Risk-adjusted total**: T rounds
- **Estimated wallclock**: A - B minutes (at N min/round)

#### Risk Factors
1. [specific risk from Contract analysis]
2. [...]

#### Confidence
- HIGH: Contract has specific Decisions, tight Boundaries, quantified steps
- MEDIUM: Some vague areas but overall clear
- LOW: Missing Decisions, broad scope, vague step language

Calibration: Predicted vs Actual

After a task is complete, compare prediction to reality:

agent-spec explain specs/task.spec.md --history

The retry count from run logs tells you the actual verification rounds. Compare:

predicted_verification_rounds vs actual_retries

If actual > predicted × 1.5 → the spec had hidden complexity. Note this for future calibration.

Batch Estimation for Sprint Planning

To estimate all active specs:

for spec in specs/task-*.spec.md; do
  echo "=== $(basename $spec) ==="
  agent-spec contract "$spec" 2>/dev/null | head -20
  echo
done

Then apply the estimation procedure to each, and sort by total rounds:

### Sprint Capacity Plan

| Spec | Rounds | Wallclock | Risk | Priority |
|------|--------|-----------|------|----------|
| task-a | 12 | ~36 min | LOW | P0 |
| task-b | 28 | ~84 min | MED | P1 |
| task-c | 45 | ~135 min | HIGH | P2 |

**Total**: 85 rounds ≈ 4.25 hours of agent time

Common Mistakes

MistakeWhy It's WrongFix
Estimating by line count500 lines of boilerplate ≠ hardEstimate by scenario complexity
Anchoring to human time"A developer would take 2 weeks"Start from rounds, convert last
Ignoring exception scenariosThey seem simple but add upCount ALL scenarios, not just happy path
Forgetting verification roundsAgent must run lifecycle N timesAdd ceil(scenarios/3) rounds
Missing inherited constraintsproject.spec adds hidden workCheck inherits: and count parent constraints

Dependency Graph for Planning

Use agent-spec graph to visualize spec dependencies and critical path before estimating a batch:

agent-spec graph --spec-dir specs

The graph uses depends and estimate from spec frontmatter:

spec: task
name: "Checkpoint Resume"
depends: [task-goal-gate, task-context-fidelity]
estimate: 1d
---
  • Critical path (red edges in DOT) shows the longest dependency chain — this determines minimum wallclock time
  • Parallel branches can be worked simultaneously — multiply agent count by branch count for throughput
  • Estimate values (0.5d, 1d, 2d, 1w, 4h) are shown on node labels

Graph-Informed Sprint Planning

# 1. Generate and review the dependency graph
agent-spec graph --spec-dir specs --format svg > deps.svg

# 2. Identify critical path total
# Sum estimates along the red path = minimum serial time

# 3. Identify parallelizable branches
# Independent specs (no shared dependencies) can run concurrently

# 4. Estimate with parallelism
# total_time = critical_path_time + max(parallel_branch_times)

Add this to your Sprint Capacity Plan output:

#### Dependency Analysis
- **Critical path**: task-A → task-B → task-C (total: 2.5d)
- **Parallel branches**: task-D (0.5d), task-E (1d) — can run alongside critical path
- **Minimum serial time**: 2.5d
- **With 2 agents**: ~1.5d (critical path + parallel overlap)

When NOT to Estimate

SituationWhyAlternative
No .spec file yetNothing to estimate fromWrite the Contract first
Spec has lint score < 0.5Too vague for reliable estimateImprove spec quality first
Exploratory / vibe codingNo defined "done"Just start coding, write spec later

When not to use it

  • When no spec file exists
  • Exploratory coding

Prerequisites

agent-spec CLI

Limitations

  • Requires .spec file
  • Lint score must be > 0.5

How it compares

It uses mechanical library-level auditing and risk coefficients, unlike manual estimation.

Compared to similar skills

agent-spec-estimate side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
agent-spec-estimate (this skill)02moReviewIntermediate
conducty-shape02moNo flagsAdvanced
sequential-thinking1369moNo flagsIntermediate
planning-with-files2336moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

conducty-shape

Sheshiyer

Defines appetite, scope, no-go zones, and design before any prompts are written. Use when a goal is Medium or High complexity, requirements are unclear, scope needs bounding, or the user says "shape", "design", "brainstorm", "think through".

00

sequential-thinking

mrgoonie

Use when complex problems require systematic step-by-step reasoning with ability to revise thoughts, branch into alternative approaches, or dynamically adjust scope. Ideal for multi-stage analysis, design planning, problem decomposition, or tasks with initially unclear scope.

136386

planning-with-files

davila7

Implements Manus-style file-based planning for complex tasks. Creates task_plan.md, findings.md, and progress.md. Use when starting complex multi-step tasks, research projects, or any task requiring >5 tool calls.

233106

trello

openclaw

Manage Trello boards, lists, and cards via the Trello REST API.

41205

pmbok-project-management

jgtolentino

Comprehensive PMP/PMBOK project management methodologies and best practices. Use this skill when users need guidance on project management processes, templates, knowledge areas, process groups, tools, techniques, or certification preparation. Covers all 10 PMBOK Knowledge Areas and 5 Process Groups with practical templates, frameworks, and industry-standard approaches. Includes risk management, stakeholder engagement, schedule management, cost control, quality assurance, and resource planning.

38183

clickup

civitai

Interact with ClickUp tasks and documents - get task details, view comments, create and manage tasks, create and edit docs. Use when working with ClickUp task/doc URLs or IDs.

37176

Search skills

Search the agent skills registry