cd /news/artificial-intelligence/phantom-files-uncovering-the-machine… · home › topics › artificial-intelligence › article
[ARTICLE · art-159202] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Phantom Files: Uncovering the Machine Ghost with Local Open-Weight AI

A developer built Phantom Files, an open-source, local-first application that analyzes text files such as logs, READMEs and telemetry and generates fictional paranormal case dossiers grounded in verbatim excerpts from the source. The tool runs Qwen2.5 models via Ollama on consumer CPUs under 3 GB of RAM, and pairs a hardened file reader that rejects binaries and sanitizes prompt-injection delimiters with an evidence extractor that maps anomalies to exact line numbers so the model cannot fabricate quotes.

by read4 min views4 publishedOct 28, 2026

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

#

What I Built

"Every file has a story. Some should never have been opened."

Phantom Files is an open-source, local-first paranormal forensic workbench that analyzes text files (.txt, .log, .md) and crafts fictional, suspenseful case dossiers inspired by their contents.

Computing terminology is steeped in occult and supernatural lore: we spawn daemons, terminate zombie processes, diagnose fatal memory corruptions, and debug deadlocks at 03:33:00 UTC. For Week 4's "Ghost in the Machine" theme, Phantom Files takes this metaphor literally. It treats everyday technical failures, legacy documentation, and intercepted transmissions as potential digital hauntings—relics of an algorithmic spirit trapped in the machine.

Key Capabilities:

Three Investigation Personas: 1. Haunted Logs: Analyzes server crashes and daemon monitors for techno-spectral residue. 2. Cursed README: Performs digital archaeology on abandoned documentation, deprecation warnings, and cryptic commit traces. 3. Unknown Transmission: Deciphers intercepted telemetry, signal drops, and cosmic radio static. #

Strict Evidence Grounding: To avoid AI hallucinations masquerading as reality, the engine deterministically extracts verbatim substrings from the source file with exact line numbers. The narrative is forced to ground its paranormal theory in these verified facts. #

Horror Intensity Dial: Ranges fromMild Mystery (subtle, twilight atmosphere) toAtmospheric Horror (creeping psychological dread) andDark Sci-Fi (cosmic void / machine ghost). #

Retro-Terminal UI: A nostalgic cathode-ray phosphor green and purple Streamlit interface complete with an ASCII ghost banner, side-by-side evidence inspection, and one-click dossier export (.md and.txt ).

#

Demo

#

Code

  Phantom Files: An Open-Source AI Haunted File Investigator for Hacktoberfest 2026

"Every file has a story. Some should never have been opened."

Phantom Files is an open-source, local-first AI application that analyzes user-supplied text files (.txt, .log, .md) and generates fictional, atmospheric paranormal case dossiers grounded strictly in the factual text of the files.

Built for the Hacktoberfest 2026 DEV Open-Source AI Challenge, Week 4: “Ghost in the Machine”.

📸 Interface Preview #

#

How I Built It

Phantom Files was built with a modular, security-hardened Python architecture:

Local Open-Weight Model (Qwen2.5): - Inference runs via Ollama using open-weight models such as**qwen2.5:3b** (or qwen2.5:7b ), released under the permissiveApache 2.0 license .

  • With an active memory footprint under 3 GB RAM, the model runs smoothly on commodity consumer CPUs and laptops without requiring enterprise cloud GPUs.

Safe File Processing (SafeFileReader): - Strictly validates file extensions (.txt ,.log ,.md ), enforces a 1MB size ceiling, rejects binary null bytes (\x00 ), and sanitizes delimiters to neutralize prompt injection attacks.

  • Files are treated strictly as inert, passive text strings—never executed or evaluated via eval() ,exec() , or shell subprocesses.

Verbatim Evidence Verification (EvidenceExtractor): - Scans the document using regex pattern heuristics for anomalous markers (e.g., segfaults, midnight time windows, orphan PIDs).

  • Maps each anomaly to its exact line number and uses literal substring validation so the LLM cannot hallucinate false quotes.

Structured JSON Engine (InvestigationEngine): - Feeds evidence into mode-specific prompt templates with strict system guardrails.

  • Enforces valid JSON outputs containing: case_title ,case_summary ,noteworthy_events ,unusual_patterns ,paranormal_interpretation ,investigation_questions , andsuspenseful_conclusion .

Dossier Exporter (ReportExporter): - Generates downloadable GitHub-Flavored Markdown and retro-terminal formatted Plain Text dossiers with clear safety disclaimers separating fiction from fact. 6. Testing & Quality Assurance: - 22 automated unit tests using pytest cover file validation, prompt injection containment, evidence accuracy, and mocked Ollama responses—passing 100% offline.

#

Why Does Open Innovation Matter?

When dealing with application logs, system crashes, and internal project documentation, privacy and trust are non-negotiable.

Production logs regularly contain sensitive telemetry: internal hostnames, cluster IP addresses, database schemas, and stack traces. Up those logs to commercial, closed-source cloud APIs creates serious data exfiltration risks and vendor lock-in.

Open-weight models and local inference through Ollama make Phantom Files possible by providing:

Absolute Data Privacy: File contents never leave the user's local machine or local loopback (127.0.0.1 ). 2. Offline Resilience: The application operates seamlessly in air-gapped server rooms, on flights, or during internet outages. 3. Zero Marginal Cost: Developers and hobbyists can explore creative storytelling and file forensics without subscriptions or metered API tokens. 4. Transparency & Contributor Freedom: Open models like Qwen under Apache 2.0 empower anyone to inspect, fine-tune, audit, and distribute AI applications freely.

#

The Spirit of It

The moment this project truly landed was during testing on our own development logs:

When qwen2.5 analyzed those lines, it diagnosed PID 4040 not as a simple kernel race condition, but as an orphaned digital ghost refusing to leave memory space, silently listening on loopback port 6660 for an instruction from an orchestrator that shut down years ago.

It turned a mundane late-night debugging session into a spooky campfire story. It made staring at a crash dump fun again.

#

Prize Categories

Primary Track: Hacktoberfest Open-Source AI Challenge — Week 4: "Ghost in the Machine"

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @phantom files 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/phantom-files-uncove…] indexed:0 read:4min 2026-10-28 · —