Skip to content

Automated specification reverse engineering via AI analysis

In short

Industry: Industrial

Product: An embedded Linux software platform for building circulation systems.

Type of work: The platform is large and has been developed for a long time. While software quality has been tracked throughout its lifespan, formal specifications and requirements have not been kept consistently up to date. Deriving them through reverse engineering improves traceability and visibility for quality metrics, and enables more targeted testing.

Keywords: Python, Claude Sonnet, GPT-5 mini, Embedded, GitHub Copilot, Linux

What was done in practice

The first phase of the project has been completed. This stage involved creating an orchestrator script for running multiple instances of collaborative AI flows. Each flow consisted of a context collector agent, a technical writer agent, and a reviewer agent, with the last two collaboratively writing and refining the specification produced.

The resulting tool produces detailed specification documents outlining the components, inter-service dependencies, and APIs of around 30 Linux services in under an hour on a 14 CPU core laptop. It also produces higher level readmes for indexing the code base in intermediary directories, and can be run repeatedly, skipping over specification files that already seem up to date.

The next phase of the project is to derive requirements for the code base based on the newly generated specifications. Following review and validation, these requirements will then be further processed into proper, bidirectionally traceable test plans.

Results

The outputs from the first stage have been promising. The new specification is detailed, concise, and both human and AI readable.

The tooling ensures an easy way to generate and maintain specification and documentation, which in turn makes it a task developers are more likely to actually do. With these wins in the bag, the true potential of this project will become apparent once the second stage is complete.

30

Unique services specified

45 min

Approximate total time for a full run of all services

5 agents

Agents for individual subtasks

3 days

To implement with AI help via spec-driven development

Search