Skip to main content
Skip to main content

Capacity planning from real project activity

Git history plan advisor

Use the estate you have and the way your team actually changes it to estimate AI usage before choosing a plan. The advisor runs locally, spends no credits and explains every assumption behind its recommendation.

Run your first estimate

Run the command from the repository containing your CDK app. It synthesizes the app, counts resources across every stack and reviews the last 90 days of infrastructure-changing commits.

npx cdk-insights plan

# Reuse an assembly that CI already synthesized
npx cdk-insights plan --no-synth --out-dir cdk.out

# Model a premium review workflow
npx cdk-insights plan --model haiku-4-5 --history-days 180

How the estimate works

  1. 1

    Count the estate

    Resources and stacks come from the synthesized CloudFormation assembly, not a guess based on source files.

  2. 2

    Find infrastructure changes

    The advisor identifies commits touching common CDK, infrastructure, stack and template paths.

  3. 3

    Estimate cache reuse

    The average share of infrastructure files touched per change becomes a conservative changed-resource ratio.

  4. 4

    Apply the model rate

    The first scan counts the full estate; later scans count estimated changed resources at the selected model multiplier.

Read the recommendation

Recommended plan: PRO (high confidence)
Estimated usage: 3,420 credits/month across 12 scans
Fresh AI analyses: 6,840 · cache reuse: 78% · model: GLM 4.7 Flash
Plan headroom: 6,580 credits

Assumptions:
- One scan is estimated for each infrastructure-changing commit.
- The first scan analyses every resource; repeat scans reuse unchanged results.
- Static analysis remains unlimited and does not consume AI credits.

Options

OptionDefaultWhat it controls
--no-synthsynth enabledReuse an existing cloud assembly instead of running cdk synth.
--out-dir <path>cdk.outRead a cloud assembly from a different directory.
--model <alias>glm-4-7-flashApply the selected model credit multiplier to fresh resource analyses.
--history-days <days>90Choose the Git history window. Values below seven are raised to seven.
--output jsontextReturn the history measurements, assumptions and recommendation as machine-readable JSON.

Use JSON in automation

JSON output is useful when you want to compare the estimate with an internal budget or show it in a pull request. The command exits non-zero only when it cannot synthesize, read the assembly or validate the model.

npx cdk-insights plan --output json > plan-advice.json

# Inspect the recommendation with jq
jq '{plan: .advice.recommendedPlan, credits: .advice.estimatedCreditsPerMonth, confidence: .advice.confidence}' plan-advice.json