Back to blog
Gian Luca Frei2 min read

AI for Development

At IdentityPlane, we don't treat AI as a futuristic replacement for developers; we use it as a powerful co-pilot to write high-quality, cloud-native security software faster. Our focus is simple: leverage AI to improve our code quality and enjoy the speed benefits that come with it.

At IdentityPlane, we’ve adopted an "AI First" way of working to achieve high quality in building cloud-native security software. Our goal is simple: leverage AI to improve our code quality and enjoy the speed benefits that come with it.

Spec-Driven Development: Our Process for Quality and Speed

Our most efficient methodology is Spec-Driven Development. We treat AI as a highly engaged junior developer, but you better manually review its code at every stage. This approach accelerates development while ensuring robust quality:

  1. Specification Creation: We first explain the feature requirements to the AI and have it translate them into a formal specification, usually in a Markdown file.
  2. Interface Generation: The AI generates the initial interface code, which is then manually adjusted.
  3. Test Case Generation: This is where AI truly shines. We generate test cases, with the AI proving excellent at creating thorough edge cases for testing, almost like a fuzzer. This is where we believe AI helps us the most as we can generate a broader coverage of test cases compared to the manual workflow. This way we detected many potential bugs before they were added to the codebase. As most of our code is in golang we use table driven unit tests for that, but this applies to almost any other language as well in some way.
  4. Implementation and Refinement: We instruct the AI to generate the implementation code and automatically runs the generated test cases. In this constant feedback loop, the AI adjusts both the code and the tests until all conditions are correctly satisfied. Golang is very well suited for this thanks to the integrated tooling, as well as fast compile and executing time.
  5. Final Review: The developer manually reviews the final result, ensuring the code meets all standards and requirements.

To make this entire process effective the process needs to be documented. We describe our process in an AI-friendly document (an mdc file) that is automatically included by tools like Cursor. Furthermore, maintaining great documentation about the software architecture is essential, as it helps the AI better understand the existing codebase. This is an example: https://github.com/Identityplane/GoAM/blob/main/docs/internal_architecture.md

Our Spec-Driven Development Workflow

Key Takeaways for Developers and Orgs:

This new methodology has significant implications for how engineering teams operate:

  • Know your tech stack or AI will lead you to the wrong paths.
  • Keep features small.
  • Invest into documentation for the AI agents.
  • Rethink the confidentialty of your code, this slows you down.
  • Just pay the licenses, it's peanuts compared to a developer salary.
  • Don't overinvest into tools and processes. The industry changes fast, so let devs lead.
  • Dont try out every new tool.