# Aidlc Code Generation

> Run the AI-DLC `code-generation` stage (construction phase) in isolation, without advancing the main workflow. Packages `/aidlc --stage code-generation --single`: the engine emits one run-stage directive for code-generation and its gate, the conductor runs it, then the single-stage run commits a synthetic-id pair and stops. The main workflow's Current Stage is never touched.

- Skill: `aws-samples/aidlc-code-generation` (Agent Skill)
- Install (CLI): `npx skillmds@latest add aws-samples/aidlc-code-generation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aws-samples/aidlc-code-generation/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: aws-samples (https://skillmd.com/u/aws-samples)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/aws-samples/aidlc-code-generation

---


# AI-DLC Stage Runner — code-generation

Run the `code-generation` stage on its own. This is opt-in packaging over
`/aidlc --stage code-generation --single`; the same stage is always reachable via
that flag without this skill.

## Steps

1. Ask the engine for the single-stage directive:

   ```bash
   bun .kiro/tools/aidlc-orchestrate.ts next --stage code-generation --single
   ```

   The engine emits one `run-stage` directive for `code-generation` (carrying the
   lead agent, the resolved consumes/produces paths, the rules and sensors in
   context, and — on this first directive — the conductor persona). Run the stage
   exactly as the directive describes; do not load the conductor persona by hand,
   the engine delivers it.

2. When the stage's work is done, commit the single-stage record:

   ```bash
   bun .kiro/tools/aidlc-orchestrate.ts report --single --stage code-generation --result completed
   ```

   This records a STAGE_STARTED / STAGE_COMPLETED pair under a synthetic workflow
   id and stops. It NEVER writes the main workflow's `Current Stage` — a
   single-stage run is isolated by design (the tool refuses to advance the main
   workflow).

