record-failurelisted
Install: claude install-skill reghis86/context-forge
## What This Does
Wraps `core/scripts/tools/record-failure.sh`. Creates a minimalist YAML failure ledger with
exactly 3 semantic blocks: `execution_context`, `error_trajectory`, and `agent_reflection`.
After writing, checks if the same failure slug has occurred 3 or more times. If yes, triggers
the `/evolve` skill to surface patterns for human review.
**Sharding format:** `<IDE_DIR>/lessons/YYYY/MM/DD/<PREFIX>/<UUID>-<slug>.yaml`
where `<PREFIX>` is the first 2 characters of the UUID.
## When to Use
**Trigger (MANDATORY):**
- Circuit-breaker halt (`[CIRCUIT_BREAKER_HALT]` — same action failed twice)
- Unrecoverable error requiring human intervention
- Any degraded-state entry
**Skip:** Do NOT create a ledger for recoverable errors that were fixed on the first retry.
## How to Use
1. Generate a UUID and derive the 2-char prefix.
2. Create slug from 2-3 words describing the failure (e.g., `barrel-export-missing`).
3. Build sharded path: `<IDE_DIR>/lessons/YYYY/MM/DD/<PREFIX>/<UUID>-<slug>.yaml`
4. Write YAML with exactly 3 blocks (truncate `error_trajectory` to <500 chars).
5. Run 3-strike check: `find <IDE_DIR>/lessons/ -name "*<slug>*.yaml" | wc -l`
6. If count >= 3: invoke `/evolve` skill.
## Output Format
```yaml
# .claude/lessons/2026/04/14/a1/a1b2c3d4-barrel-export-missing.yaml
execution_context:
goal: "Build billing module after adding cancelSubscription"
tool: "Terminal (npm run build)"
error_trajectory: |
libs/billing/src/index.ts:10:14 - error TS2305: