Change nixos workflow skill
This commit is contained in:
@@ -1,50 +1,39 @@
|
|||||||
---
|
---
|
||||||
name: nixos-asset-manager
|
name: nixos-gitea-manager
|
||||||
description: Manage Pi agent assets (extensions, skills, themes, prompts) on NixOS with Gitea synchronization.
|
description: STRICT workflow for managing Pi assets via Gitea on NixOS
|
||||||
version: 1.0.0
|
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`.
|
## 🛠 THE SOURCE OF TRUTH
|
||||||
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.
|
All assets MUST be managed in the local Git-controlled directory:
|
||||||
3. **Gitea Sync**: After any local modification to `~/ai-assets`, the agent must commit and push changes to `https://audasmedia.com.au`.
|
- **Local Path**: `/home/sam/ai-assets`
|
||||||
4. **Configuration Layering**:
|
- **Remote URL**: `https://gitea.lab.audasmedia.com.au/sam/pi-config`
|
||||||
* **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."
|
|
||||||
|
|
||||||
## 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`).
|
## ❄ NIXOS INTEGRATION
|
||||||
- `skills/`: Markdown instructions (e.g., `system-architect/SKILL.md`).
|
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:
|
||||||
- `themes/`: JSON theme definitions.
|
`"source": "git:https://gitea.lab.audasmedia.com.au/sam/pi-config"`
|
||||||
- `prompts/`: Markdown slash-command templates.
|
|
||||||
|
|
||||||
## Workflows
|
|
||||||
|
|
||||||
### Adding a New Extension
|
|
||||||
1. Navigate to `~/ai-assets/extensions`.
|
|
||||||
2. Clone the repository: `git clone <url> <name>`.
|
|
||||||
3. Remove internal Git tracking to avoid submodules: `rm -rf <name>/.git <name>/.gitignore`.
|
|
||||||
4. Install dependencies locally: `cd <name> && npm install`.
|
|
||||||
5. Update the project's `.pi/settings.json` to include `"extensions/ <name>/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.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user