Install
openclaw skills install @akdira/aar-loopAAR with folder-based lessons, auto-trigger for all tasks, US Army 4-question method for AI agents.
openclaw skills install @akdira/aar-loopA human-run version of the Army's After Action Review, pointed at an AI agent's own session. Ask the same 4 questions the Army asks after every rotation at the National Training Center, answer them honestly about what the agent just did, and write down what changed as a result. Do this every session and the agent accumulates real, checkable lessons instead of starting from zero each time.
The US Army formalized the After Action Review in the mid-1970s, after Vietnam, as a structured debrief for training exercises. Became official doctrine in 1993 with field manual TC 25-20. Fifty years of practice on one method because it works on a simple mechanism: separate the debrief from blame, and the same mistake gets caught before it repeats.
This skill borrows that mechanism for AI agent sessions. Research parallel: Reflexion (Shinn et al., 2023) showed agents that generate a verbal self-reflection after a failed attempt and carry that reflection into the next attempt outperform agents with no memory of what went wrong.
Ask all four, in order, about the task or session just finished. Answer briefly and honestly.
If the answer to question 3 is "nothing went wrong, this worked exactly as planned," that is a valid AAR. Write down what worked as a lesson too.
Lessons are stored as individual files for scalability:
workspace/
├── LESSONS.md # Index file (like MEMORY.md)
└── lessons/
├── 2026-07-31_aar-skill-install.md
├── 2026-07-30_thinking-leak.md
└── 2026-07-29_config-override.md
Each lesson file in lessons/ folder:
---
date: 2026-07-31
tags: [config, bug]
task: "Fix thinking leak"
fix_applied: true
---
## What Was Supposed To Happen?
[Expected outcome]
## What Actually Happened?
[Actual outcome]
## Why Was There A Difference?
[Root cause analysis]
## What Can We Learn?
[Concrete, checkable lesson]
## Fix Plan (if applicable)
**Target:** `AGENTS.md`
**Edit:** Add rule about agent-level config override
LESSONS.md serves as an index (like MEMORY.md):
# Lessons Index
## 2026-07-31 — AAR Skill Installation
- Task: Install AAR skill dari GitHub
- Lesson: Skill dari GitHub perlu manual install, ClawHub belum ada
- Detail: [lessons/2026-07-31_aar-skill-install.md](lessons/2026-07-31_aar-skill-install.md)
- Tags: skill, install
## 2026-07-30 — Thinking Leak Fix
- Task: Fix internal monolog bocor ke chat
- Lesson: Agent-level override bisa nge-bypass global config
- Detail: [lessons/2026-07-30_thinking-leak.md](lessons/2026-07-30_thinking-leak.md)
- Tags: config, bug
AAR runs after EVERY task, not just big ones:
| Task Size | AAR Format | Example |
|---|---|---|
| Small (< 5 min, read-only, simple edits) | 1-sentence quick capture | "Lesson: Config override di agent-level bisa bypass global setting" |
| Medium (multi-step, file edits, deployments) | Full AAR with fix plan | Complete 4-question analysis |
| Large (infra, production, client-facing, irreversible) | Full AAR + verifier review | Complete analysis + second pair of eyes |
Trigger: After Verify phase in RPDV workflow.
Question 4 only pays off if the lesson is specific enough to check later. Test every lesson: could a different agent, six months from now, read this line and know exactly what to do or not do?
Concrete, checkable (ship these):
Vague, do not ship:
# Create new lesson
python3 scripts/append_lesson.py \
--task "Task name" \
--expected "Expected outcome" \
--actual "Actual outcome" \
--why "Root cause" \
--lesson "Lesson learned" \
--tags "tag1,tag2" \
--fix-target "file.md" \
--fix-edit "exact edit"
# List all lessons
python3 scripts/append_lesson.py --list
# Search lessons
python3 scripts/append_lesson.py --search "keyword"
The script:
lessons/ folderLESSONS.md indexscripts/append_lesson.py to create lesson file + update index.lessons/YYYY-MM-DD_{topic-slug}.mdLESSONS.md (like MEMORY.md)Two ways to make lessons automatic:
python3 scripts/append_lesson.py --search <keyword>A lessons file nobody loads is a diary, not a loop. The loop only closes when the next session actually reads it before acting.