ai-superpower/.ai/skills/web-ai/SKILL.md
moilanik 191f9f4f2a refactor(ai-skills): harden control flow and reduce instruction drift
Tighten root/core control flow, add dedicated post-mortem, web, and
context-hygiene capabilities, and reduce instruction drift through clearer
ownership, conflict-priority handling, and README/docs workflow alignment.
This makes long-session AI behavior more deterministic while keeping the
instruction system compact and maintainable.
2026-04-21 16:01:21 +03:00

55 lines
2.2 KiB
Markdown

---
name: web-ai
description: Defines browser/web AI runtime rules for loading skills via remote raw URLs and keeping instruction context fresh. Use when running in browser-based AI, remote chat tools, or environments without direct local file access.
category: workflow
impact: medium
---
# Web AI Instructions
## 🎯 Purpose
Provide a strict runtime contract for browser-based AI usage where skills are loaded via remote URLs instead of local file reads.
## 🚨 Prohibitions (Thou Shalt Not)
- **NEVER skip `root-skill` in web mode.**
- **NEVER assume stale skill context is valid across turns.**
- **NEVER load random files before consulting `.ai/skill-list.txt`.**
- **NEVER hide read failures; report fail-open status to the user.**
- **NEVER write external memory stores** (e.g., `/memories/`, global prompts, tool memory) without explicit user instruction.
## Workflows
1. **Resource Access Rules**
- Base URL: `https://gitea.nikos-dev.keskikuja.site/niko/ai-superpower/raw/branch/main/`
- Build URL as: `<base-url> + <relative-path-from-skill-list>`
- Example:
- Skill path: `.ai/skills/git/SKILL.md`
- URL: `https://gitea.nikos-dev.keskikuja.site/niko/ai-superpower/raw/branch/main/.ai/skills/git/SKILL.md`
2. **Active Refresh Policy (Per Message)**
- Re-read `root-skill` and `core-principles` (first ~100 lines or whole file if shorter).
- Re-read `.ai/skill-list.txt` and select top-1..3 candidate skills via `name` + `description`.
- Cache summaries only as optimization; never skip mandatory re-read.
3. **Version Event Refresh**
- If user says `.ai` has a new version, immediately re-read high-impact skills:
- `root-skill`, `core-principles`, `git`, `analysis`, `iac`.
- Publish a short updated summary in working context.
4. **Fail-Open Behavior**
- If reading fails, notify the user and continue with last known summary until resolved.
5. **Visibility**
- Include one-line skill visibility in each response:
- `Skills used: ...`
## ✅ / ❌ Examples
```text
// ❌ FORBIDDEN
I used cached skills from earlier, no need to refresh.
// ✅ REQUIRED
I refreshed root-skill, core-principles, and skill-list for this message and selected relevant skills.
```