How AI-DLC Decomposes Complex Systems into Units of Work: The Complete Workflow
AI-DLC breaks complex systems into logical units of work—discrete groupings of user stories and components that enable independent, parallel execution of design, code generation, and testing phases.
The awslabs/aidlc-workflows repository implements an AI-Driven Development Life-Cycle (AI-DLC) that automates software construction by decomposing complex systems into manageable units of work. This decomposition strategy transforms high-level vision into concrete, deployable artifacts while maintaining strict modularity throughout the development pipeline.
What Defines a Unit of Work
According to aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md, a unit of work (UoW) represents a logical grouping of stories suitable for development. The granularity depends on your architecture:
- Micro‑service architecture: Each service becomes its own UoW.
- Monolithic architecture: The entire application constitutes a single UoW containing logical modules.
This definition ensures that every UoW encapsulates a bounded context of functionality, making it independently designable, generable, and testable.
Inception Phase: Discovery and Planning
During the Inception phase, the AI analyzes the Vision and Technical‑Environment documents to understand system scope. Based on this analysis, it generates a unit‑of‑work plan that enumerates:
- All required UoWs and their associated user stories.
- Inter‑service dependencies.
- Executable checklists (e.g.,
[x]for completed steps) to ensure repeatable execution.
This plan lives in aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md and serves as the master roadmap for downstream automation.
The Core Execution Loop
The decomposition drives the workflow defined in aidlc-rules/aws-aidlc-rules/core-workflow.md. The engine iterates over every unit of work in the plan, executing a standardized sequence of design stages followed by code generation.
For each UoW, the system:
- Loads the UoW definition from the generated plan.
- Executes conditional design stages based on complexity.
- Always runs the mandatory Code Generation stage.
- Outputs artifacts to
aidlc-docs/<unit‑name>/.
Design Stages per Unit of Work
As documented in docs/WORKING-WITH-AIDLC.md, the AI conditionally runs any subset of the following stages for each UoW before generating code:
Requirements Analysis
Translates user stories into concrete functional and non‑functional requirements, establishing acceptance criteria for the unit.
Application and Component Design
Defines services, components, and their public methods. The rules in aidlc-rules/aws-aidlc-rule-details/application-design.md govern how these entities are structured within the UoW boundary.
Component Dependency Mapping
Captures relationships between components inside the UoW and external dependencies on other UoWs.
Infrastructure Design
Optionally models deployment topology, container configuration, and cloud resources if the UoW requires explicit infrastructure specification.
Code Generation
The mandatory final stage produces source files per component, configuration files, and build scripts specific to the unit.
Build, Test, and Artifact Structure
After all UoWs complete generation, the Build and Test phase (aidlc-rules/aws-aidlc-rule-details/construction/build-and-test.md) validates each unit through:
- Unit test execution.
- Integration testing across dependent UoWs.
- Build script validation.
Each UoW receives its own output directory under aidlc-docs/<unit‑name>/, as specified in docs/GENERATED_DOCS_REFERENCE.md. This structure ensures:
- Natural modularity: Each UoW is independently deployable.
- Clear boundaries: Generated code never cross‑contaminates between units.
- Parallel processing: CI/CD pipelines can process UoWs concurrently.
Example Unit-of-Work Plan
Below is a minimal YAML representation of how AI-DLC structures a micro‑service decomposition:
unit_of_work:
- name: user-service
description: Handles user registration, authentication, and profile management
stories:
- id: US-001
title: Register new user
- id: US-002
title: Authenticate existing user
components:
- name: UserController
methods:
- create_user(request)
- login(request)
- name: UserRepository
methods:
- save(user)
- find_by_email(email)
dependencies: []
- name: order-service
description: Manages order lifecycle
stories:
- id: US-010
title: Create order
components:
- name: OrderController
methods:
- create_order(request)
dependencies:
- user-service
Running the AI-DLC executor processes this plan sequentially:
- Generates requirements, design diagrams, and component skeletons for
user-service. - Generates artifacts for
order-service, wiring the declared dependency onuser-service. - Emits build scripts (
Dockerfile,Makefile) and unit‑test stubs for each component.
Summary
- AI-DLC defines a unit of work as a logical grouping of user stories, implemented as either micro‑services or monolithic modules according to
units-generation.md. - The Inception phase produces a checklist‑driven unit‑of‑work plan that enumerates all UoWs and their dependencies.
- The core workflow iterates through each UoW, executing conditional design stages (requirements, application design, dependency mapping, infrastructure) followed by mandatory code generation.
- Each UoW outputs to a dedicated
aidlc-docs/<unit‑name>/directory, enabling modular validation and independent deployment.
Frequently Asked Questions
What exactly constitutes a unit of work in AI-DLC?
A unit of work is a logical grouping of user stories and components that represents a bounded development context. In micro‑service architectures, each service is a UoW; in monoliths, the entire application is a single UoW with internal logical modules, as defined in aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md.
How does AI-DLC handle dependencies between units of work?
During the Inception phase, the unit‑of‑work plan explicitly declares dependencies (e.g., order-service depending on user-service). The core workflow respects these declarations during the design and code generation stages, ensuring proper interface contracts and integration points are generated before dependent UoWs are processed.
What files does AI-DLC generate for each unit of work?
Each UoW receives its own directory under aidlc-docs/<unit‑name>/ containing requirements documents, design specifications, component source code, build scripts (e.g., Dockerfile, Makefile), and unit‑test stubs, as documented in docs/GENERATED_DOCS_REFERENCE.md.
When does AI-DLC generate infrastructure design for a unit of work?
Infrastructure design is an optional stage triggered only when the UoW requires explicit deployment topology modeling. The core workflow runs this stage conditionally based on the complexity and deployment requirements of the specific unit, always preceding the mandatory code generation stage.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →