/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
| Parameter | Required | Description |
|---|---|---|
| Stack name(s) | No | One or more stack names (e.g., backend, frontend, queue, codepipeline). If omitted, the skill discovers available stacks and prompts for selection. |
| Natural language | No | A 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:
| Prompt | Default | Description |
|---|---|---|
| Repository name | {APP_NAMESPACE}-{APP_ENV}-repo | Name of the CodeCommit repository |
| Trigger branch | main | Branch that triggers pipeline execution |
Prerequisites from .env:
| Variable | Source |
|---|---|
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/:
| File | Purpose |
|---|---|
scripts/prepare.mk | One-time prerequisite stacks (ECR, Cognito, and optionally CodeCommit + CodePipeline) |
scripts/deploy.mk | Main deployment stacks in dependency order |
scripts/build.mk | Container and frontend build targets |
scripts/post-deploy.mk | Post-deployment operations (config generation, S3 upload, CDN invalidation) |
scripts/env.mk | Environment variable sync (writes stack outputs to .env) |
scripts/test.mk | Placeholder test target |
scripts/SECURITY-DISPOSITION.md | Security findings register |
Phase 5 — Report
Displays a completion summary with generated files, next steps (/ipa-prepare → /ipa-deploy), and any warnings.
Outputs
| Artifact | Path | Description |
|---|---|---|
| Prepare Makefile | scripts/prepare.mk | Targets for prerequisite stack deployment (Cognito, ECR, and optionally CodeCommit + CodePipeline) |
| Deploy Makefile | scripts/deploy.mk | Targets for composed stack deployment |
| Build Makefile | scripts/build.mk | Container and frontend build targets |
| Post-Deploy Makefile | scripts/post-deploy.mk | Post-deployment operational targets |
| Env Makefile | scripts/env.mk | Stack output to .env sync targets |
| Test Makefile | scripts/test.mk | Test execution targets |
| Security Disposition | scripts/SECURITY-DISPOSITION.md | Security 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.
Related Skills
- /ipa-init — Auto-invoked by compose when
.envis missing - /ipa-security — Embedded in compose on first run (when
APP_BUILDER_ROLE_ARNis absent) - /ipa-prepare — Next step; executes
scripts/prepare.mkgenerated by compose - /ipa-deploy — Executes
scripts/deploy.mkgenerated by compose - /ipa-author-stack — Creates the stack skills that compose reads