Skip to content

Instantly share code, notes, and snippets.

View sini's full-sized avatar

Jason Bowman sini

  • San Francisco, CA, USA
View GitHub Profile
@sini
sini / 2026-05-27-gen-aspects-demo-design.md
Last active May 28, 2026 03:48
Gen Aspects Demo: Full-Stack Composition Showcase

Gen Aspects Demo: Full-Stack Composition Showcase

Date: 2026-05-27 Status: Design approved Location: ~/Documents/repos/gen-aspects/examples/demo/ Libraries exercised: all 8 (gen-algebra, gen-schema, gen-aspects, gen-scope, gen-graph, gen-select, gen-bind, gen-derive)

Goal

A self-contained flake that exercises every gen library in a realistic scenario: a web application deployment with environments, hosts, services, policies, settings composition, and queries. Not a toy — a miniature version of what den v2 will do.

@sini
sini / 2026-05-27-gen-type-unification-design.md
Last active May 28, 2026 03:48
Gen Type Unification: Pluggable Entry Types, Aspects on Schema, Settings

Gen Type Unification: Pluggable Entry Types, Aspects on Schema, Settings

Date: 2026-05-27 Status: Design approved Libraries affected: gen-schema, gen-aspects, gen-algebra, gen-scope Consumer: den (wiring only — no gen-level domain concepts) Supersedes: 2026-05-27-gen-settings-design.md (draft)

Problem

@sini
sini / 2026-05-27-clan-6655-service-coordination.md
Last active May 27, 2026 22:30
Service coordination for Clan — addressing clan-core#6655 with scope graphs, composable blocks, and fleet visualization
@sini
sini / 2026-05-27-den-clan-collaboration-proposal.md
Last active May 27, 2026 18:14
Den × Clan collaboration proposal — shared gen libraries, bidirectional bridges, fleet visualization, namespace interop

Den × Clan — Interoperability Exploration

Date: 2026-05-27 Authors: Den maintainers Audience: Clan-core maintainers and community

What We're Learning from Clan

We've been studying Clan's architecture and we're genuinely impressed by several designs we want to learn from:

@sini
sini / 2026-05-27-den-pragmatic-fleet-features.md
Last active May 27, 2026 17:48
Den pragmatic fleet features — learning from Clan-core, bridging strategy, five spikes, aspect library roadmap

Den Pragmatic Fleet Features — Learning from Clan, Bridging Strategy

Date: 2026-05-27 Companion to: 2026-05-27-clan-gen-integration-analysis.md (what gen offers Clan) This document: What den should borrow (functional gaps only), the bridging strategy, and the roadmap.

Framing

Den and Clan solve overlapping problems differently. Den has ~100s of users and strong formal foundations: scope graphs, algebraic composition, demand-driven evaluation, multi-class output, and the ability to materialize any output target (NixOS, darwin, homeManager, terraform, devshells, packages, treefmt, nix-unit, flake-parts perSystem) from a single aspect graph. Clan has a slightly larger user base and launched earlier, but forces NixOS module evaluation for every entity and can only target nixos/darwin.

@sini
sini / 2026-05-27-clan-gen-integration-analysis.md
Last active May 27, 2026 18:13
Gen ecosystem integration opportunities for Clan-core — scope graphs, typed registries, and rule dispatch for fleet management

Gen Ecosystem Integration Opportunities for Clan-core

Date: 2026-05-27 Context: Analysis of clan-core architecture against the gen library ecosystem to identify where gen's formal foundations could strengthen Clan's fleet management.

Background

Clan-core is a mature Nix framework for declarative multi-host fleet management. It provides an inventory-driven model where machines are declared, services define roles, and instances bind roles to machines. 30+ production services ship with the framework, alongside a CLI, GUI app, and Python tooling ecosystem. It uses flake-parts, NixOS modules, and a structured scope key system (buildScopeKey/checkScope) for export isolation.

Gen is an eight-library ecosystem providing formal foundations for configuration composition: scope graphs (Neron 2015), algebraic graph composition (Mokhov 2017), demand-driven attribute grammar evaluation (Vogt 1989, Sloane 2010), intensional id

@sini
sini / 2026-05-25-gen-derive-design.md
Created May 26, 2026 04:27
gen-derive: stratified rule dispatch with fixpoint convergence — guarded graph rewrite rules for Nix

gen-derive — Stratified Rule Dispatch with Fixpoint Convergence

Date: 2026-05-25 Status: Draft Depends on: gen (pure tier: mkIntensional, intensionalEq) for core; gen-select for adapter tier

Purpose

gen-derive is a rule dispatch engine for guarded graph transformations. Given a set of rules (condition + action producer), a position in a graph, and a context, gen-derive answers: "which rules fire here, and what actions do they produce?" It owns the dispatch protocol, phase ordering, fixpoint convergence, conflict resolution, and rule dedup. It does NOT own the action vocabulary — actions are opaque tagged values whose semantics belong to the caller.

@sini
sini / 2026-05-25-gen-select-design.md
Created May 26, 2026 00:59
gen-select: selector algebra for attributed graph positions

gen-select — Selector Algebra for Attributed Graph Positions

Date: 2026-05-25 Status: Approved Depends on: gen (pure tier only: mkIntensional, intensionalEq)

Purpose

gen-select is a pattern-matching library for attributed graph positions. Given a node and its graph context (expressed as accessor functions), a selector answers: "does this node match?" Pure library — no knowledge of NixOS, aspects, scopes, or configuration. Consumers bring their own graph topology via accessor functions.

@sini
sini / 2026-05-25-gen-bind-design.md
Last active May 25, 2026 18:25
gen-bind: module binding with external arguments — inject scope-computed values into NixOS module functions

gen-bind: Module Binding with External Arguments

A standalone library for injecting external bindings into NixOS/home-manager module functions. Handles partial application, merge conflict detection, lazy contracts, provenance tracking, thunk deferral, signature inference, identity wrapping, and binding arg stripping. The bridge between "scope-computed values" and "the NixOS module system."

Problem Statement

NixOS module functions take { config, lib, pkgs, options, ... }: — arguments provided by evalModules. External systems (scope-graph evaluators, rule engines, configuration generators) compute additional context that modules need: structural data (host, user), computed flags (isNixos, isDarwin), and aggregated data (firewall, http-backends).

Today this is done by den's class-module.nix (~250 lines) and wrap-classes.nix (~190 lines). The logic is generic — it has no knowledge of aspects, policies, or scope graphs. It only knows: "here's a module function, here are extra args, mak

@sini
sini / hm-maid-cross-compat.nix
Created May 25, 2026 16:06
den: homeManager + nix-maid cross-compatibility test suite — verifies both classes route independently
{ denTest, ... }:
let
mockMaidModule =
{ lib, ... }:
{
options.users.users = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule {
options.maid = lib.mkOption {
type = lib.types.submoduleWith {