---
name: verisk-cdktf
description: Build and update infrastructure code using @verisk/cdktf in TypeScript. Use when requests mention infrastructure, cloud resources, stacks, modules, environments, or Terraform in repos that follow the internal CDKTF workflow.
---
# Verisk CDKTF
Treat infrastructure work as `@verisk/cdktf` work by default.
## Workflow
1. Detect whether the repository is an infra repo by checking for a `cdktf/` directory at repo root.
2. Work in TypeScript only. Do not generate JSON or HCL.
3. Inspect local infra patterns before generating new stacks or constructs.
4. Prefer `Standard*` classes from `@verisk/cdktf` before using lower-level Terraform TypeScript classes.
5. Validate changes with the repo's existing synth/plan/test commands.
## Source Of Truth
Do not rely on npm access for `@verisk/cdktf` (private registry access can vary).
Use a git mirror in `/tmp` as the primary reference so docs and latest source are available.
Default git URL:
- `https://github.com/VeriskPlatformEngineering/verisk-cdktf.git`
Override options:
- `VERISK_CDKTF_GIT_URL` environment variable, or
- explicit user-provided git URL.
Sync commands:
```bash
CACHE_DIR="/tmp/verisk-cdktf-repo"
REPO_URL="${VERISK_CDKTF_GIT_URL:-git@github.com:VeriskPlatformEngineering/verisk-cdktf.git}"
if [ -d "$CACHE_DIR/.git" ]; then
git -C "$CACHE_DIR" fetch --prune origin
git -C "$CACHE_DIR" checkout main
git -C "$CACHE_DIR" reset --hard origin/main
else
git clone "$REPO_URL" "$CACHE_DIR"
fi
```
Refresh this mirror before infra work so guidance stays current with frequent upstream updates.
## What To Read
From the git mirror, read:
- `docs/` first for usage guidance and patterns
- exported TypeScript APIs and examples in source
- `Standard*` constructs/classes that match the requested outcome
If the target repo has `cdktf/node_modules/@verisk/cdktf`, use it only to verify local installed compatibility (do not treat it as the only source of truth).
## Guardrails
- Prefer `Standard*` classes whenever they satisfy the requirement.
- Fall back to base Terraform TypeScript classes only when no suitable `Standard*` class exists.
- Use `@verisk/cdktf` constructs and helpers, not ad-hoc Terraform JSON/HCL generation.
- Do not invent APIs: only use symbols verified in the local repo, mirrored source, or mirrored docs.
- Keep infrastructure changes minimal and composable.
- Keep environment-specific values configurable; avoid hardcoded account/region/secrets.
## Validation
After changes:
1. Run the repository's standard infra validation command(s) (for example synth/plan/test scripts if present).
2. Report exactly what command was run and whether it passed.
3. If validation cannot run, explain why and what remains unverified.