Automated Code Generation
Triggers the Factory generation engine and populates implementation files with code derived from PRD acceptance criteria.
Prerequisites
- Verified
ProjectConfigobject fromprd-parsing-logic. - Active environment with
ProjectGeneratordependencies. - Plane issue ID for traceability.
Process
- Initialize Config: Create a
ProjectConfigobject using data from theprd-parsing-logicskill. - Structural Generation: Invoke
ProjectGeneratorto create the scaffolding (directories, rules, workflows). - Requirement Mapping: For each Story extracted from the PRD:
- Identify the target file(s) in
src/orscripts/. - Pass the Story's acceptance criteria and AI component specs to a "Builder Agent".
- Use
write_to_fileto populate the target files with the generated implementation.
- Identify the target file(s) in
- Consistency Check: Verify that all generated files adhere to the project's Layer 0-4 standards.
Guidelines
- Minimal Placeholders: Avoid generating "TODO" comments. Aim for functional, if minimal, implementation logic.
- TDD Integration: Generate corresponding unit test stubs (
tests/) simultaneously with implementation. - Traceability: Add a header to generated files linking back to the Plane issue and Story ID.
Best Practices
- Incremental Generation: Generate and verify structural foundations before adding complex implementation logic.
- Fail-Fast: Validate the input configuration strictly before initiating file writes.
- Root Cleanliness: Ensure all temporary generational artifacts are stored in
tmp/.
When to Use
- After a PRD has been successfully parsed into a configuration.
- To bootstrap a new feature or project with Factory-standard foundations.