Get startedGet started for free

Configuration-driven development with AI

1. Configuration-driven development with AI

Hi there! In this video, we will move from testing and security-driven development to configuration-driven development.

2. What is configuration-driven development?

Configuration-driven development is an approach in which you keep the logic in code but move the settings that vary between runs into configuration files. And we can, of course, leverage AI in this process!

3. Why go config-driven?

We are still working at Wayfarer Labs, integrating the Atlas toolbox into our tourism pipeline. And now that Atlas is optimized, well tested, and safer, we can take the next step: make the system easier to use without constantly editing code. That's where configuration-driven design comes in.

4. Config-driven benefits

Instead of hardcoding pipeline parameters inside Python files, we define them in configuration files. This gives us modular components, a stable interface between teams and colleagues, and reproducible runs across environments.

5. Prompting for a config architecture

A common mistake when using AI is to prompt it with a vague instruction such as "add a config file", without specifying what should be configurable and what should remain in the code. To avoid this, we can use the prompt shown to ask the model to propose a modular, configuration-driven architecture. That will serve as our first draft.

6. AI proposes a config strategy

As we can see, the model responds with a proposal: keep concrete logic in code, expose parameters via the config, and automatic validation of config files. This gives us an actionable plan tailored to our particular use case.

7. Choosing a config format

Next, we need to agree on a config format suitable for all developers inside Wayfarer Labs. This choice is not just a preference, since it impacts schema tooling support and readability. But no panic — again, AI models can help us choose based on our codebase! With this prompt, we can make the model reason about the three most popular config file formats.

8. Choosing a config format

Right, according to the model output, the best format to be used is YAML!

9. Humans in the loop

Let's say that we, as developers, implement the config schema ourselves following the model's recommendations. AI could have helped us in the implementation, but we also need to acknowledge that models can make mistakes. Large changes across the codebase might mean we spend more time validating AI output than if we implemented the changes ourselves. However, we can use the model to validate configuration consistency once implemented.

10. Preventing config drift

Configuration-driven systems fail when configs drift over time. This scenario might sound familiar: someone adds a field, someone renames a key, someone passes a string where a list was expected, and suddenly the pipeline breaks in production. This prompt here can help us prevent that by asking the model to consolidate the schema over our implementation. Pause the video for a moment to read it.

11. Evidence-based validation

The important part in this prompt is that we are not letting AI "guess." We're giving it a concrete implementation, so it can reason from evidence. We can see that the model clearly implements the configuration schema and lists possible schema mismatches effectively.

12. CI/CD integration

Finally, a configuration-driven system becomes powerful when it's easy to manage across environments. That is, we need to integrate it into our CI/CD system. We can ask the AI to design this strategy with this prompt.

13. AI designs CI validation

We can see how the AI generates a solid CI step that runs schema validation for the config on push/pull to GitHub. With all these config-driven implementations, configuration changes get treated like first-class production changes. And AI makes it easier to adopt these practices quickly and consistently.

14. Let's practice!

When you're ready, let's jump into practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.