agentleFS
wellwelwelwellwelwel/lagune/.claude/skills/dashboard/SKILL.md

dashboard

Skill172 starsChanged 2 months agoMITView on GitHub

Authoritative reference for the Lagune dashboard, a live view of a project's .lagune/ chain with a locked-down local action surface. Use before changing anything under src/dashboard/ or src/types/dashboard/.

27 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use update, ingest and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    update

    Sync tasks and refresh memory from your current activity. Use when pulling new assignments from your project tracker into TASKS.md, triaging stale or overdue tasks, filling memory gaps for unknown people or projects, or running a comprehensive scan to catch todos buried in chat and email.

    Also in 3 projects that use this

  • raven-souravSkill

    ingest

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 6 projects that use this

  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 5 projects that use this

  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Hardened responses: Every response sends nosniff, and HTML adds frame-ancestors 'none' and x-frame-options: DENY against clickjacking.

    line 72
  2. Distinctive:

    Read all, one at a time:

    line 84
  3. Very specific:

    Add ?theme=dark to the URL to force a theme.

    line 100

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Lagune dashboard

A live view of a project's .lagune/ chain: charter, findings, hardening, verification, and the applied sub-skills. It parses the real memory artifacts and tracking map on every request and pushes a browser reload whenever anything under .lagune/ changes. Viewing is read-only. The one write path is the Settings action surface, which runs the CLI's own core in-process behind the guards described under Actions.

Authored in strict TypeScript with Node APIs, runtime-agnostic across Node, Bun, and Deno. It ships as a self-contained static client plus a zero-dependency server, both bundled into lib/ at build time. src/ is never published.

The product mission and workflow philosophy live in CLAUDE.md. The toolchain, code conventions, and build path live in the engineering skill, the repository layout in the architecture skill, and design-engineering principles, including how to verify rendered output, in the /interface skill.

Consistency

The client follows one visual system. Same-styled elements never carry their own local variants, and when two of them disagree on a value, standardize on the smallest one already in use. New kinds of visual consistency belong here as subsections, never as new top-level sections.

For general guidelines on the user interface, CDP, screenshots, etc., see: /interface

Spacing

  • One card inset: content inside any surface card sits p-4.5 (18px) from every edge, all four sides. The metric cards, finding cards, charter cards, rail blocks, and detail cards all share it.
  • List cards put every padding on the row: the container is only overflow-hidden rounded-lg bg-surface shadow-card, with no padding of its own. Each row owns px-4.5 py-3, and the first and last rows close the card edge with first:pt-4.5 and last:pb-4.5 (in the findings table, the header is the first row: pt-4.5 pb-3). This keeps row hover and dividers spanning the full card width, and keeps every spacing readable on the element itself. Never assemble an inset from a parent padding plus a child padding: a hidden contribution on the parent is exactly the inconsistency this rule exists to prevent.
  • Fixed rhythm: rows use py-3 with gap-3, card grids use gap-4, sections end with mb-6, and section heads sit mb-3 above their content.

Tiles and icons

Icon tiles in rows are size-8.5 with text-[1.05rem] glyphs, circular arrow affordances are size-8.5 rounded-full text-[0.95rem], and large tiles are size-11 rounded-md text-[1.25rem].

Typography

Micro labels (uppercase group titles, table headers, card labels) come from MICRO_LABEL in client/styles/classes.ts, badges from BADGE, group heads from GROUP_HEAD. Reuse the token instead of retyping a near-copy. Card titles are text-[0.9rem] font-bold tracking-[-0.01em], with extrabold reserved for page and section headings.

Run

End users run it against their own project, with no install:

npx lagune dashboard

That serves the built client and opens the browser on the workspace's .lagune/.

Local development in this repo:

npm run dashboard:dev      # Vite dev server with HMR, proxying data to the node server
npm run dashboard:build    # build the client into lib/dashboard
npm run typecheck

The server prints its URL. By default it binds port 0, so the OS hands back a free port that never conflicts (set PORT to pin one, where it climbs on conflict). In npm run dashboard:dev, the browser opens on the Vite URL: client edits hot-swap modules in place (state survives), while the node server, pinned on port 3001 behind Vite's proxy, keeps watching .lagune/ and reloads the page on any edit there. Nothing is written to disk in dev, Vite serves the client from memory.

