Skip to main content

/ipa-compose

Read stack skills, compose selected stacks into a project-specific deployment configuration, and generate executable Makefiles and supporting artifacts.

:::note Auto-init and security If .env is missing when /ipa-compose is invoked, it auto-runs /ipa-init first. On the first compose (when APP_BUILDER_ROLE_ARN is absent from .env), the skill triggers the security provisioning phase before generating Makefiles. :::

Invocation

/ipa-compose

Optionally pass stack names or a natural-language description:

/ipa-compose
/ipa-compose I need a React frontend with a REST API backend and SQS queue
/ipa-compose codepipeline

Parameters

ParameterRequiredDescription
Stack name(s)NoOne or more stack names (e.g., backend, frontend, queue, codepipeline). If omitted, the skill discovers available stacks and prompts for selection.
Natural languageNoA description of the desired architecture. The skill maps it to matching stacks.

Compose Config Prompting

When composing prepare-lifecycle stacks that require configuration, the skill prompts for values before generating Makefiles. For example, /ipa-compose codepipeline prompts for:

PromptDefaultDescription
Repository name{APP_NAMESPACE}-{APP_ENV}-repoName of the CodeCommit repository
Trigger branchmainBranch that triggers pipeline execution

Prerequisites from .env:

VariableSource
APP_NAMESPACE/ipa-init
APP_ENV/ipa-init
AWS_ACCOUNT_ID/ipa-init
AWS_REGION/ipa-init
APP_BUILDER_ROLE_ARN/ipa-security

What It Does

The skill executes six phases:

Phase 0 — Auto-Init

If .env does not exist, auto-runs /ipa-init to configure the project before continuing.

Phase 0.5 — Security

If APP_BUILDER_ROLE_ARN is absent from .env, triggers the /ipa-security phase to provision IAM roles. Supports three paths: (A) Existing Role ARN, (B) Managed Policy, or (C) Innovation Builder Stack (recommended).

Phase 1 — Parse Intent

Classifies the invocation arguments as stack names or natural language. Detects existing composition and determines the mode: fresh compose, overwrite, idempotent refresh, or stack discovery.

Phase 2 — Validate

Runs pre-flight checks, discovers available stacks from .claude/skills/ipa.stack.*/, reads stack skill definitions and ARCHITECTURE.md. For multi-stack selections, merges stacks with dependency resolution and deduplication.

Phase 3 — Confirm

Displays a composition summary showing the deployment order, stack wiring visualization, and parameter sources. Waits for user confirmation before generating artifacts.

Phase 4 — Generate

Creates seven artifacts in scripts/:

FilePurpose
scripts/prepare.mkOne-time prerequisite stacks (ECR, Cognito, and optionally CodeCommit + CodePipeline)
scripts/deploy.mkMain deployment stacks in dependency order
scripts/build.mkContainer and frontend build targets
scripts/post-deploy.mkPost-deployment operations (config generation, S3 upload, CDN invalidation)
scripts/env.mkEnvironment variable sync (writes stack outputs to .env)
scripts/test.mkPlaceholder test target
scripts/SECURITY-DISPOSITION.mdSecurity findings register

Phase 5 — Report

Displays a completion summary with generated files, next steps (/ipa-prepare/ipa-deploy), and any warnings.

Outputs

ArtifactPathDescription
Prepare Makefilescripts/prepare.mkTargets for prerequisite stack deployment (Cognito, ECR, and optionally CodeCommit + CodePipeline)
Deploy Makefilescripts/deploy.mkTargets for composed stack deployment
Build Makefilescripts/build.mkContainer and frontend build targets
Post-Deploy Makefilescripts/post-deploy.mkPost-deployment operational targets
Env Makefilescripts/env.mkStack output to .env sync targets
Test Makefilescripts/test.mkTest execution targets
Security Dispositionscripts/SECURITY-DISPOSITION.mdSecurity findings and dispositions

Examples

Compose selected stacks:

/ipa-compose

Discovers available stacks and prompts for selection. Generates Makefiles for the selected stacks in dependency order.

Re-run compose with additional stacks:

/ipa-compose

Re-running compose detects existing composition and lets you add stacks or refresh the current selection.

Add CI/CD to an existing composition:

/ipa-compose codepipeline

Auto-includes codecommit as a transitive dependency. Prompts for repository name and trigger branch. Regenerates prepare.mk with prepare-codecommit and prepare-codepipeline targets, and adds update-env-pipeline to env.mk.

Re-compose after changes:

/ipa-compose

Detects existing composition and offers to refresh or overwrite. Custom dispositions in SECURITY-DISPOSITION.md are preserved across re-compositions.

  • /ipa-init — Auto-invoked by compose when .env is missing
  • /ipa-security — Embedded in compose on first run (when APP_BUILDER_ROLE_ARN is absent)
  • /ipa-prepare — Next step; executes scripts/prepare.mk generated by compose
  • /ipa-deploy — Executes scripts/deploy.mk generated by compose
  • /ipa-author-stack — Creates the stack skills that compose reads