Disk Is the Contract: Inside Threlmark’s Local-First Architecture

📊 Full opportunity report: Disk Is the Contract: Inside Threlmark’s Local-First Architecture on ThorstenMeyerAI.com — validation score, market gap, and execution plan.

TL;DR

Threlmark’s innovative approach uses local disk storage as the sole data source, simplifying sync, enhancing offline usability, and improving interoperability. This article explores how this design impacts system resilience and flexibility.

Threlmark has introduced a novel architecture that treats local disk storage as the definitive contract for all data, moving away from traditional database reliance. This approach simplifies synchronization, boosts offline capabilities, and enhances data portability, making it a significant shift in how project management tools can operate. For a detailed overview, see Disk Is the Contract: Inside Threlmark’s Local-First Architecture.

Central to Threlmark’s design is the principle that each data item is stored in a separate file, with atomic write operations ensuring data integrity. The directory structure acts as a formal contract, providing transparency and facilitating interoperability with external tools. This architecture reduces complexity by avoiding centralized databases, instead relying on the filesystem’s natural capabilities for concurrency and recovery.

Threlmark employs safety mechanisms such as atomic file writes—writing to a temporary file before renaming—to prevent corruption during crashes. It also uses tolerant merging strategies that allow for external edits and version conflicts without data loss. The system’s self-healing features enable it to reconstruct state from individual files if corruption occurs, maintaining consistency across project views.

By adopting one file per item, Threlmark minimizes race conditions and simplifies conflict resolution, especially when multiple tools access the same data. The directory layout explicitly defines how data is organized, making manual inspection and external editing straightforward. This transparency supports extensibility and reduces vendor lock-in, as data remains portable and readable outside the system.

Disk is the contract: inside Threlmark’s architecture — ThorstenMeyerAI.com
ThorstenMeyerAI.com
Threlmark · Technical Deep-Dive
Threlmark · architecture

Disk is the contract: inside a local-first roadmap hub

A Next.js app on top of plain JSON files — no database, no cloud, no accounts. The key decision: the on-disk layout IS the API. Everything else cascades from taking that seriously.

Next.js · TypeScript · JSON-on-disk · MIT · part 2 of the Threlmark series
01The core decision

There is no server-of-record — the files are the record

The UI and any external tool reach the same files through the same discipline. The data root defaults to ~/.threlmark — home-based, because it’s a shared hub every one of your apps points at.

~/.threlmark/ ├─ threlmark.json # manifest ├─ links.json # dependency graph ├─ projects// │ ├─ project.json # meta + wipLimits │ ├─ board.json # lane ordering │ ├─ items/.json # ONE card per file ← source of truth │ ├─ suggestions/ # the Inbox (drop-zone) │ ├─ handoffs/ # recorded agent handoffs │ ├─ reports/ # agent report drop-zone │ └─ ROADMAP.md # human-readable mirror ├─ shared/items/ # cards many projects ref └─ archive/ # archived, still readable

Inspectable

Every artifact is a file you can cat, diff, grep, commit.

Portable · no lock-in

Back up with cp, sync with Dropbox / git, migrate trivially.

Interoperable

Any tool in any language joins by reading / writing files.

Restartable

No in-memory state to lose — stateless over the files.

02Making files safe
Amazon

local disk storage data management tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Two disciplined patterns instead of a database

“Just use files” is easy to get wrong. These two patterns — ported from a battle-tested sibling app — are what make file-based state sound rather than reckless.

Pattern 1

Atomic writes

Write to a temp file in the same dir, then rename() over the target. Rename is atomic on one filesystem — a crash mid-write leaves the complete old file or the complete new one, never a half.

write .tmp-pid-rand fsync rename() over target
Pattern 2 · one file per item

The board heals itself

A single roadmap.json array races when two tools write at once. One file per card makes writes collision-free. Lane order lives in board.json and reconciles on read.

The payoff: an external tool never touches board.json. It writes an item file — the board fixes itself on Threlmark’s next read. Unknown keys are preserved, so the contract is forward-compatible.
03Derived, never stored
Free Fling File Transfer Software for Windows [PC Download]

Free Fling File Transfer Software for Windows [PC Download]

Intuitive interface of a conventional FTP client

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

The numbers can’t drift from the files

Anything computable from item state is computed — so the displayed numbers can never disagree with the underlying JSON. Priority is the clearest example: it’s calculated on read, never persisted.

priority — computed on read

Impact weighted heaviest; effort the only axis that subtracts. Reused verbatim from the original tool, so imported cards rank identically.

priority = max(0, round(impact·3 + evidence·2 + fit·2effort·1.5))
a 5 / 5 / 5 / 4 card 29
work-item age
now − lane-entry time. Past threshold (dev 7d, ranked 21d, idea 60d) → stale.
cycle time
first DevelopmentDone. Derived from append-only transitions[].
throughput
items reaching Done per ISO week, 8-week window.
WIP
count per lane; over the cap shows 3 / 2 in red.
04The closed agent loop · press play
Python in Action: 60 Mini Projects to Automate Everything (Part 1): Practical CLI Tools, File Automation, and Data Cleaning with CSV, Excel, and JSON

Python in Action: 60 Mini Projects to Automate Everything (Part 1): Practical CLI Tools, File Automation, and Data Cleaning with CSV, Excel, and JSON

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

A handoff is a first-class flow event

The genuinely 2026-shaped part: most building is done by AI agents, so Threlmark closes the loop. Watch a card go from ranked to Done without anyone dragging it.

Handoff → report → self-move

The brief carries a reporting protocol. The agent reports through REST or the filesystem — and a done report moves the card itself.

