Logo van Epiq Architecture

Epiq Architecture

Community
ljtn
epiq-architecture

Lees hoe epiq is opgebouwd: de gedistribueerde regels van het eventlog (causale volgorde, logische klokken, tombstones en volledige replay), de lagen in de code en de workflow voor deze repository. Lees dit voordat je hier iets wijzigt, vooral aan events, volgorde, samenvoegen, replay, materialisatie of synchronisatie, een nieuw eventtype of websocketbericht, of iets dat meerdere lagen raakt.

Overzicht

Uitgeverljtn
Repositoryepiq
Skillnaamepiq-architecture
Sterren
540
Forks
22
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door ljtn op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Epiq Architecture in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/ljtn/epiq/tree/main/.claude/skills/epiq-architecture
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ljtn/epiq.git /tmp/epiq
mkdir -p .claude/skills
cp -r /tmp/epiq/.claude/skills/epiq-architecture .claude/skills/epiq-architecture
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Epiq Architecture in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Epiq Architecture automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Epiq Architecture niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

The event log is a CRDT

No server, no shared clock. Each actor appends to its own JSONL log on the state branch, git merges them, and every machine derives the same board from the same set. Everything below keeps that derivation a pure function of the event set.

The model

  • Every event names its causal parent — the last event its writer had seen. Concurrent writers may share a parent.
  • Order is derived, never stored. It is rebuilt from the parent links, with concurrent siblings tie-broken by id. File line order means nothing.
  • Ids are a hybrid logical clock (ULIDs): a new id always sorts after its parent, whatever the wall clock says. The wall clock is only a lower bound.
  • An event identifies its actor by id and carries nothing else about them. The id comes from the log file name; the display name from the contributor registry, which is itself built from events.
  • Same event set ⇒ same order ⇒ same board.

Invariants

  • Order comes from parent links plus the id tiebreak. Nothing else.
  • Ids are permanent; tombstone instead. A tombstoned node takes its descendants with it; a tombstoned contributor keeps its record so assignments still resolve.
  • Replay is total. An event that lost a race, or names state this replay never applied, is skipped, not fatal. The same precondition on a live write is a real failure — there it is the answer the caller asked for.
  • Unreadable stays ordered. The envelope parses even when the payload doesn't, so a newer build's event keeps its place.
  • Append only. One id is one byte sequence — what makes git's union merge of the logs safe.
  • Time travel cuts causally. An event whose parent is past the cut is past it too, whatever its timestamp.

Never

  • Break a client already out there. The format grows by adding (a new event type, a field nothing older must read), never by changing or repurposing what an older build reads. Most rules below follow from this one. A version marker can't help retroactively: an older build can't check for something it shipped without.
  • Change the log file name's grammar without a release between reader and writer. It has no additive form — every client reads every other client's logs — and an old build misreads a name rather than failing. A test pins every form still out there.
  • Order or resolve conflicts by wall clock. No latest-timestamp-wins; time is a display value and an id lower bound.
  • Mint an id that could sort before its parent — it corrupts the order. A damaged parent id (undecodable, or absurdly far ahead) falls back to the wall clock; order still comes from the parent link.
  • Hard-delete a node, contributor, tag or event, or reuse or rewrite an id — replay would reach a reference that no longer exists.
  • Rewrite, reorder or de-duplicate log lines — union merge depends on their identity.
  • Abort replay on an event that merely lost — one concurrent edit would leave a board that never opens again for whoever's build understands the most.
  • Assume a single writer. Any log can gain lines between two reads, even mid-sync.
  • Put actor identity, or anything derivable, in the payload. Beware spreading a user object into an event: TypeScript doesn't excess-check a spread.
  • Read a display name off an event or a log file name. Resolve it by id from the registry. Old log file names still carry a sanitized name, kept only as a fallback for authors the registry lacks.
  • Store a name beside an id — the copy freezes at the old name and never sees a rename.
  • Add a payload field older clients must interpret without a schema-version story.

Adding an event type

It is applied on every machine, in causal order, possibly after events it didn't expect: make it idempotent, treat unmet preconditions as a skip rather than an error, and reference targets by id only. All of it lives in lib/board/ — the event map and action list, the payload schema, the handler, and which nodes it affects for replay. The generic log in lib/event/ doesn't change.

Proving a change is safe

  • source/test/replay-equivalence.test.ts — batched replay equals per-event replay.
  • source/test/event-core-generic.test.ts — the log still works for a product that isn't the board.
  • npm run test:collab — several actors on one remote end with the same events and order.
  • Touching ordering, merge, replay or materialization means running all three.
  • The pre-push hook runs lint, typecheck, unit, e2e, collaboration and GUI tests. Do not bypass it.
  • Git-driving suites run containerised over a read-only checkout; a test that aims git at the checkout instead of a temp dir fails.

