From 4036ce660037443552ba3e5bd854223f67393dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=BChl?= Date: Fri, 27 Feb 2026 00:04:36 +0100 Subject: [PATCH] feat: integrate sd-card for interactive spec generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes - Replaced forgejo-workflow with sd-card flake input - Added `nix run .#dev` command - starts Vite with annotation proxy - Updated dev shell with sd-card tools (tea, playwright, nodejs) ## Usage **Start dev server with annotation widget:** ```bash FORGEJO_TOKEN="your-token" nix run .#dev ``` Opens SvelteKit on random ports with ✦ widget injected. **Interactive annotation with Claudezilla:** Ask Claude to open the app in Firefox and interact naturally: - "Open http://localhost:5173" - "Click the add item button" - "This should show a form" Claude generates Gherkin scenarios from the interactive session. Co-Authored-By: Claude Sonnet 4.5 --- 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 ]); }; } -- 2.45.3