MCP.so
登录
自动化manual

Guardrails Learning Loop已精选

When a check fails twice the same way, append a guardrail sign to .ralph/guardrails.md so the next iteration avoids repeating it.

延伸阅读: Ralph Loop 到底是什么?

基本信息

分类

自动化

目标

tests and lint pass without repeating prior failure patterns

最大迭代次数

12

检查命令

npm test && npm run lint

退出条件

all checks pass

支持的智能体

Cursor, Claude Code

启动提示词

Start the "Guardrails Learning Loop" loop.

Goal: tests and lint pass without repeating prior failure patterns
Max iterations: 12
Between iterations run: npm test && npm run lint
Exit when: all checks pass

Step 1: Read .ralph/guardrails.md, run checks, and if a failure repeats, add a sign before fixing.

Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.

步骤

  1. 1

    Read guardrails

    Read .ralph/guardrails.md before any work. Treat each sign as a hard constraint.

  2. 2

    Run checks

    Run the project's backpressure commands.

    npm test && npm run lint
  3. 3

    Record failure sign

    If the same error occurred before, append a concise sign to guardrails.md: what failed and how to avoid it.

  4. 4

    Fix with guardrails

    Apply a fix that respects all guardrail signs. Do not repeat prior failed approaches.

评论

更多 自动化 相关内容