How it fits together

  • Server (server/): a node:http server, runtime-agnostic across Node, Bun, and Deno.
    • start.ts is the reusable entry: it resolves the paths, listens (port 0 by default, climbing only when PORT pins a busy one), opens the browser, and stays up until SIGINT. The dashboard CLI command and the dev entry (tools/dashboard-serve.ts) both call it.
    • data/ parses the Markdown memories, tracking.json, and manifest.json into one typed DashboardData object, served at GET /api/data. Understanding markdown is deliberately not our code: the markdown/ module asks mdast-util-from-markdown (micromark, the same CommonMark engine behind the website's Docusaurus, bundled at build time so the published package still needs zero runtime installs) which lines are code and which spans are HTML comments. Code of any kind (fenced, indented, diffs, mermaid diagrams) is never structure, and comments are stripped before any parsing without ever touching code or inline code. Only the domain mapping is manual: which heading opens a section, which - **Field:** line is a field, what goes where. An h1 ends any section, and h4 to h6 stay inside the block they annotate, out of the extracted prose. Field lines are read by a staged grammar (fieldValue) whose canonical shape is the template's and whose fallbacks absorb common LLM punctuation drift: any list marker (-, *, +), optional bold (** or __), case-insensitive field name, then a required separator (colon canonically, em or en dash, or a spaced hyphen). The separator is what keeps prose from matching, and the value is never rewritten. Never hand-roll markdown lexing here (fence pairing, comment masking): extend the mapping over the tree instead.
    • live-reload.ts watches .lagune/, streaming a reload over GET /events (SSE).
    • static-files.ts serves the built client, guarded against path traversal.
    • The server reads .lagune/ from the invoking working directory and the client from the packaged location, never from src/.
    • Actions (actions.ts, guards.ts, session.ts): the Settings route runs real commands (Install, Pull, Update, Specialize) through POST /api/actions/*, in-process via the CLI's own pure-fs core. Every change must preserve these invariants:
      • No shell, eval, or subprocess, ever. Nothing from a request reaches one. The core writes only a fixed code-defined set under .lagune/ and the agent command dirs, never an arbitrary path or content.
      • Fail-closed payloads. Dispatch is a code-defined Map keyed by pathname, never a lookup on a request value. Any key beyond the action's declared fields is rejected (so __proto__, constructor, prototype never pass), values pass only by exact Set membership against AGENT_SPECS / SKILL_GROUPS, are checked with plain types (no regex), and are rebuilt into a fresh object, never spread or merged.
      • Host first, every route. A request must carry a loopback Host (or a dev host from tools/dashboard-serve.ts), checked before anything else, so a rebound domain reaches nothing.
      • Cross-origin locked out. GET /api/session, GET /api/data, and every action reject a Sec-Fetch-Site that is present and not same-origin, so a cross-origin page is never handed the token or data (page script cannot forge that header). No response carries a CORS header and OPTIONS is never answered, so preflights fail closed.
      • Token. A 256-bit value regenerated per start, written to a 0600 file in the OS temp dir (session-<pid>.token) so it is never world-readable at rest. Actions additionally require it in x-lagune-token (compared with timingSafeEqual) and an exact loopback or dev Origin.
      • Bounded input, serialized writes. Bodies are application/json, ≤16KB, JSON.parsed, and cut off by a 5s read timeout so a slow-loris body cannot pin the single-flight lock. One action runs at a time (409 when busy).
      • Hardened responses. Every response sends nosniff, and HTML adds frame-ancestors 'none' and x-frame-options: DENY against clickjacking. Errors are generic to the browser, detailed only in the terminal with newlines neutralized. Success needs no refetch: the .lagune/ write triggers the SSE reload.
      • Residual. The boundary is loopback plus token, not UID isolation: on loopback TCP another local process can still reach the surface. The dashboard targets a single-user workstation. Closing this would need a Unix-domain socket (0600), deferred until a multi-user need is real.
  • Client (client/): a Preact single-page app.
    • components/ and routes/ are Preact components; main.tsx owns the render root and app.tsx the routing, with signals for state, search, filters, and theme. A route with several parts keeps them under a components/<route>/ folder (see components/settings/). Blocks that display artifact prose render through components/admonition.tsx, the dashboard's equivalent of the website's docs admonitions: note, info, tip, warning, and danger. Each kind sets one accent (--adm) and the admonition utility in styles/index.css derives every internal color from it (surface, border, heading, body, inline code, text selection), the same mechanism as the website's docs.css. Reuse it, picking the kind by what the text means, instead of hand-tinting a card.
    • styles/ is a token-driven design system (light and dark), imported by main.tsx and bundled by the Tailwind Vite plugin. Typography matches the website's docs and loads from Google Fonts in index.html (nothing shipped in the package). The layout must stay responsive down to a minimum resolution of 1024x768px.
    • Below 1280px, prefer vertical alignments and single-column layouts. At 1280px and above, prefer grid layouts and horizontal alignments.
  • Shared (shared/): runtime metadata both sides import (skill labels, descriptions, and group badges, agent logos and themes, severity ordering). It derives from the core's own data, never duplicates it: the agent list comes from src/providers/specs.ts, the specialization categories from src/hooks/skills/groups.ts, and the skill-to-group mapping from src/hooks/skills/catalog.ts. Those core modules, and everything here, stay import-safe for the browser (pure data, type-only imports): the website imports them through its bridge, so a label, a logo, or a theme is written once for both surfaces.
  • Types: the shared data contract and the server/client-internal types live in src/types/dashboard/, the single source of truth both sides import.
  • Build (src/dashboard/vite.config.ts): Vite with @preact/preset-vite and @tailwindcss/vite, entered through client/index.html, always emitting to lib/dashboard with hashed bundle names. client/public/assets/ (icons and images, referenced as /assets/...) is copied verbatim. It is the single home of every agent and category logo, and the website serves it as well. There is no dev output directory, vite dev serves everything from memory.

Security context

Read all, one at a time:

  • spec/skills/javascript.md
  • spec/skills/network.md
  • spec/skills/http-request.md
  • spec/skills/access-control.md
  • spec/skills/crypto.md
  • spec/skills/interpreter.md
  • spec/skills/path.md
  • spec/skills/browser.md
  • spec/skills/regex.md

Routes

#/ overview · #/findings and #/findings/:id · #/sidequests · #/charter · #/skills · #/settings.

Add ?theme=dark to the URL to force a theme.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.