Skip to main content

Stack Skills

Stack skills define individual infrastructure stacks that /ipa-compose assembles into deployment patterns. Each stack skill lives at .claude/skills/ipa-stack-{name}/SKILL.md and declares the stack's parameters, outputs, wiring, feature flags, and lifecycle classification.

Stack skills are not invoked directly. Instead, /ipa-compose reads them to generate Makefiles and deployment configuration.

Each stack skill documents both its CloudFormation template (infra/cfn/{tier}/) and its parallel Terraform module (infra/tf/{tier}/) in a ## Terraform Module section. The IaC engine is selected at /ipa-init time via APP_IAC.

Lifecycle Classification

Stacks are classified into two lifecycle categories that determine when they are deployed and whether /ipa-destroy removes them:

LifecycleDeployed ByRemoved ByExamples
prepare/ipa-prepareManual (make -f scripts/prepare.mk teardown-prepare)Logs, ECR, Cognito
deploy/ipa-deploy/ipa-destroyBackend, Frontend, Queue

Solution Tier Stacks

These stacks form the application infrastructure and are deployed and destroyed as a unit.

StackDescription
/ipa-stack-backendLambda + API Gateway v2 + DynamoDB
/ipa-stack-frontendS3 + CloudFront + OAC
/ipa-stack-queueSQS + DLQ + worker Lambda + DynamoDB

Prepare Stacks

These stacks provide shared prerequisites and persist across deploy/destroy cycles.

StackDescription
/ipa-stack-logsCentralized S3 log bucket for access and flow logs
/ipa-stack-ecrECR repository for container images
/ipa-stack-cognitoCognito User Pool with OAuth 2.0 and OIDC
/ipa-stack-tfstateTerraform state backend — S3 + DynamoDB (only when APP_IAC=terraform)

CI/CD Prepare Stacks

These stacks support CI/CD and are composed via /ipa-compose codepipeline. They follow the prepare lifecycle.

StackDescription
/ipa-stack-codecommitCodeCommit repository for source code
/ipa-stack-codepipelineCodePipeline CI/CD with CodeBuild