Agent skill

Epiq Architecture

by ljtn in ljtn/epiq

How epiq is built — the event log's distributed rules (causal ordering, logical clocks, tombstones, total replay), the code's layers, and the workflow for this repository.

MITAuto-check passedBackend & APIs

Install Epiq Architecture

skills CLI
$ npx skills add ljtn/epiq --skill epiq-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ljtn/epiq epiq-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ljtn/epiq.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/epiq-architecture .claude/skills/epiq-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
epiq-architecture
GitHub stars
538
Token cost
~2.3k tokens
SKILL.md length
1,389 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

How epiq is built — the event log's distributed rules (causal ordering, logical clocks, tombstones, total replay), the code's layers, and the workflow for this repository.

  • Tasks that involve Realtime and WebSockets
  • SKILL.md covers The model, Invariants, Never and Adding an event type, plus 4 more sections
  • Calls npm, npx and git
  • Tasks that involve Task management

What it does

Epiq Architecture is an agent skill from ljtn/epiq. How epiq is built — the event log's distributed rules (causal ordering, logical clocks, tombstones, total replay), the code's layers, and the workflow for this repository. Read before any change here, especially to events, ordering, merge, replay, materialization or sync, a new event type or websocket message, or anything that crosses layers.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Realtime and WebSockets, Task management and Issue triage. It works with Git. The repository describes itself as: Distributed, code-native issue tracker - audit workflows via time-travel. The licence is MIT.

When your agent uses it

  • Tasks that involve Realtime and WebSockets
  • Tasks that involve Task management
  • Tasks that involve Issue triage

Example prompts

  • “/epiq-architecture”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 5fdc511. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • npx
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, npx and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Epiq Architecture loads about 2.3k tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 1,389 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ljtn/epiq at commit 5fdc511, republished under its MIT licence (© ljtn). 1,389 words, ~2,313 tokens.

Download SKILL.mdSave it as .claude/skills/epiq-architecture/SKILL.md (or your agent's skills folder).
name
epiq-architecture
description
How epiq is built — the event log's distributed rules (causal ordering, logical clocks, tombstones, total replay), the code's layers, and the workflow for this repository. Read before any change here, especially to events, ordering, merge, replay, materialization or sync, a new event type or websocket message, or anything that crosses layers.

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.
Show full SKILL.md (627 more words)Show less

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.

© ljtn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/epiq-architecture of ljtn/epiq.

Open the folder on GitHubat commit 5fdc511

Compare with similar skills

Epiq Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Epiq Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Epiq Architecture this skillljtn/epiq538—~2.3kAutomated safety check: PassMIT
Flow Next Workgmickel/flow-next709—~2kAutomated safety check: PassMIT
GitHub IssuesRedWoodOG/Hermes-Desktop1775 repos~2.3kAutomated safety check: NotesMIT
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Review Triage Phaseprisma/orm48k—~995Automated safety check: PassApache-2.0

Similar skills

  • Flow Next Work

    gmickel/flow-next

    Execute a Flow spec or task systematically with git setup, task tracking, quality checks, and commit workflow.

    709 GitHub stars~2k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • GitHub Issues

    RedWoodOG/Hermes-Desktop

    Create, manage, triage, and close GitHub issues. An agent skill from RedWoodOG/Hermes-Desktop.

    177 GitHub starsUsed in 5 repos~2.3k tokens
    DevelopmentAuto-check: notes
  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Official

    Runs the triage step of the review-framework loop: reads fetched PR review state, builds `review-actions.json`, validates it and renders `review-actions.md`.

    48k GitHub stars~995 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Bd To Br Migration

    Dicklesworthstone/beads_rust

    Migrate docs from bd (beads) to br (beadsrust). An agent skill from Dicklesworthstone/beads_rust.

    1.1k GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from ljtn/epiq

  • Epiq

    ljtn/epiq

    Workflow for working an epiq issue board through the epiq MCP — take an identity, sync on demand, keep tickets small and their status, tags and comments current.

    538 GitHub stars~930 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Epiq Architecture

What does Epiq Architecture do?

How epiq is built — the event log's distributed rules (causal ordering, logical clocks, tombstones, total replay), the code's layers, and the workflow for this repository. Epiq Architecture is an agent skill from ljtn/epiq. How epiq is built — the event log's distributed rules (causal ordering, logical clocks, tombstones, total replay), the code's layers, and the workflow for this repository.

When should I use Epiq Architecture?

Epiq Architecture fits situations like: tasks that involve Realtime and WebSockets; tasks that involve Task management; tasks that involve Issue triage.

How do I install Epiq Architecture in Claude Code?

Run `npx skills add ljtn/epiq --skill epiq-architecture -a claude-code`. Or copy the skill folder (.claude/skills/epiq-architecture in ljtn/epiq) into .claude/skills/epiq-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Epiq Architecture in Codex?

Run `npx skills add ljtn/epiq --skill epiq-architecture -a codex`. Or copy the skill folder (.claude/skills/epiq-architecture in ljtn/epiq) into .agents/skills/epiq-architecture in your project. Codex loads it when a task matches its description.

Can I use Epiq Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ljtn/epiq --skill epiq-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/epiq-architecture, .gemini/skills/epiq-architecture, .github/skills/epiq-architecture and .opencode/skills/epiq-architecture in your project.

What does Epiq Architecture need to run?

Going by SKILL.md and its folder, Epiq Architecture needs the command-line tools its instructions call (npm, npx and git). Our summary lists: Node.js.

Does Epiq Architecture access the network?

SKILL.md contains no URLs. Its commands use npm, npx and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Epiq Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Epiq Architecture use?

Epiq Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Epiq Architecture use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Epiq Architecture?

Skills that share tags, products or a category with Epiq Architecture: Flow Next Work (gmickel/flow-next, 709 stars), GitHub Issues (RedWoodOG/Hermes-Desktop, 177 stars), Beads Task Memory (gastownhall/beads, 28k stars) and Pre-Release PR Triage (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Epiq Architecture?

ljtn (a GitHub user) maintains it in ljtn/epiq, which has 538 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 9, 2026.

Source: ljtn/epiq on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.