reflect
/reflect
Diagnozuje, dlaczego zachowanie PAL nie zadziałało zgodnie z oczekiwaniem, śledząc hooki, instrukcje i logikę aż do luki.
- Autor
- kovrichard ↗
- Repozytorium
- portable-agent-layer ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 23.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 23.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Diagnozuje, dlaczego zachowanie PAL nie zadziałało zgodnie z oczekiwaniem, śledząc hooki, instrukcje i logikę aż do luki.
Argumenty
/reflect <what went wrong>
Oryginalny opis (EN)
Diagnose why a PAL behavior did not trigger as expected — trace hooks, instructions, and logic to find the gap. Use when a hook, skill, or automation didn't fire or behaved unexpectedly.
Jak działa
- 1. Identify the expected behavior
- 2. Classify the behavior type
- 3. Trace the execution path
- 4. Identify the gap
- 5. Propose a fix
- Output format
Podgląd SKILL.md
---
name: reflect
license: MIT
description: "Diagnose why a PAL behavior did not trigger as expected — trace hooks, instructions, and logic to find the gap. Use when a hook, skill, or automation didn't fire or behaved unexpectedly."
argument-hint: <what went wrong>
metadata:
source: portable-agent-layer
triggers:
- "reflect"
- "didn't fire"
- "didn't trigger"
- "didn't run"
- "why didn't"
- "not triggering"
- "never fired"
- "should have fired"
- "behaved unexpectedly"
---
When the user invokes `/reflect [optional: description of what didn't happen]`:
You are debugging PAL itself. The user noticed that something PAL should have done — automatically or via instructions — did not happen. Your job is to trace the full execution path and find where it broke.
## 1. Identify the expected behavior
If the user described it, restate it clearly. If not, ask:
- **What did you expect PAL to do?** (e.g., update projects.json, write a relationship note, extract wisdom, trigger a hook)
- **When should it have happened?** (during the session, at stop, on prompt submit, on session start)
## 2. Classify the behavior type
Determine which PAL subsystem owns this behavior:
| Type | Mechanism | Key files |
|------|-----------|-----------|
| **Hook-automated** | Runs automatically via StopOrchestrator or UserPromptOrchestrator | `hooks/StopOrchestrator.ts`, `hooks/UserPromptOrchestrator.ts`, `hooks/lib/stop.ts` |
| **Instruction-driven** | AI is told to do it via CLAUDE.md / AGENTS.md instructions | `~/.claude/CLAUDE.md`, project CLAUDE.md files |
| **Context-dependent** | Requires specific context to be loaded at session start | `hooks/LoadContext.ts`, `hooks/lib/context.ts` |
| **Skill-triggered** | Should have been invoked via a skill | `~/.pal/skills/*/SKILL.md` |
## 3. Trace the execution path
Based on the type, investigate the relevant chain:
### For hook-automated behaviors:
1. Read the relevant handler source code in `hooks/handlers/`
2. Check the orchestrator that calls it (`StopOrchestrator.ts` or `UserPromptOrchestrator.ts`)
3. Check `~/.claude/settings.json` to confirm the hook is registered
4. Check PAL logs at `portable-agent-layer/memory/state/debug.log` for errors
5. Check if the handler has conditions that weren't met (e.g., message count < 2, missing session_id)
### For instruction-driven behaviors:
1. Read the relevant CLAUDE.md instructions that should have triggered the behavior
2. Assess whether the instructions are clear and unambiguous enough for the AI to act on
3. Check if the instructions have conditions/triggers — were those conditions met in this session?
4. Consider whether the conversation context made it unlikely the AI would prioritize this action (e.g., too focused on the user's task, no natural pause point)
### For context-dependent behaviors:
1. Check `hooks/LoadContext.ts` and `hooks/lib/context.ts`
2. Verify the expected context was actually injected (check system-reminder content in conversation)
3. Check if context was truncated or missing
### For skill-triggered behaviors:
1. Verify the skill exists in `~/.pal/skills/`
2. Check if SkillGuard blocked it
3. Check if the skill's trigger conditions match what happened
## 4. Identify the gap
State clearly:
- **What should have happened** (the expected behavior)
- **Where it broke** (the specific point in the chain where execution stopped or diverged)
- **Why it broke** (root cause — missing condition, unclear instruction, silent error, edge case, etc.)
## 5. Propose a fix
Suggest one or more fixes, classified by approach:
- **Code fix** — change in hooks, handlers, or lib code
- **Instruction fix** — clearer or restructured CLAUDE.md instructions
- **Architecture fix** — behavior needs to move from one subsystem to another (e.g., from instruction-driven to hook-automated)
- **No fix needed** — the behavior is working as designed; the expectation was wrong
For each fix, note the specific file(s) to change and what the change would be.
## Output format
```
## Reflect: [short description of the issue]
**Expected:** [what should have happened]
**Classified as:** [hook-automated | instruction-driven | context-dependent | skill-triggered]
### Trace
[Step-by-step trace of the execution path, with file references]
### Gap found
[Where and why it broke]
### Recommended fix
[Concrete proposal with file paths and change description]
```
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · kovrichard/portable-agent-layer | 100 | MIT |
| iliaal/ai-skills | 100 | MIT |
| chhoumann/t3-pstack | 100 | MIT |
| chmonitor/chmonitor | 100 | GPL-3.0 |
| backnotprop/pstack | 100 | MIT |
| guangshinhaha/shinstack | 100 | MIT |
| unsady/den | 100 | Apache-2.0 |
| akdevsaha-dev/factory-skills | 100 | MIT |
| kriegcloud/beep-effect | 100 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki 3a163f5e43e4 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100create-skill
Tworzy nowy osobisty skill w katalogu ~/.pal/skills/ i podłącza go do każdego zainstalowanego agenta. - 100pal-router
Kieruje podzadania do tańszych lub darmowych modeli PAL, a gdy któryś odmówi, przełącza na zapasowy, by kontekst Claude Opus został na osąd. - 90pal-learn
Zapisuje zaobserwowany fakt o routingu PAL w mapie modeli pal-router, po weryfikacji u dostawcy, tak by wiedza o routingu nie traciła aktualności. - 100create-hook
Tworzy hooki Cursor: plik hooks.json i skrypty automatyzujące zachowanie wokół zdarzeń agenta. - 100pal-analyze
Przeprowadza analizę uczenia: pokazuje trendy ocen, powtarzające się wzorce porażek i kandydatów do awansu, gdy analiza jest należna lub pytasz o niskie oceny. - 90agents-reflect
Po sesji przegląda, co poszło dobrze i źle, i zamienia każdą lekcję w konkretną zmianę w skillu albo w linii AGENTS.md.