TL;DR

Threlmark’s ‘disk is the contract’ approach makes local disk storage the definitive source of data, enabling portable, conflict-free workflows that integrate smoothly with AI tools. Its design boosts offline resilience and interoperability by avoiding reliance on centralized databases.

Imagine working on a project where your entire roadmap, task list, and progress are stored in plain JSON files right on your disk. No cloud, no database, no login required. That’s the bold idea behind Threlmark’s ‘disk is the contract’ architecture.

It’s a different way of thinking about data — one that prioritizes local storage as the ultimate authority. This shift makes your workflow more resilient, portable, and compatible with AI agents that can read, write, and even move your work forward without fuss.

The goal? To create a system where your data stays with you, and tools can join in without permission or lock-in. Let’s unpack how this works and why it’s a game-changer.

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
SANDISK 1TB Extreme Portable SSD (Old Model) - Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware - External Solid State Drive - SDSSDE61-1T00-G25

SANDISK 1TB Extreme Portable SSD (Old Model) – Up to 1050MB/s, USB-C, USB 3.2 Gen 2, IP65 Water and Dust Resistance, Updated Firmware – External Solid State Drive – SDSSDE61-1T00-G25

Get NVMe solid state performance with up to 1050MB/s read and 1000MB/s write speeds in a portable, high-capacity…

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
NEWQ 2TB External Hard Drive for iPhone, USB-C & Lightning Compatible Photo Storage Device, One-Click Backup Photos/Videos to Free Up Phone Space, Offline Transmission Support, No Computer Required

NEWQ 2TB External Hard Drive for iPhone, USB-C & Lightning Compatible Photo Storage Device, One-Click Backup Photos/Videos to Free Up Phone Space, Offline Transmission Support, No Computer Required

2TB Large Capacity One-Click Backup, Instantly Free Up Your Phone Storage: Running out of phone storage often forces…

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
Real-World Android App Projects with Kotlin and Jetpack Compose: Build Production-Style Android Apps with Modern Architecture, API Integration, State Management, Local Data Storage, Practical Projects

Real-World Android App Projects with Kotlin and Jetpack Compose: Build Production-Style Android Apps with Modern Architecture, API Integration, State Management, Local Data Storage, Practical Projects

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.

Key Takeaways

  • Your project data lives in plain JSON files, making it easy to back up, migrate, and join with other tools.
  • One file per item prevents conflicts and simplifies concurrent updates, boosting reliability.
  • Directory structure acts as a formal contract, ensuring transparency and interoperability.
  • Atomic file writes and normalization safeguard against corruption and compatibility issues.
  • External tools and AI agents can read, write, and move work seamlessly by following the file-based contract.

How Threlmark Keeps Your Data Safe and Portable

Threlmark treats your disk as the single source of truth. Every file — from project configs to individual task cards — is a plain JSON file. This means you can open, edit, or move your data with any tool that understands JSON.

For example, your roadmap lives in items/ as individual files, each representing a task. You can back up your entire project by copying a folder or sync it across devices with Dropbox or rsync. No vendor lock-in, no proprietary formats.

This design makes your data highly portable and easy to recover. If your disk crashes, you just restore the files. If you want to switch tools, just start reading and writing those same files with your favorite editor or script.

How Threlmark Keeps Your Data Safe and Portable
How Threlmark Keeps Your Data Safe and Portable

Why One File Per Item Wins Over Big JSON Files

Many projects use a big JSON array to store all tasks. It’s simple, but it’s a nightmare for concurrency. Every change requires rewriting the whole list, risking conflicts and clobbers.

Threlmark avoids this by using one file per item — items/.json. When you change a task, you only update that one file. It’s atomic, collision-proof, and easy to sync.

This setup means external tools can update individual cards without messing up the whole project. Plus, the system self-heals: if a card disappears from the directory but is still referenced in the lane list, it’s just ignored until it’s back.

How Threlmark’s Layout Ensures Everything Fits and Works

The directory structure isn’t just for looks. It’s a contract that guarantees every artifact is inspectable and interoperable.

At the root, you find threlmark.json (the manifest), links.json (dependencies), and folders for projects, shared items, suggestions, handoffs, reports, and archives.

This setup allows any tool — whether a CLI script or an AI agent — to access the full state by just reading files. No server needed. Everything can be version-controlled, diffed, and migrated easily.

How Threlmark’s Layout Ensures Everything Fits and Works
How Threlmark’s Layout Ensures Everything Fits and Works

