From 0f7e890266158ad280cbb531ab4b55d254e6fc9b Mon Sep 17 00:00:00 2001 From: Sam Rolfe Date: Wed, 6 May 2026 20:03:53 +1000 Subject: [PATCH] Change nixos workflow skill --- skills/nixos-workflow/SKILL.md | 71 ++++++++++++++-------------------- 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/skills/nixos-workflow/SKILL.md b/skills/nixos-workflow/SKILL.md index 3269f1e..557d572 100644 --- a/skills/nixos-workflow/SKILL.md +++ b/skills/nixos-workflow/SKILL.md @@ -1,50 +1,39 @@ --- -name: nixos-asset-manager -description: Manage Pi agent assets (extensions, skills, themes, prompts) on NixOS with Gitea synchronization. -version: 1.0.0 +name: nixos-gitea-manager +description: STRICT workflow for managing Pi assets via Gitea on NixOS +version: 1.1.0 --- -# NixOS Asset Manager +# NixOS Gitea Asset Manager (STRICT) -This skill guides the agent in maintaining a declarative, Gitea-backed configuration for the Pi coding agent on NixOS. +You are an expert at managing Pi Agent assets on a NixOS system using a Gitea-centric workflow. -## Core Principles +## ⛔ CRITICAL PROHIBITIONS +- **NEVER** suggest or perform edits to `home.nix` to add individual extensions or skills. +- **NEVER** use `pi install` or `npm install -g` (Nix store is read-only). +- **NEVER** save assets to `~/.agents/skills`. -1. **Source of Truth**: All custom code (extensions), instructions (skills), and UI assets (themes) must be saved in `~/ai-assets`. -2. **No Direct Nix Store Writes**: Never attempt `pi install npm:...` or global `npm install` as it fails on NixOS. Always clone sources into `~/ai-assets/extensions` and run `npm install` locally within that folder. -3. **Gitea Sync**: After any local modification to `~/ai-assets`, the agent must commit and push changes to `https://audasmedia.com.au`. -4. **Configuration Layering**: - * **Global**: Referenced via `home.nix` in the `~/.pi/agent/settings.json` file. - * **Project-Specific**: Defined in `.pi/settings.json` within individual project folders to avoid "bloat." +## 🛠 THE SOURCE OF TRUTH +All assets MUST be managed in the local Git-controlled directory: +- **Local Path**: `/home/sam/ai-assets` +- **Remote URL**: `https://gitea.lab.audasmedia.com.au/sam/pi-config` -## File Structure Standards +## 🏗 ASSET DEPLOYMENT WORKFLOW +When the user asks for a new tool or skill, you MUST follow these steps exactly: -The agent must maintain the following structure in `~/ai-assets`: +1. **Local Authoring**: + - Write code/markdown directly into the appropriate subfolder in `~/ai-assets/` (e.g., `extensions/` or `skills/`). + - If cloning an external repo, immediately `rm -rf .git` inside that folder to prevent submodule issues. Also inside that folder remove '.gitignore' if it is there. +2. **Local Dependency Check**: + - If an extension, run `npm install` inside that specific subfolder. +3. **Gitea Synchronization**: + - `cd /home/sam/ai-assets` + - `git add .` + - `git commit -m "Add [asset name]"` + - `git push origin main` +4. **Project Activation**: + - Instruct the user to add the relative path (e.g., `"extensions/my-tool/index.ts"`) to their current project's `.pi/settings.json`. -- `extensions/`: TypeScript modules (e.g., `steel-browser/index.ts`). -- `skills/`: Markdown instructions (e.g., `system-architect/SKILL.md`). -- `themes/`: JSON theme definitions. -- `prompts/`: Markdown slash-command templates. - -## Workflows - -### Adding a New Extension -1. Navigate to `~/ai-assets/extensions`. -2. Clone the repository: `git clone `. -3. Remove internal Git tracking to avoid submodules: `rm -rf /.git /.gitignore`. -4. Install dependencies locally: `cd && npm install`. -5. Update the project's `.pi/settings.json` to include `"extensions/ /index.ts"`. -6. Push to Gitea. - -### Updating a Skill -1. Modify the relevant `.md` file in `~/ai-assets/skills/`. -2. Push to Gitea. -3. The change is live across all NixOS machines upon the next Pi launch. - -### Managing Settings via Nix -When instructions involve global changes, the agent must remind the user to update the `home.file.".pi/agent/settings.json".text` block in their Home Manager configuration. - -## Critical Guardrails -- **DO NOT** use `~/.agents/skills` as it bypasses Gitea version control. -- **ALWAYS** check for an existing `.git` folder in new extensions before pushing to Gitea. -- **NEVER** push `auth.json` or `sessions/` to Gitea. +## ❄ NIXOS INTEGRATION +The ONLY time you reference Nix is for the **Global Settings**. Confirm the user's `home.nix` contains a `settings.json` that points to the Gitea source: +`"source": "git:https://gitea.lab.audasmedia.com.au/sam/pi-config"`