Ranked
Add price-drop alertsscore 31 · ready
Development
Handed off 🤖
Done
▶ preferred — REST
POST /api/projects/:id/
items/:itemId/report

Direct call. Applied immediately.

▶ fallback — filesystem
drop reports/.json
→ ingested on read

Robust even if the server’s down at finish time.

🤖 claude done: price-drop alerts shipped · typecheck + lint + build passed — card moved to Done
05Portfolio score & deployment
Amazon

offline data synchronization software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

A small formula, and an honest hosting caveat

Because items are globally addressable (/), the Portfolio ranks everything together by a status-weighted score — finishing beats starting, blockers get a boost.

Portfolio ranking — status-weighted

In-flight work floats to the top; bottlenecks cost the most, so blockers get nudged up.

score = priority · statusWeight (+ 0.1 · blockedCount · priority)
1.3
development
1.0
ranked
0.85
idea
0.15
done
Path 1

Static read-only demo

Seeded data, writes to localStorage. Try-before-you-clone.

Path 2

Personal Node instance

Password-gated, persistent backed-up THRELMARK_DATA_DIR.

Path 3

Multi-tenant SaaS

Add accounts + per-tenant isolation. A separate build.

The elegant part: the store interface src/lib/*/store.ts is the natural seam — the same boundary that keeps the local tool simple is the one you’d extend for multi-tenancy. The architecture doesn’t fight that future; it just doesn’t pay for it until you need it.
ThorstenMeyerAI.com
Threlmark · open source (MIT) · github.com/MeyerThorsten/threlmark · part 2 of a series · file layout, formula, weights & agent-loop channels are Threlmark’s actual mechanics.

Implications of Disk as the Single Source of Truth

This architecture fundamentally changes how data persistence and collaboration are handled in project management tools. By making the disk the primary contract, Threlmark offers increased resilience, offline capability, and data portability. It reduces reliance on proprietary databases, enabling easier integration with external tools and manual editing, which can be critical for workflows requiring high transparency and control.

However, this approach shifts complexity toward managing file integrity and conflict resolution. Ensuring safe concurrent access and handling merge conflicts require careful design, but the benefits include a more transparent, flexible, and resilient system that can operate in environments with intermittent connectivity or multiple tools editing the same data.

Background and Development of Local-First Principles

The concept of local-first architecture has gained traction over recent years, emphasizing data ownership, offline access, and simplicity. You can read more about the principles in the original analysis. Traditional systems rely on centralized databases, which can introduce lock-in, complexity, and points of failure. Threlmark’s approach aligns with broader trends toward decentralized, file-based data management, inspired by projects like Beaker Browser and other peer-to-peer systems.

Previous efforts in local-first systems have demonstrated benefits in resilience and user control but often faced challenges in conflict resolution and data consistency. Threlmark’s approach addresses these issues through its formal directory structure and atomic operations. Threlmark’s innovation lies in formalizing the directory structure as a contract and employing atomic file operations, addressing these challenges directly. The development has been driven by the need for more transparent, portable, and offline-capable project tools.

“Treating the disk as the contract means every file is a reliable, independent unit of truth that simplifies synchronization and enhances resilience.”

— Thorsten Meyer, Threlmark developer

Remaining Challenges and Areas for Further Development

It is not yet clear how Threlmark’s system handles large-scale concurrent editing in complex workflows or how it manages conflicts in highly distributed environments. While the architecture is designed for resilience, real-world testing in diverse scenarios is ongoing.

Additionally, the impact on performance when managing many small files versus traditional databases remains to be fully evaluated. The development team is actively working on optimizing file handling and conflict resolution strategies, but details are still emerging.

Upcoming Improvements and Testing Phases

Threlmark plans to release beta versions to gather user feedback on conflict resolution and performance at scale. Further development will focus on refining merge strategies, enhancing self-healing mechanisms, and expanding integration capabilities with external tools. Continued testing will determine how well the architecture scales in complex, collaborative environments.

Key Questions

How does Threlmark ensure data integrity with multiple tools editing files?

Threlmark employs atomic write operations—writing to temporary files before renaming—to prevent corruption. It also uses tolerant merging strategies to handle concurrent edits without data loss.

Can I manually edit data files outside of Threlmark?

Yes, the explicit directory structure and individual files are designed to be human-readable and manually editable, supporting transparency and manual intervention when needed.

What are the main benefits of treating disk as the contract?

This approach simplifies synchronization, enhances offline usability, reduces vendor lock-in, and improves data portability, making tools more resilient and flexible.

Are there any performance concerns with many small files?

Managing numerous files can introduce filesystem overhead, and optimization is ongoing to ensure scalability. The current focus is on balancing granularity with performance.

Source: ThorstenMeyerAI.com

Nothing in this article is financial or investment advice. Cryptocurrency and precious-metal investments carry significant risk — do your own research and consider a licensed advisor.
You May Also Like

Customer service + BPO. The operational-scale displacement.

Empirical evidence shows 8 million workers in India and Philippines face AI-driven workforce displacement, with hybrid models emerging as the new norm.

From Lackluster Results to Promising Prospects—Biotechs Set for 2025 Success.

Creating a path from disappointment to potential, biotech companies are gearing up for 2025—what breakthroughs lie ahead?

AMÁLIA · The Three Hard Questions.

Portugal’s €5.5M AMÁLIA LLM faces critical questions on openness, native data, and goals, raising broader issues for European sovereign AI efforts.

HBM Ate The Fab

High Bandwidth Memory (HBM) now accounts for a significant share of global memory supply, driving shortages in RAM and GPUs amid rising demand and manufacturing challenges.