DEV Community

Cover image for GHOSTTRACE: Every System Leaves a Ghost (Dia de los Muertos)👻
Jayking♟️
Jayking♟️

Posted on Edited on

GHOSTTRACE: Every System Leaves a Ghost (Dia de los Muertos)👻

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the "Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine" (https://dev.to/challenges/hacktoberfest-week4-2026-10-26).

What I Built

A system fails. Someone fixes it. The alerts disappear, the machines start running again, and the incident becomes another forgotten record.

But the most important part of that failure might not be the component that broke. It might be the invisible chain of dependencies that allowed one problem to affect everything around it.

That thought became GHOSTTRACE: The Infrastructure Afterlife.

GHOSTTRACE is a forensic AI laboratory that investigates forgotten infrastructure incidents, reconstructs their possible consequences, and preserves the evidence behind them.

I wanted to build something different from a chatbot that simply reads a report and gives you a summary. With GHOSTTRACE, the report becomes an investigation you can actually explore.

The experience combines four ideas:

The Evidence Lens: An open-weight AI model searches incident reports for relevant passages and ranks them by semantic similarity. Users can inspect the source evidence rather than relying entirely on a generated explanation.

AI Reconstruction: Claude interprets the report and retrieved evidence, identifying systems, possible dependencies, event sequences, and questions the available information cannot answer.

The Infrastructure Afterlife: A visual network reveals how systems connect. Users can explore hypothetical failure paths and experiment with containment strategies.

The Memory Vigil: Inspired by Día de los Muertos, visitors can light symbolic lanterns to preserve documented traces and lessons that might otherwise be forgotten.

The application also supports saved investigations and Markdown evidence dossiers.

The included incident archives are fictional. GHOSTTRACE demonstrates a method for exploring evidence, not a system that certifies historical events or predicts real disasters.

What began as a Halloween concept gradually became a bigger question: What if software could help us remember not only what failed, but what the failure taught us?

Demo

Live application:

https://ghosttrace-six.vercel.app/

The best way to explore GHOSTTRACE is through its investigation workflow.

Start with The Bellwether Incident, one of the included fictional archives.

Open the Evidence Lens and watch the open-weight model retrieve passages relevant to the investigation. Inspect the ranked evidence before moving to the reconstruction.

Next, select Reconstruct with Claude to generate a structured interpretation of the incident.

Explore the resulting dependency network, examine the supporting passages, and investigate the possible consequences of the disruption.

Then visit the Memory Vigil.

Light a lantern for a documented system trace and see how the evidence becomes part of a preserved remembrance record.

That final transition, from an overlooked passage in a report to an illuminated trace in the archive, is the experience I wanted to create.

Code

Source repository:

https://github.com/paulos-ui/ghosttrace

GHOSTTRACE is a standalone, MIT-licensed project developed for the Week 4 challenge.

The repository includes the application, open-weight evidence retrieval, Claude reconstruction endpoint, source verification logic, deterministic graph simulation engine, tests, and technical documentation.

The core implementation is available for inspection and extension.

How I Built It

The biggest technical decision was separating finding evidence from interpreting evidence.

Those are related tasks, but they should not be treated as the same thing.

  1. Open-weight AI comes first

I used the Apache-2.0 licensed "Xenova/all-MiniLM-L6-v2" model with Transformers.js to build the Evidence Lens.

The model runs directly in the browser.

It converts report passages and search queries into numerical embeddings, then compares them using cosine similarity to identify semantically relevant passages.

This means evidence discovery does not require a paid inference API or a Claude connection.

The model downloads on first use, and subsequent embedding calculations run locally in the browser.

Users can inspect the retrieved passages and their relevance scores before requesting any further analysis.

This is the open-weight foundation of GHOSTTRACE. Without it, the product would lose its independently usable evidence investigation capability.

  1. Claude provides optional structured interpretation

Once the relevant passages have been identified, users can explicitly request a reconstruction.

The Next.js backend sends the report and selected evidence to the Anthropic Messages API.

Claude extracts possible infrastructure components, directed relationships, chronological events, and unresolved questions.

I chose Claude for this interpretation layer, but Claude is proprietary. It is not the open-source component of the project.

Keeping the retrieval and interpretation stages separate means the evidence investigation remains useful even without the hosted model.

  1. Evidence should be checked, not blindly trusted

This was one of the most important engineering considerations.

An AI-generated explanation can sound convincing even when the supporting evidence is weak.

GHOSTTRACE checks claimed quotations against the supplied report and flags quotations that cannot be matched.

A matching quotation does not prove that an inferred relationship is correct. It only confirms that the quoted text exists in the source.

That distinction matters.

A useful investigation tool should make uncertainty visible instead of hiding it behind confident language.

  1. Turning analysis into an interactive investigation

I built the interface with Next.js, React, TypeScript, and custom CSS.

A directed-graph engine maps the reconstructed systems and supports hypothetical containment experiments.

Instead of treating the AI response as the finished product, the application turns it into something users can examine and question.

Saved investigations and remembrance lanterns use browser-local storage. Users can also export a Markdown dossier for reference.

During deployment, I encountered a TypeScript inference error in the graph implementation and later a Next.js dependency security warning.

Resolving those issues was a reminder that getting a prototype to look finished is very different from getting a production build to run reliably.

The application is now deployed on Vercel, with both the open-weight evidence workflow and Claude reconstruction available.

Why Does Open Innovation Matter?

Because an investigation should not become inaccessible when one proprietary service stops working.

I didn't want GHOSTTRACE's most important capability, finding and examining evidence, to depend entirely on an external AI API.

Using an open-weight model changed what I could build.

First, evidence retrieval stays under the user's control. The browser processes report text locally during the Evidence Lens workflow, without uploading that text to a separate embedding service.

Second, the underlying retrieval system is inspectable. Developers can examine the implementation, replace the embedding model, change how passages are selected, or experiment with alternative ranking approaches.

Third, the core evidence search does not require paid API calls. Someone can explore the included archives and use the local model without configuring Claude.

There are honest limitations.

The initial model download requires internet access. The complete hosted application is not an offline product, and choosing Claude reconstruction sends report content to an external API through the server.

The application makes this separation intentional.

Open innovation doesn't have to mean rejecting every proprietary tool. For me, it means ensuring that the essential capability remains accessible, understandable, and replaceable.

That is why MiniLM is part of the investigation engine rather than simply being included in the project's dependencies.

The Spirit of It
Halloween gave me the visual direction. Día de los Muertos gave the project its deeper purpose.

I began with the idea of a haunted machine, something that appears silent but still contains traces of what happened inside it.

The interface uses the atmosphere of a dark technical archive, where forgotten incidents are uncovered through fragments, connections, and reconstructed timelines.

But I didn't want the spooky elements to be decoration alone.

That led to the Memory Vigil.

Inspired by the spirit of remembrance associated with Día de los Muertos, it provides a symbolic space for preserving the records and lessons that investigations uncover.

Each lantern is tied to a documented trace rather than invented historical testimony.

The feature is not meant to equate machines with people or recreate personal memories. It is a small reflection on how easily important knowledge can disappear once something stops demanding our attention.

For me, the most meaningful moment happens after the investigation.

You have explored the report, examined the possible chain of failures, and reached the end of the analysis.

Then you light a lantern.

A piece of evidence that began as an overlooked line in a report becomes something deliberately preserved.

That is the idea behind GHOSTTRACE.

The ghost isn't something supernatural hiding in the system. It is the trace of what happened, waiting to be understood.

And sometimes, understanding the past is the best place to begin building something more resilient.

GHOSTTRACE. Every system leaves a ghost.

Top comments (0)