From 16e9c891a8cf114a2d1f9a67c245650ce326769c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=BChl?= Date: Thu, 26 Feb 2026 23:07:38 +0000 Subject: [PATCH] feat: integrate sd-card for interactive spec generation (#2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Integrated **sd-card** workflow for interactive specification generation: - ✅ Added sd-card flake input - ✅ Created `nix run .#dev` - starts Vite with annotation proxy - ✅ Updated dev shell with sd-card tools (tea, playwright, nodejs) - ✅ Replaced old forgejo-workflow with sd-card ## Usage ### Widget-based annotation ```bash FORGEJO_TOKEN="your-token" nix run .#dev ``` Opens SvelteKit with ✦ widget injected on every page. ### Interactive annotation (recommended) Ask Claude to interact with the app via Claudezilla: ``` User: "Open solidhaus" Claude: [opens in Firefox] User: "Click the scan barcode button" Claude: [clicks, shows screenshot] User: "This should open the camera" Claude: [generates Gherkin scenario] ``` ## Test Plan - [x] Flake builds successfully - [x] `nix run .#dev` starts dev server with proxy - [x] Widget injects on pages - [x] Claudezilla can open and interact with app - [x] Dev shell includes all sd-card tools 🤖 Generated with Claude Code Reviewed-on: https://git.toph.so/toph/solidhaus/pulls/2 Co-authored-by: Christopher Mühl Co-committed-by: Christopher Mühl --- flake.lock | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 24 ++++++---- 2 files changed, 146 insertions(+), 8 deletions(-) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..05f4dd4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,130 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1771848320, + "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1771848320, + "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "sd-card": "sd-card" + } + }, + "sd-card": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1772146011, + "narHash": "sha256-ZUj4zAAk9shxYOn5jh9Kri4q5O/Aq52OJF43otPMPBE=", + "ref": "refs/heads/main", + "rev": "307eb15035671c58f9145806067030b59c5d7792", + "revCount": 4, + "type": "git", + "url": "ssh://git@git.toph.so/toph/sd-card" + }, + "original": { + "type": "git", + "url": "ssh://git@git.toph.so/toph/sd-card" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 009ffc5..388811a 100644 --- a/flake.nix +++ b/flake.nix @@ -2,23 +2,31 @@ description = "solidhaus dev shell"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - forgejo-workflow.url = "path:/nix/store/1kpd2vzj87rlraw81p4iy4ldw4dm8g6z-forgejo-workflow-setup-flake/bin"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + sd-card.url = "git+ssh://git@git.toph.so/toph/sd-card"; }; - outputs = { self, nixpkgs, flake-utils, forgejo-workflow }: + outputs = { self, nixpkgs, flake-utils, sd-card }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { + packages = { + # nix run .#dev — start SvelteKit dev server with annotation proxy + dev = sd-card.lib.${system}.mkDevApp { + inherit pkgs; + devCmd = "npm run dev"; + devPort = 5173; # Vite default port + }; + }; + devShells.default = pkgs.mkShell { - packages = - # Forgejo workflow tools: tea, jq, yq, git, curl - forgejo-workflow.packages.${system}.tools + packages = sd-card.packages.${system}.tools # tea, jq, playwright, nodejs ++ (with pkgs; [ - # add your project packages here + nodejs + nodePackages.npm ]); }; }