Skip to content

Package Catalog ​

The detailed map behind the compact table in Agent Guidelines: what each sub-package declared in the root dub.sdl is, and where its modules live. The authoritative list is the subPackage entries in dub.sdl; per-library docs live under docs/libs/<name>/ and specs under docs/specs/.

Sub-packages ​

  • ci (apps/ci) — Repository CI helper: runs/verifies markdown examples, standalone examples, sub-package tests, and markdown link maintenance
  • dub-forward (apps/dub-forward) — The development shells' dub (ci CIC30): dub build|test|run of a sparkles checkout's packages run as ci build|test|run, everything else reaches the pinned dub ($SPARKLES_REAL_DUB) unchanged; Phobos only, one exec per call
  • shader-compile (apps/shader-compile) — The EFX20 pipeline: compiles a dub package's single-source D shaders — the @compute modules of its shaders configuration (for sparkles:ui: libs/ui/shaders/effects.d + sparkles.ui.effect_shaders over sparkles:shaders) — with the dcompute-enabled LDC (ldc2-vulkan: dlang.nix's ldc-vulkan, the sparkles/main branch; in the dev shell, and nix run .#shader-compile wraps it) to SPIR-V, validates and optimises it, cross-compiles every @fragment entry point with spirv-cross to GLSL 330 and ES 100, proves each with glslang, and writes *.frag to --out. Runs as sparkles:ui's gpu-effects pre-generate step (--if-stale: a stamp of input hashes, so a fresh build needs no compiler) into the git-ignored libs/ui/generated/shaders/; nothing generated is committed, and Nix builds it once (.#ui-shaders). Phobos-only on purpose: core-cli depends on sparkles:ui
  • release (apps/release) — Release automation: scans tags as SemVer, summarizes commits, suggests a bump, gathers notes ($EDITOR or a CLI LLM agent), tags and publishes
  • hue (apps/hue) — Interactive syntax-highlighting file viewer / live theme previewer over sparkles:syntax with subcommands (view, diff, pr, gallery, theme, overlay, config) powered by sparkles:core-cli (ANSI + HTML, plus the --gui window, drawn by sparkles:ui-vulkan on the native arm by default and by raylib in the raylib configuration; --gui also renders a render-markdown.nvim-style markdown preview — heading icons, callouts, task lists, box-bordered aligned tables via sparkles:core-cli — and native ANSI in ```ansi fences via an off-screen sparkles:ghostty VT). Also ships as an Android NativeActivity APK on the native arm (nix build .#hue-apk; raylib: .#hue-raylib-apk, dev shell nix develop .#android — both x86_64-linux only, since the NDK/SDK ship prebuilt for that host; see docs/specs/hue/android.md)
  • nix-eval (apps/nix-eval) — Demo CLI for sparkles:nix: evaluates a Nix expression or flake output and pretty-prints the value
  • terminal (apps/terminal) — Minimal terminal emulator built on sparkles:ghostty, drawn by sparkles:ui-vulkan on the native arm (the raylib configuration keeps the raylib window)
  • terminal-benchmark (apps/terminal-benchmark) — Render-CPU benchmark harness for the terminal emulator (/proc CPU sampling; idle/render/churn scenarios)
  • twoslash-extract (apps/twoslash-extract) — Batch D twoslash extractor: runs the sparkles:twoslash-d pipeline over an annotated D sample (or a directory, one child process per file) and writes the .twoslash.json payload hue --twoslash renders; --verify guards the golden fixtures
  • ui-gallery (apps/ui-gallery) — A browsable catalog of the sparkles:ui toolkit — widget kinds, layout, the 36 themes, the component set and the interaction machines — written as a sparkles:ui-app component, so one view serves both the terminal and the window. Also the host contract's first real consumer, and sparkles:terminal-view's embedding proof (TVW7): the Terminal page runs real shells in VSCode-style tabs, terminal-in-terminal included. --render/--render-plain paint one frame with no backend at all
  • fileset-explorer (apps/fileset-explorer) — Write a fileset and watch what it selects (spec: docs/specs/fileset-explorer/): a multi-line query in the fileset query language (sparkles.build_primitives.fileset.query), highlighted and with the host's own text cursor, re-resolved on every edit into a member tree with hue's file-type icons; beside it a tabbed group of Stats (members, bytes, the castore id and NarHash), Help (the docs page docs/apps/fileset-explorer/index.md, compiled in, whose ::: try blocks run on an in-memory tutorial tree) and Export (the query written for Nix, git, rsync, tar, Cargo, Bazel or dub, or why not). --emit <target> prints the code; --render-plain paints one frame with no terminal
  • fsx (apps/fsx) — Copy and list the files a fileset selects (spec: docs/specs/fsx/), one program under the names fscp and fsls (fsdiff in its full build): --src a directory, --filter/--filter-file a fileset query, --dst the copy; every copy verified by its castore id (--tree-hashes adds NAR and git), source hashed before or (--verify inline) during the copy. Built on sparkles:fileset-tools and core-cli's args configuration, so it links no UI package
  • diagram (apps/diagram) — A draw.io-style diagram board on sparkles:ui-app — an infinite world with a camera, a dense entity store, orthogonal connectors, groups, labels and a configurable Cartesian grid backdrop (--config-file, plus a modal PropertyTree settings pane over the live config — , or the context menu). It exists to stress the host abstraction from a direction hue and terminal cannot: neither has a camera, a world coordinate space, or a surface larger than its viewport. Its central claim is checkable by grep — no backend name appears anywhere under apps/diagram/ (DIA1/DIA2), and --tui and --gui are the same view
  • editor (apps/editor) — The code-editor application over the shared UI editor: one active document pane with independent tabs, a common command policy for keyboard/Lantern/palette discovery, and an optional inspector. The production desktop configuration combines Vulkan and TUI; no-gui isolates the terminal host. The full delivery contract and remaining gates live in docs/specs/editor/
  • text-lab (apps/text-lab) — The Vulkan canvas's text rendering, switched live: one specimen of everything it draws text with (styles, code punctuation, accents, scripts, combining marks, CJK, emoji and their sequences, Nerd Font icons, box drawing, coloured text) on a dark and a light panel, with keys for compositing, contrast, hinting and shaping and a loupe that magnifies the composited pixels under the pointer. --shot captures a frame and exits; the native arm only (dub run :text-lab -- --gui)
  • sparkles:android (libs/android) — NativeActivity glue for the Android apps (hue, the terminal): the activity handle, data dirs and content rect, the logcat sink, the APK asset bundle (manifest-driven extraction keyed by bundle-hash, streaming asset copies), and JNI bridges into framework classes — clipboard, typed text (KeyCharacterMap, IME commits), the soft keyboard, HTTP(S) downloads (HttpURLConnection), ACTION_VIEW intents, a wake lock, runtime permissions. Short JNI calls run on one attached worker thread (withJni), since sparkles:ui-app frames run on fibers ART refuses to attach. Everything platform-bound is version (Android); on a host the package is its pure helpers (bundle.d), so any library can depend on it unconditionally
  • sparkles:appearance (libs/appearance) — The desktop's appearance preferences as data (SystemAppearance: colour scheme, accent, contrast, reduced motion, title-bar controls, interface and title fonts, each with whether it was read), the parsers for GNOME's button-layout and Pango font names, the --appearance override (overriddenBy), and on Linux the settings portal over sparkles:dbus (PortalAppearance: one ReadAll, then SettingChanged) — the proposal's P2 (proposal)
  • sparkles:base (libs/base) — Allocation-conscious foundation utilities: Buffer (four storage policies), lifetime helpers, @nogc text readers/writers, terminal styling, terminal capability probing (term_caps — size/tty/colors/unicode, the single place that decision is made), hardware parallelism (hw_caps — CPU quota/affinity plus memory/load/swap so a pool is not wider than the host can usefully run), the GPU drivers' glibc (driver_libc — re-executes a program onto the newest glibc its Vulkan and EGL drivers load, and thisProgramPath, its own path either way), styled IES, logging, the shared I/O error vocabulary (io.errors), synchronization (sync — Mutex, LockBits, InterruptibleMutex, Guarded!T, Condition, Once, RwLock, Semaphore, the events, Latch, Barrier and a futex-style address wait over one statically allocated parking lot, serving threads and, through a scheduler's installed parker, fibers; spec: docs/specs/base/sync/), and the capability VFS (vfs — directory handles with compile-time rights, the component walk, tree removal, atomic write (replacing or create-only, keeping permissions, syncing the directory), whole regular-file reads, and the in-memory MemVfs; spec: docs/specs/base/vfs/)
  • sparkles:build-primitives (libs/build-primitives) — Build-system and VCS primitives: filesets (fileset.*: values naming sets of files, .gitignore scopes as git reads them, a sans-I/O resolution machine over the capability VFS, and fileset.listing for applications listing a directory with include/exclude globs), content addressing (content_addressing.*: castore, NAR, git trees and iroh's outboard over filesets), git_env — the scrubbed environment (runGit) a git child needs, so an inherited GIT_DIR cannot redirect a call that names its own repository — and the DUB recipe vocabulary: dub_manifest (from sparkles:dub-manifest), the dub.sdl schema as sparkles:wired types (DubManifest, DubBuildSettings, DubDependency, …) that every in-repo recipe reader decodes through, and dub_recipe, the cross-format (dub.sdl/dub.json/single-file) summary dmd-lsp and hue read; plus the generic task-DAG layers ci runs on: task.* (vocabulary, graph validation, the Event Horizon executor, supervise-backed process actions, output spooling, plain reporters) and workspace.* (the dub package graph and focused --from/--since selection). The TTY reporter, which needs sparkles:ui, stays in apps/ci
  • sparkles:build-graph (libs/build-graph) — The build graph (spec: docs/specs/build-primitives/build-graph/): variants.d plans each request's variants, keyed by what changes their object code, with pruned downward versions and roles; generators.d recognizes typed generators; actions.d lowers the variants to compile, archive, link, generate and test actions on the task DAG; execute.d runs an action graph locally, with BGA4's environment and the store's reuse; store.d is the local store (results, manifests, leases, eviction); fetch.d fetches the locked registry sources without Nix. A package of its own because planning reads D source with DMD's lexer (sparkles:d-source, D56): a consumer of build-primitives links no part of DMD
  • sparkles:ci-provider (libs/ci-provider) — CI-provider detection (GitHub Actions, GitLab CI, Buildkite, Azure Pipelines, CircleCI) through an environment seam, and each provider's log conventions as writer-based @nogc operations: collapsible groups, source annotations, secret masks, and step-summary targets, degrading to plain output elsewhere. A leaf package with no dependencies, -betterC- and WASI-clean, so the task-DAG reporters and the test runner can share it (spec: docs/specs/build-primitives/task-dag/SPEC.md TDO6/TDO7)
  • sparkles:code-instrumentation (libs/code-instrumentation) — Code coverage ingestion library: universal coverage data model (LineCoverage, FileCoverage, CoverageReport), multi-format parsers over a shared record scanner (DMD .lst, GCC gcov, LCOV .info, V8 AST byte-range blocks, llvm-cov JSON) reporting failures as ParseExpected, anchored format auto-detection, and overlay planning (CoveragePlan)
  • sparkles:core-cli (libs/core-cli) — CLI argument parsing, help formatting, interactive prompts, process utilities, ANSI unstyle helpers. The UI components moved to sparkles:ui (sparkles.ui.components.*)
  • sparkles:d-source (libs/d-source) — Facts about D source text without semantics, from DMD's own lexer (dmd:lexer, the fork pin dmd-fmt and dmd-lsp share): tokens.d reduces DMD's tokens to kind, text and line, never failing on malformed input; mentions.d finds the version and debug identifiers a file mentions, the conditions it builds from strings (a mixin's joined literals, an enum initializer; D34), its imports and unittest blocks, and resolves sparkles.base.meta.isVersion uses through the imports; dmd_globals.d is the one lock and Id.initialize for DMD's process-wide state. Depends on no repository package, so build-graph can use it; no -preview=dip1000, as for dmd-fmt (BLD4)
  • sparkles:dbus (libs/dbus) — A minimal D-Bus client: the wire format (a writer into a buffer, a bounds-checked @nogc reader cursor), message framing, SASL EXTERNAL over a Unix socket, Hello, method calls with a deadline, AddMatch, and signals read when sparkles:event-horizon finds the socket readable (Linux)
  • sparkles:diff (libs/diff) — Text diff engine behind hue's diff & PR viewer (spec DVM*): a backend-neutral diff document model (files → hunks → rows with pairing + intra-line emphasis), Myers line diff with scale guards, similarity alignment pairing (linematch-style DP), guarded word-level refinement (over its own token classes, or over boundaries a caller supplies via refinePairTokens — which is how hue's grammar-aware structural view reuses the LCS without the engine learning about tree-sitter),, a unified-patch parser/emitter (ParseExpected errors, output-range emit), N-way alignment of several texts against a reference (alignSides), and a reader of conflict-markered files (parseConflicts: merge, diff3, zdiff3). @safe pure nothrow @nogc throughout: a flat arena of plain-data elements owned by SharedBuffer (CoW), texts borrowed as spans. Tree-sitter-free by design — sparkles:base is its only dependency
  • sparkles:dmd-fmt (libs/dmd-fmt) — D formatter being built on the DMD-lexer token spine per docs/research/code-formatting/dmd-fmt-proposal.md (M0–M8 delivered — decisions, spike evidence and milestone table in docs/specs/dmd-fmt/; v1 policy: author's-breaks + structural reindent, magic trailing comma, .editorconfig/dfmt-key discovery, dmd-fmt CLI via the cli dub configuration): spine.d lexes with commentToken+whitespaceToken, records exact byte spans, surfaces silently-consumed bytes (#line, shebang) as explicit directive entries, and proves byte-for-byte reconstruction plus token-equality against a plain lex and doc-lex offset correspondence; oracle.d reduces a parse-only AST walk to sorted offset arrays (dfmt's ASTInformation shape); groups.d proves S2 — nested group trees reconstructed from the spine plus those arrays alone (bracket matching + markers + bounded lookahead), degrading to bracket-only structure on unparseable input; cases.d is the markdown case runner (a fixture is a documentation page: a ::: code-group under an <!-- fmt id=P19 --> directive, first fence in / later fences out, SPARKLES_UPDATE_GOLDENS=1 to bless — see docs/specs/dmd-fmt/testing.md); verify.d is the M1 verifier — verifyFormat (tier-3 token equality modulo whitespace + the separate DDoc-attachment check via the doc-lex, catching whitespace-only trailing-/// reattachment) and checkConvergence (bounded idempotence harness with per-step verification). DMD's frontend globals are not thread-safe, so all lexing/parsing serializes on a module lock
  • sparkles:dmd-lsp (libs/dmd-lsp) — DMD-frontend-as-a-library semantic core (ported from VisualD dmdserver, Boost-1.0): one-pass in-memory analysis with structured diagnostics, the semvisitor type oracle (tipAt resolved types + ddoc, identifierSpans classification, definitionAt), on the pinned dmdserver-dub LanguageServer fork (dub git dep; runtime sources via $SPARKLES_DMD_IMPORT_PATH); target profiles analyze as LDC too, and @compute shader modules as the dcompute LDC's device build ($SPARKLES_LDC_IMPORT_PATH, the package's dub device configuration, LDC's device-code rules) — see docs/specs/dmd-lsp/
  • sparkles:doc-view (libs/doc-view) — The document viewer extracted from hue (spec UIA14, docs): DocumentPipeline (read → detect → highlight → parse a file into a Document — code, markdown, DSV, diff, twoslash), ViewerModel (the laid-out widget tree and display list, views, wrapping, folding, search, the NAV5 scroll anchor), the markdown/DSV/diff models, VitePress @include resolution (VIW5/VIW7), and DocViewPane — the viewer as an embeddable sparkles:ui-raylib pane with its own keys, reload-on-change and image display, which sparkles:terminal opens files in (TDV). Raylib-free except the pane and ghostty-free except the ansi-fence decoder, each compiled where the consumer links that backend (Have_*)
  • sparkles:docs (libs/docs) — Markdown-based static documentation-site (SSG) library, extracted from hue's gallery: the content-fragment builders (plain + twoslash, over sparkles:syntax/sparkles:twoslash), the page shell with theme-derived chrome, appearance toggle and breadcrumbs, the mirrored site tree with per-directory indexes, shared stylesheet assets, the recursive document set (over sparkles:build-primitives' glob walk), and the docs-site sidebar/srcExclude data schema (sparkles:wired) that ci check sidebar / ci docs fences-audit consume. hue's gallery subcommand is its first consumer; the planned hue site + API doc generator build on it (spec: docs/specs/hue/gallery.md GAL*)
  • sparkles:dql (libs/dql) — D Query Language engine: path-based aggregate addressing, typed constraint evaluation, fuzzy matching via sparkles:fuzzy, zero-allocation predicate filtering, and schema introspection (spec: docs/specs/dql/SPEC.md)
  • sparkles:dsv (libs/dsv) — Delimiter-Separated Values engine behind hue's DSV preview / data browser (spec DS*): dialect detection (delimiter/quote/header sniffing over a bounded sample, incl. the semicolon-CSV case), a tolerant RFC 4180 parser with a raw-byte-span identity channel per cell (ragged rows degrade, never error), and sampled typed columns. Offsets-not-copies over borrowed sources; @safe pure nothrow @nogc throughout; sparkles:base is its only dependency
  • sparkles:dub-manifest (libs/dub-manifest) — The DUB recipe vocabulary as a sparkles:wired schema, in module sparkles.build_primitives.dub_manifest: DubManifest with its configurations, build types, dependencies and platform-qualified settings, read strictly from dub.sdl, dub.json or a single-file package's embedded recipe (parseDubManifest, parseDubJsonManifest, parseEmbeddedDubManifest, readDubManifest). It depends on sparkles:wired and sparkles:base alone, so it builds for WebAssembly (spec WW1); sparkles:build-primitives depends on it and holds its repository-wide tests. Its sub-package dub-manifest-nix-wasm (libs/dub-manifest/dub-manifest-nix-wasm) is the schema as a module for Nix's builtins.wasm (WW3–WW6): a host-generic conversion to Nix values (convert.d), the evaluator's imports (wasm_host.d), and an in-memory host (tree_host.d) behind the native oracle the module is checked against
  • sparkles:event-horizon (libs/event-horizon) — Completion-first (io_uring/kqueue/IOCP) event loop with a native algebraic-effect layer (three API tiers: callback, direct-style fibers, Effect!T)
  • sparkles:event-horizon-sys (libs/event-horizon-sys) — The loop-free system-call layer of sparkles:event-horizon: BlockingVfs, the capability VFS's blocking backend (the *at family on POSIX, with openat2 on Linux and O_NOFOLLOW_ANY on macOS as kernel resolvers, and search-only opens for intermediate directories); the descriptor ownership types (OwnedFd, BorrowedFd, isFdBorrowable); and the native error-code tables (errnoKind, win32Kind). It depends on sparkles:base alone, so code that must not pull in the event loop, such as test fixtures, can use it (spec: docs/specs/base/vfs/backends.md)
  • sparkles:font (libs/font) — Font files parsed in D over borrowed bytes, with no C library: faces and collections, the table directory with checksums, typed views of head/hhea/maxp/OS/2/post/hmtx/fvar/avar/STAT, character maps chosen in HarfBuzz's order with lenient checks and coverage ranges, name records decoded through base's codecs, and glyph names from post and the CFF charset. Milestone M1 of docs/specs/font; malformed data returns a FontError, nothing allocates
  • sparkles:font-oracle (libs/font-oracle) — Test-only: checks sparkles:font against HarfBuzz, declared by ImportC from its installed headers, over every bundled font ($SPARKLES_FONTS_PATH), so that sparkles:font itself links no C library
  • sparkles:fuzzy (libs/fuzzy) — Bounded allocation-free fuzzy search core: Unicode-aware query/constraint parsing, Thompson-NFA globs, exact needle-deletion witnesses with source-byte positions, affine-gap ranking with a deterministic fallback, composite scoring and global top-K, fixed-point frecency/combo history, and generation-bound chunked search. Depends only on sparkles:base and expected; hue owns clocks, jobs, snapshots, and persistence (spec: docs/specs/fuzzy/)
  • sparkles:ghostty (libs/ghostty) — D bindings + ImportC integration layer for libghostty-vt (Ghostty's terminal VT engine)
  • sparkles:http (libs/http) — HTTP/1.1 building blocks (request parser + minimal server API) over sparkles:event-horizon
  • sparkles:image (libs/image) — Image file codecs: the project's one PNG decoder (every colour type and depth, tRNS, Adam7; straight or premultiplied RGBA into caller-owned storage, nothing allocated; held to stb_image over PngSuite) and an RGBA encoder. Used by the terminal's kitty graphics, sparkles:font's colour strikes and native screenshots
  • sparkles:input (libs/input) — Abstract, capability-tiered input vocabulary shared by every sparkles:ui target: events as Regular values (a sum type over key/pointer/wheel/focus/resize, positions in the toolkit's 0-based cells) plus the tier-0/1/2 interaction ladder; sparkles:tui decodes its wire formats directly into it (design: docs/specs/ui/input.md)
  • sparkles:fileset-tools (libs/fileset-tools) — The engine fsx and the fileset explorer share (spec: docs/specs/fsx/): evaluate resolves a fileset query over a directory or an in-memory tree into its members and their castore, NAR, git and iroh names; copyMembers writes them elsewhere through the capability VFS (BlockingVfs or RingVfs), absolute links only beneath granted roots; statsRows/formatStats are the Stats report. No UI package
  • sparkles:iroh-send (libs/iroh-send) — sendme send as a library loaded at run time: loadIrohSend dlopens libsparkles_iroh_send.so, iroh's own code built inside sendme's source tree from rust/ (nix/packages/sparkles-iroh-send.nix), and IrohSend.start serves a list of files over iroh's blobs protocol as a collection sendme receive takes, with progress, ticket and stop; IrohSend.collection names the collection offline. Nothing links it, so a program runs without it (design: docs/specs/fileset-explorer/decisions.md, X18)
  • sparkles:math (libs/math) — Small math primitives for games/graphics (early stage)
  • sparkles:metadata (libs/metadata) — Dependency-free passive UDA vocabulary (WireName, WireCase, WireRepr and the format tags, CaseStyle, Aliases, Label, Description, Range) shared without coupling foundational libraries to CLI, serialization, UI, or query-engine policy
  • sparkles:nix (libs/nix) — D bindings for the Nix C API (libnix{util,store,expr,fetchers,flake,main}-c) — ImportC raw layer + high-level RAII/Expected wrappers (eval, store, flakes)
  • sparkles:profiling (libs/profiling) — Frame statistics and profiling over sparkles:base alone: a fixed-size FrameRecord (CPU phases, GPU scopes, flags, display time), a FrameHistory!N ring, a log-scaled FrameHistogram, FrameStats (percentiles, the 1% low, hitches against the refresh attributed to their frames' flags, latency), FrameSummary for JSON, a Chrome trace export, optional Tracy frame marks and zones (sparkles.profiling.tracy, the tracy configuration; no-ops otherwise), and the hardware counters sparkles:test-runner's benchmarks read (sparkles.profiling.counters: perf_event groups, rdpmc, raw events, syscall tracepoints, pressure stalls, the capability seam) (spec: docs/specs/profiling/SPEC.md)
  • sparkles:reflection (libs/reflection) — Dependency-free structural reflection kernel: one closed typeKindOf classification and indexed field/property primitives (the field spine, public getter discovery incl. const-readability, the value-like wrapper rule, CTFE helpers) that consumers build their own walks from; the property tree, text writers, and query schemas all dispatch on it — structure here, policy (and each traversal) in the consumers (docs)
  • sparkles:raylib-text (libs/raylib-text) — Reusable raylib text-rendering core shared by apps/terminal and hue --gui: a multi-face FontSet (real bold/italic variants, on-demand atlas growth, --font-codepoint-map routing), drawGrapheme/drawSolid + a per-run drawText, and procedural box-drawing (drawBox, so ─│┼╭… connect across cells instead of using gappy font glyphs)
  • sparkles:recovery (libs/recovery) — Crash-recovery storage over opaque payloads: flock-leased private archive directories (LeasedDirectory), numbered immutable generation files written create-only through the VFS (appendGeneration, pruneArchive, retirement markers, claimArchives), a coalescing background CheckpointWriter!Snapshot that acknowledges a revision only once durable, and maintenance tasks on an event-horizon JobQueue; the editor's session archive is its first user; fault-injection probes in libs/recovery/tools (docs)
  • sparkles:shaders (libs/shaders) — Single-source shader vocabulary: GLSL-shaped vec2/vec3/vec4 (native __vectors under LDC where the size is a power of two, a lookalike struct otherwise), the v2/v3/v4 constructors, UFCS component reads, and the GLSL built-ins (floor, mod, dot, clamp, mix, …) with the specification's semantics on the CPU. In a dcompute build (-mdcompute-targets, which predefines LDC_DCompute) its @compute/@fragment/@input/@uniform/Sampler2D are LDC's real ldc.dcompute symbols; otherwise inert stand-ins, so an ordinary build sees plain D. Dependency-free
  • sparkles:source-view (libs/source-view) — Source viewing and markdown rendering components over sparkles:ui (sparkles.source_view.code, sparkles.source_view.markdown): maps syntax-highlighted code and structural markdown ASTs into sparkles:ui WidgetTree nodes for backend-neutral GUI/TUI rendering parity, with fence scrolling, foldable sections, callouts, task lists, and box-bordered aligned tables
  • sparkles:syntax (libs/syntax) — Syntax highlighting: engine-agnostic highlight-event stream, scope-compatible label vocabulary, theme layer, ANSI + HTML renderers, tree-sitter precise-mode engine (design: docs/specs/syntax/), plus a structural markdown model (md/model.d, extractMarkdown) with an MdDoc → HTML emitter (md/render_html.d) for preview/doc renderers
  • sparkles:terminal-view (libs/terminal-view) — The terminal core as an embeddable component, extracted from apps/terminal (spec: docs/specs/ui-app/terminal-view.md, TVW): TerminalView — the whole emulator as a runApp component (libghostty screen, a per-cell renderer drawing through a painter (isTerminalPainter: raylib's in the library configuration, the host's in core, which has no raylib), the mouse from sparkles:input pointer events, pty lifecycle, the byte-oracle-pinned key encoding seam, OSC color-query replies) — plus the embedding surface (frame at a pane size, paintPane, and the host-free pump/decideRedraw/sendKey/notifyFocus/resize/openCore) and cell_paint.d, which renders the VT screen through any isCanvas target so a pane works fontless in a terminal. Embedded by apps/ui-gallery's Terminal page (TVW7)
  • sparkles:test-runner (libs/test-runner) — General-purpose unittest runner (silly successor): parallel runtime tests plus @ctfe, @betterC, @wasm, @benchmark, and @workload modes
  • sparkles:test-utils (libs/test-utils) — Testing helpers: diff tools, temp-filesystem helpers, string helpers
  • sparkles:text-buffer (libs/text-buffer) — Persistent UTF-8 text in a reference-counted summary tree (Text), edits as values (ChangeSet) and a branching undo history (History); @nogc, depends only on base
  • sparkles:tree-sitter (libs/tree-sitter) — D bindings for the tree-sitter C runtime: ImportC surface, RAII wrappers with TsError reporting, grammar dlopen (grammars supplied by the nix ts-grammars bundle via $SPARKLES_TS_GRAMMAR_PATH; all come from nixpkgs except SDLang — in-house at PetarKirov/tree-sitter-sdl, nix/packages/tree-sitter-sdl.nix — and D, pinned to PetarKirov/tree-sitter-d for DUB single-file recipe injections, nix/packages/tree-sitter-d.nix)
  • sparkles:tui (libs/tui) — Full-screen interactive terminal substrate: a 2-D cell grid with a compact packed cell (GridT), a retained diff compositor (Screen), terminal lifecycle (raw mode / alt screen / mouse), SGR-1006 input decoding, an event loop, and the terminal geometry vocabulary (TermPosition). Rendering core chosen by measurement — see docs/specs/tui/
  • sparkles:twoslash (libs/twoslash) — Twoslash render overlay on sparkles:syntax: the TypeScript-twoslash node model as opaque data (JSON via sparkles:wired) rendered as type-annotation overlays in HTML (the .twoslash-* contract + CSS), ANSI meta-lines, and the hue --gui raylib backend; render_widgets.d maps the node model to a sparkles:ui WidgetTree for backend-neutral GUI/TUI parity
  • sparkles:twoslash-d (libs/twoslash-d) — The D twoslash analyzer: notation parser (^?, ---cut--- family, @errors:/@dflags:/@import:, custom tags), node assembly over sparkles:dmd-lsp (hover-per-identifier + ddoc, queries, error nodes, two-phase cut/position resolution), and the .twoslash.json emitter with the D producer contract (language/offsetEncoding)
  • sparkles:twoslash-protocol (libs/twoslash-protocol) — The twoslash node model (Node/TwoslashReturn) + wired JSON ingest, extracted from sparkles:twoslash so producers (sparkles:twoslash-d) consume it without the render lib's sourceLibrary closure; owns the language/offsetEncoding payload declaration and the legacy UTF-16 offset normalization
  • sparkles:unittest-layout (libs/unittest-layout) — The build graph's unittest layout lint (BGV4–BGV5): lint.d's checkLayout parses a module with DMD's parser, parse-only (dmd:frontend until the fork's dmd:parser carries the parse-only AST; build-graph D56), and reports what a version (unittest) changes that a dependent can observe — a visible declaration, a field, a virtual method, a destructor, postblit or copy constructor, a template, a version (unittest) inside a template or a body dependents compile, an import the library does not depend on. Parses under sparkles:d-source's DMD lock; no -checkaction=context in its tests, as for dmd-fmt
  • sparkles:ui (libs/ui) — Canvas-first three-level UI toolkit (state-machines / layout / widgets) — the repository's single UI stack: a DbI isCanvas!T backend seam with the pixel geometry every pixel canvas shares (pixel_geometry.d), a semantic Slot/Palette style layer, a unified Theme (syntax rules + slots + metrics + glyphs, runtime-swappable), a flat-arena widget model, box-flow layout, the view→layout→buildDisplayList→paint pipeline, components/ — the terminal component set (box/table/tree/meter/tasklist/live/…) moved here from core-cli — and the keymap/lantern layer (keymap.d/lantern.d/components/lantern_view.d: bindings-as-data over app-supplied command/scope enums plus the which-key-style guide, extracted from hue; spec: docs/specs/ui/keymap.md). The built-in effects run as tier-0 CPU transforms by default, and gain their generated GPU halves only in the opt-in gpu-effects configuration (selected beside every ui-raylib dependency, and which needs ldc2-vulkan). GL-free; geometry specializes sparkles:math's Vector
  • sparkles:ui-app (libs/ui-app) — The application host for sparkles:ui: backend selection (--gui/--tui/--html, display probing, the Android answer), the shared window/font CLI and its setup order, and the frame/event loop — so an application never names a canvas. Ships three configurations (tui/gui/full) and a headless recording target that makes an app's own frame loop testable (design: docs/specs/ui-app/)
  • sparkles:ui-raylib (libs/ui-raylib) — sparkles:ui's GPU backend adapter: RaylibCanvas scales the toolkit's cell-space display list to pixels over the shared sparkles:raylib-text FontSet, and RaylibEvents synthesizes sparkles:input events from raylib's polled state (press/release edges, drag, wheel, typed characters, focus/resize)
  • sparkles:ui-tui (libs/ui-tui) — sparkles:ui's terminal backend adapter: GridCanvas paints the toolkit's display list into a sparkles:tui cell grid (compositing fills, box-drawing borders, undercurl squiggles, clip stack), which the tui Screen cell-diffs to a minimal byte stream
  • sparkles:versions (libs/versions) — Design-by-Introspection versioning library (SemVer, DMD, CalVer, PyPI, Maven, Deb, …) with VERS/pURL interop
  • sparkles:vulkan (libs/vulkan) — Vulkan bindings over the target's real headers: loader discovery, branded handles, typed results, compile-time sType, bounded enumeration, extension/flag/name helpers and per-instance/device dispatch, and a device-memory sub-allocator with a per-frame arena (sparkles.vulkan.memory, spec); Linux surface ABI comes from target-gated ImportC headers while the minimal Win32/Metal surface fragments avoid importing SDK inline bodies, and all ownership/policy stays in consumers such as sparkles:vulkan-wsi
  • sparkles:vulkan-wsi (libs/vulkan-wsi) — Renderer bridge above native WSI: validates typed native handle pairs, enables the matching target-gated Vulkan surface extension, owns instance/surface/device/graphics+present queue selection, and brackets Wayland ICD calls with the WSI native-I/O borrow so Mesa cannot deadlock against Event Horizon's prepared read; it also owns the backend-neutral command pool, frame synchronization, swapchain decisions and deferred retirement that sparkles:ui-sdl3 consumes through compatibility re-exports; the native triangle follows docs/specs/window-system-integration/
  • sparkles:wsi (libs/wsi) — Dependency-light native desktop window-system integration: unit-explicit geometry, generation-safe ids, typed errors/raw handles, lossless Regular events and a deterministic recording backend; native Wayland, X11, Win32 and AppKit lifecycle adapters share Event Horizon's only wait (Wayland/XCB over uring, User32/IOCP and CFRunLoop/kqueue), with immediate Wayland configure ack, a renderer native-I/O borrow, and IMM32 text input on Win32; XIM and remaining features follow docs/specs/window-system-integration/
  • sparkles:wired (libs/wired) — Serialization: a compile-time-reflected wire format with a JSON surface (fromJSON/toJSON), used for opaque payload ingest (e.g. the twoslash node model)
  • sparkles:wired-wasm (libs/wired/wired-wasm) — sparkles:wired as a wasm32-wasip1 reactor (docs/specs/toolchain/wasm-modules.md): one export, spk_wired_run, answers a JSON request to parse (a document tree), write canonically, or decode a dub recipe, for JSON and SDL. The documentation site's JSON and SDL playground (WiredPlayground.vue, on docs/libs/wired/how-to/try-in-the-browser.md) loads it, and the npm package @sparkles-pkgs/wired (libs/wired/wired-wasm/npm, published by release.yml through npm's trusted publishing) wraps it (spec WW12–WW14); its recipe answers are the Nix module's, through sparkles:dub-manifest-nix-wasm's library configuration
  • sparkles:ui-sdl3 (libs/ui-sdl3) — SDL3 window system for sparkles:ui: window, input source, and the Vulkan surface (frame machinery from sparkles:vulkan-wsi)
  • sparkles:ui-vulkan (libs/ui-vulkan) — sparkles:ui's canvas drawn with Vulkan on sparkles:wsi (spec): buffers and images bound to memory from sparkles:vulkan's sub-allocator, per-frame buffer space over a frame arena, and image uploads staged in that space and recorded before a frame's rendering; an effect bracketed at the frame's root runs through it
  • sparkles:test-runner-impl (libs/test-runner-impl) — internal: the runner executable, sparkles-test-runner, built from the pinned revision in nix/test-runner-pin.json; test binaries reach it through $SPARKLES_TEST_RUNNER
  • sparkles:test-runner-core (libs/test-runner-core) — internal: the runner core both clients share — the worker session as a sans-IO protocol state machine, the option model, the run plan and verdict, the compile-time and extracted modes, and a plain-text renderer; performs no I/O
  • sparkles:test-harness (libs/test-harness) — internal: what runs inside a test binary (discovery, execution, the fallback, the measurement layer); depends on no repository package but the attributes and sparkles:profiling-counters
  • sparkles:profiling-counters (libs/profiling-counters) — internal: sparkles:profiling's hardware and OS counters (sparkles.profiling.counters: perf groups, rdpmc, raw events, syscall tracepoints, pressure stalls, the capability seam), a package of their own so the test harness and sparkles:profiling link one copy; depends on no repository package, and its tests live in the harness (sparkles.test_runner.counters_test)
  • sparkles:test-attributes (libs/test-attributes) — the marker attributes (@ctfe, @betterC, @wasm, @benchmark, @workload, @serial, @slow), the one part of the runner a library build depends on

Module map ​

sparkles/
├── flake.nix                       # Nix flake (devshell, `ci` package, checks)
├── dub.sdl                         # Root package; declares every sub-package
├── apps/
│   ├── ci/                         # `ci` helper (executable sub-package)
│   │   ├── src/app.d               # Markdown example runner / verifier, link maintenance
│   │   ├── src/dub_deps.d          # In-tree dependency rewriting helpers
│   │   ├── dub.sdl
│   │   └── dub.selections.json
│   ├── diagram/                    # draw.io-style board on `sparkles:ui-app` (executable)
│   │   ├── src/app.d               # CLI (`--config-file`) + runApp; the only untested line
│   │   ├── src/diagram_app.d       # the component: view/handle/paint; heap-only via `create`
│   │   ├── src/world.d             # dense entity columns, flat groups, cascading edges
│   │   ├── src/camera.d            # world ⇄ screen, the zoom exponent, floor-to-−∞ rounding
│   │   ├── src/keymap.d, lantern.d # the binding table, and the guide bound to it
│   │   ├── src/grid_file.d         # `--config-file`: grid JSON, fail-closed both ways
│   │   ├── src/settings.d          # the pane's subject: the live GridConfig + board prefs
│   │   ├── src/settings_pane.d     # the modal `PropertyTree` over it (`SET`)
│   │   └── src/systems/*.d         # input.d (tools/capture/pan/zoom), render.d (op streams)
│   ├── dub-forward/                # the dev shells' `dub` (executable, installed as `dub`)
│   │   ├── src/dub_forward/rules.d # which command lines go to `ci`, and which to dub (CIC30)
│   │   └── src/dub_forward/launch.d # the host, the pinned dub, the exec in place
│   ├── nix-eval/                   # `sparkles:nix` demo (executable)
│   │   └── src/app.d               # Eval an expr/flake output, recursively render the Value
│   ├── shader-compile/             # D shaders -> SPIR-V (custom LDC) -> GLSL (spirv-cross), stamped
│   │   └── src/app.d               # dub describe -> the `@compute` unit, the pipeline, the --if-stale stamp
│   ├── release/                    # release automation helper (executable)
│   │   ├── src/app.d               # CLI + orchestration (stats → bump → notes → stages)
│   │   ├── src/git.d               # git/gh porcelain wrappers
│   │   ├── src/conventional.d      # conventional-commit parsing; bump.d/stages.d policy
│   │   ├── src/agents.d            # CLI LLM-agent registry (PATH-filtered)
│   │   └── src/notes.d             # $EDITOR seeding / comment stripping
│   ├── terminal/                   # terminal emulator on the native Vulkan arm (executable)
│   │   ├── src/app.d               # Window/render loop, font + PTY setup
│   │   └── src/input.d             # Keyboard/mouse → libghostty-vt encoding
│   ├── terminal-benchmark/         # render-CPU benchmark harness (executable)
│   │   ├── src/app.d               # scenario runner + /proc CPU sampling
│   │   └── src/bench.d             # testable bench logic
│   └── ui-gallery/                 # the sparkles:ui catalog (executable)
│       ├── src/app.d               # CLI + runApp; --render paints one frame headless
│       ├── src/gallery.d           # the component: view/handle member templates
│       ├── src/registry.d          # the Page table + the catalog-wide test sweep
│       ├── src/state.d             # GalleryState: every machine the shell owns
│       ├── src/kit.d, render.d     # the page view vocabulary; frame → ANSI/glyphs
│       └── src/pages/*.d           # one module per catalog entry
├── libs/
│   ├── base/src/sparkles/base/
│   │   ├── lifetime.d              # recycledInstance / recycledErrorInstance (@nogc throwing)
│   │   ├── logger.d                # CoreLogger, DeltaTimeLogger, Sparkles logging wrappers
│   │   ├── prettyprint.d           # Colorized pretty-printing
│   │   ├── buffer.d               # Buffer + Storage policies, checkToString/checkWriter helpers
│   │   ├── source_uri.d            # OSC 8 source-URI hooks (editor links)
│   │   ├── styled_template.d       # IES-based styled text processing
│   │   ├── term_caps.d             # Terminal capability probing (size, tty, colors, unicode)
│   │   ├── hw_caps.d               # Hardware parallelism (CPU quota/affinity, RAM, load, swap)
│   │   ├── term_style.d            # Terminal styling/colors
│   │   ├── sync/                   # parking lot + Mutex/LockBits, InterruptibleMutex, Guarded, Condition, Once, RwLock, Semaphore, events, Latch, Barrier, address wait, parker.d
│   │   └── text/                   # @nogc text package: readers.d, writers.d, errors.d, package.d
│   ├── build-primitives/src/sparkles/build_primitives/
│   │   ├── fileset/                # filesets: value, pattern, plan, machine, ignore, driver, scheme, listing
│   │   ├── content_addressing/     # Merkle shell, castore, NAR, git trees, iroh outboard
│   │   ├── git_env.d               # runGit / gitChildEnvironment: a git child never inherits GIT_DIR
│   │   ├── dub_manifest_corpus.d   # repository-wide tests of the recipe schema (sparkles:dub-manifest)
│   │   ├── dub_recipe.d            # recipe lookup + cross-format summary (names, subpackages, configurations)
│   │   ├── task/                   # task DAG: model, graph, action, executor (Event Horizon), process (supervise), output, reporter, reporter_plain, testing
│   │   └── workspace/              # package_graph.d (dub sub-package graph), select.d (--from/--since selection)
│   ├── build-graph/src/sparkles/build_graph/
│   │   ├── variants.d, actions.d   # variants and their keys; the action graph
│   │   ├── generators.d, execute.d # typed generators; local execution
│   │   └── store.d, fetch.d        # the local store; locked sources without Nix
│   ├── ci-provider/src/sparkles/
│   │   └── ci_provider.d           # CI-provider detection + groups, annotations, masks, step summaries (TDO6/TDO7)
│   ├── code-instrumentation/src/sparkles/code_instrumentation/
│   │   └── coverage/               # models, record scanner, formats (dmd, gcov, lcov, v8, llvm), ingest, overlay
│   ├── d-source/src/sparkles/d_source/
│   │   ├── tokens.d, mentions.d    # DMD's tokens; version mentions, string-built conditions, imports, isVersion uses
│   │   └── dmd_globals.d           # the lock and Id.initialize for DMD's process-wide state
│   ├── docs/src/sparkles/docs/     # SSG doc-site library: fragment.d, options.d, page_shell.d,
│   │                               # site_tree.d, breadcrumbs.d, assets.d, source_set.d, sidebar.d
│   ├── dub-manifest/src/sparkles/build_primitives/
│   │   └── dub_manifest.d          # dub.sdl as a wired schema: DubManifest, DubBuildSettings, parseEmbeddedDubManifest
│   ├── core-cli/src/sparkles/core_cli/
│   │   ├── args.d                  # CLI argument parsing (@CliOption, parseCliArgs)
│   │   ├── common_dirs.d           # XDG / standard directory lookup
│   │   ├── help_formatting.d       # --help output formatting
│   │   ├── prompts.d               # Interactive prompts (select/confirm/textInput + PromptPolicy)
│   │   ├── process_utils.d         # Process execution + RSS/CPU monitoring
│   │   ├── term_unstyle.d          # Strip ANSI escapes
│   │   └── key_input.d             # Raw-key session helpers (the UI components moved to sparkles:ui)
│   ├── shader/src/sparkles/shaders/ # attributes.d (device symbols or stand-ins), types.d (vec2/3/4, v2/v3/v4),
│   │                               # math.d (GLSL built-ins), testing.d (the tests, host-only), compute_mode.d (the `@compute` scanner)
│   ├── ui/shaders/                 # effects.d: the @fragment entry points (device-only, outside sourcePaths);
│   │   └── (../generated/shaders/) # the GLSL the `gpu-effects` build derives from them — git-ignored
│   ├── unittest-layout/src/sparkles/unittest_layout/
│   │   └── lint.d                  # checkLayout: what a version (unittest) changes that a dependent sees (BGV4)
│   ├── versions/src/sparkles/versions/
│   ├── ui/src/sparkles/ui/          # canvas-first toolkit: geometry + style (Slot/Palette) + theme (one design language) + canvas (isCanvas!T) + widget + layout + state + display_list + interp/{immediate,cells,html}
│   │   └── components/             # box, header, table, live, tasklist, progress, meter, tree, layout, theme, osc_link, demo (moved from core-cli)
│   ├── ui-app/src/sparkles/ui_app/  # the application host: backend.d (pick) + gui_options.d/gui_setup.d (window+font CLI) + interface_font.d (the interface face: choice, sizes, measurer) + host.d/run.d (the loop) + tui_loop.d/gui_loop.d (arms) + record.d (headless target)
│   ├── twoslash/src/sparkles/twoslash/  # protocol (node model) + ingest (wired JSON) + overlay planner + render_html/render_ansi/render_widgets (sparkles:ui view) + style
│   │   ├── schemes/                # semver.d, dmd.d, calver_*.d, pypi.d, maven.d, deb.d, … + registry.d
│   │   ├── operations.d, ranges.d, parsing.d, traits.d, any.d
│   │   ├── purl.d, vers.d          # pURL / VERS interop
│   │   └── testing.d               # checkRoundTrip / checkRejects / checkAscending
│   ├── test-attributes/src/sparkles/test_runner/  # the marker attributes, all a library build imports
│   │   └── attributes.d            # @betterC / @ctfe / @wasm / @benchmark / @workload / @serial / @slow UDAs
│   ├── test-harness/src/sparkles/test_runner/     # the in-binary half: no other repository package
│   │   ├── discovery.d, model.d    # compile-time unittest discovery → Test[]; Test/TestResult
│   │   ├── entry.d, worker.d       # worker / launcher / fallback mode; the protocol's binary side
│   │   ├── protocol.d, fallback.d  # versions, framing, JSON values; in-process sequential runs
│   │   ├── execution.d, skip.d     # one test on a budgeted thread; skipTest
│   │   └── bench.d, workload.d, …  # the measurement layer (perf, tier0, syscalls, psi, …)
│   ├── test-runner/src/sparkles/test_runner/   # the shim (sourceLibrary, compiled into each test root)
│   │   └── register.d              # extendedModuleUnitTester hook → the harness
│   ├── test-runner-core/src/sparkles/test_runner/  # the runner core: no I/O, shared by both clients
│   │   ├── session.d               # the worker session: bytes in, commands and events out
│   │   ├── options.d, plan.d       # the option model; selection, phases, verdict
│   │   ├── render.d                # plain-text lines of a session's events
│   │   ├── extract.d, driver.d     # unittest-body extraction; @ctfe/-betterC/wasm drivers
│   │   └── ctfe_trace.d            # -ftime-trace CTFE cost attribution
│   ├── test-runner-impl/src/sparkles/test_runner/  # the standalone runner, sparkles-test-runner (pinned)
│   │   ├── app.d, runner_impl.d    # entry, mode dispatch
│   │   ├── client.d, pool.d        # the I/O around a session; worker processes
│   │   └── reporting.d, bench_json.d # styled result rendering; --bench-json
│   ├── test-utils/src/sparkles/test_utils/
│   │   └── diff_tools.d, tmpfs.d, string.d, package.d
│   ├── text-buffer/src/sparkles/text_buffer/
│   │   ├── summary.d, node.d       # measures; refcounted chunk/internal nodes, join, slice, chunker
│   │   ├── text.d                  # Text: edits, equality, chunk walks, coordinates, lines
│   │   ├── change_set.d, storage.d # ChangeSet: of/apply/invert/compose/mapPos/touched; refcounted arrays
│   │   └── history.d               # History: undo tree, amend, earlier/later by steps or time, prune
│   ├── input/src/sparkles/input/   # events.d (sum-type Event + Key/Mods/Point vocabulary), tier.d (tier-0/1/2 ladder)
│   ├── fileset-tools/src/sparkles/fileset_tools/  # evaluate.d (resolve + names), copy.d (VFS copy), stats.d (the Stats report)
│   ├── iroh-send/                  # src/sparkles/iroh_send/bridge.d (dlopen + C interface); rust/ (the bridge, built in sendme's tree)
│   ├── math/src/sparkles/math/     # vector.d, package.d
│   ├── font/src/sparkles/font/     # face.d (open, directory), tables.d, cmap.d, names.d, glyph_names.d, errors.d; test/ fixtures + mutation corpus
│   ├── font-oracle/                # test-only: HarfBuzz differential over the bundled fonts
│   ├── raylib-text/src/sparkles/raylib_text/  # multi-face FontSet (on-demand atlas, real bold/italic) + drawGrapheme/drawSolid/drawText (shared by terminal + hue --gui)
│   ├── recovery/src/sparkles/recovery/
│   │   ├── directory.d             # LeasedDirectory: private archive dirs held with flock
│   │   ├── archive.d               # generation files: append (create-only VFS write), read, prune, retire, claimArchives
│   │   ├── writer.d                # CheckpointWriter!Snapshot: coalesced background writes, durable acknowledgment
│   │   └── maintenance.d           # MaintenanceTask, InitializeTask, PruneTask on a JobQueue
│   ├── ghostty/src/sparkles/ghostty/
│   │   ├── c.c                     # ImportC shim: #include <ghostty/vt.h>
│   │   └── package.d               # public import sparkles.ghostty.c
│   └── nix/src/sparkles/nix/
│       ├── c.c                     # ImportC shim: #include <nix_api_*.h> (whole Nix C API)
│       ├── error.d, strings.d      # NixError/NixResult/NixContext/checkCall; string-sink bridge
│       ├── library.d, value.d      # initNix/settings; Value handle + ValueType
│       ├── store.d, eval.d         # Store/StorePath; EvalState + value extraction/construction
│       └── flake.d, session.d      # flake settings/ref/lock/outputs; NixSession facade
├── docs/
│   ├── guidelines/                 # Cross-cutting agent/style guides (this file lives here)
│   ├── libs/<name>/                # Per-library Diátaxis docs
│   ├── research/                   # Background research notes
│   ├── specs/                      # Design specs
│   └── overview.md, index.md
└── nix/
    ├── dub-lock.json               # Nix-format lockfile shared by `ci` + examples (one
    │                               # registry-fetch derivation serves every consumer)
    ├── packages/
    │   ├── android/                # The Android cross build (x86_64-linux only): SDK/NDK
    │   │                           # tables, raylib/tree-sitter/libghostty-vt/grammar cross
    │   │                           # builds, libhue.so, and the nix-native APK assembler
    │   │                           # (aapt2 + zipalign + apksigner; no Gradle)
    │   ├── dub-builder/            # Vendored `buildDubPackage` (crane-style): normalises the
    │   │                           # build path and dub's mtimes so a `buildDubDeps` bundle of
    │   │                           # compiled dependencies transfers between derivations —
    │   │                           # the ~35 example builds share one closure per lib
    │   ├── fonts.nix               # `maple-mono` + the `sparkles-fonts` bundle (all platforms)
    │   └── maple-mono/             # Maple Mono with frozen OpenType features (vendored patcher)
    ├── shells/android.nix          # Android dev shell: adb/aapt2 + hue-emulator/-adb-install/-logcat
    └── shells/default.nix          # Nix dev shell