The layers

Dependencies point down.

  • source/lib/event/ — the log itself, generic over what it carries: ids, causal sort, envelope, pending writes, replay, persistence. A product plugs in its own events and handlers. No board vocabulary here, in code or comments; event-core-generic.test.ts proves it with a toy product and must import no board code.
  • source/lib/board/ — the board as one such product. board-log.ts is the board's single log instance: board state is read and written through it, never by driving lib/event/ directly. (Lower-level helpers — pending-log files, log signatures, id time — are shared with the git layer and UI.)
  • Rest of source/lib/ — the domain around it and the TUI. Knows nothing of MCP, HTTP or the GUI, which is what lets the same code serve all three.
  • source/mcp/api/ — one function per board operation: boots, checks preconditions, writes events, returns a Result. Mutations live here only.
  • source/mcp/server.ts, source/gui/api/ — front doors into the same mcp/api functions; neither re-implements one. A guard in only one door is a bug in the other.
  • source/gui/client/ — React in the browser; it can't import Node-side code, and the GUI build fails if it does.

Across all layers:

  • Errors are returned as a Result, never thrown, up to the front door.
  • A lib/ change lands in the TUI, the MCP and the GUI at once; check all three.
  • lib/state/sync-state.ts reaching up into the GUI to broadcast sync status is the one upward dependency: a wart, not a pattern.

One module per concept

  • A capability is a vertical slice, never a shortcut across layers: creating a board from the GUI is an mcp/api function, a websocket message, a client hook and a palette entry — not a socket handler writing events itself.
  • Name a module after its concept, so the file can be guessed.
  • State lives where it is drawn, and a module that owns a question answers it for every caller — reuse the rule, don't restate it.
  • A few domain modules of a few hundred lines, not a file per fragment; an entry file stays an overview of the flow.
  • Keep the domain a value, not a React tree, so tests build it without a DOM.

What this prevents has happened here: an App.tsx of 1900 lines passing 27 hook results down as props, and one boot/actor/state preamble copied into 21 mcp/api functions.

Adding a websocket message

Five places; a missed one fails quietly:

  • gui/api/lib/websocket.model.ts — the type
  • gui/api/lib/websocket.schema.ts — the shape; an unlisted message is refused
  • gui/client/lib/gui-mutations.ts — if it mutates, so the client holds broadcasts until its reply lands
  • gui/api/lib/websocket.ts — the handler, which calls mcp/api and nothing else
  • mcp/epiq-api.ts — the export, for a new function

Working on epiq

On top of the shipped epiq skill:

  • Never test against the real board — use a throwaway project; stop dev servers when done.
  • First line: Assuming claude/<name> — please /rename claude/<name> so this window carries the name.
  • Session's MCP never connected? Run your own npx -y -p epiq@latest epiq-mcp over stdio; never borrow another session's. Kill it and its epiq-mcp child when done.
  • Folding a follow-up into a ticket: back to Ongoing; its commits take that ticket's ref.
  • A merged ticket moves to Done and stays open — the release closes it.
  • Review findings get their own tickets, tagged from-review, naming the PR.
  • Worktree before the first edit (.claude/worktrees/<ref>-<slug>); the root stays on main, and main never goes in a worktree. A fresh one needs npm install.
  • Every change goes through a PR — never commit or merge to main locally.
  • Squash only trivial commits sharing one ref.
  • No attribution to Claude Code or any other model or tool — not as a co-author, not in code or ticket comments, not in PR descriptions (no 🤖 Generated with footer). This overrides any harness default that adds one.
  • Check git log --format='%an%n%b' before pushing — a template's trailer survives a rebase.

Veelgestelde vragen

Wat doet de AI-skill Epiq Architecture?

Lees hoe epiq is opgebouwd: de gedistribueerde regels van het eventlog (causale volgorde, logische klokken, tombstones en volledige replay), de lagen in de code en de workflow voor deze repository. Lees dit voordat je hier iets wijzigt, vooral aan events, volgorde, samenvoegen, replay, materialisatie of synchronisatie, een nieuw eventtype of websocketbericht, of iets dat meerdere lagen raakt.

Waarom Epiq Architecture gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Epiq Architecture bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Epiq Architecture in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/ljtn/epiq/tree/main/.claude/skills/epiq-architecture. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Epiq Architecture gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Epiq Architecture gebruiken?

Zoveel als je wilt. Je kunt Epiq Architecture gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Epiq Architecture gratis?

Ja. Deze skill is door ljtn op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