CA

coopersimson96/aar-loop

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

106 stars 质量 56 趋势 19MIT

在任何AI会话后进行一次行动后回顾,写下具体的教训,让你的特工停止重复犯错。这是一种基于美国陆军AAR方法构建的手动反思循环。

概览

这是人类运行的Reflexion版本,基于一种已使用五十年的军事标准方法。 在任何任务或会话后运行 /aar-loop。它做三件事: 1. 配合美国陆军的4个问题战后复核。2. 将改进直接写入你的技能或规则文件,这样修复方法就在你再次需要之前就已存在,而不仅仅是写在某处。3. 存入一个持久的 LESSONS.md 文件,AI下次加载时可以加载。 将下一次会话指向该文件(以及被修复的技能或规则),代理就不再重复同样的错误。每次运行一次,代理会复合,而不是每次都从零开始。 美国陆军在越南战争结束后的1970年代中期正式将战后评估正式化,作为训练演习的结构化总结。

概述(AI 翻译)

这是人类运行的Reflexion版本,基于一种已使用五十年的军事标准方法。

在任何任务或会话后运行/aar-loop。它有三件事:

  1. 回顾美国陆军4题战后复习环节。
  2. 找出值得修正的地方,并直接把改进写进你的技能或规则文件里,这样修正就在你再次需要之前就已经存在,而不是随便写在某处。
  3. **将课程保存到持久的 LESSONS.md 文件,AI下次加载。

将下一次会话指向该文件(以及被修复的技能或规则),代理就不再重复同样的错误。每次运行一次,代理会复合,而不是每次都从零开始。

方法的来源

美国陆军在越南战争后1970年代中期正式将战后回顾正式化,作为训练演习的结构化总结。1993年,该战术手册TC 25-20成为官方教义,至今仍在国家训练中心(福特欧文)每次轮换后进行,该中心是世界上最逼真的战斗训练环境之一。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

AAR Loop

A human-run version of Reflexion for AI agents, built on a military method that’s been standard practice for fifty years.

Run /aar-loop after any task or session. It does three things:

  1. Reviews the session with the US Army’s 4-question After Action Review.
  2. Finds what’s worth fixing and writes the improvement straight into your skills or rules files, so the fix is there before you need it again, not just written down somewhere.
  3. Saves the lessons to a persistent LESSONS.md file that your AI loads next time.

Point the next session at that file (and at whatever skill or rule got patched) and the agent stops repeating the same mistake. Run it every session and the agent compounds instead of restarting from zero each time.

Where the method comes from

The US Army formalized the After Action Review in the mid-1970s, in the years after Vietnam, as a structured debrief for training exercises. It became official doctrine in 1993 with field manual TC 25-20, and it’s still run after every rotation at the National Training Center, Fort Irwin, one of the most realistic combat training environments in the world. Fifty years of continuous use on one method, because the mechanism is simple and hard to argue with: separate the debrief from blame, ask what was supposed to happen versus what actually happened, and the gap tells you exactly what to fix before the next fight.

The 4 questions, verbatim:

  1. What was supposed to happen?
  2. What actually happened?
  3. Why was there a difference?
  4. What do we do the same or differently next time?

The research parallel

This is also, functionally, a manual version of Reflexion (Shinn et al., 2023, arXiv:2303.11366): an agent framework where a model generates a verbal self-reflection after a failed attempt, stores it in an episodic memory buffer, and carries it into the next attempt. Reflexion agents that keep their reflections outperform agents that start every attempt from scratch.

Nobody’s wired that loop into your AI harness by default. This skill is the manual version: you run the reflection step yourself, once per session, and LESSONS.md is the buffer. Same idea, no automation, and it costs you five minutes.

Install

Paste this into Claude Code, Codex, or your AI harness:

Install this skill globally: https://github.com/coopersimson96/aar-loop

Use

/aar-loop

or just say “run an aar” after finishing something. Sample output:

AAR · production deploy

1. What was supposed to happen?
   Deploy the new build and have all three services (web, worker,
   scheduler) come up on the new version.

2. What actually happened?
   The deploy script reported success and exited 0. Web and worker were on
   the new version, but the scheduler was still running the old one; it had
   never actually restarted.

3. Why was there a difference?
   The deploy script only checks the exit code of the restart command, not
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add coopersimson96/aar-loop
新手?先看 mcpskill.org 教程 →