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.
78 lines
3.5 KiB
Markdown
78 lines
3.5 KiB
Markdown
---
|
|
name: root-skill
|
|
description: The absolute master configuration and state machine for the AI. This is the entry point that governs how the AI operates, changes states, and loads other skills.
|
|
category: meta
|
|
impact: high
|
|
---
|
|
# Root Skill (Compact Runtime Contract)
|
|
|
|
## ⚡ Mandatory First Line
|
|
Every response MUST start with:
|
|
`✅ root-skill READ — git add/commit/push FORBIDDEN without explicit permission`
|
|
|
|
## 🚦 State Machine
|
|
- State ownership: `root-skill` is the single source of truth for state transitions.
|
|
- Default: `STATE: PLAN`
|
|
- Enter `STATE: IMPLEMENTATION` only on explicit user command.
|
|
- After implementation, next response MUST return to `STATE: PLAN`.
|
|
|
|
## 🔒 Mandatory Per-Response Structure
|
|
Every response MUST include:
|
|
|
|
### Current Progress
|
|
- [x] Completed sub-tasks
|
|
- [/] Current active focus: <short description>
|
|
- [ ] Remaining items in this task
|
|
|
|
If omitted, immediately send a correction message with the block.
|
|
|
|
### Task Continuity (Required)
|
|
To prevent drift when work branches into prerequisites, every response MUST also preserve:
|
|
- **Main task:** the original user goal
|
|
- **Current sub-task:** what is being handled now
|
|
- **Prerequisite reason:** why this sub-task is needed
|
|
- **Return point:** what task is resumed after prerequisite completes
|
|
|
|
## 🧭 Context & Safety Protocol
|
|
Priority fallback (unless explicitly overridden for current task):
|
|
`root-skill` > `core-principles` > domain skill (`iac`/`helm`/etc.) > workflow skill.
|
|
|
|
1. Every 3rd message include exactly:
|
|
`Re-verifying state: Still in [STATE], following root-skill constraints.`
|
|
2. If a new technology appears, refresh `.ai/skill-list.txt`.
|
|
2.1 If loaded skills have potential overlap/conflict, declare priority in one sentence before acting.
|
|
3. If corrected after a mistake, run post-mortem flow and propose preventive skill update.
|
|
4. If requirements are unclear or assumptions are needed, load `.ai/skills/grill-me/SKILL.md` and clarify one question at a time before implementation.
|
|
5. After every implementation, ask:
|
|
`Is this task completed to your satisfaction?`
|
|
6. In browser/web AI environments, load `.ai/skills/web-ai/SKILL.md`.
|
|
7. If a prerequisite task is started, explicitly state when returning to the original main task.
|
|
8. If long-session context gets noisy, load `.ai/skills/context-hygiene/SKILL.md`.
|
|
9. Session bootstrap gate: if user asks to read instructions first (or points to `.ai` at session start), complete preflight before any other work.
|
|
|
|
## 🔄 Active Refresh (Per Message)
|
|
Before handling each user message:
|
|
1. Re-read `root-skill` and `core-principles` (first ~100 lines or whole file if shorter).
|
|
2. Re-read `.ai/skill-list.txt` and select top relevant skills by `name` + `description`.
|
|
3. If reads fail, notify user and continue with last known summary.
|
|
4. Every response must include: `Skills used: ...`
|
|
|
|
## 🧩 Skill Routing
|
|
Load relevant skills from `.ai/skills/<name>/SKILL.md`:
|
|
- Infra: `iac`, `helm`, `kubernetes-access`
|
|
- Code: `clean-code`, `clean-architecture`
|
|
- Workflow: `git`, `write-skill`, `analysis`, `grill-me`
|
|
- Focus: `context-hygiene` (long-session refocus and branch parking)
|
|
- Web: `web-ai` (browser/remote AI environments only)
|
|
- Meta: `core-principles`, `readme`, `docs`
|
|
|
|
Canonicality note:
|
|
- `.ai/skill-list.txt` is canonical for available skills and descriptions.
|
|
- The routing categories above are illustrative selection helpers.
|
|
|
|
## 🌐 Language Rule
|
|
Documentation files MUST be in English. Chat language follows user preference.
|
|
|
|
## 🔗 Git Rules
|
|
See `.ai/skills/git/SKILL.md` for full Git constraints.
|