aws-cloudformation / rain

A development workflow tool for working with AWS CloudFormation.
Apache License 2.0
750 stars 69 forks source link

Improve code generation with bedrock #360

Open ericzbeard opened 2 months ago

ericzbeard commented 2 months ago

We could do some validation on the supplied code when using the rain build --prompt command, and if we get failures, send the result back to the LLM before showing it to the user. The original request and the error could be worked into the Messages array as a conversation to try and get the model to improve its result. We would need to shell out to cfn-lint and cfn-guard to runs tests, which would require them to already be installed on the user's machine.