代理式编码循环运行器

填写此提示词

运行一个代理式编码循环,任务、验证方法和完成标准可独立选择,并持续迭代直到外部检查通过。

提示词模板

Execute the following task as an agentic loop. Do not ask for confirmation between iterations.

### TASK
Perform this action: {{Action: # Implement, Implement a new feature, Implement a missing function body, Write unit tests for existing code, # Fix, *Fix a failing test or bug, Fix all compiler warnings, Resolve linter violations, # Improve, Refactor without changing behavior, Optimize a slow code path, Migrate code to a newer API or framework version, Add missing error handling}}

### CONTEXT
{{Project Context: if used in an AI agent use the current project}}

### LOOP STRUCTURE
Repeat the following cycle:
1. ACT: Apply the smallest meaningful change toward the task.
2. VERIFY: Check the result using this method: {{Verification: # Automated, *Run the test suite, Compile or build the project, Run the linter and static analysis, Execute the script or program and inspect the output, Validate output against a schema or contract, # Manual proxy, Run a single reproduction case, Compare behavior before and after the change, Measure performance with a benchmark, Diff the output against a known-good reference}}
3. FEED BACK: If verification fails, take the raw error output (stack trace, test report, compiler message) unmodified into the next iteration. Do not summarize or interpret it before acting on it.

### COMPLETION CRITERION
Stop the loop only when this condition is met: {{Done When: *All tests pass with zero failures, Build succeeds with zero warnings, Linter reports zero violations, Program runs without exceptions on the given input, Output validates against the schema, Benchmark meets the target threshold, Reproduction case no longer fails, Behavior is identical before and after refactoring, All new code paths are covered by tests}}

### SAFEGUARDS
- Maximum {{Max Iterations:5}} iterations. If the limit is reached without success, stop and report the last error, what was attempted, and a hypothesis for the root cause.
- If the same error occurs in two consecutive iterations, stop immediately and report the stall instead of retrying.
- Touch only files required by the task.

### ADDITIONAL INFORMATION:
{{ Additional Information: none }}

After completion, summarize in 3 short bullet points: what was changed, how it was verified, and how many iterations were needed.

使用指南

适用场景

  • 以结构化、可复用的提示词为起点,而非空白对话框。
  • 根据自己的需求调整提示词,同时保持原始意图不变。
  • 与Software Development, Debug & Testing相关的工作流。

使用方法

  1. 复制完整的提示词模板。
  2. 将每个变量替换为自己的内容,或从建议选项中选择。
  3. 将完成的提示词粘贴到 ChatGPT、Claude、Gemini 或其他 AI 助手中。

此提示词中的变量

Action

# Implement, Implement a new feature, Implement a missing function body, Write unit tests for existing code, # Fix, Fix a failing test or bug, Fix all compiler warnings, Resolve linter violations

Project Context

if used in an AI agent use the current project

Verification

# Automated, Run the test suite, Compile or build the project, Run the linter and static analysis, Execute the script or program and inspect the output, Validate output against a schema or contract, # Manual proxy, Run a single reproduction case

Done When

All tests pass with zero failures, Build succeeds with zero warnings, Linter reports zero violations, Program runs without exceptions on the given input, Output validates against the schema, Benchmark meets the target threshold, Reproduction case no longer fails, Behavior is identical before and after refactoring

Max Iterations

5

Additional Information

none

示例起点

Execute the following task as an agentic loop. Do not ask for confirmation between iterations.

### TASK
Perform this action: # Implement

### CONTEXT
if used in an AI agent use the current project

### LOOP STRUCTURE
Repeat the following cycle:
1. ACT: Apply the smallest meaningful change toward the task.
2. VERIFY: Check the result using this method: # Automated
3. FEED BACK: If verification fails, take the raw error output (stack trace, test report, compiler message) unmodified into the next iteration. Do not summarize or interpret it before acting on it.

### COMPLETION CRITERION
Stop the loop only when this condition is met: All tests pass with zero failures

### SAFEGUARDS
- Maximum 5 iterations. If the limit is reached without success, stop and report the last error, what was attempted, and a hypothesis for the root cause.
- If the same error occurs in two consecutive iterations...

变量使用说明

变量语法

变量被 {{ 和 }} 包裹,遵循以下格式:

{{variable name: option1, option2, option3 }}

预定义变量

选项可以通过方括号引用预定义变量列表。这些选项以[橙色]显示,提供颜色、语气或语言等常用值。

{{Tone: [tones] }}

自定义选择列表

也可以提供以逗号分隔的内联选项列表。

{{Format: bullet points, paragraphs, numbered list }}
💡

提示:使用这些提示词无需 PUCO 应用!只需复制模板,直接在 ChatGPT、Claude、Gemini 或任何其他 AI 助手中将每个 {{…}} 部分替换为自己的文本。

数秒内使用此提示词

安装 PUCO for Mac:在任意应用中按下快捷键,填写智能表单,粘贴到 ChatGPT、Claude 或 Gemini。每个变量都变成精选下拉菜单,上次的值会被记住。

在 Mac App Store 下载