Making File Writes Safe Without a Database

Using files for data storage sounds risky — what if two programs write at once? Threlmark solves this with atomic writes. Each update writes to a temp file, then renames it. Because rename is atomic on most filesystems, you never get partial data.

For example, updating a task involves writing a new file with a unique temp name, then renaming it over the old one. This guarantees data consistency even if your system crashes mid-write.

Plus, it uses read-merge-write with tolerant normalization, so older tools can handle new fields gracefully. This forward compatibility keeps your data safe as the system evolves.

How the Board Self-Heals and Keeps Your Workflow Smooth

The lane ordering, stored in board.json, is designed to stay consistent. But what if a task gets deleted or moved? Threlmark’s clever trick is self-healing: every time you read board.json, it reconciles against actual items.

So if an item is missing from items/ but still listed on the board, it’s ignored. Conversely, new items get added automatically. This makes your workspace resilient and reduces manual cleanup.

Imagine a scenario: you archive a project, but its cards linger in the lane list. When the board loads, it automatically cleans up the dead references, keeping your workflow clean and current.

How the Board Self-Heals and Keeps Your Workflow Smooth
How the Board Self-Heals and Keeps Your Workflow Smooth

How External Tools and AI Agents Play Nice with Files

Threlmark opens the door for outside tools to participate without asking permission. External scripts or AI agents can read from suggestions/ for new ideas, write directly to handoffs/ to push work forward, and check reports/ to see what’s done.

For instance, an AI agent can scan suggestions, pick a task, update its status, and move it to done — all by just reading and writing files. No API calls or special permissions needed.

This open approach makes automation natural and safe. You can even run your own scripts or AI models locally, knowing they’re working within the exact same contract.

What This Means for Your Projects and Workflow

Adopting Threlmark’s ‘disk is the contract’ philosophy transforms how you manage projects. Your data becomes portable, conflict-resistant, and ready for automation. Offline work? No problem.

It’s perfect for solo developers, small teams, or any project where resilience and flexibility matter. Instead of locking into a cloud service, you own the entire system — just files and scripts.

Plus, the architecture encourages experimentation: try new tools, scripts, or AI integrations without rewriting your entire setup. The system adapts to your needs, not the other way around.

Frequently Asked Questions

How does this architecture handle conflicts when multiple tools update files at the same time?

Threlmark uses atomic writes—each update replaces a file in one operation—so conflicts are avoided without locks. For complex conflicts, strategies like CRDTs or manual resolution can be integrated.

Can I switch from a cloud-based system to this local-first setup easily?

Absolutely. Since all data lives in plain JSON files, migrating is as simple as copying your files to a new location or syncing them with your preferred tools, with no vendor lock-in.

What if I want to add custom fields or new features later?

The system’s design preserves unknown fields during read-write cycles, so you can extend your data schema without breaking existing tools or losing compatibility.

Is this approach suitable for team collaboration?

Yes, especially in small teams or solo projects. Files can be shared via sync tools, and conflict resolution strategies can be built-in, making distributed work straightforward.

Are there any downsides or limitations?

It requires discipline in managing files and handling synchronization, especially at scale. Also, complex conflict scenarios might need custom resolution logic, but overall, it offers a resilient, lock-free workflow.

Conclusion

Threlmark’s ‘disk is the contract’ isn’t just a technical choice — it’s a philosophy that puts data sovereignty and flexibility at the forefront. Your projects become resilient, portable, and ready for automation.

Think of your data as a living garden in plain files. Tending it with care means fewer crashes, more control, and smarter workflows. Why settle for lock-in when your work can be this free?

What This Means for Your Projects and Workflow
What This Means for Your Projects and Workflow
You May Also Like

Open source Kanban desktop app that runs parallel agents on every card

A new open source desktop Kanban app allows users to run multiple AI agents in parallel on each task card, enhancing automation and collaboration.

The referral. How AI search severs the content-for-traffic contract that funded the open web.

New publisher-side data shows AI search is reducing Google referrals, with small publishers taking the steepest losses.

Claude Code as a Daily Driver: Claude.md, Skills, Subagents, Plugins, and MCPs

Exploring how advanced users leverage Claude.md, subagents, plugins, and MCPs for efficient, programmable AI workflows in daily coding tasks.

Is AI causing a repeat of Front end’s Lost Decade?

Analysis of how AI’s impact on programming echoes past shifts in frontend development, raising questions about skill erosion and industry changes.