返回 Skills
boshu2/agentops· Apache-2.0 内容可用

retro

Capture a session learning.

安装

与 skills.sh 相同的 Command / Prompt 安装方式


name: retro description: Capture a session learning. practices:

  • sre
  • lean-startup
  • dora-metrics hexagonal_role: domain consumes:
  • standards produces:
  • result.json context_rel:
  • kind: shared-kernel with: standards skill_api_version: 1 metadata: tier: knowledge dependencies: [] context: window: fork output_contract: .agents/learnings/YYYY-MM-DD-*.md

Retro Skill

YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.

Quick-capture a learning to the knowledge flywheel. For comprehensive retrospectives with backlog processing, activation, and retirement, use /post-mortem.

Loop position

Lightest capture surface for move 7 of the operating loop. Single-observation quick-capture into .agents/learnings/. Use when an insight is too small to warrant a full /post-mortem and too potentially-useful to leave in the handoff. The promotion ratchet still applies after capture — a retro entry is a candidate learning, not yet a pattern or rule.

Quick Mode

Given /retro --quick "insight text" or /retro "insight text":

  1. Generate a slug from the content: first meaningful words, lowercase, hyphens, max 50 chars.
  2. Resolve the active bead with timeout_run 1 bd current 2>/dev/null || echo "".
  3. Write directly to .agents/learnings/YYYY-MM-DD-quick-<slug>.md:
---
type: learning
source: retro-quick
source_bead: <active bead id when available>
source_phase: validate
date: YYYY-MM-DD
maturity: provisional
utility: 0.5
---

# Learning: <Short Title>

**Category**: <auto-classify: debugging|architecture|process|testing|security>
**Confidence**: medium

## What We Learned

<user's insight text>

## Source

Quick capture via `/retro --quick`

If no bead is active, omit source_bead intentionally and still set source_phase: validate.

  1. Confirm:
Learned: <one-line summary>
Saved to: .agents/learnings/YYYY-MM-DD-quick-<slug>.md

For comprehensive knowledge extraction, use `/post-mortem`.

Done. Return immediately after confirmation.

Examples

User says: /retro --quick "macOS cp alias prompts on overwrite — use /bin/cp to bypass"

What happens:

  1. Agent generates slug: macos-cp-alias-overwrite
  2. Agent resolves the active bead with timeout_run 1 bd current 2>/dev/null || echo ""
  3. Agent writes learning to .agents/learnings/2026-03-03-quick-macos-cp-alias-overwrite.md with provenance fields like:
---
type: learning
source: retro-quick
source_bead: bd-123
source_phase: validate
date: 2026-03-03
maturity: provisional
utility: 0.5
---
  1. Agent confirms: Learned: macOS cp alias prompts — use /bin/cp

Troubleshooting

ProblemCauseSolution
Learning too genericSurface-level captureBe specific: "auth tokens expire after 1h" not "learned about auth"
Duplicate learningsSame insight captured twiceCheck existing learnings with grep before writing
Need full retrospectiveQuick capture isn't enoughUse /post-mortem for comprehensive extraction + processing

Reference Documents

  • references/retro.feature — Executable spec: single-observation capture to .agents/learnings/, candidate-under-ratchet, lightest move-7 surface (soc-qk4b)

附带文件

references/retro.feature
# Executable spec for the /retro skill — lightest learning capture (BC1 Corpus, loop Move 7).
# /retro quick-captures a SINGLE observation into .agents/learnings/ — for an insight too small
# to warrant a full /post-mortem but too useful to leave in the handoff. The captured entry is a
# candidate; the promotion ratchet still decides whether it becomes a pattern/rule. Hexagon:
# domain; consumes: standards; produces: result.json. (soc-qk4b)

Feature: Retro is the lightest single-observation learning capture
  As the move-7 quick-capture surface
  I want a single insight written to the learnings store with minimal ceremony
  So that small-but-useful observations are not lost in the handoff

  Scenario: a single observation is captured to the learnings store
    Given an insight too small for a full /post-mortem but worth keeping
    When /retro runs
    Then the observation is written to .agents/learnings/ (result.json records the capture)

  Scenario: a captured entry is a candidate, not yet promoted
    When a retro entry is captured
    Then the promotion ratchet still applies — it is a candidate learning, not yet a pattern or rule
    And promotion to a pattern/rule happens later under the ratchet, not at capture time

  Scenario: retro is lighter than post-mortem and forge
    Then /retro captures one observation directly (no council, no transcript mining)
    And it is the lightest of the move-7 capture surfaces
scripts/validate.sh
#!/usr/bin/env bash
set -euo pipefail
SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
PASS=0; FAIL=0

check() { if bash -c "$2"; then echo "PASS: $1"; PASS=$((PASS + 1)); else echo "FAIL: $1"; FAIL=$((FAIL + 1)); fi; }

check "SKILL.md exists" "[ -f '$SKILL_DIR/SKILL.md' ]"
check "SKILL.md has YAML frontmatter" "head -1 '$SKILL_DIR/SKILL.md' | grep -q '^---$'"
check "SKILL.md has name: retro" "grep -q '^name: retro' '$SKILL_DIR/SKILL.md'"
check "SKILL.md mentions .agents/learnings/ output" "grep -q '\.agents/learnings/' '$SKILL_DIR/SKILL.md'"
check "SKILL.md mentions learning categories" "grep -qi 'category\|debugging\|architecture\|process' '$SKILL_DIR/SKILL.md'"
check "SKILL.md mentions post-mortem delegation" "grep -qi 'post-mortem' '$SKILL_DIR/SKILL.md'"

echo ""; echo "Results: $PASS passed, $FAIL failed"
[ $FAIL -eq 0 ] && exit 0 || exit 1