Urgent.News

What's breaking now, across thousands of outlets.

AI

Tricked Claude to Design the system, Not to Code (part 1)

I wanted to explore automation for a few days, and I came across Minicor , a company working on the problem of automating legacy software. The problem is simple, and I'm still figuring out whether it is worth solving at this level. But I learned a lot while building this project. Let's start. Folks who want to see and demonstration github live link watch the demo Understanding the pain I can…

In this part of the story, the reporter discusses the concept of automating legacy software and introduces a system called Minicor. The reporter explains that Minicor breaks down the automation process into several steps:

1. A business requests an automation for a specific scenario.

2. Minicor understands the requirements and how a human performs that task.

3. It creates and tests a workflow for that scenario.

4. Once the business approves the workflow, Minicor exposes an API that can be called whenever the task needs to be performed.

The reporter then sets out to build a similar system called SmartPay, which creates an invoice on every API hit. The reporter emphasizes the importance of understanding the flow of events in a distributed system before diving into requirements and features.

The reporter outlines the functional requirements of the system, including:

1. Recording scenarios and workflows

2. Storing workflow definitions and parameter mappings

3. Publishing workflows for business review

4. Exposing an API for each published workflow

5. Providing a monitoring dashboard

The reporter also identifies two key failure scenarios to consider:

1. Graceful handling of saves: What happens when a workflow is interrupted while saving an invoice?

2. Uncertain outcomes: What happens if the business's system stops before or after the invoice is saved?

To address these issues, the reporter proposes several non-functional requirements:

1. Idempotency for each invoice operation to prevent duplicate invoice creation in uncertain situations.

2. Distinguishing between confirmed failures and uncertain outcomes, allowing for reconciliation before retrying an API request.

3. Storing workflow definitions, parameters, mappings, and rules in a structured format like JSON for easy validation and consistency across API requests.

Finally, the reporter delves into the topic of response time and cost estimation. They note that while it's possible to optimize the system for fast API responses, the actual completion time may vary depending on the performance of the target application. The reporter also touches on the importance of understanding concepts like rate, concurrency, and storage when estimating capacity and cost.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in AI

More from Saturday 17 October →