I'm doing a couple things that aren't wildly copied for Cantrip. They are all "old school", but useful and relevant for agentic coding and automated software factories.
Staging server - I deploy a full copy of my application to a staging server. For Cantrip that means:
MCP Server daemon is deployed to a staging server and taking traffic
MCP Server client supports an API endpoint override
Web dashboard is deployed to a staging server
I test with claude code session where the mcp server is configured to hit staging. I do automated testing against staging
One of the benefits is that my NextJs app in locahost is falky as files are changing and it is hot reloading. This way I can have a stable environment to QA in.
Clean Architecture - I use the clean architecture pattern. I identify "Ports" and make Adapters for those ports.
Example ports: LLM API call, DB Query, reading the system Clock or Filesystem
Adapters: I implement a Stub LLM API call and a Live LLM API call.
Why? I use Pact to record and playback executions. For example, I can record the entire inputs and outputs for a live LLM API call. These are written to a traces directory. Okay, so what?
1. I can replay these from the Stub adapter, making integration tests fast and deterministic
I can have an LLM troubleshoot an issue instantly as they can read traces of everything in detail.
What is your secret sauce for your automated software factory?